diff --git a/algorithms-genetic/README.md b/algorithms-genetic/README.md index 0f68918fff..39f8d59eee 100644 --- a/algorithms-genetic/README.md +++ b/algorithms-genetic/README.md @@ -1,4 +1,6 @@ ## Relevant articles: - [Introduction to Jenetics Library](http://www.baeldung.com/jenetics) -- [Ant Colony Optimization](http://www.baeldung.com/java-ant-colony-optimization) \ No newline at end of file +- [Ant Colony Optimization](http://www.baeldung.com/java-ant-colony-optimization) +- [Design a Genetic Algorithm in Java](https://www.baeldung.com/java-genetic-algorithm) +- [The Traveling Salesman Problem in Java](https://www.baeldung.com/java-simulated-annealing-for-traveling-salesman) diff --git a/algorithms-genetic/roundUpToHundred/.gitignore b/algorithms-genetic/roundUpToHundred/.gitignore deleted file mode 100644 index ae3c172604..0000000000 --- a/algorithms-genetic/roundUpToHundred/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/algorithms-genetic/roundUpToHundred/src/com/java/src/RoundUpToHundred.java b/algorithms-genetic/roundUpToHundred/src/com/java/src/RoundUpToHundred.java deleted file mode 100644 index 6c02a340d3..0000000000 --- a/algorithms-genetic/roundUpToHundred/src/com/java/src/RoundUpToHundred.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.java.src; - -import java.util.Scanner; - -public class RoundUpToHundred { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - double input = scanner.nextDouble(); - scanner.close(); - - RoundUpToHundred.round(input); - } - - static long round(double input) { - long i = (long) Math.ceil(input); - return ((i + 99) / 100) * 100; - }; - -} diff --git a/algorithms-genetic/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java b/algorithms-genetic/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java deleted file mode 100644 index cb541ad49c..0000000000 --- a/algorithms-genetic/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.java.src; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -public class RoundUpToHundredTest { - @Test - public void givenInput_whenRound_thenRoundUpToTheNearestHundred() { - assertEquals("Rounded up to hundred", 100, RoundUpToHundred.round(99)); - assertEquals("Rounded up to three hundred ", 300, RoundUpToHundred.round(200.2)); - assertEquals("Returns same rounded value", 400, RoundUpToHundred.round(400)); - } -} diff --git a/algorithms-genetic/src/main/java/com/baeldung/algorithms/RunAlgorithm.java b/algorithms-genetic/src/main/java/com/baeldung/algorithms/RunAlgorithm.java index ce04d26db3..779cb9b970 100644 --- a/algorithms-genetic/src/main/java/com/baeldung/algorithms/RunAlgorithm.java +++ b/algorithms-genetic/src/main/java/com/baeldung/algorithms/RunAlgorithm.java @@ -5,7 +5,6 @@ import java.util.Scanner; import com.baeldung.algorithms.ga.annealing.SimulatedAnnealing; import com.baeldung.algorithms.ga.ant_colony.AntColonyOptimization; import com.baeldung.algorithms.ga.binary.SimpleGeneticAlgorithm; -import com.baeldung.algorithms.slope_one.SlopeOne; public class RunAlgorithm { @@ -13,11 +12,8 @@ public class RunAlgorithm { Scanner in = new Scanner(System.in); System.out.println("Run algorithm:"); System.out.println("1 - Simulated Annealing"); - System.out.println("2 - Slope One"); - System.out.println("3 - Simple Genetic Algorithm"); - System.out.println("4 - Ant Colony"); - System.out.println("5 - Dijkstra"); - System.out.println("6 - All pairs in an array that add up to a given sum"); + System.out.println("2 - Simple Genetic Algorithm"); + System.out.println("3 - Ant Colony"); int decision = in.nextInt(); switch (decision) { case 1: @@ -25,19 +21,13 @@ public class RunAlgorithm { "Optimized distance for travel: " + SimulatedAnnealing.simulateAnnealing(10, 10000, 0.9995)); break; case 2: - SlopeOne.slopeOne(3); - break; - case 3: SimpleGeneticAlgorithm ga = new SimpleGeneticAlgorithm(); ga.runAlgorithm(50, "1011000100000100010000100000100111001000000100000100000000001111"); break; - case 4: + case 3: AntColonyOptimization antColony = new AntColonyOptimization(21); antColony.startAntOptimization(); break; - case 5: - System.out.println("Please run the DijkstraAlgorithmTest."); - break; default: System.out.println("Unknown option"); break; diff --git a/algorithms-miscellaneous-1/README.md b/algorithms-miscellaneous-1/README.md index 9efb2233bf..a04874c4d2 100644 --- a/algorithms-miscellaneous-1/README.md +++ b/algorithms-miscellaneous-1/README.md @@ -9,4 +9,5 @@ - [How to Find the Kth Largest Element in Java](http://www.baeldung.com/java-kth-largest-element) - [Multi-Swarm Optimization Algorithm in Java](http://www.baeldung.com/java-multi-swarm-algorithm) - [String Search Algorithms for Large Texts](http://www.baeldung.com/java-full-text-search-algorithms) -- [Check If a String Contains All The Letters of The Alphabet](https://www.baeldung.com/java-string-contains-all-letters) \ No newline at end of file +- [Check If a String Contains All The Letters of The Alphabet](https://www.baeldung.com/java-string-contains-all-letters) +- [Find the Middle Element of a Linked List](http://www.baeldung.com/java-linked-list-middle-element) \ No newline at end of file diff --git a/algorithms-miscellaneous-1/roundUpToHundred/.gitignore b/algorithms-miscellaneous-1/roundUpToHundred/.gitignore deleted file mode 100644 index ae3c172604..0000000000 --- a/algorithms-miscellaneous-1/roundUpToHundred/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/algorithms-miscellaneous-1/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java b/algorithms-miscellaneous-1/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java deleted file mode 100644 index cb541ad49c..0000000000 --- a/algorithms-miscellaneous-1/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.java.src; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -public class RoundUpToHundredTest { - @Test - public void givenInput_whenRound_thenRoundUpToTheNearestHundred() { - assertEquals("Rounded up to hundred", 100, RoundUpToHundred.round(99)); - assertEquals("Rounded up to three hundred ", 300, RoundUpToHundred.round(200.2)); - assertEquals("Returns same rounded value", 400, RoundUpToHundred.round(400)); - } -} diff --git a/algorithms-miscellaneous-1/src/main/resources/maze/maze1.txt b/algorithms-miscellaneous-1/src/main/resources/maze/maze1.txt deleted file mode 100644 index 8b48c325d2..0000000000 --- a/algorithms-miscellaneous-1/src/main/resources/maze/maze1.txt +++ /dev/null @@ -1,12 +0,0 @@ -S ######## -# # -# ### ## # -# # # # -# # # # # -# ## ##### -# # # -# # # # # -##### #### -# # E -# # # # -########## \ No newline at end of file diff --git a/algorithms-miscellaneous-1/src/main/resources/maze/maze2.txt b/algorithms-miscellaneous-1/src/main/resources/maze/maze2.txt deleted file mode 100644 index df5b6bc66b..0000000000 --- a/algorithms-miscellaneous-1/src/main/resources/maze/maze2.txt +++ /dev/null @@ -1,22 +0,0 @@ -S ########################## -# # # # -# # #### ############### # -# # # # # # -# # #### # # ############### -# # # # # # # -# # # #### ### ########### # -# # # # # # -# ################## # -######### # # # # # -# # #### # ####### # # -# # ### ### # # # # # -# # ## # ##### # # -##### ####### # # # # # -# # ## ## #### # # -# ##### ####### # # -# # ############ -####### ######### # # -# # ######## # -# ####### ###### ## # E -# # # ## # -############################ \ No newline at end of file diff --git a/algorithms-miscellaneous-2/README.md b/algorithms-miscellaneous-2/README.md index 2634fd6b56..6772a94a8d 100644 --- a/algorithms-miscellaneous-2/README.md +++ b/algorithms-miscellaneous-2/README.md @@ -10,7 +10,6 @@ - [A Collaborative Filtering Recommendation System in Java](http://www.baeldung.com/java-collaborative-filtering-recommendations) - [Converting Between Roman and Arabic Numerals in Java](http://www.baeldung.com/java-convert-roman-arabic) - [Practical Java Examples of the Big O Notation](http://www.baeldung.com/java-algorithm-complexity) -- [Find the Middle Element of a Linked List](http://www.baeldung.com/java-linked-list-middle-element) - [An Introduction to the Theory of Big-O Notation](http://www.baeldung.com/big-o-notation) - [Check If Two Rectangles Overlap In Java](https://www.baeldung.com/java-check-if-two-rectangles-overlap) - [Calculate the Distance Between Two Points in Java](https://www.baeldung.com/java-distance-between-two-points) diff --git a/algorithms-miscellaneous-2/roundUpToHundred/.gitignore b/algorithms-miscellaneous-2/roundUpToHundred/.gitignore deleted file mode 100644 index ae3c172604..0000000000 --- a/algorithms-miscellaneous-2/roundUpToHundred/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/algorithms-miscellaneous-2/roundUpToHundred/src/com/java/src/RoundUpToHundred.java b/algorithms-miscellaneous-2/roundUpToHundred/src/com/java/src/RoundUpToHundred.java deleted file mode 100644 index 6c02a340d3..0000000000 --- a/algorithms-miscellaneous-2/roundUpToHundred/src/com/java/src/RoundUpToHundred.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.java.src; - -import java.util.Scanner; - -public class RoundUpToHundred { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - double input = scanner.nextDouble(); - scanner.close(); - - RoundUpToHundred.round(input); - } - - static long round(double input) { - long i = (long) Math.ceil(input); - return ((i + 99) / 100) * 100; - }; - -} diff --git a/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/RunAlgorithm.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/RunAlgorithm.java new file mode 100644 index 0000000000..a1a096bc30 --- /dev/null +++ b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/RunAlgorithm.java @@ -0,0 +1,28 @@ +package com.baeldung.algorithms; + +import java.util.Scanner; + +import com.baeldung.algorithms.slope_one.SlopeOne; + +public class RunAlgorithm { + + public static void main(String[] args) throws InstantiationException, IllegalAccessException { + Scanner in = new Scanner(System.in); + System.out.println("1 - Slope One"); + System.out.println("2 - Dijkstra"); + int decision = in.nextInt(); + switch (decision) { + case 1: + SlopeOne.slopeOne(3); + break; + case 2: + System.out.println("Please run the DijkstraAlgorithmLongRunningUnitTest."); + break; + default: + System.out.println("Unknown option"); + break; + } + in.close(); + } + +} diff --git a/algorithms-genetic/src/main/java/com/baeldung/algorithms/ga/dijkstra/Dijkstra.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/ga/dijkstra/Dijkstra.java similarity index 100% rename from algorithms-genetic/src/main/java/com/baeldung/algorithms/ga/dijkstra/Dijkstra.java rename to algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/ga/dijkstra/Dijkstra.java diff --git a/algorithms-genetic/src/main/java/com/baeldung/algorithms/ga/dijkstra/Graph.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/ga/dijkstra/Graph.java similarity index 100% rename from algorithms-genetic/src/main/java/com/baeldung/algorithms/ga/dijkstra/Graph.java rename to algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/ga/dijkstra/Graph.java diff --git a/algorithms-genetic/src/main/java/com/baeldung/algorithms/ga/dijkstra/Node.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/ga/dijkstra/Node.java similarity index 100% rename from algorithms-genetic/src/main/java/com/baeldung/algorithms/ga/dijkstra/Node.java rename to algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/ga/dijkstra/Node.java diff --git a/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/mercator/EllipticalMercator.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/mercator/EllipticalMercator.java new file mode 100644 index 0000000000..e1c41f9518 --- /dev/null +++ b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/mercator/EllipticalMercator.java @@ -0,0 +1,22 @@ +package com.baeldung.algorithms.mercator; + +class EllipticalMercator extends Mercator { + + @Override + double yAxisProjection(double input) { + + input = Math.min(Math.max(input, -89.5), 89.5); + double earthDimensionalRateNormalized = 1.0 - Math.pow(RADIUS_MINOR / RADIUS_MAJOR, 2); + + double inputOnEarthProj = Math.sqrt(earthDimensionalRateNormalized) * Math.sin( Math.toRadians(input)); + + inputOnEarthProj = Math.pow(((1.0 - inputOnEarthProj)/(1.0+inputOnEarthProj)), 0.5 * Math.sqrt(earthDimensionalRateNormalized)); + double inputOnEarthProjNormalized = Math.tan(0.5 * ((Math.PI*0.5) - Math.toRadians(input)))/inputOnEarthProj; + return (-1) * RADIUS_MAJOR * Math.log(inputOnEarthProjNormalized); + } + + @Override + double xAxisProjection(double input) { + return RADIUS_MAJOR * Math.toRadians(input); + } +} diff --git a/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/mercator/Mercator.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/mercator/Mercator.java new file mode 100644 index 0000000000..b289b1839d --- /dev/null +++ b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/mercator/Mercator.java @@ -0,0 +1,10 @@ +package com.baeldung.algorithms.mercator; + +abstract class Mercator { + final static double RADIUS_MAJOR = 6378137.0; + final static double RADIUS_MINOR = 6356752.3142; + + abstract double yAxisProjection(double input); + + abstract double xAxisProjection(double input); +} diff --git a/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/mercator/SphericalMercator.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/mercator/SphericalMercator.java new file mode 100644 index 0000000000..1be976d82e --- /dev/null +++ b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/mercator/SphericalMercator.java @@ -0,0 +1,14 @@ +package com.baeldung.algorithms.mercator; + +public class SphericalMercator extends Mercator { + + @Override + double xAxisProjection(double input) { + return Math.toRadians(input) * RADIUS_MAJOR; + } + + @Override + double yAxisProjection(double input) { + return Math.log(Math.tan(Math.PI / 4 + Math.toRadians(input) / 2)) * RADIUS_MAJOR; + } +} diff --git a/algorithms-miscellaneous-1/roundUpToHundred/src/com/java/src/RoundUpToHundred.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/roundedup/RoundUpToHundred.java similarity index 90% rename from algorithms-miscellaneous-1/roundUpToHundred/src/com/java/src/RoundUpToHundred.java rename to algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/roundedup/RoundUpToHundred.java index 6c02a340d3..333019e294 100644 --- a/algorithms-miscellaneous-1/roundUpToHundred/src/com/java/src/RoundUpToHundred.java +++ b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/roundedup/RoundUpToHundred.java @@ -1,4 +1,4 @@ -package com.java.src; +package com.baeldung.algorithms.roundedup; import java.util.Scanner; diff --git a/algorithms-genetic/src/main/java/com/baeldung/algorithms/slope_one/InputData.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/InputData.java similarity index 100% rename from algorithms-genetic/src/main/java/com/baeldung/algorithms/slope_one/InputData.java rename to algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/InputData.java diff --git a/algorithms-genetic/src/main/java/com/baeldung/algorithms/slope_one/Item.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/Item.java similarity index 100% rename from algorithms-genetic/src/main/java/com/baeldung/algorithms/slope_one/Item.java rename to algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/Item.java diff --git a/algorithms-genetic/src/main/java/com/baeldung/algorithms/slope_one/SlopeOne.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/SlopeOne.java similarity index 100% rename from algorithms-genetic/src/main/java/com/baeldung/algorithms/slope_one/SlopeOne.java rename to algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/SlopeOne.java diff --git a/algorithms-genetic/src/main/java/com/baeldung/algorithms/slope_one/User.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/User.java similarity index 100% rename from algorithms-genetic/src/main/java/com/baeldung/algorithms/slope_one/User.java rename to algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/User.java diff --git a/algorithms-genetic/src/test/java/com/baeldung/algorithms/DijkstraAlgorithmLongRunningUnitTest.java b/algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/DijkstraAlgorithmLongRunningUnitTest.java similarity index 100% rename from algorithms-genetic/src/test/java/com/baeldung/algorithms/DijkstraAlgorithmLongRunningUnitTest.java rename to algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/DijkstraAlgorithmLongRunningUnitTest.java diff --git a/algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/mercator/EllipticalMercatorUnitTest.java b/algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/mercator/EllipticalMercatorUnitTest.java new file mode 100644 index 0000000000..96b644c46c --- /dev/null +++ b/algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/mercator/EllipticalMercatorUnitTest.java @@ -0,0 +1,22 @@ +package com.baeldung.algorithms.mercator; + +import org.junit.Assert; +import org.junit.Test; + + +public class EllipticalMercatorUnitTest { + + @Test + public void giventThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() { + Mercator mercator = new EllipticalMercator(); + double result = mercator.xAxisProjection(22); + Assert.assertEquals(result, 2449028.7974520186, 0.0); + } + + @Test + public void giventThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() { + Mercator mercator = new EllipticalMercator(); + double result = mercator.yAxisProjection(44); + Assert.assertEquals(result, 5435749.887511954, 0.0); + } +} diff --git a/algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/mercator/SphericalMercatorUnitTest.java b/algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/mercator/SphericalMercatorUnitTest.java new file mode 100644 index 0000000000..348c6ad3e4 --- /dev/null +++ b/algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/mercator/SphericalMercatorUnitTest.java @@ -0,0 +1,21 @@ +package com.baeldung.algorithms.mercator; + +import org.junit.Assert; +import org.junit.Test; + +public class SphericalMercatorUnitTest { + + @Test + public void giventThatTheInputIs22_whenXAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() { + Mercator mercator = new SphericalMercator(); + double result = mercator.xAxisProjection(22); + Assert.assertEquals(result, 2449028.7974520186, 0.0); + } + + @Test + public void giventThatTheInputIs44_whenYAxisProjectionIsCalled_thenTheResultIsTheCorrectOne() { + Mercator mercator = new SphericalMercator(); + double result = mercator.yAxisProjection(44); + Assert.assertEquals(result, 5465442.183322753, 0.0); + } +} diff --git a/algorithms-miscellaneous-2/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java b/algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/roundedup/RoundUpToHundredUnitTest.java similarity index 83% rename from algorithms-miscellaneous-2/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java rename to algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/roundedup/RoundUpToHundredUnitTest.java index cb541ad49c..5191d65787 100644 --- a/algorithms-miscellaneous-2/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java +++ b/algorithms-miscellaneous-2/src/test/java/com/baeldung/algorithms/roundedup/RoundUpToHundredUnitTest.java @@ -1,10 +1,10 @@ -package com.java.src; +package com.baeldung.algorithms.roundedup; import static org.junit.Assert.assertEquals; import org.junit.Test; -public class RoundUpToHundredTest { +public class RoundUpToHundredUnitTest { @Test public void givenInput_whenRound_thenRoundUpToTheNearestHundred() { assertEquals("Rounded up to hundred", 100, RoundUpToHundred.round(99)); diff --git a/algorithms-sorting/README.md b/algorithms-sorting/README.md index f88b93e25e..36460293b0 100644 --- a/algorithms-sorting/README.md +++ b/algorithms-sorting/README.md @@ -4,4 +4,4 @@ - [Merge Sort in Java](https://www.baeldung.com/java-merge-sort) - [Quicksort Algorithm Implementation in Java](https://www.baeldung.com/java-quicksort) - [Insertion Sort in Java](https://www.baeldung.com/java-insertion-sort) - +- [Heap Sort in Java](https://www.baeldung.com/java-heap-sort) diff --git a/algorithms-sorting/roundUpToHundred/.gitignore b/algorithms-sorting/roundUpToHundred/.gitignore deleted file mode 100644 index ae3c172604..0000000000 --- a/algorithms-sorting/roundUpToHundred/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/algorithms-sorting/roundUpToHundred/src/com/java/src/RoundUpToHundred.java b/algorithms-sorting/roundUpToHundred/src/com/java/src/RoundUpToHundred.java deleted file mode 100644 index 6c02a340d3..0000000000 --- a/algorithms-sorting/roundUpToHundred/src/com/java/src/RoundUpToHundred.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.java.src; - -import java.util.Scanner; - -public class RoundUpToHundred { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - double input = scanner.nextDouble(); - scanner.close(); - - RoundUpToHundred.round(input); - } - - static long round(double input) { - long i = (long) Math.ceil(input); - return ((i + 99) / 100) * 100; - }; - -} diff --git a/algorithms-sorting/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java b/algorithms-sorting/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java deleted file mode 100644 index cb541ad49c..0000000000 --- a/algorithms-sorting/roundUpToHundred/src/com/java/src/RoundUpToHundredTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.java.src; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -public class RoundUpToHundredTest { - @Test - public void givenInput_whenRound_thenRoundUpToTheNearestHundred() { - assertEquals("Rounded up to hundred", 100, RoundUpToHundred.round(99)); - assertEquals("Rounded up to three hundred ", 300, RoundUpToHundred.round(200.2)); - assertEquals("Returns same rounded value", 400, RoundUpToHundred.round(400)); - } -} diff --git a/apache-pulsar/README.md b/apache-pulsar/README.md new file mode 100644 index 0000000000..2970bc3d88 --- /dev/null +++ b/apache-pulsar/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Introduction to Apache Pulsar](https://www.baeldung.com/apache-pulsar) diff --git a/cdi-portable-extension/flyway-cdi/pom.xml b/cdi-portable-extension/flyway-cdi/pom.xml deleted file mode 100644 index 9fb781aaab..0000000000 --- a/cdi-portable-extension/flyway-cdi/pom.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - 4.0.0 - - flyway-cdi - - - com.baeldung - cdi-portable-extension - 1.0-SNAPSHOT - - - - - javax.enterprise - cdi-api - 2.0.SP1 - - - org.flywaydb - flyway-core - 5.1.4 - - - org.apache.tomcat - tomcat-jdbc - 8.5.33 - - - javax.annotation - javax.annotation-api - 1.3.2 - - - - diff --git a/cdi-portable-extension/flyway-cdi/src/main/java/com/baeldung/cdi/extension/FlywayExtension.java b/cdi-portable-extension/flyway-cdi/src/main/java/com/baeldung/cdi/extension/FlywayExtension.java deleted file mode 100644 index a5019b82c1..0000000000 --- a/cdi-portable-extension/flyway-cdi/src/main/java/com/baeldung/cdi/extension/FlywayExtension.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.baeldung.cdi.extension; - -import org.apache.tomcat.jdbc.pool.DataSource; -import org.flywaydb.core.Flyway; - -import javax.annotation.sql.DataSourceDefinition; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; -import javax.enterprise.inject.Any; -import javax.enterprise.inject.Default; -import javax.enterprise.inject.literal.InjectLiteral; -import javax.enterprise.inject.spi.*; -import javax.enterprise.util.AnnotationLiteral; - - -/** - * Flyway is now under CDI container like: - * - * @ApplicationScoped - * @FlywayType public class Flyway{ - * @Inject setDataSource(DataSource dataSource){ - * //... - * } - * } - */ - -public class FlywayExtension implements Extension { - - DataSourceDefinition dataSourceDefinition = null; - - public void registerFlywayType(@Observes BeforeBeanDiscovery bbdEvent) { - bbdEvent.addAnnotatedType(Flyway.class, Flyway.class.getName()); - } - - public void detectDataSourceDefinition(@Observes @WithAnnotations(DataSourceDefinition.class) ProcessAnnotatedType patEvent) { - AnnotatedType at = patEvent.getAnnotatedType(); - dataSourceDefinition = at.getAnnotation(DataSourceDefinition.class); - } - - public void processAnnotatedType(@Observes ProcessAnnotatedType patEvent) { - patEvent.configureAnnotatedType() - //Add Scope - .add(ApplicationScoped.Literal.INSTANCE) - //Add Qualifier - .add(new AnnotationLiteral() { - }) - //Decorate setDataSource(DataSource dataSource){} with @Inject - .filterMethods(annotatedMethod -> { - return annotatedMethod.getParameters().size() == 1 && - annotatedMethod.getParameters().get(0).getBaseType().equals(javax.sql.DataSource.class); - }) - .findFirst().get().add(InjectLiteral.INSTANCE); - } - - void afterBeanDiscovery(@Observes AfterBeanDiscovery abdEvent, BeanManager bm) { - abdEvent.addBean() - .types(javax.sql.DataSource.class, DataSource.class) - .qualifiers(new AnnotationLiteral() {}, new AnnotationLiteral() {}) - .scope(ApplicationScoped.class) - .name(DataSource.class.getName()) - .beanClass(DataSource.class) - .createWith(creationalContext -> { - DataSource instance = new DataSource(); - instance.setUrl(dataSourceDefinition.url()); - instance.setDriverClassName(dataSourceDefinition.className()); - return instance; - }); - } - - void runFlywayMigration(@Observes AfterDeploymentValidation adv, BeanManager manager) { - Flyway flyway = manager.createInstance().select(Flyway.class, new AnnotationLiteral() {}).get(); - flyway.migrate(); - } -} diff --git a/cdi-portable-extension/flyway-cdi/src/main/java/com/baeldung/cdi/extension/FlywayType.java b/cdi-portable-extension/flyway-cdi/src/main/java/com/baeldung/cdi/extension/FlywayType.java deleted file mode 100644 index 7c3a5affa6..0000000000 --- a/cdi-portable-extension/flyway-cdi/src/main/java/com/baeldung/cdi/extension/FlywayType.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.baeldung.cdi.extension; - -import javax.inject.Qualifier; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import static java.lang.annotation.ElementType.*; - -@Retention(RetentionPolicy.RUNTIME) -@Target({FIELD, METHOD, PARAMETER, TYPE}) -@Qualifier -public @interface FlywayType { -} \ No newline at end of file diff --git a/cdi-portable-extension/flyway-cdi/src/main/resources/META-INF/beans.xml b/cdi-portable-extension/flyway-cdi/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 44959bfa99..0000000000 --- a/cdi-portable-extension/flyway-cdi/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,6 +0,0 @@ - - \ No newline at end of file diff --git a/cdi-portable-extension/flyway-cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension b/cdi-portable-extension/flyway-cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension deleted file mode 100644 index a82dc47714..0000000000 --- a/cdi-portable-extension/flyway-cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension +++ /dev/null @@ -1,2 +0,0 @@ -com.baeldung.cdi.extension.FlywayExtension - diff --git a/cdi-portable-extension/main-app/pom.xml b/cdi-portable-extension/main-app/pom.xml deleted file mode 100644 index fab9b8bf07..0000000000 --- a/cdi-portable-extension/main-app/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - 4.0.0 - - main-app - jar - - - com.baeldung - cdi-portable-extension - 1.0-SNAPSHOT - - - - - - javax.enterprise - cdi-api - 2.0.SP1 - - - org.jboss.weld.se - weld-se-core - 3.0.5.Final - runtime - - - - com.baeldung - flyway-cdi - 1.0-SNAPSHOT - runtime - - - - com.h2database - h2 - 1.4.197 - runtime - - - - javax.annotation - javax.annotation-api - 1.3.2 - - - - - \ No newline at end of file diff --git a/cdi-portable-extension/main-app/src/main/java/com/baeldung/cdi/extension/MainApp.java b/cdi-portable-extension/main-app/src/main/java/com/baeldung/cdi/extension/MainApp.java deleted file mode 100644 index 1f6c5b43ba..0000000000 --- a/cdi-portable-extension/main-app/src/main/java/com/baeldung/cdi/extension/MainApp.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.baeldung.cdi.extension; - -import javax.annotation.sql.DataSourceDefinition; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.se.SeContainer; -import javax.enterprise.inject.se.SeContainerInitializer; - -@ApplicationScoped -@DataSourceDefinition(name = "ds", className = "org.h2.Driver", url = "jdbc:h2:mem:testdb") -public class MainApp { - public static void main(String[] args) { - SeContainerInitializer initializer = SeContainerInitializer.newInstance(); - try (SeContainer container = initializer.initialize()) { - } - } -} \ No newline at end of file diff --git a/cdi-portable-extension/main-app/src/main/resources/META-INF/beans.xml b/cdi-portable-extension/main-app/src/main/resources/META-INF/beans.xml deleted file mode 100644 index 44959bfa99..0000000000 --- a/cdi-portable-extension/main-app/src/main/resources/META-INF/beans.xml +++ /dev/null @@ -1,6 +0,0 @@ - - \ No newline at end of file diff --git a/cdi-portable-extension/main-app/src/main/resources/db/migration/V1__Create_person_table.sql b/cdi-portable-extension/main-app/src/main/resources/db/migration/V1__Create_person_table.sql deleted file mode 100644 index 6bddc7689e..0000000000 --- a/cdi-portable-extension/main-app/src/main/resources/db/migration/V1__Create_person_table.sql +++ /dev/null @@ -1,4 +0,0 @@ -create table PERSON ( - ID int not null, - NAME varchar(100) not null -); diff --git a/cdi-portable-extension/main-app/src/main/resources/db/migration/V2__Add_people.sql b/cdi-portable-extension/main-app/src/main/resources/db/migration/V2__Add_people.sql deleted file mode 100644 index d8f1d62667..0000000000 --- a/cdi-portable-extension/main-app/src/main/resources/db/migration/V2__Add_people.sql +++ /dev/null @@ -1,3 +0,0 @@ -insert into PERSON (ID, NAME) values (1, 'Axel'); -insert into PERSON (ID, NAME) values (2, 'Mr. Foo'); -insert into PERSON (ID, NAME) values (3, 'Ms. Bar'); diff --git a/cdi-portable-extension/pom.xml b/cdi-portable-extension/pom.xml deleted file mode 100644 index 66913de84d..0000000000 --- a/cdi-portable-extension/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - - com.baeldung - cdi-portable-extension - 1.0-SNAPSHOT - pom - - - 1.8 - 1.8 - - - - main-app - flyway-cdi - - - - - javax.enterprise - cdi-api - 2.0.SP1 - - - - \ No newline at end of file diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/AddCommand.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/AddCommand.java new file mode 100644 index 0000000000..279a3b2c55 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/AddCommand.java @@ -0,0 +1,17 @@ +package com.baeldung.reducingIfElse; + +public class AddCommand implements Command { + + private int a; + private int b; + + public AddCommand(int a, int b) { + this.a = a; + this.b = b; + } + + @Override + public Integer execute() { + return a + b; + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/AddRule.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/AddRule.java new file mode 100644 index 0000000000..f24c973ead --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/AddRule.java @@ -0,0 +1,21 @@ +package com.baeldung.reducingIfElse; + +public class AddRule implements Rule { + + private int result; + + @Override + public boolean evaluate(Expression expression) { + boolean evalResult = false; + if (expression.getOperator() == Operator.ADD) { + this.result = expression.getX() + expression.getY(); + evalResult = true; + } + return evalResult; + } + + @Override + public Result getResult() { + return new Result(result); + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Addition.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Addition.java new file mode 100644 index 0000000000..3174ea558c --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Addition.java @@ -0,0 +1,8 @@ +package com.baeldung.reducingIfElse; + +public class Addition implements Operation { + @Override + public int apply(int a, int b) { + return a + b; + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Calculator.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Calculator.java new file mode 100644 index 0000000000..550d92e183 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Calculator.java @@ -0,0 +1,83 @@ +package com.baeldung.reducingIfElse; + +public class Calculator { + + public int calculate(int a, int b, String operator) { + int result = Integer.MIN_VALUE; + + if ("add".equals(operator)) { + result = a + b; + } else if ("multiply".equals(operator)) { + result = a * b; + } else if ("divide".equals(operator)) { + result = a / b; + } else if ("subtract".equals(operator)) { + result = a - b; + } else if ("modulo".equals(operator)) { + result = a % b; + } + return result; + } + + public int calculateUsingSwitch(int a, int b, String operator) { + int result = 0; + switch (operator) { + case "add": + result = a + b; + break; + case "multiply": + result = a * b; + break; + case "divide": + result = a / b; + break; + case "subtract": + result = a - b; + break; + case "modulo": + result = a % b; + break; + default: + result = Integer.MIN_VALUE; + } + return result; + } + + public int calculateUsingSwitch(int a, int b, Operator operator) { + int result = 0; + switch (operator) { + case ADD: + result = a + b; + break; + case MULTIPLY: + result = a * b; + break; + case DIVIDE: + result = a / b; + break; + case SUBTRACT: + result = a - b; + break; + case MODULO: + result = a % b; + break; + default: + result = Integer.MIN_VALUE; + } + return result; + } + + public int calculate(int a, int b, Operator operator) { + return operator.apply(a, b); + } + + public int calculateUsingFactory(int a, int b, String operation) { + Operation targetOperation = OperatorFactory.getOperation(operation) + .orElseThrow(() -> new IllegalArgumentException("Invalid Operator")); + return targetOperation.apply(a, b); + } + + public int calculate(Command command) { + return command.execute(); + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Command.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Command.java new file mode 100644 index 0000000000..c084fcc6a0 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Command.java @@ -0,0 +1,5 @@ +package com.baeldung.reducingIfElse; + +public interface Command { + Integer execute(); +} \ No newline at end of file diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Division.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Division.java new file mode 100644 index 0000000000..75b1297655 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Division.java @@ -0,0 +1,7 @@ +package com.baeldung.reducingIfElse; + +public class Division implements Operation { + @Override public int apply(int a, int b) { + return a / b; + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Expression.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Expression.java new file mode 100644 index 0000000000..4d3fe1b824 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Expression.java @@ -0,0 +1,26 @@ +package com.baeldung.reducingIfElse; + +public class Expression { + + private Integer x; + private Integer y; + private Operator operator; + + public Expression(Integer x, Integer y, Operator operator) { + this.x = x; + this.y = y; + this.operator = operator; + } + + public Integer getX() { + return x; + } + + public Integer getY() { + return y; + } + + public Operator getOperator() { + return operator; + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Modulo.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Modulo.java new file mode 100644 index 0000000000..a7a081704c --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Modulo.java @@ -0,0 +1,7 @@ +package com.baeldung.reducingIfElse; + +public class Modulo implements Operation { + @Override public int apply(int a, int b) { + return a % b; + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Multiplication.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Multiplication.java new file mode 100644 index 0000000000..e1a39b33c4 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Multiplication.java @@ -0,0 +1,7 @@ +package com.baeldung.reducingIfElse; + +public class Multiplication implements Operation { + @Override public int apply(int a, int b) { + return 0; + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Operation.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Operation.java new file mode 100644 index 0000000000..41241fa810 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Operation.java @@ -0,0 +1,5 @@ +package com.baeldung.reducingIfElse; + +public interface Operation { + int apply(int a, int b); +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Operator.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Operator.java new file mode 100644 index 0000000000..831b8fa146 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Operator.java @@ -0,0 +1,41 @@ +package com.baeldung.reducingIfElse; + +public enum Operator { + + ADD { + @Override + public int apply(int a, int b) { + return a + b; + } + }, + + MULTIPLY { + @Override + public int apply(int a, int b) { + return a * b; + } + }, + + SUBTRACT { + @Override + public int apply(int a, int b) { + return a - b; + } + }, + + DIVIDE { + @Override + public int apply(int a, int b) { + return a / b; + } + }, + + MODULO { + @Override + public int apply(int a, int b) { + return a % b; + } + }; + + public abstract int apply(int a, int b); +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/OperatorFactory.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/OperatorFactory.java new file mode 100644 index 0000000000..18ed63adbd --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/OperatorFactory.java @@ -0,0 +1,21 @@ +package com.baeldung.reducingIfElse; + +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +public class OperatorFactory { + + static Map operationMap = new HashMap<>(); + static { + operationMap.put("add", new Addition()); + operationMap.put("divide", new Division()); + operationMap.put("multiply", new Multiplication()); + operationMap.put("subtract", new Subtraction()); + operationMap.put("modulo", new Modulo()); + } + + public static Optional getOperation(String operation) { + return Optional.ofNullable(operationMap.get(operation)); + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Result.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Result.java new file mode 100644 index 0000000000..d5ed12202e --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Result.java @@ -0,0 +1,13 @@ +package com.baeldung.reducingIfElse; + +public class Result { + int value; + + public Result(int value) { + this.value = value; + } + + public int getValue() { + return value; + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Rule.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Rule.java new file mode 100644 index 0000000000..5a6c84b0f9 --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Rule.java @@ -0,0 +1,8 @@ +package com.baeldung.reducingIfElse; + +public interface Rule { + + boolean evaluate(Expression expression); + + Result getResult(); +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/RuleEngine.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/RuleEngine.java new file mode 100644 index 0000000000..ac56915dee --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/RuleEngine.java @@ -0,0 +1,24 @@ +package com.baeldung.reducingIfElse; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +public class RuleEngine { + + private static List rules = new ArrayList<>(); + + static { + rules.add(new AddRule()); + } + + public Result process(Expression expression) { + + Rule rule = rules.stream() + .filter(r -> r.evaluate(expression)) + .findFirst() + .orElseThrow(() -> new IllegalArgumentException("Expression does not matches any Rule")); + return rule.getResult(); + } +} diff --git a/core-java-8/src/main/java/com/baeldung/reducingIfElse/Subtraction.java b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Subtraction.java new file mode 100644 index 0000000000..948998810e --- /dev/null +++ b/core-java-8/src/main/java/com/baeldung/reducingIfElse/Subtraction.java @@ -0,0 +1,7 @@ +package com.baeldung.reducingIfElse; + +public class Subtraction implements Operation { + @Override public int apply(int a, int b) { + return a - b; + } +} diff --git a/core-java-8/src/test/java/com/baeldung/reduceIfelse/CalculatorUnitTest.java b/core-java-8/src/test/java/com/baeldung/reduceIfelse/CalculatorUnitTest.java new file mode 100644 index 0000000000..fa351930d8 --- /dev/null +++ b/core-java-8/src/test/java/com/baeldung/reduceIfelse/CalculatorUnitTest.java @@ -0,0 +1,32 @@ +package com.baeldung.reduceIfelse; + +import com.baeldung.reducingIfElse.AddCommand; +import com.baeldung.reducingIfElse.Calculator; +import com.baeldung.reducingIfElse.Operator; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class CalculatorUnitTest { + + @Test + public void whenCalculateUsingStringOperator_thenReturnCorrectResult() { + Calculator calculator = new Calculator(); + int result = calculator.calculate(3, 4, "add"); + assertEquals(7, result); + } + + @Test + public void whenCalculateUsingEnumOperator_thenReturnCorrectResult() { + Calculator calculator = new Calculator(); + int result = calculator.calculate(3, 4, Operator.valueOf("ADD")); + assertEquals(7, result); + } + + @Test + public void whenCalculateUsingCommand_thenReturnCorrectResult() { + Calculator calculator = new Calculator(); + int result = calculator.calculate(new AddCommand(3, 7)); + assertEquals(10, result); + } +} diff --git a/core-java-8/src/test/java/com/baeldung/reduceIfelse/RuleEngineUnitTest.java b/core-java-8/src/test/java/com/baeldung/reduceIfelse/RuleEngineUnitTest.java new file mode 100644 index 0000000000..4a30b3efac --- /dev/null +++ b/core-java-8/src/test/java/com/baeldung/reduceIfelse/RuleEngineUnitTest.java @@ -0,0 +1,23 @@ +package com.baeldung.reduceIfelse; + +import com.baeldung.reducingIfElse.Expression; +import com.baeldung.reducingIfElse.Operator; +import com.baeldung.reducingIfElse.Result; +import com.baeldung.reducingIfElse.RuleEngine; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +public class RuleEngineUnitTest { + + @Test + public void whenNumbersGivenToRuleEngine_thenReturnCorrectResult() { + Expression expression = new Expression(5, 5, Operator.ADD); + RuleEngine engine = new RuleEngine(); + Result result = engine.process(expression); + + assertNotNull(result); + assertEquals(10, result.getValue()); + } +} diff --git a/core-java-arrays/.gitignore b/core-java-arrays/.gitignore new file mode 100644 index 0000000000..374c8bf907 --- /dev/null +++ b/core-java-arrays/.gitignore @@ -0,0 +1,25 @@ +*.class + +0.* + +#folders# +/target +/neoDb* +/data +/src/main/webapp/WEB-INF/classes +*/META-INF/* +.resourceCache + +# Packaged files # +*.jar +*.war +*.ear + +# Files generated by integration tests +backup-pom.xml +/bin/ +/temp + +#IntelliJ specific +.idea/ +*.iml \ No newline at end of file diff --git a/core-java-arrays/README.md b/core-java-arrays/README.md new file mode 100644 index 0000000000..bda2cf90bf --- /dev/null +++ b/core-java-arrays/README.md @@ -0,0 +1,15 @@ +========= + +## Core Java Arrays Cookbooks and Examples + +### Relevant Articles: +- [How to Copy an Array in Java](http://www.baeldung.com/java-array-copy) +- [Check if a Java Array Contains a Value](http://www.baeldung.com/java-array-contains-value) +- [Initializing Arrays in Java](http://www.baeldung.com/java-initialize-array) +- [Guide to the java.util.Arrays Class](http://www.baeldung.com/java-util-arrays) +- [Jagged Arrays In Java](http://www.baeldung.com/java-jagged-arrays) +- [Find Sum and Average in a Java Array](http://www.baeldung.com/java-array-sum-average) +- [Arrays in Java: A Reference Guide](https://www.baeldung.com/java-arrays-guide) +- [How to Invert an Array in Java](http://www.baeldung.com/java-invert-array) +- [Array Operations in Java](http://www.baeldung.com/java-common-array-operations) + diff --git a/core-java-arrays/pom.xml b/core-java-arrays/pom.xml new file mode 100644 index 0000000000..d2d0453e87 --- /dev/null +++ b/core-java-arrays/pom.xml @@ -0,0 +1,412 @@ + + 4.0.0 + com.baeldung + core-java-arrays + 0.1.0-SNAPSHOT + jar + core-java-arrays + + + com.baeldung + parent-java + 0.0.1-SNAPSHOT + ../parent-java + + + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + log4j + log4j + ${log4j.version} + + + org.slf4j + log4j-over-slf4j + ${org.slf4j.version} + + + + org.assertj + assertj-core + ${assertj-core.version} + test + + + org.openjdk.jmh + jmh-core + ${jmh-core.version} + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh-generator-annprocess.version} + + + org.springframework + spring-web + ${springframework.spring-web.version} + + + + + core-java-arrays + + + src/main/resources + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*LiveTest.java + **/*IntegrationTest.java + **/*IntTest.java + **/*LongRunningUnitTest.java + **/*ManualTest.java + + true + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + prepare-package + + copy-dependencies + + + ${project.build.directory}/libs + + + + + + + org.apache.maven.plugins + maven-jar-plugin + ${maven-jar-plugin.version} + + + + true + libs/ + org.baeldung.executable.ExecutableMavenJar + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + ${project.basedir} + + + org.baeldung.executable.ExecutableMavenJar + + + + jar-with-dependencies + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + ${maven-shade-plugin.version} + + + + shade + + + true + + + org.baeldung.executable.ExecutableMavenJar + + + + + + + + + com.jolira + onejar-maven-plugin + ${onejar-maven-plugin.version} + + + + org.baeldung.executable.ExecutableMavenJar + true + ${project.build.finalName}-onejar.${project.packaging} + + + one-jar + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot-maven-plugin.version} + + + + repackage + + + spring-boot + org.baeldung.executable.ExecutableMavenJar + + + + + + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + java + com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed + + -Xmx300m + -XX:+UseParallelGC + -classpath + + com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + 1.8 + 1.8 + + + + + + + + integration + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration-test + + test + + + + **/*ManualTest.java + + + **/*IntegrationTest.java + **/*IntTest.java + + + + + + + json + + + + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + + run-benchmarks + + none + + exec + + + test + java + + -classpath + + org.openjdk.jmh.Main + .* + + + + + + + + + + + + buildAgentLoader + + + + org.apache.maven.plugins + maven-jar-plugin + + + package + + jar + + + agentLoader + target/classes + + + true + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + com/baeldung/instrumentation/application/AgentLoader.class + com/baeldung/instrumentation/application/Launcher.class + + + + + + + + + + buildApplication + + + + org.apache.maven.plugins + maven-jar-plugin + + + package + + jar + + + application + target/classes + + + true + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + com/baeldung/instrumentation/application/MyAtm.class + com/baeldung/instrumentation/application/MyAtmApplication.class + com/baeldung/instrumentation/application/Launcher.class + + + + + + + + + + buildAgent + + + + org.apache.maven.plugins + maven-jar-plugin + + + package + + jar + + + agent + target/classes + + + true + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + com/baeldung/instrumentation/agent/AtmTransformer.class + com/baeldung/instrumentation/agent/MyInstrumentationAgent.class + + + + + + + + + + + + + + 3.8.1 + 1.16.12 + + 1.19 + 1.19 + + + 3.10.0 + + + 2.21.0 + 4.3.4.RELEASE + 3.0.0-M1 + 3.0.2 + 1.4.4 + 3.1.1 + 2.0.3.RELEASE + 1.6.0 + + + diff --git a/core-java/src/main/java/com/baeldung/array/ArrayBenchmarkRunner.java b/core-java-arrays/src/main/java/com/baeldung/array/ArrayBenchmarkRunner.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/ArrayBenchmarkRunner.java rename to core-java-arrays/src/main/java/com/baeldung/array/ArrayBenchmarkRunner.java diff --git a/core-java/src/main/java/com/baeldung/array/ArrayInitializer.java b/core-java-arrays/src/main/java/com/baeldung/array/ArrayInitializer.java similarity index 97% rename from core-java/src/main/java/com/baeldung/array/ArrayInitializer.java rename to core-java-arrays/src/main/java/com/baeldung/array/ArrayInitializer.java index 0ba6c342d9..d2b0428904 100644 --- a/core-java/src/main/java/com/baeldung/array/ArrayInitializer.java +++ b/core-java-arrays/src/main/java/com/baeldung/array/ArrayInitializer.java @@ -2,7 +2,7 @@ package com.baeldung.array; import java.util.Arrays; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; public class ArrayInitializer { diff --git a/core-java/src/main/java/com/baeldung/array/ArrayInverter.java b/core-java-arrays/src/main/java/com/baeldung/array/ArrayInverter.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/ArrayInverter.java rename to core-java-arrays/src/main/java/com/baeldung/array/ArrayInverter.java diff --git a/core-java/src/main/java/com/baeldung/array/ArrayReferenceGuide.java b/core-java-arrays/src/main/java/com/baeldung/array/ArrayReferenceGuide.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/ArrayReferenceGuide.java rename to core-java-arrays/src/main/java/com/baeldung/array/ArrayReferenceGuide.java diff --git a/core-java/src/main/java/com/baeldung/array/Find2ndLargestInArray.java b/core-java-arrays/src/main/java/com/baeldung/array/Find2ndLargestInArray.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/Find2ndLargestInArray.java rename to core-java-arrays/src/main/java/com/baeldung/array/Find2ndLargestInArray.java diff --git a/core-java/src/main/java/com/baeldung/array/FindElementInArray.java b/core-java-arrays/src/main/java/com/baeldung/array/FindElementInArray.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/FindElementInArray.java rename to core-java-arrays/src/main/java/com/baeldung/array/FindElementInArray.java diff --git a/core-java/src/main/java/com/baeldung/array/JaggedArray.java b/core-java-arrays/src/main/java/com/baeldung/array/JaggedArray.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/JaggedArray.java rename to core-java-arrays/src/main/java/com/baeldung/array/JaggedArray.java diff --git a/core-java/src/main/java/com/baeldung/array/SearchArrayUnitTest.java b/core-java-arrays/src/main/java/com/baeldung/array/SearchArrayUnitTest.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/SearchArrayUnitTest.java rename to core-java-arrays/src/main/java/com/baeldung/array/SearchArrayUnitTest.java diff --git a/core-java/src/main/java/com/baeldung/array/SumAndAverageInArray.java b/core-java-arrays/src/main/java/com/baeldung/array/SumAndAverageInArray.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/SumAndAverageInArray.java rename to core-java-arrays/src/main/java/com/baeldung/array/SumAndAverageInArray.java diff --git a/core-java-arrays/src/main/java/com/baeldung/array/operations/ArrayOperations.java b/core-java-arrays/src/main/java/com/baeldung/array/operations/ArrayOperations.java new file mode 100644 index 0000000000..98155ed952 --- /dev/null +++ b/core-java-arrays/src/main/java/com/baeldung/array/operations/ArrayOperations.java @@ -0,0 +1,197 @@ +package com.baeldung.array.operations; + +import java.lang.reflect.Array; +import java.util.Arrays; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.Random; +import java.util.Set; +import java.util.function.Function; +import java.util.function.IntPredicate; +import java.util.function.Predicate; + +import org.apache.commons.lang3.ArrayUtils; + +public class ArrayOperations { + + // Get the first and last item of an array + public static T getFirstObject(T[] array) { + return array[0]; + } + + public static int getFirstInt(int[] array) { + return array[0]; + } + + public static T getLastObject(T[] array) { + return array[array.length - 1]; + } + + public static int getLastInt(int[] array) { + return array[array.length - 1]; + } + + // Append a new item to an array + public static T[] appendObject(T[] array, T newItem) { + return ArrayUtils.add(array, newItem); + } + + public static int[] appendInt(int[] array, int newItem) { + int[] newArray = Arrays.copyOf(array, array.length + 1); + newArray[newArray.length - 1] = newItem; + return newArray; + } + + public static int[] appendIntWithUtils(int[] array, int newItem) { + return ArrayUtils.add(array, newItem); + } + + // Compare two arrays to check if they have the same elements + public static boolean compareObjectArrays(T[] array1, T[] array2) { + return Arrays.equals(array1, array2); + } + + public static boolean compareIntArrays(int[] array1, int[] array2) { + return Arrays.equals(array1, array2); + } + + // Deep Compare (for nested arrays) + public static boolean deepCompareObjectArrayUsingArrays(T[][] array1, T[][] array2) { + // We can use Objects.deepEquals for a broader approach + return Arrays.deepEquals(array1, array2); + } + + public static boolean deepCompareIntArrayUsingArrays(int[][] array1, int[][] array2) { + return Arrays.deepEquals(array1, array2); + } + + // Check if array is empty + public static boolean isEmptyObjectArrayUsingUtils(T[] array1) { + return ArrayUtils.isEmpty(array1); + } + + public static boolean isEmptyIntArrayUsingUtils(int[] array1) { + return ArrayUtils.isEmpty(array1); + } + + // Remove duplicates + public static Integer[] removeDuplicateObjects(Integer[] array) { + // We can use other ways of converting the array to a set too + Set set = new HashSet<>(Arrays.asList(array)); + return set.toArray(new Integer[set.size()]); + } + + public static int[] removeDuplicateInts(int[] array) { + // Box + Integer[] list = ArrayUtils.toObject(array); + // Remove duplicates + Set set = new HashSet(Arrays.asList(list)); + // Create array and unbox + return ArrayUtils.toPrimitive(set.toArray(new Integer[set.size()])); + } + + // Remove duplicates preserving the order + public static Integer[] removeDuplicateWithOrderObjectArray(Integer[] array) { + // We can use other ways of converting the array to a set too + Set set = new LinkedHashSet<>(Arrays.asList(array)); + return set.toArray(new Integer[set.size()]); + } + + public static int[] removeDuplicateWithOrderIntArray(int[] array) { + // Box + Integer[] list = ArrayUtils.toObject(array); + // Remove duplicates + Set set = new LinkedHashSet(Arrays.asList(list)); + // Create array and unbox + return ArrayUtils.toPrimitive(set.toArray(new Integer[set.size()])); + } + + // Print an array + public static String printObjectArray(Integer[] array) { + return ArrayUtils.toString(array); + } + + public static String printObjectArray(Integer[][] array) { + return ArrayUtils.toString(array); + } + + public static String printIntArray(int[] array) { + return ArrayUtils.toString(array); + } + + public static String printIntArray(int[][] array) { + return ArrayUtils.toString(array); + } + + // Box or Unbox values + public static int[] unboxIntegerArray(Integer[] array) { + return ArrayUtils.toPrimitive(array); + } + + public static Integer[] boxIntArray(int[] array) { + return ArrayUtils.toObject(array); + } + + // Map array values + @SuppressWarnings("unchecked") + public static U[] mapObjectArray(T[] array, Function function, Class targetClazz) { + U[] newArray = (U[]) Array.newInstance(targetClazz, array.length); + for (int i = 0; i < array.length; i++) { + newArray[i] = function.apply(array[i]); + } + return newArray; + } + + public static String[] mapIntArrayToString(int[] array) { + return Arrays.stream(array) + .mapToObj(value -> String.format("Value: %s", value)) + .toArray(String[]::new); + } + + // Filter array values + public static Integer[] filterObjectArray(Integer[] array, Predicate predicate) { + return Arrays.stream(array) + .filter(predicate) + .toArray(Integer[]::new); + } + + public static int[] filterIntArray(int[] array, IntPredicate predicate) { + return Arrays.stream(array) + .filter(predicate) + .toArray(); + } + + // Insert item between others + public static int[] insertBetweenIntArray(int[] array, int... values) { + return ArrayUtils.insert(2, array, values); + } + + @SuppressWarnings("unchecked") + public static T[] insertBetweenObjectArray(T[] array, T... values) { + return ArrayUtils.insert(2, array, values); + } + + // Shuffling arrays + public static int[] shuffleIntArray(int[] array) { + // we create a different array instance for testing purposes + int[] shuffled = Arrays.copyOf(array, array.length); + ArrayUtils.shuffle(shuffled); + return shuffled; + } + + public static T[] shuffleObjectArray(T[] array) { + // we create a different array instance for testing purposes + T[] shuffled = Arrays.copyOf(array, array.length); + ArrayUtils.shuffle(shuffled); + return shuffled; + } + + // Get random number + public static int getRandomFromIntArray(int[] array) { + return array[new Random().nextInt(array.length)]; + } + + public static T getRandomFromObjectArray(T[] array) { + return array[new Random().nextInt(array.length)]; + } +} diff --git a/core-java/src/main/java/com/baeldung/arraycopy/model/Address.java b/core-java-arrays/src/main/java/com/baeldung/arraycopy/model/Address.java similarity index 100% rename from core-java/src/main/java/com/baeldung/arraycopy/model/Address.java rename to core-java-arrays/src/main/java/com/baeldung/arraycopy/model/Address.java diff --git a/core-java/src/main/java/com/baeldung/arraycopy/model/Employee.java b/core-java-arrays/src/main/java/com/baeldung/arraycopy/model/Employee.java similarity index 100% rename from core-java/src/main/java/com/baeldung/arraycopy/model/Employee.java rename to core-java-arrays/src/main/java/com/baeldung/arraycopy/model/Employee.java diff --git a/core-java/src/test/java/com/baeldung/array/ArrayInitializerUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/ArrayInitializerUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/ArrayInitializerUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/ArrayInitializerUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/array/ArrayInverterUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/ArrayInverterUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/ArrayInverterUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/ArrayInverterUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/array/Find2ndLargestInArrayUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/Find2ndLargestInArrayUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/Find2ndLargestInArrayUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/Find2ndLargestInArrayUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/array/FindElementInArrayUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/FindElementInArrayUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/FindElementInArrayUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/FindElementInArrayUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/array/JaggedArrayUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/JaggedArrayUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/JaggedArrayUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/JaggedArrayUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/array/SumAndAverageInArrayUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/SumAndAverageInArrayUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/SumAndAverageInArrayUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/SumAndAverageInArrayUnitTest.java diff --git a/core-java-arrays/src/test/java/com/baeldung/array/operations/ArrayOperationsUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/operations/ArrayOperationsUnitTest.java new file mode 100644 index 0000000000..a9c6d97d9f --- /dev/null +++ b/core-java-arrays/src/test/java/com/baeldung/array/operations/ArrayOperationsUnitTest.java @@ -0,0 +1,365 @@ +package com.baeldung.array.operations; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Arrays; + +import org.assertj.core.api.Condition; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class ArrayOperationsUnitTest { + + private Integer[] defaultObjectArray; + private int[] defaultIntArray; + private Integer[][] defaultJaggedObjectArray; + private int[][] defaultJaggedIntArray; + + @BeforeEach + public void setupDefaults() { + defaultObjectArray = new Integer[] { 3, 5, 2, 5, 14, 4 }; + defaultIntArray = new int[] { 3, 5, 2, 5, 14, 4 }; + defaultJaggedObjectArray = new Integer[][] { { 1, 3 }, { 5 }, {} }; + defaultJaggedIntArray = new int[][] { { 1, 3 }, { 5 }, {} }; + } + + // Get the first and last item of an array + @Test + public void whenGetFirstObjectCalled_thenReturnFirstItemOfArray() { + Integer output = ArrayOperations.getFirstObject(defaultObjectArray); + + assertThat(output).isEqualTo(3); + } + + @Test + public void whenGetFirstIntCalled_thenReturnFirstItemOfArray() { + int output = ArrayOperations.getFirstInt(defaultIntArray); + + assertThat(output).isEqualTo(3); + } + + @Test + public void whenGetLastObjectCalled_thenReturnLastItemOfArray() { + Integer output = ArrayOperations.getLastObject(defaultObjectArray); + + assertThat(output).isEqualTo(4); + } + + @Test + public void whenGetLastIntCalled_thenReturnLastItemOfArray() { + int output = ArrayOperations.getLastInt(defaultIntArray); + + assertThat(output).isEqualTo(4); + } + + // Append a new item to an array + @Test + public void whenAppendObject_thenReturnArrayWithExtraItem() { + Integer[] output = ArrayOperations.appendObject(defaultObjectArray, 7); + + assertThat(output).endsWith(4, 7) + .hasSize(7); + } + + @Test + public void whenAppendInt_thenReturnArrayWithExtraItem() { + int[] output = ArrayOperations.appendInt(defaultIntArray, 7); + int[] outputUsingUtils = ArrayOperations.appendIntWithUtils(defaultIntArray, 7); + + assertThat(output).endsWith(4, 7) + .hasSize(7); + assertThat(outputUsingUtils).endsWith(4, 7) + .hasSize(7); + } + + // Compare two arrays to check if they have the same elements + @Test + public void whenCompareObjectArrays_thenReturnBoolean() { + Integer[] array2 = { 8, 7, 6 }; + Integer[] sameArray = { 3, 5, 2, 5, 14, 4 }; + boolean output = ArrayOperations.compareObjectArrays(defaultObjectArray, array2); + boolean output2 = ArrayOperations.compareObjectArrays(defaultObjectArray, sameArray); + + assertThat(output).isFalse(); + assertThat(output2).isTrue(); + } + + @Test + public void whenCompareIntArrays_thenReturnBoolean() { + int[] array2 = { 8, 7, 6 }; + int[] sameArray = { 3, 5, 2, 5, 14, 4 }; + boolean output = ArrayOperations.compareIntArrays(defaultIntArray, array2); + boolean output2 = ArrayOperations.compareIntArrays(defaultIntArray, sameArray); + + assertThat(output).isFalse(); + assertThat(output2).isTrue(); + } + + // Deep compare + @Test + public void whenDeepCompareObjectArrays_thenReturnBoolean() { + Integer[][] sameArray = { { 1, 3 }, { 5 }, {} }; + Integer[][] array2 = { { 1, 3 }, { 5 }, { 3 } }; + boolean output = ArrayOperations.deepCompareObjectArrayUsingArrays(defaultJaggedObjectArray, array2); + boolean output2 = ArrayOperations.deepCompareObjectArrayUsingArrays(defaultJaggedObjectArray, sameArray); + // Because arrays are Objects, we could wrongly use the non-deep approach + boolean outputUsingNonDeep = ArrayOperations.compareObjectArrays(defaultJaggedObjectArray, sameArray); + + assertThat(output).isFalse(); + assertThat(output2).isTrue(); + // This is not what we would expect! + assertThat(outputUsingNonDeep).isFalse(); + } + + @Test + public void whenDeepCompareIntArrays_thenReturnBoolean() { + int[][] sameArray = { { 1, 3 }, { 5 }, {} }; + int[][] array2 = { { 1, 3 }, { 5 }, { 3 } }; + boolean output = ArrayOperations.deepCompareIntArrayUsingArrays(defaultJaggedIntArray, array2); + boolean output2 = ArrayOperations.deepCompareIntArrayUsingArrays(defaultJaggedIntArray, sameArray); + + assertThat(output).isFalse(); + assertThat(output2).isTrue(); + } + + // Empty Check + @Test + public void whenIsEmptyObjectArray_thenReturnBoolean() { + Integer[] array2 = {}; + Integer[] array3 = null; + Integer[] array4 = { null, null, null }; + Integer[] array5 = { null }; + Integer[][] array6 = { {}, {}, {} }; + boolean output = ArrayOperations.isEmptyObjectArrayUsingUtils(defaultObjectArray); + boolean output2 = ArrayOperations.isEmptyObjectArrayUsingUtils(array2); + boolean output3 = ArrayOperations.isEmptyObjectArrayUsingUtils(array3); + boolean output4 = ArrayOperations.isEmptyObjectArrayUsingUtils(array4); + boolean output5 = ArrayOperations.isEmptyObjectArrayUsingUtils(array5); + boolean output6 = ArrayOperations.isEmptyObjectArrayUsingUtils(array6); + + assertThat(output).isFalse(); + assertThat(output2).isTrue(); + assertThat(output3).isTrue(); + // Mind these edge cases! + assertThat(output4).isFalse(); + assertThat(output5).isFalse(); + assertThat(output6).isFalse(); + } + + @Test + public void whenIsEmptyIntArray_thenReturnBoolean() { + int[] array2 = {}; + boolean output = ArrayOperations.isEmptyIntArrayUsingUtils(defaultIntArray); + boolean output2 = ArrayOperations.isEmptyIntArrayUsingUtils(array2); + + assertThat(output).isFalse(); + assertThat(output2).isTrue(); + } + + // Remove Duplicates + @Test + public void whenRemoveDuplicateObjectArray_thenReturnArrayWithNoDuplicates() { + Integer[] output = ArrayOperations.removeDuplicateObjects(defaultObjectArray); + + assertThat(output).containsOnlyOnce(5) + .hasSize(5) + .doesNotHaveDuplicates(); + } + + @Test + public void whenRemoveDuplicateIntArray_thenReturnArrayWithNoDuplicates() { + int[] output = ArrayOperations.removeDuplicateInts(defaultIntArray); + + assertThat(output).containsOnlyOnce(5) + .hasSize(5) + .doesNotHaveDuplicates(); + } + + // Remove Duplicates Preserving order + @Test + public void whenRemoveDuplicatePreservingOrderObjectArray_thenReturnArrayWithNoDuplicates() { + Integer[] array2 = { 3, 5, 2, 14, 4 }; + Integer[] output = ArrayOperations.removeDuplicateWithOrderObjectArray(defaultObjectArray); + + assertThat(output).containsOnlyOnce(5) + .hasSize(5) + .containsExactly(array2); + } + + @Test + public void whenRemoveDuplicatePreservingOrderIntArray_thenReturnArrayWithNoDuplicates() { + int[] array2 = { 3, 5, 2, 14, 4 }; + int[] output = ArrayOperations.removeDuplicateWithOrderIntArray(defaultIntArray); + + assertThat(output).containsOnlyOnce(5) + .hasSize(5) + .containsExactly(array2); + } + + // Print + @Test + public void whenPrintObjectArray_thenReturnString() { + String output = ArrayOperations.printObjectArray(defaultObjectArray); + String jaggedOutput = ArrayOperations.printObjectArray(defaultJaggedObjectArray); + // Comparing to Arrays output: + String wrongArraysOutput = Arrays.toString(defaultJaggedObjectArray); + String differentFormatArraysOutput = Arrays.toString(defaultObjectArray); + // We should use Arrays.deepToString for jagged arrays + String differentFormatJaggedArraysOutput = Arrays.deepToString(defaultJaggedObjectArray); + + assertThat(output).isEqualTo("{3,5,2,5,14,4}"); + assertThat(jaggedOutput).isEqualTo("{{1,3},{5},{}}"); + assertThat(differentFormatArraysOutput).isEqualTo("[3, 5, 2, 5, 14, 4]"); + assertThat(wrongArraysOutput).contains("[[Ljava.lang.Integer;@"); + assertThat(differentFormatJaggedArraysOutput).contains("[[1, 3], [5], []]"); + } + + @Test + public void whenPrintIntArray_thenReturnString() { + String output = ArrayOperations.printIntArray(defaultIntArray); + String jaggedOutput = ArrayOperations.printIntArray(defaultJaggedIntArray); + // Comparing to Arrays output: + String wrongArraysOutput = Arrays.toString(defaultJaggedObjectArray); + String differentFormatArraysOutput = Arrays.toString(defaultObjectArray); + + assertThat(output).isEqualTo("{3,5,2,5,14,4}"); + assertThat(jaggedOutput).isEqualTo("{{1,3},{5},{}}"); + assertThat(differentFormatArraysOutput).isEqualTo("[3, 5, 2, 5, 14, 4]"); + assertThat(wrongArraysOutput).contains("[[Ljava.lang.Integer;@"); + } + + // Box and unbox + @Test + public void whenUnboxObjectArray_thenReturnPrimitiveArray() { + int[] output = ArrayOperations.unboxIntegerArray(defaultObjectArray); + + assertThat(output).containsExactly(defaultIntArray); + } + + @Test + public void henBoxPrimitiveArray_thenReturnObjectArray() { + Integer[] output = ArrayOperations.boxIntArray(defaultIntArray); + + assertThat(output).containsExactly(defaultObjectArray); + } + + // Map values + @Test + public void whenMapMultiplyingObjectArray_thenReturnMultipliedArray() { + Integer[] multipliedExpectedArray = new Integer[] { 6, 10, 4, 10, 28, 8 }; + Integer[] output = ArrayOperations.mapObjectArray(defaultObjectArray, value -> value * 2, Integer.class); + + assertThat(output).containsExactly(multipliedExpectedArray); + } + + @Test + public void whenMapDividingObjectArray_thenReturnDividedArray() { + Double[] multipliedExpectedArray = new Double[] { 1.5, 2.5, 1.0, 2.5, 7.0, 2.0 }; + Double[] output = ArrayOperations.mapObjectArray(defaultObjectArray, value -> value / 2.0, Double.class); + + assertThat(output).containsExactly(multipliedExpectedArray); + } + + @Test + public void whenMapIntArrayToString_thenReturnArray() { + String[] expectedArray = new String[] { "Value: 3", "Value: 5", "Value: 2", "Value: 5", "Value: 14", + "Value: 4" }; + String[] output = ArrayOperations.mapIntArrayToString(defaultIntArray); + + assertThat(output).containsExactly(expectedArray); + } + + // Filter values + @Test + public void whenFilterObjectArray_thenReturnFilteredArray() { + Integer[] multipliedExpectedArray = new Integer[] { 2, 14, 4 }; + Integer[] output = ArrayOperations.filterObjectArray(defaultObjectArray, value -> value % 2 == 0); + + assertThat(output).containsExactly(multipliedExpectedArray); + } + + @Test + public void whenFilterIntArray_thenReturnFilteredArray() { + int[] expectedArray = new int[] { 2, 14, 4 }; + int[] output = ArrayOperations.filterIntArray(defaultIntArray, value -> (int) value % 2 == 0); + + assertThat(output).containsExactly(expectedArray); + } + + // Insert between + @Test + public void whenInsertBetweenIntArrayToString_thenReturnNewArray() { + int[] expectedArray = { 3, 5, 77, 88, 2, 5, 14, 4 }; + int[] output = ArrayOperations.insertBetweenIntArray(defaultIntArray, 77, 88); + + assertThat(output).containsExactly(expectedArray); + } + + @Test + public void whenInsertBetweenObjectArrayToString_thenReturnNewArray() { + Integer[] expectedArray = { 3, 5, 77, 99, 2, 5, 14, 4 }; + Integer[] output = ArrayOperations.insertBetweenObjectArray(defaultObjectArray, 77, 99); + + assertThat(output).containsExactly(expectedArray); + } + + // Shuffle between + @Test + public void whenShufflingIntArraySeveralTimes_thenAtLeastOneWithDifferentOrder() { + int[] output = ArrayOperations.shuffleIntArray(defaultIntArray); + int[] output2 = ArrayOperations.shuffleIntArray(defaultIntArray); + int[] output3 = ArrayOperations.shuffleIntArray(defaultIntArray); + int[] output4 = ArrayOperations.shuffleIntArray(defaultIntArray); + int[] output5 = ArrayOperations.shuffleIntArray(defaultIntArray); + int[] output6 = ArrayOperations.shuffleIntArray(defaultIntArray); + + Condition atLeastOneArraysIsNotEqual = new Condition( + "at least one output should be different (order-wise)") { + @Override + public boolean matches(int[] value) { + return !Arrays.equals(value, output) || !Arrays.equals(value, output2) || !Arrays.equals(value, output3) + || !Arrays.equals(value, output4) || !Arrays.equals(value, output5) + || !Arrays.equals(value, output6); + } + }; + + assertThat(defaultIntArray).has(atLeastOneArraysIsNotEqual); + } + + @Test + public void whenShufflingObjectArraySeveralTimes_thenAtLeastOneWithDifferentOrder() { + Integer[] output = ArrayOperations.shuffleObjectArray(defaultObjectArray); + Integer[] output2 = ArrayOperations.shuffleObjectArray(defaultObjectArray); + Integer[] output3 = ArrayOperations.shuffleObjectArray(defaultObjectArray); + Integer[] output4 = ArrayOperations.shuffleObjectArray(defaultObjectArray); + Integer[] output5 = ArrayOperations.shuffleObjectArray(defaultObjectArray); + Integer[] output6 = ArrayOperations.shuffleObjectArray(defaultObjectArray); + + Condition atLeastOneArraysIsNotEqual = new Condition( + "at least one output should be different (order-wise)") { + @Override + public boolean matches(Integer[] value) { + return !Arrays.equals(value, output) || !Arrays.equals(value, output2) || !Arrays.equals(value, output3) + || !Arrays.equals(value, output4) || !Arrays.equals(value, output5) + || !Arrays.equals(value, output6); + } + }; + + assertThat(defaultObjectArray).has(atLeastOneArraysIsNotEqual); + } + + // Get random item + @Test + public void whenGetRandomFromIntArrayToString_thenReturnItemContainedInArray() { + int output = ArrayOperations.getRandomFromIntArray(defaultIntArray); + + assertThat(defaultIntArray).contains(output); + } + + @Test + public void whenGetRandomFromObjectArrayToString_thenReturnItemContainedInArray() { + Integer output = ArrayOperations.getRandomFromObjectArray(defaultObjectArray); + + assertThat(defaultObjectArray).contains(output); + } +} diff --git a/core-java/src/test/java/com/baeldung/arraycopy/ArrayCopyUtilUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/arraycopy/ArrayCopyUtilUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/arraycopy/ArrayCopyUtilUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/arraycopy/ArrayCopyUtilUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/arrays/ArraysUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/arrays/ArraysUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/arrays/ArraysUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/arrays/ArraysUnitTest.java diff --git a/core-java-collections/README.md b/core-java-collections/README.md index d0aaaa7182..fbc8144954 100644 --- a/core-java-collections/README.md +++ b/core-java-collections/README.md @@ -39,3 +39,7 @@ - [Operating on and Removing an Item from Stream](https://www.baeldung.com/java-use-remove-item-stream) - [An Introduction to Synchronized Java Collections](https://www.baeldung.com/java-synchronized-collections) - [Guide to EnumSet](https://www.baeldung.com/java-enumset) +- [Removing Elements from Java Collections](https://www.baeldung.com/java-collection-remove-elements) +- [Converting a Collection to ArrayList in Java](https://www.baeldung.com/java-convert-collection-arraylist) +- [Java 8 Streams: Find Items From One List Based On Values From Another List](https://www.baeldung.com/java-streams-find-list-items) +- [Combining Different Types of Collections in Java](https://www.baeldung.com/java-combine-collections) diff --git a/core-java-collections/pom.xml b/core-java-collections/pom.xml index d3ef953e01..31f0d7419f 100644 --- a/core-java-collections/pom.xml +++ b/core-java-collections/pom.xml @@ -61,7 +61,7 @@ 1.19 1.2.0 - 3.5 + 3.8.1 4.1 4.01 1.7.0 diff --git a/core-java-concurrency/README.md b/core-java-concurrency/README.md index eeb9a83748..fbe50c2dfa 100644 --- a/core-java-concurrency/README.md +++ b/core-java-concurrency/README.md @@ -30,3 +30,4 @@ - [Life Cycle of a Thread in Java](http://www.baeldung.com/java-thread-lifecycle) - [Runnable vs. Callable in Java](http://www.baeldung.com/java-runnable-callable) - [Brief Introduction to Java Thread.yield()](https://www.baeldung.com/java-thread-yield) +- [Print Even and Odd Numbers Using 2 Threads](https://www.baeldung.com/java-even-odd-numbers-with-2-threads) diff --git a/core-java-concurrency/src/main/java/com/baeldung/concurrent/evenandodd/PrintEvenOddSemaphore.java b/core-java-concurrency/src/main/java/com/baeldung/concurrent/evenandodd/PrintEvenOddSemaphore.java new file mode 100644 index 0000000000..8b58916707 --- /dev/null +++ b/core-java-concurrency/src/main/java/com/baeldung/concurrent/evenandodd/PrintEvenOddSemaphore.java @@ -0,0 +1,75 @@ +package com.baeldung.concurrent.evenandodd; + +import java.util.concurrent.Semaphore; + +public class PrintEvenOddSemaphore { + + public static void main(String[] args) { + SharedPrinter sp = new SharedPrinter(); + Thread odd = new Thread(new Odd(sp, 10), "Odd"); + Thread even = new Thread(new Even(sp, 10), "Even"); + + odd.start(); + even.start(); + } +} + +class SharedPrinter { + + private final Semaphore semEven = new Semaphore(0); + private final Semaphore semOdd = new Semaphore(1); + + void printEvenNum(int num) { + try { + semEven.acquire(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + System.out.println(Thread.currentThread().getName() + ":"+num); + semOdd.release(); + } + + void printOddNum(int num) { + try { + semOdd.acquire(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + System.out.println(Thread.currentThread().getName() + ":"+ num); + semEven.release(); + } +} + +class Even implements Runnable { + private final SharedPrinter sp; + private final int max; + + Even(SharedPrinter sp, int max) { + this.sp = sp; + this.max = max; + } + + @Override + public void run() { + for (int i = 2; i <= max; i = i + 2) { + sp.printEvenNum(i); + } + } +} + +class Odd implements Runnable { + private SharedPrinter sp; + private int max; + + Odd(SharedPrinter sp, int max) { + this.sp = sp; + this.max = max; + } + + @Override + public void run() { + for (int i = 1; i <= max; i = i + 2) { + sp.printOddNum(i); + } + } +} diff --git a/core-java-concurrency/src/main/java/com/baeldung/concurrent/evenandodd/PrintEvenOddWaitNotify.java b/core-java-concurrency/src/main/java/com/baeldung/concurrent/evenandodd/PrintEvenOddWaitNotify.java new file mode 100644 index 0000000000..2b59f22a6e --- /dev/null +++ b/core-java-concurrency/src/main/java/com/baeldung/concurrent/evenandodd/PrintEvenOddWaitNotify.java @@ -0,0 +1,68 @@ +package com.baeldung.concurrent.evenandodd; + +public class PrintEvenOddWaitNotify { + + public static void main(String... args) { + Printer print = new Printer(); + Thread t1 = new Thread(new TaskEvenOdd(print, 10, false), "Odd"); + Thread t2 = new Thread(new TaskEvenOdd(print, 10, true), "Even"); + t1.start(); + t2.start(); + } +} + +class TaskEvenOdd implements Runnable { + private final int max; + private final Printer print; + private final boolean isEvenNumber; + + TaskEvenOdd(Printer print, int max, boolean isEvenNumber) { + this.print = print; + this.max = max; + this.isEvenNumber = isEvenNumber; + } + + @Override + public void run() { + int number = isEvenNumber ? 2 : 1; + while (number <= max) { + if (isEvenNumber) { + print.printEven(number); + } else { + print.printOdd(number); + } + number += 2; + } + } +} + +class Printer { + private volatile boolean isOdd; + + synchronized void printEven(int number) { + while (!isOdd) { + try { + wait(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + System.out.println(Thread.currentThread().getName() + ":" + number); + isOdd = false; + notify(); + } + + synchronized void printOdd(int number) { + while (isOdd) { + try { + wait(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + System.out.println(Thread.currentThread().getName() + ":" + number); + isOdd = true; + notify(); + } + +} diff --git a/core-java-io/README.md b/core-java-io/README.md index ae4c267b8a..c81e466b57 100644 --- a/core-java-io/README.md +++ b/core-java-io/README.md @@ -33,3 +33,4 @@ - [Initialize a HashMap in Java](https://www.baeldung.com/java-initialize-hashmap) - [Read a File into an ArrayList](https://www.baeldung.com/java-file-to-arraylist) - [Guide to Java OutputStream](https://www.baeldung.com/java-outputstream) +- [Reading a CSV File into an Array](https://www.baeldung.com/java-csv-file-array) diff --git a/core-java-io/src/main/java/com/baeldung/bufferedreader/BufferedReaderExample.java b/core-java-io/src/main/java/com/baeldung/bufferedreader/BufferedReaderExample.java new file mode 100644 index 0000000000..c7f0e878ac --- /dev/null +++ b/core-java-io/src/main/java/com/baeldung/bufferedreader/BufferedReaderExample.java @@ -0,0 +1,84 @@ +package com.baeldung.bufferedreader; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; +import java.util.stream.Collectors; + +public class BufferedReaderExample { + + public String readAllLines(BufferedReader reader) throws IOException { + StringBuilder content = new StringBuilder(); + String line; + + while ((line = reader.readLine()) != null) { + content.append(line); + content.append(System.lineSeparator()); + } + + return content.toString(); + } + + public String readAllLinesWithStream(BufferedReader reader) { + return reader + .lines() + .collect(Collectors.joining(System.lineSeparator())); + } + + public String readAllCharsOneByOne(BufferedReader reader) throws IOException { + StringBuilder content = new StringBuilder(); + + int value; + while ((value = reader.read()) != -1) { + content.append((char) value); + } + + return content.toString(); + } + + public String readMultipleChars(BufferedReader reader) throws IOException { + int length = 5; + char[] chars = new char[length]; + int charsRead = reader.read(chars, 0, length); + + String result; + if (charsRead != -1) { + result = new String(chars, 0, charsRead); + } else { + result = ""; + } + + return result; + } + + public String readFile() { + BufferedReader reader = null; + try { + reader = new BufferedReader(new FileReader("src/main/resources/input.txt")); + String content = readAllLines(reader); + return content; + } catch (IOException e) { + e.printStackTrace(); + return null; + } finally { + try { + if (reader != null) { + reader.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + public String readFileTryWithResources() { + try (BufferedReader reader = new BufferedReader(new FileReader("src/main/resources/input.txt"))) { + String content = readAllLines(reader); + return content; + } catch (IOException e) { + e.printStackTrace(); + return null; + } + } + +} diff --git a/core-java-io/src/main/resources/input.txt b/core-java-io/src/main/resources/input.txt new file mode 100644 index 0000000000..650da894e8 --- /dev/null +++ b/core-java-io/src/main/resources/input.txt @@ -0,0 +1,45 @@ +Lorem ipsum dolor sit amet, consectetur adipiscing elit. In lacus enim, scelerisque id sapien ut, semper euismod quam. Nunc ullamcorper semper blandit. Praesent quis quam mollis, iaculis lectus a, fringilla leo. Interdum et malesuada fames ac ante ipsum primis in faucibus. Duis vitae auctor mauris. Pellentesque eu pellentesque lorem, vel ultricies libero. Pellentesque vestibulum sagittis eros. In vestibulum lacus elit. Interdum et malesuada fames ac ante ipsum primis in faucibus. + +Vivamus pharetra lacus fringilla nisl molestie eleifend. Donec et dolor non quam mattis mattis. Proin malesuada maximus elit id semper. Donec facilisis dolor ut feugiat auctor. Proin accumsan semper consectetur. Vivamus facilisis odio vel bibendum imperdiet. Sed rutrum nisi nec nisi interdum fringilla. Aliquam laoreet velit ullamcorper egestas ultrices. Aliquam ultricies sem sed orci interdum, eu porta purus malesuada. Sed accumsan, nunc ut maximus rhoncus, arcu ante pretium ex, non ultrices magna nisi et velit. Pellentesque tempor mi quis lacus consectetur, quis imperdiet enim efficitur. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. + +Nunc sed maximus erat. Aenean imperdiet finibus massa ac aliquam. Interdum et malesuada fames ac ante ipsum primis in faucibus. Duis dignissim cursus purus, eu tempus urna. Nunc sed mauris scelerisque, luctus eros ut, viverra nisi. Maecenas congue sed ligula in eleifend. Praesent nec dignissim enim, dictum efficitur massa. Nullam eros dui, rutrum quis aliquam accumsan, sollicitudin cursus eros. Phasellus euismod, lorem vitae vehicula ullamcorper, leo lorem vestibulum magna, vitae malesuada libero ipsum id lorem. Aenean finibus turpis facilisis tortor bibendum, vitae dignissim dolor dictum. Ut quis ornare nisi, non rutrum sapien. + +Etiam placerat, est eget placerat imperdiet, neque urna tristique est, a dictum nisl dolor vitae leo. Vivamus porttitor mi vitae volutpat ultrices. Quisque at ante porta mauris ultricies iaculis. Phasellus iaculis sollicitudin urna nec facilisis. Suspendisse dapibus vulputate scelerisque. Fusce felis diam, eleifend in tristique in, malesuada a purus. Suspendisse euismod ipsum sed urna imperdiet, quis venenatis lacus dapibus. Maecenas vitae est vel sem fringilla ornare at ut mi. Quisque porta, nulla at rutrum fringilla, mi ligula egestas libero, ac convallis elit diam et sapien. Vestibulum purus tortor, ornare ut enim sed, mattis lobortis erat. Maecenas ac ante tincidunt, euismod mauris a, fermentum diam. Nullam arcu est, consequat sed enim in, bibendum aliquet velit. Donec bibendum magna ac augue sagittis vehicula. Curabitur nec mauris eu augue bibendum volutpat. Fusce fringilla varius fringilla. + +Aliquam faucibus massa non orci accumsan, porta consectetur diam vulputate. Nullam nec erat mollis, imperdiet libero nec, tincidunt neque. Aenean varius purus nec est auctor, sed vulputate libero varius. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vel neque elit. Donec vulputate fermentum nulla, ut aliquam neque tempor in. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec vel venenatis est. Suspendisse luctus elit quis dui dapibus, id sodales dolor cursus. Curabitur ut vehicula dui. Fusce aliquet est et ante feugiat, et tempus ex congue. Nunc eget dapibus leo. Nunc eu accumsan diam. Suspendisse risus eros, rutrum et volutpat in, consequat in nulla. Suspendisse id felis a orci accumsan iaculis. + +Duis tincidunt diam eget tortor aliquet sodales. Etiam sodales purus ac urna mollis, et cursus enim porttitor. Nulla viverra ligula nunc, ornare condimentum felis posuere sed. Fusce aliquet pretium sagittis. Sed ac mi elementum massa dictum ornare. Integer quis dapibus lectus. Curabitur in rhoncus justo, et vulputate justo. Integer eget efficitur felis. + +Sed finibus vel tortor ac egestas. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas vestibulum nulla mi, blandit efficitur sapien fermentum eu. Integer sed turpis eros. Phasellus sed aliquam ligula. Etiam dictum quam in dapibus mattis. Donec et tristique quam. Pellentesque gravida luctus dolor, eu ornare sapien. Donec justo ante, lacinia non sem et, ultricies dignissim nibh. Vivamus eu nisl et magna pulvinar efficitur. Sed at vehicula lectus, sit amet luctus sem. Morbi vehicula sapien nisi, nec sagittis orci vestibulum et. + +Praesent non finibus diam. Quisque sit amet nisl vitae augue lobortis commodo. Morbi ullamcorper, tortor id ornare maximus, erat ipsum ullamcorper ipsum, in imperdiet diam sem vel erat. Sed pellentesque quis ex sed volutpat. Vestibulum volutpat diam ac dignissim sollicitudin. Praesent at luctus ex, at volutpat dui. Nunc nulla dui, lobortis et pharetra quis, efficitur in turpis. Donec sodales auctor purus id mollis. Sed auctor eu erat eget bibendum. Mauris tincidunt ornare neque id consequat. Suspendisse non massa ante. Quisque velit enim, rhoncus at erat eget, scelerisque placerat elit. Donec finibus luctus dolor. In sed eleifend lorem. Sed tempor ullamcorper lorem nec tristique. Fusce nec volutpat neque, id elementum est. + +Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum mattis elementum tellus, vitae maximus nulla eleifend ut. Vestibulum eu nibh vulputate, posuere felis eget, aliquet ex. Nullam leo ex, lacinia a ante ac, accumsan efficitur ligula. Vestibulum ornare gravida tempus. Proin rhoncus felis sit amet dolor commodo facilisis. Integer aliquet, diam sed pharetra feugiat, sem massa mollis orci, eget pretium libero nunc at quam. Ut rhoncus quam vitae massa hendrerit, ornare condimentum odio varius. Donec odio sapien, tristique eget libero ac, interdum facilisis odio. Phasellus nec mauris vel dolor semper mattis et quis ligula. Donec nec porttitor nunc. Integer maximus quam vitae sem gravida, ut commodo ex porttitor. + +Sed cursus nisi turpis, vel laoreet massa blandit ut. Cras posuere velit nulla, nec pellentesque ipsum dignissim eget. Donec pharetra, ex et commodo viverra, leo dolor dapibus tellus, vel dignissim est sem ac lectus. Quisque a arcu dapibus, aliquet magna sed, rhoncus neque. Integer suscipit, nulla ac varius lacinia, orci metus scelerisque neque, a laoreet nibh risus vitae dolor. Pellentesque felis metus, pulvinar vel cursus id, ultrices non purus. Donec mi lectus, faucibus sit amet nunc at, sagittis pretium lectus. Fusce nec purus arcu. Mauris neque neque, blandit eget mi at, auctor tempus orci. Mauris sapien lorem, luctus nec tellus non, porttitor aliquam dui. + +Mauris non ex risus. Aliquam imperdiet in eros eget placerat. Sed congue sed sapien porta sollicitudin. Phasellus tempor hendrerit metus vitae tincidunt. Suspendisse congue nisi sed augue dapibus, at pretium ante mollis. Cras non posuere nulla. Proin malesuada finibus magna vel iaculis. Cras in dapibus lorem. Pellentesque volutpat dolor sit amet magna tincidunt mollis. Nunc et lectus sodales, accumsan est vitae, ornare augue. Maecenas malesuada arcu leo, eget blandit lectus porttitor et. Nam aliquam sapien sit amet purus consequat lobortis. Aenean varius, augue porta dignissim efficitur, felis velit dapibus leo, tincidunt ultricies magna felis id ligula. Duis hendrerit, lectus eu elementum euismod, elit lectus consequat mi, sit amet egestas justo massa ut urna. Proin eleifend interdum ultrices. + +Donec lacinia orci pharetra ornare tincidunt. Nulla facilisi. Maecenas malesuada dui ac elit sagittis tincidunt id dictum dolor. Quisque lobortis purus ac metus volutpat viverra. Proin finibus sapien ut odio semper consectetur. Sed gravida luctus egestas. Mauris pretium volutpat elit, at commodo arcu sagittis nec. Ut condimentum fringilla urna ac dignissim. Cras aliquam metus pulvinar, pulvinar nibh at, placerat arcu. Nulla ornare tortor sed lectus mollis, vitae fringilla tellus egestas. Vivamus efficitur tincidunt sapien, sed finibus mi congue eu. Nullam magna velit, lacinia vitae ligula eget, molestie consectetur felis. Suspendisse varius turpis orci, ac laoreet arcu accumsan sed. Fusce quis fermentum lacus, nec varius libero. Pellentesque ac odio ut justo lobortis elementum sit amet vehicula lorem. Nulla interdum nulla eget mi tristique, vitae egestas nunc egestas. + +Curabitur commodo libero eu elit tincidunt, quis placerat risus vehicula. Vestibulum vehicula id nunc iaculis fermentum. Aenean semper, tellus ac semper rutrum, justo lorem feugiat leo, quis vulputate neque dui non ligula. Etiam egestas, enim eget tempor porta, nunc est tristique ante, vel suscipit massa lorem vel diam. Donec faucibus ante id turpis rhoncus congue. Nullam laoreet, diam efficitur scelerisque consequat, ligula leo ultrices est, non fermentum elit mauris ut dolor. Morbi non porttitor lorem. Sed volutpat sapien et lorem porttitor, ultricies ultricies tellus congue. Mauris sodales, tortor nec sagittis finibus, dui odio aliquet nibh, in luctus sapien massa eu risus. Nulla in est sed ante molestie vehicula vel nec lectus. Fusce maximus a quam eget aliquam. Vivamus pulvinar quis nisi a maximus. Proin cursus lacus sapien, et hendrerit elit pretium a. Donec tellus lectus, consectetur id dolor a, luctus rutrum libero. Suspendisse auctor scelerisque dui, nec pellentesque felis viverra nec. Cras elit ex, varius sed pulvinar sed, suscipit ultrices lacus. + +Vivamus eu luctus lectus. Maecenas congue magna orci, quis semper nulla blandit vel. Phasellus dignissim risus placerat lacinia sagittis. Praesent at gravida nisi, at pulvinar diam. Nulla egestas lectus sed felis facilisis egestas. Curabitur posuere gravida urna eu vestibulum. Pellentesque at dolor gravida, placerat quam sit amet, fermentum ligula. Morbi fringilla, mi eget mollis dictum, neque dolor ullamcorper leo, a rutrum libero ipsum eget orci. Curabitur consectetur iaculis vestibulum. Suspendisse ultricies ligula et neque lacinia luctus. Sed dignissim neque id eros sollicitudin pellentesque. + +Donec et magna quis lectus pharetra finibus a fringilla sapien. Phasellus accumsan, erat eu sodales cursus, tortor elit dapibus risus, ut ornare neque arcu in tellus. Nam ac vehicula diam, at aliquam nisl. Cras in sem eget nisi ultrices rutrum sit amet eu velit. Sed molestie tellus eget ante scelerisque, sit amet pulvinar neque fringilla. Nunc volutpat facilisis egestas. Cras sodales dui ac massa egestas, in mattis leo rhoncus. Pellentesque vitae urna vehicula ipsum sodales suscipit. Sed commodo tempus fringilla. + +Etiam egestas elit vitae mi maximus fringilla quis eget libero. Fusce finibus ultrices tellus at molestie. Pellentesque posuere blandit elementum. Etiam eu erat eu urna hendrerit euismod. Nulla quis lectus rhoncus, ultricies urna eget, pretium neque. Cras sit amet ipsum sit amet purus rutrum ultricies nec vitae tortor. Sed tempor dapibus augue in pulvinar. Ut pretium sapien in malesuada accumsan. Donec eget ultrices erat, ut efficitur ligula. Sed posuere mauris est, nec convallis ipsum tempus non. + +Duis a ullamcorper ante. Quisque eu ultricies metus, at aliquet odio. Nullam tempus molestie augue ut varius. Fusce purus eros, dictum nec finibus sed, sodales et diam. Suspendisse sed mi purus. Donec eleifend ipsum diam, nec fringilla enim laoreet non. Phasellus condimentum, magna sit amet porttitor suscipit, arcu risus lobortis dolor, ac fringilla nibh nisl vel purus. Phasellus facilisis posuere orci sit amet tempus. Nam nec enim maximus, rhoncus felis a, rutrum diam. + +Suspendisse potenti. Donec vel tempor neque. In aliquet nulla in eleifend bibendum. Sed sapien sem, finibus in sodales vitae, euismod in sem. Phasellus nec elit a erat pulvinar semper. Aliquam luctus nisl in libero molestie aliquam. Nunc ac ornare felis. Ut non mauris ut ipsum rhoncus pretium. Curabitur tristique lacus a sagittis aliquam. Morbi vel volutpat tellus. Maecenas volutpat, lacus sed tempus imperdiet, eros tellus volutpat nisi, a egestas augue nulla quis arcu. In sollicitudin imperdiet efficitur. Suspendisse viverra aliquet nisi, congue ultrices arcu hendrerit in. + +Maecenas vitae vestibulum nunc. Nullam semper faucibus tincidunt. Etiam sed hendrerit risus. Proin gravida, urna nec tincidunt tempus, nulla sapien porttitor nibh, porttitor lobortis nunc quam et tortor. Praesent ut varius lacus, ut hendrerit enim. Ut nec turpis ac felis imperdiet bibendum. Phasellus porttitor enim odio, et vehicula mi convallis vel. Quisque porta scelerisque sagittis. Praesent dignissim sagittis vulputate. Aenean non justo ac est volutpat bibendum. Aliquam mattis, sapien dapibus pellentesque semper, velit urna malesuada diam, nec varius nibh eros at erat. Proin leo ante, ultricies id velit ut, faucibus porta nibh. Sed nec fermentum urna, sed mollis leo. Aliquam erat volutpat. + +Donec condimentum, urna sed hendrerit vestibulum, ante nibh lacinia dui, in tincidunt odio sem eget orci. In hac habitasse platea dictumst. Mauris id ex id ante tempus finibus eu sagittis erat. Quisque interdum urna risus, vel varius nibh euismod non. Nulla eget pellentesque quam. Aliquam vestibulum ac tortor non lobortis. Sed vitae erat sed libero dignissim dictum nec in turpis. Vivamus id ornare elit, ut facilisis lectus. Morbi dictum purus eget ipsum dignissim porttitor. Sed at vehicula purus, nec rhoncus quam. Nunc a nisl quis arcu blandit fermentum vel quis odio. Vivamus rhoncus, sapien sed lacinia hendrerit, velit urna fermentum dolor, id feugiat magna ligula sed urna. Proin euismod efficitur libero, eget porttitor lacus tempus quis. Duis tincidunt quis est a laoreet. Nam sit amet tristique nisl, sit amet mattis mi. + +Aenean id dictum nulla, sed laoreet magna. Morbi consectetur in turpis at aliquam. Maecenas rutrum feugiat metus, at ullamcorper augue fermentum ut. Vivamus in magna pretium nibh dictum rhoncus luctus at orci. In hac habitasse platea dictumst. Fusce convallis, nulla nec hendrerit suscipit, ipsum diam lobortis sem, vitae elementum lectus erat sit amet magna. Quisque sollicitudin fringilla purus, ac molestie justo congue vitae. Nulla sapien leo, ullamcorper ac tellus in, cursus rhoncus enim. Suspendisse rutrum magna non ex elementum elementum id vitae enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse ornare libero eu molestie pulvinar. Phasellus faucibus, magna eget rutrum porta, lorem turpis blandit lectus, eu viverra massa risus et ex. + +Ut consectetur eros lacus, ac ullamcorper lacus mattis a. Cras congue justo ut erat interdum, et scelerisque nisi malesuada. Quisque sed sapien sollicitudin purus tincidunt finibus vestibulum vel dolor. Cras iaculis bibendum erat, a dictum urna viverra et. Integer non neque vulputate, tincidunt purus nec, rutrum arcu. Aliquam nec magna non sem semper laoreet quis at quam. Mauris dui lectus, convallis eu efficitur at, facilisis nec lorem. Cras felis sem, egestas ac rutrum vel, mollis et ex. Aenean semper egestas libero, nec commodo mi blandit efficitur. Duis nec quam in massa dignissim sagittis vel vitae leo. Nam molestie hendrerit auctor. + +Sed suscipit egestas tellus sed cursus. Donec vel massa sit amet dui condimentum accumsan. Phasellus libero eros, lobortis a nisi id, porttitor maximus lectus. Praesent consectetur diam urna, id viverra turpis elementum in. Vivamus vitae pretium justo, nec tempor felis. Vivamus volutpat ultricies magna. Suspendisse vulputate lectus ac orci volutpat ullamcorper. Nulla eu leo pretium, commodo arcu accumsan, tempor nisl. Fusce sit amet tellus a ipsum vehicula laoreet sed vitae mauris. Duis porttitor massa mattis nibh placerat consequat. Fusce rutrum commodo tortor eget pellentesque. Suspendisse tempor enim libero, consequat dictum nibh dictum varius. Pellentesque feugiat sit amet urna sed facilisis. Curabitur a sagittis augue. \ No newline at end of file diff --git a/core-java-io/src/test/java/com/baeldung/bufferedreader/BufferedReaderExampleUnitTest.java b/core-java-io/src/test/java/com/baeldung/bufferedreader/BufferedReaderExampleUnitTest.java new file mode 100644 index 0000000000..9af00c086a --- /dev/null +++ b/core-java-io/src/test/java/com/baeldung/bufferedreader/BufferedReaderExampleUnitTest.java @@ -0,0 +1,75 @@ +package com.baeldung.bufferedreader; + +import org.junit.Test; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; + +import static org.assertj.core.api.Assertions.assertThat; + +public class BufferedReaderExampleUnitTest { + + private static final String FILE_PATH = "src/main/resources/input.txt"; + + @Test + public void givenBufferedReader_whenReadAllLines_thenReturnsContent() throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(FILE_PATH)); + + BufferedReaderExample bre = new BufferedReaderExample(); + String content = bre.readAllLines(reader); + + assertThat(content).isNotEmpty(); + assertThat(content).contains("Lorem ipsum"); + } + + @Test + public void givenBufferedReader_whenReadAllLinesWithStream_thenReturnsContent() throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(FILE_PATH)); + + BufferedReaderExample bre = new BufferedReaderExample(); + String content = bre.readAllLinesWithStream(reader); + + assertThat(content).isNotEmpty(); + assertThat(content).contains("Lorem ipsum"); + } + + @Test + public void whenReadFile_thenReturnsContent() { + BufferedReaderExample bre = new BufferedReaderExample(); + String content = bre.readFile(); + + assertThat(content.toString()).contains("Lorem ipsum"); + } + + @Test + public void givenBufferedReader_whenReadAllCharsOneByOne_thenReturnsContent() throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(FILE_PATH)); + + BufferedReaderExample bre = new BufferedReaderExample(); + String content = bre.readAllCharsOneByOne(reader); + + assertThat(content).isNotEmpty(); + assertThat(content).contains("Lorem ipsum"); + } + + @Test + public void givenBufferedReader_whenReadMultipleChars_thenReturnsContent() throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(FILE_PATH)); + + BufferedReaderExample bre = new BufferedReaderExample(); + String content = bre.readMultipleChars(reader); + + assertThat(content).isNotEmpty(); + assertThat(content).isEqualTo("Lorem"); + } + + @Test + public void whenReadFileTryWithResources_thenReturnsContent() { + BufferedReaderExample bre = new BufferedReaderExample(); + String content = bre.readFileTryWithResources(); + + assertThat(content.toString()).contains("Lorem ipsum"); + } + +} diff --git a/core-java-io/src/test/java/com/baeldung/bufferedreader/BufferedReaderUnitTest.java b/core-java-io/src/test/java/com/baeldung/bufferedreader/BufferedReaderUnitTest.java new file mode 100644 index 0000000000..985eb05aec --- /dev/null +++ b/core-java-io/src/test/java/com/baeldung/bufferedreader/BufferedReaderUnitTest.java @@ -0,0 +1,58 @@ +package com.baeldung.bufferedreader; + +import org.junit.Test; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.StringReader; +import java.nio.file.Files; +import java.nio.file.Paths; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +public class BufferedReaderUnitTest { + + private static final String FILE_PATH = "src/main/resources/input.txt"; + + @Test + public void givenBufferedReader_whenSkipUnderscores_thenOk() throws IOException { + StringBuilder result = new StringBuilder(); + + try (BufferedReader reader = new BufferedReader(new StringReader("1__2__3__4__5"))) { + int value; + while((value = reader.read()) != -1) { + result.append((char) value); + reader.skip(2L); + } + } + + assertEquals("12345", result.toString()); + } + + @Test + public void givenBufferedReader_whenSkipsWhitespacesAtBeginning_thenOk() throws IOException { + String result; + + try (BufferedReader reader = new BufferedReader(new StringReader(" Lorem ipsum dolor sit amet."))) { + do { + reader.mark(1); + } while(Character.isWhitespace(reader.read())); + + reader.reset(); + result = reader.readLine(); + } + + assertEquals("Lorem ipsum dolor sit amet.", result); + } + + @Test + public void whenCreatesNewBufferedReader_thenOk() throws IOException { + try(BufferedReader reader = Files.newBufferedReader(Paths.get(FILE_PATH))) { + assertNotNull(reader); + assertTrue(reader.ready()); + } + } + +} diff --git a/core-java-lang/.gitignore b/core-java-lang/.gitignore new file mode 100644 index 0000000000..374c8bf907 --- /dev/null +++ b/core-java-lang/.gitignore @@ -0,0 +1,25 @@ +*.class + +0.* + +#folders# +/target +/neoDb* +/data +/src/main/webapp/WEB-INF/classes +*/META-INF/* +.resourceCache + +# Packaged files # +*.jar +*.war +*.ear + +# Files generated by integration tests +backup-pom.xml +/bin/ +/temp + +#IntelliJ specific +.idea/ +*.iml \ No newline at end of file diff --git a/core-java-lang/README.md b/core-java-lang/README.md new file mode 100644 index 0000000000..85312cba68 --- /dev/null +++ b/core-java-lang/README.md @@ -0,0 +1,59 @@ +========= + +## Core Java Lang Cookbooks and Examples + +### Relevant Articles: +- [Guide to Java Reflection](http://www.baeldung.com/java-reflection) +- [Introduction to Java Generics](http://www.baeldung.com/java-generics) +- [Generate equals() and hashCode() with Eclipse](http://www.baeldung.com/java-eclipse-equals-and-hashcode) +- [Chained Exceptions in Java](http://www.baeldung.com/java-chained-exceptions) +- [Java Primitive Conversions](http://www.baeldung.com/java-primitive-conversions) +- [Call Methods at Runtime Using Java Reflection](http://www.baeldung.com/java-method-reflection) +- [Iterating Over Enum Values in Java](http://www.baeldung.com/java-enum-iteration) +- [Changing Annotation Parameters At Runtime](http://www.baeldung.com/java-reflection-change-annotation-params) +- [Dynamic Proxies in Java](http://www.baeldung.com/java-dynamic-proxies) +- [Java Double Brace Initialization](http://www.baeldung.com/java-double-brace-initialization) +- [Guide to hashCode() in Java](http://www.baeldung.com/java-hashcode) +- [Guide to the Diamond Operator in Java](http://www.baeldung.com/java-diamond-operator) +- [A Guide to the Static Keyword in Java](http://www.baeldung.com/java-static) +- [Quick Example - Comparator vs Comparable in Java](http://www.baeldung.com/java-comparator-comparable) +- [The Java continue and break Keywords](http://www.baeldung.com/java-continue-and-break) +- [A Guide to Java Initialization](http://www.baeldung.com/java-initialization) +- [Nested Classes in Java](http://www.baeldung.com/java-nested-classes) +- [A Guide to Java Loops](http://www.baeldung.com/java-loops) +- [Varargs in Java](http://www.baeldung.com/java-varargs) +- [A Guide to Inner Interfaces in Java](http://www.baeldung.com/java-inner-interfaces) +- [Polymorphism in Java](http://www.baeldung.com/java-polymorphism) +- [Recursion In Java](http://www.baeldung.com/java-recursion) +- [A Guide to the finalize Method in Java](http://www.baeldung.com/java-finalize) +- [Method Overloading and Overriding in Java](http://www.baeldung.com/java-method-overload-override) +- [How to Make a Deep Copy of an Object in Java](http://www.baeldung.com/java-deep-copy) +- [Guide to Inheritance in Java](http://www.baeldung.com/java-inheritance) +- [Object Type Casting in Java](http://www.baeldung.com/java-type-casting) +- [The "final" Keyword in Java](http://www.baeldung.com/java-final) +- [A Guide to Java Enums](http://www.baeldung.com/a-guide-to-java-enums) +- [Infinite Loops in Java](http://www.baeldung.com/infinite-loops-java) +- [Quick Guide to java.lang.System](http://www.baeldung.com/java-lang-system) +- [Type Erasure in Java Explained](http://www.baeldung.com/java-type-erasure) +- [Using Java Assertions](http://www.baeldung.com/java-assert) +- [Pass-By-Value as a Parameter Passing Mechanism in Java](http://www.baeldung.com/java-pass-by-value-or-pass-by-reference) +- [Variable and Method Hiding in Java](http://www.baeldung.com/java-variable-method-hiding) +- [Access Modifiers in Java](http://www.baeldung.com/java-access-modifiers) +- [Guide to the super Java Keyword](http://www.baeldung.com/java-super) +- [Guide to the this Java Keyword](http://www.baeldung.com/java-this) +- [Immutable Objects in Java](http://www.baeldung.com/java-immutable-object) +- [ClassNotFoundException vs NoClassDefFoundError](http://www.baeldung.com/java-classnotfoundexception-and-noclassdeffounderror) +- [The StackOverflowError in Java](http://www.baeldung.com/java-stack-overflow-error) +- [Create a Custom Exception in Java](http://www.baeldung.com/java-new-custom-exception) +- [Exception Handling in Java](http://www.baeldung.com/java-exceptions) +- [Differences Between Final, Finally and Finalize in Java](https://www.baeldung.com/java-final-finally-finalize) +- [Static and Dynamic Binding in Java](https://www.baeldung.com/java-static-dynamic-binding) +- [Difference Between Throw and Throws in Java](https://www.baeldung.com/java-throw-throws) +- [Synthetic Constructs in Java](https://www.baeldung.com/java-synthetic) +- [Java Switch Statement](https://www.baeldung.com/java-switch) +- [The Modulo Operator in Java](https://www.baeldung.com/modulo-java) +- [Ternary Operator In Java](https://www.baeldung.com/java-ternary-operator) +- [How to Separate Double into Integer and Decimal Parts](https://www.baeldung.com/java-separate-double-into-integer-decimal-parts) +- [“Sneaky Throws” in Java](http://www.baeldung.com/java-sneaky-throws) +- [Inheritance and Composition (Is-a vs Has-a relationship) in Java](http://www.baeldung.com/java-inheritance-composition) + diff --git a/core-java-lang/pom.xml b/core-java-lang/pom.xml new file mode 100644 index 0000000000..ace39de274 --- /dev/null +++ b/core-java-lang/pom.xml @@ -0,0 +1,429 @@ + + 4.0.0 + com.baeldung + core-java-lang + 0.1.0-SNAPSHOT + jar + core-java-lang + + + com.baeldung + parent-java + 0.0.1-SNAPSHOT + ../parent-java + + + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.google.code.gson + gson + ${gson.version} + + + + log4j + log4j + ${log4j.version} + + + org.slf4j + log4j-over-slf4j + ${org.slf4j.version} + + + org.projectlombok + lombok + ${lombok.version} + provided + + + + org.assertj + assertj-core + ${assertj-core.version} + test + + + org.springframework + spring-web + ${springframework.spring-web.version} + + + javax.mail + mail + ${javax.mail.version} + + + + + core-java-lang + + + src/main/resources + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*LiveTest.java + **/*IntegrationTest.java + **/*IntTest.java + **/*LongRunningUnitTest.java + **/*ManualTest.java + + true + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + prepare-package + + copy-dependencies + + + ${project.build.directory}/libs + + + + + + + org.apache.maven.plugins + maven-jar-plugin + ${maven-jar-plugin.version} + + + + true + libs/ + org.baeldung.executable.ExecutableMavenJar + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + ${project.basedir} + + + org.baeldung.executable.ExecutableMavenJar + + + + jar-with-dependencies + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + ${maven-shade-plugin.version} + + + + shade + + + true + + + org.baeldung.executable.ExecutableMavenJar + + + + + + + + + com.jolira + onejar-maven-plugin + ${onejar-maven-plugin.version} + + + + org.baeldung.executable.ExecutableMavenJar + true + ${project.build.finalName}-onejar.${project.packaging} + + + one-jar + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot-maven-plugin.version} + + + + repackage + + + spring-boot + org.baeldung.executable.ExecutableMavenJar + + + + + + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + java + com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed + + -Xmx300m + -XX:+UseParallelGC + -classpath + + com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + 1.8 + 1.8 + + + + + + + + integration + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration-test + + test + + + + **/*ManualTest.java + + + **/*IntegrationTest.java + **/*IntTest.java + + + + + + + json + + + + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + + run-benchmarks + + none + + exec + + + test + java + + -classpath + + org.openjdk.jmh.Main + .* + + + + + + + + + + + + buildAgentLoader + + + + org.apache.maven.plugins + maven-jar-plugin + + + package + + jar + + + agentLoader + target/classes + + + true + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + com/baeldung/instrumentation/application/AgentLoader.class + com/baeldung/instrumentation/application/Launcher.class + + + + + + + + + + buildApplication + + + + org.apache.maven.plugins + maven-jar-plugin + + + package + + jar + + + application + target/classes + + + true + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + com/baeldung/instrumentation/application/MyAtm.class + com/baeldung/instrumentation/application/MyAtmApplication.class + com/baeldung/instrumentation/application/Launcher.class + + + + + + + + + + buildAgent + + + + org.apache.maven.plugins + maven-jar-plugin + + + package + + jar + + + agent + target/classes + + + true + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + com/baeldung/instrumentation/agent/AtmTransformer.class + com/baeldung/instrumentation/agent/MyInstrumentationAgent.class + + + + + + + + + + + + + + 2.8.5 + 2.8.2 + + + 3.5 + 1.16.12 + + 1.5.0-b01 + + + 3.10.0 + + + 2.21.0 + 4.3.4.RELEASE + 3.0.0-M1 + 3.0.2 + 1.4.4 + 3.1.1 + 2.0.3.RELEASE + 1.6.0 + + + diff --git a/core-java/src/main/java/com/baeldung/accessmodifiers/Public.java b/core-java-lang/src/main/java/com/baeldung/accessmodifiers/Public.java similarity index 100% rename from core-java/src/main/java/com/baeldung/accessmodifiers/Public.java rename to core-java-lang/src/main/java/com/baeldung/accessmodifiers/Public.java diff --git a/core-java/src/main/java/com/baeldung/accessmodifiers/SubClass.java b/core-java-lang/src/main/java/com/baeldung/accessmodifiers/SubClass.java similarity index 100% rename from core-java/src/main/java/com/baeldung/accessmodifiers/SubClass.java rename to core-java-lang/src/main/java/com/baeldung/accessmodifiers/SubClass.java diff --git a/core-java/src/main/java/com/baeldung/accessmodifiers/SuperPublic.java b/core-java-lang/src/main/java/com/baeldung/accessmodifiers/SuperPublic.java similarity index 100% rename from core-java/src/main/java/com/baeldung/accessmodifiers/SuperPublic.java rename to core-java-lang/src/main/java/com/baeldung/accessmodifiers/SuperPublic.java diff --git a/core-java/src/main/java/com/baeldung/accessmodifiers/another/AnotherPublic.java b/core-java-lang/src/main/java/com/baeldung/accessmodifiers/another/AnotherPublic.java similarity index 100% rename from core-java/src/main/java/com/baeldung/accessmodifiers/another/AnotherPublic.java rename to core-java-lang/src/main/java/com/baeldung/accessmodifiers/another/AnotherPublic.java diff --git a/core-java/src/main/java/com/baeldung/accessmodifiers/another/AnotherSubClass.java b/core-java-lang/src/main/java/com/baeldung/accessmodifiers/another/AnotherSubClass.java similarity index 100% rename from core-java/src/main/java/com/baeldung/accessmodifiers/another/AnotherSubClass.java rename to core-java-lang/src/main/java/com/baeldung/accessmodifiers/another/AnotherSubClass.java diff --git a/core-java/src/main/java/com/baeldung/accessmodifiers/another/AnotherSuperPublic.java b/core-java-lang/src/main/java/com/baeldung/accessmodifiers/another/AnotherSuperPublic.java similarity index 100% rename from core-java/src/main/java/com/baeldung/accessmodifiers/another/AnotherSuperPublic.java rename to core-java-lang/src/main/java/com/baeldung/accessmodifiers/another/AnotherSuperPublic.java diff --git a/core-java/src/main/java/com/baeldung/assertion/Assertion.java b/core-java-lang/src/main/java/com/baeldung/assertion/Assertion.java similarity index 100% rename from core-java/src/main/java/com/baeldung/assertion/Assertion.java rename to core-java-lang/src/main/java/com/baeldung/assertion/Assertion.java diff --git a/core-java/src/main/java/com/baeldung/binding/Animal.java b/core-java-lang/src/main/java/com/baeldung/binding/Animal.java similarity index 100% rename from core-java/src/main/java/com/baeldung/binding/Animal.java rename to core-java-lang/src/main/java/com/baeldung/binding/Animal.java diff --git a/core-java/src/main/java/com/baeldung/binding/AnimalActivity.java b/core-java-lang/src/main/java/com/baeldung/binding/AnimalActivity.java similarity index 100% rename from core-java/src/main/java/com/baeldung/binding/AnimalActivity.java rename to core-java-lang/src/main/java/com/baeldung/binding/AnimalActivity.java diff --git a/core-java/src/main/java/com/baeldung/binding/Cat.java b/core-java-lang/src/main/java/com/baeldung/binding/Cat.java similarity index 100% rename from core-java/src/main/java/com/baeldung/binding/Cat.java rename to core-java-lang/src/main/java/com/baeldung/binding/Cat.java diff --git a/core-java/src/main/java/com/baeldung/breakcontinue/BreakContinue.java b/core-java-lang/src/main/java/com/baeldung/breakcontinue/BreakContinue.java similarity index 99% rename from core-java/src/main/java/com/baeldung/breakcontinue/BreakContinue.java rename to core-java-lang/src/main/java/com/baeldung/breakcontinue/BreakContinue.java index ce85b487c1..23bb531273 100644 --- a/core-java/src/main/java/com/baeldung/breakcontinue/BreakContinue.java +++ b/core-java-lang/src/main/java/com/baeldung/breakcontinue/BreakContinue.java @@ -11,6 +11,7 @@ import java.util.Map.Entry; * @author Santosh * */ + public class BreakContinue { public static int unlabeledBreak() { diff --git a/core-java/src/main/java/com/baeldung/casting/Animal.java b/core-java-lang/src/main/java/com/baeldung/casting/Animal.java similarity index 100% rename from core-java/src/main/java/com/baeldung/casting/Animal.java rename to core-java-lang/src/main/java/com/baeldung/casting/Animal.java diff --git a/core-java/src/main/java/com/baeldung/casting/AnimalFeeder.java b/core-java-lang/src/main/java/com/baeldung/casting/AnimalFeeder.java similarity index 100% rename from core-java/src/main/java/com/baeldung/casting/AnimalFeeder.java rename to core-java-lang/src/main/java/com/baeldung/casting/AnimalFeeder.java diff --git a/core-java/src/main/java/com/baeldung/casting/AnimalFeederGeneric.java b/core-java-lang/src/main/java/com/baeldung/casting/AnimalFeederGeneric.java similarity index 100% rename from core-java/src/main/java/com/baeldung/casting/AnimalFeederGeneric.java rename to core-java-lang/src/main/java/com/baeldung/casting/AnimalFeederGeneric.java diff --git a/core-java/src/main/java/com/baeldung/casting/Cat.java b/core-java-lang/src/main/java/com/baeldung/casting/Cat.java similarity index 100% rename from core-java/src/main/java/com/baeldung/casting/Cat.java rename to core-java-lang/src/main/java/com/baeldung/casting/Cat.java diff --git a/core-java/src/main/java/com/baeldung/casting/Dog.java b/core-java-lang/src/main/java/com/baeldung/casting/Dog.java similarity index 100% rename from core-java/src/main/java/com/baeldung/casting/Dog.java rename to core-java-lang/src/main/java/com/baeldung/casting/Dog.java diff --git a/core-java/src/main/java/com/baeldung/casting/Mew.java b/core-java-lang/src/main/java/com/baeldung/casting/Mew.java similarity index 100% rename from core-java/src/main/java/com/baeldung/casting/Mew.java rename to core-java-lang/src/main/java/com/baeldung/casting/Mew.java diff --git a/core-java/src/main/java/com/baeldung/chainedexception/LogWithChain.java b/core-java-lang/src/main/java/com/baeldung/chainedexception/LogWithChain.java similarity index 100% rename from core-java/src/main/java/com/baeldung/chainedexception/LogWithChain.java rename to core-java-lang/src/main/java/com/baeldung/chainedexception/LogWithChain.java diff --git a/core-java/src/main/java/com/baeldung/chainedexception/LogWithoutChain.java b/core-java-lang/src/main/java/com/baeldung/chainedexception/LogWithoutChain.java similarity index 100% rename from core-java/src/main/java/com/baeldung/chainedexception/LogWithoutChain.java rename to core-java-lang/src/main/java/com/baeldung/chainedexception/LogWithoutChain.java diff --git a/core-java/src/main/java/com/baeldung/chainedexception/exceptions/GirlFriendOfManagerUpsetException.java b/core-java-lang/src/main/java/com/baeldung/chainedexception/exceptions/GirlFriendOfManagerUpsetException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/chainedexception/exceptions/GirlFriendOfManagerUpsetException.java rename to core-java-lang/src/main/java/com/baeldung/chainedexception/exceptions/GirlFriendOfManagerUpsetException.java diff --git a/core-java/src/main/java/com/baeldung/chainedexception/exceptions/ManagerUpsetException.java b/core-java-lang/src/main/java/com/baeldung/chainedexception/exceptions/ManagerUpsetException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/chainedexception/exceptions/ManagerUpsetException.java rename to core-java-lang/src/main/java/com/baeldung/chainedexception/exceptions/ManagerUpsetException.java diff --git a/core-java/src/main/java/com/baeldung/chainedexception/exceptions/NoLeaveGrantedException.java b/core-java-lang/src/main/java/com/baeldung/chainedexception/exceptions/NoLeaveGrantedException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/chainedexception/exceptions/NoLeaveGrantedException.java rename to core-java-lang/src/main/java/com/baeldung/chainedexception/exceptions/NoLeaveGrantedException.java diff --git a/core-java/src/main/java/com/baeldung/chainedexception/exceptions/TeamLeadUpsetException.java b/core-java-lang/src/main/java/com/baeldung/chainedexception/exceptions/TeamLeadUpsetException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/chainedexception/exceptions/TeamLeadUpsetException.java rename to core-java-lang/src/main/java/com/baeldung/chainedexception/exceptions/TeamLeadUpsetException.java diff --git a/core-java/src/main/java/com/baeldung/comparable/Player.java b/core-java-lang/src/main/java/com/baeldung/comparable/Player.java similarity index 100% rename from core-java/src/main/java/com/baeldung/comparable/Player.java rename to core-java-lang/src/main/java/com/baeldung/comparable/Player.java diff --git a/core-java/src/main/java/com/baeldung/comparable/PlayerSorter.java b/core-java-lang/src/main/java/com/baeldung/comparable/PlayerSorter.java similarity index 100% rename from core-java/src/main/java/com/baeldung/comparable/PlayerSorter.java rename to core-java-lang/src/main/java/com/baeldung/comparable/PlayerSorter.java diff --git a/core-java/src/main/java/com/baeldung/comparator/Player.java b/core-java-lang/src/main/java/com/baeldung/comparator/Player.java similarity index 100% rename from core-java/src/main/java/com/baeldung/comparator/Player.java rename to core-java-lang/src/main/java/com/baeldung/comparator/Player.java diff --git a/core-java/src/main/java/com/baeldung/comparator/PlayerAgeComparator.java b/core-java-lang/src/main/java/com/baeldung/comparator/PlayerAgeComparator.java similarity index 100% rename from core-java/src/main/java/com/baeldung/comparator/PlayerAgeComparator.java rename to core-java-lang/src/main/java/com/baeldung/comparator/PlayerAgeComparator.java diff --git a/core-java/src/main/java/com/baeldung/comparator/PlayerAgeSorter.java b/core-java-lang/src/main/java/com/baeldung/comparator/PlayerAgeSorter.java similarity index 100% rename from core-java/src/main/java/com/baeldung/comparator/PlayerAgeSorter.java rename to core-java-lang/src/main/java/com/baeldung/comparator/PlayerAgeSorter.java diff --git a/core-java/src/main/java/com/baeldung/comparator/PlayerRankingComparator.java b/core-java-lang/src/main/java/com/baeldung/comparator/PlayerRankingComparator.java similarity index 100% rename from core-java/src/main/java/com/baeldung/comparator/PlayerRankingComparator.java rename to core-java-lang/src/main/java/com/baeldung/comparator/PlayerRankingComparator.java diff --git a/core-java/src/main/java/com/baeldung/comparator/PlayerRankingSorter.java b/core-java-lang/src/main/java/com/baeldung/comparator/PlayerRankingSorter.java similarity index 100% rename from core-java/src/main/java/com/baeldung/comparator/PlayerRankingSorter.java rename to core-java-lang/src/main/java/com/baeldung/comparator/PlayerRankingSorter.java diff --git a/core-java/src/main/java/com/baeldung/customexception/FileManager.java b/core-java-lang/src/main/java/com/baeldung/customexception/FileManager.java similarity index 100% rename from core-java/src/main/java/com/baeldung/customexception/FileManager.java rename to core-java-lang/src/main/java/com/baeldung/customexception/FileManager.java diff --git a/core-java/src/main/java/com/baeldung/customexception/IncorrectFileExtensionException.java b/core-java-lang/src/main/java/com/baeldung/customexception/IncorrectFileExtensionException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/customexception/IncorrectFileExtensionException.java rename to core-java-lang/src/main/java/com/baeldung/customexception/IncorrectFileExtensionException.java diff --git a/core-java/src/main/java/com/baeldung/customexception/IncorrectFileNameException.java b/core-java-lang/src/main/java/com/baeldung/customexception/IncorrectFileNameException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/customexception/IncorrectFileNameException.java rename to core-java-lang/src/main/java/com/baeldung/customexception/IncorrectFileNameException.java diff --git a/core-java/src/main/java/com/baeldung/deepcopy/Address.java b/core-java-lang/src/main/java/com/baeldung/deepcopy/Address.java similarity index 100% rename from core-java/src/main/java/com/baeldung/deepcopy/Address.java rename to core-java-lang/src/main/java/com/baeldung/deepcopy/Address.java diff --git a/core-java/src/main/java/com/baeldung/deepcopy/User.java b/core-java-lang/src/main/java/com/baeldung/deepcopy/User.java similarity index 100% rename from core-java/src/main/java/com/baeldung/deepcopy/User.java rename to core-java-lang/src/main/java/com/baeldung/deepcopy/User.java diff --git a/core-java/src/main/java/com/baeldung/doubles/SplitFloatingPointNumbers.java b/core-java-lang/src/main/java/com/baeldung/doubles/SplitFloatingPointNumbers.java similarity index 100% rename from core-java/src/main/java/com/baeldung/doubles/SplitFloatingPointNumbers.java rename to core-java-lang/src/main/java/com/baeldung/doubles/SplitFloatingPointNumbers.java diff --git a/core-java/src/main/java/com/baeldung/dynamicproxy/DynamicInvocationHandler.java b/core-java-lang/src/main/java/com/baeldung/dynamicproxy/DynamicInvocationHandler.java similarity index 100% rename from core-java/src/main/java/com/baeldung/dynamicproxy/DynamicInvocationHandler.java rename to core-java-lang/src/main/java/com/baeldung/dynamicproxy/DynamicInvocationHandler.java diff --git a/core-java/src/main/java/com/baeldung/dynamicproxy/TimingDynamicInvocationHandler.java b/core-java-lang/src/main/java/com/baeldung/dynamicproxy/TimingDynamicInvocationHandler.java similarity index 100% rename from core-java/src/main/java/com/baeldung/dynamicproxy/TimingDynamicInvocationHandler.java rename to core-java-lang/src/main/java/com/baeldung/dynamicproxy/TimingDynamicInvocationHandler.java diff --git a/core-java/src/main/java/com/baeldung/enums/Pizza.java b/core-java-lang/src/main/java/com/baeldung/enums/Pizza.java similarity index 100% rename from core-java/src/main/java/com/baeldung/enums/Pizza.java rename to core-java-lang/src/main/java/com/baeldung/enums/Pizza.java diff --git a/core-java/src/main/java/com/baeldung/enums/PizzaDeliveryStrategy.java b/core-java-lang/src/main/java/com/baeldung/enums/PizzaDeliveryStrategy.java similarity index 100% rename from core-java/src/main/java/com/baeldung/enums/PizzaDeliveryStrategy.java rename to core-java-lang/src/main/java/com/baeldung/enums/PizzaDeliveryStrategy.java diff --git a/core-java/src/main/java/com/baeldung/enums/PizzaDeliverySystemConfiguration.java b/core-java-lang/src/main/java/com/baeldung/enums/PizzaDeliverySystemConfiguration.java similarity index 100% rename from core-java/src/main/java/com/baeldung/enums/PizzaDeliverySystemConfiguration.java rename to core-java-lang/src/main/java/com/baeldung/enums/PizzaDeliverySystemConfiguration.java diff --git a/core-java/src/main/java/com/baeldung/enums/README.md b/core-java-lang/src/main/java/com/baeldung/enums/README.md similarity index 100% rename from core-java/src/main/java/com/baeldung/enums/README.md rename to core-java-lang/src/main/java/com/baeldung/enums/README.md diff --git a/core-java/src/main/java/com/baeldung/equalshashcode/entities/ComplexClass.java b/core-java-lang/src/main/java/com/baeldung/equalshashcode/entities/ComplexClass.java similarity index 100% rename from core-java/src/main/java/com/baeldung/equalshashcode/entities/ComplexClass.java rename to core-java-lang/src/main/java/com/baeldung/equalshashcode/entities/ComplexClass.java diff --git a/core-java/src/main/java/com/baeldung/equalshashcode/entities/PrimitiveClass.java b/core-java-lang/src/main/java/com/baeldung/equalshashcode/entities/PrimitiveClass.java similarity index 100% rename from core-java/src/main/java/com/baeldung/equalshashcode/entities/PrimitiveClass.java rename to core-java-lang/src/main/java/com/baeldung/equalshashcode/entities/PrimitiveClass.java diff --git a/core-java/src/main/java/com/baeldung/equalshashcode/entities/Rectangle.java b/core-java-lang/src/main/java/com/baeldung/equalshashcode/entities/Rectangle.java similarity index 100% rename from core-java/src/main/java/com/baeldung/equalshashcode/entities/Rectangle.java rename to core-java-lang/src/main/java/com/baeldung/equalshashcode/entities/Rectangle.java diff --git a/core-java/src/main/java/com/baeldung/equalshashcode/entities/Shape.java b/core-java-lang/src/main/java/com/baeldung/equalshashcode/entities/Shape.java similarity index 100% rename from core-java/src/main/java/com/baeldung/equalshashcode/entities/Shape.java rename to core-java-lang/src/main/java/com/baeldung/equalshashcode/entities/Shape.java diff --git a/core-java/src/main/java/com/baeldung/equalshashcode/entities/Square.java b/core-java-lang/src/main/java/com/baeldung/equalshashcode/entities/Square.java similarity index 100% rename from core-java/src/main/java/com/baeldung/equalshashcode/entities/Square.java rename to core-java-lang/src/main/java/com/baeldung/equalshashcode/entities/Square.java diff --git a/core-java/src/main/java/com/baeldung/exceptionhandling/Exceptions.java b/core-java-lang/src/main/java/com/baeldung/exceptionhandling/Exceptions.java similarity index 100% rename from core-java/src/main/java/com/baeldung/exceptionhandling/Exceptions.java rename to core-java-lang/src/main/java/com/baeldung/exceptionhandling/Exceptions.java diff --git a/core-java/src/main/java/com/baeldung/exceptionhandling/MyException.java b/core-java-lang/src/main/java/com/baeldung/exceptionhandling/MyException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/exceptionhandling/MyException.java rename to core-java-lang/src/main/java/com/baeldung/exceptionhandling/MyException.java diff --git a/core-java/src/main/java/com/baeldung/exceptionhandling/Player.java b/core-java-lang/src/main/java/com/baeldung/exceptionhandling/Player.java similarity index 100% rename from core-java/src/main/java/com/baeldung/exceptionhandling/Player.java rename to core-java-lang/src/main/java/com/baeldung/exceptionhandling/Player.java diff --git a/core-java/src/main/java/com/baeldung/exceptionhandling/PlayerLoadException.java b/core-java-lang/src/main/java/com/baeldung/exceptionhandling/PlayerLoadException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/exceptionhandling/PlayerLoadException.java rename to core-java-lang/src/main/java/com/baeldung/exceptionhandling/PlayerLoadException.java diff --git a/core-java/src/main/java/com/baeldung/exceptionhandling/PlayerScoreException.java b/core-java-lang/src/main/java/com/baeldung/exceptionhandling/PlayerScoreException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/exceptionhandling/PlayerScoreException.java rename to core-java-lang/src/main/java/com/baeldung/exceptionhandling/PlayerScoreException.java diff --git a/core-java/src/main/java/com/baeldung/exceptionhandling/TimeoutException.java b/core-java-lang/src/main/java/com/baeldung/exceptionhandling/TimeoutException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/exceptionhandling/TimeoutException.java rename to core-java-lang/src/main/java/com/baeldung/exceptionhandling/TimeoutException.java diff --git a/core-java/src/main/java/com/baeldung/finalize/CloseableResource.java b/core-java-lang/src/main/java/com/baeldung/finalize/CloseableResource.java similarity index 100% rename from core-java/src/main/java/com/baeldung/finalize/CloseableResource.java rename to core-java-lang/src/main/java/com/baeldung/finalize/CloseableResource.java diff --git a/core-java/src/main/java/com/baeldung/finalize/Finalizable.java b/core-java-lang/src/main/java/com/baeldung/finalize/Finalizable.java similarity index 100% rename from core-java/src/main/java/com/baeldung/finalize/Finalizable.java rename to core-java-lang/src/main/java/com/baeldung/finalize/Finalizable.java diff --git a/core-java/src/main/java/com/baeldung/finalkeyword/BlackCat.java b/core-java-lang/src/main/java/com/baeldung/finalkeyword/BlackCat.java similarity index 100% rename from core-java/src/main/java/com/baeldung/finalkeyword/BlackCat.java rename to core-java-lang/src/main/java/com/baeldung/finalkeyword/BlackCat.java diff --git a/core-java/src/main/java/com/baeldung/finalkeyword/BlackDog.java b/core-java-lang/src/main/java/com/baeldung/finalkeyword/BlackDog.java similarity index 100% rename from core-java/src/main/java/com/baeldung/finalkeyword/BlackDog.java rename to core-java-lang/src/main/java/com/baeldung/finalkeyword/BlackDog.java diff --git a/core-java/src/main/java/com/baeldung/finalkeyword/Cat.java b/core-java-lang/src/main/java/com/baeldung/finalkeyword/Cat.java similarity index 100% rename from core-java/src/main/java/com/baeldung/finalkeyword/Cat.java rename to core-java-lang/src/main/java/com/baeldung/finalkeyword/Cat.java diff --git a/core-java/src/main/java/com/baeldung/finalkeyword/Dog.java b/core-java-lang/src/main/java/com/baeldung/finalkeyword/Dog.java similarity index 100% rename from core-java/src/main/java/com/baeldung/finalkeyword/Dog.java rename to core-java-lang/src/main/java/com/baeldung/finalkeyword/Dog.java diff --git a/core-java/src/main/java/com/baeldung/generics/Building.java b/core-java-lang/src/main/java/com/baeldung/generics/Building.java similarity index 100% rename from core-java/src/main/java/com/baeldung/generics/Building.java rename to core-java-lang/src/main/java/com/baeldung/generics/Building.java diff --git a/core-java/src/main/java/com/baeldung/generics/Generics.java b/core-java-lang/src/main/java/com/baeldung/generics/Generics.java similarity index 100% rename from core-java/src/main/java/com/baeldung/generics/Generics.java rename to core-java-lang/src/main/java/com/baeldung/generics/Generics.java diff --git a/core-java/src/main/java/com/baeldung/generics/House.java b/core-java-lang/src/main/java/com/baeldung/generics/House.java similarity index 100% rename from core-java/src/main/java/com/baeldung/generics/House.java rename to core-java-lang/src/main/java/com/baeldung/generics/House.java diff --git a/core-java/src/main/java/com/baeldung/hashcode/entities/User.java b/core-java-lang/src/main/java/com/baeldung/hashcode/entities/User.java similarity index 100% rename from core-java/src/main/java/com/baeldung/hashcode/entities/User.java rename to core-java-lang/src/main/java/com/baeldung/hashcode/entities/User.java diff --git a/core-java/src/main/java/com/baeldung/immutableobjects/Currency.java b/core-java-lang/src/main/java/com/baeldung/immutableobjects/Currency.java similarity index 100% rename from core-java/src/main/java/com/baeldung/immutableobjects/Currency.java rename to core-java-lang/src/main/java/com/baeldung/immutableobjects/Currency.java diff --git a/core-java/src/main/java/com/baeldung/immutableobjects/Money.java b/core-java-lang/src/main/java/com/baeldung/immutableobjects/Money.java similarity index 100% rename from core-java/src/main/java/com/baeldung/immutableobjects/Money.java rename to core-java-lang/src/main/java/com/baeldung/immutableobjects/Money.java diff --git a/core-java/src/main/java/com/baeldung/inheritance/ArmoredCar.java b/core-java-lang/src/main/java/com/baeldung/inheritance/ArmoredCar.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritance/ArmoredCar.java rename to core-java-lang/src/main/java/com/baeldung/inheritance/ArmoredCar.java diff --git a/core-java/src/main/java/com/baeldung/inheritance/BMW.java b/core-java-lang/src/main/java/com/baeldung/inheritance/BMW.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritance/BMW.java rename to core-java-lang/src/main/java/com/baeldung/inheritance/BMW.java diff --git a/core-java/src/main/java/com/baeldung/inheritance/Car.java b/core-java-lang/src/main/java/com/baeldung/inheritance/Car.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritance/Car.java rename to core-java-lang/src/main/java/com/baeldung/inheritance/Car.java diff --git a/core-java/src/main/java/com/baeldung/inheritance/Employee.java b/core-java-lang/src/main/java/com/baeldung/inheritance/Employee.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritance/Employee.java rename to core-java-lang/src/main/java/com/baeldung/inheritance/Employee.java diff --git a/core-java/src/main/java/com/baeldung/inheritance/Floatable.java b/core-java-lang/src/main/java/com/baeldung/inheritance/Floatable.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritance/Floatable.java rename to core-java-lang/src/main/java/com/baeldung/inheritance/Floatable.java diff --git a/core-java/src/main/java/com/baeldung/inheritance/Flyable.java b/core-java-lang/src/main/java/com/baeldung/inheritance/Flyable.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritance/Flyable.java rename to core-java-lang/src/main/java/com/baeldung/inheritance/Flyable.java diff --git a/core-java/src/main/java/com/baeldung/inheritance/SpaceCar.java b/core-java-lang/src/main/java/com/baeldung/inheritance/SpaceCar.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritance/SpaceCar.java rename to core-java-lang/src/main/java/com/baeldung/inheritance/SpaceCar.java diff --git a/core-java/src/main/java/com/baeldung/inheritance/SpaceTraveller.java b/core-java-lang/src/main/java/com/baeldung/inheritance/SpaceTraveller.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritance/SpaceTraveller.java rename to core-java-lang/src/main/java/com/baeldung/inheritance/SpaceTraveller.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/application/Application.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/application/Application.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/application/Application.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/application/Application.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Actress.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Actress.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Actress.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Actress.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Computer.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Computer.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Computer.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Computer.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Memory.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Memory.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Memory.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Memory.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Person.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Person.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Person.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Person.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Processor.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Processor.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Processor.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Processor.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/SoundCard.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/SoundCard.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/SoundCard.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/SoundCard.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardMemory.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardMemory.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardMemory.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardMemory.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardProcessor.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardProcessor.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardProcessor.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardProcessor.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardSoundCard.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardSoundCard.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardSoundCard.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardSoundCard.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Waitress.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Waitress.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Waitress.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Waitress.java diff --git a/core-java/src/main/java/com/baeldung/initializationguide/User.java b/core-java-lang/src/main/java/com/baeldung/initializationguide/User.java similarity index 100% rename from core-java/src/main/java/com/baeldung/initializationguide/User.java rename to core-java-lang/src/main/java/com/baeldung/initializationguide/User.java diff --git a/core-java/src/main/java/com/baeldung/interfaces/CommaSeparatedCustomers.java b/core-java-lang/src/main/java/com/baeldung/interfaces/CommaSeparatedCustomers.java similarity index 100% rename from core-java/src/main/java/com/baeldung/interfaces/CommaSeparatedCustomers.java rename to core-java-lang/src/main/java/com/baeldung/interfaces/CommaSeparatedCustomers.java diff --git a/core-java/src/main/java/com/baeldung/interfaces/Customer.java b/core-java-lang/src/main/java/com/baeldung/interfaces/Customer.java similarity index 100% rename from core-java/src/main/java/com/baeldung/interfaces/Customer.java rename to core-java-lang/src/main/java/com/baeldung/interfaces/Customer.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/Animal.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/Animal.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/Animal.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/Animal.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/Bird.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/Bird.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/Bird.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/Bird.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/DynamicGreeter.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/DynamicGreeter.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/DynamicGreeter.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/DynamicGreeter.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/Eating.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/Eating.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/Eating.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/Eating.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/Goat.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/Goat.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/Goat.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/Goat.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/Greeter.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/Greeter.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/Greeter.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/Greeter.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/GreetingAnnotation.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/GreetingAnnotation.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/GreetingAnnotation.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/GreetingAnnotation.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/Greetings.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/Greetings.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/Greetings.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/Greetings.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/Locomotion.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/Locomotion.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/Locomotion.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/Locomotion.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/Operations.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/Operations.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/Operations.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/Operations.java diff --git a/core-java/src/main/java/com/baeldung/java/reflection/Person.java b/core-java-lang/src/main/java/com/baeldung/java/reflection/Person.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/reflection/Person.java rename to core-java-lang/src/main/java/com/baeldung/java/reflection/Person.java diff --git a/core-java/src/main/java/com/baeldung/keyword/KeywordDemo.java b/core-java-lang/src/main/java/com/baeldung/keyword/KeywordDemo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/keyword/KeywordDemo.java rename to core-java-lang/src/main/java/com/baeldung/keyword/KeywordDemo.java diff --git a/core-java/src/main/java/com/baeldung/keyword/superkeyword/SuperBase.java b/core-java-lang/src/main/java/com/baeldung/keyword/superkeyword/SuperBase.java similarity index 100% rename from core-java/src/main/java/com/baeldung/keyword/superkeyword/SuperBase.java rename to core-java-lang/src/main/java/com/baeldung/keyword/superkeyword/SuperBase.java diff --git a/core-java/src/main/java/com/baeldung/keyword/superkeyword/SuperSub.java b/core-java-lang/src/main/java/com/baeldung/keyword/superkeyword/SuperSub.java similarity index 100% rename from core-java/src/main/java/com/baeldung/keyword/superkeyword/SuperSub.java rename to core-java-lang/src/main/java/com/baeldung/keyword/superkeyword/SuperSub.java diff --git a/core-java/src/main/java/com/baeldung/keyword/thiskeyword/KeywordUnitTest.java b/core-java-lang/src/main/java/com/baeldung/keyword/thiskeyword/KeywordUnitTest.java similarity index 100% rename from core-java/src/main/java/com/baeldung/keyword/thiskeyword/KeywordUnitTest.java rename to core-java-lang/src/main/java/com/baeldung/keyword/thiskeyword/KeywordUnitTest.java diff --git a/core-java/src/main/java/com/baeldung/keywords/finalize/FinalizeObject.java b/core-java-lang/src/main/java/com/baeldung/keywords/finalize/FinalizeObject.java similarity index 100% rename from core-java/src/main/java/com/baeldung/keywords/finalize/FinalizeObject.java rename to core-java-lang/src/main/java/com/baeldung/keywords/finalize/FinalizeObject.java diff --git a/core-java/src/main/java/com/baeldung/keywords/finalkeyword/Child.java b/core-java-lang/src/main/java/com/baeldung/keywords/finalkeyword/Child.java similarity index 100% rename from core-java/src/main/java/com/baeldung/keywords/finalkeyword/Child.java rename to core-java-lang/src/main/java/com/baeldung/keywords/finalkeyword/Child.java diff --git a/core-java/src/main/java/com/baeldung/keywords/finalkeyword/GrandChild.java b/core-java-lang/src/main/java/com/baeldung/keywords/finalkeyword/GrandChild.java similarity index 100% rename from core-java/src/main/java/com/baeldung/keywords/finalkeyword/GrandChild.java rename to core-java-lang/src/main/java/com/baeldung/keywords/finalkeyword/GrandChild.java diff --git a/core-java/src/main/java/com/baeldung/keywords/finalkeyword/Parent.java b/core-java-lang/src/main/java/com/baeldung/keywords/finalkeyword/Parent.java similarity index 100% rename from core-java/src/main/java/com/baeldung/keywords/finalkeyword/Parent.java rename to core-java-lang/src/main/java/com/baeldung/keywords/finalkeyword/Parent.java diff --git a/core-java/src/main/java/com/baeldung/keywords/finallykeyword/FinallyExample.java b/core-java-lang/src/main/java/com/baeldung/keywords/finallykeyword/FinallyExample.java similarity index 100% rename from core-java/src/main/java/com/baeldung/keywords/finallykeyword/FinallyExample.java rename to core-java-lang/src/main/java/com/baeldung/keywords/finallykeyword/FinallyExample.java diff --git a/core-java/src/main/java/com/baeldung/loops/InfiniteLoops.java b/core-java-lang/src/main/java/com/baeldung/loops/InfiniteLoops.java similarity index 100% rename from core-java/src/main/java/com/baeldung/loops/InfiniteLoops.java rename to core-java-lang/src/main/java/com/baeldung/loops/InfiniteLoops.java diff --git a/core-java/src/main/java/com/baeldung/loops/LoopsInJava.java b/core-java-lang/src/main/java/com/baeldung/loops/LoopsInJava.java similarity index 100% rename from core-java/src/main/java/com/baeldung/loops/LoopsInJava.java rename to core-java-lang/src/main/java/com/baeldung/loops/LoopsInJava.java diff --git a/core-java/src/main/java/com/baeldung/methodoverloadingoverriding/application/Application.java b/core-java-lang/src/main/java/com/baeldung/methodoverloadingoverriding/application/Application.java similarity index 100% rename from core-java/src/main/java/com/baeldung/methodoverloadingoverriding/application/Application.java rename to core-java-lang/src/main/java/com/baeldung/methodoverloadingoverriding/application/Application.java diff --git a/core-java/src/main/java/com/baeldung/methodoverloadingoverriding/model/Car.java b/core-java-lang/src/main/java/com/baeldung/methodoverloadingoverriding/model/Car.java similarity index 100% rename from core-java/src/main/java/com/baeldung/methodoverloadingoverriding/model/Car.java rename to core-java-lang/src/main/java/com/baeldung/methodoverloadingoverriding/model/Car.java diff --git a/core-java/src/main/java/com/baeldung/methodoverloadingoverriding/model/Vehicle.java b/core-java-lang/src/main/java/com/baeldung/methodoverloadingoverriding/model/Vehicle.java similarity index 100% rename from core-java/src/main/java/com/baeldung/methodoverloadingoverriding/model/Vehicle.java rename to core-java-lang/src/main/java/com/baeldung/methodoverloadingoverriding/model/Vehicle.java diff --git a/core-java/src/main/java/com/baeldung/methodoverloadingoverriding/util/Multiplier.java b/core-java-lang/src/main/java/com/baeldung/methodoverloadingoverriding/util/Multiplier.java similarity index 100% rename from core-java/src/main/java/com/baeldung/methodoverloadingoverriding/util/Multiplier.java rename to core-java-lang/src/main/java/com/baeldung/methodoverloadingoverriding/util/Multiplier.java diff --git a/core-java/src/main/java/com/baeldung/noclassdeffounderror/ClassWithInitErrors.java b/core-java-lang/src/main/java/com/baeldung/noclassdeffounderror/ClassWithInitErrors.java similarity index 100% rename from core-java/src/main/java/com/baeldung/noclassdeffounderror/ClassWithInitErrors.java rename to core-java-lang/src/main/java/com/baeldung/noclassdeffounderror/ClassWithInitErrors.java diff --git a/core-java/src/main/java/com/baeldung/noclassdeffounderror/NoClassDefFoundErrorExample.java b/core-java-lang/src/main/java/com/baeldung/noclassdeffounderror/NoClassDefFoundErrorExample.java similarity index 100% rename from core-java/src/main/java/com/baeldung/noclassdeffounderror/NoClassDefFoundErrorExample.java rename to core-java-lang/src/main/java/com/baeldung/noclassdeffounderror/NoClassDefFoundErrorExample.java diff --git a/core-java/src/main/java/com/baeldung/parameterpassing/NonPrimitives.java b/core-java-lang/src/main/java/com/baeldung/parameterpassing/NonPrimitives.java similarity index 100% rename from core-java/src/main/java/com/baeldung/parameterpassing/NonPrimitives.java rename to core-java-lang/src/main/java/com/baeldung/parameterpassing/NonPrimitives.java diff --git a/core-java/src/main/java/com/baeldung/parameterpassing/Primitives.java b/core-java-lang/src/main/java/com/baeldung/parameterpassing/Primitives.java similarity index 100% rename from core-java/src/main/java/com/baeldung/parameterpassing/Primitives.java rename to core-java-lang/src/main/java/com/baeldung/parameterpassing/Primitives.java diff --git a/core-java/src/main/java/com/baeldung/polymorphism/FileManager.java b/core-java-lang/src/main/java/com/baeldung/polymorphism/FileManager.java similarity index 100% rename from core-java/src/main/java/com/baeldung/polymorphism/FileManager.java rename to core-java-lang/src/main/java/com/baeldung/polymorphism/FileManager.java diff --git a/core-java/src/main/java/com/baeldung/polymorphism/GenericFile.java b/core-java-lang/src/main/java/com/baeldung/polymorphism/GenericFile.java similarity index 100% rename from core-java/src/main/java/com/baeldung/polymorphism/GenericFile.java rename to core-java-lang/src/main/java/com/baeldung/polymorphism/GenericFile.java diff --git a/core-java/src/main/java/com/baeldung/polymorphism/ImageFile.java b/core-java-lang/src/main/java/com/baeldung/polymorphism/ImageFile.java similarity index 100% rename from core-java/src/main/java/com/baeldung/polymorphism/ImageFile.java rename to core-java-lang/src/main/java/com/baeldung/polymorphism/ImageFile.java diff --git a/core-java/src/main/java/com/baeldung/polymorphism/TextFile.java b/core-java-lang/src/main/java/com/baeldung/polymorphism/TextFile.java similarity index 100% rename from core-java/src/main/java/com/baeldung/polymorphism/TextFile.java rename to core-java-lang/src/main/java/com/baeldung/polymorphism/TextFile.java diff --git a/core-java/src/main/java/com/baeldung/recursion/BinaryNode.java b/core-java-lang/src/main/java/com/baeldung/recursion/BinaryNode.java similarity index 100% rename from core-java/src/main/java/com/baeldung/recursion/BinaryNode.java rename to core-java-lang/src/main/java/com/baeldung/recursion/BinaryNode.java diff --git a/core-java/src/main/java/com/baeldung/recursion/RecursionExample.java b/core-java-lang/src/main/java/com/baeldung/recursion/RecursionExample.java similarity index 100% rename from core-java/src/main/java/com/baeldung/recursion/RecursionExample.java rename to core-java-lang/src/main/java/com/baeldung/recursion/RecursionExample.java diff --git a/core-java/src/main/java/com/baeldung/scope/method/BaseMethodClass.java b/core-java-lang/src/main/java/com/baeldung/scope/method/BaseMethodClass.java similarity index 100% rename from core-java/src/main/java/com/baeldung/scope/method/BaseMethodClass.java rename to core-java-lang/src/main/java/com/baeldung/scope/method/BaseMethodClass.java diff --git a/core-java/src/main/java/com/baeldung/scope/method/ChildMethodClass.java b/core-java-lang/src/main/java/com/baeldung/scope/method/ChildMethodClass.java similarity index 100% rename from core-java/src/main/java/com/baeldung/scope/method/ChildMethodClass.java rename to core-java-lang/src/main/java/com/baeldung/scope/method/ChildMethodClass.java diff --git a/core-java/src/main/java/com/baeldung/scope/method/MethodHidingDemo.java b/core-java-lang/src/main/java/com/baeldung/scope/method/MethodHidingDemo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/scope/method/MethodHidingDemo.java rename to core-java-lang/src/main/java/com/baeldung/scope/method/MethodHidingDemo.java diff --git a/core-java/src/main/java/com/baeldung/scope/variable/ChildVariable.java b/core-java-lang/src/main/java/com/baeldung/scope/variable/ChildVariable.java similarity index 100% rename from core-java/src/main/java/com/baeldung/scope/variable/ChildVariable.java rename to core-java-lang/src/main/java/com/baeldung/scope/variable/ChildVariable.java diff --git a/core-java/src/main/java/com/baeldung/scope/variable/HideVariable.java b/core-java-lang/src/main/java/com/baeldung/scope/variable/HideVariable.java similarity index 100% rename from core-java/src/main/java/com/baeldung/scope/variable/HideVariable.java rename to core-java-lang/src/main/java/com/baeldung/scope/variable/HideVariable.java diff --git a/core-java/src/main/java/com/baeldung/scope/variable/ParentVariable.java b/core-java-lang/src/main/java/com/baeldung/scope/variable/ParentVariable.java similarity index 100% rename from core-java/src/main/java/com/baeldung/scope/variable/ParentVariable.java rename to core-java-lang/src/main/java/com/baeldung/scope/variable/ParentVariable.java diff --git a/core-java/src/main/java/com/baeldung/scope/variable/VariableHidingDemo.java b/core-java-lang/src/main/java/com/baeldung/scope/variable/VariableHidingDemo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/scope/variable/VariableHidingDemo.java rename to core-java-lang/src/main/java/com/baeldung/scope/variable/VariableHidingDemo.java diff --git a/core-java/src/main/java/com/baeldung/sneakythrows/SneakyRunnable.java b/core-java-lang/src/main/java/com/baeldung/sneakythrows/SneakyRunnable.java similarity index 100% rename from core-java/src/main/java/com/baeldung/sneakythrows/SneakyRunnable.java rename to core-java-lang/src/main/java/com/baeldung/sneakythrows/SneakyRunnable.java diff --git a/core-java/src/main/java/com/baeldung/sneakythrows/SneakyThrows.java b/core-java-lang/src/main/java/com/baeldung/sneakythrows/SneakyThrows.java similarity index 100% rename from core-java/src/main/java/com/baeldung/sneakythrows/SneakyThrows.java rename to core-java-lang/src/main/java/com/baeldung/sneakythrows/SneakyThrows.java diff --git a/core-java/src/main/java/com/baeldung/stackoverflowerror/AccountHolder.java b/core-java-lang/src/main/java/com/baeldung/stackoverflowerror/AccountHolder.java similarity index 100% rename from core-java/src/main/java/com/baeldung/stackoverflowerror/AccountHolder.java rename to core-java-lang/src/main/java/com/baeldung/stackoverflowerror/AccountHolder.java diff --git a/core-java/src/main/java/com/baeldung/stackoverflowerror/ClassOne.java b/core-java-lang/src/main/java/com/baeldung/stackoverflowerror/ClassOne.java similarity index 100% rename from core-java/src/main/java/com/baeldung/stackoverflowerror/ClassOne.java rename to core-java-lang/src/main/java/com/baeldung/stackoverflowerror/ClassOne.java diff --git a/core-java/src/main/java/com/baeldung/stackoverflowerror/ClassTwo.java b/core-java-lang/src/main/java/com/baeldung/stackoverflowerror/ClassTwo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/stackoverflowerror/ClassTwo.java rename to core-java-lang/src/main/java/com/baeldung/stackoverflowerror/ClassTwo.java diff --git a/core-java/src/main/java/com/baeldung/stackoverflowerror/InfiniteRecursionWithTerminationCondition.java b/core-java-lang/src/main/java/com/baeldung/stackoverflowerror/InfiniteRecursionWithTerminationCondition.java similarity index 100% rename from core-java/src/main/java/com/baeldung/stackoverflowerror/InfiniteRecursionWithTerminationCondition.java rename to core-java-lang/src/main/java/com/baeldung/stackoverflowerror/InfiniteRecursionWithTerminationCondition.java diff --git a/core-java/src/main/java/com/baeldung/stackoverflowerror/RecursionWithCorrectTerminationCondition.java b/core-java-lang/src/main/java/com/baeldung/stackoverflowerror/RecursionWithCorrectTerminationCondition.java similarity index 100% rename from core-java/src/main/java/com/baeldung/stackoverflowerror/RecursionWithCorrectTerminationCondition.java rename to core-java-lang/src/main/java/com/baeldung/stackoverflowerror/RecursionWithCorrectTerminationCondition.java diff --git a/core-java/src/main/java/com/baeldung/stackoverflowerror/UnintendedInfiniteRecursion.java b/core-java-lang/src/main/java/com/baeldung/stackoverflowerror/UnintendedInfiniteRecursion.java similarity index 100% rename from core-java/src/main/java/com/baeldung/stackoverflowerror/UnintendedInfiniteRecursion.java rename to core-java-lang/src/main/java/com/baeldung/stackoverflowerror/UnintendedInfiniteRecursion.java diff --git a/core-java/src/main/java/com/baeldung/staticdemo/Car.java b/core-java-lang/src/main/java/com/baeldung/staticdemo/Car.java similarity index 100% rename from core-java/src/main/java/com/baeldung/staticdemo/Car.java rename to core-java-lang/src/main/java/com/baeldung/staticdemo/Car.java diff --git a/core-java/src/main/java/com/baeldung/staticdemo/Singleton.java b/core-java-lang/src/main/java/com/baeldung/staticdemo/Singleton.java similarity index 100% rename from core-java/src/main/java/com/baeldung/staticdemo/Singleton.java rename to core-java-lang/src/main/java/com/baeldung/staticdemo/Singleton.java diff --git a/core-java/src/main/java/com/baeldung/staticdemo/StaticBlock.java b/core-java-lang/src/main/java/com/baeldung/staticdemo/StaticBlock.java similarity index 100% rename from core-java/src/main/java/com/baeldung/staticdemo/StaticBlock.java rename to core-java-lang/src/main/java/com/baeldung/staticdemo/StaticBlock.java diff --git a/core-java/src/main/java/com/baeldung/switchstatement/SwitchStatement.java b/core-java-lang/src/main/java/com/baeldung/switchstatement/SwitchStatement.java similarity index 100% rename from core-java/src/main/java/com/baeldung/switchstatement/SwitchStatement.java rename to core-java-lang/src/main/java/com/baeldung/switchstatement/SwitchStatement.java diff --git a/core-java/src/main/java/com/baeldung/synthetic/BridgeMethodDemo.java b/core-java-lang/src/main/java/com/baeldung/synthetic/BridgeMethodDemo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/synthetic/BridgeMethodDemo.java rename to core-java-lang/src/main/java/com/baeldung/synthetic/BridgeMethodDemo.java diff --git a/core-java/src/main/java/com/baeldung/synthetic/SyntheticConstructorDemo.java b/core-java-lang/src/main/java/com/baeldung/synthetic/SyntheticConstructorDemo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/synthetic/SyntheticConstructorDemo.java rename to core-java-lang/src/main/java/com/baeldung/synthetic/SyntheticConstructorDemo.java diff --git a/core-java/src/main/java/com/baeldung/synthetic/SyntheticFieldDemo.java b/core-java-lang/src/main/java/com/baeldung/synthetic/SyntheticFieldDemo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/synthetic/SyntheticFieldDemo.java rename to core-java-lang/src/main/java/com/baeldung/synthetic/SyntheticFieldDemo.java diff --git a/core-java/src/main/java/com/baeldung/synthetic/SyntheticMethodDemo.java b/core-java-lang/src/main/java/com/baeldung/synthetic/SyntheticMethodDemo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/synthetic/SyntheticMethodDemo.java rename to core-java-lang/src/main/java/com/baeldung/synthetic/SyntheticMethodDemo.java diff --git a/core-java/src/main/java/com/baeldung/system/ChatWindow.java b/core-java-lang/src/main/java/com/baeldung/system/ChatWindow.java similarity index 100% rename from core-java/src/main/java/com/baeldung/system/ChatWindow.java rename to core-java-lang/src/main/java/com/baeldung/system/ChatWindow.java diff --git a/core-java/src/main/java/com/baeldung/system/DateTimeService.java b/core-java-lang/src/main/java/com/baeldung/system/DateTimeService.java similarity index 100% rename from core-java/src/main/java/com/baeldung/system/DateTimeService.java rename to core-java-lang/src/main/java/com/baeldung/system/DateTimeService.java diff --git a/core-java/src/main/java/com/baeldung/system/EnvironmentVariables.java b/core-java-lang/src/main/java/com/baeldung/system/EnvironmentVariables.java similarity index 100% rename from core-java/src/main/java/com/baeldung/system/EnvironmentVariables.java rename to core-java-lang/src/main/java/com/baeldung/system/EnvironmentVariables.java diff --git a/core-java/src/main/java/com/baeldung/system/SystemErrDemo.java b/core-java-lang/src/main/java/com/baeldung/system/SystemErrDemo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/system/SystemErrDemo.java rename to core-java-lang/src/main/java/com/baeldung/system/SystemErrDemo.java diff --git a/core-java/src/main/java/com/baeldung/system/SystemExitDemo.java b/core-java-lang/src/main/java/com/baeldung/system/SystemExitDemo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/system/SystemExitDemo.java rename to core-java-lang/src/main/java/com/baeldung/system/SystemExitDemo.java diff --git a/core-java/src/main/java/com/baeldung/system/SystemOutDemo.java b/core-java-lang/src/main/java/com/baeldung/system/SystemOutDemo.java similarity index 100% rename from core-java/src/main/java/com/baeldung/system/SystemOutDemo.java rename to core-java-lang/src/main/java/com/baeldung/system/SystemOutDemo.java diff --git a/core-java/src/main/java/com/baeldung/system/UserCredentials.java b/core-java-lang/src/main/java/com/baeldung/system/UserCredentials.java similarity index 100% rename from core-java/src/main/java/com/baeldung/system/UserCredentials.java rename to core-java-lang/src/main/java/com/baeldung/system/UserCredentials.java diff --git a/core-java/src/main/java/com/baeldung/throwsexception/DataAccessException.java b/core-java-lang/src/main/java/com/baeldung/throwsexception/DataAccessException.java similarity index 100% rename from core-java/src/main/java/com/baeldung/throwsexception/DataAccessException.java rename to core-java-lang/src/main/java/com/baeldung/throwsexception/DataAccessException.java diff --git a/core-java/src/main/java/com/baeldung/throwsexception/Main.java b/core-java-lang/src/main/java/com/baeldung/throwsexception/Main.java similarity index 100% rename from core-java/src/main/java/com/baeldung/throwsexception/Main.java rename to core-java-lang/src/main/java/com/baeldung/throwsexception/Main.java diff --git a/core-java/src/main/java/com/baeldung/throwsexception/PersonRepository.java b/core-java-lang/src/main/java/com/baeldung/throwsexception/PersonRepository.java similarity index 100% rename from core-java/src/main/java/com/baeldung/throwsexception/PersonRepository.java rename to core-java-lang/src/main/java/com/baeldung/throwsexception/PersonRepository.java diff --git a/core-java/src/main/java/com/baeldung/throwsexception/SimpleService.java b/core-java-lang/src/main/java/com/baeldung/throwsexception/SimpleService.java similarity index 100% rename from core-java/src/main/java/com/baeldung/throwsexception/SimpleService.java rename to core-java-lang/src/main/java/com/baeldung/throwsexception/SimpleService.java diff --git a/core-java/src/main/java/com/baeldung/throwsexception/TryCatch.java b/core-java-lang/src/main/java/com/baeldung/throwsexception/TryCatch.java similarity index 100% rename from core-java/src/main/java/com/baeldung/throwsexception/TryCatch.java rename to core-java-lang/src/main/java/com/baeldung/throwsexception/TryCatch.java diff --git a/core-java/src/main/java/com/baeldung/typeerasure/ArrayContentPrintUtil.java b/core-java-lang/src/main/java/com/baeldung/typeerasure/ArrayContentPrintUtil.java similarity index 100% rename from core-java/src/main/java/com/baeldung/typeerasure/ArrayContentPrintUtil.java rename to core-java-lang/src/main/java/com/baeldung/typeerasure/ArrayContentPrintUtil.java diff --git a/core-java/src/main/java/com/baeldung/typeerasure/BoundStack.java b/core-java-lang/src/main/java/com/baeldung/typeerasure/BoundStack.java similarity index 100% rename from core-java/src/main/java/com/baeldung/typeerasure/BoundStack.java rename to core-java-lang/src/main/java/com/baeldung/typeerasure/BoundStack.java diff --git a/core-java/src/main/java/com/baeldung/typeerasure/IntegerStack.java b/core-java-lang/src/main/java/com/baeldung/typeerasure/IntegerStack.java similarity index 100% rename from core-java/src/main/java/com/baeldung/typeerasure/IntegerStack.java rename to core-java-lang/src/main/java/com/baeldung/typeerasure/IntegerStack.java diff --git a/core-java/src/main/java/com/baeldung/typeerasure/Stack.java b/core-java-lang/src/main/java/com/baeldung/typeerasure/Stack.java similarity index 100% rename from core-java/src/main/java/com/baeldung/typeerasure/Stack.java rename to core-java-lang/src/main/java/com/baeldung/typeerasure/Stack.java diff --git a/core-java/src/main/resources/file.txt b/core-java-lang/src/main/resources/file.txt similarity index 100% rename from core-java/src/main/resources/file.txt rename to core-java-lang/src/main/resources/file.txt diff --git a/core-java/src/test/java/com/baeldung/binding/AnimalActivityUnitTest.java b/core-java-lang/src/test/java/com/baeldung/binding/AnimalActivityUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/binding/AnimalActivityUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/binding/AnimalActivityUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/binding/AnimalUnitTest.java b/core-java-lang/src/test/java/com/baeldung/binding/AnimalUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/binding/AnimalUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/binding/AnimalUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/binding/CatUnitTest.java b/core-java-lang/src/test/java/com/baeldung/binding/CatUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/binding/CatUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/binding/CatUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/breakcontinue/BreakContinueUnitTest.java b/core-java-lang/src/test/java/com/baeldung/breakcontinue/BreakContinueUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/breakcontinue/BreakContinueUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/breakcontinue/BreakContinueUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/casting/CastingUnitTest.java b/core-java-lang/src/test/java/com/baeldung/casting/CastingUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/casting/CastingUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/casting/CastingUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionUnitTest.java b/core-java-lang/src/test/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/comparable/ComparableUnitTest.java b/core-java-lang/src/test/java/com/baeldung/comparable/ComparableUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/comparable/ComparableUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/comparable/ComparableUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/comparator/ComparatorUnitTest.java b/core-java-lang/src/test/java/com/baeldung/comparator/ComparatorUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/comparator/ComparatorUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/comparator/ComparatorUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/comparator/Java8ComparatorUnitTest.java b/core-java-lang/src/test/java/com/baeldung/comparator/Java8ComparatorUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/comparator/Java8ComparatorUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/comparator/Java8ComparatorUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/customexception/IncorrectFileExtensionExceptionUnitTest.java b/core-java-lang/src/test/java/com/baeldung/customexception/IncorrectFileExtensionExceptionUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/customexception/IncorrectFileExtensionExceptionUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/customexception/IncorrectFileExtensionExceptionUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/customexception/IncorrectFileNameExceptionUnitTest.java b/core-java-lang/src/test/java/com/baeldung/customexception/IncorrectFileNameExceptionUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/customexception/IncorrectFileNameExceptionUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/customexception/IncorrectFileNameExceptionUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/deepcopy/DeepCopyUnitTest.java b/core-java-lang/src/test/java/com/baeldung/deepcopy/DeepCopyUnitTest.java similarity index 98% rename from core-java/src/test/java/com/baeldung/deepcopy/DeepCopyUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/deepcopy/DeepCopyUnitTest.java index 196b69fbf7..d6b1cd90b9 100644 --- a/core-java/src/test/java/com/baeldung/deepcopy/DeepCopyUnitTest.java +++ b/core-java-lang/src/test/java/com/baeldung/deepcopy/DeepCopyUnitTest.java @@ -4,7 +4,7 @@ import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; -import org.apache.commons.lang.SerializationUtils; +import org.apache.commons.lang3.SerializationUtils; import org.junit.Ignore; import org.junit.Test; diff --git a/core-java/src/test/java/com/baeldung/deepcopy/ShallowCopyUnitTest.java b/core-java-lang/src/test/java/com/baeldung/deepcopy/ShallowCopyUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/deepcopy/ShallowCopyUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/deepcopy/ShallowCopyUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/dynamicproxy/DynamicProxyIntegrationTest.java b/core-java-lang/src/test/java/com/baeldung/dynamicproxy/DynamicProxyIntegrationTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/dynamicproxy/DynamicProxyIntegrationTest.java rename to core-java-lang/src/test/java/com/baeldung/dynamicproxy/DynamicProxyIntegrationTest.java diff --git a/core-java/src/test/java/com/baeldung/enums/PizzaUnitTest.java b/core-java-lang/src/test/java/com/baeldung/enums/PizzaUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/enums/PizzaUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/enums/PizzaUnitTest.java diff --git a/core-java/src/test/java/org/baeldung/equalshashcode/entities/ComplexClassUnitTest.java b/core-java-lang/src/test/java/com/baeldung/equalshashcode/entities/ComplexClassUnitTest.java similarity index 95% rename from core-java/src/test/java/org/baeldung/equalshashcode/entities/ComplexClassUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/equalshashcode/entities/ComplexClassUnitTest.java index 680a6d57b5..0cb4ace0ab 100644 --- a/core-java/src/test/java/org/baeldung/equalshashcode/entities/ComplexClassUnitTest.java +++ b/core-java-lang/src/test/java/com/baeldung/equalshashcode/entities/ComplexClassUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.equalshashcode.entities; +package com.baeldung.equalshashcode.entities; import java.util.ArrayList; import java.util.HashSet; diff --git a/core-java/src/test/java/org/baeldung/equalshashcode/entities/PrimitiveClassUnitTest.java b/core-java-lang/src/test/java/com/baeldung/equalshashcode/entities/PrimitiveClassUnitTest.java similarity index 85% rename from core-java/src/test/java/org/baeldung/equalshashcode/entities/PrimitiveClassUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/equalshashcode/entities/PrimitiveClassUnitTest.java index f4e9f2b99f..457d7a2b5e 100644 --- a/core-java/src/test/java/org/baeldung/equalshashcode/entities/PrimitiveClassUnitTest.java +++ b/core-java-lang/src/test/java/com/baeldung/equalshashcode/entities/PrimitiveClassUnitTest.java @@ -1,10 +1,8 @@ -package org.baeldung.equalshashcode.entities; +package com.baeldung.equalshashcode.entities; import org.junit.Assert; import org.junit.Test; -import com.baeldung.equalshashcode.entities.PrimitiveClass; - public class PrimitiveClassUnitTest { @Test diff --git a/core-java/src/test/java/org/baeldung/equalshashcode/entities/SquareClassUnitTest.java b/core-java-lang/src/test/java/com/baeldung/equalshashcode/entities/SquareClassUnitTest.java similarity index 93% rename from core-java/src/test/java/org/baeldung/equalshashcode/entities/SquareClassUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/equalshashcode/entities/SquareClassUnitTest.java index 5c860bd62d..a25e8bd486 100644 --- a/core-java/src/test/java/org/baeldung/equalshashcode/entities/SquareClassUnitTest.java +++ b/core-java-lang/src/test/java/com/baeldung/equalshashcode/entities/SquareClassUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.equalshashcode.entities; +package com.baeldung.equalshashcode.entities; import java.awt.Color; diff --git a/core-java/src/test/java/com/baeldung/exceptionhandling/ExceptionsUnitTest.java b/core-java-lang/src/test/java/com/baeldung/exceptionhandling/ExceptionsUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/exceptionhandling/ExceptionsUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/exceptionhandling/ExceptionsUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/finalize/FinalizeUnitTest.java b/core-java-lang/src/test/java/com/baeldung/finalize/FinalizeUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/finalize/FinalizeUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/finalize/FinalizeUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/finalkeyword/FinalUnitTest.java b/core-java-lang/src/test/java/com/baeldung/finalkeyword/FinalUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/finalkeyword/FinalUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/finalkeyword/FinalUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/generics/GenericsUnitTest.java b/core-java-lang/src/test/java/com/baeldung/generics/GenericsUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/generics/GenericsUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/generics/GenericsUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/hashcode/application/ApplicationUnitTest.java b/core-java-lang/src/test/java/com/baeldung/hashcode/application/ApplicationUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/hashcode/application/ApplicationUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/hashcode/application/ApplicationUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/hashcode/entities/UserUnitTest.java b/core-java-lang/src/test/java/com/baeldung/hashcode/entities/UserUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/hashcode/entities/UserUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/hashcode/entities/UserUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/immutableobjects/ImmutableObjectsUnitTest.java b/core-java-lang/src/test/java/com/baeldung/immutableobjects/ImmutableObjectsUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/immutableobjects/ImmutableObjectsUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/immutableobjects/ImmutableObjectsUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/inheritance/AppUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritance/AppUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritance/AppUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritance/AppUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/inheritancecomposition/test/ActressUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/ActressUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritancecomposition/test/ActressUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/ActressUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/inheritancecomposition/test/CompositionUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/CompositionUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritancecomposition/test/CompositionUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/CompositionUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/inheritancecomposition/test/InheritanceUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/InheritanceUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritancecomposition/test/InheritanceUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/InheritanceUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/inheritancecomposition/test/PersonUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/PersonUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritancecomposition/test/PersonUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/PersonUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/inheritancecomposition/test/WaitressUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/WaitressUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritancecomposition/test/WaitressUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/WaitressUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/initializationguide/UserUnitTest.java b/core-java-lang/src/test/java/com/baeldung/initializationguide/UserUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/initializationguide/UserUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/initializationguide/UserUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/interfaces/InnerInterfaceUnitTest.java b/core-java-lang/src/test/java/com/baeldung/interfaces/InnerInterfaceUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/interfaces/InnerInterfaceUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/interfaces/InnerInterfaceUnitTest.java diff --git a/core-java/src/test/java/org/baeldung/java/diamond/Car.java b/core-java-lang/src/test/java/com/baeldung/java/diamond/Car.java similarity index 64% rename from core-java/src/test/java/org/baeldung/java/diamond/Car.java rename to core-java-lang/src/test/java/com/baeldung/java/diamond/Car.java index 9f923e0f3b..a680c4e670 100644 --- a/core-java/src/test/java/org/baeldung/java/diamond/Car.java +++ b/core-java-lang/src/test/java/com/baeldung/java/diamond/Car.java @@ -1,4 +1,4 @@ -package org.baeldung.java.diamond; +package com.baeldung.java.diamond; public class Car implements Vehicle { diff --git a/core-java/src/test/java/org/baeldung/java/diamond/DiamondOperatorUnitTest.java b/core-java-lang/src/test/java/com/baeldung/java/diamond/DiamondOperatorUnitTest.java similarity index 88% rename from core-java/src/test/java/org/baeldung/java/diamond/DiamondOperatorUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/java/diamond/DiamondOperatorUnitTest.java index f6c7f7162f..ee5f639926 100644 --- a/core-java/src/test/java/org/baeldung/java/diamond/DiamondOperatorUnitTest.java +++ b/core-java-lang/src/test/java/com/baeldung/java/diamond/DiamondOperatorUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java.diamond; +package com.baeldung.java.diamond; import static org.junit.Assert.assertNotNull; diff --git a/core-java/src/test/java/org/baeldung/java/diamond/Diesel.java b/core-java-lang/src/test/java/com/baeldung/java/diamond/Diesel.java similarity index 78% rename from core-java/src/test/java/org/baeldung/java/diamond/Diesel.java rename to core-java-lang/src/test/java/com/baeldung/java/diamond/Diesel.java index dc4256cdae..90eb7d9340 100644 --- a/core-java/src/test/java/org/baeldung/java/diamond/Diesel.java +++ b/core-java-lang/src/test/java/com/baeldung/java/diamond/Diesel.java @@ -1,4 +1,4 @@ -package org.baeldung.java.diamond; +package com.baeldung.java.diamond; public class Diesel implements Engine { diff --git a/core-java/src/test/java/org/baeldung/java/diamond/Engine.java b/core-java-lang/src/test/java/com/baeldung/java/diamond/Engine.java similarity index 56% rename from core-java/src/test/java/org/baeldung/java/diamond/Engine.java rename to core-java-lang/src/test/java/com/baeldung/java/diamond/Engine.java index c18a8f64b5..746baf3254 100644 --- a/core-java/src/test/java/org/baeldung/java/diamond/Engine.java +++ b/core-java-lang/src/test/java/com/baeldung/java/diamond/Engine.java @@ -1,4 +1,4 @@ -package org.baeldung.java.diamond; +package com.baeldung.java.diamond; public interface Engine { diff --git a/core-java/src/test/java/org/baeldung/java/diamond/Vehicle.java b/core-java-lang/src/test/java/com/baeldung/java/diamond/Vehicle.java similarity index 58% rename from core-java/src/test/java/org/baeldung/java/diamond/Vehicle.java rename to core-java-lang/src/test/java/com/baeldung/java/diamond/Vehicle.java index f61cf59620..8395cdd970 100644 --- a/core-java/src/test/java/org/baeldung/java/diamond/Vehicle.java +++ b/core-java-lang/src/test/java/com/baeldung/java/diamond/Vehicle.java @@ -1,4 +1,4 @@ -package org.baeldung.java.diamond; +package com.baeldung.java.diamond; public interface Vehicle { diff --git a/core-java/src/test/java/com/baeldung/java/doublebrace/DoubleBraceUnitTest.java b/core-java-lang/src/test/java/com/baeldung/java/doublebrace/DoubleBraceUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/java/doublebrace/DoubleBraceUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/java/doublebrace/DoubleBraceUnitTest.java diff --git a/core-java/src/main/java/com/baeldung/java/enumiteration/DaysOfWeekEnum.java b/core-java-lang/src/test/java/com/baeldung/java/enumiteration/DaysOfWeekEnum.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/enumiteration/DaysOfWeekEnum.java rename to core-java-lang/src/test/java/com/baeldung/java/enumiteration/DaysOfWeekEnum.java diff --git a/core-java/src/main/java/com/baeldung/java/enumiteration/EnumIterationExamples.java b/core-java-lang/src/test/java/com/baeldung/java/enumiteration/EnumIterationExamples.java similarity index 100% rename from core-java/src/main/java/com/baeldung/java/enumiteration/EnumIterationExamples.java rename to core-java-lang/src/test/java/com/baeldung/java/enumiteration/EnumIterationExamples.java diff --git a/core-java/src/test/java/com/baeldung/java/reflection/OperationsUnitTest.java b/core-java-lang/src/test/java/com/baeldung/java/reflection/OperationsUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/java/reflection/OperationsUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/java/reflection/OperationsUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/java/reflection/ReflectionUnitTest.java b/core-java-lang/src/test/java/com/baeldung/java/reflection/ReflectionUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/java/reflection/ReflectionUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/java/reflection/ReflectionUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/loops/WhenUsingLoops.java b/core-java-lang/src/test/java/com/baeldung/loops/WhenUsingLoops.java similarity index 100% rename from core-java/src/test/java/com/baeldung/loops/WhenUsingLoops.java rename to core-java-lang/src/test/java/com/baeldung/loops/WhenUsingLoops.java diff --git a/core-java/src/test/java/com/baeldung/methodoverloadingoverriding/test/MethodOverloadingUnitTest.java b/core-java-lang/src/test/java/com/baeldung/methodoverloadingoverriding/test/MethodOverloadingUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/methodoverloadingoverriding/test/MethodOverloadingUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/methodoverloadingoverriding/test/MethodOverloadingUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/methodoverloadingoverriding/test/MethodOverridingUnitTest.java b/core-java-lang/src/test/java/com/baeldung/methodoverloadingoverriding/test/MethodOverridingUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/methodoverloadingoverriding/test/MethodOverridingUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/methodoverloadingoverriding/test/MethodOverridingUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/modulo/ModuloUnitTest.java b/core-java-lang/src/test/java/com/baeldung/modulo/ModuloUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/modulo/ModuloUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/modulo/ModuloUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/nestedclass/AnonymousInner.java b/core-java-lang/src/test/java/com/baeldung/nestedclass/AnonymousInner.java similarity index 100% rename from core-java/src/test/java/com/baeldung/nestedclass/AnonymousInner.java rename to core-java-lang/src/test/java/com/baeldung/nestedclass/AnonymousInner.java diff --git a/core-java/src/test/java/com/baeldung/nestedclass/Enclosing.java b/core-java-lang/src/test/java/com/baeldung/nestedclass/Enclosing.java similarity index 100% rename from core-java/src/test/java/com/baeldung/nestedclass/Enclosing.java rename to core-java-lang/src/test/java/com/baeldung/nestedclass/Enclosing.java diff --git a/core-java/src/test/java/com/baeldung/nestedclass/NewEnclosing.java b/core-java-lang/src/test/java/com/baeldung/nestedclass/NewEnclosing.java similarity index 100% rename from core-java/src/test/java/com/baeldung/nestedclass/NewEnclosing.java rename to core-java-lang/src/test/java/com/baeldung/nestedclass/NewEnclosing.java diff --git a/core-java/src/test/java/com/baeldung/nestedclass/NewOuter.java b/core-java-lang/src/test/java/com/baeldung/nestedclass/NewOuter.java similarity index 100% rename from core-java/src/test/java/com/baeldung/nestedclass/NewOuter.java rename to core-java-lang/src/test/java/com/baeldung/nestedclass/NewOuter.java diff --git a/core-java/src/test/java/com/baeldung/nestedclass/Outer.java b/core-java-lang/src/test/java/com/baeldung/nestedclass/Outer.java similarity index 100% rename from core-java/src/test/java/com/baeldung/nestedclass/Outer.java rename to core-java-lang/src/test/java/com/baeldung/nestedclass/Outer.java diff --git a/core-java/src/test/java/com/baeldung/noclassdeffounderror/NoClassDefFoundErrorUnitTest.java b/core-java-lang/src/test/java/com/baeldung/noclassdeffounderror/NoClassDefFoundErrorUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/noclassdeffounderror/NoClassDefFoundErrorUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/noclassdeffounderror/NoClassDefFoundErrorUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/parameterpassing/NonPrimitivesUnitTest.java b/core-java-lang/src/test/java/com/baeldung/parameterpassing/NonPrimitivesUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/parameterpassing/NonPrimitivesUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/parameterpassing/NonPrimitivesUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/parameterpassing/PrimitivesUnitTest.java b/core-java-lang/src/test/java/com/baeldung/parameterpassing/PrimitivesUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/parameterpassing/PrimitivesUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/parameterpassing/PrimitivesUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/polymorphism/PolymorphismUnitTest.java b/core-java-lang/src/test/java/com/baeldung/polymorphism/PolymorphismUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/polymorphism/PolymorphismUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/polymorphism/PolymorphismUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/PrimitiveConversionsJUnitTest.java b/core-java-lang/src/test/java/com/baeldung/primitiveconversion/PrimitiveConversionsJUnitTest.java similarity index 99% rename from core-java/src/test/java/com/baeldung/PrimitiveConversionsJUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/primitiveconversion/PrimitiveConversionsJUnitTest.java index 69a6c18dfd..cb83f4a5ed 100644 --- a/core-java/src/test/java/com/baeldung/PrimitiveConversionsJUnitTest.java +++ b/core-java-lang/src/test/java/com/baeldung/primitiveconversion/PrimitiveConversionsJUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung; +package com.baeldung.primitiveconversion; import org.junit.Test; import org.slf4j.Logger; diff --git a/core-java/src/test/java/com/baeldung/recursion/RecursionExampleUnitTest.java b/core-java-lang/src/test/java/com/baeldung/recursion/RecursionExampleUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/recursion/RecursionExampleUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/recursion/RecursionExampleUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/sneakythrows/SneakyRunnableUnitTest.java b/core-java-lang/src/test/java/com/baeldung/sneakythrows/SneakyRunnableUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/sneakythrows/SneakyRunnableUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/sneakythrows/SneakyRunnableUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/sneakythrows/SneakyThrowsUnitTest.java b/core-java-lang/src/test/java/com/baeldung/sneakythrows/SneakyThrowsUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/sneakythrows/SneakyThrowsUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/sneakythrows/SneakyThrowsUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/stackoverflowerror/AccountHolderManualTest.java b/core-java-lang/src/test/java/com/baeldung/stackoverflowerror/AccountHolderManualTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/stackoverflowerror/AccountHolderManualTest.java rename to core-java-lang/src/test/java/com/baeldung/stackoverflowerror/AccountHolderManualTest.java diff --git a/core-java/src/test/java/com/baeldung/stackoverflowerror/CyclicDependancyManualTest.java b/core-java-lang/src/test/java/com/baeldung/stackoverflowerror/CyclicDependancyManualTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/stackoverflowerror/CyclicDependancyManualTest.java rename to core-java-lang/src/test/java/com/baeldung/stackoverflowerror/CyclicDependancyManualTest.java diff --git a/core-java/src/test/java/com/baeldung/stackoverflowerror/InfiniteRecursionWithTerminationConditionManualTest.java b/core-java-lang/src/test/java/com/baeldung/stackoverflowerror/InfiniteRecursionWithTerminationConditionManualTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/stackoverflowerror/InfiniteRecursionWithTerminationConditionManualTest.java rename to core-java-lang/src/test/java/com/baeldung/stackoverflowerror/InfiniteRecursionWithTerminationConditionManualTest.java diff --git a/core-java/src/test/java/com/baeldung/stackoverflowerror/RecursionWithCorrectTerminationConditionManualTest.java b/core-java-lang/src/test/java/com/baeldung/stackoverflowerror/RecursionWithCorrectTerminationConditionManualTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/stackoverflowerror/RecursionWithCorrectTerminationConditionManualTest.java rename to core-java-lang/src/test/java/com/baeldung/stackoverflowerror/RecursionWithCorrectTerminationConditionManualTest.java diff --git a/core-java/src/test/java/com/baeldung/stackoverflowerror/UnintendedInfiniteRecursionManualTest.java b/core-java-lang/src/test/java/com/baeldung/stackoverflowerror/UnintendedInfiniteRecursionManualTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/stackoverflowerror/UnintendedInfiniteRecursionManualTest.java rename to core-java-lang/src/test/java/com/baeldung/stackoverflowerror/UnintendedInfiniteRecursionManualTest.java diff --git a/core-java/src/test/java/com/baeldung/staticdemo/CarIntegrationTest.java b/core-java-lang/src/test/java/com/baeldung/staticdemo/CarIntegrationTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/staticdemo/CarIntegrationTest.java rename to core-java-lang/src/test/java/com/baeldung/staticdemo/CarIntegrationTest.java diff --git a/core-java/src/test/java/com/baeldung/staticdemo/SingletonIntegrationTest.java b/core-java-lang/src/test/java/com/baeldung/staticdemo/SingletonIntegrationTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/staticdemo/SingletonIntegrationTest.java rename to core-java-lang/src/test/java/com/baeldung/staticdemo/SingletonIntegrationTest.java diff --git a/core-java/src/test/java/com/baeldung/staticdemo/StaticBlockIntegrationTest.java b/core-java-lang/src/test/java/com/baeldung/staticdemo/StaticBlockIntegrationTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/staticdemo/StaticBlockIntegrationTest.java rename to core-java-lang/src/test/java/com/baeldung/staticdemo/StaticBlockIntegrationTest.java diff --git a/core-java/src/test/java/com/baeldung/switchstatement/SwitchStatementUnitTest.java b/core-java-lang/src/test/java/com/baeldung/switchstatement/SwitchStatementUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/switchstatement/SwitchStatementUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/switchstatement/SwitchStatementUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/synthetic/SyntheticUnitTest.java b/core-java-lang/src/test/java/com/baeldung/synthetic/SyntheticUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/synthetic/SyntheticUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/synthetic/SyntheticUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/system/DateTimeServiceUnitTest.java b/core-java-lang/src/test/java/com/baeldung/system/DateTimeServiceUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/system/DateTimeServiceUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/system/DateTimeServiceUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/system/EnvironmentVariablesUnitTest.java b/core-java-lang/src/test/java/com/baeldung/system/EnvironmentVariablesUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/system/EnvironmentVariablesUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/system/EnvironmentVariablesUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/system/SystemArrayCopyUnitTest.java b/core-java-lang/src/test/java/com/baeldung/system/SystemArrayCopyUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/system/SystemArrayCopyUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/system/SystemArrayCopyUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/system/SystemNanoUnitTest.java b/core-java-lang/src/test/java/com/baeldung/system/SystemNanoUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/system/SystemNanoUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/system/SystemNanoUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/system/SystemPropertiesUnitTest.java b/core-java-lang/src/test/java/com/baeldung/system/SystemPropertiesUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/system/SystemPropertiesUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/system/SystemPropertiesUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/ternaryoperator/TernaryOperatorUnitTest.java b/core-java-lang/src/test/java/com/baeldung/ternaryoperator/TernaryOperatorUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/ternaryoperator/TernaryOperatorUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/ternaryoperator/TernaryOperatorUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/throwsexception/SimpleServiceUnitTest.java b/core-java-lang/src/test/java/com/baeldung/throwsexception/SimpleServiceUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/throwsexception/SimpleServiceUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/throwsexception/SimpleServiceUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/typeerasure/TypeErasureUnitTest.java b/core-java-lang/src/test/java/com/baeldung/typeerasure/TypeErasureUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/typeerasure/TypeErasureUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/typeerasure/TypeErasureUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/varargs/FormatterUnitTest.java b/core-java-lang/src/test/java/com/baeldung/varargs/FormatterUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/varargs/FormatterUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/varargs/FormatterUnitTest.java diff --git a/core-java/src/test/resources/correctFileNameWithoutProperExtension b/core-java-lang/src/test/resources/correctFileNameWithoutProperExtension similarity index 100% rename from core-java/src/test/resources/correctFileNameWithoutProperExtension rename to core-java-lang/src/test/resources/correctFileNameWithoutProperExtension diff --git a/core-java/README.md b/core-java/README.md index 627535d1e5..2be137add6 100644 --- a/core-java/README.md +++ b/core-java/README.md @@ -6,104 +6,56 @@ - [Java Timer](http://www.baeldung.com/java-timer-and-timertask) - [How to Run a Shell Command in Java](http://www.baeldung.com/run-shell-command-in-java) - [MD5 Hashing in Java](http://www.baeldung.com/java-md5) -- [Guide to Java Reflection](http://www.baeldung.com/java-reflection) - [A Guide to Java Sockets](http://www.baeldung.com/a-guide-to-java-sockets) -- [Java – Try with Resources](http://www.baeldung.com/java-try-with-resources) - [Guide to the Fork/Join Framework in Java](http://www.baeldung.com/java-fork-join) - [How to Print Screen in Java](http://www.baeldung.com/print-screen-in-java) -- [Introduction to Java Generics](http://www.baeldung.com/java-generics) -- [Generate equals() and hashCode() with Eclipse](http://www.baeldung.com/java-eclipse-equals-and-hashcode) - [A Guide To Java Regular Expressions API](http://www.baeldung.com/regular-expressions-java) - [Sorting in Java](http://www.baeldung.com/java-sorting) - [Getting Started with Java Properties](http://www.baeldung.com/java-properties) -- [Grep in Java](http://www.baeldung.com/grep-in-java) -- [Simulated Annealing for Travelling Salesman Problem](http://www.baeldung.com/java-simulated-annealing-for-traveling-salesman) -- [Slope One Algorithm: Collaborative Filtering Recommendation Systems](http://www.baeldung.com/java-collaborative-filtering-recommendations) - [Pattern Search with Grep in Java](http://www.baeldung.com/grep-in-java) - [URL Encoding and Decoding in Java](http://www.baeldung.com/java-url-encoding-decoding) -- [The Basics of Java Generics](http://www.baeldung.com/java-generics) -- [The Traveling Salesman Problem in Java](http://www.baeldung.com/java-simulated-annealing-for-traveling-salesman) - [How to Create an Executable JAR with Maven](http://www.baeldung.com/executable-jar-with-maven) - [How to Design a Genetic Algorithm in Java](http://www.baeldung.com/java-genetic-algorithm) - [Basic Introduction to JMX](http://www.baeldung.com/java-management-extensions) - [AWS Lambda With Java](http://www.baeldung.com/java-aws-lambda) - [Introduction to Nashorn](http://www.baeldung.com/java-nashorn) -- [Chained Exceptions in Java](http://www.baeldung.com/java-chained-exceptions) -- [Java Primitive Conversions](http://www.baeldung.com/java-primitive-conversions) - [Java Money and the Currency API](http://www.baeldung.com/java-money-and-currency) - [JVM Log Forging](http://www.baeldung.com/jvm-log-forging) - [Guide to sun.misc.Unsafe](http://www.baeldung.com/java-unsafe) - [How to Perform a Simple HTTP Request in Java](http://www.baeldung.com/java-http-request) -- [Call Methods at Runtime Using Java Reflection](http://www.baeldung.com/java-method-reflection) - [How to Add a Single Element to a Stream](http://www.baeldung.com/java-stream-append-prepend) -- [Iterating Over Enum Values in Java](http://www.baeldung.com/java-enum-iteration) - [Kotlin Java Interoperability](http://www.baeldung.com/kotlin-java-interoperability) -- [Changing Annotation Parameters At Runtime](http://www.baeldung.com/java-reflection-change-annotation-params) - [How to Find all Getters Returning Null](http://www.baeldung.com/java-getters-returning-null) -- [Changing the Order in a Sum Operation Can Produce Different Results?](http://www.baeldung.com/java-floating-point-sum-order) - [How to Get a Name of a Method Being Executed?](http://www.baeldung.com/java-name-of-executing-method) -- [Dynamic Proxies in Java](http://www.baeldung.com/java-dynamic-proxies) -- [How to Copy an Array in Java](http://www.baeldung.com/java-array-copy) - [Converting a Stack Trace to a String in Java](http://www.baeldung.com/java-stacktrace-to-string) -- [Java Double Brace Initialization](http://www.baeldung.com/java-double-brace-initialization) -- [The StackOverflowError in Java](http://www.baeldung.com/java-stack-overflow-error) - [Introduction to Java Serialization](http://www.baeldung.com/java-serialization) -- [ClassNotFoundException vs NoClassDefFoundError](http://www.baeldung.com/java-classnotfoundexception-and-noclassdeffounderror) - [Guide to UUID in Java](http://www.baeldung.com/java-uuid) - [Guide to Escaping Characters in Java RegExps](http://www.baeldung.com/java-regexp-escape-char) -- [Guide to hashCode() in Java](http://www.baeldung.com/java-hashcode) - [Difference between URL and URI](http://www.baeldung.com/java-url-vs-uri) - [Broadcasting and Multicasting in Java](http://www.baeldung.com/java-broadcast-multicast) - [Period and Duration in Java](http://www.baeldung.com/java-period-duration) -- [Guide to the Diamond Operator in Java](http://www.baeldung.com/java-diamond-operator) -- [“Sneaky Throws” in Java](http://www.baeldung.com/java-sneaky-throws) - [OutOfMemoryError: GC Overhead Limit Exceeded](http://www.baeldung.com/java-gc-overhead-limit-exceeded) - [Creating a Java Compiler Plugin](http://www.baeldung.com/java-build-compiler-plugin) -- [A Guide to the Static Keyword in Java](http://www.baeldung.com/java-static) -- [Initializing Arrays in Java](http://www.baeldung.com/java-initialize-array) -- [Quick Example - Comparator vs Comparable in Java](http://www.baeldung.com/java-comparator-comparable) - [Quick Guide to Java Stack](http://www.baeldung.com/java-stack) -- [The Java continue and break Keywords](http://www.baeldung.com/java-continue-and-break) - [Guide to java.util.Formatter](http://www.baeldung.com/java-string-formatter) -- [Check if a Java Array Contains a Value](http://www.baeldung.com/java-array-contains-value) -- [How to Invert an Array in Java](http://www.baeldung.com/java-invert-array) - [Guide to the Cipher Class](http://www.baeldung.com/java-cipher-class) -- [A Guide to Java Initialization](http://www.baeldung.com/java-initialization) - [Implementing a Binary Tree in Java](http://www.baeldung.com/java-binary-tree) - [A Guide to ThreadLocalRandom in Java](http://www.baeldung.com/java-thread-local-random) -- [Nested Classes in Java](http://www.baeldung.com/java-nested-classes) -- [A Guide to Java Loops](http://www.baeldung.com/java-loops) -- [Varargs in Java](http://www.baeldung.com/java-varargs) -- [A Guide to Inner Interfaces in Java](http://www.baeldung.com/java-inner-interfaces) -- [Polymorphism in Java](http://www.baeldung.com/java-polymorphism) -- [Recursion In Java](http://www.baeldung.com/java-recursion) -- [A Guide to the finalize Method in Java](http://www.baeldung.com/java-finalize) - [Compiling Java *.class Files with javac](http://www.baeldung.com/javac) -- [Method Overloading and Overriding in Java](http://www.baeldung.com/java-method-overload-override) -- [Guide to ThreadLocalRandom in Java](http://www.baeldung.com/java-thread-local-random) - [A Guide to Iterator in Java](http://www.baeldung.com/java-iterator) - [The Trie Data Structure in Java](http://www.baeldung.com/trie-java) - [Introduction to Javadoc](http://www.baeldung.com/javadoc) -- [How to Make a Deep Copy of an Object in Java](http://www.baeldung.com/java-deep-copy) -- [Guide to Inheritance in Java](http://www.baeldung.com/java-inheritance) - [Guide to Externalizable Interface in Java](http://www.baeldung.com/java-externalizable) -- [Object Type Casting in Java](http://www.baeldung.com/java-type-casting) - [A Practical Guide to DecimalFormat](http://www.baeldung.com/java-decimalformat) - [How to Detect the OS Using Java](http://www.baeldung.com/java-detect-os) - [ASCII Art in Java](http://www.baeldung.com/ascii-art-in-java) -- [Inheritance and Composition (Is-a vs Has-a relationship) in Java](http://www.baeldung.com/java-inheritance-composition) - [Finding Max/Min of a List or Collection](http://www.baeldung.com/java-collection-min-max) -- [The "final" Keyword in Java](http://www.baeldung.com/java-final) - [What is the serialVersionUID?](http://www.baeldung.com/java-serial-version-uid) - [A Guide To UDP In Java](http://www.baeldung.com/udp-in-java) - [A Guide to the Java LinkedList](http://www.baeldung.com/java-linkedlist) -- [A Guide to Java Enums](http://www.baeldung.com/a-guide-to-java-enums) - [A Guide to the ResourceBundle](http://www.baeldung.com/java-resourcebundle) -- [Quick Guide to java.lang.System](http://www.baeldung.com/java-lang-system) - [Class Loaders in Java](http://www.baeldung.com/java-classloaders) -- [Find Sum and Average in a Java Array](http://www.baeldung.com/java-array-sum-average) - [Java List UnsupportedOperationException](http://www.baeldung.com/java-list-unsupported-operation-exception) -- [Type Erasure in Java Explained](http://www.baeldung.com/java-type-erasure) - [Join and Split Arrays and Collections in Java](http://www.baeldung.com/java-join-and-split) - [Check If Two Lists are Equal in Java](http://www.baeldung.com/java-test-a-list-for-ordinality-and-equality) - [Sending Emails with Java](http://www.baeldung.com/java-email) @@ -111,12 +63,6 @@ - [Java KeyStore API](http://www.baeldung.com/java-keystore) - [Double-Checked Locking with Singleton](http://www.baeldung.com/java-singleton-double-checked-locking) - [Guide to Java Clock Class](http://www.baeldung.com/java-clock) -- [Infinite Loops in Java](http://www.baeldung.com/infinite-loops-java) -- [Using Java Assertions](http://www.baeldung.com/java-assert) -- [Pass-By-Value as a Parameter Passing Mechanism in Java](http://www.baeldung.com/java-pass-by-value-or-pass-by-reference) -- [Variable and Method Hiding in Java](http://www.baeldung.com/java-variable-method-hiding) -- [Access Modifiers in Java](http://www.baeldung.com/java-access-modifiers) -- [Infinite Loops in Java](http://www.baeldung.com/infinite-loops-java) - [Introduction to Creational Design Patterns](http://www.baeldung.com/creational-design-patterns) - [Proxy, Decorator, Adapter and Bridge Patterns](http://www.baeldung.com/java-structural-design-patterns) - [Singletons in Java](http://www.baeldung.com/java-singleton) @@ -124,38 +70,26 @@ - [The Observer Pattern in Java](http://www.baeldung.com/java-observer-pattern) - [Service Locator Pattern](http://www.baeldung.com/java-service-locator-pattern) - [The Thread.join() Method in Java](http://www.baeldung.com/java-thread-join) -- [Guide to the super Java Keyword](http://www.baeldung.com/java-super) -- [Guide to the this Java Keyword](http://www.baeldung.com/java-this) -- [Jagged Arrays In Java](http://www.baeldung.com/java-jagged-arrays) - [Importance of Main Manifest Attribute in a Self-Executing JAR](http://www.baeldung.com/java-jar-executable-manifest-main-class) - [How to Get the File Extension of a File in Java](http://www.baeldung.com/java-file-extension) -- [Immutable Objects in Java](http://www.baeldung.com/java-immutable-object) - [Console I/O in Java](http://www.baeldung.com/java-console-input-output) -- [Guide to the java.util.Arrays Class](http://www.baeldung.com/java-util-arrays) -- [Create a Custom Exception in Java](http://www.baeldung.com/java-new-custom-exception) - [Java Global Exception Handler](http://www.baeldung.com/java-global-exception-handler) - [Encrypting and Decrypting Files in Java](http://www.baeldung.com/java-cipher-input-output-stream) - [How to Get the Size of an Object in Java](http://www.baeldung.com/java-size-of-object) -- [Exception Handling in Java](http://www.baeldung.com/java-exceptions) - [Guide to Java Instrumentation](http://www.baeldung.com/java-instrumentation) - [Getting a File’s Mime Type in Java](http://www.baeldung.com/java-file-mime-type) - [Common Java Exceptions](http://www.baeldung.com/java-common-exceptions) - [Java Constructors vs Static Factory Methods](https://www.baeldung.com/java-constructors-vs-static-factory-methods) -- [Differences Between Final, Finally and Finalize in Java](https://www.baeldung.com/java-final-finally-finalize) -- [Static and Dynamic Binding in Java](https://www.baeldung.com/java-static-dynamic-binding) - [Java List Initialization in One Line](https://www.baeldung.com/java-init-list-one-line) -- [Difference Between Throw and Throws in Java](https://www.baeldung.com/java-throw-throws) - [ClassCastException: Arrays$ArrayList cannot be cast to ArrayList](https://www.baeldung.com/java-classcastexception-arrays-arraylist) - [Throw Exception in Optional in Java 8](https://www.baeldung.com/java-optional-throw-exception) - [Add a Character to a String at a Given Position](https://www.baeldung.com/java-add-character-to-string) -- [Synthetic Constructs in Java](https://www.baeldung.com/java-synthetic) - [Calculating the nth Root in Java](https://www.baeldung.com/java-nth-root) - [Convert Double to String, Removing Decimal Places](https://www.baeldung.com/java-double-to-string) - [Different Ways to Capture Java Heap Dumps](https://www.baeldung.com/java-heap-dump-capture) -- [How to Separate Double into Integer and Decimal Parts](https://www.baeldung.com/java-separate-double-into-integer-decimal-parts) - [ZoneOffset in Java](https://www.baeldung.com/java-zone-offset) - [Hashing a Password in Java](https://www.baeldung.com/java-password-hashing) -- [Java Switch Statement](https://www.baeldung.com/java-switch) -- [The Modulo Operator in Java](https://www.baeldung.com/modulo-java) -- [Ternary Operator In Java](https://www.baeldung.com/java-ternary-operator) - [Merging java.util.Properties Objects](https://www.baeldung.com/java-merging-properties) +- [Understanding Memory Leaks in Java](https://www.baeldung.com/java-memory-leaks) +- [A Guide to SimpleDateFormat](https://www.baeldung.com/java-simple-date-format) +- [SSL Handshake Failures](https://www.baeldung.com/java-ssl-handshake-failures) diff --git a/core-java/pom.xml b/core-java/pom.xml index 477a01375d..9fbc8f6810 100644 --- a/core-java/pom.xml +++ b/core-java/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - com.baeldung core-java 0.1.0-SNAPSHOT jar @@ -157,7 +156,7 @@ com.sun tools - 1.8.0 + ${sun.tools.version} system ${java.home}/../lib/tools.jar @@ -173,21 +172,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - - **/*LiveTest.java - **/*IntegrationTest.java - **/*IntTest.java - **/*LongRunningUnitTest.java - **/*ManualTest.java - - true - - - org.apache.maven.plugins maven-dependency-plugin @@ -542,6 +526,7 @@ 0.1.5 3.21.0-GA + + 1.8.0 - diff --git a/core-java/src/main/java/com/baeldung/abstractclasses/application/Application.java b/core-java/src/main/java/com/baeldung/abstractclasses/application/Application.java new file mode 100644 index 0000000000..fe30c66484 --- /dev/null +++ b/core-java/src/main/java/com/baeldung/abstractclasses/application/Application.java @@ -0,0 +1,30 @@ +package com.baeldung.abstractclasses.application; + +import com.baeldung.abstractclasses.filereaders.BaseFileReader; +import com.baeldung.abstractclasses.filereaders.LowercaseFileReader; +import com.baeldung.abstractclasses.filereaders.StandardFileReader; +import com.baeldung.abstractclasses.filereaders.UppercaseFileReader; +import java.io.IOException; + +public class Application { + + public static void main(String[] args) throws IOException { + + Application application = new Application(); + String filePath = application.getFilePathFromResourcesFolder("files/test.txt"); + + BaseFileReader lowercaseFileReader = new LowercaseFileReader(filePath); + lowercaseFileReader.readFile().forEach(line -> System.out.println(line)); + + BaseFileReader upperCaseFileReader = new UppercaseFileReader(filePath); + upperCaseFileReader.readFile().forEach(line -> System.out.println(line)); + + BaseFileReader standardFileReader = new StandardFileReader(filePath); + standardFileReader.readFile().forEach(line -> System.out.println(line)); + + } + + private String getFilePathFromResourcesFolder(String fileName) { + return getClass().getClassLoader().getResource(fileName).getPath().substring(1); + } +} diff --git a/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/BaseFileReader.java b/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/BaseFileReader.java new file mode 100644 index 0000000000..659913f046 --- /dev/null +++ b/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/BaseFileReader.java @@ -0,0 +1,19 @@ +package com.baeldung.abstractclasses.filereaders; + +import java.io.IOException; +import java.util.List; + +public abstract class BaseFileReader { + + protected String filePath; + + protected BaseFileReader(String filePath) { + this.filePath = filePath; + } + + public String getFilePath() { + return filePath; + } + + public abstract List readFile() throws IOException; +} diff --git a/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/LowercaseFileReader.java b/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/LowercaseFileReader.java new file mode 100644 index 0000000000..0bbef45eb8 --- /dev/null +++ b/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/LowercaseFileReader.java @@ -0,0 +1,21 @@ +package com.baeldung.abstractclasses.filereaders; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; + +public class LowercaseFileReader extends BaseFileReader { + + public LowercaseFileReader(String filePath) { + super(filePath); + } + + @Override + public List readFile() throws IOException { + return Files.lines(Paths.get(filePath)) + .map(String::toLowerCase) + .collect(Collectors.toList()); + } +} diff --git a/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/StandardFileReader.java b/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/StandardFileReader.java new file mode 100644 index 0000000000..0a90d53c38 --- /dev/null +++ b/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/StandardFileReader.java @@ -0,0 +1,19 @@ +package com.baeldung.abstractclasses.filereaders; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; + +public class StandardFileReader extends BaseFileReader { + + public StandardFileReader(String filePath) { + super(filePath); + } + + @Override + public List readFile() throws IOException { + return Files.lines(Paths.get(filePath)).collect(Collectors.toList()); + } +} diff --git a/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/UppercaseFileReader.java b/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/UppercaseFileReader.java new file mode 100644 index 0000000000..4e8f150964 --- /dev/null +++ b/core-java/src/main/java/com/baeldung/abstractclasses/filereaders/UppercaseFileReader.java @@ -0,0 +1,21 @@ +package com.baeldung.abstractclasses.filereaders; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.List; +import java.util.stream.Collectors; + +public class UppercaseFileReader extends BaseFileReader { + + public UppercaseFileReader(String filePath) { + super(filePath); + } + + @Override + public List readFile() throws IOException { + return Files.lines(Paths.get(filePath)) + .map(String::toUpperCase) + .collect(Collectors.toList()); + } +} diff --git a/core-java/src/main/java/com/baeldung/area/circle/Circle.java b/core-java/src/main/java/com/baeldung/area/circle/Circle.java new file mode 100644 index 0000000000..40eed079e4 --- /dev/null +++ b/core-java/src/main/java/com/baeldung/area/circle/Circle.java @@ -0,0 +1,26 @@ +package com.baeldung.area.circle; + +public class Circle { + + private double radius; + + public Circle(double radius) { + this.radius = radius; + } + + public double getRadius() { + return radius; + } + + public void setRadius(double radius) { + this.radius = radius; + } + + private double calculateArea() { + return radius * radius * Math.PI; + } + + public String toString() { + return "The area of the circle [radius = " + radius + "]: " + calculateArea(); + } +} diff --git a/core-java/src/main/java/com/baeldung/area/circle/CircleArea.java b/core-java/src/main/java/com/baeldung/area/circle/CircleArea.java new file mode 100644 index 0000000000..4d78637af6 --- /dev/null +++ b/core-java/src/main/java/com/baeldung/area/circle/CircleArea.java @@ -0,0 +1,36 @@ +package com.baeldung.area.circle; + +import java.util.InputMismatchException; +import java.util.Scanner; + +public class CircleArea { + + public static void main(String[] args) { + if (args.length > 0) { + try { + double radius = Double.parseDouble(args[0]); + calculateArea(radius); + } catch (NumberFormatException nfe) { + System.out.println("Invalid value for radius"); + System.exit(0); + } + } + + try (Scanner scanner = new Scanner(System.in)) { + System.out.println("Please enter radius value: "); + double radius = scanner.nextDouble(); + calculateArea(radius); + } catch (InputMismatchException e) { + System.out.println("Invalid value for radius"); + System.exit(0); + } + + Circle circle = new Circle(7); + System.out.println(circle); + } + + private static void calculateArea(double radius) { + double area = radius * radius * Math.PI; + System.out.println("The area of the circle [radius = " + radius + "]: " + area); + } +} diff --git a/core-java/src/main/java/com/baeldung/encoding/CharacterEncodingExamples.java b/core-java/src/main/java/com/baeldung/encoding/CharacterEncodingExamples.java new file mode 100644 index 0000000000..bdd92e37f6 --- /dev/null +++ b/core-java/src/main/java/com/baeldung/encoding/CharacterEncodingExamples.java @@ -0,0 +1,32 @@ +package com.baeldung.encoding; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; + +public class CharacterEncodingExamples { + + static String readFile(String filePath, String encoding) throws IOException { + File file = new File(filePath); + StringBuffer buffer = new StringBuffer(); + try (InputStreamReader isr = new InputStreamReader(new FileInputStream(file), encoding)) { + int data; + while ((data = isr.read()) != -1) { + buffer.append((char) data); + } + } + return buffer.toString(); + } + + static String convertToBinary(String input, String encoding) throws UnsupportedEncodingException { + byte[] bytes = input.getBytes(encoding); + StringBuffer buffer = new StringBuffer(); + for (int b : bytes) { + buffer.append(Integer.toBinaryString((b + 256) % 256)); + buffer.append(" "); + } + return buffer.toString(); + } +} diff --git a/core-java/src/main/java/com/baeldung/ssl/example/SimpleClient.java b/core-java/src/main/java/com/baeldung/ssl/example/SimpleClient.java index c641a58a78..d6efc34c3e 100644 --- a/core-java/src/main/java/com/baeldung/ssl/example/SimpleClient.java +++ b/core-java/src/main/java/com/baeldung/ssl/example/SimpleClient.java @@ -8,22 +8,26 @@ import java.net.Socket; import javax.net.SocketFactory; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.SSLParameters; public class SimpleClient { - static void startClient(String host, int port) throws IOException { + static String startClient(String host, int port) throws IOException { SocketFactory factory = SSLSocketFactory.getDefault(); + try (Socket connection = factory.createSocket(host, port)) { ((SSLSocket) connection).setEnabledCipherSuites( new String[] { "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"}); ((SSLSocket) connection).setEnabledProtocols( new String[] { "TLSv1.2"}); - BufferedReader input = new BufferedReader( - new InputStreamReader(connection.getInputStream())); - System.out.println(input.readLine()); + SSLParameters sslParams = new SSLParameters(); + sslParams.setEndpointIdentificationAlgorithm("HTTPS"); + ((SSLSocket) connection).setSSLParameters(sslParams); + BufferedReader input = new BufferedReader(new InputStreamReader(connection.getInputStream())); + return input.readLine(); } } public static void main(String[] args) throws IOException { - startClient("localhost", 1234); + System.out.println(startClient("localhost", 8443)); } } diff --git a/core-java/src/main/java/com/baeldung/ssl/example/SimpleServer.java b/core-java/src/main/java/com/baeldung/ssl/example/SimpleServer.java index 3bbabdfbb8..27d15d04d7 100644 --- a/core-java/src/main/java/com/baeldung/ssl/example/SimpleServer.java +++ b/core-java/src/main/java/com/baeldung/ssl/example/SimpleServer.java @@ -4,7 +4,6 @@ import java.io.IOException; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket; -import java.util.Date; import javax.net.ServerSocketFactory; import javax.net.ssl.SSLServerSocket; @@ -13,6 +12,7 @@ import javax.net.ssl.SSLServerSocketFactory; public class SimpleServer { static void startServer(int port) throws IOException { ServerSocketFactory factory = SSLServerSocketFactory.getDefault(); + try (ServerSocket listener = factory.createServerSocket(port)) { ((SSLServerSocket) listener).setNeedClientAuth(true); ((SSLServerSocket) listener).setEnabledCipherSuites( @@ -22,13 +22,13 @@ public class SimpleServer { while (true) { try (Socket socket = listener.accept()) { PrintWriter out = new PrintWriter(socket.getOutputStream(), true); - out.println(new Date().toString()); + out.println("Hello World!"); } } } } public static void main(String[] args) throws IOException { - startServer(1234); + startServer(8443); } -} +} \ No newline at end of file diff --git a/core-java/src/main/java/org/baeldung/equalshashcode/entities/ComplexClass.java b/core-java/src/main/java/org/baeldung/equalshashcode/entities/ComplexClass.java deleted file mode 100644 index 6329f41252..0000000000 --- a/core-java/src/main/java/org/baeldung/equalshashcode/entities/ComplexClass.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.baeldung.equalshashcode.entities; - -import java.util.List; -import java.util.Set; - -public class ComplexClass { - - private List genericList; - private Set integerSet; - - public ComplexClass(List genericArrayList, Set integerHashSet) { - super(); - this.genericList = genericArrayList; - this.integerSet = integerHashSet; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((genericList == null) ? 0 : genericList.hashCode()); - result = prime * result + ((integerSet == null) ? 0 : integerSet.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (!(obj instanceof ComplexClass)) - return false; - ComplexClass other = (ComplexClass) obj; - if (genericList == null) { - if (other.genericList != null) - return false; - } else if (!genericList.equals(other.genericList)) - return false; - if (integerSet == null) { - if (other.integerSet != null) - return false; - } else if (!integerSet.equals(other.integerSet)) - return false; - return true; - } - - protected List getGenericList() { - return genericList; - } - - protected void setGenericArrayList(List genericList) { - this.genericList = genericList; - } - - protected Set getIntegerSet() { - return integerSet; - } - - protected void setIntegerSet(Set integerSet) { - this.integerSet = integerSet; - } -} diff --git a/core-java/src/main/java/org/baeldung/equalshashcode/entities/PrimitiveClass.java b/core-java/src/main/java/org/baeldung/equalshashcode/entities/PrimitiveClass.java deleted file mode 100644 index ebe005688c..0000000000 --- a/core-java/src/main/java/org/baeldung/equalshashcode/entities/PrimitiveClass.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.baeldung.equalshashcode.entities; - -public class PrimitiveClass { - - private boolean primitiveBoolean; - private int primitiveInt; - - public PrimitiveClass(boolean primitiveBoolean, int primitiveInt) { - super(); - this.primitiveBoolean = primitiveBoolean; - this.primitiveInt = primitiveInt; - } - - protected boolean isPrimitiveBoolean() { - return primitiveBoolean; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + (primitiveBoolean ? 1231 : 1237); - result = prime * result + primitiveInt; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - PrimitiveClass other = (PrimitiveClass) obj; - if (primitiveBoolean != other.primitiveBoolean) - return false; - if (primitiveInt != other.primitiveInt) - return false; - return true; - } - - protected void setPrimitiveBoolean(boolean primitiveBoolean) { - this.primitiveBoolean = primitiveBoolean; - } - - protected int getPrimitiveInt() { - return primitiveInt; - } - - protected void setPrimitiveInt(int primitiveInt) { - this.primitiveInt = primitiveInt; - } -} diff --git a/core-java/src/main/java/org/baeldung/equalshashcode/entities/Rectangle.java b/core-java/src/main/java/org/baeldung/equalshashcode/entities/Rectangle.java deleted file mode 100644 index 5e38eb6088..0000000000 --- a/core-java/src/main/java/org/baeldung/equalshashcode/entities/Rectangle.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.baeldung.equalshashcode.entities; - -public class Rectangle extends Shape { - private double width; - private double length; - - Rectangle(double width, double length) { - this.width = width; - this.length = length; - } - - @Override - public double area() { - return width * length; - } - - @Override - public double perimeter() { - return 2 * (width + length); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - long temp; - temp = Double.doubleToLongBits(length); - result = prime * result + (int) (temp ^ (temp >>> 32)); - temp = Double.doubleToLongBits(width); - result = prime * result + (int) (temp ^ (temp >>> 32)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - Rectangle other = (Rectangle) obj; - if (Double.doubleToLongBits(length) != Double.doubleToLongBits(other.length)) - return false; - if (Double.doubleToLongBits(width) != Double.doubleToLongBits(other.width)) - return false; - return true; - } - - protected double getWidth() { - return width; - } - - protected double getLength() { - return length; - } - -} \ No newline at end of file diff --git a/core-java/src/main/java/org/baeldung/equalshashcode/entities/Shape.java b/core-java/src/main/java/org/baeldung/equalshashcode/entities/Shape.java deleted file mode 100644 index 3bfc81da8f..0000000000 --- a/core-java/src/main/java/org/baeldung/equalshashcode/entities/Shape.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.baeldung.equalshashcode.entities; - -public abstract class Shape { - public abstract double area(); - - public abstract double perimeter(); -} diff --git a/core-java/src/main/java/org/baeldung/equalshashcode/entities/Square.java b/core-java/src/main/java/org/baeldung/equalshashcode/entities/Square.java deleted file mode 100644 index f11e34f0ba..0000000000 --- a/core-java/src/main/java/org/baeldung/equalshashcode/entities/Square.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.baeldung.equalshashcode.entities; - -import java.awt.Color; - -public class Square extends Rectangle { - - Color color; - - public Square(double width, Color color) { - super(width, width); - this.color = color; - } - - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((color == null) ? 0 : color.hashCode()); - return result; - } - - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!super.equals(obj)) { - return false; - } - if (!(obj instanceof Square)) { - return false; - } - Square other = (Square) obj; - if (color == null) { - if (other.color != null) { - return false; - } - } else if (!color.equals(other.color)) { - return false; - } - return true; - } - - protected Color getColor() { - return color; - } - - protected void setColor(Color color) { - this.color = color; - } - -} diff --git a/core-java/src/main/resources/files/test.txt b/core-java/src/main/resources/files/test.txt new file mode 100644 index 0000000000..08e53af69d --- /dev/null +++ b/core-java/src/main/resources/files/test.txt @@ -0,0 +1,10 @@ +This is line 1 +This is line 2 +This is line 3 +This is line 4 +This is line 5 +This is line 6 +This is line 7 +This is line 8 +This is line 9 +This is line 10 \ No newline at end of file diff --git a/core-java/src/test/java/com/baeldung/abstractclasses/LowercaseFileReaderUnitTest.java b/core-java/src/test/java/com/baeldung/abstractclasses/LowercaseFileReaderUnitTest.java new file mode 100644 index 0000000000..a97a68e0bd --- /dev/null +++ b/core-java/src/test/java/com/baeldung/abstractclasses/LowercaseFileReaderUnitTest.java @@ -0,0 +1,23 @@ +package com.baeldung.abstractclasses; + +import com.baeldung.abstractclasses.filereaders.BaseFileReader; +import com.baeldung.abstractclasses.filereaders.LowercaseFileReader; + +import java.net.URL; +import java.nio.file.Paths; +import java.util.List; +import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; + +public class LowercaseFileReaderUnitTest { + + @Test + public void givenLowercaseFileReaderInstance_whenCalledreadFile_thenCorrect() throws Exception { + // We'll transform the resource URL path to URI to load the file correctly in Windows + URL url = getClass().getClassLoader().getResource("files/test.txt"); + String filePath = Paths.get(url.toURI()).toString(); + BaseFileReader lowercaseFileReader = new LowercaseFileReader(filePath); + + assertThat(lowercaseFileReader.readFile()).isInstanceOf(List.class); + } +} diff --git a/core-java/src/test/java/com/baeldung/abstractclasses/StandardFileReaderUnitTest.java b/core-java/src/test/java/com/baeldung/abstractclasses/StandardFileReaderUnitTest.java new file mode 100644 index 0000000000..348b0f0366 --- /dev/null +++ b/core-java/src/test/java/com/baeldung/abstractclasses/StandardFileReaderUnitTest.java @@ -0,0 +1,25 @@ +package com.baeldung.abstractclasses; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.net.URL; +import java.nio.file.Paths; +import java.util.List; + +import org.junit.Test; + +import com.baeldung.abstractclasses.filereaders.BaseFileReader; +import com.baeldung.abstractclasses.filereaders.StandardFileReader; + +public class StandardFileReaderUnitTest { + + @Test + public void givenStandardFileReaderInstance_whenCalledreadFile_thenCorrect() throws Exception { + // We'll transform the resource URL path to URI to load the file correctly in Windows + URL url = getClass().getClassLoader().getResource("files/test.txt"); + String filePath = Paths.get(url.toURI()).toString(); + BaseFileReader standardFileReader = new StandardFileReader(filePath); + + assertThat(standardFileReader.readFile()).isInstanceOf(List.class); + } +} diff --git a/core-java/src/test/java/com/baeldung/abstractclasses/UppercaseFileReaderUnitTest.java b/core-java/src/test/java/com/baeldung/abstractclasses/UppercaseFileReaderUnitTest.java new file mode 100644 index 0000000000..d698cfe038 --- /dev/null +++ b/core-java/src/test/java/com/baeldung/abstractclasses/UppercaseFileReaderUnitTest.java @@ -0,0 +1,23 @@ +package com.baeldung.abstractclasses; + +import com.baeldung.abstractclasses.filereaders.BaseFileReader; +import com.baeldung.abstractclasses.filereaders.UppercaseFileReader; + +import java.net.URL; +import java.nio.file.Paths; +import java.util.List; +import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; + +public class UppercaseFileReaderUnitTest { + + @Test + public void givenUppercaseFileReaderInstance_whenCalledreadFile_thenCorrect() throws Exception { + // We'll transform the resource URL path to URI to load the file correctly in Windows + URL url = getClass().getClassLoader().getResource("files/test.txt"); + String filePath = Paths.get(url.toURI()).toString(); + BaseFileReader uppercaseFileReader = new UppercaseFileReader(filePath); + + assertThat(uppercaseFileReader.readFile()).isInstanceOf(List.class); + } +} diff --git a/core-java/src/test/java/com/baeldung/encoding/CharacterEncodingExamplesUnitTest.java b/core-java/src/test/java/com/baeldung/encoding/CharacterEncodingExamplesUnitTest.java new file mode 100644 index 0000000000..95b3605d95 --- /dev/null +++ b/core-java/src/test/java/com/baeldung/encoding/CharacterEncodingExamplesUnitTest.java @@ -0,0 +1,61 @@ +package com.baeldung.encoding; + +import java.io.IOException; + +import org.junit.Assert; +import org.junit.Test; + +public class CharacterEncodingExamplesUnitTest { + + @Test + public void givenTextFile_whenCalledWithEncodingASCII_thenProduceIncorrectResult() throws IOException { + Assert.assertEquals( + CharacterEncodingExamples.readFile( + "src/test/resources/encoding.txt", "US-ASCII"), + "The fa��ade pattern is a software-design pattern commonly used with object-oriented programming."); + } + + @Test + public void givenTextFile_whenCalledWithEncodingUTF8_thenProduceCorrectResult() throws IOException { + Assert.assertEquals( + CharacterEncodingExamples.readFile( + "src/test/resources/encoding.txt", "UTF-8"), + "The façade pattern is a software-design pattern commonly used with object-oriented programming."); + } + + @Test + public void givenCharacterA_whenConvertedtoBinaryWithEncodingASCII_thenProduceResult() throws IOException { + Assert.assertEquals( + CharacterEncodingExamples.convertToBinary("A", "US-ASCII"), + "1000001 "); + } + + @Test + public void givenCharacterA_whenConvertedtoBinaryWithEncodingUTF8_thenProduceResult() throws IOException { + Assert.assertEquals( + CharacterEncodingExamples.convertToBinary("A", "UTF-8"), + "1000001 "); + } + + @Test + public void givenCharacterCh_whenConvertedtoBinaryWithEncodingBig5_thenProduceResult() throws IOException { + Assert.assertEquals( + CharacterEncodingExamples.convertToBinary("語", "Big5"), + "10111011 1111001 "); + } + + @Test + public void givenCharacterCh_whenConvertedtoBinaryWithEncodingUTF8_thenProduceResult() throws IOException { + Assert.assertEquals( + CharacterEncodingExamples.convertToBinary("語", "UTF-8"), + "11101000 10101010 10011110 "); + } + + @Test + public void givenCharacterCh_whenConvertedtoBinaryWithEncodingUTF32_thenProduceResult() throws IOException { + Assert.assertEquals( + CharacterEncodingExamples.convertToBinary("語", "UTF-32"), + "0 0 10001010 10011110 "); + } + +} diff --git a/core-java/src/test/java/com/baeldung/java/math/MathUnitTest.java b/core-java/src/test/java/com/baeldung/java/math/MathUnitTest.java new file mode 100644 index 0000000000..6d1872f05f --- /dev/null +++ b/core-java/src/test/java/com/baeldung/java/math/MathUnitTest.java @@ -0,0 +1,175 @@ +package com.baeldung.java.math; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class MathUnitTest { + + @Test + public void whenAbsInteger_thenReturnAbsoluteValue() { + assertEquals(5,Math.abs(-5)); + } + + @Test + public void whenMaxBetweenTwoValue_thenReturnMaximum() { + assertEquals(10, Math.max(5,10)); + } + + @Test + public void whenMinBetweenTwoValue_thenReturnMinimum() { + assertEquals(5, Math.min(5,10)); + } + + @Test + public void whenSignumWithNegativeNumber_thenReturnMinusOne() { + assertEquals(-1, Math.signum(-5), 0); + } + + @Test + public void whenCopySignWithNegativeSign_thenReturnNegativeArgument() { + assertEquals(-5, Math.copySign(5,-1), 0); + } + + @Test + public void whenPow_thenReturnPoweredValue() { + assertEquals(25, Math.pow(5,2),0); + } + + @Test + public void whenSqrt_thenReturnSquareRoot() { + assertEquals(5, Math.sqrt(25),0); + } + + @Test + public void whenCbrt_thenReturnCubeRoot() { + assertEquals(5, Math.cbrt(125),0); + } + + @Test + public void whenExp_thenReturnEulerNumberRaised() { + assertEquals(2.718, Math.exp(1),0.1); + } + + @Test + public void whenExpm1_thenReturnEulerNumberMinusOne() { + assertEquals(1.718, Math.expm1(1),0.1); + } + + @Test + public void whenGetExponent_thenReturnUnbiasedExponent() { + assertEquals(8, Math.getExponent(333.3),0); + assertEquals(7, Math.getExponent(222.2f),0); + } + + @Test + public void whenLog_thenReturnValue() { + assertEquals(1, Math.log(Math.E),0); + } + + @Test + public void whenLog10_thenReturnValue() { + assertEquals(1, Math.log10(10),0); + } + + @Test + public void whenLog1p_thenReturnValue() { + assertEquals(1.31, Math.log1p(Math.E),0.1); + } + + @Test + public void whenSin_thenReturnValue() { + assertEquals(1, Math.sin(Math.PI/2),0); + } + + @Test + public void whenCos_thenReturnValue() { + assertEquals(1, Math.cos(0),0); + } + + @Test + public void whenTan_thenReturnValue() { + assertEquals(1, Math.tan(Math.PI/4),0.1); + } + + @Test + public void whenAsin_thenReturnValue() { + assertEquals(Math.PI/2, Math.asin(1),0); + } + + @Test + public void whenAcos_thenReturnValue() { + assertEquals(Math.PI/2, Math.acos(0),0); + } + + @Test + public void whenAtan_thenReturnValue() { + assertEquals(Math.PI/4, Math.atan(1),0); + } + + @Test + public void whenAtan2_thenReturnValue() { + assertEquals(Math.PI/4, Math.atan2(1,1),0); + } + + @Test + public void whenToDegrees_thenReturnValue() { + assertEquals(180, Math.toDegrees(Math.PI),0); + } + + @Test + public void whenToRadians_thenReturnValue() { + assertEquals(Math.PI, Math.toRadians(180),0); + } + + @Test + public void whenCeil_thenReturnValue() { + assertEquals(4, Math.ceil(Math.PI),0); + } + + @Test + public void whenFloor_thenReturnValue() { + assertEquals(3, Math.floor(Math.PI),0); + } + + @Test + public void whenGetExponent_thenReturnValue() { + assertEquals(8, Math.getExponent(333.3),0); + } + + @Test + public void whenIEEERemainder_thenReturnValue() { + assertEquals(1.0, Math.IEEEremainder(5,2),0); + } + + @Test + public void whenNextAfter_thenReturnValue() { + assertEquals(1.9499999284744263, Math.nextAfter(1.95f,1),0.0000001); + } + + @Test + public void whenNextUp_thenReturnValue() { + assertEquals(1.9500002, Math.nextUp(1.95f),0.0000001); + } + + @Test + public void whenRint_thenReturnValue() { + assertEquals(2.0, Math.rint(1.95f),0.0); + } + + @Test + public void whenRound_thenReturnValue() { + assertEquals(2.0, Math.round(1.95f),0.0); + } + + @Test + public void whenScalb_thenReturnValue() { + assertEquals(48, Math.scalb(3, 4),0.0); + } + + @Test + public void whenHypot_thenReturnValue() { + assertEquals(5, Math.hypot(4, 3),0.0); + } + +} diff --git a/core-java/src/test/java/com/baeldung/java/reflection/operations/MoreOperationsUnitTest.java b/core-java/src/test/java/com/baeldung/java/reflection/operations/MoreOperationsUnitTest.java deleted file mode 100644 index 2fe0a54664..0000000000 --- a/core-java/src/test/java/com/baeldung/java/reflection/operations/MoreOperationsUnitTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.baeldung.java.reflection.operations; - -import com.baeldung.java.reflection.*; -import static org.hamcrest.CoreMatchers.equalTo; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.junit.Test; -import static org.junit.Assert.assertThat; - -public class MoreOperationsUnitTest { - - public MoreOperationsUnitTest() { - } - - @Test(expected = IllegalAccessException.class) - public void givenObject_whenInvokeProtectedMethod_thenFail() throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { - Method maxProtectedMethod = Operations.class.getDeclaredMethod("protectedMax", int.class, int.class); - - Operations operationsInstance = new Operations(); - Integer result = (Integer) maxProtectedMethod.invoke(operationsInstance, 2, 4); - - assertThat(result, equalTo(4)); - } - - @Test - public void givenObject_whenInvokeProtectedMethod_thenCorrect() throws Exception { - Method maxProtectedMethod = Operations.class.getDeclaredMethod("protectedMax", int.class, int.class); - maxProtectedMethod.setAccessible(true); - - Operations operationsInstance = new Operations(); - Integer result = (Integer) maxProtectedMethod.invoke(operationsInstance, 2, 4); - - assertThat(result, equalTo(4)); - } - -} diff --git a/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java b/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java index 4ae7b77089..7e1fcd9b3d 100644 --- a/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java +++ b/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java @@ -25,7 +25,7 @@ public class SimpleDateFormatUnitTest { @Test public void givenSpecificDate_whenFormattedUsingDateFormat_thenCheckFormatCorrect() throws Exception { - DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT); + DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT, Locale.US); assertEquals("5/24/77", formatter.format(new Date(233345223232L))); } diff --git a/core-java/src/test/resources/encoding.txt b/core-java/src/test/resources/encoding.txt new file mode 100644 index 0000000000..e1cf027df0 --- /dev/null +++ b/core-java/src/test/resources/encoding.txt @@ -0,0 +1 @@ +The façade pattern is a software-design pattern commonly used with object-oriented programming. \ No newline at end of file diff --git a/core-kotlin/README.md b/core-kotlin/README.md index ab9e96c2e1..1b04b71228 100644 --- a/core-kotlin/README.md +++ b/core-kotlin/README.md @@ -40,5 +40,10 @@ - [Converting Kotlin Data Class from JSON using GSON](https://www.baeldung.com/kotlin-json-convert-data-class) - [Concatenate Strings in Kotlin](https://www.baeldung.com/kotlin-concatenate-strings) - [Kotlin return, break, continue Keywords](https://www.baeldung.com/kotlin-return-break-continue) -- [Mapping of Data Objects in Kotlin](https://www.baeldung.com/kotlin-data-objects-mapping) +- [Mapping of Data Objects in Kotlin](https://www.baeldung.com/kotlin-data-objects) - [Initializing Arrays in Kotlin](https://www.baeldung.com/kotlin-initialize-array) +- [Threads vs Coroutines in Kotlin](https://www.baeldung.com/kotlin-threads-coroutines) +- [Guide to Kotlin Interfaces](https://www.baeldung.com/kotlin-interfaces) +- [Guide to Sorting in Kotlin](https://www.baeldung.com/kotlin-sort) +- [Dependency Injection for Kotlin with Injekt](https://www.baeldung.com/kotlin-dependency-injection-with-injekt) +- [Implementing a Binary Tree in Kotlin](https://www.baeldung.com/kotlin-binary-tree) diff --git a/core-kotlin/pom.xml b/core-kotlin/pom.xml index 5cdb5f700e..2b559b19e0 100644 --- a/core-kotlin/pom.xml +++ b/core-kotlin/pom.xml @@ -18,6 +18,11 @@ commons-math3 ${commons-math3.version} + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + org.junit.platform junit-platform-runner @@ -70,6 +75,7 @@ 3.6.1 + 3.8.1 1.1.1 5.2.0 3.10.0 diff --git a/core-kotlin/src/main/kotlin/com/baeldung/generic/Reified.kt b/core-kotlin/src/main/kotlin/com/baeldung/generic/Reified.kt new file mode 100644 index 0000000000..37a632fe41 --- /dev/null +++ b/core-kotlin/src/main/kotlin/com/baeldung/generic/Reified.kt @@ -0,0 +1,6 @@ +inline fun Iterable<*>.filterIsInstance() = filter { it is T } + +fun main(args: Array) { + val set = setOf("1984", 2, 3, "Brave new world", 11) + println(set.filterIsInstance()) +} \ No newline at end of file diff --git a/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringUnitTest.kt b/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringUnitTest.kt new file mode 100644 index 0000000000..74085367e8 --- /dev/null +++ b/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringUnitTest.kt @@ -0,0 +1,62 @@ +import org.apache.commons.lang3.RandomStringUtils +import org.junit.Before +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.BeforeEach +import org.junit.jupiter.api.Test +import java.security.SecureRandom +import java.util.concurrent.ThreadLocalRandom +import kotlin.experimental.and +import kotlin.streams.asSequence +import kotlin.test.assertEquals + +const val STRING_LENGTH = 10 +const val ALPHANUMERIC_REGEX = "[a-zA-Z0-9]+" + +class RandomStringUnitTest { + private val charPool : List = ('a'..'z') + ('A'..'Z') + ('0'..'9') + + @Test + fun givenAStringLength_whenUsingJava_thenReturnAlphanumericString() { + var randomString = ThreadLocalRandom.current() + .ints(STRING_LENGTH.toLong(), 0, charPool.size) + .asSequence() + .map(charPool::get) + .joinToString("") + + assert(randomString.matches(Regex(ALPHANUMERIC_REGEX))) + assertEquals(STRING_LENGTH, randomString.length) + } + + @Test + fun givenAStringLength_whenUsingKotlin_thenReturnAlphanumericString() { + var randomString = (1..STRING_LENGTH).map { i -> kotlin.random.Random.nextInt(0, charPool.size) } + .map(charPool::get) + .joinToString("") + + assert(randomString.matches(Regex(ALPHANUMERIC_REGEX))) + assertEquals(STRING_LENGTH, randomString.length) + } + + @Test + fun givenAStringLength_whenUsingApacheCommon_thenReturnAlphanumericString() { + var randomString = RandomStringUtils.randomAlphanumeric(STRING_LENGTH) + + assert(randomString.matches(Regex(ALPHANUMERIC_REGEX))) + assertEquals(STRING_LENGTH, randomString.length) + } + + @Test + fun givenAStringLength_whenUsingRandomForBytes_thenReturnAlphanumericString() { + val random = SecureRandom() + val bytes = ByteArray(STRING_LENGTH) + random.nextBytes(bytes) + + var randomString = (0..bytes.size - 1).map { i -> + charPool.get((bytes[i] and 0xFF.toByte() and charPool.size.toByte()).toInt()) + }.joinToString("") + + assert(randomString.matches(Regex(ALPHANUMERIC_REGEX))) + assertEquals(STRING_LENGTH, randomString.length) + } + +} \ No newline at end of file diff --git a/core-scala/README.md b/core-scala/README.md new file mode 100644 index 0000000000..eed344193f --- /dev/null +++ b/core-scala/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Introduction to Scala](https://www.baeldung.com/scala-intro) diff --git a/core-scala/src/main/scala/com/baeldung/scala/Employee.scala b/core-scala/src/main/scala/com/baeldung/scala/Employee.scala index 397f166aa7..9291d958b3 100644 --- a/core-scala/src/main/scala/com/baeldung/scala/Employee.scala +++ b/core-scala/src/main/scala/com/baeldung/scala/Employee.scala @@ -22,6 +22,6 @@ class Employee(val name : String, * A Trait which will make the toString return upper case value. */ trait UpperCasePrinter { - override def toString = super.toString toUpperCase + override def toString: String = super.toString toUpperCase } diff --git a/core-scala/src/main/scala/com/baeldung/scala/HigherOrderFunctions.scala b/core-scala/src/main/scala/com/baeldung/scala/HigherOrderFunctions.scala index df97013206..02c41a5f8c 100644 --- a/core-scala/src/main/scala/com/baeldung/scala/HigherOrderFunctions.scala +++ b/core-scala/src/main/scala/com/baeldung/scala/HigherOrderFunctions.scala @@ -11,7 +11,7 @@ object HigherOrderFunctions { def mapReduce(r : (Int, Int) => Int, i : Int, m : Int => Int, - a : Int, b : Int) = { + a : Int, b : Int): Int = { def iter(a : Int, result : Int) : Int = { if (a > b) result else iter(a + 1, r(m(a), result)) diff --git a/core-scala/src/main/scala/com/baeldung/scala/Utils.scala b/core-scala/src/main/scala/com/baeldung/scala/Utils.scala index 93cd3e697e..20bc413646 100644 --- a/core-scala/src/main/scala/com/baeldung/scala/Utils.scala +++ b/core-scala/src/main/scala/com/baeldung/scala/Utils.scala @@ -7,9 +7,9 @@ package com.baeldung.scala * */ object Utils { - def average(x : Double, y : Double) = (x + y) / 2 + def average(x : Double, y : Double): Double = (x + y) / 2 - def randomLessThan(d : Double) = { + def randomLessThan(d : Double): Double = { var random = 0d do { random = Math.random() diff --git a/core-scala/src/test/scala/com/baeldung/scala/ControlStructuresDemoUnitTest.scala b/core-scala/src/test/scala/com/baeldung/scala/ControlStructuresDemoUnitTest.scala index 71422a8b4f..584038ee2c 100644 --- a/core-scala/src/test/scala/com/baeldung/scala/ControlStructuresDemoUnitTest.scala +++ b/core-scala/src/test/scala/com/baeldung/scala/ControlStructuresDemoUnitTest.scala @@ -1,32 +1,32 @@ package com.baeldung.scala import com.baeldung.scala.ControlStructuresDemo._ -import org.junit.Test import org.junit.Assert.assertEquals +import org.junit.Test class ControlStructuresDemoUnitTest { @Test - def givenTwoIntegers_whenGcdCalled_thenCorrectValueReturned = { + def givenTwoIntegers_whenGcdCalled_thenCorrectValueReturned() = { assertEquals(3, gcd(15, 27)) } @Test - def givenTwoIntegers_whenGcdIterCalled_thenCorrectValueReturned = { + def givenTwoIntegers_whenGcdIterCalled_thenCorrectValueReturned() = { assertEquals(3, gcdIter(15, 27)) } @Test - def givenTwoIntegers_whenRangeSumcalled_thenCorrectValueReturned = { + def givenTwoIntegers_whenRangeSumcalled_thenCorrectValueReturned() = { assertEquals(55, rangeSum(1, 10)) } @Test - def givenPositiveInteger_whenFactorialInvoked_thenCorrectValueReturned = { + def givenPositiveInteger_whenFactorialInvoked_thenCorrectValueReturned() = { assertEquals(720, factorial(6)) } @Test - def whenFactorialOf0Invoked_then1Returned = { + def whenFactorialOf0Invoked_then1Returned() = { assertEquals(1, factorial(0)) } diff --git a/core-scala/src/test/scala/com/baeldung/scala/EmployeeUnitTest.scala b/core-scala/src/test/scala/com/baeldung/scala/EmployeeUnitTest.scala index c51631dd2c..0828752a8a 100644 --- a/core-scala/src/test/scala/com/baeldung/scala/EmployeeUnitTest.scala +++ b/core-scala/src/test/scala/com/baeldung/scala/EmployeeUnitTest.scala @@ -6,20 +6,20 @@ import org.junit.Test class EmployeeUnitTest { @Test - def whenEmployeeSalaryIncremented_thenCorrectSalary = { + def whenEmployeeSalaryIncremented_thenCorrectSalary() = { val employee = new Employee("John Doe", 1000) employee.incrementSalary() assertEquals(1020, employee.salary) } @Test - def givenEmployee_whenToStringCalled_thenCorrectStringReturned = { + def givenEmployee_whenToStringCalled_thenCorrectStringReturned() = { val employee = new Employee("John Doe", 1000) assertEquals("Employee(name=John Doe, salary=1000)", employee.toString) } @Test - def givenEmployeeWithTrait_whenToStringCalled_thenCorrectStringReturned = { + def givenEmployeeWithTrait_whenToStringCalled_thenCorrectStringReturned() = { val employee = new Employee("John Doe", 1000) with UpperCasePrinter assertEquals("EMPLOYEE(NAME=JOHN DOE, SALARY=1000)", employee.toString) diff --git a/core-scala/src/test/scala/com/baeldung/scala/HigherOrderFunctionsUnitTest.scala b/core-scala/src/test/scala/com/baeldung/scala/HigherOrderFunctionsUnitTest.scala index 63530ecaf4..240c879d7f 100644 --- a/core-scala/src/test/scala/com/baeldung/scala/HigherOrderFunctionsUnitTest.scala +++ b/core-scala/src/test/scala/com/baeldung/scala/HigherOrderFunctionsUnitTest.scala @@ -1,14 +1,13 @@ package com.baeldung.scala +import com.baeldung.scala.HigherOrderFunctions.mapReduce import org.junit.Assert.assertEquals import org.junit.Test -import HigherOrderFunctions.mapReduce - class HigherOrderFunctionsUnitTest { @Test - def whenCalledWithSumAndSquareFunctions_thenCorrectValueReturned = { + def whenCalledWithSumAndSquareFunctions_thenCorrectValueReturned() = { def square(x : Int) = x * x def sum(x : Int, y : Int) = x + y @@ -20,7 +19,7 @@ class HigherOrderFunctionsUnitTest { } @Test - def whenComputingSumOfSquaresWithAnonymousFunctions_thenCorrectValueReturned = { + def whenComputingSumOfSquaresWithAnonymousFunctions_thenCorrectValueReturned() = { def sumSquares(a : Int, b : Int) = mapReduce((x, y) => x + y, 0, x => x * x, a, b) @@ -28,7 +27,7 @@ class HigherOrderFunctionsUnitTest { } @Test - def givenCurriedFunctions_whenInvoked_thenCorrectValueReturned = { + def givenCurriedFunctions_whenInvoked_thenCorrectValueReturned() = { // a curried function def sum(f : Int => Int)(a : Int, b : Int) : Int = diff --git a/core-scala/src/test/scala/com/baeldung/scala/IntSetUnitTest.scala b/core-scala/src/test/scala/com/baeldung/scala/IntSetUnitTest.scala index 5cc19e9215..ac27389d70 100644 --- a/core-scala/src/test/scala/com/baeldung/scala/IntSetUnitTest.scala +++ b/core-scala/src/test/scala/com/baeldung/scala/IntSetUnitTest.scala @@ -1,14 +1,12 @@ package com.baeldung.scala -import scala.Range - import org.junit.Assert.assertFalse import org.junit.Test class IntSetUnitTest { @Test - def givenSetof1To10_whenContains11Called_thenFalse = { + def givenSetof1To10_whenContains11Called_thenFalse() = { // Set up a set containing integers 1 to 10. val set1To10 = diff --git a/core-scala/src/test/scala/com/baeldung/scala/UtilsUnitTest.scala b/core-scala/src/test/scala/com/baeldung/scala/UtilsUnitTest.scala index 47f9873aad..e4995201d8 100644 --- a/core-scala/src/test/scala/com/baeldung/scala/UtilsUnitTest.scala +++ b/core-scala/src/test/scala/com/baeldung/scala/UtilsUnitTest.scala @@ -1,34 +1,29 @@ package com.baeldung.scala -import org.junit.Assert.assertEquals -import org.junit.Assert.assertTrue +import com.baeldung.scala.Utils.{average, fibonacci, power, randomLessThan} +import org.junit.Assert.{assertEquals, assertTrue} import org.junit.Test -import Utils.average -import Utils.fibonacci -import Utils.power -import Utils.randomLessThan - class UtilsUnitTest { @Test - def whenAverageCalled_thenCorrectValueReturned() = { + def whenAverageCalled_thenCorrectValueReturned(): Unit = { assertEquals(15.0, average(10, 20), 1e-5) } @Test - def whenRandomLessThanInvokedWithANumber_thenARandomLessThanItReturned = { + def whenRandomLessThanInvokedWithANumber_thenARandomLessThanItReturned: Unit = { val d = 0.1 assertTrue(randomLessThan(d) < d) } @Test - def whenPowerInvokedWith2And3_then8Returned = { + def whenPowerInvokedWith2And3_then8Returned: Unit = { assertEquals(8, power(2, 3)) } @Test - def whenFibonacciCalled_thenCorrectValueReturned = { + def whenFibonacciCalled_thenCorrectValueReturned: Unit = { assertEquals(1, fibonacci(0)) assertEquals(1, fibonacci(1)) assertEquals(fibonacci(6), diff --git a/ddd/README.md b/ddd/README.md new file mode 100644 index 0000000000..60f3a43086 --- /dev/null +++ b/ddd/README.md @@ -0,0 +1,3 @@ +### Relevant articles + +- [Persisting DDD Aggregates](https://www.baeldung.com/spring-persisting-ddd-aggregates) diff --git a/ddd/pom.xml b/ddd/pom.xml new file mode 100644 index 0000000000..a61ae24e92 --- /dev/null +++ b/ddd/pom.xml @@ -0,0 +1,91 @@ + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.0.6.RELEASE + + + + com.baeldung.ddd + ddd + 0.0.1-SNAPSHOT + jar + ddd + DDD series examples + + + 1.0.1 + 2.22.0 + + + + + org.springframework.boot + spring-boot-starter-data-mongodb + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + + + org.junit.platform + junit-platform-launcher + ${junit-platform.version} + test + + + org.joda + joda-money + ${joda-money.version} + + + org.springframework.boot + spring-boot-starter-data-jpa + + + com.h2database + h2 + runtime + + + mysql + mysql-connector-java + runtime + + + org.postgresql + postgresql + runtime + + + org.springframework.boot + spring-boot-devtools + true + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-test + test + + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + test + + + \ No newline at end of file diff --git a/ddd/src/main/java/com/baeldung/ddd/PersistingDddAggregatesApplication.java b/ddd/src/main/java/com/baeldung/ddd/PersistingDddAggregatesApplication.java new file mode 100644 index 0000000000..cd9be34278 --- /dev/null +++ b/ddd/src/main/java/com/baeldung/ddd/PersistingDddAggregatesApplication.java @@ -0,0 +1,12 @@ +package com.baeldung.ddd; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class PersistingDddAggregatesApplication { + + public static void main(String[] args) { + SpringApplication.run(PersistingDddAggregatesApplication.class, args); + } +} diff --git a/ddd/src/main/java/com/baeldung/ddd/order/Order.java b/ddd/src/main/java/com/baeldung/ddd/order/Order.java new file mode 100644 index 0000000000..125bc5fe2d --- /dev/null +++ b/ddd/src/main/java/com/baeldung/ddd/order/Order.java @@ -0,0 +1,52 @@ +package com.baeldung.ddd.order; + +import java.util.ArrayList; +import java.util.List; + +import org.joda.money.Money; + +public class Order { + private final List orderLines; + private Money totalCost; + + public Order(List orderLines) { + checkNotNull(orderLines); + if (orderLines.isEmpty()) { + throw new IllegalArgumentException("Order must have at least one order line item"); + } + this.orderLines = new ArrayList<>(orderLines); + totalCost = calculateTotalCost(); + } + + public void addLineItem(OrderLine orderLine) { + checkNotNull(orderLine); + orderLines.add(orderLine); + totalCost = totalCost.plus(orderLine.cost()); + } + + public List getOrderLines() { + return new ArrayList<>(orderLines); + } + + public void removeLineItem(int line) { + OrderLine removedLine = orderLines.remove(line); + totalCost = totalCost.minus(removedLine.cost()); + } + + public Money totalCost() { + return totalCost; + } + + private Money calculateTotalCost() { + return orderLines.stream() + .map(OrderLine::cost) + .reduce(Money::plus) + .get(); + } + + private static void checkNotNull(Object par) { + if (par == null) { + throw new NullPointerException("Parameter cannot be null"); + } + } +} diff --git a/ddd/src/main/java/com/baeldung/ddd/order/OrderLine.java b/ddd/src/main/java/com/baeldung/ddd/order/OrderLine.java new file mode 100644 index 0000000000..000f55f2fb --- /dev/null +++ b/ddd/src/main/java/com/baeldung/ddd/order/OrderLine.java @@ -0,0 +1,67 @@ +package com.baeldung.ddd.order; + +import org.joda.money.Money; + +public class OrderLine { + private final Product product; + private final int quantity; + + public OrderLine(Product product, int quantity) { + super(); + this.product = product; + this.quantity = quantity; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + OrderLine other = (OrderLine) obj; + if (product == null) { + if (other.product != null) { + return false; + } + } else if (!product.equals(other.product)) { + return false; + } + if (quantity != other.quantity) { + return false; + } + return true; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((product == null) ? 0 : product.hashCode()); + result = prime * result + quantity; + return result; + } + + @Override + public String toString() { + return "OrderLine [product=" + product + ", quantity=" + quantity + "]"; + } + + Money cost() { + return product.getPrice() + .multipliedBy(quantity); + } + + Product getProduct() { + return product; + } + + int getQuantity() { + return quantity; + } + +} diff --git a/ddd/src/main/java/com/baeldung/ddd/order/Product.java b/ddd/src/main/java/com/baeldung/ddd/order/Product.java new file mode 100644 index 0000000000..0afcaa434f --- /dev/null +++ b/ddd/src/main/java/com/baeldung/ddd/order/Product.java @@ -0,0 +1,52 @@ +package com.baeldung.ddd.order; + +import org.joda.money.Money; + +public class Product { + private final Money price; + + public Product(Money price) { + super(); + this.price = price; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + Product other = (Product) obj; + if (price == null) { + if (other.price != null) { + return false; + } + } else if (!price.equals(other.price)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((price == null) ? 0 : price.hashCode()); + return result; + } + + @Override + public String toString() { + return "Product [price=" + price + "]"; + } + + Money getPrice() { + return price; + } + +} diff --git a/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaOrder.java b/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaOrder.java new file mode 100644 index 0000000000..ed11b0dca4 --- /dev/null +++ b/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaOrder.java @@ -0,0 +1,111 @@ +package com.baeldung.ddd.order.jpa; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.ElementCollection; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name = "order_table") +class JpaOrder { + private String currencyUnit; + @Id + @GeneratedValue + private Long id; + @ElementCollection(fetch = FetchType.EAGER) + private final List orderLines; + private BigDecimal totalCost; + + JpaOrder() { + totalCost = null; + orderLines = new ArrayList<>(); + } + + JpaOrder(List orderLines) { + checkNotNull(orderLines); + if (orderLines.isEmpty()) { + throw new IllegalArgumentException("Order must have at least one order line item"); + } + this.orderLines = new ArrayList<>(orderLines); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + JpaOrder other = (JpaOrder) obj; + if (id == null) { + if (other.id != null) { + return false; + } + } else if (!id.equals(other.id)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + return result; + } + + @Override + public String toString() { + return "JpaOrder [currencyUnit=" + currencyUnit + ", id=" + id + ", orderLines=" + orderLines + ", totalCost=" + totalCost + "]"; + } + + void addLineItem(JpaOrderLine orderLine) { + checkNotNull(orderLine); + orderLines.add(orderLine); + } + + String getCurrencyUnit() { + return currencyUnit; + } + + Long getId() { + return id; + } + + List getOrderLines() { + return new ArrayList<>(orderLines); + } + + BigDecimal getTotalCost() { + return totalCost; + } + + void removeLineItem(int line) { + JpaOrderLine removedLine = orderLines.remove(line); + } + + void setCurrencyUnit(String currencyUnit) { + this.currencyUnit = currencyUnit; + } + + void setTotalCost(BigDecimal totalCost) { + this.totalCost = totalCost; + } + + private static void checkNotNull(Object par) { + if (par == null) { + throw new NullPointerException("Parameter cannot be null"); + } + } +} diff --git a/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaOrderLine.java b/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaOrderLine.java new file mode 100644 index 0000000000..a3b50f0502 --- /dev/null +++ b/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaOrderLine.java @@ -0,0 +1,70 @@ +package com.baeldung.ddd.order.jpa; + +import javax.persistence.Embeddable; +import javax.persistence.Embedded; + +@Embeddable +class JpaOrderLine { + @Embedded + private final JpaProduct product; + private final int quantity; + + JpaOrderLine() { + quantity = 0; + product = null; + } + + JpaOrderLine(JpaProduct product, int quantity) { + super(); + this.product = product; + this.quantity = quantity; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + JpaOrderLine other = (JpaOrderLine) obj; + if (product == null) { + if (other.product != null) { + return false; + } + } else if (!product.equals(other.product)) { + return false; + } + if (quantity != other.quantity) { + return false; + } + return true; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((product == null) ? 0 : product.hashCode()); + result = prime * result + quantity; + return result; + } + + @Override + public String toString() { + return "JpaOrderLine [product=" + product + ", quantity=" + quantity + "]"; + } + + JpaProduct getProduct() { + return product; + } + + int getQuantity() { + return quantity; + } + +} diff --git a/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaOrderRepository.java b/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaOrderRepository.java new file mode 100644 index 0000000000..b6e08e8372 --- /dev/null +++ b/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaOrderRepository.java @@ -0,0 +1,7 @@ +package com.baeldung.ddd.order.jpa; + +import org.springframework.data.jpa.repository.JpaRepository; + +public interface JpaOrderRepository extends JpaRepository { + +} diff --git a/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaProduct.java b/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaProduct.java new file mode 100644 index 0000000000..61e67fa12a --- /dev/null +++ b/ddd/src/main/java/com/baeldung/ddd/order/jpa/JpaProduct.java @@ -0,0 +1,79 @@ +package com.baeldung.ddd.order.jpa; + +import java.math.BigDecimal; + +import javax.persistence.Embeddable; + +@Embeddable +class JpaProduct { + private String currencyUnit; + private BigDecimal price; + + public JpaProduct() { + } + + public JpaProduct(BigDecimal price, String currencyUnit) { + super(); + this.price = price; + currencyUnit = currencyUnit; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + JpaProduct other = (JpaProduct) obj; + if (currencyUnit == null) { + if (other.currencyUnit != null) { + return false; + } + } else if (!currencyUnit.equals(other.currencyUnit)) { + return false; + } + if (price == null) { + if (other.price != null) { + return false; + } + } else if (!price.equals(other.price)) { + return false; + } + return true; + } + + public String getCurrencyUnit() { + return currencyUnit; + } + + public BigDecimal getPrice() { + return price; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((currencyUnit == null) ? 0 : currencyUnit.hashCode()); + result = prime * result + ((price == null) ? 0 : price.hashCode()); + return result; + } + + public void setCurrencyUnit(String currencyUnit) { + this.currencyUnit = currencyUnit; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + @Override + public String toString() { + return "JpaProduct [currencyUnit=" + currencyUnit + ", price=" + price + "]"; + } +} diff --git a/ddd/src/main/java/com/baeldung/ddd/order/mongo/OrderMongoRepository.java b/ddd/src/main/java/com/baeldung/ddd/order/mongo/OrderMongoRepository.java new file mode 100644 index 0000000000..79f9ec9f21 --- /dev/null +++ b/ddd/src/main/java/com/baeldung/ddd/order/mongo/OrderMongoRepository.java @@ -0,0 +1,9 @@ +package com.baeldung.ddd.order.mongo; + +import org.springframework.data.mongodb.repository.MongoRepository; + +import com.baeldung.ddd.order.Order; + +public interface OrderMongoRepository extends MongoRepository { + +} diff --git a/ddd/src/test/java/com/baeldung/ddd/order/OrderTest.java b/ddd/src/test/java/com/baeldung/ddd/order/OrderTest.java new file mode 100644 index 0000000000..431a6a5293 --- /dev/null +++ b/ddd/src/test/java/com/baeldung/ddd/order/OrderTest.java @@ -0,0 +1,70 @@ +package com.baeldung.ddd.order; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.catchThrowable; + +import java.util.ArrayList; +import java.util.Arrays; + +import org.joda.money.CurrencyUnit; +import org.joda.money.Money; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +class OrderTest { + @DisplayName("given order with two items, when calculate total cost, then sum is returned") + @Test + void test0() throws Exception { + // given + OrderLine ol0 = new OrderLine(new Product(Money.of(CurrencyUnit.USD, 10.00)), 2); + OrderLine ol1 = new OrderLine(new Product(Money.of(CurrencyUnit.USD, 5.00)), 10); + Order order = new Order(Arrays.asList(ol0, ol1)); + + // when + Money totalCost = order.totalCost(); + + // then + assertThat(totalCost).isEqualTo(Money.of(CurrencyUnit.USD, 70.00)); + } + + @DisplayName("when create order without line items, then exception is thrown") + @Test + void test1() throws Exception { + // when + Throwable throwable = catchThrowable(() -> new Order(new ArrayList<>())); + + // then + assertThat(throwable).isInstanceOf(IllegalArgumentException.class); + } + + @DisplayName("given order with two line items, when add another line item, then total cost is updated") + @Test + void test2() throws Exception { + // given + OrderLine ol0 = new OrderLine(new Product(Money.of(CurrencyUnit.USD, 10.00)), 1); + OrderLine ol1 = new OrderLine(new Product(Money.of(CurrencyUnit.USD, 5.00)), 1); + Order order = new Order(Arrays.asList(ol0, ol1)); + + // when + order.addLineItem(new OrderLine(new Product(Money.of(CurrencyUnit.USD, 20.00)), 2)); + + // then + assertThat(order.totalCost()).isEqualTo(Money.of(CurrencyUnit.USD, 55)); + } + + @DisplayName("given order with three line items, when remove item, then total cost is updated") + @Test + void test3() throws Exception { + // given + OrderLine ol0 = new OrderLine(new Product(Money.of(CurrencyUnit.USD, 10.00)), 1); + OrderLine ol1 = new OrderLine(new Product(Money.of(CurrencyUnit.USD, 20.00)), 1); + OrderLine ol2 = new OrderLine(new Product(Money.of(CurrencyUnit.USD, 30.00)), 1); + Order order = new Order(Arrays.asList(ol0, ol1, ol2)); + + // when + order.removeLineItem(1); + + // then + assertThat(order.totalCost()).isEqualTo(Money.of(CurrencyUnit.USD, 40.00)); + } +} diff --git a/ddd/src/test/java/com/baeldung/ddd/order/jpa/PersistOrderIntegrationTest.java b/ddd/src/test/java/com/baeldung/ddd/order/jpa/PersistOrderIntegrationTest.java new file mode 100644 index 0000000000..c503c9960b --- /dev/null +++ b/ddd/src/test/java/com/baeldung/ddd/order/jpa/PersistOrderIntegrationTest.java @@ -0,0 +1,40 @@ +package com.baeldung.ddd.order.jpa; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.math.BigDecimal; +import java.util.Arrays; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; + +@SpringJUnitConfig +@SpringBootTest +public class PersistOrderIntegrationTest { + @Autowired + private JpaOrderRepository repository; + + @DisplayName("given order with two line items, when persist, then order is saved") + @Test + public void test() throws Exception { + // given + JpaOrder order = prepareTestOrderWithTwoLineItems(); + + // when + JpaOrder savedOrder = repository.save(order); + + // then + JpaOrder foundOrder = repository.findById(savedOrder.getId()) + .get(); + assertThat(foundOrder.getOrderLines()).hasSize(2); + } + + private JpaOrder prepareTestOrderWithTwoLineItems() { + JpaOrderLine ol0 = new JpaOrderLine(new JpaProduct(BigDecimal.valueOf(10.00), "USD"), 2); + JpaOrderLine ol1 = new JpaOrderLine(new JpaProduct(BigDecimal.valueOf(5.00), "USD"), 10); + return new JpaOrder(Arrays.asList(ol0, ol1)); + } +} diff --git a/ddd/src/test/java/com/baeldung/ddd/order/jpa/ViolateOrderBusinessRulesTest.java b/ddd/src/test/java/com/baeldung/ddd/order/jpa/ViolateOrderBusinessRulesTest.java new file mode 100644 index 0000000000..3eda9250f9 --- /dev/null +++ b/ddd/src/test/java/com/baeldung/ddd/order/jpa/ViolateOrderBusinessRulesTest.java @@ -0,0 +1,35 @@ +package com.baeldung.ddd.order.jpa; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.math.BigDecimal; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +public class ViolateOrderBusinessRulesTest { + @DisplayName("given two non-zero order line items, when create an order with them, it's possible to set total cost to zero") + @Test + void test() throws Exception { + // given + // available products + JpaProduct lungChingTea = new JpaProduct(BigDecimal.valueOf(10.00), "USD"); + JpaProduct gyokuroMiyazakiTea = new JpaProduct(BigDecimal.valueOf(20.00), "USD"); + // Lung Ching tea order line + JpaOrderLine orderLine0 = new JpaOrderLine(lungChingTea, 2); + // Gyokuro Miyazaki tea order line + JpaOrderLine orderLine1 = new JpaOrderLine(gyokuroMiyazakiTea, 3); + + // when + // create the order + JpaOrder order = new JpaOrder(); + order.addLineItem(orderLine0); + order.addLineItem(orderLine1); + order.setTotalCost(BigDecimal.ZERO); + order.setCurrencyUnit("USD"); + + // then + // this doesn't look good... + assertThat(order.getTotalCost()).isEqualTo(BigDecimal.ZERO); + } +} diff --git a/ddd/src/test/java/com/baeldung/ddd/order/mongo/OrderMongoIntegrationTest.java b/ddd/src/test/java/com/baeldung/ddd/order/mongo/OrderMongoIntegrationTest.java new file mode 100644 index 0000000000..ca4315c416 --- /dev/null +++ b/ddd/src/test/java/com/baeldung/ddd/order/mongo/OrderMongoIntegrationTest.java @@ -0,0 +1,50 @@ +package com.baeldung.ddd.order.mongo; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Arrays; +import java.util.List; + +import org.joda.money.CurrencyUnit; +import org.joda.money.Money; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; + +import com.baeldung.ddd.order.Order; +import com.baeldung.ddd.order.OrderLine; +import com.baeldung.ddd.order.Product; + +@SpringJUnitConfig +@SpringBootTest +public class OrderMongoIntegrationTest { + @Autowired + private OrderMongoRepository repo; + + @DisplayName("given order with two line items, when persist using mongo repository, then order is saved") + @Test + void test() throws Exception { + // given + Order order = prepareTestOrderWithTwoLineItems(); + + // when + repo.save(order); + + // then + List foundOrders = repo.findAll(); + assertThat(foundOrders).hasSize(1); + List foundOrderLines = foundOrders.iterator() + .next() + .getOrderLines(); + assertThat(foundOrderLines).hasSize(2); + assertThat(foundOrderLines).containsOnlyElementsOf(order.getOrderLines()); + } + + private Order prepareTestOrderWithTwoLineItems() { + OrderLine ol0 = new OrderLine(new Product(Money.of(CurrencyUnit.USD, 10.00)), 2); + OrderLine ol1 = new OrderLine(new Product(Money.of(CurrencyUnit.USD, 5.00)), 10); + return new Order(Arrays.asList(ol0, ol1)); + } +} diff --git a/ejb/README.md b/ejb/README.md deleted file mode 100644 index f47277bf8f..0000000000 --- a/ejb/README.md +++ /dev/null @@ -1,6 +0,0 @@ -## Relevant articles: - -- [Guide to EJB Set-up](http://www.baeldung.com/ejb-intro) -- [Java EE Session Beans](http://www.baeldung.com/ejb-session-beans) -- [Introduction to EJB JNDI Lookup on WildFly Application Server](http://www.baeldung.com/wildfly-ejb-jndi) -- [A Guide to Message Driven Beans in EJB](http://www.baeldung.com/ejb-message-driven-beans) diff --git a/ejb/ejb-client/pom.xml b/ejb/ejb-client/pom.xml deleted file mode 100755 index 6231030cec..0000000000 --- a/ejb/ejb-client/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - 4.0.0 - ejb-client - EJB3 Client Maven - - - com.baeldung.ejb - ejb - 1.0-SNAPSHOT - - - - - org.wildfly - wildfly-ejb-client-bom - pom - - - com.baeldung.ejb - ejb-remote - ejb - - - \ No newline at end of file diff --git a/ejb/ejb-remote/src/main/resources/META-INF/ejb-jar.xml b/ejb/ejb-remote/src/main/resources/META-INF/ejb-jar.xml deleted file mode 100755 index d6c2200198..0000000000 --- a/ejb/ejb-remote/src/main/resources/META-INF/ejb-jar.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - remote - - diff --git a/ejb/ejb-session-beans/pom.xml b/ejb/ejb-session-beans/pom.xml deleted file mode 100644 index da76169729..0000000000 --- a/ejb/ejb-session-beans/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - 4.0.0 - ejb-session-beans - - - com.baeldung.ejb - ejb - 1.0-SNAPSHOT - - - - - - org.jboss.arquillian - arquillian-bom - ${arquillian-bom.version} - import - pom - - - - - - - javax - javaee-api - provided - - - org.jboss.arquillian.junit - arquillian-junit-container - test - - - - - - arquillian-glassfish-embedded - - true - - - - org.jboss.arquillian.container - arquillian-glassfish-embedded-3.1 - ${arquillian-glassfish-embedded-3.1.version} - test - - - org.glassfish.main.extras - glassfish-embedded-all - ${glassfish-embedded-all.version} - test - - - - - - - - - maven-war-plugin - ${maven-war-plugin.version} - - false - - - - - - - UTF-8 - 1.1.13.Final - 2.2.6 - 1.1.12.Final - 1.0.0.Final - 4.12 - 7.0 - 1.0.0.CR4 - 3.1.2 - - - \ No newline at end of file diff --git a/ejb/pom.xml b/ejb/pom.xml deleted file mode 100755 index 4cb700d087..0000000000 --- a/ejb/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - 4.0.0 - com.baeldung.ejb - ejb - 1.0-SNAPSHOT - pom - ejb - EJB Tutorial - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - ejb-remote - ejb-session-beans - - - - - - com.baeldung.ejb - ejb-remote - ${ejb-remote.version} - ejb - - - com.baeldung.ejb - ejb-session-beans - ${ejb-session-beans.version} - ejb - - - javax - javaee-api - ${javaee-api.version} - provided - - - org.wildfly - wildfly-ejb-client-bom - ${wildfly-ejb-client-bom.version} - pom - import - - - - - - - - - maven-ejb-plugin - ${maven-ejb-plugin.version} - - ${ejbVersion} - - - - - - - - - jboss-public-repository-group - JBoss Public Maven Repository Group - http://repository.jboss.org/nexus/content/groups/public/ - default - - true - never - - - true - never - - - - - - 2.5.7 - 3.4.11 - 0.10 - 2.19.1 - 1.0-SNAPSHOT - 1.0-SNAPSHOT - 7.0 - 2.4 - 3.2 - 10.1.0.Final - - - \ No newline at end of file diff --git a/ejb/wildfly/wildfly-ejb/src/main/resources/logback.xml b/ejb/wildfly/wildfly-ejb/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/ejb/wildfly/wildfly-ejb/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/ejb/wildfly/wildfly-jpa/src/main/resources/logback.xml b/ejb/wildfly/wildfly-jpa/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/ejb/wildfly/wildfly-jpa/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/gradle/README.md b/gradle/README.md index 229466dfec..a1f5c74c57 100644 --- a/gradle/README.md +++ b/gradle/README.md @@ -4,3 +4,4 @@ - [Creating a Fat Jar in Gradle](http://www.baeldung.com/gradle-fat-jar) - [A Custom Task in Gradle](http://www.baeldung.com/gradle-custom-task) - [Kotlin Dependency Injection with Kodein](http://www.baeldung.com/kotlin-kodein-dependency-injection) +- [Using JUnit 5 with Gradle](https://www.baeldung.com/junit-5-gradle) diff --git a/jackson/README.md b/jackson/README.md index a05c95de94..04e88d0ea1 100644 --- a/jackson/README.md +++ b/jackson/README.md @@ -36,3 +36,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Jackson – Change Name of Field](http://www.baeldung.com/jackson-name-of-property) - [Serialize Only Fields that meet a Custom Criteria with Jackson](http://www.baeldung.com/jackson-serialize-field-custom-criteria) - [Mapping Nested Values with Jackson](http://www.baeldung.com/jackson-nested-values) +- [Convert XML to JSON Using Jackson](https://www.baeldung.com/jackson-convert-xml-json) diff --git a/java-dates/README.md b/java-dates/README.md index f99bfeb861..66046b16a6 100644 --- a/java-dates/README.md +++ b/java-dates/README.md @@ -23,3 +23,4 @@ - [Increment Date in Java](http://www.baeldung.com/java-increment-date) - [Add Hours To a Date In Java](http://www.baeldung.com/java-add-hours-date) - [Guide to DateTimeFormatter](https://www.baeldung.com/java-datetimeformatter) +- [Format ZonedDateTime to String](https://www.baeldung.com/java-format-zoned-datetime-string) diff --git a/java-dates/src/test/java/com/baeldung/datetime/ConvertInstantToTimestampUnitTest.java b/java-dates/src/test/java/com/baeldung/datetime/ConvertInstantToTimestampUnitTest.java new file mode 100644 index 0000000000..3ba01a591a --- /dev/null +++ b/java-dates/src/test/java/com/baeldung/datetime/ConvertInstantToTimestampUnitTest.java @@ -0,0 +1,30 @@ +package com.baeldung.datetime; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.sql.Timestamp; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.time.Instant; +import java.time.ZoneId; +import java.util.TimeZone; + +import org.junit.Test; + +public class ConvertInstantToTimestampUnitTest { + + @Test + public void givenInstant_whenConvertedToTimestamp_thenGetTimestampWithSamePointOnTimeline() { + Instant instant = Instant.now(); + Timestamp timestamp = Timestamp.from(instant); // same point on the time-line as Instant + assertThat(instant.toEpochMilli()).isEqualTo(timestamp.getTime()); + + instant = timestamp.toInstant(); + assertThat(instant.toEpochMilli()).isEqualTo(timestamp.getTime()); + + DateFormat df = DateFormat.getDateTimeInstance(); + df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SS'Z'"); + df.setTimeZone(TimeZone.getTimeZone("UTC")); + assertThat(instant.toString()).isEqualTo(df.format(timestamp).toString()); + } +} diff --git a/java-ee-8-security-api/pom.xml b/java-ee-8-security-api/pom.xml index 3d235e10a8..7546839492 100644 --- a/java-ee-8-security-api/pom.xml +++ b/java-ee-8-security-api/pom.xml @@ -41,7 +41,7 @@ - https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/nightly/2018-05-25_1422/openliberty-all-20180525-1300.zip + https://public.dhe.ibm.com/ibmdl/export/pub/software/openliberty/runtime/release/2018-09-05_2337/openliberty-18.0.0.3.zip true diff --git a/java-strings/README.md b/java-strings/README.md index a653087401..1b24a2b821 100644 --- a/java-strings/README.md +++ b/java-strings/README.md @@ -35,3 +35,4 @@ - [String Not Empty Test Assertions in Java](https://www.baeldung.com/java-assert-string-not-empty) - [String Performance Hints](https://www.baeldung.com/java-string-performance) - [Using indexOf to Find All Occurrences of a Word in a String](https://www.baeldung.com/java-indexOf-find-string-occurrences) +- [Java Base64 Encoding and Decoding](https://www.baeldung.com/java-base64-encode-and-decode) diff --git a/java-strings/src/main/java/com/baeldung/string/padding/StringPaddingUtil.java b/java-strings/src/main/java/com/baeldung/string/padding/StringPaddingUtil.java new file mode 100644 index 0000000000..80d05bb42a --- /dev/null +++ b/java-strings/src/main/java/com/baeldung/string/padding/StringPaddingUtil.java @@ -0,0 +1,34 @@ +package com.baeldung.string.padding; + +public class StringPaddingUtil { + + public static String padLeftSpaces(String inputString, int length) { + if (inputString.length() >= length) { + return inputString; + } + StringBuilder sb = new StringBuilder(); + while (sb.length() < length - inputString.length()) { + sb.append(' '); + } + sb.append(inputString); + + return sb.toString(); + } + + public static String padLeft(String inputString, int length) { + if (inputString.length() >= length) { + return inputString; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + sb.append(' '); + } + return sb.substring(inputString.length()) + inputString; + } + + public static String padLeftZeros(String inputString, int length) { + return String + .format("%1$" + length + "s", inputString) + .replace(' ', '0'); + } +} diff --git a/java-strings/src/test/java/com/baeldung/string/SubstringUnitTest.java b/java-strings/src/test/java/com/baeldung/string/SubstringUnitTest.java index 3a4e231828..eb397f2a3f 100644 --- a/java-strings/src/test/java/com/baeldung/string/SubstringUnitTest.java +++ b/java-strings/src/test/java/com/baeldung/string/SubstringUnitTest.java @@ -59,4 +59,14 @@ public class SubstringUnitTest { Assert.assertEquals("United States of America", text.substring(text.indexOf('(') + 1, text.indexOf(')'))); } + @Test + public void givenAString_whenUsedSubstringWithLastIndexOf_ShouldReturnProperSubstring() { + Assert.assertEquals("1984", text.substring(text.lastIndexOf('-') + 1, text.indexOf('.'))); + } + + @Test + public void givenAString_whenUsedSubstringWithIndexOfAString_ShouldReturnProperSubstring() { + Assert.assertEquals("USA (United States of America)", text.substring(text.indexOf("USA"), text.indexOf(')') + 1)); + } + } diff --git a/java-strings/src/test/java/com/baeldung/string/padding/StringPaddingUtilUnitTest.java b/java-strings/src/test/java/com/baeldung/string/padding/StringPaddingUtilUnitTest.java new file mode 100644 index 0000000000..f6a077a88e --- /dev/null +++ b/java-strings/src/test/java/com/baeldung/string/padding/StringPaddingUtilUnitTest.java @@ -0,0 +1,50 @@ +package com.baeldung.string.padding; + +import com.google.common.base.Strings; +import org.apache.commons.lang3.StringUtils; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class StringPaddingUtilUnitTest { + + String inputString = "123456"; + String expectedPaddedStringSpaces = " 123456"; + String expectedPaddedStringZeros = "0000123456"; + int minPaddedStringLength = 10; + + @Test + public void givenString_whenPaddingWithSpaces_thenStringPaddedMatches() { + assertEquals(expectedPaddedStringSpaces, StringPaddingUtil.padLeftSpaces(inputString, minPaddedStringLength)); + } + + @Test + public void givenString_whenPaddingWithSpacesUsingSubstring_thenStringPaddedMatches() { + assertEquals(expectedPaddedStringSpaces, StringPaddingUtil.padLeft(inputString, minPaddedStringLength)); + } + + @Test + public void givenString_whenPaddingWithZeros_thenStringPaddedMatches() { + assertEquals(expectedPaddedStringZeros, StringPaddingUtil.padLeftZeros(inputString, minPaddedStringLength)); + } + + @Test + public void givenString_whenPaddingWithSpacesUsingStringUtils_thenStringPaddedMatches() { + assertEquals(expectedPaddedStringSpaces, StringUtils.leftPad(inputString, minPaddedStringLength)); + } + + @Test + public void givenString_whenPaddingWithZerosUsingStringUtils_thenStringPaddedMatches() { + assertEquals(expectedPaddedStringZeros, StringUtils.leftPad(inputString, minPaddedStringLength, "0")); + } + + @Test + public void givenString_whenPaddingWithSpacesUsingGuavaStrings_thenStringPaddedMatches() { + assertEquals(expectedPaddedStringSpaces, Strings.padStart(inputString, minPaddedStringLength, ' ')); + } + + @Test + public void givenString_whenPaddingWithZerosUsingGuavaStrings_thenStringPaddedMatches() { + assertEquals(expectedPaddedStringZeros, Strings.padStart(inputString, minPaddedStringLength, '0')); + } +} diff --git a/jersey/README.md b/jersey/README.md index c548a79c6d..1dd871b3e8 100644 --- a/jersey/README.md +++ b/jersey/README.md @@ -2,3 +2,4 @@ - [Jersey MVC Support](https://www.baeldung.com/jersey-mvc) - [Bean Validation in Jersey](https://www.baeldung.com/jersey-bean-validation) - [Set a Response Body in JAX-RS](https://www.baeldung.com/jax-rs-response) +- [Exploring the Jersey Test Framework](https://www.baeldung.com/jersey-test) diff --git a/jhipster/jhipster-uaa/gateway/.editorconfig b/jhipster/jhipster-uaa/gateway/.editorconfig new file mode 100644 index 0000000000..a03599dd04 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/.editorconfig @@ -0,0 +1,24 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] + +# Change these settings to your own preference +indent_style = space +indent_size = 4 + +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[{package,bower}.json] +indent_style = space +indent_size = 2 diff --git a/jhipster/jhipster-uaa/gateway/.gitattributes b/jhipster/jhipster-uaa/gateway/.gitattributes new file mode 100644 index 0000000000..8ab72fe637 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/.gitattributes @@ -0,0 +1,149 @@ +# This file is inspired by https://github.com/alexkaratarakis/gitattributes +# +# Auto detect text files and perform LF normalization +# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +* text=auto + +# The above will handle all files NOT found below +# These files are text and should be normalized (Convert crlf => lf) + +*.bat text eol=crlf +*.coffee text +*.css text +*.cql text +*.df text +*.ejs text +*.html text +*.java text +*.js text +*.json text +*.less text +*.properties text +*.sass text +*.scss text +*.sh text eol=lf +*.sql text +*.txt text +*.ts text +*.xml text +*.yaml text +*.yml text + +# Documents +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.markdown text +*.md text +*.adoc text +*.textile text +*.mustache text +*.csv text +*.tab text +*.tsv text +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +copyright text +*COPYRIGHT* text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as an asset (binary) by default. If you want to treat it as text, +# comment-out the following line and uncomment the line after. +*.svg binary +#*.svg text +*.eps binary + +# These files are binary and should be left untouched +# (binary is a macro for -text -diff) +*.class binary +*.jar binary +*.war binary + +## LINTERS +.csslintrc text +.eslintrc text +.jscsrc text +.jshintrc text +.jshintignore text +.stylelintrc text + +## CONFIGS +*.bowerrc text +*.conf text +*.config text +.editorconfig text +.gitattributes text +.gitconfig text +.gitignore text +.htaccess text +*.npmignore text + +## HEROKU +Procfile text +.slugignore text + +## AUDIO +*.kar binary +*.m4a binary +*.mid binary +*.midi binary +*.mp3 binary +*.ogg binary +*.ra binary + +## VIDEO +*.3gpp binary +*.3gp binary +*.as binary +*.asf binary +*.asx binary +*.fla binary +*.flv binary +*.m4v binary +*.mng binary +*.mov binary +*.mp4 binary +*.mpeg binary +*.mpg binary +*.swc binary +*.swf binary +*.webm binary + +## ARCHIVES +*.7z binary +*.gz binary +*.rar binary +*.tar binary +*.zip binary + +## FONTS +*.ttf binary +*.eot binary +*.otf binary +*.woff binary +*.woff2 binary diff --git a/jhipster/jhipster-uaa/gateway/.gitignore b/jhipster/jhipster-uaa/gateway/.gitignore new file mode 100644 index 0000000000..f1f6845d33 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/.gitignore @@ -0,0 +1,145 @@ +###################### +# Project Specific +###################### +/src/main/webapp/content/css/main.css +/target/www/** +/src/test/javascript/coverage/ + +###################### +# Node +###################### +/node/ +node_tmp/ +node_modules/ +npm-debug.log.* +/.awcache/* +/.cache-loader/* + +###################### +# SASS +###################### +.sass-cache/ + +###################### +# Eclipse +###################### +*.pydevproject +.project +.metadata +tmp/ +tmp/**/* +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath +.factorypath +/src/main/resources/rebel.xml + +# External tool builders +.externalToolBuilders/** + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + +###################### +# Intellij +###################### +.idea/ +*.iml +*.iws +*.ipr +*.ids +*.orig +classes/ +out/ + +###################### +# Visual Studio Code +###################### +.vscode/ + +###################### +# Maven +###################### +/log/ +/target/ + +###################### +# Gradle +###################### +.gradle/ +/build/ + +###################### +# Package Files +###################### +*.jar +*.war +*.ear +*.db + +###################### +# Windows +###################### +# Windows image file caches +Thumbs.db + +# Folder config file +Desktop.ini + +###################### +# Mac OSX +###################### +.DS_Store +.svn + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +###################### +# Directories +###################### +/bin/ +/deploy/ + +###################### +# Logs +###################### +*.log* + +###################### +# Others +###################### +*.class +*.*~ +*~ +.merge_file* + +###################### +# Gradle Wrapper +###################### +!gradle/wrapper/gradle-wrapper.jar + +###################### +# Maven Wrapper +###################### +!.mvn/wrapper/maven-wrapper.jar + +###################### +# ESLint +###################### +.eslintcache diff --git a/jhipster/jhipster-uaa/gateway/.huskyrc b/jhipster/jhipster-uaa/gateway/.huskyrc new file mode 100644 index 0000000000..9e18d87674 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/.huskyrc @@ -0,0 +1,5 @@ +{ + "hooks": { + "pre-commit": "lint-staged" + } +} diff --git a/jhipster/jhipster-uaa/gateway/.jhipster/Quote.json b/jhipster/jhipster-uaa/gateway/.jhipster/Quote.json new file mode 100644 index 0000000000..af06567fff --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/.jhipster/Quote.json @@ -0,0 +1,38 @@ +{ + "name": "Quote", + "fields": [ + { + "fieldName": "symbol", + "fieldType": "String", + "fieldValidateRules": [ + "required", + "unique" + ] + }, + { + "fieldName": "price", + "fieldType": "BigDecimal", + "fieldValidateRules": [ + "required" + ] + }, + { + "fieldName": "lastTrade", + "fieldType": "ZonedDateTime", + "fieldValidateRules": [ + "required" + ] + } + ], + "relationships": [], + "changelogDate": "20181020145525", + "entityTableName": "quote", + "dto": "mapstruct", + "pagination": "pagination", + "service": "serviceImpl", + "jpaMetamodelFiltering": true, + "fluentMethods": true, + "clientRootFolder": "quotes", + "applications": "*", + "microserviceName": "quotes" +} \ No newline at end of file diff --git a/jhipster/jhipster-uaa/gateway/.mvn/wrapper/MavenWrapperDownloader.java b/jhipster/jhipster-uaa/gateway/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 0000000000..fa4f7b499f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,110 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/jhipster/jhipster-uaa/gateway/.mvn/wrapper/maven-wrapper.jar b/jhipster/jhipster-uaa/gateway/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000000..01e6799737 Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/.mvn/wrapper/maven-wrapper.jar differ diff --git a/jhipster/jhipster-uaa/gateway/.mvn/wrapper/maven-wrapper.properties b/jhipster/jhipster-uaa/gateway/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000000..00d32aab1d --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip \ No newline at end of file diff --git a/jhipster/jhipster-uaa/gateway/.prettierignore b/jhipster/jhipster-uaa/gateway/.prettierignore new file mode 100644 index 0000000000..2c085d1d2f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/.prettierignore @@ -0,0 +1,2 @@ +node_modules +target diff --git a/jhipster/jhipster-uaa/gateway/.prettierrc b/jhipster/jhipster-uaa/gateway/.prettierrc new file mode 100644 index 0000000000..6fd4aa1267 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/.prettierrc @@ -0,0 +1,12 @@ +# Prettier configuration + +printWidth: 140 +singleQuote: true +tabWidth: 4 +useTabs: false + +# js and ts rules: +arrowParens: avoid + +# jsx and tsx rules: +jsxBracketSameLine: false diff --git a/jhipster/jhipster-uaa/gateway/.yo-rc.json b/jhipster/jhipster-uaa/gateway/.yo-rc.json new file mode 100644 index 0000000000..4e950cd7b9 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/.yo-rc.json @@ -0,0 +1,39 @@ +{ + "generator-jhipster": { + "promptValues": { + "packageName": "com.baeldung.jhipster.gateway", + "nativeLanguage": "en" + }, + "jhipsterVersion": "5.4.2", + "applicationType": "gateway", + "baseName": "gateway", + "packageName": "com.baeldung.jhipster.gateway", + "packageFolder": "com/baeldung/jhipster/gateway", + "serverPort": "8080", + "authenticationType": "uaa", + "uaaBaseName": "uaa", + "cacheProvider": "hazelcast", + "enableHibernateCache": true, + "websocket": false, + "databaseType": "sql", + "devDatabaseType": "h2Disk", + "prodDatabaseType": "mysql", + "searchEngine": false, + "messageBroker": false, + "serviceDiscoveryType": "eureka", + "buildTool": "maven", + "enableSwaggerCodegen": false, + "clientFramework": "angularX", + "useSass": true, + "clientPackageManager": "npm", + "testFrameworks": [], + "jhiPrefix": "jhi", + "enableTranslation": true, + "nativeLanguage": "en", + "languages": [ + "en", + "fr", + "pt-br" + ] + } +} \ No newline at end of file diff --git a/jhipster/jhipster-uaa/gateway/README.md b/jhipster/jhipster-uaa/gateway/README.md new file mode 100644 index 0000000000..781f3a9e88 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/README.md @@ -0,0 +1,186 @@ +# gateway +This application was generated using JHipster 5.4.2, you can find documentation and help at [https://www.jhipster.tech/documentation-archive/v5.4.2](https://www.jhipster.tech/documentation-archive/v5.4.2). + +This is a "gateway" application intended to be part of a microservice architecture, please refer to the [Doing microservices with JHipster][] page of the documentation for more information. + +This application is configured for Service Discovery and Configuration with the JHipster-Registry. On launch, it will refuse to start if it is not able to connect to the JHipster-Registry at [http://localhost:8761](http://localhost:8761). For more information, read our documentation on [Service Discovery and Configuration with the JHipster-Registry][]. + +## Development + +Before you can build this project, you must install and configure the following dependencies on your machine: + +1. [Node.js][]: We use Node to run a development web server and build the project. + Depending on your system, you can install Node either from source or as a pre-packaged bundle. + +After installing Node, you should be able to run the following command to install development tools. +You will only need to run this command when dependencies change in [package.json](package.json). + + npm install + +We use npm scripts and [Webpack][] as our build system. + +Run the following commands in two separate terminals to create a blissful development experience where your browser +auto-refreshes when files change on your hard drive. + + ./mvnw + npm start + +Npm is also used to manage CSS and JavaScript dependencies used in this application. You can upgrade dependencies by +specifying a newer version in [package.json](package.json). You can also run `npm update` and `npm install` to manage dependencies. +Add the `help` flag on any command to see how you can use it. For example, `npm help update`. + +The `npm run` command will list all of the scripts available to run for this project. + +### Service workers + +Service workers are commented by default, to enable them please uncomment the following code. + +* The service worker registering script in index.html + +```html + +``` + +Note: workbox creates the respective service worker and dynamically generate the `service-worker.js` + +### Managing dependencies + +For example, to add [Leaflet][] library as a runtime dependency of your application, you would run following command: + + npm install --save --save-exact leaflet + +To benefit from TypeScript type definitions from [DefinitelyTyped][] repository in development, you would run following command: + + npm install --save-dev --save-exact @types/leaflet + +Then you would import the JS and CSS files specified in library's installation instructions so that [Webpack][] knows about them: +Edit [src/main/webapp/app/vendor.ts](src/main/webapp/app/vendor.ts) file: +~~~ +import 'leaflet/dist/leaflet.js'; +~~~ + +Edit [src/main/webapp/content/css/vendor.css](src/main/webapp/content/css/vendor.css) file: +~~~ +@import '~leaflet/dist/leaflet.css'; +~~~ +Note: there are still few other things remaining to do for Leaflet that we won't detail here. + +For further instructions on how to develop with JHipster, have a look at [Using JHipster in development][]. + +### Using angular-cli + +You can also use [Angular CLI][] to generate some custom client code. + +For example, the following command: + + ng generate component my-component + +will generate few files: + + create src/main/webapp/app/my-component/my-component.component.html + create src/main/webapp/app/my-component/my-component.component.ts + update src/main/webapp/app/app.module.ts + + +## Building for production + +To optimize the gateway application for production, run: + + ./mvnw -Pprod clean package + +This will concatenate and minify the client CSS and JavaScript files. It will also modify `index.html` so it references these new files. +To ensure everything worked, run: + + java -jar target/*.war + +Then navigate to [http://localhost:8080](http://localhost:8080) in your browser. + +Refer to [Using JHipster in production][] for more details. + +## Testing + +To launch your application's tests, run: + + ./mvnw clean test + +### Client tests + +Unit tests are run by [Jest][] and written with [Jasmine][]. They're located in [src/test/javascript/](src/test/javascript/) and can be run with: + + npm test + + + +For more information, refer to the [Running tests page][]. + +### Code quality + +Sonar is used to analyse code quality. You can start a local Sonar server (accessible on http://localhost:9001) with: + +``` +docker-compose -f src/main/docker/sonar.yml up -d +``` + +Then, run a Sonar analysis: + +``` +./mvnw -Pprod clean test sonar:sonar +``` + +For more information, refer to the [Code quality page][]. + +## Using Docker to simplify development (optional) + +You can use Docker to improve your JHipster development experience. A number of docker-compose configuration are available in the [src/main/docker](src/main/docker) folder to launch required third party services. + +For example, to start a mysql database in a docker container, run: + + docker-compose -f src/main/docker/mysql.yml up -d + +To stop it and remove the container, run: + + docker-compose -f src/main/docker/mysql.yml down + +You can also fully dockerize your application and all the services that it depends on. +To achieve this, first build a docker image of your app by running: + + ./mvnw package -Pprod jib:dockerBuild + +Then run: + + docker-compose -f src/main/docker/app.yml up -d + +For more information refer to [Using Docker and Docker-Compose][], this page also contains information on the docker-compose sub-generator (`jhipster docker-compose`), which is able to generate docker configurations for one or several JHipster applications. + +## Continuous Integration (optional) + +To configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information. + +[JHipster Homepage and latest documentation]: https://www.jhipster.tech +[JHipster 5.4.2 archive]: https://www.jhipster.tech/documentation-archive/v5.4.2 +[Doing microservices with JHipster]: https://www.jhipster.tech/documentation-archive/v5.4.2/microservices-architecture/ +[Using JHipster in development]: https://www.jhipster.tech/documentation-archive/v5.4.2/development/ +[Service Discovery and Configuration with the JHipster-Registry]: https://www.jhipster.tech/documentation-archive/v5.4.2/microservices-architecture/#jhipster-registry +[Using Docker and Docker-Compose]: https://www.jhipster.tech/documentation-archive/v5.4.2/docker-compose +[Using JHipster in production]: https://www.jhipster.tech/documentation-archive/v5.4.2/production/ +[Running tests page]: https://www.jhipster.tech/documentation-archive/v5.4.2/running-tests/ +[Code quality page]: https://www.jhipster.tech/documentation-archive/v5.4.2/code-quality/ +[Setting up Continuous Integration]: https://www.jhipster.tech/documentation-archive/v5.4.2/setting-up-ci/ + + +[Node.js]: https://nodejs.org/ +[Yarn]: https://yarnpkg.org/ +[Webpack]: https://webpack.github.io/ +[Angular CLI]: https://cli.angular.io/ +[BrowserSync]: http://www.browsersync.io/ +[Jest]: https://facebook.github.io/jest/ +[Jasmine]: http://jasmine.github.io/2.0/introduction.html +[Protractor]: https://angular.github.io/protractor/ +[Leaflet]: http://leafletjs.com/ +[DefinitelyTyped]: http://definitelytyped.org/ diff --git a/jhipster/jhipster-uaa/gateway/angular.json b/jhipster/jhipster-uaa/gateway/angular.json new file mode 100644 index 0000000000..b7f32a8949 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/angular.json @@ -0,0 +1,39 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "gateway": { + "root": "", + "sourceRoot": "src/main/webapp", + "projectType": "application", + "architect": {} + } + }, + "defaultProject": "gateway", + "cli": { + "packageManager": "yarn" + }, + "schematics": { + "@schematics/angular:component": { + "inlineStyle": true, + "inlineTemplate": false, + "spec": false, + "prefix": "jhi", + "styleExt": "scss" + }, + "@schematics/angular:directive": { + "spec": false, + "prefix": "jhi" + }, + "@schematics/angular:guard": { + "spec": false + }, + "@schematics/angular:pipe": { + "spec": false + }, + "@schematics/angular:service": { + "spec": false + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/mvnw b/jhipster/jhipster-uaa/gateway/mvnw new file mode 100644 index 0000000000..5551fde8e7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/jhipster/jhipster-uaa/gateway/mvnw.cmd b/jhipster/jhipster-uaa/gateway/mvnw.cmd new file mode 100644 index 0000000000..e5cfb0ae9e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/jhipster/jhipster-uaa/gateway/package-lock.json b/jhipster/jhipster-uaa/gateway/package-lock.json new file mode 100644 index 0000000000..9c5b3935f4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/package-lock.json @@ -0,0 +1,20609 @@ +{ + "name": "gateway", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@angular-devkit/architect": { + "version": "0.7.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular-devkit/architect/-/architect-0.7.2.tgz", + "integrity": "sha512-p7e4wE+a1AxlfCJQL1IIBltblV9VqFSMlUuPW3PUp0fguo0yaTv9paY5WlFwrj0YhypBj3zHcjSdIruHrgbErg==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.7.2", + "rxjs": "^6.0.0" + } + }, + "@angular-devkit/core": { + "version": "0.7.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular-devkit/core/-/core-0.7.2.tgz", + "integrity": "sha512-1Es9oNpabOukutBe+0txXUHyhI6ypuc7WrxTutZH7Lr3n3+CTG6oEv42rOcot1aXi1n97wNqcdY3lrENFu9vhQ==", + "dev": true, + "requires": { + "ajv": "~6.4.0", + "chokidar": "^2.0.3", + "rxjs": "^6.0.0", + "source-map": "^0.5.6" + } + }, + "@angular-devkit/schematics": { + "version": "0.7.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular-devkit/schematics/-/schematics-0.7.2.tgz", + "integrity": "sha512-4mhLhXc4Tyu07sGXWOHV9zXZ8uthbUo5zr63lj0Z9gv5f/vrJj5fyEoTnHONBFzVPdElMYS2vhiEtwnN0hKQDA==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.7.2", + "rxjs": "^6.0.0" + } + }, + "@angular/cli": { + "version": "6.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular/cli/-/cli-6.1.2.tgz", + "integrity": "sha512-uY1/rFWqmi7MibUz4bwhkiM95PmDZn0OCaMxGafZlriZgu+81on7/7biWNHgIRAd+QV1qBJlstWT2J0K8r1vLA==", + "dev": true, + "requires": { + "@angular-devkit/architect": "0.7.2", + "@angular-devkit/core": "0.7.2", + "@angular-devkit/schematics": "0.7.2", + "@schematics/angular": "0.7.2", + "@schematics/update": "0.7.2", + "opn": "^5.3.0", + "rxjs": "^6.0.0", + "semver": "^5.1.0", + "symbol-observable": "^1.2.0", + "yargs-parser": "^10.0.0" + } + }, + "@angular/common": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular/common/-/common-6.1.0.tgz", + "integrity": "sha512-uxdjxbuTYiCsOcrfO9EumGrfXo+7nB7HlS9F4wraKcnR22oJYNUh36meFKZwpoj5pDIBLnZQu75boI16o3W+SQ==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/compiler": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular/compiler/-/compiler-6.1.0.tgz", + "integrity": "sha512-5c8ZYCFv0xccy0F12zBRIJX0pJd9BgCThJuhVJAuaRFFOqPZl8FKEO3SFqKJNywT0UktZD9JpYFKxhUVxuSHDg==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/compiler-cli": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular/compiler-cli/-/compiler-cli-6.1.0.tgz", + "integrity": "sha512-g4fXQwAYnxtr08BK3CiodJsUXz3fIBCVfZaWIcLMdOlyarFDEvB3TA9qfPkQtlndm87WpXjZ6Xd9OAkmG8t8dw==", + "dev": true, + "requires": { + "chokidar": "^1.4.2", + "minimist": "^1.2.0", + "reflect-metadata": "^0.1.2", + "tsickle": "^0.30.0" + }, + "dependencies": { + "anymatch": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + } + } + }, + "@angular/core": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular/core/-/core-6.1.0.tgz", + "integrity": "sha512-gWu9Q7q2+fhFC5dl/BvGW7Ha7NUJtK9wQLYQlfIMim4lKTOiM1/S0MYBVMrEq58ldMr9DnA35f5jGno3x6/v+g==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/forms": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular/forms/-/forms-6.1.0.tgz", + "integrity": "sha512-6InfsKWEL9w2RvTXjy5R3F8GRjENT9d444o95aSvf+ZK7KsYOeIwcYgN2pw+LjfNu2O3EbAqps8APQ6oD/Fn3A==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/platform-browser": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular/platform-browser/-/platform-browser-6.1.0.tgz", + "integrity": "sha512-LcpcHLpy+fjN+gKcnTkWuTTuF+uYT350mje1kNr4Advoco76tXYBjAda/EehG+vmQmDTd5E+uxJhKJr/1POVEw==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/platform-browser-dynamic": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular/platform-browser-dynamic/-/platform-browser-dynamic-6.1.0.tgz", + "integrity": "sha512-gjOJ38ciuIgdAuG8bEs/sdJmkfm/oICLrCcQexz+EUCZAiqbKDb0HvFTDaKaLtR7iDbTXVMQhoYMOyTY40FwLQ==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/router": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular/router/-/router-6.1.0.tgz", + "integrity": "sha512-tIcHLuat19cnoQBbOfe/8zAHVqf/9S17YgwSO6VUPTuXLRe9ZBgYT50BzqRhcm8ODOqVmLBQYlzP7zRcNRkHDA==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@babel/code-frame": { + "version": "7.0.0-beta.46", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@babel/code-frame/-/code-frame-7.0.0-beta.46.tgz", + "integrity": "sha512-7BKRkmYaPZm3Yff5HGZJKCz7RqZ5jUjknsXT6Gz5YKG23J3uq9hAj0epncCB0rlqmnZ8Q+UUpQB2tCR5mT37vw==", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.46" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.46", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@babel/highlight/-/highlight-7.0.0-beta.46.tgz", + "integrity": "sha512-r4snW6Q8ICL3Y8hGzYJRvyG/+sc+kvkewXNedG9tQjoHmUFMwMSv/o45GWQUQswevGnWghiGkpRPivFfOuMsOA==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@fortawesome/angular-fontawesome": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@fortawesome/angular-fontawesome/-/angular-fontawesome-0.2.0.tgz", + "integrity": "sha512-iBaH3ulJh+WjaNHqDxoKR6D4udgY+C7FChVSFOv0u7rjdT8wd0ap5YS1QHA82K0dfkUAvlEA4l5wtDtUpG679A==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@fortawesome/fontawesome-common-types": { + "version": "0.2.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.4.tgz", + "integrity": "sha512-0qbIVm+MzkxMwKDx8V0C7w/6Nk+ZfBseOn2R1YK0f2DQP5pBcOQbu9NmaVaLzbJK6VJb1TuyTf0ZF97rc6iWJQ==" + }, + "@fortawesome/fontawesome-svg-core": { + "version": "1.2.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.4.tgz", + "integrity": "sha512-oGtnwcdhJomoDxbJcy6S0JxK6ItDhJLNOujm+qILPqajJ2a0P/YRomzBbixFjAPquCoyPUlA9g9ejA22P7TKNA==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.4" + } + }, + "@fortawesome/free-solid-svg-icons": { + "version": "5.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.3.1.tgz", + "integrity": "sha512-NkiLBFoiHtJ89cPJdM+W6cLvTVKkLh3j9t3MxkXyip0ncdD3lhCunSuzvFcrTHWeETEyoClGd8ZIWrr3HFZ3BA==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.4" + } + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@ng-bootstrap/ng-bootstrap": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-3.0.0.tgz", + "integrity": "sha512-yYfqUORHc363ElX6C38hR4g9lFSOCXBVv3LTDNCyEz5go5kqSW8Tl5LDUlCxpswj02Wn14O1MunrnznZoSfYZA==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@ngtools/webpack": { + "version": "6.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@ngtools/webpack/-/webpack-6.0.0.tgz", + "integrity": "sha512-ULZnn1sFmVZ4o8LRWRk8BVnJzSpfjvpjTC2lsC/5DavPwpYLbMEdecwE5OIZhkXUr6QLZebPHEjlazesWHwqrA==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.6.0", + "tree-kill": "^1.0.0", + "webpack-sources": "^1.1.0" + }, + "dependencies": { + "@angular-devkit/core": { + "version": "0.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@angular-devkit/core/-/core-0.6.0.tgz", + "integrity": "sha512-hM1AOSF/+XZpv350pODPgoO/2QL61tfRlCXf3u4zHxkXdcboFKGCIi7VEu7TYMWSQzujcTFJciVBrgf/IfQ3cA==", + "dev": true, + "requires": { + "ajv": "~6.4.0", + "chokidar": "^2.0.3", + "rxjs": "^6.0.0", + "source-map": "^0.5.6" + } + } + } + }, + "@ngx-translate/core": { + "version": "10.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@ngx-translate/core/-/core-10.0.2.tgz", + "integrity": "sha512-7nM3DrJaqKswwtJlbu2kuKNl+hE8Isr18sKsKvGGpSxQk+G0gO0reDlx2PhUNus7TJTkA1C59vU/JoN8hIvZ4g==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@ngx-translate/http-loader": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@ngx-translate/http-loader/-/http-loader-3.0.1.tgz", + "integrity": "sha1-ILD5i8bCUyESnT4zAqs8xInApCo=", + "requires": { + "tslib": "^1.9.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@nodelib/fs.stat/-/fs.stat-1.1.2.tgz", + "integrity": "sha512-yprFYuno9FtNsSHVlSWd+nRlmGoAbqbeCwOryP6sC/zoCjhpArcRMYp19EvpSUSizJAlsXEwJv+wcWS9XaXdMw==", + "dev": true + }, + "@samverschueren/stream-to-observable": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz", + "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==", + "dev": true, + "requires": { + "any-observable": "^0.3.0" + } + }, + "@schematics/angular": { + "version": "0.7.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@schematics/angular/-/angular-0.7.2.tgz", + "integrity": "sha512-u92urZDC9qk/4gQliajrzxgrEz3ucvOtQ0eCzbRKU86AGWrz215hQJRmLRSDAdVy0frfc8Gg8IhdHSA2nZLgVw==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.7.2", + "@angular-devkit/schematics": "0.7.2", + "typescript": ">=2.6.2 <2.8" + } + }, + "@schematics/update": { + "version": "0.7.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@schematics/update/-/update-0.7.2.tgz", + "integrity": "sha512-YOnQhhYAAGjhWGCs7RUPKQD2G9Qg5gby4Dxa43vGP31xUcYFeYZCbU9MchnaxLPFi1NH4UEztkRFT4T3bn2d1A==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.7.2", + "@angular-devkit/schematics": "0.7.2", + "npm-registry-client": "^8.5.1", + "rxjs": "^6.0.0", + "semver": "^5.3.0", + "semver-intersect": "^1.1.2" + } + }, + "@sindresorhus/is": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", + "dev": true + }, + "@types/jest": { + "version": "22.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@types/jest/-/jest-22.2.3.tgz", + "integrity": "sha512-e74sM9W/4qqWB6D4TWV9FQk0WoHtX1X4FJpbjxucMSVJHtFjbQOH3H6yp+xno4br0AKG0wz/kPtaN599GUOvAg==", + "dev": true + }, + "@types/node": { + "version": "9.4.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@types/node/-/node-9.4.7.tgz", + "integrity": "sha512-4Ba90mWNx8ddbafuyGGwjkZMigi+AWfYLSDCpovwsE63ia8w93r3oJ8PIAQc3y8U+XHcnMOHPIzNe3o438Ywcw==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/ast/-/ast-1.3.0.tgz", + "integrity": "sha512-IXMtAT2u6SEAHe8iZW+CdtC7K3xkBhvMp6RY3GQILXeXq9pLsgCwnVLEAO/pMkDCsoX/y83K12quA/CxGbuHew==", + "dev": true, + "requires": { + "@webassemblyjs/helper-wasm-bytecode": "1.3.0", + "@webassemblyjs/wast-parser": "1.3.0", + "webassemblyjs": "1.3.0" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.3.0.tgz", + "integrity": "sha512-Y746aq0AmT5cU8/tGEYAioVn7h8GGgVuQYRsXCB38u/rnE/TZhG38z+oXp+HaakubmXyXQ5IU+suZ7qnqANQgQ==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/helper-buffer/-/helper-buffer-1.3.0.tgz", + "integrity": "sha512-3o+srBMOSS3VHQlxGONEBnw10rWPo7Mcbc4waq8bPZRy26JBw0fFHlBICIySWcvvO0K9rvGD6d2rJV6VzDp/Gg==", + "dev": true + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.3.0.tgz", + "integrity": "sha512-Sn5EhpGFtavLOgvOGQn9HMRiLxkgPHksTGbNcGuZbHvyx20DNO1VHGZYnvupavBqJPtjceS2YjQT2vN3piZwng==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.3.0" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/helper-fsm/-/helper-fsm-1.3.0.tgz", + "integrity": "sha512-Q5uchhiRmlZUFKOBcI+8+ri0eyAWyFPTwcVu9bDep3FsxkgugI5i+V52r1rZrgNjB3QFcYgAwLEeJQgBciW9dA==", + "dev": true + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.3.0.tgz", + "integrity": "sha512-DYJPE3OeHXi72Bc5eXqGhOPIo0usevsZltSsrrhlejw8F6c86tOeMJjBiVR4stiP4M3utnaXuTj+JuaXgeQo8g==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.3.0.tgz", + "integrity": "sha512-1Vt839EyU7YLy40EXF19b9vaYdSeNDFWQHsY2BEOVePatbRaz2ytbVFP3lSjZDTBmOml3nbEdUzHC+XtObBKXg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.3.0", + "@webassemblyjs/helper-buffer": "1.3.0", + "@webassemblyjs/helper-wasm-bytecode": "1.3.0", + "@webassemblyjs/wasm-gen": "1.3.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/leb128/-/leb128-1.3.0.tgz", + "integrity": "sha512-oR6WdUiw4Kpjt12swFy5A7Hy5PF33ojdsZbgScRuXSZEfgXVSIhFj5ZKD0UY4v22SJN/Q1ESpAuHnlGzQcljTg==", + "dev": true, + "requires": { + "leb": "^0.3.0" + } + }, + "@webassemblyjs/validation": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/validation/-/validation-1.3.0.tgz", + "integrity": "sha512-CuBmcwCL6Th8oJBnfQfSvLWyIFcSYc2qyj68SeBtU1Zikg5rbuobLEqIRALfzLjJSJUO3SQtJ5GsjidRM0ezWQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.3.0" + } + }, + "@webassemblyjs/wasm-edit": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/wasm-edit/-/wasm-edit-1.3.0.tgz", + "integrity": "sha512-xfrnmh7WTxbc55FJmpJCqOvdctG1xZeetdasYLEbPfUP8AgoDovjkhpMRBJcQk6z6AOuldt93rkxbjt9fA+bjw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.3.0", + "@webassemblyjs/helper-buffer": "1.3.0", + "@webassemblyjs/helper-wasm-bytecode": "1.3.0", + "@webassemblyjs/helper-wasm-section": "1.3.0", + "@webassemblyjs/wasm-gen": "1.3.0", + "@webassemblyjs/wasm-opt": "1.3.0", + "@webassemblyjs/wasm-parser": "1.3.0", + "@webassemblyjs/wast-printer": "1.3.0", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/wasm-gen/-/wasm-gen-1.3.0.tgz", + "integrity": "sha512-vvyJdznx82hqdjGVvQjQ1JMtD8Aokiu9OqaQRt62ywNyeBXNZH+Di3axq8725RFOtEYWuiMun6knfTVitVuTzg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.3.0", + "@webassemblyjs/helper-wasm-bytecode": "1.3.0", + "@webassemblyjs/leb128": "1.3.0" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/wasm-opt/-/wasm-opt-1.3.0.tgz", + "integrity": "sha512-uWtbbEDzsrv+jPbk8jzHyrmCcDMT8J3VmifEsLuD5bov6Q40GJwj/GMAtbH2kB28dvqWU0lIA+D5dUlJHMgAzQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.3.0", + "@webassemblyjs/helper-buffer": "1.3.0", + "@webassemblyjs/wasm-gen": "1.3.0", + "@webassemblyjs/wasm-parser": "1.3.0" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/wasm-parser/-/wasm-parser-1.3.0.tgz", + "integrity": "sha512-eQxCJa2Ks0lZc/JwG0A0uzvOmbjklsVKtKI+M1qp73xbOgpotHFBioeskk9J8AlpNwB5Ofeslw98O5k4Wi8scg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.3.0", + "@webassemblyjs/helper-wasm-bytecode": "1.3.0", + "@webassemblyjs/leb128": "1.3.0", + "@webassemblyjs/wasm-parser": "1.3.0", + "webassemblyjs": "1.3.0" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/wast-parser/-/wast-parser-1.3.0.tgz", + "integrity": "sha512-NJOsD4PKBCQXzKhX7zqoF6Bgmq4cbODKwusOsFw18dccHggTNEjx71WRKL1fplnECQp9s7ukxn4uadsDtY0q2g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.3.0", + "@webassemblyjs/floating-point-hex-parser": "1.3.0", + "@webassemblyjs/helper-code-frame": "1.3.0", + "@webassemblyjs/helper-fsm": "1.3.0", + "long": "^3.2.0", + "webassemblyjs": "1.3.0" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webassemblyjs/wast-printer/-/wast-printer-1.3.0.tgz", + "integrity": "sha512-K7iOU1PY2fPviDwZU7f0i/75r2baXlJR3VYXEpwQp608tQiYJY6/4Uji9kJ7FKsf+gqZSop2umCK0nhuDrU7/w==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.3.0", + "@webassemblyjs/wast-parser": "1.3.0", + "long": "^3.2.0" + } + }, + "@webpack-contrib/schema-utils": { + "version": "1.0.0-beta.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@webpack-contrib/schema-utils/-/schema-utils-1.0.0-beta.0.tgz", + "integrity": "sha512-LonryJP+FxQQHsjGBi6W786TQB1Oym+agTpY0c+Kj8alnIw+DLUJb6SI8Y1GHGhLCH1yPRrucjObUmxNICQ1pg==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chalk": "^2.3.2", + "strip-ansi": "^4.0.0", + "text-table": "^0.2.0", + "webpack-log": "^1.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "abab": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/abab/-/abab-1.0.4.tgz", + "integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=", + "dev": true + }, + "accepts": { + "version": "1.3.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "dev": true, + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "acorn": { + "version": "5.7.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", + "dev": true, + "requires": { + "acorn": "^5.0.0" + } + }, + "acorn-globals": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/acorn-globals/-/acorn-globals-4.1.0.tgz", + "integrity": "sha512-KjZwU26uG3u6eZcfGbTULzFcsoz6pegNKtHPksZPOUsiKo5bUmiBPa38FuHZ/Eun+XYh/JCCkS9AS3Lu4McQOQ==", + "dev": true, + "requires": { + "acorn": "^5.0.0" + } + }, + "after": { + "version": "0.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/after/-/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", + "dev": true + }, + "ajv": { + "version": "6.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ajv/-/ajv-6.4.0.tgz", + "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", + "dev": true, + "requires": { + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0", + "uri-js": "^3.0.2" + } + }, + "ajv-errors": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ajv-errors/-/ajv-errors-1.0.0.tgz", + "integrity": "sha1-7PAh+hCP0X37Xms4Py3SM+Mf/Fk=", + "dev": true + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "angular-router-loader": { + "version": "0.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/angular-router-loader/-/angular-router-loader-0.8.5.tgz", + "integrity": "sha512-8wggCTKGgzB1o8co3Wvj+p9pKN7T7q3C477lEz3NLjvPVzUti8rv9i45Di+4aO/k+HvzGh3s8QdNlXU2Bl4avQ==", + "dev": true, + "requires": { + "loader-utils": "^1.0.2" + } + }, + "angular2-template-loader": { + "version": "0.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/angular2-template-loader/-/angular2-template-loader-0.6.2.tgz", + "integrity": "sha1-wNROkP/w+sleiyPwQ6zaf9HFHXw=", + "dev": true, + "requires": { + "loader-utils": "^0.2.15" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + } + } + }, + "ansi": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi/-/ansi-0.3.1.tgz", + "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=", + "dev": true + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "ansi-html": { + "version": "0.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "dev": true + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "any-observable": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/any-observable/-/any-observable-0.3.0.tgz", + "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "app-root-path": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/app-root-path/-/app-root-path-2.0.1.tgz", + "integrity": "sha1-zWLc+OT9WkF+/GZNLlsQZTxlG0Y=", + "dev": true + }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + } + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-equal": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", + "dev": true + }, + "array-filter": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-flatten": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-flatten/-/array-flatten-2.1.1.tgz", + "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=", + "dev": true + }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, + "array-map": { + "version": "0.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", + "dev": true + }, + "array-reduce": { + "version": "0.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arraybuffer.slice": { + "version": "0.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "ast-types": { + "version": "0.9.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ast-types/-/ast-types-0.9.6.tgz", + "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "async-each-series": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async-each-series/-/async-each-series-0.1.1.tgz", + "integrity": "sha1-dhfBkXQB/Yykooqtzj266Yr+tDI=", + "dev": true + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "autoprefixer": { + "version": "6.7.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/autoprefixer/-/autoprefixer-6.7.7.tgz", + "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", + "dev": true, + "requires": { + "browserslist": "^1.7.6", + "caniuse-db": "^1.0.30000634", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^5.2.16", + "postcss-value-parser": "^3.2.3" + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, + "axios": { + "version": "0.17.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/axios/-/axios-0.17.1.tgz", + "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", + "dev": true, + "requires": { + "follow-redirects": "^1.2.5", + "is-buffer": "^1.1.5" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "babel-extract-comments": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-extract-comments/-/babel-extract-comments-1.0.0.tgz", + "integrity": "sha512-qWWzi4TlddohA91bFwgt6zO/J0X+io7Qp184Fw0m2JYRSTZnJbFR8+07KmzudHCZgOiKRCrjhylwv9Xd8gfhVQ==", + "dev": true, + "requires": { + "babylon": "^6.18.0" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "babel-helper-bindify-decorators": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", + "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "dev": true, + "requires": { + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-explode-class": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", + "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", + "dev": true, + "requires": { + "babel-helper-bindify-decorators": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-jest": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-jest/-/babel-jest-22.4.3.tgz", + "integrity": "sha512-BgSjmtl3mW3i+VeVHEr9d2zFSAT66G++pJcHQiUjd00pkW+voYXFctIm/indcqOWWXw5a1nUpR1XWszD9fJ1qg==", + "dev": true, + "requires": { + "babel-plugin-istanbul": "^4.1.5", + "babel-preset-jest": "^22.4.3" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-istanbul": { + "version": "4.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz", + "integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "^6.13.0", + "find-up": "^2.1.0", + "istanbul-lib-instrument": "^1.10.1", + "test-exclude": "^4.2.1" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + } + } + }, + "babel-plugin-jest-hoist": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.3.tgz", + "integrity": "sha512-zhvv4f6OTWy2bYevcJftwGCWXMFe7pqoz41IhMi4xna7xNsX5NygdagsrE0y6kkfuXq8UalwvPwKTyAxME2E/g==", + "dev": true + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-syntax-async-generators": { + "version": "6.13.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", + "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", + "dev": true + }, + "babel-plugin-syntax-class-constructor-call": { + "version": "6.18.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz", + "integrity": "sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY=", + "dev": true + }, + "babel-plugin-syntax-class-properties": { + "version": "6.13.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", + "dev": true + }, + "babel-plugin-syntax-decorators": { + "version": "6.13.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", + "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=", + "dev": true + }, + "babel-plugin-syntax-dynamic-import": { + "version": "6.18.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", + "dev": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "dev": true + }, + "babel-plugin-syntax-export-extensions": { + "version": "6.13.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz", + "integrity": "sha1-cKFITw+QiaToStRLrDU8lbmxJyE=", + "dev": true + }, + "babel-plugin-syntax-flow": { + "version": "6.18.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=", + "dev": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "dev": true + }, + "babel-plugin-transform-async-generator-functions": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", + "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-generators": "^6.5.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-class-constructor-call": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz", + "integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=", + "dev": true, + "requires": { + "babel-plugin-syntax-class-constructor-call": "^6.18.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-class-properties": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", + "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-plugin-syntax-class-properties": "^6.8.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-decorators": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", + "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", + "dev": true, + "requires": { + "babel-helper-explode-class": "^6.24.1", + "babel-plugin-syntax-decorators": "^6.13.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, + "requires": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + }, + "dependencies": { + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + } + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "dev": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-export-extensions": { + "version": "6.22.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz", + "integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=", + "dev": true, + "requires": { + "babel-plugin-syntax-export-extensions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-flow-strip-types": { + "version": "6.22.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", + "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", + "dev": true, + "requires": { + "babel-plugin-syntax-flow": "^6.18.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "^6.8.0", + "babel-runtime": "^6.26.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } + }, + "babel-preset-jest": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-preset-jest/-/babel-preset-jest-22.4.3.tgz", + "integrity": "sha512-a+M3LTEXTq3gxv0uBN9Qm6ahUl7a8pj923nFbCUdqFUSsf3YrX8Uc+C3MEwji5Af3LiQjSC7w4ooYewlz8HRTA==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^22.4.3", + "babel-plugin-syntax-object-rest-spread": "^6.13.0" + } + }, + "babel-preset-stage-1": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz", + "integrity": "sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=", + "dev": true, + "requires": { + "babel-plugin-transform-class-constructor-call": "^6.24.1", + "babel-plugin-transform-export-extensions": "^6.22.0", + "babel-preset-stage-2": "^6.24.1" + } + }, + "babel-preset-stage-2": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", + "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", + "dev": true, + "requires": { + "babel-plugin-syntax-dynamic-import": "^6.18.0", + "babel-plugin-transform-class-properties": "^6.24.1", + "babel-plugin-transform-decorators": "^6.24.1", + "babel-preset-stage-3": "^6.24.1" + } + }, + "babel-preset-stage-3": { + "version": "6.24.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", + "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", + "dev": true, + "requires": { + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-generator-functions": "^6.24.1", + "babel-plugin-transform-async-to-generator": "^6.24.1", + "babel-plugin-transform-exponentiation-operator": "^6.24.1", + "babel-plugin-transform-object-rest-spread": "^6.22.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + } + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base62": { + "version": "1.2.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/base62/-/base62-1.2.8.tgz", + "integrity": "sha512-V6YHUbjLxN1ymqNLb1DPHoU1CpfdL7d2YTIp5W3U4hhoG4hhxNmsFDs66M9EXxBiSEke5Bt5dwdfMwwZF70iLA==", + "dev": true + }, + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "dev": true + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "base64id": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/base64id/-/base64id-1.0.0.tgz", + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", + "dev": true + }, + "batch": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "better-assert": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "dev": true, + "requires": { + "callsite": "1.0.0" + } + }, + "big.js": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "binaryextensions": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/binaryextensions/-/binaryextensions-2.1.1.tgz", + "integrity": "sha512-XBaoWE9RW8pPdPQNibZsW2zh8TW6gcarXp1FZPwT8Uop8ScSNldJEWf2k9l3HeTqdrEwsOsFcq74RiJECW34yA==", + "dev": true + }, + "blob": { + "version": "0.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/blob/-/blob-0.0.4.tgz", + "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.1", + "http-errors": "~1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "~2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "~1.6.15" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "qs": { + "version": "6.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "dev": true + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "dev": true, + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + } + } + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", + "dev": true + } + } + }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "dev": true, + "requires": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "bootstrap": { + "version": "4.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/bootstrap/-/bootstrap-4.1.3.tgz", + "integrity": "sha512-rDFIzgXcof0jDyjNosjv4Sno77X4KuPeFxG2XZZv1/Kc8DRVGVADdoQyyOVDwPqL36DDmtCQbrpMCqvpPLJQ0w==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-process-hrtime": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", + "integrity": "sha1-Ql1opY00R/AqBKqJQYf86K+Le44=", + "dev": true + }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "browser-sync": { + "version": "2.24.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browser-sync/-/browser-sync-2.24.6.tgz", + "integrity": "sha512-3cVW8Ft3sPQ1t9gqZXBDZhTyRce8NW4wf5KzpCYcg6fWjPbyt+vZLvEo+sTq7c7eNQhi8lInQWbjIFEpoM2f7Q==", + "dev": true, + "requires": { + "browser-sync-ui": "v1.0.1", + "bs-recipes": "1.3.4", + "chokidar": "1.7.0", + "connect": "3.6.6", + "connect-history-api-fallback": "^1.5.0", + "dev-ip": "^1.0.1", + "easy-extender": "2.3.2", + "eazy-logger": "3.0.2", + "etag": "^1.8.1", + "fresh": "^0.5.2", + "fs-extra": "3.0.1", + "http-proxy": "1.15.2", + "immutable": "3.8.2", + "localtunnel": "1.9.0", + "micromatch": "2.3.11", + "opn": "4.0.2", + "portscanner": "2.1.1", + "qs": "6.2.3", + "raw-body": "^2.3.2", + "resp-modifier": "6.0.2", + "rx": "4.1.0", + "serve-index": "1.9.1", + "serve-static": "1.13.2", + "server-destroy": "1.0.1", + "socket.io": "2.1.1", + "ua-parser-js": "0.7.17", + "yargs": "6.4.0" + }, + "dependencies": { + "anymatch": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "opn": { + "version": "4.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/opn/-/opn-4.0.2.tgz", + "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "qs": { + "version": "6.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/qs/-/qs-6.2.3.tgz", + "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", + "dev": true + } + } + }, + "browser-sync-ui": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browser-sync-ui/-/browser-sync-ui-1.0.1.tgz", + "integrity": "sha512-RIxmwVVcUFhRd1zxp7m2FfLnXHf59x4Gtj8HFwTA//3VgYI3AKkaQAuDL8KDJnE59XqCshxZa13JYuIWtZlKQg==", + "dev": true, + "requires": { + "async-each-series": "0.1.1", + "connect-history-api-fallback": "^1.1.0", + "immutable": "^3.7.6", + "server-destroy": "1.0.1", + "socket.io-client": "2.0.4", + "stream-throttle": "^0.1.3" + } + }, + "browser-sync-webpack-plugin": { + "version": "2.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browser-sync-webpack-plugin/-/browser-sync-webpack-plugin-2.2.2.tgz", + "integrity": "sha512-x92kl8LdBi4dp6YVXYqrSoDkOCOLCeBOrYSY0h9Sk1VcCDSoZC1Vc62eae6TfC2ljN4/L+aYlkzE46kirHzbgA==", + "dev": true, + "requires": { + "lodash": "^4" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "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": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "browserslist": { + "version": "1.7.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + } + }, + "bs-recipes": { + "version": "1.3.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/bs-recipes/-/bs-recipes-1.3.4.tgz", + "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=", + "dev": true + }, + "bser": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "builtins": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "cacache": { + "version": "10.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + }, + "dependencies": { + "rimraf": { + "version": "2.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "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" + } + }, + "cache-loader": { + "version": "1.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cache-loader/-/cache-loader-1.2.2.tgz", + "integrity": "sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "mkdirp": "^0.5.1", + "neo-async": "^2.5.0", + "schema-utils": "^0.4.2" + } + }, + "cacheable-request": { + "version": "2.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cacheable-request/-/cacheable-request-2.1.4.tgz", + "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "dev": true, + "requires": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + }, + "dependencies": { + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + }, + "normalize-url": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", + "dev": true, + "requires": { + "prepend-http": "^2.0.0", + "query-string": "^5.0.1", + "sort-keys": "^2.0.0" + } + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "sort-keys": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + } + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", + "dev": true + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + } + }, + "caniuse-api": { + "version": "1.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/caniuse-api/-/caniuse-api-1.6.1.tgz", + "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", + "dev": true, + "requires": { + "browserslist": "^1.3.6", + "caniuse-db": "^1.0.30000529", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "caniuse-db": { + "version": "1.0.30000835", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/caniuse-db/-/caniuse-db-1.0.30000835.tgz", + "integrity": "sha1-ZVaTHN8DWQPYZV1jA/lQG1kV++k=", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30000885", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/caniuse-lite/-/caniuse-lite-1.0.30000885.tgz", + "integrity": "sha512-cXKbYwpxBLd7qHyej16JazPoUacqoVuDhvR61U7Fr5vSxMUiodzcYa1rQYRYfZ5GexV03vGZHd722vNPLjPJGQ==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "chevrotain": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chevrotain/-/chevrotain-4.1.0.tgz", + "integrity": "sha512-iwuK4FOV+vZlvKonoXVw6G+rXJm4jWk17aJFkm6FloVYcVSrAaJLdCdQo+IIyX98jm0WJVcdK9cllRZQpNBnBg==", + "dev": true, + "requires": { + "regexp-to-ast": "0.3.5" + } + }, + "chokidar": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true + }, + "chrome-trace-event": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", + "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==", + "dev": true + }, + "ci-info": { + "version": "1.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "clap": { + "version": "1.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clap/-/clap-1.2.3.tgz", + "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", + "dev": true, + "requires": { + "chalk": "^1.1.3" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-css": { + "version": "4.1.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clean-css/-/clean-css-4.1.11.tgz", + "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", + "dev": true, + "requires": { + "source-map": "0.5.x" + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-spinners": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-spinners/-/cli-spinners-0.1.2.tgz", + "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=", + "dev": true + }, + "cli-table": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-table/-/cli-table-0.3.1.tgz", + "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "dev": true, + "requires": { + "colors": "1.0.3" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + } + } + }, + "cli-truncate": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-truncate/-/cli-truncate-0.2.1.tgz", + "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", + "dev": true, + "requires": { + "slice-ansi": "0.0.4", + "string-width": "^1.0.1" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-deep": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-deep/-/clone-deep-2.0.2.tgz", + "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.0", + "shallow-clone": "^1.0.0" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + } + } + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cloneable-readable/-/cloneable-readable-1.1.2.tgz", + "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "coa": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/coa/-/coa-1.0.4.tgz", + "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", + "dev": true, + "requires": { + "q": "^1.1.2" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "codelyzer": { + "version": "4.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/codelyzer/-/codelyzer-4.2.1.tgz", + "integrity": "sha512-CKwfgpfkqi9dyzy4s6ELaxJ54QgJ6A8iTSsM4bzHbLuTpbKncvNc3DUlCvpnkHBhK47gEf4qFsWoYqLrJPhy6g==", + "dev": true, + "requires": { + "app-root-path": "^2.0.1", + "css-selector-tokenizer": "^0.7.0", + "cssauron": "^1.4.0", + "semver-dsl": "^1.0.1", + "source-map": "^0.5.6", + "sprintf-js": "^1.0.3" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "0.11.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "dev": true, + "requires": { + "clone": "^1.0.2", + "color-convert": "^1.3.0", + "color-string": "^0.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-string": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "dev": true, + "requires": { + "color-name": "^1.0.0" + } + }, + "colormin": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colormin/-/colormin-1.1.2.tgz", + "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", + "dev": true, + "requires": { + "color": "^0.11.0", + "css-color-names": "0.0.4", + "has": "^1.0.1" + } + }, + "colornames": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colornames/-/colornames-1.1.1.tgz", + "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "colorspace": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colorspace/-/colorspace-1.1.1.tgz", + "integrity": "sha512-pI3btWyiuz7Ken0BWh9Elzsmv2bM9AhA7psXib4anUXy/orfZ/E0MbQwhSOG/9L8hLlalqrU0UhOuqxW1YjmVw==", + "dev": true, + "requires": { + "color": "3.0.x", + "text-hex": "1.0.x" + }, + "dependencies": { + "color": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-string": { + "version": "1.5.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-string/-/color-string-1.5.3.tgz", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + } + } + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.19.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "common-tags": { + "version": "1.8.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/common-tags/-/common-tags-1.8.0.tgz", + "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "commoner": { + "version": "0.10.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commoner/-/commoner-0.10.8.tgz", + "integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=", + "dev": true, + "requires": { + "commander": "^2.5.0", + "detective": "^4.3.1", + "glob": "^5.0.15", + "graceful-fs": "^4.1.2", + "iconv-lite": "^0.4.5", + "mkdirp": "^0.5.0", + "private": "^0.1.6", + "q": "^1.1.2", + "recast": "^0.11.17" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "compare-versions": { + "version": "3.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/compare-versions/-/compare-versions-3.3.0.tgz", + "integrity": "sha512-MAAAIOdi2s4Gl6rZ76PNcUa9IOYB+5ICdT41o5uMRf09aEu/F9RK+qhe8RjXNPwcTjGV7KU7h2P/fljThFVqyQ==", + "dev": true + }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", + "dev": true + }, + "compressible": { + "version": "2.0.14", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/compressible/-/compressible-2.0.14.tgz", + "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", + "dev": true, + "requires": { + "mime-db": ">= 1.34.0 < 2" + } + }, + "compression": { + "version": "1.7.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/compression/-/compression-1.7.2.tgz", + "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "bytes": "3.0.0", + "compressible": "~2.0.13", + "debug": "2.6.9", + "on-headers": "~1.0.1", + "safe-buffer": "5.1.1", + "vary": "~1.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "conf": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/conf/-/conf-2.0.0.tgz", + "integrity": "sha512-iCLzBsGFi8S73EANsEJZz0JnJ/e5VZef/kSaxydYZLAvw0rFNAUx5R7K5leC/CXXR2mZfXWhUvcZOO/dM2D5xg==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "env-paths": "^1.0.0", + "make-dir": "^1.0.0", + "pkg-up": "^2.0.0", + "write-file-atomic": "^2.3.0" + } + }, + "connect": { + "version": "3.6.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/connect/-/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.0", + "parseurl": "~1.3.2", + "utils-merge": "1.0.1" + } + }, + "connect-history-api-fallback": { + "version": "1.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", + "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=", + "dev": true + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", + "dev": true + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "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": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-webpack-plugin": { + "version": "4.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/copy-webpack-plugin/-/copy-webpack-plugin-4.5.1.tgz", + "integrity": "sha512-OlTo6DYg0XfTKOF8eLf79wcHm4Ut10xU2cRBRPMW/NA5F9VMjZGTfRHWDIYC3s+1kObGYrBLshXWU1K0hILkNQ==", + "dev": true, + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "globby": "^7.1.1", + "is-glob": "^4.0.0", + "loader-utils": "^1.1.0", + "minimatch": "^3.0.4", + "p-limit": "^1.0.0", + "serialize-javascript": "^1.4.0" + } + }, + "core-js": { + "version": "2.5.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cosmiconfig": { + "version": "5.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cosmiconfig/-/cosmiconfig-5.0.6.tgz", + "integrity": "sha512-6DWfizHriCrFWURP1/qyhsiFvYdlJzbCzmtFWh744+KyWsJo5+kPzUZZaMRSSItoYc0pxFX7gEO7ZC1/gN/7AQ==", + "dev": true, + "requires": { + "is-directory": "^0.3.1", + "js-yaml": "^3.9.0", + "parse-json": "^4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + } + } + }, + "cpx": { + "version": "1.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cpx/-/cpx-1.5.0.tgz", + "integrity": "sha1-GFvgGFEdhycN7czCkxceN2VauI8=", + "dev": true, + "requires": { + "babel-runtime": "^6.9.2", + "chokidar": "^1.6.0", + "duplexer": "^0.1.1", + "glob": "^7.0.5", + "glob2base": "^0.0.12", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "resolve": "^1.1.7", + "safe-buffer": "^5.0.1", + "shell-quote": "^1.6.1", + "subarg": "^1.0.0" + }, + "dependencies": { + "anymatch": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + } + } + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "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": { + "version": "1.1.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "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" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "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-color-names": { + "version": "0.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", + "dev": true + }, + "css-declaration-sorter": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-declaration-sorter/-/css-declaration-sorter-3.0.1.tgz", + "integrity": "sha512-jH4024SHZ3e0M7ann9VxpFpH3moplRXNz9ZBqvFMZqi09Yo5ARbs2wdPH8GqN9iRTlQynrbGbraNbBxBLei85Q==", + "dev": true, + "requires": { + "postcss": "^6.0.0", + "timsort": "^0.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "css-loader": { + "version": "0.28.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-loader/-/css-loader-0.28.10.tgz", + "integrity": "sha512-X1IJteKnW9Llmrd+lJ0f7QZHh9Arf+11S7iRcoT2+riig3BK0QaCaOtubAulMK6Itbo08W6d3l8sW21r+Jhp5Q==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "css-selector-tokenizer": "^0.7.0", + "cssnano": "^3.10.0", + "icss-utils": "^2.1.0", + "loader-utils": "^1.0.2", + "lodash.camelcase": "^4.3.0", + "object-assign": "^4.1.1", + "postcss": "^5.0.6", + "postcss-modules-extract-imports": "^1.2.0", + "postcss-modules-local-by-default": "^1.2.0", + "postcss-modules-scope": "^1.1.0", + "postcss-modules-values": "^1.3.0", + "postcss-value-parser": "^3.3.0", + "source-list-map": "^2.0.0" + } + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-select-base-adapter": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-select-base-adapter/-/css-select-base-adapter-0.1.0.tgz", + "integrity": "sha1-AQKz0UYw34bD65+p9UVicBBs+ZA=", + "dev": true + }, + "css-selector-tokenizer": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", + "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", + "dev": true, + "requires": { + "cssesc": "^0.1.0", + "fastparse": "^1.1.1", + "regexpu-core": "^1.0.0" + } + }, + "css-tree": { + "version": "1.0.0-alpha25", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-tree/-/css-tree-1.0.0-alpha25.tgz", + "integrity": "sha512-XC6xLW/JqIGirnZuUWHXCHRaAjje2b3OIB0Vj5RIJo6mIi/AdJo30quQl5LxUl0gkXDIrTrFGbMlcZjyFplz1A==", + "dev": true, + "requires": { + "mdn-data": "^1.0.0", + "source-map": "^0.5.3" + } + }, + "css-unit-converter": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-unit-converter/-/css-unit-converter-1.1.1.tgz", + "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=", + "dev": true + }, + "css-url-regex": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-url-regex/-/css-url-regex-1.1.0.tgz", + "integrity": "sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w=", + "dev": true + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", + "dev": true + }, + "cssauron": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssauron/-/cssauron-1.4.0.tgz", + "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", + "dev": true, + "requires": { + "through": "X.X.X" + } + }, + "cssesc": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssesc/-/cssesc-0.1.0.tgz", + "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", + "dev": true + }, + "cssnano": { + "version": "3.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssnano/-/cssnano-3.10.0.tgz", + "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", + "dev": true, + "requires": { + "autoprefixer": "^6.3.1", + "decamelize": "^1.1.2", + "defined": "^1.0.0", + "has": "^1.0.1", + "object-assign": "^4.0.1", + "postcss": "^5.0.14", + "postcss-calc": "^5.2.0", + "postcss-colormin": "^2.1.8", + "postcss-convert-values": "^2.3.4", + "postcss-discard-comments": "^2.0.4", + "postcss-discard-duplicates": "^2.0.1", + "postcss-discard-empty": "^2.0.1", + "postcss-discard-overridden": "^0.1.1", + "postcss-discard-unused": "^2.2.1", + "postcss-filter-plugins": "^2.0.0", + "postcss-merge-idents": "^2.1.5", + "postcss-merge-longhand": "^2.0.1", + "postcss-merge-rules": "^2.0.3", + "postcss-minify-font-values": "^1.0.2", + "postcss-minify-gradients": "^1.0.1", + "postcss-minify-params": "^1.0.4", + "postcss-minify-selectors": "^2.0.4", + "postcss-normalize-charset": "^1.1.0", + "postcss-normalize-url": "^3.0.7", + "postcss-ordered-values": "^2.1.0", + "postcss-reduce-idents": "^2.2.2", + "postcss-reduce-initial": "^1.0.0", + "postcss-reduce-transforms": "^1.0.3", + "postcss-svgo": "^2.1.1", + "postcss-unique-selectors": "^2.0.2", + "postcss-value-parser": "^3.2.3", + "postcss-zindex": "^2.0.1" + } + }, + "cssnano-preset-default": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssnano-preset-default/-/cssnano-preset-default-4.0.0.tgz", + "integrity": "sha1-wzQoe099SfstFwqS+SFGVXiOO2s=", + "dev": true, + "requires": { + "css-declaration-sorter": "^3.0.0", + "cssnano-util-raw-cache": "^4.0.0", + "postcss": "^6.0.0", + "postcss-calc": "^6.0.0", + "postcss-colormin": "^4.0.0", + "postcss-convert-values": "^4.0.0", + "postcss-discard-comments": "^4.0.0", + "postcss-discard-duplicates": "^4.0.0", + "postcss-discard-empty": "^4.0.0", + "postcss-discard-overridden": "^4.0.0", + "postcss-merge-longhand": "^4.0.0", + "postcss-merge-rules": "^4.0.0", + "postcss-minify-font-values": "^4.0.0", + "postcss-minify-gradients": "^4.0.0", + "postcss-minify-params": "^4.0.0", + "postcss-minify-selectors": "^4.0.0", + "postcss-normalize-charset": "^4.0.0", + "postcss-normalize-display-values": "^4.0.0", + "postcss-normalize-positions": "^4.0.0", + "postcss-normalize-repeat-style": "^4.0.0", + "postcss-normalize-string": "^4.0.0", + "postcss-normalize-timing-functions": "^4.0.0", + "postcss-normalize-unicode": "^4.0.0", + "postcss-normalize-url": "^4.0.0", + "postcss-normalize-whitespace": "^4.0.0", + "postcss-ordered-values": "^4.0.0", + "postcss-reduce-initial": "^4.0.0", + "postcss-reduce-transforms": "^4.0.0", + "postcss-svgo": "^4.0.0", + "postcss-unique-selectors": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "browserslist": { + "version": "4.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browserslist/-/browserslist-4.1.1.tgz", + "integrity": "sha512-VBorw+tgpOtZ1BYhrVSVTzTt/3+vSE3eFUh0N2GCFK1HffceOaf32YS/bs6WiFhjDAblAFrx85jMy3BG9fBK2Q==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000884", + "electron-to-chromium": "^1.3.62", + "node-releases": "^1.0.0-alpha.11" + } + }, + "caniuse-api": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "coa": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/coa/-/coa-2.0.1.tgz", + "integrity": "sha512-5wfTTO8E2/ja4jFSxePXlG5nRu5bBtL/r1HCIpJW/lzT6yDtKl0u0Z4o/Vpz32IpKmBn7HerheEZQgA9N2DarQ==", + "dev": true, + "requires": { + "q": "^1.1.2" + } + }, + "color": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color/-/color-3.1.0.tgz", + "integrity": "sha512-CwyopLkuRYO5ei2EpzpIh6LqJMt6Mt+jZhO5VI5f/wJLZriXQE32/SSqzmrh+QB+AZT81Cj8yv+7zwToW8ahZg==", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-string": { + "version": "1.5.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-string/-/color-string-1.5.3.tgz", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "css-select": { + "version": "1.3.0-rc0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-select/-/css-select-1.3.0-rc0.tgz", + "integrity": "sha1-b5MZaqrnN2ZuoQNqjLFKj8t6kjE=", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "^1.0.1" + } + }, + "csso": { + "version": "3.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/csso/-/csso-3.5.0.tgz", + "integrity": "sha512-WtJjFP3ZsSdWhiZr4/k1B9uHPgYjFYnDxfbaJxk1hz5PDLIJ5BCRWkJqaztZ0DbP8d2ZIVwUPIJb2YmCwkPaMw==", + "dev": true, + "requires": { + "css-tree": "1.0.0-alpha.27" + }, + "dependencies": { + "css-tree": { + "version": "1.0.0-alpha.27", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/css-tree/-/css-tree-1.0.0-alpha.27.tgz", + "integrity": "sha512-BAYp9FyN4jLXjfvRpTDchBllDptqlK9I7OsagXCG9Am5C+5jc8eRZHgqb9x500W2OKS14MMlpQc/nmh/aA7TEQ==", + "dev": true, + "requires": { + "mdn-data": "^1.0.0", + "source-map": "^0.5.3" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-svg": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-svg/-/is-svg-3.0.0.tgz", + "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==", + "dev": true, + "requires": { + "html-comment-regex": "^1.1.0" + } + }, + "js-yaml": { + "version": "3.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "normalize-url": { + "version": "3.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/normalize-url/-/normalize-url-3.3.0.tgz", + "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "postcss-calc": { + "version": "6.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-calc/-/postcss-calc-6.0.1.tgz", + "integrity": "sha1-PSQXG79udinUIqQ26/5t2VEfQzA=", + "dev": true, + "requires": { + "css-unit-converter": "^1.1.1", + "postcss": "^6.0.0", + "postcss-selector-parser": "^2.2.2", + "reduce-css-calc": "^2.0.0" + } + }, + "postcss-colormin": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-colormin/-/postcss-colormin-4.0.1.tgz", + "integrity": "sha1-bxwYoBVbxpYT8v8ThD4uSuj/C74=", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "color": "^3.0.0", + "has": "^1.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-convert-values": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-convert-values/-/postcss-convert-values-4.0.0.tgz", + "integrity": "sha1-d9d9mu0dxOaVbmUcw0nVMwWHb2I=", + "dev": true, + "requires": { + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-discard-comments": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-discard-comments/-/postcss-discard-comments-4.0.0.tgz", + "integrity": "sha1-loSimedrPpMmPvj9KtvxocCP2I0=", + "dev": true, + "requires": { + "postcss": "^6.0.0" + } + }, + "postcss-discard-duplicates": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.0.tgz", + "integrity": "sha1-QvPCZ/hfqQngQsNXZ+z9Zcsr1yw=", + "dev": true, + "requires": { + "postcss": "^6.0.0" + } + }, + "postcss-discard-empty": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-discard-empty/-/postcss-discard-empty-4.0.0.tgz", + "integrity": "sha1-VeGKWcdBKOOMfSgEvPpAVmEfuX8=", + "dev": true, + "requires": { + "postcss": "^6.0.0" + } + }, + "postcss-discard-overridden": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-discard-overridden/-/postcss-discard-overridden-4.0.0.tgz", + "integrity": "sha1-Sgv4WXh4TPH4HtLBwf2dlkodofo=", + "dev": true, + "requires": { + "postcss": "^6.0.0" + } + }, + "postcss-merge-longhand": { + "version": "4.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-merge-longhand/-/postcss-merge-longhand-4.0.5.tgz", + "integrity": "sha512-tw2obF6I2VhXhPMObQc1QpQO850m3arhqP3PcBAU7Tx70v73QF6brs9uK0XKMNuC7BPo6DW+fh07cGhrLL57HA==", + "dev": true, + "requires": { + "css-color-names": "0.0.4", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0", + "stylehacks": "^4.0.0" + } + }, + "postcss-merge-rules": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-merge-rules/-/postcss-merge-rules-4.0.1.tgz", + "integrity": "sha1-Qw/Vmz8u0uivzQsxJ47aOYVKuxA=", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "cssnano-util-same-parent": "^4.0.0", + "postcss": "^6.0.0", + "postcss-selector-parser": "^3.0.0", + "vendors": "^1.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", + "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "dev": true, + "requires": { + "dot-prop": "^4.1.1", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-minify-font-values": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-minify-font-values/-/postcss-minify-font-values-4.0.0.tgz", + "integrity": "sha1-TMM9KD1qgXWQNudX75gdksvYW+0=", + "dev": true, + "requires": { + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-minify-gradients": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-minify-gradients/-/postcss-minify-gradients-4.0.0.tgz", + "integrity": "sha1-P8ORZDnSepu4Bm23za2AFlDrCQ4=", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "is-color-stop": "^1.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-minify-params": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-minify-params/-/postcss-minify-params-4.0.0.tgz", + "integrity": "sha1-BekWbuSMBa9lGYnOhNOcG015BnQ=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0", + "uniqs": "^2.0.0" + } + }, + "postcss-minify-selectors": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-minify-selectors/-/postcss-minify-selectors-4.0.0.tgz", + "integrity": "sha1-sen2xGNBbT/Nyybnt4XZX2FXiq0=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "has": "^1.0.0", + "postcss": "^6.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", + "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "dev": true, + "requires": { + "dot-prop": "^4.1.1", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-normalize-charset": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-charset/-/postcss-normalize-charset-4.0.0.tgz", + "integrity": "sha1-JFJyknAtXoEp6vo9HeSe1RpqtzA=", + "dev": true, + "requires": { + "postcss": "^6.0.0" + } + }, + "postcss-normalize-url": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-url/-/postcss-normalize-url-4.0.0.tgz", + "integrity": "sha1-t6nIrSbPJmlMFG6y1ovQz0mVbw0=", + "dev": true, + "requires": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^3.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-ordered-values": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-ordered-values/-/postcss-ordered-values-4.1.0.tgz", + "integrity": "sha512-gbqbEiONKKJgoOKhtzBjFqmHSzviPL4rv0ACVcFS7wxWXBY07agFXRQ7Y3eMGV0ZORzQXp2NGnj0c+imJG0NcA==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-reduce-initial": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-reduce-initial/-/postcss-reduce-initial-4.0.1.tgz", + "integrity": "sha1-8tWPUM6isMXcEnjW6l7Q/1gpwpM=", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "has": "^1.0.0", + "postcss": "^6.0.0" + } + }, + "postcss-reduce-transforms": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.0.tgz", + "integrity": "sha1-9kX8dEDDUnT0DegQThStcWPt8Yg=", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "has": "^1.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + } + }, + "postcss-svgo": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-svgo/-/postcss-svgo-4.0.0.tgz", + "integrity": "sha1-wLutAlIPxjbJ14sOhAPi5RXDIoU=", + "dev": true, + "requires": { + "is-svg": "^3.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0", + "svgo": "^1.0.0" + } + }, + "postcss-unique-selectors": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-unique-selectors/-/postcss-unique-selectors-4.0.0.tgz", + "integrity": "sha1-BMHpdkx1h0JhMDQCxB8Ol2n8VQE=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "postcss": "^6.0.0", + "uniqs": "^2.0.0" + } + }, + "reduce-css-calc": { + "version": "2.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/reduce-css-calc/-/reduce-css-calc-2.1.4.tgz", + "integrity": "sha512-i/vWQbyd3aJRmip9OVSN9V6nIjLf/gg/ctxb0CpvHWtcRysFl/ngDBQD+rqavxdw/doScA3GMBXhzkHQ4GCzFQ==", + "dev": true, + "requires": { + "css-unit-converter": "^1.1.1", + "postcss-value-parser": "^3.3.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "svgo": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/svgo/-/svgo-1.0.5.tgz", + "integrity": "sha512-nYrifviB77aNKDNKKyuay3M9aYiK6Hv5gJVDdjj2ZXTQmI8WZc8+UPLR5IpVlktJfSu3co/4XcWgrgI6seGBPg==", + "dev": true, + "requires": { + "coa": "~2.0.1", + "colors": "~1.1.2", + "css-select": "~1.3.0-rc0", + "css-select-base-adapter": "~0.1.0", + "css-tree": "1.0.0-alpha25", + "css-url-regex": "^1.1.0", + "csso": "^3.5.0", + "js-yaml": "~3.10.0", + "mkdirp": "~0.5.1", + "object.values": "^1.0.4", + "sax": "~1.2.4", + "stable": "~0.1.6", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + } + } + } + }, + "cssnano-util-get-arguments": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", + "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", + "dev": true + }, + "cssnano-util-get-match": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", + "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", + "dev": true + }, + "cssnano-util-raw-cache": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.0.tgz", + "integrity": "sha1-vgooVuJfGF9feivMBiTii38Xmp8=", + "dev": true, + "requires": { + "postcss": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "cssnano-util-same-parent": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.0.tgz", + "integrity": "sha1-0qPeEDmqmLxOwlAB+gUDMMKhbaw=", + "dev": true + }, + "csso": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/csso/-/csso-2.3.2.tgz", + "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", + "dev": true, + "requires": { + "clap": "^1.0.9", + "source-map": "^0.5.3" + } + }, + "cssom": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssom/-/cssom-0.3.2.tgz", + "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", + "dev": true + }, + "cssstyle": { + "version": "0.2.37", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssstyle/-/cssstyle-0.2.37.tgz", + "integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=", + "dev": true, + "requires": { + "cssom": "0.3.x" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true + }, + "d": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "^0.10.9" + } + }, + "d3": { + "version": "3.5.17", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/d3/-/d3-3.5.17.tgz", + "integrity": "sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g=", + "dev": true + }, + "dargs": { + "version": "6.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dargs/-/dargs-6.0.0.tgz", + "integrity": "sha512-6lJauzNaI7MiM8EHQWmGj+s3rP5/i1nYs8GAvKrLAx/9dpc9xS/4seFb1ioR39A+kcfu4v3jnEa/EE5qWYnitQ==", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-urls": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/data-urls/-/data-urls-1.0.0.tgz", + "integrity": "sha512-ai40PPQR0Fn1lD2PPie79CibnlMN2AYiDhwFX/rZHVsxbs5kNJSjegqXIprhouGXlRdEnfybva7kqRGnB6mypA==", + "dev": true, + "requires": { + "abab": "^1.0.4", + "whatwg-mimetype": "^2.0.0", + "whatwg-url": "^6.4.0" + } + }, + "date-fns": { + "version": "1.29.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/date-fns/-/date-fns-1.29.0.tgz", + "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==", + "dev": true + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "dev": true, + "requires": { + "foreach": "^2.0.5", + "object-keys": "^1.0.8" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "del": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "dev": true, + "requires": { + "globby": "^6.1.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", + "rimraf": "^2.2.8" + }, + "dependencies": { + "globby": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-conflict": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/detect-conflict/-/detect-conflict-1.0.1.tgz", + "integrity": "sha1-CIZXpmqWHAUBnbfEIwiDsca0F24=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, + "detect-node": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/detect-node/-/detect-node-2.0.3.tgz", + "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=", + "dev": true + }, + "detective": { + "version": "4.7.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/detective/-/detective-4.7.1.tgz", + "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "dev": true, + "requires": { + "acorn": "^5.2.1", + "defined": "^1.0.0" + } + }, + "dev-ip": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dev-ip/-/dev-ip-1.0.1.tgz", + "integrity": "sha1-p2o+0YVb56ASu4rBbLgPPADcKPA=", + "dev": true + }, + "diagnostics": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/diagnostics/-/diagnostics-1.1.1.tgz", + "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", + "dev": true, + "requires": { + "colorspace": "1.1.x", + "enabled": "1.0.x", + "kuler": "1.0.x" + } + }, + "didyoumean": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/didyoumean/-/didyoumean-1.2.1.tgz", + "integrity": "sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", + "dev": true + }, + "dns-packet": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "dev": true, + "requires": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "dev": true, + "requires": { + "buffer-indexof": "^1.0.0" + } + }, + "dom-converter": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dom-converter/-/dom-converter-0.1.4.tgz", + "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", + "dev": true, + "requires": { + "utila": "~0.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", + "dev": true + } + } + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "~1.1.1", + "entities": "~1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domexception": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/domexception/-/domexception-1.0.1.tgz", + "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", + "dev": true, + "requires": { + "webidl-conversions": "^4.0.2" + } + }, + "domhandler": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/domhandler/-/domhandler-2.1.0.tgz", + "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "drange": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", + "dev": true + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "duplexify": { + "version": "3.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "easy-extender": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/easy-extender/-/easy-extender-2.3.2.tgz", + "integrity": "sha1-PTJI/r4rFZYHMW2PnPSRwWZIIh0=", + "dev": true, + "requires": { + "lodash": "^3.10.1" + } + }, + "eazy-logger": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/eazy-logger/-/eazy-logger-3.0.2.tgz", + "integrity": "sha1-oyWqXlPROiIliJsqxBE7K5Y29Pw=", + "dev": true, + "requires": { + "tfunk": "^3.0.1" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "editions": { + "version": "1.3.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/editions/-/editions-1.3.4.tgz", + "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==", + "dev": true + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "ejs": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ejs/-/ejs-2.6.1.tgz", + "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.70", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/electron-to-chromium/-/electron-to-chromium-1.3.70.tgz", + "integrity": "sha512-WYMjqCnPVS5JA+XvwEnpwucJpVi2+q9cdCFpbhxgWGsCtforFBEkuP9+nCyy/wnU/0SyLcLRIeZct9ayMGcXoQ==", + "dev": true + }, + "elegant-spinner": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", + "dev": true + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "enabled": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/enabled/-/enabled-1.0.2.tgz", + "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", + "dev": true, + "requires": { + "env-variable": "0.0.x" + } + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "engine.io": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/engine.io/-/engine.io-3.2.0.tgz", + "integrity": "sha512-mRbgmAtQ4GAlKwuPnnAvXXwdPhEx+jkc0OBCLrXuD/CRvwNK3AxRSnqK4FSqmAMRRHryVJP8TopOvmEaA64fKw==", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "base64id": "1.0.0", + "cookie": "0.3.1", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.0", + "ws": "~3.3.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "engine.io-client": { + "version": "3.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/engine.io-client/-/engine.io-client-3.1.6.tgz", + "integrity": "sha512-hnuHsFluXnsKOndS4Hv6SvUrgdYx1pk2NqfaDMW+GWdgfU3+/V25Cj7I8a0x92idSpa5PIhJRKxPvp9mnoLsfg==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "~3.3.1", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "engine.io-parser": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/engine.io-parser/-/engine.io-parser-2.1.2.tgz", + "integrity": "sha512-dInLFzr80RijZ1rGpx1+56/uFoH7/7InhH3kZt+Ms6hT8tNx3NGW/WNSA/f8As1WkOfkuyb3tnRyuXGxusclMw==", + "dev": true, + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.4", + "has-binary2": "~1.0.2" + } + }, + "enhanced-resolve": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", + "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "entities": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + }, + "env-paths": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/env-paths/-/env-paths-1.0.0.tgz", + "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=", + "dev": true + }, + "env-variable": { + "version": "0.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/env-variable/-/env-variable-0.0.5.tgz", + "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==", + "dev": true + }, + "envify": { + "version": "3.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/envify/-/envify-3.4.1.tgz", + "integrity": "sha1-1xIjKejfFoi6dxsSUBkXyc5cvOg=", + "dev": true, + "requires": { + "jstransform": "^11.0.3", + "through": "~2.3.4" + } + }, + "envinfo": { + "version": "4.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/envinfo/-/envinfo-4.4.2.tgz", + "integrity": "sha512-5rfRs+m+6pwoKRCFqpsA5+qsLngFms1aWPrxfKbrObCzQaPc3M3yPloZx+BL9UE3dK58cxw36XVQbFRSCCfGSQ==", + "dev": true + }, + "errno": { + "version": "0.1.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error": { + "version": "7.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/error/-/error-7.0.2.tgz", + "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=", + "dev": true, + "requires": { + "string-template": "~0.2.1", + "xtend": "~4.0.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "error-stack-parser": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/error-stack-parser/-/error-stack-parser-2.0.2.tgz", + "integrity": "sha512-E1fPutRDdIj/hohG0UpT5mayXNCxXP9d+snxFsPU9X0XgccOumKraa3juDMwTUyi7+Bu5+mCGagjg4IYeNbOdw==", + "dev": true, + "requires": { + "stackframe": "^1.0.4" + } + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } + }, + "es5-ext": { + "version": "0.10.45", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/es5-ext/-/es5-ext-0.10.45.tgz", + "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-promise": { + "version": "4.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/es6-promise/-/es6-promise-4.0.5.tgz", + "integrity": "sha1-eILzCt3lskDM+n99eMVIMwlRrkI=", + "dev": true + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "es6-templates": { + "version": "0.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/es6-templates/-/es6-templates-0.2.3.tgz", + "integrity": "sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ=", + "dev": true, + "requires": { + "recast": "~0.11.12", + "through": "~2.3.6" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/escodegen/-/escodegen-1.10.0.tgz", + "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", + "dev": true, + "requires": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "eventemitter3": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/eventemitter3/-/eventemitter3-1.2.0.tgz", + "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "eventsource": { + "version": "0.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/eventsource/-/eventsource-0.1.6.tgz", + "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", + "dev": true, + "requires": { + "original": ">=0.0.5" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "exec-sh": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/exec-sh/-/exec-sh-0.2.1.tgz", + "integrity": "sha512-aLt95pexaugVtQerpmE51+4QfWrNc304uez7jvj6fWnN8GeEHpttB8F36n8N7uVhUMbH/1enbxQ9HImZ4w/9qg==", + "dev": true, + "requires": { + "merge": "^1.1.3" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "expect": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expect/-/expect-22.4.3.tgz", + "integrity": "sha512-XcNXEPehqn8b/jm8FYotdX0YrXn36qp4HWlrVT4ktwQas1l1LPxiVWncYnnL2eyMtKAmVIaG0XAp0QlrqJaxaA==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "jest-diff": "^22.4.3", + "jest-get-type": "^22.4.3", + "jest-matcher-utils": "^22.4.3", + "jest-message-util": "^22.4.3", + "jest-regex-util": "^22.4.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + } + } + }, + "exports-loader": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/exports-loader/-/exports-loader-0.7.0.tgz", + "integrity": "sha512-RKwCrO4A6IiKm0pG3c9V46JxIHcDplwwGJn6+JJ1RcVnh/WSGJa0xkmk5cRVtgOPzCAtTMGj2F7nluh9L0vpSA==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "source-map": "0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.5.0.tgz", + "integrity": "sha1-D+llA6yGpa213mP05BKuSHLNvoY=", + "dev": true + } + } + }, + "express": { + "version": "4.16.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/express/-/express-4.16.3.tgz", + "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.3", + "qs": "6.5.1", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, + "qs": { + "version": "6.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-glob": { + "version": "2.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-glob/-/fast-glob-2.2.3.tgz", + "integrity": "sha512-NiX+JXjnx43RzvVFwRWfPKo4U+1BrK5pJPsHQdKMlLoFHrrGktXglQhHliSihWAq+m1z6fHk3uwGHrtRbS9vLA==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.0.1", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.1", + "micromatch": "^3.1.10" + } + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fast-safe-stringify": { + "version": "2.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", + "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==", + "dev": true + }, + "fastparse": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fastparse/-/fastparse-1.1.1.tgz", + "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=", + "dev": true + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "fb-watchman": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fb-watchman/-/fb-watchman-2.0.0.tgz", + "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", + "dev": true, + "requires": { + "bser": "^2.0.0" + } + }, + "fbjs": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fbjs/-/fbjs-0.6.1.tgz", + "integrity": "sha1-lja3cF9bqWhNRLcveDISVK/IYPc=", + "dev": true, + "requires": { + "core-js": "^1.0.0", + "loose-envify": "^1.0.0", + "promise": "^7.0.3", + "ua-parser-js": "^0.7.9", + "whatwg-fetch": "^0.9.0" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", + "dev": true + } + } + }, + "fecha": { + "version": "2.3.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fecha/-/fecha-2.3.3.tgz", + "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==", + "dev": true + }, + "figgy-pudding": { + "version": "3.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/figgy-pudding/-/figgy-pudding-3.5.1.tgz", + "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-loader": { + "version": "1.1.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/file-loader/-/file-loader-1.1.11.tgz", + "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", + "dev": true, + "requires": { + "loader-utils": "^1.0.2", + "schema-utils": "^0.4.5" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "^7.0.3", + "minimatch": "^3.0.3" + } + }, + "filesize": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/filesize/-/filesize-3.6.1.tgz", + "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "dev": true + }, + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "first-chunk-stream": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", + "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "flatten": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", + "dev": true + }, + "flow-parser": { + "version": "0.71.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/flow-parser/-/flow-parser-0.71.0.tgz", + "integrity": "sha512-rXSvqSBLf8aRI6T3P99jMcUYvZoO1KZcKDkzGJmXvYdNAgRKu7sfGNtxEsn3cX4TgungBuJpX+K8aHRC9/B5MA==", + "dev": true + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "follow-redirects": { + "version": "1.5.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/follow-redirects/-/follow-redirects-1.5.9.tgz", + "integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==", + "dev": true, + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "fork-ts-checker-webpack-plugin": { + "version": "0.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-0.4.1.tgz", + "integrity": "sha512-UckdUYL51F5t9t/2Uqk0xatxz8Cf75a1THNIrDYajjcAcg2Q64SXNP7BTQPxXm0bU1chzjR3brXIaianbFqI3Q==", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "chalk": "^1.1.3", + "chokidar": "^1.7.0", + "lodash.endswith": "^4.2.1", + "lodash.isfunction": "^3.0.8", + "lodash.isstring": "^4.0.1", + "lodash.startswith": "^4.2.1", + "minimatch": "^3.0.4", + "resolve": "^1.5.0", + "tapable": "^1.0.0", + "vue-parser": "^1.1.5" + }, + "dependencies": { + "anymatch": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + } + } + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + }, + "dependencies": { + "combined-stream": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + } + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "friendly-errors-webpack-plugin": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.0.tgz", + "integrity": "sha512-K27M3VK30wVoOarP651zDmb93R9zF28usW4ocaK3mfQeIEI5BPht/EzZs5E8QLLwbLRJQMwscAjDxYPb1FuNiw==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "error-stack-parser": "^2.0.0", + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-extra": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fs-extra/-/fs-extra-3.0.1.tgz", + "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^3.0.0", + "universalify": "^0.1.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "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" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "generator-jhipster": { + "version": "5.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/generator-jhipster/-/generator-jhipster-5.4.2.tgz", + "integrity": "sha512-iuTZGPonlMFWrabTC7x27UnCa8sckWFKD7HiwMp2JOYLlLU+BPt0WJWlQ9hJv5JHHx+pe0pUxwEHbi0fSu0Ljw==", + "dev": true, + "requires": { + "axios": "0.18.0", + "chalk": "2.4.1", + "commander": "2.16.0", + "conf": "2.0.0", + "didyoumean": "1.2.1", + "ejs": "2.6.1", + "glob": "7.1.2", + "gulp-filter": "5.1.0", + "insight": "0.10.1", + "jhipster-core": "3.4.0", + "js-object-pretty-print": "0.3.0", + "js-yaml": "3.12.0", + "lodash": "4.17.10", + "meow": "5.0.0", + "mkdirp": "0.5.1", + "os-locale": "2.1.0", + "parse-gitignore": "1.0.1", + "pluralize": "7.0.0", + "prettier": "1.13.7", + "randexp": "0.4.9", + "semver": "5.5.0", + "shelljs": "0.8.2", + "tabtab": "2.2.2", + "through2": "2.0.3", + "uuid": "3.3.2", + "yeoman-environment": "2.3.0", + "yeoman-generator": "3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "axios": { + "version": "0.18.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", + "dev": true, + "requires": { + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "commander": { + "version": "2.16.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commander/-/commander-2.16.0.tgz", + "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "prettier": { + "version": "1.13.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prettier/-/prettier-1.13.7.tgz", + "integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==", + "dev": true + }, + "semver": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-own-enumerable-property-symbols": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz", + "integrity": "sha512-TtY/sbOemiMKPRUDDanGCSgBYe7Mf0vbRsWnBZ+9yghpZ1MvcpSpuZFjHdEeY/LZjZy0vdLjS77L6HosisFiug==", + "dev": true + }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "gh-got": { + "version": "6.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/gh-got/-/gh-got-6.0.0.tgz", + "integrity": "sha512-F/mS+fsWQMo1zfgG9MD8KWvTWPPzzhuVwY++fhQ5Ggd+0P+CAMHtzMZhNxG+TqGfHDChJKsbh6otfMGqO2AKBw==", + "dev": true, + "requires": { + "got": "^7.0.0", + "is-plain-obj": "^1.1.0" + } + }, + "github-username": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/github-username/-/github-username-4.1.0.tgz", + "integrity": "sha1-y+KABBiDIG2kISrp5LXxacML9Bc=", + "dev": true, + "requires": { + "gh-got": "^6.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-all": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-all/-/glob-all-3.1.0.tgz", + "integrity": "sha1-iRPd+17hrHgSZWJBsD1SF8ZLAqs=", + "dev": true, + "requires": { + "glob": "^7.0.5", + "yargs": "~1.2.6" + }, + "dependencies": { + "minimist": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist/-/minimist-0.1.0.tgz", + "integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4=", + "dev": true + }, + "yargs": { + "version": "1.2.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs/-/yargs-1.2.6.tgz", + "integrity": "sha1-nHtKgv1dWVsr8Xq23MQxNUMv40s=", + "dev": true, + "requires": { + "minimist": "^0.1.0" + } + } + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "dev": true, + "requires": { + "find-index": "^0.1.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "7.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "got": { + "version": "7.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "grouped-queue": { + "version": "0.3.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/grouped-queue/-/grouped-queue-0.3.3.tgz", + "integrity": "sha1-wWfSpTGcWg4JZO9qJbfC34mWyFw=", + "dev": true, + "requires": { + "lodash": "^4.17.2" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "growly": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, + "gulp-filter": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/gulp-filter/-/gulp-filter-5.1.0.tgz", + "integrity": "sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM=", + "dev": true, + "requires": { + "multimatch": "^2.0.0", + "plugin-error": "^0.1.2", + "streamfilter": "^1.0.5" + } + }, + "handle-thing": { + "version": "1.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/handle-thing/-/handle-thing-1.2.5.tgz", + "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "dev": true, + "requires": { + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "optional": true + } + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "dev": true, + "requires": { + "ajv": "^5.3.0", + "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-binary2": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-binary2/-/has-binary2-1.0.2.tgz", + "integrity": "sha1-6D26SfC5vk0CbSc2U1DZ8D9Uvpg=", + "dev": true, + "requires": { + "isarray": "2.0.1" + }, + "dependencies": { + "isarray": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + } + } + }, + "has-color": { + "version": "0.1.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", + "dev": true + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hash.js/-/hash.js-1.1.4.tgz", + "integrity": "sha512-A6RlQvvZEtFS5fLU43IDu0QUmBy+fDO9VMdTXvufKwIkt/rFfvICAViCax5fbDO4zdNzaC3/27ZhKUok5bAJyw==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hex-color-regex": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hex-color-regex/-/hex-color-regex-1.1.0.tgz", + "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hoek": { + "version": "4.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", + "dev": true + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "hsl-regex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hsl-regex/-/hsl-regex-1.0.0.tgz", + "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", + "dev": true + }, + "hsla-regex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hsla-regex/-/hsla-regex-1.0.0.tgz", + "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", + "dev": true + }, + "html-comment-regex": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/html-comment-regex/-/html-comment-regex-1.1.1.tgz", + "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=", + "dev": true + }, + "html-encoding-sniffer": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", + "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", + "dev": true, + "requires": { + "whatwg-encoding": "^1.0.1" + } + }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "dev": true + }, + "html-loader": { + "version": "0.5.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/html-loader/-/html-loader-0.5.5.tgz", + "integrity": "sha512-7hIW7YinOYUpo//kSYcPB6dCKoceKLmOwjEMmhIobHuWGDVl0Nwe4l68mdG/Ru0wcUxQjVMEoZpkalZ/SE7zog==", + "dev": true, + "requires": { + "es6-templates": "^0.2.3", + "fastparse": "^1.1.1", + "html-minifier": "^3.5.8", + "loader-utils": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "html-minifier": { + "version": "3.5.16", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/html-minifier/-/html-minifier-3.5.16.tgz", + "integrity": "sha512-zP5EfLSpiLRp0aAgud4CQXPQZm9kXwWjR/cF0PfdOj+jjWnOaCgeZcll4kYXSvIBPeUMmyaSc7mM4IDtA+kboA==", + "dev": true, + "requires": { + "camel-case": "3.0.x", + "clean-css": "4.1.x", + "commander": "2.15.x", + "he": "1.1.x", + "param-case": "2.1.x", + "relateurl": "0.2.x", + "uglify-js": "3.3.x" + }, + "dependencies": { + "commander": { + "version": "2.15.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + } + } + }, + "html-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", + "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", + "dev": true, + "requires": { + "html-minifier": "^3.2.3", + "loader-utils": "^0.2.16", + "lodash": "^4.17.3", + "pretty-error": "^2.0.2", + "tapable": "^1.0.0", + "toposort": "^1.0.0", + "util.promisify": "1.0.0" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "htmlparser2": { + "version": "3.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/htmlparser2/-/htmlparser2-3.3.0.tgz", + "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.1", + "domutils": "1.1", + "readable-stream": "1.0" + }, + "dependencies": { + "domutils": { + "version": "1.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/domutils/-/domutils-1.1.6.tgz", + "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "dev": true + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "dev": true + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "dependencies": { + "statuses": { + "version": "1.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + } + } + }, + "http-parser-js": { + "version": "0.4.13", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-parser-js/-/http-parser-js-0.4.13.tgz", + "integrity": "sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc=", + "dev": true + }, + "http-proxy": { + "version": "1.15.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-proxy/-/http-proxy-1.15.2.tgz", + "integrity": "sha1-ZC/cr/5S00SNK9o7AHnpQJBk2jE=", + "dev": true, + "requires": { + "eventemitter3": "1.x.x", + "requires-port": "1.x.x" + } + }, + "http-proxy-middleware": { + "version": "0.18.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", + "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "dev": true, + "requires": { + "http-proxy": "^1.16.2", + "is-glob": "^4.0.0", + "lodash": "^4.17.5", + "micromatch": "^3.1.9" + }, + "dependencies": { + "eventemitter3": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/eventemitter3/-/eventemitter3-3.1.0.tgz", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", + "dev": true + }, + "http-proxy": { + "version": "1.17.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-proxy/-/http-proxy-1.17.0.tgz", + "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "dev": true, + "requires": { + "eventemitter3": "^3.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "husky": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/husky/-/husky-1.1.0.tgz", + "integrity": "sha512-jnUD0PK3xGLB5Jc3f3UEwl8qOZeLd0WiWABhVyHPS5R298HOccGZJMOMBSk3gFksAa1BeK9FQYYEfPNlqkfBxg==", + "dev": true, + "requires": { + "cosmiconfig": "^5.0.6", + "execa": "^0.9.0", + "find-up": "^3.0.0", + "get-stdin": "^6.0.0", + "is-ci": "^1.2.1", + "pkg-dir": "^3.0.0", + "please-upgrade-node": "^3.1.1", + "read-pkg": "^4.0.1", + "run-node": "^1.0.0", + "slash": "^2.0.0" + }, + "dependencies": { + "execa": { + "version": "0.9.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/execa/-/execa-0.9.0.tgz", + "integrity": "sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA==", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-limit/-/p-limit-2.0.0.tgz", + "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "read-pkg": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg/-/read-pkg-4.0.1.tgz", + "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", + "dev": true, + "requires": { + "normalize-package-data": "^2.3.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0" + } + }, + "slash": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + } + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-replace-symbols": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", + "dev": true + }, + "icss-utils": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/icss-utils/-/icss-utils-2.1.0.tgz", + "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "immutable": { + "version": "3.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/immutable/-/immutable-3.8.2.tgz", + "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=", + "dev": true + }, + "import-local": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "dev": true, + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inquirer": { + "version": "5.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "rxjs": { + "version": "5.5.12", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + } + } + }, + "insight": { + "version": "0.10.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/insight/-/insight-0.10.1.tgz", + "integrity": "sha512-kLGeYQkh18f8KuC68QKdi0iwUcIaayJVB/STpX7x452/7pAUm1yfG4giJwcxbrTh0zNYtc8kBR+6maLMOzglOQ==", + "dev": true, + "requires": { + "async": "^2.1.4", + "chalk": "^2.3.0", + "conf": "^1.3.1", + "inquirer": "^5.0.0", + "lodash.debounce": "^4.0.8", + "os-name": "^2.0.1", + "request": "^2.74.0", + "tough-cookie": "^2.0.0", + "uuid": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "async": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "conf": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/conf/-/conf-1.4.0.tgz", + "integrity": "sha512-bzlVWS2THbMetHqXKB8ypsXN4DQ/1qopGwNJi1eYbpwesJcd86FBjFciCQX/YwAhp9bM7NVnPFqZ5LpV7gP0Dg==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "env-paths": "^1.0.0", + "make-dir": "^1.0.0", + "pkg-up": "^2.0.0", + "write-file-atomic": "^2.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "internal-ip": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/internal-ip/-/internal-ip-1.2.0.tgz", + "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", + "dev": true, + "requires": { + "meow": "^3.3.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + } + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "into-stream": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "dev": true, + "requires": { + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" + } + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "ip": { + "version": "1.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ipaddr.js": { + "version": "1.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ipaddr.js/-/ipaddr.js-1.6.0.tgz", + "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=", + "dev": true + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "dev": true + }, + "is-ci": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "dev": true, + "requires": { + "ci-info": "^1.5.0" + } + }, + "is-color-stop": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-color-stop/-/is-color-stop-1.1.0.tgz", + "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", + "dev": true, + "requires": { + "css-color-names": "^0.0.4", + "hex-color-regex": "^1.1.0", + "hsl-regex": "^1.0.0", + "hsla-regex": "^1.0.0", + "rgb-regex": "^1.0.1", + "rgba-regex": "^1.0.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-generator-fn": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-generator-fn/-/is-generator-fn-1.0.0.tgz", + "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-number-like": { + "version": "1.0.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-number-like/-/is-number-like-1.0.8.tgz", + "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==", + "dev": true, + "requires": { + "lodash.isfinite": "^3.3.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, + "is-observable": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-observable/-/is-observable-1.1.0.tgz", + "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", + "dev": true, + "requires": { + "symbol-observable": "^1.1.0" + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-scoped": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-scoped/-/is-scoped-1.0.0.tgz", + "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", + "dev": true, + "requires": { + "scoped-regex": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-svg": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-svg/-/is-svg-2.1.0.tgz", + "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", + "dev": true, + "requires": { + "html-comment-regex": "^1.1.0" + } + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isbinaryfile": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isbinaryfile/-/isbinaryfile-3.0.3.tgz", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "dev": true, + "requires": { + "buffer-alloc": "^1.2.0" + } + }, + "isemail": { + "version": "3.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isemail/-/isemail-3.1.2.tgz", + "integrity": "sha512-zfRhJn9rFSGhzU5tGZqepRSAj3+g6oTOHxMGGriWNJZzyLPUK8H7VHpqKntegnW8KLyGA9zwuNaCoopl40LTpg==", + "dev": true, + "requires": { + "punycode": "2.x.x" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-api": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istanbul-api/-/istanbul-api-1.3.1.tgz", + "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", + "dev": true, + "requires": { + "async": "^2.1.4", + "compare-versions": "^3.1.0", + "fileset": "^2.0.2", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-hook": "^1.2.0", + "istanbul-lib-instrument": "^1.10.1", + "istanbul-lib-report": "^1.1.4", + "istanbul-lib-source-maps": "^1.2.4", + "istanbul-reports": "^1.3.0", + "js-yaml": "^3.7.0", + "mkdirp": "^0.5.1", + "once": "^1.4.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", + "integrity": "sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "istanbul-lib-coverage": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", + "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz", + "integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==", + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.10.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", + "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", + "dev": true, + "requires": { + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.2.0", + "semver": "^5.3.0" + } + }, + "istanbul-lib-report": { + "version": "1.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", + "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^1.2.0", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz", + "integrity": "sha512-fDa0hwU/5sDXwAklXgAoCJCOsFsBplVQ6WBldz5UwaqOzmDhUK4nfuR7/G//G2lERlblUNJB8P6e8cXq3a7MlA==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.1.2", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istanbul-reports/-/istanbul-reports-1.3.0.tgz", + "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", + "dev": true, + "requires": { + "handlebars": "^4.0.3" + } + }, + "istextorbinary": { + "version": "2.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istextorbinary/-/istextorbinary-2.2.1.tgz", + "integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==", + "dev": true, + "requires": { + "binaryextensions": "2", + "editions": "^1.3.3", + "textextensions": "2" + } + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "jasmine-diff": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jasmine-diff/-/jasmine-diff-0.1.3.tgz", + "integrity": "sha1-k8zC3MQQKMXd1GBlWAdIOfLe6qg=", + "dev": true, + "requires": { + "diff": "^3.2.0" + } + }, + "jest": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest/-/jest-22.4.3.tgz", + "integrity": "sha512-FFCdU/pXOEASfHxFDOWUysI/+FFoqiXJADEIXgDKuZyqSmBD3tZ4BEGH7+M79v7czj7bbkhwtd2LaEDcJiM/GQ==", + "dev": true, + "requires": { + "import-local": "^1.0.0", + "jest-cli": "^22.4.3" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "jest-cli": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-cli/-/jest-cli-22.4.3.tgz", + "integrity": "sha512-IiHybF0DJNqZPsbjn4Cy4vcqcmImpoFwNFnkehzVw8lTUSl4axZh5DHewu5bdpZF2Y5gUqFKYzH0FH4Qx2k+UA==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.1", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "import-local": "^1.0.0", + "is-ci": "^1.0.10", + "istanbul-api": "^1.1.14", + "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-instrument": "^1.8.0", + "istanbul-lib-source-maps": "^1.2.1", + "jest-changed-files": "^22.4.3", + "jest-config": "^22.4.3", + "jest-environment-jsdom": "^22.4.3", + "jest-get-type": "^22.4.3", + "jest-haste-map": "^22.4.3", + "jest-message-util": "^22.4.3", + "jest-regex-util": "^22.4.3", + "jest-resolve-dependencies": "^22.4.3", + "jest-runner": "^22.4.3", + "jest-runtime": "^22.4.3", + "jest-snapshot": "^22.4.3", + "jest-util": "^22.4.3", + "jest-validate": "^22.4.3", + "jest-worker": "^22.4.3", + "micromatch": "^2.3.11", + "node-notifier": "^5.2.1", + "realpath-native": "^1.0.0", + "rimraf": "^2.5.4", + "slash": "^1.0.0", + "string-length": "^2.0.0", + "strip-ansi": "^4.0.0", + "which": "^1.2.12", + "yargs": "^10.0.3" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "10.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs/-/yargs-10.1.2.tgz", + "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.1.0" + } + }, + "yargs-parser": { + "version": "8.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs-parser/-/yargs-parser-8.1.0.tgz", + "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "jest-changed-files": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-changed-files/-/jest-changed-files-22.4.3.tgz", + "integrity": "sha512-83Dh0w1aSkUNFhy5d2dvqWxi/y6weDwVVLU6vmK0cV9VpRxPzhTeGimbsbRDSnEoszhF937M4sDLLeS7Cu/Tmw==", + "dev": true, + "requires": { + "throat": "^4.0.0" + } + }, + "jest-config": { + "version": "22.4.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-config/-/jest-config-22.4.4.tgz", + "integrity": "sha512-9CKfo1GC4zrXSoMLcNeDvQBfgtqGTB1uP8iDIZ97oB26RCUb886KkKWhVcpyxVDOUxbhN+uzcBCeFe7w+Iem4A==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "glob": "^7.1.1", + "jest-environment-jsdom": "^22.4.1", + "jest-environment-node": "^22.4.1", + "jest-get-type": "^22.1.0", + "jest-jasmine2": "^22.4.4", + "jest-regex-util": "^22.1.0", + "jest-resolve": "^22.4.2", + "jest-util": "^22.4.1", + "jest-validate": "^22.4.4", + "pretty-format": "^22.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-diff": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-diff/-/jest-diff-22.4.3.tgz", + "integrity": "sha512-/QqGvCDP5oZOF6PebDuLwrB2BMD8ffJv6TAGAdEVuDx1+uEgrHpSFrfrOiMRx2eJ1hgNjlQrOQEHetVwij90KA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "diff": "^3.2.0", + "jest-get-type": "^22.4.3", + "pretty-format": "^22.4.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-docblock": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-docblock/-/jest-docblock-22.4.3.tgz", + "integrity": "sha512-uPKBEAw7YrEMcXueMKZXn/rbMxBiSv48fSqy3uEnmgOlQhSX+lthBqHb1fKWNVmFqAp9E/RsSdBfiV31LbzaOg==", + "dev": true, + "requires": { + "detect-newline": "^2.1.0" + } + }, + "jest-environment-jsdom": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz", + "integrity": "sha512-FviwfR+VyT3Datf13+ULjIMO5CSeajlayhhYQwpzgunswoaLIPutdbrnfUHEMyJCwvqQFaVtTmn9+Y8WCt6n1w==", + "dev": true, + "requires": { + "jest-mock": "^22.4.3", + "jest-util": "^22.4.3", + "jsdom": "^11.5.1" + } + }, + "jest-environment-node": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-environment-node/-/jest-environment-node-22.4.3.tgz", + "integrity": "sha512-reZl8XF6t/lMEuPWwo9OLfttyC26A5AMgDyEQ6DBgZuyfyeNUzYT8BFo6uxCCP/Av/b7eb9fTi3sIHFPBzmlRA==", + "dev": true, + "requires": { + "jest-mock": "^22.4.3", + "jest-util": "^22.4.3" + } + }, + "jest-get-type": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-get-type/-/jest-get-type-22.4.3.tgz", + "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==", + "dev": true + }, + "jest-haste-map": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-haste-map/-/jest-haste-map-22.4.3.tgz", + "integrity": "sha512-4Q9fjzuPVwnaqGKDpIsCSoTSnG3cteyk2oNVjBX12HHOaF1oxql+uUiqZb5Ndu7g/vTZfdNwwy4WwYogLh29DQ==", + "dev": true, + "requires": { + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.1.11", + "jest-docblock": "^22.4.3", + "jest-serializer": "^22.4.3", + "jest-worker": "^22.4.3", + "micromatch": "^2.3.11", + "sane": "^2.0.0" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + } + } + }, + "jest-jasmine2": { + "version": "22.4.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-jasmine2/-/jest-jasmine2-22.4.4.tgz", + "integrity": "sha512-nK3vdUl50MuH7vj/8at7EQVjPGWCi3d5+6aCi7Gxy/XMWdOdbH1qtO/LjKbqD8+8dUAEH+BVVh7HkjpCWC1CSw==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "co": "^4.6.0", + "expect": "^22.4.0", + "graceful-fs": "^4.1.11", + "is-generator-fn": "^1.0.0", + "jest-diff": "^22.4.0", + "jest-matcher-utils": "^22.4.0", + "jest-message-util": "^22.4.0", + "jest-snapshot": "^22.4.0", + "jest-util": "^22.4.1", + "source-map-support": "^0.5.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-junit": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-junit/-/jest-junit-5.1.0.tgz", + "integrity": "sha512-3EVf1puv2ox5wybQDfLX3AEn3IKOgDV4E76y4pO2hBu46DEtAFZZAm//X1pzPQpqKji0zqgMIzqzF/K+uGAX9A==", + "dev": true, + "requires": { + "jest-validate": "^23.0.1", + "mkdirp": "^0.5.1", + "strip-ansi": "^4.0.0", + "xml": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "jest-validate": { + "version": "23.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-validate/-/jest-validate-23.6.0.tgz", + "integrity": "sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.1.0", + "leven": "^2.1.0", + "pretty-format": "^23.6.0" + } + }, + "pretty-format": { + "version": "23.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pretty-format/-/pretty-format-23.6.0.tgz", + "integrity": "sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "ansi-styles": "^3.2.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-leak-detector": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-leak-detector/-/jest-leak-detector-22.4.3.tgz", + "integrity": "sha512-NZpR/Ls7+ndO57LuXROdgCGz2RmUdC541tTImL9bdUtU3WadgFGm0yV+Ok4Fuia/1rLAn5KaJ+i76L6e3zGJYQ==", + "dev": true, + "requires": { + "pretty-format": "^22.4.3" + } + }, + "jest-matcher-utils": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz", + "integrity": "sha512-lsEHVaTnKzdAPR5t4B6OcxXo9Vy4K+kRRbG5gtddY8lBEC+Mlpvm1CJcsMESRjzUhzkz568exMV1hTB76nAKbA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.4.3", + "pretty-format": "^22.4.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-message-util": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-message-util/-/jest-message-util-22.4.3.tgz", + "integrity": "sha512-iAMeKxhB3Se5xkSjU0NndLLCHtP4n+GtCqV0bISKA5dmOXQfEbdEmYiu2qpnWBDCQdEafNDDU6Q+l6oBMd/+BA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0-beta.35", + "chalk": "^2.0.1", + "micromatch": "^2.3.11", + "slash": "^1.0.0", + "stack-utils": "^1.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-mock": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-mock/-/jest-mock-22.4.3.tgz", + "integrity": "sha512-+4R6mH5M1G4NK16CKg9N1DtCaFmuxhcIqF4lQK/Q1CIotqMs/XBemfpDPeVZBFow6iyUNu6EBT9ugdNOTT5o5Q==", + "dev": true + }, + "jest-preset-angular": { + "version": "5.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-preset-angular/-/jest-preset-angular-5.2.2.tgz", + "integrity": "sha1-zeqSwaABBsRGCB1lQrbFoPjcn+w=", + "dev": true, + "requires": { + "@types/jest": "^22.1.3", + "jest-zone-patch": "^0.0.8", + "ts-jest": "^22.4.1" + } + }, + "jest-regex-util": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-regex-util/-/jest-regex-util-22.4.3.tgz", + "integrity": "sha512-LFg1gWr3QinIjb8j833bq7jtQopiwdAs67OGfkPrvy7uNUbVMfTXXcOKXJaeY5GgjobELkKvKENqq1xrUectWg==", + "dev": true + }, + "jest-resolve": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-resolve/-/jest-resolve-22.4.3.tgz", + "integrity": "sha512-u3BkD/MQBmwrOJDzDIaxpyqTxYH+XqAXzVJP51gt29H8jpj3QgKof5GGO2uPGKGeA1yTMlpbMs1gIQ6U4vcRhw==", + "dev": true, + "requires": { + "browser-resolve": "^1.11.2", + "chalk": "^2.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-resolve-dependencies": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-resolve-dependencies/-/jest-resolve-dependencies-22.4.3.tgz", + "integrity": "sha512-06czCMVToSN8F2U4EvgSB1Bv/56gc7MpCftZ9z9fBgUQM7dzHGCMBsyfVA6dZTx8v0FDcnALf7hupeQxaBCvpA==", + "dev": true, + "requires": { + "jest-regex-util": "^22.4.3" + } + }, + "jest-runner": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-runner/-/jest-runner-22.4.3.tgz", + "integrity": "sha512-U7PLlQPRlWNbvOHWOrrVay9sqhBJmiKeAdKIkvX4n1G2tsvzLlf77nBD28GL1N6tGv4RmuTfI8R8JrkvCa+IBg==", + "dev": true, + "requires": { + "exit": "^0.1.2", + "jest-config": "^22.4.3", + "jest-docblock": "^22.4.3", + "jest-haste-map": "^22.4.3", + "jest-jasmine2": "^22.4.3", + "jest-leak-detector": "^22.4.3", + "jest-message-util": "^22.4.3", + "jest-runtime": "^22.4.3", + "jest-util": "^22.4.3", + "jest-worker": "^22.4.3", + "throat": "^4.0.0" + } + }, + "jest-runtime": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-runtime/-/jest-runtime-22.4.3.tgz", + "integrity": "sha512-Eat/esQjevhx9BgJEC8udye+FfoJ2qvxAZfOAWshYGS22HydHn5BgsvPdTtt9cp0fSl5LxYOFA1Pja9Iz2Zt8g==", + "dev": true, + "requires": { + "babel-core": "^6.0.0", + "babel-jest": "^22.4.3", + "babel-plugin-istanbul": "^4.1.5", + "chalk": "^2.0.1", + "convert-source-map": "^1.4.0", + "exit": "^0.1.2", + "graceful-fs": "^4.1.11", + "jest-config": "^22.4.3", + "jest-haste-map": "^22.4.3", + "jest-regex-util": "^22.4.3", + "jest-resolve": "^22.4.3", + "jest-util": "^22.4.3", + "jest-validate": "^22.4.3", + "json-stable-stringify": "^1.0.1", + "micromatch": "^2.3.11", + "realpath-native": "^1.0.0", + "slash": "^1.0.0", + "strip-bom": "3.0.0", + "write-file-atomic": "^2.1.0", + "yargs": "^10.0.3" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "10.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs/-/yargs-10.1.2.tgz", + "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.1.0" + } + }, + "yargs-parser": { + "version": "8.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs-parser/-/yargs-parser-8.1.0.tgz", + "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "jest-serializer": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-serializer/-/jest-serializer-22.4.3.tgz", + "integrity": "sha512-uPaUAppx4VUfJ0QDerpNdF43F68eqKWCzzhUlKNDsUPhjOon7ZehR4C809GCqh765FoMRtTVUVnGvIoskkYHiw==", + "dev": true + }, + "jest-snapshot": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-snapshot/-/jest-snapshot-22.4.3.tgz", + "integrity": "sha512-JXA0gVs5YL0HtLDCGa9YxcmmV2LZbwJ+0MfyXBBc5qpgkEYITQFJP7XNhcHFbUvRiniRpRbGVfJrOoYhhGE0RQ==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-diff": "^22.4.3", + "jest-matcher-utils": "^22.4.3", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "pretty-format": "^22.4.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-sonar-reporter": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-sonar-reporter/-/jest-sonar-reporter-2.0.0.tgz", + "integrity": "sha512-ZervDCgEX5gdUbdtWsjdipLN3bKJwpxbvhkYNXTAYvAckCihobSLr9OT/IuyNIRT1EZMDDwR6DroWtrq+IL64w==", + "dev": true, + "requires": { + "xml": "^1.0.1" + } + }, + "jest-util": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-util/-/jest-util-22.4.3.tgz", + "integrity": "sha512-rfDfG8wyC5pDPNdcnAlZgwKnzHvZDu8Td2NJI/jAGKEGxJPYiE4F0ss/gSAkG4778Y23Hvbz+0GMrDJTeo7RjQ==", + "dev": true, + "requires": { + "callsites": "^2.0.0", + "chalk": "^2.0.1", + "graceful-fs": "^4.1.11", + "is-ci": "^1.0.10", + "jest-message-util": "^22.4.3", + "mkdirp": "^0.5.1", + "source-map": "^0.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-validate": { + "version": "22.4.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-validate/-/jest-validate-22.4.4.tgz", + "integrity": "sha512-dmlf4CIZRGvkaVg3fa0uetepcua44DHtktHm6rcoNVtYlpwe6fEJRkMFsaUVcFHLzbuBJ2cPw9Gl9TKfnzMVwg==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-config": "^22.4.4", + "jest-get-type": "^22.1.0", + "leven": "^2.1.0", + "pretty-format": "^22.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "jest-worker": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-worker/-/jest-worker-22.4.3.tgz", + "integrity": "sha512-B1ucW4fI8qVAuZmicFxI1R3kr2fNeYJyvIQ1rKcuLYnenFV5K5aMbxFj6J0i00Ju83S8jP2d7Dz14+AvbIHRYQ==", + "dev": true, + "requires": { + "merge-stream": "^1.0.1" + } + }, + "jest-zone-patch": { + "version": "0.0.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-zone-patch/-/jest-zone-patch-0.0.8.tgz", + "integrity": "sha1-kPo7W2DpWtPmJN0sPrWbsdyr03E=", + "dev": true + }, + "jhipster-core": { + "version": "3.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jhipster-core/-/jhipster-core-3.4.0.tgz", + "integrity": "sha512-iVJ6MF4jlpvtVL5gbn9t4Jw27RodjY04SXYSGfTLAzHyQRMmehHLvNq/3DBjVwHgBrDn1u2k17oLGouJus9MhA==", + "dev": true, + "requires": { + "chevrotain": "4.1.0", + "fs-extra": "7.0.0", + "lodash": "4.17.11", + "winston": "3.1.0" + }, + "dependencies": { + "fs-extra": { + "version": "7.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fs-extra/-/fs-extra-7.0.0.tgz", + "integrity": "sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "joi": { + "version": "11.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/joi/-/joi-11.4.0.tgz", + "integrity": "sha512-O7Uw+w/zEWgbL6OcHbyACKSj0PkQeUgmehdoXVSxt92QFCq4+1390Rwh5moI2K/OgC7D8RHRZqHZxT2husMJHA==", + "dev": true, + "requires": { + "hoek": "4.x.x", + "isemail": "3.x.x", + "topo": "2.x.x" + } + }, + "js-base64": { + "version": "2.4.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-base64/-/js-base64-2.4.5.tgz", + "integrity": "sha512-aUnNwqMOXw3yvErjMPSQu6qIIzUmT1e5KcU1OZxRDU1g/am6mzBvcrmLAYwzmB59BHPrh5/tKaiF4OPhqRWESQ==", + "dev": true + }, + "js-object-pretty-print": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-object-pretty-print/-/js-object-pretty-print-0.3.0.tgz", + "integrity": "sha1-RnDkUAZu4ezPNRdMfRl/WqOLz3Q=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-yaml/-/js-yaml-3.7.0.tgz", + "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^2.6.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jscodeshift": { + "version": "0.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jscodeshift/-/jscodeshift-0.5.0.tgz", + "integrity": "sha512-JAcQINNMFpdzzpKJN8k5xXjF3XDuckB1/48uScSzcnNyK199iWEc9AxKL9OoX5144M2w5zEx9Qs4/E/eBZZUlw==", + "dev": true, + "requires": { + "babel-plugin-transform-flow-strip-types": "^6.8.0", + "babel-preset-es2015": "^6.9.0", + "babel-preset-stage-1": "^6.5.0", + "babel-register": "^6.9.0", + "babylon": "^7.0.0-beta.30", + "colors": "^1.1.2", + "flow-parser": "^0.*", + "lodash": "^4.13.1", + "micromatch": "^2.3.7", + "neo-async": "^2.5.0", + "node-dir": "0.1.8", + "nomnom": "^1.8.1", + "recast": "^0.14.1", + "temp": "^0.8.1", + "write-file-atomic": "^1.2.0" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "ast-types": { + "version": "0.11.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ast-types/-/ast-types-0.11.3.tgz", + "integrity": "sha512-XA5o5dsNw8MhyW0Q7MWXJWc4oOzZKbdsEJq45h7c8q/d9DwWZ5F2ugUc1PuMLPGsUnphCt/cNDHu8JeBbxf1qA==", + "dev": true + }, + "babylon": { + "version": "7.0.0-beta.47", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/babylon/-/babylon-7.0.0-beta.47.tgz", + "integrity": "sha512-+rq2cr4GDhtToEzKFD6KZZMDBXhjFAr9JjPw9pAppZACeEWqNM294j+NdBzkSHYXwzzBmVjZ3nEVJlOhbR2gOQ==", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "recast": { + "version": "0.14.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/recast/-/recast-0.14.7.tgz", + "integrity": "sha512-/nwm9pkrcWagN40JeJhkPaRxiHXBRkXyRh/hgU088Z/v+qCy+zIHHY6bC6o7NaKAxPqtE6nD8zBH1LfU0/Wx6A==", + "dev": true, + "requires": { + "ast-types": "0.11.3", + "esprima": "~4.0.0", + "private": "~0.1.5", + "source-map": "~0.6.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + } + } + }, + "jsdom": { + "version": "11.9.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsdom/-/jsdom-11.9.0.tgz", + "integrity": "sha512-sb3omwJTJ+HwAltLZevM/KQBusY+l2Ar5UfnTCWk9oUVBiDnQPBNiG1BaTAKttCnneonYbNo7vi4EFDY2lBfNA==", + "dev": true, + "requires": { + "abab": "^1.0.4", + "acorn": "^5.3.0", + "acorn-globals": "^4.1.0", + "array-equal": "^1.0.0", + "cssom": ">= 0.3.2 < 0.4.0", + "cssstyle": ">= 0.2.37 < 0.3.0", + "data-urls": "^1.0.0", + "domexception": "^1.0.0", + "escodegen": "^1.9.0", + "html-encoding-sniffer": "^1.0.2", + "left-pad": "^1.2.0", + "nwmatcher": "^1.4.3", + "parse5": "4.0.0", + "pn": "^1.1.0", + "request": "^2.83.0", + "request-promise-native": "^1.0.5", + "sax": "^1.2.4", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.3.3", + "w3c-hr-time": "^1.0.1", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.3", + "whatwg-mimetype": "^2.1.0", + "whatwg-url": "^6.4.0", + "ws": "^4.0.0", + "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "parse5": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true + }, + "ws": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ws/-/ws-4.1.0.tgz", + "integrity": "sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0" + } + } + } + }, + "jsesc": { + "version": "0.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-loader": { + "version": "0.5.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-loader/-/json-loader-0.5.4.tgz", + "integrity": "sha1-i6oTZaYy9Yo8RtIBdfxgAsluN94=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json3": { + "version": "3.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonfile": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsonfile/-/jsonfile-3.0.1.tgz", + "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jstransform": { + "version": "11.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jstransform/-/jstransform-11.0.3.tgz", + "integrity": "sha1-CaeJk+CuTU70SH9hVakfYZDLQiM=", + "dev": true, + "requires": { + "base62": "^1.1.0", + "commoner": "^0.10.1", + "esprima-fb": "^15001.1.0-dev-harmony-fb", + "object-assign": "^2.0.0", + "source-map": "^0.4.2" + }, + "dependencies": { + "esprima-fb": { + "version": "15001.1.0-dev-harmony-fb", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz", + "integrity": "sha1-MKlHMDxrjV6VW+4rmbHSMyBqaQE=", + "dev": true + }, + "object-assign": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-assign/-/object-assign-2.1.1.tgz", + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "keyv": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "killable": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/killable/-/killable-1.0.0.tgz", + "integrity": "sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "kuler": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kuler/-/kuler-1.0.1.tgz", + "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", + "dev": true, + "requires": { + "colornames": "^1.1.1" + } + }, + "last-call-webpack-plugin": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz", + "integrity": "sha512-7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w==", + "dev": true, + "requires": { + "lodash": "^4.17.5", + "webpack-sources": "^1.1.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "leb": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/leb/-/leb-0.3.0.tgz", + "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=", + "dev": true + }, + "left-pad": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/left-pad/-/left-pad-1.3.0.tgz", + "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", + "dev": true + }, + "leven": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "limiter": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/limiter/-/limiter-1.1.3.tgz", + "integrity": "sha512-zrycnIMsLw/3ZxTbW7HCez56rcFGecWTx5OZNplzcXUUmJLmoYArC6qdJzmAN5BWiNXGcpjhF9RQ1HSv5zebEw==", + "dev": true + }, + "lint-staged": { + "version": "7.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lint-staged/-/lint-staged-7.3.0.tgz", + "integrity": "sha512-AXk40M9DAiPi7f4tdJggwuKIViUplYtVj1os1MVEteW7qOkU50EOehayCfO9TsoGK24o/EsWb41yrEgfJDDjCw==", + "dev": true, + "requires": { + "chalk": "^2.3.1", + "commander": "^2.14.1", + "cosmiconfig": "^5.0.2", + "debug": "^3.1.0", + "dedent": "^0.7.0", + "execa": "^0.9.0", + "find-parent-dir": "^0.3.0", + "is-glob": "^4.0.0", + "is-windows": "^1.0.2", + "jest-validate": "^23.5.0", + "listr": "^0.14.1", + "lodash": "^4.17.5", + "log-symbols": "^2.2.0", + "micromatch": "^3.1.8", + "npm-which": "^3.0.1", + "p-map": "^1.1.1", + "path-is-inside": "^1.0.2", + "pify": "^3.0.0", + "please-upgrade-node": "^3.0.2", + "staged-git-files": "1.1.1", + "string-argv": "^0.0.2", + "stringify-object": "^3.2.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "execa": { + "version": "0.9.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/execa/-/execa-0.9.0.tgz", + "integrity": "sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA==", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "jest-validate": { + "version": "23.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jest-validate/-/jest-validate-23.6.0.tgz", + "integrity": "sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.1.0", + "leven": "^2.1.0", + "pretty-format": "^23.6.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pretty-format": { + "version": "23.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pretty-format/-/pretty-format-23.6.0.tgz", + "integrity": "sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "ansi-styles": "^3.2.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "listr": { + "version": "0.14.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/listr/-/listr-0.14.2.tgz", + "integrity": "sha512-vmaNJ1KlGuGWShHI35X/F8r9xxS0VTHh9GejVXwSN20fG5xpq3Jh4bJbnumoT6q5EDM/8/YP1z3YMtQbFmhuXw==", + "dev": true, + "requires": { + "@samverschueren/stream-to-observable": "^0.3.0", + "is-observable": "^1.1.0", + "is-promise": "^2.1.0", + "is-stream": "^1.1.0", + "listr-silent-renderer": "^1.1.1", + "listr-update-renderer": "^0.4.0", + "listr-verbose-renderer": "^0.4.0", + "p-map": "^1.1.1", + "rxjs": "^6.1.0" + } + }, + "listr-silent-renderer": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", + "dev": true + }, + "listr-update-renderer": { + "version": "0.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz", + "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "cli-truncate": "^0.2.1", + "elegant-spinner": "^1.0.1", + "figures": "^1.7.0", + "indent-string": "^3.0.0", + "log-symbols": "^1.0.2", + "log-update": "^1.0.2", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "figures": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "requires": { + "chalk": "^1.0.0" + } + } + } + }, + "listr-verbose-renderer": { + "version": "0.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", + "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "cli-cursor": "^1.0.2", + "date-fns": "^1.27.2", + "figures": "^1.7.0" + }, + "dependencies": { + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + } + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "localtunnel": { + "version": "1.9.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/localtunnel/-/localtunnel-1.9.0.tgz", + "integrity": "sha512-wCIiIHJ8kKIcWkTQE3m1VRABvsH2ZuOkiOpZUofUCf6Q42v3VIZ+Q0YfX1Z4sYDRj0muiKL1bLvz1FeoxsPO0w==", + "dev": true, + "requires": { + "axios": "0.17.1", + "debug": "2.6.8", + "openurl": "1.1.1", + "yargs": "6.6.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "debug": { + "version": "2.6.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "yargs": { + "version": "6.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs/-/yargs-6.6.0.tgz", + "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^4.2.0" + } + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs-parser/-/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "lodash.endswith": { + "version": "4.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.endswith/-/lodash.endswith-4.2.1.tgz", + "integrity": "sha1-/tWawXOO0+I27dcGTsRWRIs3vAk=", + "dev": true + }, + "lodash.isfinite": { + "version": "3.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", + "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=", + "dev": true + }, + "lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.pad": { + "version": "4.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.pad/-/lodash.pad-4.5.1.tgz", + "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=", + "dev": true + }, + "lodash.padend": { + "version": "4.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.padend/-/lodash.padend-4.6.1.tgz", + "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", + "dev": true + }, + "lodash.padstart": { + "version": "4.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.padstart/-/lodash.padstart-4.6.1.tgz", + "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", + "dev": true + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, + "lodash.startswith": { + "version": "4.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.startswith/-/lodash.startswith-4.2.1.tgz", + "integrity": "sha1-xZjErc4YiiflMUVzHNxsDnF3YAw=", + "dev": true + }, + "lodash.tail": { + "version": "4.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.tail/-/lodash.tail-4.1.1.tgz", + "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=", + "dev": true + }, + "lodash.template": { + "version": "4.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.template/-/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "log-update": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/log-update/-/log-update-1.0.2.tgz", + "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", + "dev": true, + "requires": { + "ansi-escapes": "^1.0.0", + "cli-cursor": "^1.0.2" + }, + "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + } + } + }, + "logform": { + "version": "1.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/logform/-/logform-1.10.0.tgz", + "integrity": "sha512-em5ojIhU18fIMOw/333mD+ZLE2fis0EzXl1ZwHx4iQzmpQi6odNiY/t+ITNr33JZhT9/KEaH+UPIipr6a9EjWg==", + "dev": true, + "requires": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^2.3.3", + "ms": "^2.1.1", + "triple-beam": "^1.2.0" + }, + "dependencies": { + "colors": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colors/-/colors-1.3.2.tgz", + "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "loglevel": { + "version": "1.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loglevel/-/loglevel-1.6.1.tgz", + "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", + "dev": true + }, + "loglevelnext": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loglevelnext/-/loglevelnext-1.0.5.tgz", + "integrity": "sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==", + "dev": true, + "requires": { + "es6-symbol": "^3.1.1", + "object.assign": "^4.1.0" + } + }, + "long": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "^3.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "macaddress": { + "version": "0.2.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/macaddress/-/macaddress-0.2.8.tgz", + "integrity": "sha1-WQTcU3w57G2+/q6QIycTX6hRHxI=", + "dev": true + }, + "macos-release": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/macos-release/-/macos-release-1.1.0.tgz", + "integrity": "sha512-mmLbumEYMi5nXReB9js3WGsB8UE6cDBWyIO62Z4DNx6GbRhDxHNjA1MlzSpJ2S2KM1wyiPRA0d19uHWYYvMHjA==", + "dev": true + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.x" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "math-expression-evaluator": { + "version": "1.2.17", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", + "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", + "dev": true + }, + "math-random": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "mdn-data": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mdn-data/-/mdn-data-1.2.0.tgz", + "integrity": "sha512-esDqNvsJB2q5V28+u7NdtdMg6Rmg4khQmAVSjUiX7BY/7haIv0K2yWM43hYp0or+3nvG7+UaTF1JHz31hgU1TA==", + "dev": true + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "mem-fs": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mem-fs/-/mem-fs-1.1.3.tgz", + "integrity": "sha1-uK6NLj/Lb10/kWXBLUVRoGXZicw=", + "dev": true, + "requires": { + "through2": "^2.0.0", + "vinyl": "^1.1.0", + "vinyl-file": "^2.0.0" + } + }, + "mem-fs-editor": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mem-fs-editor/-/mem-fs-editor-5.1.0.tgz", + "integrity": "sha512-2Yt2GCYEbcotYbIJagmow4gEtHDqzpq5XN94+yAx/NT5+bGqIjkXnm3KCUQfE6kRfScGp9IZknScoGRKu8L78w==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "deep-extend": "^0.6.0", + "ejs": "^2.5.9", + "glob": "^7.0.3", + "globby": "^8.0.1", + "isbinaryfile": "^3.0.2", + "mkdirp": "^0.5.0", + "multimatch": "^2.0.0", + "rimraf": "^2.2.8", + "through2": "^2.0.0", + "vinyl": "^2.0.1" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "globby": { + "version": "8.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/globby/-/globby-8.0.1.tgz", + "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "meow": { + "version": "5.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "merge": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/merge/-/merge-1.2.0.tgz", + "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", + "dev": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge-jsons-webpack-plugin": { + "version": "1.0.14", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/merge-jsons-webpack-plugin/-/merge-jsons-webpack-plugin-1.0.14.tgz", + "integrity": "sha1-VA56m+2uQbz5MRscg0WgpjD2UYk=", + "dev": true, + "requires": { + "es6-promise": "4.0.5", + "glob": "7.1.1", + "json-loader": "0.5.4" + }, + "dependencies": { + "glob": { + "version": "7.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "merge2": { + "version": "1.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/merge2/-/merge2-1.2.3.tgz", + "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "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": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + }, + "mime-db": { + "version": "1.36.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", + "dev": true + }, + "mime-types": { + "version": "2.1.20", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mime-types/-/mime-types-2.1.20.tgz", + "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "dev": true, + "requires": { + "mime-db": "~1.36.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "mini-css-extract-plugin": { + "version": "0.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.2.tgz", + "integrity": "sha512-ots7URQH4wccfJq9Ssrzu2+qupbncAce4TmTzunI9CIwlQMp2XI+WNUw6xWF6MMAGAm1cbUVINrSjATaVMyKXg==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^1.0.0", + "webpack-sources": "^1.1.0" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "mississippi": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "dev": true, + "requires": { + "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": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mixin-object": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "dev": true, + "requires": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=", + "dev": true + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "moment": { + "version": "2.22.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + }, + "moment-locales-webpack-plugin": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/moment-locales-webpack-plugin/-/moment-locales-webpack-plugin-1.0.5.tgz", + "integrity": "sha512-33jWmbPQmIFLzHV+lQ2o5pPSDjc8C7tgRcIhiYPsXwq+X/8W5MEqBIcUQuaS4je0VRZb2tO1gl9C7NBeUKnonQ==", + "dev": true, + "requires": { + "lodash.difference": "^4.5.0" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "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": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multicast-dns": { + "version": "6.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "dev": true, + "requires": { + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", + "dev": true + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "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" + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + }, + "neo-async": { + "version": "2.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "ng-jhipster": { + "version": "0.5.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ng-jhipster/-/ng-jhipster-0.5.4.tgz", + "integrity": "sha512-1+rWT1p04anBWpN/BkYMnnFI6jXOqZjswYgZw2VjH2I79Giyg4bDLXFvaDbPawEUFc0p3W2r0OqdaLUcudOfrw==", + "requires": { + "@ngx-translate/core": "^10.0.1", + "@ngx-translate/http-loader": "^3.0.1" + } + }, + "ngx-cookie": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ngx-cookie/-/ngx-cookie-2.0.1.tgz", + "integrity": "sha512-3+agXZkoPxRP3IyELf7Eiuhk6TX+EAX974kkCR6Xjm+N7boEA+Fin2Q90AAE4XZzY48skkVzLH96TOikb5yU3g==" + }, + "ngx-infinite-scroll": { + "version": "0.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ngx-infinite-scroll/-/ngx-infinite-scroll-0.5.1.tgz", + "integrity": "sha1-3ZRSxgL/fDIi8MoWhIGqFBQChrc=" + }, + "ngx-webstorage": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ngx-webstorage/-/ngx-webstorage-2.0.1.tgz", + "integrity": "sha512-AhBkl1v5sBLYiGC1DuHxM90B8OewqyhYhm+KGtJIFxMh5dj3tlNgPokmWCtKcUZF26m8MgxDDuP5e6NeDCpYQw==" + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, + "node-dir": { + "version": "0.1.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/node-dir/-/node-dir-0.1.8.tgz", + "integrity": "sha1-VfuN62mQcHB/tn+RpGDwRIKUx30=", + "dev": true + }, + "node-forge": { + "version": "0.7.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/node-forge/-/node-forge-0.7.5.tgz", + "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", + "dev": true + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "dev": true, + "requires": { + "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": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "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.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "node-notifier": { + "version": "5.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/node-notifier/-/node-notifier-5.2.1.tgz", + "integrity": "sha512-MIBs+AAd6dJ2SklbbE8RUDRlIVhU8MaNLh1A9SUZDUHPiZkWLFde6UNwG41yQHZEToHgJMXqyVZ9UcS/ReOVTg==", + "dev": true, + "requires": { + "growly": "^1.3.0", + "semver": "^5.4.1", + "shellwords": "^0.1.1", + "which": "^1.3.0" + } + }, + "node-releases": { + "version": "1.0.0-alpha.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/node-releases/-/node-releases-1.0.0-alpha.11.tgz", + "integrity": "sha512-CaViu+2FqTNYOYNihXa5uPS/zry92I3vPU4nCB6JB3OeZ2UGtOpF5gRwuN4+m3hbEcL47bOXyun1jX2iC+3uEQ==", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, + "nomnom": { + "version": "1.8.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/nomnom/-/nomnom-1.8.1.tgz", + "integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=", + "dev": true, + "requires": { + "chalk": "~0.4.0", + "underscore": "~1.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", + "dev": true + }, + "chalk": { + "version": "0.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", + "dev": true, + "requires": { + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", + "dev": true + } + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + } + }, + "npm-package-arg": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npm-package-arg/-/npm-package-arg-6.1.0.tgz", + "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.6.0", + "osenv": "^0.1.5", + "semver": "^5.5.0", + "validate-npm-package-name": "^3.0.0" + } + }, + "npm-path": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npm-path/-/npm-path-2.0.4.tgz", + "integrity": "sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==", + "dev": true, + "requires": { + "which": "^1.2.10" + } + }, + "npm-registry-client": { + "version": "8.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npm-registry-client/-/npm-registry-client-8.5.1.tgz", + "integrity": "sha512-7rjGF2eA7hKDidGyEWmHTiKfXkbrcQAsGL/Rh4Rt3x3YNRNHhwaTzVJfW3aNvvlhg4G62VCluif0sLCb/i51Hg==", + "dev": true, + "requires": { + "concat-stream": "^1.5.2", + "graceful-fs": "^4.1.6", + "normalize-package-data": "~1.0.1 || ^2.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", + "npmlog": "2 || ^3.1.0 || ^4.0.0", + "once": "^1.3.3", + "request": "^2.74.0", + "retry": "^0.10.0", + "safe-buffer": "^5.1.1", + "semver": "2 >=2.2.1 || 3.x || 4 || 5", + "slide": "^1.1.3", + "ssri": "^5.2.4" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npm-which": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npm-which/-/npm-which-3.0.1.tgz", + "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", + "dev": true, + "requires": { + "commander": "^2.9.0", + "npm-path": "^2.0.2", + "which": "^1.2.10" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nwmatcher": { + "version": "1.4.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/nwmatcher/-/nwmatcher-1.4.4.tgz", + "integrity": "sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ==", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-component": { + "version": "0.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true + }, + "object-path": { + "version": "0.9.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-path/-/object-path-0.9.2.tgz", + "integrity": "sha1-D9mnT8X60a45aLWGvaXGMr1sBaU=", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "object.values": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object.values/-/object.values-1.0.4.tgz", + "integrity": "sha1-5STaCbT2b/Bd9FdUbscqyZ8TBpo=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.6.1", + "function-bind": "^1.1.0", + "has": "^1.0.1" + } + }, + "obuf": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "one-time": { + "version": "0.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/one-time/-/one-time-0.0.4.tgz", + "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "openurl": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/openurl/-/openurl-1.1.1.tgz", + "integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=", + "dev": true + }, + "opn": { + "version": "5.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/opn/-/opn-5.4.0.tgz", + "integrity": "sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + } + } + }, + "optimize-css-assets-webpack-plugin": { + "version": "5.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.1.tgz", + "integrity": "sha512-Rqm6sSjWtx9FchdP0uzTQDc7GXDKnwVEGoSxjezPkzMewx7gEWE9IMUYKmigTRC4U3RaNSwYVnUDLuIdtTpm0A==", + "dev": true, + "requires": { + "cssnano": "^4.1.0", + "last-call-webpack-plugin": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cssnano": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cssnano/-/cssnano-4.1.0.tgz", + "integrity": "sha512-7x24b/ghbrQv2QRgqMR12H3ZZ38xYCKJSXfg21YCtnIE177/NyvMkeiuQdWauIgMjySaTZ+cd5PN2qvfbsGeSw==", + "dev": true, + "requires": { + "cosmiconfig": "^5.0.0", + "cssnano-preset-default": "^4.0.0", + "is-resolvable": "^1.0.0", + "postcss": "^6.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, + "ora": { + "version": "0.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ora/-/ora-0.2.3.tgz", + "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "cli-cursor": "^1.0.2", + "cli-spinners": "^0.1.2", + "object-assign": "^4.0.1" + }, + "dependencies": { + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + } + } + }, + "original": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/original/-/original-1.0.1.tgz", + "integrity": "sha512-IEvtB5vM5ULvwnqMxWBLxkS13JIEXbakizMSo3yoPNPCIWzg8TG3Usn/UhXoZFM/m+FuEA20KdzPSFq/0rS+UA==", + "dev": true, + "requires": { + "url-parse": "~1.4.0" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "os-name": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-name/-/os-name-2.0.1.tgz", + "integrity": "sha1-uaOGNhwXrjohc27wWZQFyajF3F4=", + "dev": true, + "requires": { + "macos-release": "^1.0.0", + "win-release": "^1.0.0" + } + }, + "os-shim": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-shim/-/os-shim-0.1.3.tgz", + "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "p-each-series": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-each-series/-/p-each-series-1.0.0.tgz", + "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", + "dev": true, + "requires": { + "p-reduce": "^1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true + }, + "p-lazy": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-lazy/-/p-lazy-1.0.0.tgz", + "integrity": "sha1-7FPIAvLuOsKPFmzILQsrAt4nqDU=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-map": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, + "p-reduce": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-reduce/-/p-reduce-1.0.0.tgz", + "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", + "dev": true + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pako": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "parse-gitignore": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-gitignore/-/parse-gitignore-1.0.1.tgz", + "integrity": "sha512-UGyowyjtx26n65kdAMWhm6/3uy5uSrpcuH7tt+QEVudiBoVS+eqHxD5kbi9oWVRwj7sCzXqwuM+rUGw7earl6A==", + "dev": true + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parse5": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse5/-/parse5-3.0.3.tgz", + "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "parseqs": { + "version": "0.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parseqs/-/parseqs-0.0.5.tgz", + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseuri": { + "version": "0.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parseuri/-/parseuri-0.0.5.tgz", + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + } + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + } + } + }, + "please-upgrade-node": { + "version": "3.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz", + "integrity": "sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ==", + "dev": true, + "requires": { + "semver-compare": "^1.0.0" + } + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + } + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "pn": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pn/-/pn-1.1.0.tgz", + "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", + "dev": true + }, + "portfinder": { + "version": "1.0.13", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/portfinder/-/portfinder-1.0.13.tgz", + "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", + "dev": true, + "requires": { + "async": "^1.5.2", + "debug": "^2.2.0", + "mkdirp": "0.5.x" + } + }, + "portscanner": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/portscanner/-/portscanner-2.1.1.tgz", + "integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", + "dev": true, + "requires": { + "async": "1.5.2", + "is-number-like": "^1.0.3" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "js-base64": "^2.1.9", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "postcss-calc": { + "version": "5.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-calc/-/postcss-calc-5.3.1.tgz", + "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "dev": true, + "requires": { + "postcss": "^5.0.2", + "postcss-message-helpers": "^2.0.0", + "reduce-css-calc": "^1.2.6" + } + }, + "postcss-colormin": { + "version": "2.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-colormin/-/postcss-colormin-2.2.2.tgz", + "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "dev": true, + "requires": { + "colormin": "^1.0.5", + "postcss": "^5.0.13", + "postcss-value-parser": "^3.2.3" + } + }, + "postcss-convert-values": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", + "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", + "dev": true, + "requires": { + "postcss": "^5.0.11", + "postcss-value-parser": "^3.1.2" + } + }, + "postcss-discard-comments": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "dev": true, + "requires": { + "postcss": "^5.0.14" + } + }, + "postcss-discard-duplicates": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", + "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-discard-empty": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", + "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "dev": true, + "requires": { + "postcss": "^5.0.14" + } + }, + "postcss-discard-overridden": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", + "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "dev": true, + "requires": { + "postcss": "^5.0.16" + } + }, + "postcss-discard-unused": { + "version": "2.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "dev": true, + "requires": { + "postcss": "^5.0.14", + "uniqs": "^2.0.0" + } + }, + "postcss-filter-plugins": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz", + "integrity": "sha1-bYWGJTTXNaxCDkqFgG4fXUKG2Ew=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "uniqid": "^4.0.0" + } + }, + "postcss-load-config": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-load-config/-/postcss-load-config-1.2.0.tgz", + "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0", + "postcss-load-options": "^1.2.0", + "postcss-load-plugins": "^2.3.0" + }, + "dependencies": { + "cosmiconfig": { + "version": "2.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cosmiconfig/-/cosmiconfig-2.2.2.tgz", + "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", + "dev": true, + "requires": { + "is-directory": "^0.3.1", + "js-yaml": "^3.4.3", + "minimist": "^1.2.0", + "object-assign": "^4.1.0", + "os-homedir": "^1.0.1", + "parse-json": "^2.2.0", + "require-from-string": "^1.1.0" + } + } + } + }, + "postcss-load-options": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-load-options/-/postcss-load-options-1.2.0.tgz", + "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0" + }, + "dependencies": { + "cosmiconfig": { + "version": "2.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cosmiconfig/-/cosmiconfig-2.2.2.tgz", + "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", + "dev": true, + "requires": { + "is-directory": "^0.3.1", + "js-yaml": "^3.4.3", + "minimist": "^1.2.0", + "object-assign": "^4.1.0", + "os-homedir": "^1.0.1", + "parse-json": "^2.2.0", + "require-from-string": "^1.1.0" + } + } + } + }, + "postcss-load-plugins": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", + "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.1", + "object-assign": "^4.1.0" + }, + "dependencies": { + "cosmiconfig": { + "version": "2.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cosmiconfig/-/cosmiconfig-2.2.2.tgz", + "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", + "dev": true, + "requires": { + "is-directory": "^0.3.1", + "js-yaml": "^3.4.3", + "minimist": "^1.2.0", + "object-assign": "^4.1.0", + "os-homedir": "^1.0.1", + "parse-json": "^2.2.0", + "require-from-string": "^1.1.0" + } + } + } + }, + "postcss-loader": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-loader/-/postcss-loader-2.1.1.tgz", + "integrity": "sha512-f0J/DWE/hyO9/LH0WHpXkny/ZZ238sSaG3p1SRBtVZnFWUtD7GXIEgHoBg8cnAeRbmEvUxHQptY46zWfwNYj/w==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "postcss": "^6.0.0", + "postcss-load-config": "^1.2.0", + "schema-utils": "^0.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-merge-idents": { + "version": "2.1.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", + "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.10", + "postcss-value-parser": "^3.1.1" + } + }, + "postcss-merge-longhand": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", + "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-merge-rules": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", + "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "dev": true, + "requires": { + "browserslist": "^1.5.2", + "caniuse-api": "^1.5.2", + "postcss": "^5.0.4", + "postcss-selector-parser": "^2.2.2", + "vendors": "^1.0.0" + } + }, + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=", + "dev": true + }, + "postcss-minify-font-values": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", + "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.2" + } + }, + "postcss-minify-gradients": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", + "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "dev": true, + "requires": { + "postcss": "^5.0.12", + "postcss-value-parser": "^3.3.0" + } + }, + "postcss-minify-params": { + "version": "1.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", + "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.1", + "postcss": "^5.0.2", + "postcss-value-parser": "^3.0.2", + "uniqs": "^2.0.0" + } + }, + "postcss-minify-selectors": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", + "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.2", + "has": "^1.0.1", + "postcss": "^5.0.14", + "postcss-selector-parser": "^2.0.0" + } + }, + "postcss-modules-extract-imports": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz", + "integrity": "sha1-ZhQOzs447wa/DT41XWm/WdFB6oU=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-local-by-default": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", + "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", + "dev": true, + "requires": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-scope": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", + "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", + "dev": true, + "requires": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-values": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", + "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", + "dev": true, + "requires": { + "icss-replace-symbols": "^1.1.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-normalize-charset": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", + "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "dev": true, + "requires": { + "postcss": "^5.0.5" + } + }, + "postcss-normalize-display-values": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.0.tgz", + "integrity": "sha1-lQ4Me+NEV3ChYP/9a2ZEw8DNj4k=", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-normalize-positions": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-positions/-/postcss-normalize-positions-4.0.0.tgz", + "integrity": "sha1-7pNDq5gbgixjq3JhXszNCFZERaM=", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "has": "^1.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-normalize-repeat-style": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.0.tgz", + "integrity": "sha1-txHFks8W+vn/V15C+hALZ5kIPv8=", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "cssnano-util-get-match": "^4.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-normalize-string": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-string/-/postcss-normalize-string-4.0.0.tgz", + "integrity": "sha1-cYy20wpvrGrGqDDjLAbAfbxm/l0=", + "dev": true, + "requires": { + "has": "^1.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-normalize-timing-functions": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.0.tgz", + "integrity": "sha1-A1HymIaqmB1D2RssK9GuptCvbSM=", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-normalize-unicode": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.0.tgz", + "integrity": "sha1-Ws1dR7rqXRdnSyzMSuUWb6iM35c=", + "dev": true, + "requires": { + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-normalize-url": { + "version": "3.0.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", + "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", + "dev": true, + "requires": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^1.4.0", + "postcss": "^5.0.14", + "postcss-value-parser": "^3.2.3" + } + }, + "postcss-normalize-whitespace": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.0.tgz", + "integrity": "sha1-HafnaxCuY8EYJ/oE/Du0oe/pnMA=", + "dev": true, + "requires": { + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-ordered-values": { + "version": "2.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", + "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.1" + } + }, + "postcss-reduce-idents": { + "version": "2.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", + "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.2" + } + }, + "postcss-reduce-initial": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", + "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-reduce-transforms": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", + "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.8", + "postcss-value-parser": "^3.0.1" + } + }, + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "dev": true, + "requires": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-svgo": { + "version": "2.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-svgo/-/postcss-svgo-2.1.6.tgz", + "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "dev": true, + "requires": { + "is-svg": "^2.0.0", + "postcss": "^5.0.14", + "postcss-value-parser": "^3.2.3", + "svgo": "^0.7.0" + } + }, + "postcss-unique-selectors": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", + "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.1", + "postcss": "^5.0.4", + "uniqs": "^2.0.0" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", + "dev": true + }, + "postcss-zindex": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-zindex/-/postcss-zindex-2.2.0.tgz", + "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.4", + "uniqs": "^2.0.0" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "prettier": { + "version": "1.11.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prettier/-/prettier-1.11.1.tgz", + "integrity": "sha512-T/KD65Ot0PB97xTrG8afQ46x3oiVhnfGjGESSI9NWYcG92+OUPZKkwHqGWXH2t9jK1crnQjubECW0FuOth+hxw==", + "dev": true + }, + "pretty-bytes": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pretty-bytes/-/pretty-bytes-5.1.0.tgz", + "integrity": "sha512-wa5+qGVg9Yt7PB6rYm3kXlKzgzgivYTLRandezh43jjRqgyDyP+9YxfJpJiLs9yKD1WeU8/OvtToWpW7255FtA==", + "dev": true + }, + "pretty-error": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "dev": true, + "requires": { + "renderkid": "^2.0.1", + "utila": "~0.4" + } + }, + "pretty-format": { + "version": "22.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pretty-format/-/pretty-format-22.4.3.tgz", + "integrity": "sha512-S4oT9/sT6MN7/3COoOy+ZJeA92VmOnveLHgrwBE3Z1W5N9S2A1QGNYiE1z75DAENbJrXXUb+OWXhpJcg05QKQQ==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "ansi-styles": "^3.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + } + } + }, + "private": { + "version": "0.1.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "requires": { + "asap": "~2.0.3" + } + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "proxy-addr": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/proxy-addr/-/proxy-addr-2.0.3.tgz", + "integrity": "sha512-jQTChiCJteusULxjBp8+jftSQE5Obdl3k4cnmLA6WXtK6XFuWRnvVL7aCiBqaLPM8c4ph0S4tKna8XvmIwEnXQ==", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.6.0" + } + }, + "proxy-middleware": { + "version": "0.15.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/proxy-middleware/-/proxy-middleware-0.15.0.tgz", + "integrity": "sha1-o/3xvvtzD5UZZYcqwvYHTGFHelY=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.1.29", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "query-string": { + "version": "4.3.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "querystringify": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/querystringify/-/querystringify-2.0.0.tgz", + "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==", + "dev": true + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "randexp": { + "version": "0.4.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/randexp/-/randexp-0.4.9.tgz", + "integrity": "sha512-maAX1cnBkzIZ89O4tSQUOF098xjGMC8N+9vuY/WfHwg87THw6odD2Br35donlj5e6KnB1SB0QBHhTQhhDHuTPQ==", + "dev": true, + "requires": { + "drange": "^1.0.0", + "ret": "^0.2.0" + }, + "dependencies": { + "ret": { + "version": "0.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", + "dev": true + } + } + }, + "randomatic": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/randomatic/-/randomatic-3.0.0.tgz", + "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "raw-loader": { + "version": "0.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/raw-loader/-/raw-loader-0.5.1.tgz", + "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=", + "dev": true + }, + "react": { + "version": "0.14.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/react/-/react-0.14.9.tgz", + "integrity": "sha1-kRCmSXxJ1EuhwO3TF67CnC4NkdE=", + "dev": true, + "requires": { + "envify": "^3.0.0", + "fbjs": "^0.6.1" + } + }, + "react-dom": { + "version": "0.14.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/react-dom/-/react-dom-0.14.9.tgz", + "integrity": "sha1-BQZKPc8PsYgKOyv8nVjFXY2fYpM=", + "dev": true + }, + "read-chunk": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-chunk/-/read-chunk-2.1.0.tgz", + "integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=", + "dev": true, + "requires": { + "pify": "^3.0.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "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" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "realpath-native": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/realpath-native/-/realpath-native-1.0.0.tgz", + "integrity": "sha512-XJtlRJ9jf0E1H1SLeJyQ9PGzQD7S65h1pRXEcAeK48doKOnKxcgPeNohJvD5u/2sI9J1oke6E8bZHS/fmW1UiQ==", + "dev": true, + "requires": { + "util.promisify": "^1.0.0" + } + }, + "recast": { + "version": "0.11.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/recast/-/recast-0.11.23.tgz", + "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", + "dev": true, + "requires": { + "ast-types": "0.9.6", + "esprima": "~3.1.0", + "private": "~0.1.5", + "source-map": "~0.5.0" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + } + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2", + "math-expression-evaluator": "^1.2.14", + "reduce-function-call": "^1.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "reduce-function-call": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/reduce-function-call/-/reduce-function-call-1.0.2.tgz", + "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "reflect-metadata": { + "version": "0.1.12", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/reflect-metadata/-/reflect-metadata-0.1.12.tgz", + "integrity": "sha512-n+IyV+nGz3+0q3/Yf1ra12KpCyi001bi4XFxSjbiWWjfqb52iTTtpGXmCCAOWWIAn9KEuFZKGqBERHmrtScZ3A==" + }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexp-to-ast": { + "version": "0.3.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regexp-to-ast/-/regexp-to-ast-0.3.5.tgz", + "integrity": "sha512-1CJygtdvsfNFwiyjaMLBWtg2tfEqx/jSZ8S6TV+GlNL8kiH8rb4cm5Pb7A/C2BpyM/fA8ZJEudlCwi/jvAY+Ow==", + "dev": true + }, + "regexpu-core": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regexpu-core/-/regexpu-core-1.0.0.tgz", + "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "renderkid": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/renderkid/-/renderkid-2.0.1.tgz", + "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", + "dev": true, + "requires": { + "css-select": "^1.1.0", + "dom-converter": "~0.1", + "htmlparser2": "~3.3.0", + "strip-ansi": "^3.0.0", + "utila": "~0.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", + "dev": true + } + } + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "request": { + "version": "2.88.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "request-promise-core": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/request-promise-core/-/request-promise-core-1.1.1.tgz", + "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=", + "dev": true, + "requires": { + "lodash": "^4.13.1" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "request-promise-native": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/request-promise-native/-/request-promise-native-1.0.5.tgz", + "integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=", + "dev": true, + "requires": { + "request-promise-core": "1.1.1", + "stealthy-require": "^1.1.0", + "tough-cookie": ">=2.3.3" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "resp-modifier": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resp-modifier/-/resp-modifier-6.0.2.tgz", + "integrity": "sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08=", + "dev": true, + "requires": { + "debug": "^2.2.0", + "minimatch": "^3.0.2" + } + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "retry": { + "version": "0.10.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true + }, + "rgb-regex": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rgb-regex/-/rgb-regex-1.0.1.tgz", + "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", + "dev": true + }, + "rgba-regex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rgba-regex/-/rgba-regex-1.0.0.tgz", + "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-node": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/run-node/-/run-node-1.0.0.tgz", + "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", + "dev": true + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rx": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rx/-/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", + "dev": true + }, + "rxjs": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rxjs/-/rxjs-6.1.0.tgz", + "integrity": "sha512-lMZdl6xbHJCSb5lmnb6nOhsoBVCyoDC5LDJQK9WWyq+tsI7KnlDIZ0r0AZAlBpRPLbwQA9kzSBAZwNIZEZ+hcw==", + "requires": { + "tslib": "^1.9.0" + } + }, + "rxjs-compat": { + "version": "6.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rxjs-compat/-/rxjs-compat-6.1.0.tgz", + "integrity": "sha512-x5L1KQy1RqDRpPadN5iDOx71TV9Wqmlmu6OOEn3tFFgaTCB0/N+Lmby/rZHgJ6JEPzzt0nD9Zv+kS53E5JIR5g==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sane": { + "version": "2.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sane/-/sane-2.5.0.tgz", + "integrity": "sha512-glfKd7YH4UCrh/7dD+UESsr8ylKWRE7UQPoXuz28FgmcF0ViJQhCTCCZHICRKxf8G8O1KdLEn20dcICK54c7ew==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "exec-sh": "^0.2.0", + "fb-watchman": "^2.0.0", + "fsevents": "^1.1.1", + "micromatch": "^3.1.4", + "minimist": "^1.1.1", + "walker": "~1.0.5", + "watch": "~0.18.0" + } + }, + "sass": { + "version": "1.13.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sass/-/sass-1.13.0.tgz", + "integrity": "sha512-FmA4D73dULJ2WsnbMar3P9Fj1Kd83T3YA+QTfbb2+T61epdIgAvfCR+m9mK/mQrN45stlipKoVqsdaEdLe+iDQ==", + "dev": true, + "requires": { + "chokidar": "^2.0.0" + } + }, + "sass-loader": { + "version": "7.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sass-loader/-/sass-loader-7.1.0.tgz", + "integrity": "sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==", + "dev": true, + "requires": { + "clone-deep": "^2.0.1", + "loader-utils": "^1.0.1", + "lodash.tail": "^4.1.1", + "neo-async": "^2.5.0", + "pify": "^3.0.0", + "semver": "^5.5.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "schema-utils": { + "version": "0.4.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/schema-utils/-/schema-utils-0.4.7.tgz", + "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "scoped-regex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/scoped-regex/-/scoped-regex-1.0.0.tgz", + "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=", + "dev": true + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", + "dev": true + }, + "selfsigned": { + "version": "1.10.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/selfsigned/-/selfsigned-1.10.3.tgz", + "integrity": "sha512-vmZenZ+8Al3NLHkWnhBQ0x6BkML1eCP2xEi3JE+f3D9wW9fipD9NNJHYtE9XJM4TsPaHGZJIamrSI6MTg1dU2Q==", + "dev": true, + "requires": { + "node-forge": "0.7.5" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "semver-dsl": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/semver-dsl/-/semver-dsl-1.0.1.tgz", + "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, + "semver-intersect": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/semver-intersect/-/semver-intersect-1.3.1.tgz", + "integrity": "sha1-j6hKnhAovSOeRTDRo+GB5pjYhLo=", + "dev": true, + "requires": { + "semver": "^5.0.0" + } + }, + "send": { + "version": "0.16.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "statuses": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", + "dev": true + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "server-destroy": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/server-destroy/-/server-destroy-1.0.1.tgz", + "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shallow-clone": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shallow-clone/-/shallow-clone-1.0.0.tgz", + "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", + "dev": true, + "requires": { + "is-extendable": "^0.1.1", + "kind-of": "^5.0.0", + "mixin-object": "^2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "dev": true, + "requires": { + "array-filter": "~0.0.0", + "array-map": "~0.0.0", + "array-reduce": "~0.0.0", + "jsonify": "~0.0.0" + } + }, + "shelljs": { + "version": "0.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shelljs/-/shelljs-0.8.2.tgz", + "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "simple-progress-webpack-plugin": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/simple-progress-webpack-plugin/-/simple-progress-webpack-plugin-1.1.2.tgz", + "integrity": "sha512-bNQfb3qSqbtsfxg6d0dGechUUJH2lZqKG5+bj2aoJmEA0rSzcm+2JVfC2YgkDABfuGItZ/O5ttt6BssWZW4SNg==", + "dev": true, + "requires": { + "chalk": "2.3.x", + "figures": "2.0.x", + "log-update": "2.3.x" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.3.2.tgz", + "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "log-update": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/log-update/-/log-update-2.3.0.tgz", + "integrity": "sha1-iDKP19HOeTiykoN0bwsbwSayRwg=", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "cli-cursor": "^2.0.0", + "wrap-ansi": "^3.0.1" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "wrap-ansi": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/wrap-ansi/-/wrap-ansi-3.0.1.tgz", + "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0" + } + } + } + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + } + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "slide": { + "version": "1.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "socket.io": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/socket.io/-/socket.io-2.1.1.tgz", + "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", + "dev": true, + "requires": { + "debug": "~3.1.0", + "engine.io": "~3.2.0", + "has-binary2": "~1.0.2", + "socket.io-adapter": "~1.1.0", + "socket.io-client": "2.1.1", + "socket.io-parser": "~3.2.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "engine.io-client": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/engine.io-client/-/engine.io-client-3.2.1.tgz", + "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "~3.3.1", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + }, + "socket.io-client": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/socket.io-client/-/socket.io-client-2.1.1.tgz", + "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", + "dev": true, + "requires": { + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "engine.io-client": "~3.2.0", + "has-binary2": "~1.0.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "~3.2.0", + "to-array": "0.1.4" + } + }, + "socket.io-parser": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/socket.io-parser/-/socket.io-parser-3.2.0.tgz", + "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "isarray": "2.0.1" + } + } + } + }, + "socket.io-adapter": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", + "dev": true + }, + "socket.io-client": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/socket.io-client/-/socket.io-client-2.0.4.tgz", + "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", + "dev": true, + "requires": { + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "~2.6.4", + "engine.io-client": "~3.1.0", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "~3.1.1", + "to-array": "0.1.4" + } + }, + "socket.io-parser": { + "version": "3.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/socket.io-parser/-/socket.io-parser-3.1.3.tgz", + "integrity": "sha512-g0a2HPqLguqAczs3dMECuA1RgoGFPyvDqcbaDEdCWY9g59kdUAz3YRmaJBNKXflrHNwB7Q12Gkf/0CZXfdHR7g==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "has-binary2": "~1.0.2", + "isarray": "2.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + } + } + }, + "sockjs": { + "version": "0.3.19", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "dev": true, + "requires": { + "faye-websocket": "^0.10.0", + "uuid": "^3.0.1" + } + }, + "sockjs-client": { + "version": "1.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sockjs-client/-/sockjs-client-1.1.5.tgz", + "integrity": "sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM=", + "dev": true, + "requires": { + "debug": "^2.6.6", + "eventsource": "0.1.6", + "faye-websocket": "~0.11.0", + "inherits": "^2.0.1", + "json3": "^3.3.2", + "url-parse": "^1.1.8" + }, + "dependencies": { + "faye-websocket": { + "version": "0.11.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/faye-websocket/-/faye-websocket-0.11.1.tgz", + "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + } + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spawn-sync": { + "version": "1.0.15", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spawn-sync/-/spawn-sync-1.0.15.tgz", + "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", + "dev": true, + "requires": { + "concat-stream": "^1.4.7", + "os-shim": "^0.1.2" + } + }, + "spdx-correct": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", + "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", + "dev": true + }, + "spdy": { + "version": "3.4.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdy/-/spdy-3.4.7.tgz", + "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "dev": true, + "requires": { + "debug": "^2.6.8", + "handle-thing": "^1.2.5", + "http-deceiver": "^1.2.7", + "safe-buffer": "^5.0.1", + "select-hose": "^2.0.0", + "spdy-transport": "^2.0.18" + } + }, + "spdy-transport": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdy-transport/-/spdy-transport-2.1.0.tgz", + "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", + "dev": true, + "requires": { + "debug": "^2.6.8", + "detect-node": "^2.0.3", + "hpack.js": "^2.1.6", + "obuf": "^1.1.1", + "readable-stream": "^2.2.9", + "safe-buffer": "^5.0.1", + "wbuf": "^1.7.2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sprintf-js/-/sprintf-js-1.1.1.tgz", + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=", + "dev": true + }, + "sshpk": { + "version": "1.15.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sshpk/-/sshpk-1.15.1.tgz", + "integrity": "sha512-mSdgNUaidk+dRU5MhYtN9zebdzF2iG0cNPWy8HG+W8y+fT1JnSkh0fzzpjOa0L7P8i1Rscz38t0h4gPcKz43xA==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "ssri": { + "version": "5.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "stable": { + "version": "0.1.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "stack-utils": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stack-utils/-/stack-utils-1.0.1.tgz", + "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", + "dev": true + }, + "stackframe": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stackframe/-/stackframe-1.0.4.tgz", + "integrity": "sha512-to7oADIniaYwS3MhtCa/sQhrxidCCQiF/qp4/m5iN3ipf0Y7Xlri0f6eG29r08aL7JYl8n32AF3Q5GYBZ7K8vw==", + "dev": true + }, + "staged-git-files": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/staged-git-files/-/staged-git-files-1.1.1.tgz", + "integrity": "sha512-H89UNKr1rQJvI1c/PIR3kiAMBV23yvR7LItZiV74HWZwzt7f3YHuujJ9nJZlt58WlFox7XQsOahexwk7nTe69A==", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true + }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "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": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "stream-throttle": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stream-throttle/-/stream-throttle-0.1.3.tgz", + "integrity": "sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM=", + "dev": true, + "requires": { + "commander": "^2.2.0", + "limiter": "^1.0.5" + } + }, + "stream-to-observable": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stream-to-observable/-/stream-to-observable-0.2.0.tgz", + "integrity": "sha1-WdbqOT2HwsDdrBCqDVYbxrpvDhA=", + "dev": true, + "requires": { + "any-observable": "^0.2.0" + }, + "dependencies": { + "any-observable": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/any-observable/-/any-observable-0.2.0.tgz", + "integrity": "sha1-xnhwBYADV5AJCD9UrAq6+1wz0kI=", + "dev": true + } + } + }, + "streamfilter": { + "version": "1.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/streamfilter/-/streamfilter-1.0.7.tgz", + "integrity": "sha512-Gk6KZM+yNA1JpW0KzlZIhjo3EaBJDkYfXtYSbOwNIQ7Zd6006E6+sCFlW1NDvFG/vnXhKmw6TJJgiEQg/8lXfQ==", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string-argv": { + "version": "0.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-argv/-/string-argv-0.0.2.tgz", + "integrity": "sha1-2sMECGkMIfPDYwo/86BYd73L1zY=", + "dev": true + }, + "string-length": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-length/-/string-length-2.0.0.tgz", + "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=", + "dev": true, + "requires": { + "astral-regex": "^1.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string-template": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "stringify-object": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stringify-object/-/stringify-object-3.2.2.tgz", + "integrity": "sha512-O696NF21oLiDy8PhpWu8AEqoZHw++QW6mUv0UvKZe8gWSdSvMXkiLufK7OmnP27Dro4GU5kb9U7JIO0mBuCRQg==", + "dev": true, + "requires": { + "get-own-enumerable-property-symbols": "^2.0.1", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-bom-stream": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", + "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", + "dev": true, + "requires": { + "first-chunk-stream": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "strip-comments": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-comments/-/strip-comments-1.0.2.tgz", + "integrity": "sha512-kL97alc47hoyIQSV165tTt9rG5dn4w1dNnBhOQ3bOU1Nc1hel09jnXANaHJ7vzHLd4Ju8kseDGzlev96pghLFw==", + "dev": true, + "requires": { + "babel-extract-comments": "^1.0.0", + "babel-plugin-transform-object-rest-spread": "^6.26.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "style-loader": { + "version": "0.20.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/style-loader/-/style-loader-0.20.3.tgz", + "integrity": "sha512-2I7AVP73MvK33U7B9TKlYZAqdROyMXDYSMvHLX43qy3GCOaJNiV6i0v/sv9idWIaQ42Yn2dNv79Q5mKXbKhAZg==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^0.4.5" + } + }, + "stylehacks": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stylehacks/-/stylehacks-4.0.0.tgz", + "integrity": "sha1-ZLMjlRxKJOX8ey7AbBN78y0VXoo=", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "postcss": "^6.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "browserslist": { + "version": "4.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/browserslist/-/browserslist-4.1.1.tgz", + "integrity": "sha512-VBorw+tgpOtZ1BYhrVSVTzTt/3+vSE3eFUh0N2GCFK1HffceOaf32YS/bs6WiFhjDAblAFrx85jMy3BG9fBK2Q==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000884", + "electron-to-chromium": "^1.3.62", + "node-releases": "^1.0.0-alpha.11" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "postcss-selector-parser": { + "version": "3.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", + "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "dev": true, + "requires": { + "dot-prop": "^4.1.1", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "dev": true, + "requires": { + "minimist": "^1.1.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "svgo": { + "version": "0.7.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/svgo/-/svgo-0.7.2.tgz", + "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", + "dev": true, + "requires": { + "coa": "~1.0.1", + "colors": "~1.1.2", + "csso": "~2.3.1", + "js-yaml": "~3.7.0", + "mkdirp": "~0.5.1", + "sax": "~1.2.1", + "whet.extend": "~0.9.9" + } + }, + "swagger-ui": { + "version": "2.2.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/swagger-ui/-/swagger-ui-2.2.10.tgz", + "integrity": "sha1-sl56IWZOXZC/OR2zDbCN5B6FLXs=" + }, + "symbol-observable": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true + }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", + "dev": true + }, + "tabtab": { + "version": "2.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tabtab/-/tabtab-2.2.2.tgz", + "integrity": "sha1-egR/FDsBC0y9MfhX6ClhUSy/ThQ=", + "dev": true, + "requires": { + "debug": "^2.2.0", + "inquirer": "^1.0.2", + "lodash.difference": "^4.5.0", + "lodash.uniq": "^4.5.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "npmlog": "^2.0.3", + "object-assign": "^4.1.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "external-editor": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/external-editor/-/external-editor-1.1.1.tgz", + "integrity": "sha1-Etew24UPf/fnCBuvQAVwAGDEYAs=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "spawn-sync": "^1.0.15", + "tmp": "^0.0.29" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "gauge": { + "version": "1.2.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/gauge/-/gauge-1.2.7.tgz", + "integrity": "sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=", + "dev": true, + "requires": { + "ansi": "^0.3.0", + "has-unicode": "^2.0.0", + "lodash.pad": "^4.1.0", + "lodash.padend": "^4.1.0", + "lodash.padstart": "^4.1.0" + } + }, + "inquirer": { + "version": "1.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inquirer/-/inquirer-1.2.3.tgz", + "integrity": "sha1-TexvMvN+97sLLtPx0aXD9UUHSRg=", + "dev": true, + "requires": { + "ansi-escapes": "^1.1.0", + "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", + "cli-width": "^2.0.0", + "external-editor": "^1.1.0", + "figures": "^1.3.5", + "lodash": "^4.3.0", + "mute-stream": "0.0.6", + "pinkie-promise": "^2.0.0", + "run-async": "^2.2.0", + "rx": "^4.1.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "mute-stream": { + "version": "0.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mute-stream/-/mute-stream-0.0.6.tgz", + "integrity": "sha1-SJYrGeFp/R38JAs/HnMXYnu8R9s=", + "dev": true + }, + "npmlog": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npmlog/-/npmlog-2.0.4.tgz", + "integrity": "sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI=", + "dev": true, + "requires": { + "ansi": "~0.3.1", + "are-we-there-yet": "~1.1.2", + "gauge": "~1.2.5" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + }, + "tmp": { + "version": "0.0.29", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tmp/-/tmp-0.0.29.tgz", + "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.1" + } + } + } + }, + "tapable": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", + "dev": true + }, + "temp": { + "version": "0.8.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/temp/-/temp-0.8.3.tgz", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "dev": true, + "requires": { + "os-tmpdir": "^1.0.0", + "rimraf": "~2.2.6" + }, + "dependencies": { + "rimraf": { + "version": "2.2.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", + "dev": true + } + } + }, + "terser": { + "version": "3.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/terser/-/terser-3.8.2.tgz", + "integrity": "sha512-FGSBXiBJe2TSXy6pWwXpY0YcEWEK35UKL64BBbxX3aHqM4Nj0RMqXvqBuoSGfyd80t8MKQ5JwYm5jRRGTSEFNg==", + "dev": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1", + "source-map-support": "~0.5.6" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/terser-webpack-plugin/-/terser-webpack-plugin-1.0.0.tgz", + "integrity": "sha512-J1i69VN1tyhzpzbWrNvNaS1G4G7iNCvTvoT+qGNFxQPqND2Kk49M6yKw5/yA+dcU0D5pH/PuuH2ouDbhqDf0RQ==", + "dev": true, + "requires": { + "@webpack-contrib/schema-utils": "^1.0.0-beta.0", + "cacache": "^11.0.2", + "find-cache-dir": "^2.0.0", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "terser": "^3.8.1", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "cacache": { + "version": "11.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cacache/-/cacache-11.0.2.tgz", + "integrity": "sha512-hMiz7LN4w8sdfmKsvNs80ao/vf2JCGWWdpu95JyY90AJZRbZJmgE71dCefRiNf8OCqiZQDcUBfYiLlUNu4/j5A==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "figgy-pudding": "^3.1.0", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.2", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^6.0.0", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + } + }, + "find-cache-dir": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-cache-dir/-/find-cache-dir-2.0.0.tgz", + "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "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" + } + }, + "p-limit": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-limit/-/p-limit-2.0.0.tgz", + "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "ssri": { + "version": "6.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ssri/-/ssri-6.0.0.tgz", + "integrity": "sha512-zYOGfVHPhxyzwi8MdtdNyxv3IynWCIM4jYReR48lqu0VngxgH1c+C6CmipRdJ55eVByTJV/gboFEEI7TEQI8DA==", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + } + } + }, + "test-exclude": { + "version": "4.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/test-exclude/-/test-exclude-4.2.1.tgz", + "integrity": "sha512-qpqlP/8Zl+sosLxBcVKl9vYy26T9NPalxSzzCP/OY6K7j938ui2oKgo+kRZYfxAeIpLqpbVnsHq1tyV70E4lWQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "micromatch": "^3.1.8", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" + } + }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "textextensions": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/textextensions/-/textextensions-2.2.0.tgz", + "integrity": "sha512-j5EMxnryTvKxwH2Cq+Pb43tsf6sdEgw6Pdwxk83mPaq0ToeFJt6WE4J3s5BqY7vmjlLgkgXvhtXUxo80FyBhCA==", + "dev": true + }, + "tfunk": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tfunk/-/tfunk-3.1.0.tgz", + "integrity": "sha1-OORBT8ZJd9h6/apy+sttKfgve1s=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "object-path": "^0.9.0" + } + }, + "thread-loader": { + "version": "1.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/thread-loader/-/thread-loader-1.1.5.tgz", + "integrity": "sha512-BklxWyBW9EsRC6neZPuwwV6L1iRkGwe8sFWUcI1g+3DS3JajW/zJKo2t6j2a72bXngv9a4xyDHpn1EpXM9VWDw==", + "dev": true, + "requires": { + "async": "^2.3.0", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "throat": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/throat/-/throat-4.1.0.tgz", + "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "thunky": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/thunky/-/thunky-1.0.2.tgz", + "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=", + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "timsort": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, + "to-array": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", + "dev": true + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "to-string-loader": { + "version": "1.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-string-loader/-/to-string-loader-1.1.5.tgz", + "integrity": "sha1-e3qheJG3u0lHp6Eb+wO1/enG5pU=", + "dev": true, + "requires": { + "loader-utils": "^0.2.16" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + } + } + }, + "topo": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/topo/-/topo-2.0.2.tgz", + "integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=", + "dev": true, + "requires": { + "hoek": "4.x.x" + } + }, + "toposort": { + "version": "1.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/toposort/-/toposort-1.0.7.tgz", + "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", + "dev": true + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "tree-kill": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tree-kill/-/tree-kill-1.2.0.tgz", + "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", + "dev": true + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "triple-beam": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", + "dev": true + }, + "ts-jest": { + "version": "22.4.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ts-jest/-/ts-jest-22.4.4.tgz", + "integrity": "sha512-v9pO7u4HNMDSBCN9IEvlR6taDAGm2mo7nHEDLWyoFDgYeZ4aHm8JHEPrthd8Pmcl4eCM8J4Ata4ROR/cwFRV2A==", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-plugin-istanbul": "^4.1.4", + "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", + "babel-preset-jest": "^22.4.0", + "cpx": "^1.5.0", + "fs-extra": "4.0.3", + "jest-config": "^22.4.2", + "pkg-dir": "^2.0.0", + "yargs": "^11.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "11.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "ts-loader": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ts-loader/-/ts-loader-4.0.1.tgz", + "integrity": "sha512-dzgQnkAGY4sLqVw6t4LJH8FGR8j0zsPmC1Ff2ChzKhYO+hgWJkSEyrHTlSSZqn5oWr0Po7q/IRoeq8O4SNKQ9A==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "enhanced-resolve": "^4.0.0", + "loader-utils": "^1.0.2", + "micromatch": "^3.1.4", + "semver": "^5.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "tsickle": { + "version": "0.30.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tsickle/-/tsickle-0.30.0.tgz", + "integrity": "sha512-A4ALnEDQNrECn5xhgHmoXKM5qERCM395pKIfqcV57ex3zEInVogu/A191Btv8OPEINkr3xQ3Q2XRywyqkge3Qg==", + "dev": true, + "requires": { + "jasmine-diff": "^0.1.3", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map": "^0.6.0", + "source-map-support": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" + }, + "tslint": { + "version": "5.9.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tslint/-/tslint-5.9.1.tgz", + "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.12.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "tslint-config-prettier": { + "version": "1.9.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tslint-config-prettier/-/tslint-config-prettier-1.9.0.tgz", + "integrity": "sha512-glCHJJrJYXoP/nvhrmb7gt7q2Er0PaXu3zwySpIxRZvCYgBWt8l+Qi4VVTgFt5Moj/1klWg08PxxjE3/7hvp3Q==", + "dev": true + }, + "tslint-loader": { + "version": "3.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tslint-loader/-/tslint-loader-3.6.0.tgz", + "integrity": "sha512-Me9Qf/87BOfCY8uJJw+J7VMF4U8WiMXKLhKKKugMydF0xMhMOt9wo2mjYTNhwbF9H7SHh8PAIwRG8roisTNekQ==", + "dev": true, + "requires": { + "loader-utils": "^1.0.2", + "mkdirp": "^0.5.1", + "object-assign": "^4.1.1", + "rimraf": "^2.4.4", + "semver": "^5.3.0" + } + }, + "tsutils": { + "version": "2.27.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tsutils/-/tsutils-2.27.1.tgz", + "integrity": "sha512-AE/7uzp32MmaHvNNFES85hhUDHFdFZp6OAiZcd6y4ZKKIg6orJTm8keYWBhIhrJQH3a4LzNKat7ZPXZt5aTf6w==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typescript": { + "version": "2.7.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/typescript/-/typescript-2.7.2.tgz", + "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", + "dev": true + }, + "ua-parser-js": { + "version": "0.7.17", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ua-parser-js/-/ua-parser-js-0.7.17.tgz", + "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==", + "dev": true + }, + "uglify-js": { + "version": "3.3.28", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uglify-js/-/uglify-js-3.3.28.tgz", + "integrity": "sha512-68Rc/aA6cswiaQ5SrE979UJcXX+ADA1z33/ZsPd+fbAiVdjZ16OXdbtGO+rJUUBgK6qdf3SOPhQf3K/ybF5Miw==", + "dev": true, + "requires": { + "commander": "~2.15.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.15.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.6.tgz", + "integrity": "sha512-NDP94ahjW7ZH+qzdjxjIV04n5YGnrYD2jeHgKgnpUKmdAfcXEO5DbVo21fXAm/KPMyX9k21zWFBMYm9m9R2ptg==", + "dev": true, + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "commander": { + "version": "2.13.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, + "requires": { + "commander": "~2.13.0", + "source-map": "~0.6.1" + } + } + } + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true + }, + "underscore": { + "version": "1.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uniqid": { + "version": "4.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uniqid/-/uniqid-4.1.1.tgz", + "integrity": "sha1-iSIN32t1GuUrX3JISGNShZa7hME=", + "dev": true, + "requires": { + "macaddress": "^0.2.8" + } + }, + "uniqs": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unquote": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/unquote/-/unquote-1.1.1.tgz", + "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "untildify": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==", + "dev": true + }, + "upath": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "uri-js": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uri-js/-/uri-js-3.0.2.tgz", + "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-join": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/url-join/-/url-join-4.0.0.tgz", + "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=", + "dev": true + }, + "url-parse": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/url-parse/-/url-parse-1.4.1.tgz", + "integrity": "sha512-x95Td74QcvICAA0+qERaVkRpTGKyBHHYdwL2LXZm5t/gBtCB9KQSO/0zQgSTYEV1p0WcvSg79TLNPSvd5IDJMQ==", + "dev": true, + "requires": { + "querystringify": "^2.0.0", + "requires-port": "^1.0.0" + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.10.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "utila": { + "version": "0.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "v8-compile-cache": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/v8-compile-cache/-/v8-compile-cache-1.1.2.tgz", + "integrity": "sha512-ejdrifsIydN1XDH7EuR2hn8ZrkRKUYF7tUcBjBy/lhrCvs2K+zRlbW9UHc0IQ9RsYFZJFqJrieoIHfkCa0DBRA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "dev": true, + "requires": { + "builtins": "^1.0.3" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "vendors": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vendors/-/vendors-1.0.2.tgz", + "integrity": "sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-file": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vinyl-file/-/vinyl-file-2.0.0.tgz", + "integrity": "sha1-p+v1/779obfRjRQPyweyI++2dRo=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.3.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0", + "strip-bom-stream": "^2.0.0", + "vinyl": "^1.1.0" + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "vue-parser": { + "version": "1.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vue-parser/-/vue-parser-1.1.6.tgz", + "integrity": "sha512-v3/R7PLbaFVF/c8IIzWs1HgRpT2gN0dLRkaLIT5q+zJGVgmhN4VuZJF4Y9N4hFtFjS4B1EHxAOP6/tzqM4Ug2g==", + "dev": true, + "requires": { + "parse5": "^3.0.3" + } + }, + "w3c-hr-time": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", + "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", + "dev": true, + "requires": { + "browser-process-hrtime": "^0.1.2" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.x" + } + }, + "watch": { + "version": "0.18.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/watch/-/watch-0.18.0.tgz", + "integrity": "sha1-KAlUdsbffJDJYxOJkMClQj60uYY=", + "dev": true, + "requires": { + "exec-sh": "^0.2.0", + "minimist": "^1.2.0" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "webassemblyjs": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webassemblyjs/-/webassemblyjs-1.3.0.tgz", + "integrity": "sha512-q/16d2hYjex5G5wczUqmP0e37KKxUYttvZgt6xgMia7yrSIZ2rX6tq/7HPey8Wi/T6oIWxUwsJ+rDcpKzdPmTw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.3.0", + "@webassemblyjs/validation": "1.3.0", + "@webassemblyjs/wasm-parser": "1.3.0", + "@webassemblyjs/wast-parser": "1.3.0", + "long": "^3.2.0" + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "webpack": { + "version": "4.8.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webpack/-/webpack-4.8.0.tgz", + "integrity": "sha512-tfPUKNWkoD+iHk1X0eyQhLR5X9auy5xguiJyjJy5nMgy5yZpmI+s6Y3husZFHmQOGNCl+xxU/A63jk3IceTZTg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.3.0", + "@webassemblyjs/wasm-edit": "1.3.0", + "@webassemblyjs/wasm-parser": "1.3.0", + "acorn": "^5.0.0", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^0.1.1", + "enhanced-resolve": "^4.0.0", + "eslint-scope": "^3.7.1", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.0.0", + "uglifyjs-webpack-plugin": "^1.2.4", + "watchpack": "^1.5.0", + "webpack-sources": "^1.0.1" + } + }, + "webpack-addons": { + "version": "1.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webpack-addons/-/webpack-addons-1.1.5.tgz", + "integrity": "sha512-MGO0nVniCLFAQz1qv22zM02QPjcpAoJdy7ED0i3Zy7SY1IecgXCm460ib7H/Wq7e9oL5VL6S2BxaObxwIcag0g==", + "dev": true, + "requires": { + "jscodeshift": "^0.4.0" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "ast-types": { + "version": "0.10.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ast-types/-/ast-types-0.10.1.tgz", + "integrity": "sha512-UY7+9DPzlJ9VM8eY0b2TUZcZvF+1pO0hzMtAyjBYKhOmnvRlqYNYnWdtsMj0V16CGaMlpL0G1jnLbLo4AyotuQ==", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "jscodeshift": { + "version": "0.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jscodeshift/-/jscodeshift-0.4.1.tgz", + "integrity": "sha512-iOX6If+hsw0q99V3n31t4f5VlD1TQZddH08xbT65ZqA7T4Vkx68emrDZMUOLVvCEAJ6NpAk7DECe3fjC/t52AQ==", + "dev": true, + "requires": { + "async": "^1.5.0", + "babel-plugin-transform-flow-strip-types": "^6.8.0", + "babel-preset-es2015": "^6.9.0", + "babel-preset-stage-1": "^6.5.0", + "babel-register": "^6.9.0", + "babylon": "^6.17.3", + "colors": "^1.1.2", + "flow-parser": "^0.*", + "lodash": "^4.13.1", + "micromatch": "^2.3.7", + "node-dir": "0.1.8", + "nomnom": "^1.8.1", + "recast": "^0.12.5", + "temp": "^0.8.1", + "write-file-atomic": "^1.2.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "recast": { + "version": "0.12.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/recast/-/recast-0.12.9.tgz", + "integrity": "sha512-y7ANxCWmMW8xLOaiopiRDlyjQ9ajKRENBH+2wjntIbk3A6ZR1+BLQttkmSHMY7Arl+AAZFwJ10grg2T6f1WI8A==", + "dev": true, + "requires": { + "ast-types": "0.10.1", + "core-js": "^2.4.1", + "esprima": "~4.0.0", + "private": "~0.1.5", + "source-map": "~0.6.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + } + } + }, + "webpack-cli": { + "version": "2.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webpack-cli/-/webpack-cli-2.1.3.tgz", + "integrity": "sha512-5AsKoL/Ccn8iTrwk3uErdyhetGH+c7VRQ7Itim2GL0IhBRq5rtojVDk00buMRmFmBpw1RvHXq97Gup965LbozA==", + "dev": true, + "requires": { + "chalk": "^2.3.2", + "cross-spawn": "^6.0.5", + "diff": "^3.5.0", + "enhanced-resolve": "^4.0.0", + "envinfo": "^4.4.2", + "glob-all": "^3.1.0", + "global-modules": "^1.0.0", + "got": "^8.2.0", + "import-local": "^1.0.0", + "inquirer": "^5.1.0", + "interpret": "^1.0.4", + "jscodeshift": "^0.5.0", + "listr": "^0.13.0", + "loader-utils": "^1.1.0", + "lodash": "^4.17.5", + "log-symbols": "^2.2.0", + "mkdirp": "^0.5.1", + "p-each-series": "^1.0.0", + "p-lazy": "^1.0.0", + "prettier": "^1.5.3", + "supports-color": "^5.3.0", + "v8-compile-cache": "^1.1.2", + "webpack-addons": "^1.1.5", + "yargs": "^11.1.0", + "yeoman-environment": "^2.0.0", + "yeoman-generator": "^2.0.4" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "async": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "dargs": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dargs/-/dargs-5.1.0.tgz", + "integrity": "sha1-7H6lDHhWTNNsnV7Bj2Yyn63ieCk=", + "dev": true + }, + "debug": { + "version": "3.2.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "got": { + "version": "8.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/got/-/got-8.3.2.tgz", + "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.4.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-observable": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-observable/-/is-observable-0.2.0.tgz", + "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", + "dev": true, + "requires": { + "symbol-observable": "^0.2.2" + } + }, + "listr": { + "version": "0.13.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/listr/-/listr-0.13.0.tgz", + "integrity": "sha1-ILsLowuuZg7oTMBQPfS+PVYjiH0=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "cli-truncate": "^0.2.1", + "figures": "^1.7.0", + "indent-string": "^2.1.0", + "is-observable": "^0.2.0", + "is-promise": "^2.1.0", + "is-stream": "^1.1.0", + "listr-silent-renderer": "^1.1.1", + "listr-update-renderer": "^0.4.0", + "listr-verbose-renderer": "^0.4.0", + "log-symbols": "^1.0.2", + "log-update": "^1.0.2", + "ora": "^0.2.3", + "p-map": "^1.1.1", + "rxjs": "^5.4.2", + "stream-to-observable": "^0.2.0", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "requires": { + "chalk": "^1.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "mem-fs-editor": { + "version": "4.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mem-fs-editor/-/mem-fs-editor-4.0.3.tgz", + "integrity": "sha512-tgWmwI/+6vwu6POan82dTjxEpwAoaj0NAFnghtVo/FcLK2/7IhPUtFUUYlwou4MOY6OtjTUJtwpfH1h+eSUziw==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "deep-extend": "^0.6.0", + "ejs": "^2.5.9", + "glob": "^7.0.3", + "globby": "^7.1.1", + "isbinaryfile": "^3.0.2", + "mkdirp": "^0.5.0", + "multimatch": "^2.0.0", + "rimraf": "^2.2.8", + "through2": "^2.0.0", + "vinyl": "^2.0.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "p-cancelable": { + "version": "0.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", + "dev": true + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "pretty-bytes": { + "version": "4.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pretty-bytes/-/pretty-bytes-4.0.2.tgz", + "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "rxjs": { + "version": "5.5.12", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + }, + "dependencies": { + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + } + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "symbol-observable": { + "version": "0.2.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/symbol-observable/-/symbol-observable-0.2.4.tgz", + "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", + "dev": true + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + } + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "11.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + }, + "yeoman-generator": { + "version": "2.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yeoman-generator/-/yeoman-generator-2.0.5.tgz", + "integrity": "sha512-rV6tJ8oYzm4mmdF2T3wjY+Q42jKF2YiiD0VKfJ8/0ZYwmhCKC9Xs2346HVLPj/xE13i68psnFJv7iS6gWRkeAg==", + "dev": true, + "requires": { + "async": "^2.6.0", + "chalk": "^2.3.0", + "cli-table": "^0.3.1", + "cross-spawn": "^6.0.5", + "dargs": "^5.1.0", + "dateformat": "^3.0.3", + "debug": "^3.1.0", + "detect-conflict": "^1.0.0", + "error": "^7.0.2", + "find-up": "^2.1.0", + "github-username": "^4.0.0", + "istextorbinary": "^2.2.1", + "lodash": "^4.17.10", + "make-dir": "^1.1.0", + "mem-fs-editor": "^4.0.0", + "minimist": "^1.2.0", + "pretty-bytes": "^4.0.2", + "read-chunk": "^2.1.0", + "read-pkg-up": "^3.0.0", + "rimraf": "^2.6.2", + "run-async": "^2.0.0", + "shelljs": "^0.8.0", + "text-table": "^0.2.0", + "through2": "^2.0.0", + "yeoman-environment": "^2.0.5" + } + } + } + }, + "webpack-dev-middleware": { + "version": "3.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webpack-dev-middleware/-/webpack-dev-middleware-3.1.3.tgz", + "integrity": "sha512-I6Mmy/QjWU/kXwCSFGaiOoL5YEQIVmbb0o45xMoCyQAg/mClqZVTcsX327sPfekDyJWpCxb+04whNyLOIxpJdQ==", + "dev": true, + "requires": { + "loud-rejection": "^1.6.0", + "memory-fs": "~0.4.1", + "mime": "^2.1.0", + "path-is-absolute": "^1.0.0", + "range-parser": "^1.0.3", + "url-join": "^4.0.0", + "webpack-log": "^1.0.1" + }, + "dependencies": { + "mime": { + "version": "2.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", + "dev": true + } + } + }, + "webpack-dev-server": { + "version": "3.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webpack-dev-server/-/webpack-dev-server-3.1.5.tgz", + "integrity": "sha512-LVHg+EPwZLHIlfvokSTgtJqO/vI5CQi89fASb5JEDtVMDjY0yuIEqPPdMiKaBJIB/Ab7v/UN/sYZ7WsZvntQKw==", + "dev": true, + "requires": { + "ansi-html": "0.0.7", + "array-includes": "^3.0.3", + "bonjour": "^3.5.0", + "chokidar": "^2.0.0", + "compression": "^1.5.2", + "connect-history-api-fallback": "^1.3.0", + "debug": "^3.1.0", + "del": "^3.0.0", + "express": "^4.16.2", + "html-entities": "^1.2.0", + "http-proxy-middleware": "~0.18.0", + "import-local": "^1.0.0", + "internal-ip": "1.2.0", + "ip": "^1.1.5", + "killable": "^1.0.0", + "loglevel": "^1.4.1", + "opn": "^5.1.0", + "portfinder": "^1.0.9", + "selfsigned": "^1.9.1", + "serve-index": "^1.7.2", + "sockjs": "0.3.19", + "sockjs-client": "1.1.5", + "spdy": "^3.4.1", + "strip-ansi": "^3.0.0", + "supports-color": "^5.1.0", + "webpack-dev-middleware": "3.1.3", + "webpack-log": "^1.1.2", + "yargs": "11.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "11.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "webpack-log": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webpack-log/-/webpack-log-1.2.0.tgz", + "integrity": "sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "log-symbols": "^2.1.0", + "loglevelnext": "^1.0.1", + "uuid": "^3.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "webpack-merge": { + "version": "4.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webpack-merge/-/webpack-merge-4.1.2.tgz", + "integrity": "sha512-/0QYwW/H1N/CdXYA2PNPVbsxO3u2Fpz34vs72xm03SRfg6bMNGfMJIQEpQjKRvkG2JvT6oRJFpDtSrwbX8Jzvw==", + "dev": true, + "requires": { + "lodash": "^4.17.5" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "webpack-notifier": { + "version": "1.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webpack-notifier/-/webpack-notifier-1.6.0.tgz", + "integrity": "sha1-/6yOVf+MRpdSuMG7sBGhbxCYbgI=", + "dev": true, + "requires": { + "node-notifier": "^5.1.2", + "object-assign": "^4.1.0", + "strip-ansi": "^3.0.1" + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "webpack-visualizer-plugin": { + "version": "0.1.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/webpack-visualizer-plugin/-/webpack-visualizer-plugin-0.1.11.tgz", + "integrity": "sha1-uHcK2GtPZSYSxosbeCJT+vn4o04=", + "dev": true, + "requires": { + "d3": "^3.5.6", + "mkdirp": "^0.5.1", + "react": "^0.14.0", + "react-dom": "^0.14.0" + } + }, + "websocket-driver": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/websocket-driver/-/websocket-driver-0.7.0.tgz", + "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", + "dev": true, + "requires": { + "http-parser-js": ">=0.4.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "dev": true + }, + "whatwg-encoding": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz", + "integrity": "sha512-jLBwwKUhi8WtBfsMQlL4bUUcT8sMkAtQinscJAe/M4KHCkHuUJAF6vuB0tueNIw4c8ziO6AkRmgY+jL3a0iiPw==", + "dev": true, + "requires": { + "iconv-lite": "0.4.19" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + } + } + }, + "whatwg-fetch": { + "version": "0.9.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz", + "integrity": "sha1-DjaExsuZlbQ+/J3wPkw2XZX9nMA=", + "dev": true + }, + "whatwg-mimetype": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz", + "integrity": "sha512-FKxhYLytBQiUKjkYteN71fAUA3g6KpNXoho1isLiLSB3N1G4F35Q5vUxWfKFhBwi5IWF27VE6WxhrnnC+m0Mew==", + "dev": true + }, + "whatwg-url": { + "version": "6.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/whatwg-url/-/whatwg-url-6.4.1.tgz", + "integrity": "sha512-FwygsxsXx27x6XXuExA/ox3Ktwcbf+OAvrKmLulotDAiO1Q6ixchPFaHYsis2zZBZSJTR0+dR+JVtf7MlbqZjw==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "whet.extend": { + "version": "0.9.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/whet.extend/-/whet.extend-0.9.9.tgz", + "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "win-release": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/win-release/-/win-release-1.1.1.tgz", + "integrity": "sha1-X6VeAr58qTTt/BJmVjLoSbcuUgk=", + "dev": true, + "requires": { + "semver": "^5.0.1" + } + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", + "dev": true + }, + "winston": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/winston/-/winston-3.1.0.tgz", + "integrity": "sha512-FsQfEE+8YIEeuZEYhHDk5cILo1HOcWkGwvoidLrDgPog0r4bser1lEIOco2dN9zpDJ1M88hfDgZvxe5z4xNcwg==", + "dev": true, + "requires": { + "async": "^2.6.0", + "diagnostics": "^1.1.1", + "is-stream": "^1.1.0", + "logform": "^1.9.1", + "one-time": "0.0.4", + "readable-stream": "^2.3.6", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.2.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "winston-transport": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/winston-transport/-/winston-transport-4.2.0.tgz", + "integrity": "sha512-0R1bvFqxSlK/ZKTH86nymOuKv/cT1PQBMuDdA7k7f0S9fM44dNH6bXnuxwXPrN8lefJgtZq08BKdyZ0DZIy/rg==", + "dev": true, + "requires": { + "readable-stream": "^2.3.6", + "triple-beam": "^1.2.0" + } + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "workbox-background-sync": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-background-sync/-/workbox-background-sync-3.6.1.tgz", + "integrity": "sha512-lMXwUbZ/FQBWf/jkFwz0ARfMLeIk9q73+fsqGwwUwUcr8NC6GDZlgtH9sPndxU1VbM+bieRM9R9kVStE4s2uVQ==", + "dev": true, + "requires": { + "workbox-core": "^3.6.1" + } + }, + "workbox-broadcast-cache-update": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-broadcast-cache-update/-/workbox-broadcast-cache-update-3.6.1.tgz", + "integrity": "sha512-wC6LQNNPGLfZ1W+kSA2sP5YrbUl5axYgD0iNU37l4ABaCmjpu2XiFwPH+v4NOj/YWJt+z2563YB4SFM+/rC2mg==", + "dev": true, + "requires": { + "workbox-core": "^3.6.1" + } + }, + "workbox-build": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-build/-/workbox-build-3.6.1.tgz", + "integrity": "sha512-1xEaFzVWzcIMwNHIW8WesGL+7MOx7XeHU1et1VWGDbxHV0i2HL8koMxq3g2WpKJy+yEh0hRG+4KuTGMmeuQcMA==", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "common-tags": "^1.4.0", + "fs-extra": "^4.0.2", + "glob": "^7.1.2", + "joi": "^11.1.1", + "lodash.template": "^4.4.0", + "pretty-bytes": "^4.0.2", + "stringify-object": "^3.2.2", + "strip-comments": "^1.0.2", + "workbox-background-sync": "^3.6.1", + "workbox-broadcast-cache-update": "^3.6.1", + "workbox-cache-expiration": "^3.6.1", + "workbox-cacheable-response": "^3.6.1", + "workbox-core": "^3.6.1", + "workbox-google-analytics": "^3.6.1", + "workbox-navigation-preload": "^3.6.1", + "workbox-precaching": "^3.6.1", + "workbox-range-requests": "^3.6.1", + "workbox-routing": "^3.6.1", + "workbox-strategies": "^3.6.1", + "workbox-streams": "^3.6.1", + "workbox-sw": "^3.6.1" + }, + "dependencies": { + "fs-extra": { + "version": "4.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "pretty-bytes": { + "version": "4.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pretty-bytes/-/pretty-bytes-4.0.2.tgz", + "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", + "dev": true + } + } + }, + "workbox-cache-expiration": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-cache-expiration/-/workbox-cache-expiration-3.6.1.tgz", + "integrity": "sha512-mOV90D8cJ6S2s1GUGbfTvQ+WWKEMAvbHkH+vjIFdl+hXcToC7toctBI3UzI7vmmFv3TRQcP3TAxBmJgEFjgJew==", + "dev": true, + "requires": { + "workbox-core": "^3.6.1" + } + }, + "workbox-cacheable-response": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-cacheable-response/-/workbox-cacheable-response-3.6.1.tgz", + "integrity": "sha512-67tsFrpgX5LI3Nu82eVXlqfdq/PegF+agjcrLRDfSlD6cySCZCb0cyFHwLhegw5A6BayRHzYcBM5/imGeaMwjw==", + "dev": true, + "requires": { + "workbox-core": "^3.6.1" + } + }, + "workbox-core": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-core/-/workbox-core-3.6.1.tgz", + "integrity": "sha512-xrrPQ335Cdekihe1jhscXYm4mmhh7ZXqSlZqJhyVmp9lNp5xzz1t0R22AfoaVNsg0zdu6Ouqnn0RsQ53QkZ8tw==", + "dev": true + }, + "workbox-google-analytics": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-google-analytics/-/workbox-google-analytics-3.6.1.tgz", + "integrity": "sha512-rnAT2RseiQO8DWjjkQkojVHX/6MK/L88+UFKr92xG1fKGD2asOk97AG6i0fAAti6f4KMg2s5UWZthiFR9QH4fQ==", + "dev": true, + "requires": { + "workbox-background-sync": "^3.6.1", + "workbox-core": "^3.6.1", + "workbox-routing": "^3.6.1", + "workbox-strategies": "^3.6.1" + } + }, + "workbox-navigation-preload": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-navigation-preload/-/workbox-navigation-preload-3.6.1.tgz", + "integrity": "sha512-Dzzp0JasGZWHSbZdx+UY0ZFaJu6P1LGIlFw3A+oTHbop9rZY219BNREcpzHT107SP7VFBkz/KIGF7s05FD6tpQ==", + "dev": true, + "requires": { + "workbox-core": "^3.6.1" + } + }, + "workbox-precaching": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-precaching/-/workbox-precaching-3.6.1.tgz", + "integrity": "sha512-qKNelNcGGSnKZveZRO+4sFKxr33iNMcP9Pbm8OkdEdAAZem0Ia4hIL87mHvwCvRnuj/vaV2BwRghZnzmLsK8Ng==", + "dev": true, + "requires": { + "workbox-core": "^3.6.1" + } + }, + "workbox-range-requests": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-range-requests/-/workbox-range-requests-3.6.1.tgz", + "integrity": "sha512-/ZPvMvKUzWBVmmN+fCPslF8RXin0C5WAla9EE0taiAMWdrVfPGghERtZLHumk/yM/M3k+OqWzPxCV0Wg/mjbqg==", + "dev": true, + "requires": { + "workbox-core": "^3.6.1" + } + }, + "workbox-routing": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-routing/-/workbox-routing-3.6.1.tgz", + "integrity": "sha512-9LoBs5ck9Rjutno4yfBzqFyiUqj2UvILgYHGFkjHLp7lA4KK9VIuBJjGCLNaWr2r0pe6DVM5tM2OvlAOa2JO3w==", + "dev": true, + "requires": { + "workbox-core": "^3.6.1" + } + }, + "workbox-strategies": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-strategies/-/workbox-strategies-3.6.1.tgz", + "integrity": "sha512-OEw1psICNGpL1bqFZGyjl9N9hnmnRvsOA2EWAXxKVlwqmVvGzSeb8S46DPnH2JQgy77DRfNzeHVdfN6XirqdJw==", + "dev": true, + "requires": { + "workbox-core": "^3.6.1" + } + }, + "workbox-streams": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-streams/-/workbox-streams-3.6.1.tgz", + "integrity": "sha512-SjO8wyUJ72+EXFVn9i9140hxbiN7d56k8gDHTxVoQT7OrCVYWkGFR0GzfnoRONaaHvO+/CGOyS37/Y+IXr7Vdw==", + "dev": true, + "requires": { + "workbox-core": "^3.6.1" + } + }, + "workbox-sw": { + "version": "3.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-sw/-/workbox-sw-3.6.1.tgz", + "integrity": "sha512-bXKvvjt5Oet87cpuSuVpiFYBohCv9xLmniZwMZPAFQVEtpPCyWv5X+UVZ+BpHVDBcRMYz7lXNIRWa9J54zR2vA==", + "dev": true + }, + "workbox-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/workbox-webpack-plugin/-/workbox-webpack-plugin-3.2.0.tgz", + "integrity": "sha512-zl1/2ChVhwcpSumDd3jSUfbDIk5MtTSW5xc/h/WPkBpYi4dwvfwmQ8KAXc1qBIEoDz++R483zwYTyJQJ0g6f3w==", + "dev": true, + "requires": { + "json-stable-stringify": "^1.0.1", + "workbox-build": "^3.2.0" + } + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "write-file-webpack-plugin": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/write-file-webpack-plugin/-/write-file-webpack-plugin-4.2.0.tgz", + "integrity": "sha512-sIjfV+M1Ia8p/lVcLjvM2I0Lq/40tCMZe+k0Pxg2TG6TKjUgHGwQeM42QdYLiHAIAITGQK1HEQA3YknFubzfDQ==", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "debug": "^2.6.8", + "filesize": "^3.2.1", + "lodash": "^4.5.1", + "mkdirp": "^0.5.1", + "moment": "^2.11.2" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "ws": { + "version": "3.3.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + }, + "xml": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/xml/-/xml-1.0.1.tgz", + "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=", + "dev": true + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true + }, + "xmlhttprequest-ssl": { + "version": "1.5.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", + "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "6.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs/-/yargs-6.4.0.tgz", + "integrity": "sha1-gW4ahm1VmMzzTlWW3c4i2S2kkNQ=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs-parser/-/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + } + } + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + }, + "yeast": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", + "dev": true + }, + "yeoman-environment": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yeoman-environment/-/yeoman-environment-2.3.0.tgz", + "integrity": "sha512-PHSAkVOqYdcR+C+Uht1SGC4eVD/9OhygYFkYaI66xF8vKIeS1RNYay+umj2ZrQeJ50tF5Q/RSO6qGDz9y3Ifug==", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "diff": "^3.3.1", + "escape-string-regexp": "^1.0.2", + "globby": "^8.0.1", + "grouped-queue": "^0.3.3", + "inquirer": "^5.2.0", + "is-scoped": "^1.0.0", + "lodash": "^4.17.10", + "log-symbols": "^2.1.0", + "mem-fs": "^1.1.0", + "strip-ansi": "^4.0.0", + "text-table": "^0.2.0", + "untildify": "^3.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "globby": { + "version": "8.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/globby/-/globby-8.0.1.tgz", + "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "yeoman-generator": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yeoman-generator/-/yeoman-generator-3.0.0.tgz", + "integrity": "sha512-aHsNXzkdgAoakZTZsDX7T56wYWYd1O5E/GBIFAVMJLH7TKRr+1MiEJszZQbbCSA+J+lpT743/8L88j35yNdTLQ==", + "dev": true, + "requires": { + "async": "^2.6.0", + "chalk": "^2.3.0", + "cli-table": "^0.3.1", + "cross-spawn": "^6.0.5", + "dargs": "^6.0.0", + "dateformat": "^3.0.3", + "debug": "^3.1.0", + "detect-conflict": "^1.0.0", + "error": "^7.0.2", + "find-up": "^3.0.0", + "github-username": "^4.0.0", + "istextorbinary": "^2.2.1", + "lodash": "^4.17.10", + "make-dir": "^1.1.0", + "mem-fs-editor": "^5.0.0", + "minimist": "^1.2.0", + "pretty-bytes": "^5.1.0", + "read-chunk": "^2.1.0", + "read-pkg-up": "^4.0.0", + "rimraf": "^2.6.2", + "run-async": "^2.0.0", + "shelljs": "^0.8.0", + "text-table": "^0.2.0", + "through2": "^2.0.0", + "yeoman-environment": "^2.0.5" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "async": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "p-limit": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-limit/-/p-limit-2.0.0.tgz", + "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "zone.js": { + "version": "0.8.26", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/zone.js/-/zone.js-0.8.26.tgz", + "integrity": "sha512-W9Nj+UmBJG251wkCacIkETgra4QgBo/vgoEkb4a2uoLzpQG7qF9nzwoLXWU5xj3Fg2mxGvEDh47mg24vXccYjA==" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/package.json b/jhipster/jhipster-uaa/gateway/package.json new file mode 100644 index 0000000000..2196622413 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/package.json @@ -0,0 +1,131 @@ +{ + "name": "gateway", + "version": "0.0.0", + "description": "Description for gateway", + "private": true, + "license": "UNLICENSED", + "cacheDirectories": [ + "node_modules" + ], + "dependencies": { + "@angular/common": "6.1.0", + "@angular/compiler": "6.1.0", + "@angular/core": "6.1.0", + "@angular/forms": "6.1.0", + "@angular/platform-browser": "6.1.0", + "@angular/platform-browser-dynamic": "6.1.0", + "@angular/router": "6.1.0", + "@fortawesome/angular-fontawesome": "0.2.0", + "@fortawesome/fontawesome-svg-core": "1.2.4", + "@fortawesome/free-solid-svg-icons": "5.3.1", + "@ng-bootstrap/ng-bootstrap": "3.0.0", + "bootstrap": "4.1.3", + "core-js": "2.5.7", + "moment": "2.22.2", + "ng-jhipster": "0.5.4", + "ngx-cookie": "2.0.1", + "ngx-infinite-scroll": "0.5.1", + "ngx-webstorage": "2.0.1", + "reflect-metadata": "0.1.12", + "rxjs": "6.1.0", + "rxjs-compat": "6.1.0", + "swagger-ui": "2.2.10", + "tslib": "1.9.3", + "zone.js": "0.8.26" + }, + "devDependencies": { + "@angular/cli": "6.1.2", + "@angular/compiler-cli": "6.1.0", + "@ngtools/webpack": "6.0.0", + "@types/jest": "22.2.3", + "@types/node": "9.4.7", + "angular-router-loader": "0.8.5", + "angular2-template-loader": "0.6.2", + "browser-sync": "2.24.6", + "browser-sync-webpack-plugin": "2.2.2", + "cache-loader": "1.2.2", + "codelyzer": "4.2.1", + "copy-webpack-plugin": "4.5.1", + "css-loader": "0.28.10", + "exports-loader": "0.7.0", + "file-loader": "1.1.11", + "fork-ts-checker-webpack-plugin": "0.4.1", + "friendly-errors-webpack-plugin": "1.7.0", + "generator-jhipster": "5.4.2", + "html-loader": "0.5.5", + "html-webpack-plugin": "3.2.0", + "husky": "1.1.0", + "jest": "22.4.3", + "jest-junit": "5.1.0", + "jest-preset-angular": "5.2.2", + "jest-sonar-reporter": "2.0.0", + "lint-staged": "7.3.0", + "merge-jsons-webpack-plugin": "1.0.14", + "mini-css-extract-plugin": "0.4.2", + "moment-locales-webpack-plugin": "1.0.5", + "optimize-css-assets-webpack-plugin": "5.0.1", + "prettier": "1.11.1", + "proxy-middleware": "0.15.0", + "raw-loader": "0.5.1", + "rimraf": "2.6.1", + "simple-progress-webpack-plugin": "1.1.2", + "style-loader": "0.20.3", + "tapable": "1.0.0", + "terser-webpack-plugin": "1.0.0", + "thread-loader": "1.1.5", + "to-string-loader": "1.1.5", + "ts-loader": "4.0.1", + "tslint": "5.9.1", + "tslint-config-prettier": "1.9.0", + "tslint-loader": "3.6.0", + "typescript": "2.7.2", + "sass": "1.13.0", + "sass-loader": "7.1.0", + "postcss-loader": "2.1.1", + "xml2js": "0.4.19", + "webpack": "4.8.0", + "webpack-cli": "2.1.3", + "webpack-dev-server": "3.1.5", + "webpack-merge": "4.1.2", + "webpack-notifier": "1.6.0", + "webpack-visualizer-plugin": "0.1.11", + "workbox-webpack-plugin": "3.2.0", + "write-file-webpack-plugin": "4.2.0" + }, + "engines": { + "node": ">=8.9.0" + }, + "lint-staged": { + "src/**/*.{ts,css,scss}": [ + "prettier --write", + "git add" + ] + }, + "scripts": { + "prettier:format": "prettier --write \"src/**/*.{ts,css,scss}\"", + "lint": "tslint --project tsconfig.json -e 'node_modules/**'", + "lint:fix": "npm run lint -- --fix", + "ngc": "ngc -p tsconfig-aot.json", + "cleanup": "rimraf target/{aot,www}", + "clean-www": "rimraf target//www/app/{src,target/}", + "start": "npm run webpack:dev", + "start-tls": "npm run webpack:dev -- --env.tls", + "serve": "npm run start", + "build": "npm run webpack:prod", + "test": "npm run lint && jest --coverage --logHeapUsage -w=2 --config src/test/javascript/jest.conf.js", + "test:watch": "npm test -- --watch --clearCache", + "webpack:dev": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --hot --port=9060 --watch-content-base --env.stats=minimal", + "webpack:dev-verbose": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --hot --port=9060 --watch-content-base --profile --progress --env.stats=normal", + "webpack:build:main": "npm run webpack -- --config webpack/webpack.dev.js --env.stats=normal", + "webpack:build": "npm run cleanup && npm run webpack:build:main", + "webpack:prod:main": "npm run webpack -- --config webpack/webpack.prod.js --profile", + "webpack:prod": "npm run cleanup && npm run webpack:prod:main && npm run clean-www", + "webpack:test": "npm run test", + "webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js", + "webpack": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js" + }, + "jestSonar": { + "reportPath": "target/test-results/jest", + "reportFile": "TESTS-results-sonar.xml" + } +} diff --git a/jhipster/jhipster-uaa/gateway/pom.xml b/jhipster/jhipster-uaa/gateway/pom.xml new file mode 100644 index 0000000000..52f84e4006 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/pom.xml @@ -0,0 +1,1095 @@ + + + 4.0.0 + + com.baeldung.jhipster.gateway + gateway + 0.0.1-SNAPSHOT + war + Gateway + + + + + + + + + + 3.0.0 + 1.8 + 2.12.6 + v8.12.0 + 6.4.1 + UTF-8 + UTF-8 + ${project.build.directory}/test-results + yyyyMMddHHmmss + ${java.version} + ${java.version} + -Djava.security.egd=file:/dev/./urandom -Xmx256m + jdt_apt + false + + + + + + + 2.0.25 + + 2.0.5.RELEASE + + 5.2.17.Final + + 3.22.0-GA + + 3.5.5 + 3.6 + 2.0.1.Final + 1.2.0.Final + + + 3.1.0 + 3.8.0 + 2.10 + 3.0.0-M2 + 3.1.0 + 2.22.0 + 3.2.2 + 0.9.11 + 1.6 + 0.8.2 + 3.4.2 + 3.5.0.1254 + 2.2.5 + + + http://localhost:9001 + src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* + S3437,S4684,UndocumentedApi,BoldAndItalicTagsCheck + + src/main/webapp/app/**/*.* + Web:BoldAndItalicTagsCheck + + src/main/java/**/* + squid:S3437 + + src/main/java/**/* + squid:UndocumentedApi + + src/main/java/**/* + squid:S4684 + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + jacoco + ${project.testresult.directory}/jest/TESTS-results-sonar.xml + ${project.testresult.directory}/lcov.info + ${project.basedir}/src/main/ + ${project.testresult.directory}/surefire-reports + ${project.basedir}/src/test/ + + + + + + + + io.github.jhipster + jhipster-dependencies + ${jhipster-dependencies.version} + pom + import + + + + + + + + io.github.jhipster + jhipster-framework + + + + org.springframework.boot + spring-boot-starter-cache + + + io.dropwizard.metrics + metrics-core + + + io.dropwizard.metrics + metrics-annotation + + + io.dropwizard.metrics + metrics-json + + + io.dropwizard.metrics + metrics-jvm + + + io.dropwizard.metrics + metrics-servlet + + + io.dropwizard.metrics + metrics-servlets + + + com.fasterxml.jackson.datatype + jackson-datatype-hibernate5 + + + com.fasterxml.jackson.datatype + jackson-datatype-hppc + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + com.fasterxml.jackson.module + jackson-module-afterburner + + + com.h2database + h2 + test + + + org.apache.httpcomponents + httpclient + + + com.hazelcast + hazelcast + + + com.hazelcast + hazelcast-hibernate52 + + + com.hazelcast + hazelcast-spring + + + com.jayway.jsonpath + json-path + test + + + + io.springfox + springfox-swagger2 + + + io.springfox + springfox-bean-validators + + + com.mattbertolini + liquibase-slf4j + + + com.ryantenney.metrics + metrics-spring + + + com.zaxxer + HikariCP + + + commons-io + commons-io + + + org.apache.commons + commons-lang3 + + + javax.cache + cache-api + + + mysql + mysql-connector-java + + + org.assertj + assertj-core + test + + + org.hibernate + hibernate-jpamodelgen + ${hibernate.version} + provided + + + org.hibernate + hibernate-envers + + + org.hibernate.validator + hibernate-validator + + + org.liquibase + liquibase-core + + + net.logstash.logback + logstash-logback-encoder + + + org.mapstruct + mapstruct-jdk8 + ${mapstruct.version} + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + provided + + + org.springframework.boot + spring-boot-configuration-processor + provided + + + org.springframework.boot + spring-boot-loader-tools + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-logging + + + org.springframework.boot + spring-boot-starter-mail + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-test + test + + + org.springframework.security + spring-security-test + test + + + org.zalando + problem-spring-web + 0.24.0-RC.0 + + + org.springframework.security.oauth + spring-security-oauth2 + + + org.springframework.security + spring-security-jwt + + + + org.springframework.cloud + spring-cloud-starter-netflix-zuul + + + com.github.vladimir-bukhtoyarov + bucket4j-core + + + com.github.vladimir-bukhtoyarov + bucket4j-jcache + + + org.springframework.cloud + spring-cloud-starter + + + org.springframework.cloud + spring-cloud-starter-netflix-ribbon + + + org.springframework.cloud + spring-cloud-starter-netflix-hystrix + + + org.springframework.retry + spring-retry + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + org.springframework.cloud + spring-cloud-starter-config + + + org.springframework.cloud + spring-cloud-security + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.cloud + spring-cloud-spring-service-connector + + + + org.springframework.security + spring-security-data + + + + + + spring-boot:run + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + + org.hibernate + hibernate-jpamodelgen + ${hibernate.version} + + + + + + + org.apache.maven.plugins + maven-eclipse-plugin + ${maven-eclipse-plugin.version} + + true + true + + + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-plugin.version} + + + enforce-versions + + enforce + + + + + + + You are running an older version of Maven. JHipster requires at least Maven ${maven.version} + [${maven.version},) + + + + You are running an incompatible version of Java. JHipster requires JDK ${java.version} + [1.8,1.9) + + + + + + org.apache.maven.plugins + maven-resources-plugin + ${maven-resources-plugin.version} + + + default-resources + validate + + copy-resources + + + target/classes + false + + # + + + + src/main/resources/ + true + + config/*.yml + + + + src/main/resources/ + false + + config/*.yml + + + + + + + docker-resources + verify + + copy-resources + + + target/classes/static/ + + + target/www + false + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + alphabetical + + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + pre-unit-tests + + prepare-agent + + + + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + + + + + post-unit-test + test + + report + + + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + ${project.testresult.directory}/coverage/jacoco + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + org.liquibase + liquibase-maven-plugin + ${liquibase.version} + + src/main/resources/config/liquibase/master.xml + src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml + org.h2.Driver + jdbc:h2:file:./target/h2db/db/gateway + + gateway + + hibernate:spring:com.baeldung.jhipster.gateway.domain?dialect=org.hibernate.dialect.H2Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy + true + debug + + + + org.javassist + javassist + ${javassist.version} + + + org.liquibase.ext + liquibase-hibernate5 + ${liquibase-hibernate5.version} + + + org.springframework.boot + spring-boot-starter-data-jpa + ${spring-boot.version} + + + javax.validation + validation-api + ${validation-api.version} + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + + + repackage + + + + + ${start-class} + true + true + + + + + com.google.cloud.tools + jib-maven-plugin + ${jib-maven-plugin.version} + + + openjdk:8-jre-alpine + + + gateway:latest + + + + sh + + chmod +x /entrypoint.sh && sync && /entrypoint.sh + + + 8080 + 5701/udp + + + ALWAYS + 0 + + true + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.jacoco + + jacoco-maven-plugin + + + ${jacoco-maven-plugin.version} + + + prepare-agent + + + + + + + + + com.github.eirslett + frontend-maven-plugin + ${frontend-maven-plugin.version} + + install-node-and-npm + npm + + + + + + + + + + + + + + + + no-liquibase + + ,no-liquibase + + + + swagger + + ,swagger + + + + tls + + ,tls + + + + webpack + + + ${basedir}/target/www/app/main.bundle.js + + + + + org.springframework.boot + spring-boot-starter-undertow + + + org.springframework.boot + spring-boot-devtools + true + + + com.h2database + h2 + + + + + + com.github.eirslett + frontend-maven-plugin + ${frontend-maven-plugin.version} + + + install node and npm + + install-node-and-npm + + + ${node.version} + ${npm.version} + + + + npm install + + npm + + + + webpack build dev + + npm + + generate-resources + + run webpack:build + false + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + false + target/www/ + + + src/main/webapp + + WEB-INF/** + + + + + + + + + + dev${profile.no-liquibase} + + + + dev + + true + + + + org.springframework.boot + spring-boot-starter-undertow + + + org.springframework.boot + spring-boot-devtools + true + + + com.h2database + h2 + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + false + target/www/ + + + src/main/webapp + + WEB-INF/** + + + + + + + + + + dev${profile.tls}${profile.no-liquibase} + + + + prod + + + org.springframework.boot + spring-boot-starter-undertow + + + + + + maven-clean-plugin + ${maven-clean-plugin.version} + + + + target/www/ + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + false + target/www/ + + + src/main/webapp + + WEB-INF/** + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + ${start-class} + true + + + + + build-info + + + + + + com.github.eirslett + frontend-maven-plugin + ${frontend-maven-plugin.version} + + + install node and npm + + install-node-and-npm + + + ${node.version} + ${npm.version} + + + + npm install + + npm + + + install + + + + webpack build test + + npm + + test + + run webpack:test + false + + + + webpack build prod + + npm + + generate-resources + + run webpack:prod + false + + + + + + pl.project13.maven + git-commit-id-plugin + ${git-commit-id-plugin.version} + + + + revision + + + + + false + true + + ^git.commit.id.abbrev$ + ^git.commit.id.describe$ + ^git.branch$ + + + + + + + + prod${profile.swagger}${profile.no-liquibase} + + + + + cc + + + org.springframework.boot + spring-boot-starter-undertow + + + org.springframework.boot + spring-boot-devtools + true + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + false + src/main/webapp/ + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + ${start-class} + true + true + true + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + default-compile + none + + + default-testCompile + none + + + + + net.alchim31.maven + scala-maven-plugin + ${scala-maven-plugin.version} + + + compile + compile + + add-source + compile + + + + test-compile + test-compile + + add-source + testCompile + + + + + incremental + true + ${scala.version} + + + + + + + dev,swagger + + + + + zipkin + + + org.springframework.cloud + spring-cloud-starter-zipkin + + + + + + IDE + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + org.hibernate + hibernate-jpamodelgen + ${hibernate.version} + + + + + + diff --git a/jhipster/jhipster-uaa/gateway/postcss.config.js b/jhipster/jhipster-uaa/gateway/postcss.config.js new file mode 100644 index 0000000000..f549c034d5 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/postcss.config.js @@ -0,0 +1,3 @@ +module.exports = { + plugins: [] +} diff --git a/jhipster/jhipster-uaa/gateway/proxy.conf.json b/jhipster/jhipster-uaa/gateway/proxy.conf.json new file mode 100644 index 0000000000..8b41fdf7fa --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/proxy.conf.json @@ -0,0 +1,7 @@ +{ + "*": { + "target": "http://localhost:8080", + "secure": false, + "loglevel": "debug" + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/.dockerignore b/jhipster/jhipster-uaa/gateway/src/main/docker/.dockerignore new file mode 100644 index 0000000000..b03bdc71ee --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/.dockerignore @@ -0,0 +1,14 @@ +# https://docs.docker.com/engine/reference/builder/#dockerignore-file +classes/ +generated-sources/ +generated-test-sources/ +h2db/ +maven-archiver/ +maven-status/ +reports/ +surefire-reports/ +test-classes/ +test-results/ +www/ +!*.jar +!*.war diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/Dockerfile b/jhipster/jhipster-uaa/gateway/src/main/docker/Dockerfile new file mode 100644 index 0000000000..6a1c74c0bf --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/Dockerfile @@ -0,0 +1,20 @@ +FROM openjdk:8-jre-alpine + +ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ + JHIPSTER_SLEEP=0 \ + JAVA_OPTS="" + +# Add a jhipster user to run our application so that it doesn't need to run as root +RUN adduser -D -s /bin/sh jhipster +WORKDIR /home/jhipster + +ADD entrypoint.sh entrypoint.sh +RUN chmod 755 entrypoint.sh && chown jhipster:jhipster entrypoint.sh +USER jhipster + +ENTRYPOINT ["./entrypoint.sh"] + +EXPOSE 8080 5701/udp + +ADD *.war app.war + diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/app.yml b/jhipster/jhipster-uaa/gateway/src/main/docker/app.yml new file mode 100644 index 0000000000..347681e676 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/app.yml @@ -0,0 +1,24 @@ +version: '2' +services: + gateway-app: + image: gateway + environment: + # - _JAVA_OPTIONS=-Xmx512m -Xms256m + - SPRING_PROFILES_ACTIVE=prod,swagger + - EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka + - SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config + - SPRING_DATASOURCE_URL=jdbc:mysql://gateway-mysql:3306/gateway?useUnicode=true&characterEncoding=utf8&useSSL=false + - JHIPSTER_SLEEP=30 # gives time for the JHipster Registry to boot before the application + ports: + - 8080:8080 + gateway-mysql: + extends: + file: mysql.yml + service: gateway-mysql + jhipster-registry: + extends: + file: jhipster-registry.yml + service: jhipster-registry + environment: + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_TYPE=native + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_SEARCH_LOCATIONS=file:./central-config/docker-config/ diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/central-server-config/README.md b/jhipster/jhipster-uaa/gateway/src/main/docker/central-server-config/README.md new file mode 100644 index 0000000000..6aab9ffdd5 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/central-server-config/README.md @@ -0,0 +1,7 @@ +# Central configuration sources details + +The JHipster-Registry will use the following directories as its configuration source : +- localhost-config : when running the registry in docker with the jhipster-registry.yml docker-compose file +- docker-config : when running the registry and the app both in docker with the app.yml docker-compose file + +For more info, refer to https://www.jhipster.tech/microservices-architecture/#registry_app_configuration diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/central-server-config/docker-config/application.yml b/jhipster/jhipster-uaa/gateway/src/main/docker/central-server-config/docker-config/application.yml new file mode 100644 index 0000000000..8a973c0a35 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/central-server-config/docker-config/application.yml @@ -0,0 +1,15 @@ +# Common configuration shared between all applications +configserver: + name: Docker JHipster Registry + status: Connected to the JHipster Registry running in Docker + +jhipster: + security: + authentication: + jwt: + secret: my-secret-key-which-should-be-changed-in-production-and-be-base64-encoded + +eureka: + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@jhipster-registry:8761/eureka/ diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/central-server-config/localhost-config/application.yml b/jhipster/jhipster-uaa/gateway/src/main/docker/central-server-config/localhost-config/application.yml new file mode 100644 index 0000000000..db4602e419 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/central-server-config/localhost-config/application.yml @@ -0,0 +1,15 @@ +# Common configuration shared between all applications +configserver: + name: Docker JHipster Registry + status: Connected to the JHipster Registry running in Docker + +jhipster: + security: + authentication: + jwt: + secret: my-secret-key-which-should-be-changed-in-production-and-be-base64-encoded + +eureka: + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@localhost:8761/eureka/ diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/entrypoint.sh b/jhipster/jhipster-uaa/gateway/src/main/docker/entrypoint.sh new file mode 100644 index 0000000000..ccffafb5a4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} +exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar "${HOME}/app.war" "$@" diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/hazelcast-management-center.yml b/jhipster/jhipster-uaa/gateway/src/main/docker/hazelcast-management-center.yml new file mode 100644 index 0000000000..9ad1303458 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/hazelcast-management-center.yml @@ -0,0 +1,6 @@ +version: '2' +services: + gateway-hazelcast-management-center: + image: hazelcast/management-center:3.9.3 + ports: + - 8180:8080 diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/jhipster-registry.yml b/jhipster/jhipster-uaa/gateway/src/main/docker/jhipster-registry.yml new file mode 100644 index 0000000000..512bc54be6 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/jhipster-registry.yml @@ -0,0 +1,22 @@ +version: '2' +services: + jhipster-registry: + image: jhipster/jhipster-registry:v4.0.4 + volumes: + - ./central-server-config:/central-config + # When run with the "dev" Spring profile, the JHipster Registry will + # read the config from the local filesystem (central-server-config directory) + # When run with the "prod" Spring profile, it will read the configuration from a Git repository + # See https://www.jhipster.tech/microservices-architecture/#registry_app_configuration + environment: + # - _JAVA_OPTIONS=-Xmx512m -Xms256m + - SPRING_PROFILES_ACTIVE=dev,swagger,uaa + - SPRING_SECURITY_USER_PASSWORD=admin + - JHIPSTER_REGISTRY_PASSWORD=admin + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_TYPE=native + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_SEARCH_LOCATIONS=file:./central-config/localhost-config/ + # - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_TYPE=git + # - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_URI=https://github.com/jhipster/jhipster-registry/ + # - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_SEARCH_PATHS=central-config + ports: + - 8761:8761 diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/mysql.yml b/jhipster/jhipster-uaa/gateway/src/main/docker/mysql.yml new file mode 100644 index 0000000000..a3cc7bf368 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/mysql.yml @@ -0,0 +1,13 @@ +version: '2' +services: + gateway-mysql: + image: mysql:5.7.20 + # volumes: + # - ~/volumes/jhipster/gateway/mysql/:/var/lib/mysql/ + environment: + - MYSQL_USER=root + - MYSQL_ALLOW_EMPTY_PASSWORD=yes + - MYSQL_DATABASE=gateway + ports: + - 3306:3306 + command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp diff --git a/jhipster/jhipster-uaa/gateway/src/main/docker/sonar.yml b/jhipster/jhipster-uaa/gateway/src/main/docker/sonar.yml new file mode 100644 index 0000000000..64182e81ef --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/docker/sonar.yml @@ -0,0 +1,7 @@ +version: '2' +services: + gateway-sonar: + image: sonarqube:7.1-alpine + ports: + - 9001:9000 + - 9092:9092 diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/ApplicationWebXml.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/ApplicationWebXml.java new file mode 100644 index 0000000000..30ad451b11 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/ApplicationWebXml.java @@ -0,0 +1,21 @@ +package com.baeldung.jhipster.gateway; + +import com.baeldung.jhipster.gateway.config.DefaultProfileUtil; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +/** + * This is a helper Java class that provides an alternative to creating a web.xml. + * This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc. + */ +public class ApplicationWebXml extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + /** + * set a default to use when no profile is configured. + */ + DefaultProfileUtil.addDefaultProfile(application.application()); + return application.sources(GatewayApp.class); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/GatewayApp.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/GatewayApp.java new file mode 100644 index 0000000000..60d90eae25 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/GatewayApp.java @@ -0,0 +1,109 @@ +package com.baeldung.jhipster.gateway; + +import com.baeldung.jhipster.gateway.config.ApplicationProperties; +import com.baeldung.jhipster.gateway.config.DefaultProfileUtil; + +import io.github.jhipster.config.JHipsterConstants; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.netflix.zuul.EnableZuulProxy; +import org.springframework.core.env.Environment; + +import javax.annotation.PostConstruct; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Arrays; +import java.util.Collection; + +@SpringBootApplication +@EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class}) +@EnableDiscoveryClient +@EnableZuulProxy +public class GatewayApp { + + private static final Logger log = LoggerFactory.getLogger(GatewayApp.class); + + private final Environment env; + + public GatewayApp(Environment env) { + this.env = env; + } + + /** + * Initializes gateway. + *

+ * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile + *

+ * You can find more information on how profiles work with JHipster on https://www.jhipster.tech/profiles/. + */ + @PostConstruct + public void initApplication() { + Collection activeProfiles = Arrays.asList(env.getActiveProfiles()); + if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { + log.error("You have misconfigured your application! It should not run " + + "with both the 'dev' and 'prod' profiles at the same time."); + } + if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) { + log.error("You have misconfigured your application! It should not " + + "run with both the 'dev' and 'cloud' profiles at the same time."); + } + } + + /** + * Main method, used to run the application. + * + * @param args the command line arguments + */ + public static void main(String[] args) { + SpringApplication app = new SpringApplication(GatewayApp.class); + DefaultProfileUtil.addDefaultProfile(app); + Environment env = app.run(args).getEnvironment(); + logApplicationStartup(env); + } + + private static void logApplicationStartup(Environment env) { + String protocol = "http"; + if (env.getProperty("server.ssl.key-store") != null) { + protocol = "https"; + } + String serverPort = env.getProperty("server.port"); + String contextPath = env.getProperty("server.servlet.context-path"); + if (StringUtils.isBlank(contextPath)) { + contextPath = "/"; + } + String hostAddress = "localhost"; + try { + hostAddress = InetAddress.getLocalHost().getHostAddress(); + } catch (UnknownHostException e) { + log.warn("The host name could not be determined, using `localhost` as fallback"); + } + log.info("\n----------------------------------------------------------\n\t" + + "Application '{}' is running! Access URLs:\n\t" + + "Local: \t\t{}://localhost:{}{}\n\t" + + "External: \t{}://{}:{}{}\n\t" + + "Profile(s): \t{}\n----------------------------------------------------------", + env.getProperty("spring.application.name"), + protocol, + serverPort, + contextPath, + protocol, + hostAddress, + serverPort, + contextPath, + env.getActiveProfiles()); + + String configServerStatus = env.getProperty("configserver.status"); + if (configServerStatus == null) { + configServerStatus = "Not found or not setup for this application"; + } + log.info("\n----------------------------------------------------------\n\t" + + "Config Server: \t{}\n----------------------------------------------------------", configServerStatus); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/aop/logging/LoggingAspect.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/aop/logging/LoggingAspect.java new file mode 100644 index 0000000000..1563bf25bf --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/aop/logging/LoggingAspect.java @@ -0,0 +1,98 @@ +package com.baeldung.jhipster.gateway.aop.logging; + +import io.github.jhipster.config.JHipsterConstants; + +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.env.Environment; + +import java.util.Arrays; + +/** + * Aspect for logging execution of service and repository Spring components. + * + * By default, it only runs with the "dev" profile. + */ +@Aspect +public class LoggingAspect { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + private final Environment env; + + public LoggingAspect(Environment env) { + this.env = env; + } + + /** + * Pointcut that matches all repositories, services and Web REST endpoints. + */ + @Pointcut("within(@org.springframework.stereotype.Repository *)" + + " || within(@org.springframework.stereotype.Service *)" + + " || within(@org.springframework.web.bind.annotation.RestController *)") + public void springBeanPointcut() { + // Method is empty as this is just a Pointcut, the implementations are in the advices. + } + + /** + * Pointcut that matches all Spring beans in the application's main packages. + */ + @Pointcut("within(com.baeldung.jhipster.gateway.repository..*)"+ + " || within(com.baeldung.jhipster.gateway.service..*)"+ + " || within(com.baeldung.jhipster.gateway.web.rest..*)") + public void applicationPackagePointcut() { + // Method is empty as this is just a Pointcut, the implementations are in the advices. + } + + /** + * Advice that logs methods throwing exceptions. + * + * @param joinPoint join point for advice + * @param e exception + */ + @AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e") + public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { + log.error("Exception in {}.{}() with cause = \'{}\' and exception = \'{}\'", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL", e.getMessage(), e); + + } else { + log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL"); + } + } + + /** + * Advice that logs when a method is entered and exited. + * + * @param joinPoint join point for advice + * @return result + * @throws Throwable throws IllegalArgumentException + */ + @Around("applicationPackagePointcut() && springBeanPointcut()") + public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { + if (log.isDebugEnabled()) { + log.debug("Enter: {}.{}() with argument[s] = {}", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs())); + } + try { + Object result = joinPoint.proceed(); + if (log.isDebugEnabled()) { + log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), result); + } + return result; + } catch (IllegalArgumentException e) { + log.error("Illegal argument: {} in {}.{}()", Arrays.toString(joinPoint.getArgs()), + joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName()); + + throw e; + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/ApplicationProperties.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/ApplicationProperties.java new file mode 100644 index 0000000000..01beaf3416 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/ApplicationProperties.java @@ -0,0 +1,14 @@ +package com.baeldung.jhipster.gateway.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Properties specific to Gateway. + *

+ * Properties are configured in the application.yml file. + * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. + */ +@ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) +public class ApplicationProperties { + +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/AsyncConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/AsyncConfiguration.java new file mode 100644 index 0000000000..ba3a65750a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/AsyncConfiguration.java @@ -0,0 +1,59 @@ +package com.baeldung.jhipster.gateway.config; + +import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor; +import io.github.jhipster.config.JHipsterProperties; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; +import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.*; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; + +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; + +@Configuration +@EnableAsync +@EnableScheduling +public class AsyncConfiguration implements AsyncConfigurer, SchedulingConfigurer { + + private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); + + private final JHipsterProperties jHipsterProperties; + + public AsyncConfiguration(JHipsterProperties jHipsterProperties) { + this.jHipsterProperties = jHipsterProperties; + } + + @Override + @Bean(name = "taskExecutor") + public Executor getAsyncExecutor() { + log.debug("Creating Async Task Executor"); + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize()); + executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize()); + executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity()); + executor.setThreadNamePrefix("gateway-Executor-"); + return new ExceptionHandlingAsyncTaskExecutor(executor); + } + + @Override + public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { + return new SimpleAsyncUncaughtExceptionHandler(); + } + + @Override + public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { + taskRegistrar.setScheduler(scheduledTaskExecutor()); + } + + @Bean + public Executor scheduledTaskExecutor() { + return Executors.newScheduledThreadPool(jHipsterProperties.getAsync().getCorePoolSize()); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/CacheConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/CacheConfiguration.java new file mode 100644 index 0000000000..f4d9a818c9 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/CacheConfiguration.java @@ -0,0 +1,155 @@ +package com.baeldung.jhipster.gateway.config; + +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.JHipsterProperties; + +import com.hazelcast.config.*; +import com.hazelcast.core.HazelcastInstance; +import com.hazelcast.core.Hazelcast; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.web.ServerProperties; + +import org.springframework.cache.CacheManager; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.cloud.client.ServiceInstance; +import org.springframework.cloud.client.discovery.DiscoveryClient; +import org.springframework.cloud.client.serviceregistry.Registration; +import org.springframework.context.annotation.*; +import org.springframework.core.env.Environment; + +import javax.annotation.PreDestroy; + +@Configuration +@EnableCaching +public class CacheConfiguration { + + private final Logger log = LoggerFactory.getLogger(CacheConfiguration.class); + + private final Environment env; + + private final ServerProperties serverProperties; + + private final DiscoveryClient discoveryClient; + + private Registration registration; + + public CacheConfiguration(Environment env, ServerProperties serverProperties, DiscoveryClient discoveryClient) { + this.env = env; + this.serverProperties = serverProperties; + this.discoveryClient = discoveryClient; + } + + @Autowired(required = false) + public void setRegistration(Registration registration) { + this.registration = registration; + } + + @PreDestroy + public void destroy() { + log.info("Closing Cache Manager"); + Hazelcast.shutdownAll(); + } + + @Bean + public CacheManager cacheManager(HazelcastInstance hazelcastInstance) { + log.debug("Starting HazelcastCacheManager"); + CacheManager cacheManager = new com.hazelcast.spring.cache.HazelcastCacheManager(hazelcastInstance); + return cacheManager; + } + + @Bean + public HazelcastInstance hazelcastInstance(JHipsterProperties jHipsterProperties) { + log.debug("Configuring Hazelcast"); + HazelcastInstance hazelCastInstance = Hazelcast.getHazelcastInstanceByName("gateway"); + if (hazelCastInstance != null) { + log.debug("Hazelcast already initialized"); + return hazelCastInstance; + } + Config config = new Config(); + config.setInstanceName("gateway"); + config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); + if (this.registration == null) { + log.warn("No discovery service is set up, Hazelcast cannot create a cluster."); + } else { + // The serviceId is by default the application's name, + // see the "spring.application.name" standard Spring property + String serviceId = registration.getServiceId(); + log.debug("Configuring Hazelcast clustering for instanceId: {}", serviceId); + // In development, everything goes through 127.0.0.1, with a different port + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { + log.debug("Application is running with the \"dev\" profile, Hazelcast " + + "cluster will only work with localhost instances"); + + System.setProperty("hazelcast.local.localAddress", "127.0.0.1"); + config.getNetworkConfig().setPort(serverProperties.getPort() + 5701); + config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true); + for (ServiceInstance instance : discoveryClient.getInstances(serviceId)) { + String clusterMember = "127.0.0.1:" + (instance.getPort() + 5701); + log.debug("Adding Hazelcast (dev) cluster member " + clusterMember); + config.getNetworkConfig().getJoin().getTcpIpConfig().addMember(clusterMember); + } + } else { // Production configuration, one host per instance all using port 5701 + config.getNetworkConfig().setPort(5701); + config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true); + for (ServiceInstance instance : discoveryClient.getInstances(serviceId)) { + String clusterMember = instance.getHost() + ":5701"; + log.debug("Adding Hazelcast (prod) cluster member " + clusterMember); + config.getNetworkConfig().getJoin().getTcpIpConfig().addMember(clusterMember); + } + } + } + config.getMapConfigs().put("default", initializeDefaultMapConfig(jHipsterProperties)); + + // Full reference is available at: http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html + config.setManagementCenterConfig(initializeDefaultManagementCenterConfig(jHipsterProperties)); + config.getMapConfigs().put("com.baeldung.jhipster.gateway.domain.*", initializeDomainMapConfig(jHipsterProperties)); + return Hazelcast.newHazelcastInstance(config); + } + + private ManagementCenterConfig initializeDefaultManagementCenterConfig(JHipsterProperties jHipsterProperties) { + ManagementCenterConfig managementCenterConfig = new ManagementCenterConfig(); + managementCenterConfig.setEnabled(jHipsterProperties.getCache().getHazelcast().getManagementCenter().isEnabled()); + managementCenterConfig.setUrl(jHipsterProperties.getCache().getHazelcast().getManagementCenter().getUrl()); + managementCenterConfig.setUpdateInterval(jHipsterProperties.getCache().getHazelcast().getManagementCenter().getUpdateInterval()); + return managementCenterConfig; + } + + private MapConfig initializeDefaultMapConfig(JHipsterProperties jHipsterProperties) { + MapConfig mapConfig = new MapConfig(); + + /* + Number of backups. If 1 is set as the backup-count for example, + then all entries of the map will be copied to another JVM for + fail-safety. Valid numbers are 0 (no backup), 1, 2, 3. + */ + mapConfig.setBackupCount(jHipsterProperties.getCache().getHazelcast().getBackupCount()); + + /* + Valid values are: + NONE (no eviction), + LRU (Least Recently Used), + LFU (Least Frequently Used). + NONE is the default. + */ + mapConfig.setEvictionPolicy(EvictionPolicy.LRU); + + /* + Maximum size of the map. When max size is reached, + map is evicted based on the policy defined. + Any integer between 0 and Integer.MAX_VALUE. 0 means + Integer.MAX_VALUE. Default is 0. + */ + mapConfig.setMaxSizeConfig(new MaxSizeConfig(0, MaxSizeConfig.MaxSizePolicy.USED_HEAP_SIZE)); + + return mapConfig; + } + + private MapConfig initializeDomainMapConfig(JHipsterProperties jHipsterProperties) { + MapConfig mapConfig = new MapConfig(); + mapConfig.setTimeToLiveSeconds(jHipsterProperties.getCache().getHazelcast().getTimeToLiveSeconds()); + return mapConfig; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/CloudDatabaseConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/CloudDatabaseConfiguration.java new file mode 100644 index 0000000000..0614a2a3d0 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/CloudDatabaseConfiguration.java @@ -0,0 +1,24 @@ +package com.baeldung.jhipster.gateway.config; + +import io.github.jhipster.config.JHipsterConstants; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cache.CacheManager; +import org.springframework.cloud.config.java.AbstractCloudConfig; +import org.springframework.context.annotation.*; + +import javax.sql.DataSource; + +@Configuration +@Profile(JHipsterConstants.SPRING_PROFILE_CLOUD) +public class CloudDatabaseConfiguration extends AbstractCloudConfig { + + private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class); + + @Bean + public DataSource dataSource(CacheManager cacheManager) { + log.info("Configuring JDBC datasource from a cloud provider"); + return connectionFactory().dataSource(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/Constants.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/Constants.java new file mode 100644 index 0000000000..48542e5196 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/Constants.java @@ -0,0 +1,17 @@ +package com.baeldung.jhipster.gateway.config; + +/** + * Application constants. + */ +public final class Constants { + + // Regex for acceptable logins + public static final String LOGIN_REGEX = "^[_.@A-Za-z0-9-]*$"; + + public static final String SYSTEM_ACCOUNT = "system"; + public static final String ANONYMOUS_USER = "anonymoususer"; + public static final String DEFAULT_LANGUAGE = "en"; + + private Constants() { + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/DatabaseConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/DatabaseConfiguration.java new file mode 100644 index 0000000000..ae5103f8b0 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/DatabaseConfiguration.java @@ -0,0 +1,39 @@ +package com.baeldung.jhipster.gateway.config; + +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.h2.H2ConfigurationHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; + +import org.springframework.data.jpa.repository.config.EnableJpaAuditing; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +import java.sql.SQLException; + +@Configuration +@EnableJpaRepositories("com.baeldung.jhipster.gateway.repository") +@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware") +@EnableTransactionManagement +public class DatabaseConfiguration { + + private final Logger log = LoggerFactory.getLogger(DatabaseConfiguration.class); + + + /** + * Open the TCP port for the H2 database, so it is available remotely. + * + * @return the H2 database TCP server + * @throws SQLException if the server failed to start + */ + @Bean(initMethod = "start", destroyMethod = "stop") + @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) + public Object h2TCPServer() throws SQLException { + log.debug("Starting H2 database"); + return H2ConfigurationHelper.createServer(); + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/DateTimeFormatConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/DateTimeFormatConfiguration.java new file mode 100644 index 0000000000..1fb622a04e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/DateTimeFormatConfiguration.java @@ -0,0 +1,20 @@ +package com.baeldung.jhipster.gateway.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.format.FormatterRegistry; +import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * Configure the converters to use the ISO format for dates by default. + */ +@Configuration +public class DateTimeFormatConfiguration implements WebMvcConfigurer { + + @Override + public void addFormatters(FormatterRegistry registry) { + DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); + registrar.setUseIsoFormat(true); + registrar.registerFormatters(registry); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/DefaultProfileUtil.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/DefaultProfileUtil.java new file mode 100644 index 0000000000..b6c6209cd4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/DefaultProfileUtil.java @@ -0,0 +1,51 @@ +package com.baeldung.jhipster.gateway.config; + +import io.github.jhipster.config.JHipsterConstants; + +import org.springframework.boot.SpringApplication; +import org.springframework.core.env.Environment; + +import java.util.*; + +/** + * Utility class to load a Spring profile to be used as default + * when there is no spring.profiles.active set in the environment or as command line argument. + * If the value is not available in application.yml then dev profile will be used as default. + */ +public final class DefaultProfileUtil { + + private static final String SPRING_PROFILE_DEFAULT = "spring.profiles.default"; + + private DefaultProfileUtil() { + } + + /** + * Set a default to use when no profile is configured. + * + * @param app the Spring application + */ + public static void addDefaultProfile(SpringApplication app) { + Map defProperties = new HashMap<>(); + /* + * The default profile to use when no other profiles are defined + * This cannot be set in the application.yml file. + * See https://github.com/spring-projects/spring-boot/issues/1219 + */ + defProperties.put(SPRING_PROFILE_DEFAULT, JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); + app.setDefaultProperties(defProperties); + } + + /** + * Get the profiles that are applied else get default profiles. + * + * @param env spring environment + * @return profiles + */ + public static String[] getActiveProfiles(Environment env) { + String[] profiles = env.getActiveProfiles(); + if (profiles.length == 0) { + return env.getDefaultProfiles(); + } + return profiles; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/GatewayConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/GatewayConfiguration.java new file mode 100644 index 0000000000..cd1000ad80 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/GatewayConfiguration.java @@ -0,0 +1,55 @@ +package com.baeldung.jhipster.gateway.config; + +import io.github.jhipster.config.JHipsterProperties; + +import com.baeldung.jhipster.gateway.gateway.ratelimiting.RateLimitingFilter; +import com.baeldung.jhipster.gateway.gateway.accesscontrol.AccessControlFilter; +import com.baeldung.jhipster.gateway.gateway.responserewriting.SwaggerBasePathRewritingFilter; + +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.cloud.netflix.zuul.filters.RouteLocator; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class GatewayConfiguration { + + @Configuration + public static class SwaggerBasePathRewritingConfiguration { + + @Bean + public SwaggerBasePathRewritingFilter swaggerBasePathRewritingFilter(){ + return new SwaggerBasePathRewritingFilter(); + } + } + + @Configuration + public static class AccessControlFilterConfiguration { + + @Bean + public AccessControlFilter accessControlFilter(RouteLocator routeLocator, JHipsterProperties jHipsterProperties){ + return new AccessControlFilter(routeLocator, jHipsterProperties); + } + } + + /** + * Configures the Zuul filter that limits the number of API calls per user. + *

+ * This uses Bucket4J to limit the API calls, see {@link com.baeldung.jhipster.gateway.gateway.ratelimiting.RateLimitingFilter}. + */ + @Configuration + @ConditionalOnProperty("jhipster.gateway.rate-limiting.enabled") + public static class RateLimitingConfiguration { + + private final JHipsterProperties jHipsterProperties; + + public RateLimitingConfiguration(JHipsterProperties jHipsterProperties) { + this.jHipsterProperties = jHipsterProperties; + } + + @Bean + public RateLimitingFilter rateLimitingFilter() { + return new RateLimitingFilter(jHipsterProperties); + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/JacksonConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/JacksonConfiguration.java new file mode 100644 index 0000000000..c90a10558b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/JacksonConfiguration.java @@ -0,0 +1,63 @@ +package com.baeldung.jhipster.gateway.config; + +import com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.module.afterburner.AfterburnerModule; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.zalando.problem.ProblemModule; +import org.zalando.problem.violations.ConstraintViolationProblemModule; + +@Configuration +public class JacksonConfiguration { + + /** + * Support for Java date and time API. + * @return the corresponding Jackson module. + */ + @Bean + public JavaTimeModule javaTimeModule() { + return new JavaTimeModule(); + } + + @Bean + public Jdk8Module jdk8TimeModule() { + return new Jdk8Module(); + } + + + /* + * Support for Hibernate types in Jackson. + */ + @Bean + public Hibernate5Module hibernate5Module() { + return new Hibernate5Module(); + } + + /* + * Jackson Afterburner module to speed up serialization/deserialization. + */ + @Bean + public AfterburnerModule afterburnerModule() { + return new AfterburnerModule(); + } + + /* + * Module for serialization/deserialization of RFC7807 Problem. + */ + @Bean + ProblemModule problemModule() { + return new ProblemModule(); + } + + /* + * Module for serialization/deserialization of ConstraintViolationProblem. + */ + @Bean + ConstraintViolationProblemModule constraintViolationProblemModule() { + return new ConstraintViolationProblemModule(); + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LiquibaseConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LiquibaseConfiguration.java new file mode 100644 index 0000000000..8e67a70d1d --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LiquibaseConfiguration.java @@ -0,0 +1,53 @@ +package com.baeldung.jhipster.gateway.config; + +import javax.sql.DataSource; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; +import org.springframework.cache.CacheManager; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.core.task.TaskExecutor; + +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.liquibase.AsyncSpringLiquibase; +import liquibase.integration.spring.SpringLiquibase; + +@Configuration +public class LiquibaseConfiguration { + + private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); + + private final Environment env; + + private final CacheManager cacheManager; + + public LiquibaseConfiguration(Environment env, CacheManager cacheManager) { + this.env = env; + this.cacheManager = cacheManager; + } + + @Bean + public SpringLiquibase liquibase(@Qualifier("taskExecutor") TaskExecutor taskExecutor, + DataSource dataSource, LiquibaseProperties liquibaseProperties) { + + // Use liquibase.integration.spring.SpringLiquibase if you don't want Liquibase to start asynchronously + SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env); + liquibase.setDataSource(dataSource); + liquibase.setChangeLog("classpath:config/liquibase/master.xml"); + liquibase.setContexts(liquibaseProperties.getContexts()); + liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); + liquibase.setDropFirst(liquibaseProperties.isDropFirst()); + liquibase.setChangeLogParameters(liquibaseProperties.getParameters()); + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) { + liquibase.setShouldRun(false); + } else { + liquibase.setShouldRun(liquibaseProperties.isEnabled()); + log.debug("Configuring Liquibase"); + } + return liquibase; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LocaleConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LocaleConfiguration.java new file mode 100644 index 0000000000..ac7c3c8299 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LocaleConfiguration.java @@ -0,0 +1,27 @@ +package com.baeldung.jhipster.gateway.config; + +import io.github.jhipster.config.locale.AngularCookieLocaleResolver; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.LocaleResolver; +import org.springframework.web.servlet.config.annotation.*; +import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; + +@Configuration +public class LocaleConfiguration implements WebMvcConfigurer { + + @Bean(name = "localeResolver") + public LocaleResolver localeResolver() { + AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver(); + cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY"); + return cookieLocaleResolver; + } + + @Override + public void addInterceptors(InterceptorRegistry registry) { + LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); + localeChangeInterceptor.setParamName("language"); + registry.addInterceptor(localeChangeInterceptor); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LoggingAspectConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LoggingAspectConfiguration.java new file mode 100644 index 0000000000..16b9c16515 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LoggingAspectConfiguration.java @@ -0,0 +1,19 @@ +package com.baeldung.jhipster.gateway.config; + +import com.baeldung.jhipster.gateway.aop.logging.LoggingAspect; + +import io.github.jhipster.config.JHipsterConstants; + +import org.springframework.context.annotation.*; +import org.springframework.core.env.Environment; + +@Configuration +@EnableAspectJAutoProxy +public class LoggingAspectConfiguration { + + @Bean + @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) + public LoggingAspect loggingAspect(Environment env) { + return new LoggingAspect(env); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LoggingConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LoggingConfiguration.java new file mode 100644 index 0000000000..8e7443dc34 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/LoggingConfiguration.java @@ -0,0 +1,163 @@ +package com.baeldung.jhipster.gateway.config; + +import java.net.InetSocketAddress; +import java.util.Iterator; + +import io.github.jhipster.config.JHipsterProperties; + +import ch.qos.logback.classic.AsyncAppender; +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.LoggerContext; +import ch.qos.logback.classic.boolex.OnMarkerEvaluator; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.classic.spi.LoggerContextListener; +import ch.qos.logback.core.Appender; +import ch.qos.logback.core.filter.EvaluatorFilter; +import ch.qos.logback.core.spi.ContextAwareBase; +import ch.qos.logback.core.spi.FilterReply; +import net.logstash.logback.appender.LogstashTcpSocketAppender; +import net.logstash.logback.encoder.LogstashEncoder; +import net.logstash.logback.stacktrace.ShortenedThrowableConverter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cloud.context.config.annotation.RefreshScope; +import org.springframework.context.annotation.Configuration; + +@Configuration +@RefreshScope +public class LoggingConfiguration { + + private static final String LOGSTASH_APPENDER_NAME = "LOGSTASH"; + + private static final String ASYNC_LOGSTASH_APPENDER_NAME = "ASYNC_LOGSTASH"; + + private final Logger log = LoggerFactory.getLogger(LoggingConfiguration.class); + + private LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + + private final String appName; + + private final String serverPort; + + private final String version; + + private final JHipsterProperties jHipsterProperties; + + public LoggingConfiguration(@Value("${spring.application.name}") String appName, @Value("${server.port}") String serverPort, + @Value("${info.project.version:}") String version, JHipsterProperties jHipsterProperties) { + this.appName = appName; + this.serverPort = serverPort; + this.version = version; + this.jHipsterProperties = jHipsterProperties; + if (jHipsterProperties.getLogging().getLogstash().isEnabled()) { + addLogstashAppender(context); + addContextListener(context); + } + if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { + setMetricsMarkerLogbackFilter(context); + } + } + + private void addContextListener(LoggerContext context) { + LogbackLoggerContextListener loggerContextListener = new LogbackLoggerContextListener(); + loggerContextListener.setContext(context); + context.addListener(loggerContextListener); + } + + private void addLogstashAppender(LoggerContext context) { + log.info("Initializing Logstash logging"); + + LogstashTcpSocketAppender logstashAppender = new LogstashTcpSocketAppender(); + logstashAppender.setName(LOGSTASH_APPENDER_NAME); + logstashAppender.setContext(context); + String optionalFields = ""; + String customFields = "{\"app_name\":\"" + appName + "\",\"app_port\":\"" + serverPort + "\"," + + optionalFields + "\"version\":\"" + version + "\"}"; + + // More documentation is available at: https://github.com/logstash/logstash-logback-encoder + LogstashEncoder logstashEncoder = new LogstashEncoder(); + // Set the Logstash appender config from JHipster properties + logstashEncoder.setCustomFields(customFields); + // Set the Logstash appender config from JHipster properties + logstashAppender.addDestinations(new InetSocketAddress(jHipsterProperties.getLogging().getLogstash().getHost(), jHipsterProperties.getLogging().getLogstash().getPort())); + + ShortenedThrowableConverter throwableConverter = new ShortenedThrowableConverter(); + throwableConverter.setRootCauseFirst(true); + logstashEncoder.setThrowableConverter(throwableConverter); + logstashEncoder.setCustomFields(customFields); + + logstashAppender.setEncoder(logstashEncoder); + logstashAppender.start(); + + // Wrap the appender in an Async appender for performance + AsyncAppender asyncLogstashAppender = new AsyncAppender(); + asyncLogstashAppender.setContext(context); + asyncLogstashAppender.setName(ASYNC_LOGSTASH_APPENDER_NAME); + asyncLogstashAppender.setQueueSize(jHipsterProperties.getLogging().getLogstash().getQueueSize()); + asyncLogstashAppender.addAppender(logstashAppender); + asyncLogstashAppender.start(); + + context.getLogger("ROOT").addAppender(asyncLogstashAppender); + } + + // Configure a log filter to remove "metrics" logs from all appenders except the "LOGSTASH" appender + private void setMetricsMarkerLogbackFilter(LoggerContext context) { + log.info("Filtering metrics logs from all appenders except the {} appender", LOGSTASH_APPENDER_NAME); + OnMarkerEvaluator onMarkerMetricsEvaluator = new OnMarkerEvaluator(); + onMarkerMetricsEvaluator.setContext(context); + onMarkerMetricsEvaluator.addMarker("metrics"); + onMarkerMetricsEvaluator.start(); + EvaluatorFilter metricsFilter = new EvaluatorFilter<>(); + metricsFilter.setContext(context); + metricsFilter.setEvaluator(onMarkerMetricsEvaluator); + metricsFilter.setOnMatch(FilterReply.DENY); + metricsFilter.start(); + + for (ch.qos.logback.classic.Logger logger : context.getLoggerList()) { + for (Iterator> it = logger.iteratorForAppenders(); it.hasNext();) { + Appender appender = it.next(); + if (!appender.getName().equals(ASYNC_LOGSTASH_APPENDER_NAME)) { + log.debug("Filter metrics logs from the {} appender", appender.getName()); + appender.setContext(context); + appender.addFilter(metricsFilter); + appender.start(); + } + } + } + } + + /** + * Logback configuration is achieved by configuration file and API. + * When configuration file change is detected, the configuration is reset. + * This listener ensures that the programmatic configuration is also re-applied after reset. + */ + class LogbackLoggerContextListener extends ContextAwareBase implements LoggerContextListener { + + @Override + public boolean isResetResistant() { + return true; + } + + @Override + public void onStart(LoggerContext context) { + addLogstashAppender(context); + } + + @Override + public void onReset(LoggerContext context) { + addLogstashAppender(context); + } + + @Override + public void onStop(LoggerContext context) { + // Nothing to do. + } + + @Override + public void onLevelChange(ch.qos.logback.classic.Logger logger, Level level) { + // Nothing to do. + } + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/MetricsConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/MetricsConfiguration.java new file mode 100644 index 0000000000..0626cdade7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/MetricsConfiguration.java @@ -0,0 +1,99 @@ +package com.baeldung.jhipster.gateway.config; + +import io.github.jhipster.config.JHipsterProperties; + +import com.codahale.metrics.JmxReporter; +import com.codahale.metrics.JvmAttributeGaugeSet; +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.Slf4jReporter; +import com.codahale.metrics.health.HealthCheckRegistry; +import com.codahale.metrics.jvm.*; +import com.ryantenney.metrics.spring.config.annotation.EnableMetrics; +import com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerAdapter; +import com.zaxxer.hikari.HikariDataSource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.*; + +import javax.annotation.PostConstruct; +import java.lang.management.ManagementFactory; +import java.util.concurrent.TimeUnit; + +@Configuration +@EnableMetrics(proxyTargetClass = true) +public class MetricsConfiguration extends MetricsConfigurerAdapter { + + private static final String PROP_METRIC_REG_JVM_MEMORY = "jvm.memory"; + private static final String PROP_METRIC_REG_JVM_GARBAGE = "jvm.garbage"; + private static final String PROP_METRIC_REG_JVM_THREADS = "jvm.threads"; + private static final String PROP_METRIC_REG_JVM_FILES = "jvm.files"; + private static final String PROP_METRIC_REG_JVM_BUFFERS = "jvm.buffers"; + private static final String PROP_METRIC_REG_JVM_ATTRIBUTE_SET = "jvm.attributes"; + + private final Logger log = LoggerFactory.getLogger(MetricsConfiguration.class); + + private MetricRegistry metricRegistry = new MetricRegistry(); + + private HealthCheckRegistry healthCheckRegistry = new HealthCheckRegistry(); + + private final JHipsterProperties jHipsterProperties; + + private HikariDataSource hikariDataSource; + + public MetricsConfiguration(JHipsterProperties jHipsterProperties) { + this.jHipsterProperties = jHipsterProperties; + } + + @Autowired(required = false) + public void setHikariDataSource(HikariDataSource hikariDataSource) { + this.hikariDataSource = hikariDataSource; + } + + @Override + @Bean + public MetricRegistry getMetricRegistry() { + return metricRegistry; + } + + @Override + @Bean + public HealthCheckRegistry getHealthCheckRegistry() { + return healthCheckRegistry; + } + + @PostConstruct + public void init() { + log.debug("Registering JVM gauges"); + metricRegistry.register(PROP_METRIC_REG_JVM_MEMORY, new MemoryUsageGaugeSet()); + metricRegistry.register(PROP_METRIC_REG_JVM_GARBAGE, new GarbageCollectorMetricSet()); + metricRegistry.register(PROP_METRIC_REG_JVM_THREADS, new ThreadStatesGaugeSet()); + metricRegistry.register(PROP_METRIC_REG_JVM_FILES, new FileDescriptorRatioGauge()); + metricRegistry.register(PROP_METRIC_REG_JVM_BUFFERS, new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer())); + metricRegistry.register(PROP_METRIC_REG_JVM_ATTRIBUTE_SET, new JvmAttributeGaugeSet()); + if (hikariDataSource != null) { + log.debug("Monitoring the datasource"); + // remove the factory created by HikariDataSourceMetricsPostProcessor until JHipster migrate to Micrometer + hikariDataSource.setMetricsTrackerFactory(null); + hikariDataSource.setMetricRegistry(metricRegistry); + } + if (jHipsterProperties.getMetrics().getJmx().isEnabled()) { + log.debug("Initializing Metrics JMX reporting"); + JmxReporter jmxReporter = JmxReporter.forRegistry(metricRegistry).build(); + jmxReporter.start(); + } + if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { + log.info("Initializing Metrics Log reporting"); + Marker metricsMarker = MarkerFactory.getMarker("metrics"); + final Slf4jReporter reporter = Slf4jReporter.forRegistry(metricRegistry) + .outputTo(LoggerFactory.getLogger("metrics")) + .markWith(metricsMarker) + .convertRatesTo(TimeUnit.SECONDS) + .convertDurationsTo(TimeUnit.MILLISECONDS) + .build(); + reporter.start(jHipsterProperties.getMetrics().getLogs().getReportFrequency(), TimeUnit.SECONDS); + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/SecurityConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/SecurityConfiguration.java new file mode 100644 index 0000000000..bdc0650901 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/SecurityConfiguration.java @@ -0,0 +1,83 @@ +package com.baeldung.jhipster.gateway.config; + +import com.baeldung.jhipster.gateway.config.oauth2.OAuth2JwtAccessTokenConverter; +import com.baeldung.jhipster.gateway.config.oauth2.OAuth2Properties; +import com.baeldung.jhipster.gateway.security.oauth2.OAuth2SignatureVerifierClient; +import com.baeldung.jhipster.gateway.security.AuthoritiesConstants; + +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.cloud.client.loadbalancer.RestTemplateCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer; +import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; +import org.springframework.security.oauth2.provider.token.store.JwtTokenStore; +import org.springframework.security.web.csrf.CookieCsrfTokenRepository; +import org.springframework.security.web.csrf.CsrfFilter; +import org.springframework.web.filter.CorsFilter; +import org.springframework.web.client.RestTemplate; + +@Configuration +@EnableResourceServer +@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) +public class SecurityConfiguration extends ResourceServerConfigurerAdapter { + private final OAuth2Properties oAuth2Properties; + + private final CorsFilter corsFilter; + + public SecurityConfiguration(OAuth2Properties oAuth2Properties, CorsFilter corsFilter) { + this.oAuth2Properties = oAuth2Properties; + this.corsFilter = corsFilter; + } + + @Override + public void configure(HttpSecurity http) throws Exception { + http + .csrf() + .ignoringAntMatchers("/h2-console/**") + .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()) + .and() + .addFilterBefore(corsFilter, CsrfFilter.class) + .headers() + .frameOptions() + .disable() + .and() + .sessionManagement() + .sessionCreationPolicy(SessionCreationPolicy.STATELESS) + .and() + .authorizeRequests() + .antMatchers("/api/**").authenticated() + .antMatchers("/management/health").permitAll() + .antMatchers("/management/info").permitAll() + .antMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN); + } + + @Bean + public TokenStore tokenStore(JwtAccessTokenConverter jwtAccessTokenConverter) { + return new JwtTokenStore(jwtAccessTokenConverter); + } + + @Bean + public JwtAccessTokenConverter jwtAccessTokenConverter(OAuth2SignatureVerifierClient signatureVerifierClient) { + return new OAuth2JwtAccessTokenConverter(oAuth2Properties, signatureVerifierClient); + } + + @Bean + @Qualifier("loadBalancedRestTemplate") + public RestTemplate loadBalancedRestTemplate(RestTemplateCustomizer customizer) { + RestTemplate restTemplate = new RestTemplate(); + customizer.customize(restTemplate); + return restTemplate; + } + + @Bean + @Qualifier("vanillaRestTemplate") + public RestTemplate vanillaRestTemplate() { + return new RestTemplate(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/WebConfigurer.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/WebConfigurer.java new file mode 100644 index 0000000000..3bc1d6ad88 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/WebConfigurer.java @@ -0,0 +1,210 @@ +package com.baeldung.jhipster.gateway.config; + +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.servlet.InstrumentedFilter; +import com.codahale.metrics.servlets.MetricsServlet; +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.JHipsterProperties; +import io.github.jhipster.config.h2.H2ConfigurationHelper; +import io.github.jhipster.web.filter.CachingHttpHeadersFilter; +import io.undertow.UndertowOptions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; +import org.springframework.boot.web.server.*; +import org.springframework.boot.web.servlet.ServletContextInitializer; +import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.http.MediaType; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +import javax.servlet.*; +import java.io.File; +import java.io.UnsupportedEncodingException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Paths; +import java.util.*; + +import static java.net.URLDecoder.decode; + +/** + * Configuration of web application with Servlet 3.0 APIs. + */ +@Configuration +public class WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer { + + private final Logger log = LoggerFactory.getLogger(WebConfigurer.class); + + private final Environment env; + + private final JHipsterProperties jHipsterProperties; + + private MetricRegistry metricRegistry; + + public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) { + + this.env = env; + this.jHipsterProperties = jHipsterProperties; + } + + @Override + public void onStartup(ServletContext servletContext) throws ServletException { + if (env.getActiveProfiles().length != 0) { + log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles()); + } + EnumSet disps = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.ASYNC); + initMetrics(servletContext, disps); + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { + initCachingHttpHeadersFilter(servletContext, disps); + } + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { + initH2Console(servletContext); + } + log.info("Web application fully configured"); + } + + /** + * Customize the Servlet engine: Mime types, the document root, the cache. + */ + @Override + public void customize(WebServerFactory server) { + setMimeMappings(server); + // When running in an IDE or with ./mvnw spring-boot:run, set location of the static web assets. + setLocationForStaticAssets(server); + + /* + * Enable HTTP/2 for Undertow - https://twitter.com/ankinson/status/829256167700492288 + * HTTP/2 requires HTTPS, so HTTP requests will fallback to HTTP/1.1. + * See the JHipsterProperties class and your application-*.yml configuration files + * for more information. + */ + if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && + server instanceof UndertowServletWebServerFactory) { + + ((UndertowServletWebServerFactory) server) + .addBuilderCustomizers(builder -> + builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true)); + } + } + + private void setMimeMappings(WebServerFactory server) { + if (server instanceof ConfigurableServletWebServerFactory) { + MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT); + // IE issue, see https://github.com/jhipster/generator-jhipster/pull/711 + mappings.add("html", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase()); + // CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64 + mappings.add("json", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase()); + ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server; + servletWebServer.setMimeMappings(mappings); + } + } + + private void setLocationForStaticAssets(WebServerFactory server) { + if (server instanceof ConfigurableServletWebServerFactory) { + ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server; + File root; + String prefixPath = resolvePathPrefix(); + root = new File(prefixPath + "target/www/"); + if (root.exists() && root.isDirectory()) { + servletWebServer.setDocumentRoot(root); + } + } + } + + /** + * Resolve path prefix to static resources. + */ + private String resolvePathPrefix() { + String fullExecutablePath; + try { + fullExecutablePath = decode(this.getClass().getResource("").getPath(), StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + /* try without decoding if this ever happens */ + fullExecutablePath = this.getClass().getResource("").getPath(); + } + String rootPath = Paths.get(".").toUri().normalize().getPath(); + String extractedPath = fullExecutablePath.replace(rootPath, ""); + int extractionEndIndex = extractedPath.indexOf("target/"); + if (extractionEndIndex <= 0) { + return ""; + } + return extractedPath.substring(0, extractionEndIndex); + } + + /** + * Initializes the caching HTTP Headers Filter. + */ + private void initCachingHttpHeadersFilter(ServletContext servletContext, + EnumSet disps) { + log.debug("Registering Caching HTTP Headers Filter"); + FilterRegistration.Dynamic cachingHttpHeadersFilter = + servletContext.addFilter("cachingHttpHeadersFilter", + new CachingHttpHeadersFilter(jHipsterProperties)); + + cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/i18n/*"); + cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/content/*"); + cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/app/*"); + cachingHttpHeadersFilter.setAsyncSupported(true); + } + + /** + * Initializes Metrics. + */ + private void initMetrics(ServletContext servletContext, EnumSet disps) { + log.debug("Initializing Metrics registries"); + servletContext.setAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE, + metricRegistry); + servletContext.setAttribute(MetricsServlet.METRICS_REGISTRY, + metricRegistry); + + log.debug("Registering Metrics Filter"); + FilterRegistration.Dynamic metricsFilter = servletContext.addFilter("webappMetricsFilter", + new InstrumentedFilter()); + + metricsFilter.addMappingForUrlPatterns(disps, true, "/*"); + metricsFilter.setAsyncSupported(true); + + log.debug("Registering Metrics Servlet"); + ServletRegistration.Dynamic metricsAdminServlet = + servletContext.addServlet("metricsServlet", new MetricsServlet()); + + metricsAdminServlet.addMapping("/management/metrics/*"); + metricsAdminServlet.setAsyncSupported(true); + metricsAdminServlet.setLoadOnStartup(2); + } + + @Bean + public CorsFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + CorsConfiguration config = jHipsterProperties.getCors(); + if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) { + log.debug("Registering CORS filter"); + source.registerCorsConfiguration("/api/**", config); + source.registerCorsConfiguration("/management/**", config); + source.registerCorsConfiguration("/v2/api-docs", config); + source.registerCorsConfiguration("/auth/**", config); + source.registerCorsConfiguration("/*/api/**", config); + source.registerCorsConfiguration("/*/management/**", config); + source.registerCorsConfiguration("/*/oauth/**", config); + } + return new CorsFilter(source); + } + + /** + * Initializes H2 console. + */ + private void initH2Console(ServletContext servletContext) { + log.debug("Initialize H2 console"); + H2ConfigurationHelper.initH2Console(servletContext); + } + + @Autowired(required = false) + public void setMetricRegistry(MetricRegistry metricRegistry) { + this.metricRegistry = metricRegistry; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/apidoc/GatewaySwaggerResourcesProvider.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/apidoc/GatewaySwaggerResourcesProvider.java new file mode 100644 index 0000000000..69bf50d30f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/apidoc/GatewaySwaggerResourcesProvider.java @@ -0,0 +1,54 @@ +package com.baeldung.jhipster.gateway.config.apidoc; + +import java.util.ArrayList; +import java.util.List; + +import io.github.jhipster.config.JHipsterConstants; + +import org.springframework.context.annotation.*; +import org.springframework.cloud.netflix.zuul.filters.Route; +import org.springframework.cloud.netflix.zuul.filters.RouteLocator; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Component; + +import springfox.documentation.swagger.web.SwaggerResource; +import springfox.documentation.swagger.web.SwaggerResourcesProvider; + +/** + * Retrieves all registered microservices Swagger resources. + */ +@Component +@Primary +@Profile(JHipsterConstants.SPRING_PROFILE_SWAGGER) +public class GatewaySwaggerResourcesProvider implements SwaggerResourcesProvider { + + private final RouteLocator routeLocator; + + public GatewaySwaggerResourcesProvider(RouteLocator routeLocator) { + this.routeLocator = routeLocator; + } + + @Override + public List get() { + List resources = new ArrayList<>(); + + //Add the default swagger resource that correspond to the gateway's own swagger doc + resources.add(swaggerResource("default", "/v2/api-docs")); + + //Add the registered microservices swagger docs as additional swagger resources + List routes = routeLocator.getRoutes(); + routes.forEach(route -> { + resources.add(swaggerResource(route.getId(), route.getFullPath().replace("**", "v2/api-docs"))); + }); + + return resources; + } + + private SwaggerResource swaggerResource(String name, String location) { + SwaggerResource swaggerResource = new SwaggerResource(); + swaggerResource.setName(name); + swaggerResource.setLocation(location); + swaggerResource.setSwaggerVersion("2.0"); + return swaggerResource; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/audit/AuditEventConverter.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/audit/AuditEventConverter.java new file mode 100644 index 0000000000..f8745d0918 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/audit/AuditEventConverter.java @@ -0,0 +1,86 @@ +package com.baeldung.jhipster.gateway.config.audit; + +import com.baeldung.jhipster.gateway.domain.PersistentAuditEvent; + +import org.springframework.boot.actuate.audit.AuditEvent; +import org.springframework.security.web.authentication.WebAuthenticationDetails; +import org.springframework.stereotype.Component; + +import java.util.*; + +@Component +public class AuditEventConverter { + + /** + * Convert a list of PersistentAuditEvent to a list of AuditEvent + * + * @param persistentAuditEvents the list to convert + * @return the converted list. + */ + public List convertToAuditEvent(Iterable persistentAuditEvents) { + if (persistentAuditEvents == null) { + return Collections.emptyList(); + } + List auditEvents = new ArrayList<>(); + for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) { + auditEvents.add(convertToAuditEvent(persistentAuditEvent)); + } + return auditEvents; + } + + /** + * Convert a PersistentAuditEvent to an AuditEvent + * + * @param persistentAuditEvent the event to convert + * @return the converted list. + */ + public AuditEvent convertToAuditEvent(PersistentAuditEvent persistentAuditEvent) { + if (persistentAuditEvent == null) { + return null; + } + return new AuditEvent(persistentAuditEvent.getAuditEventDate(), persistentAuditEvent.getPrincipal(), + persistentAuditEvent.getAuditEventType(), convertDataToObjects(persistentAuditEvent.getData())); + } + + /** + * Internal conversion. This is needed to support the current SpringBoot actuator AuditEventRepository interface + * + * @param data the data to convert + * @return a map of String, Object + */ + public Map convertDataToObjects(Map data) { + Map results = new HashMap<>(); + + if (data != null) { + for (Map.Entry entry : data.entrySet()) { + results.put(entry.getKey(), entry.getValue()); + } + } + return results; + } + + /** + * Internal conversion. This method will allow to save additional data. + * By default, it will save the object as string + * + * @param data the data to convert + * @return a map of String, String + */ + public Map convertDataToStrings(Map data) { + Map results = new HashMap<>(); + + if (data != null) { + for (Map.Entry entry : data.entrySet()) { + // Extract the data that will be saved. + if (entry.getValue() instanceof WebAuthenticationDetails) { + WebAuthenticationDetails authenticationDetails = (WebAuthenticationDetails) entry.getValue(); + results.put("remoteAddress", authenticationDetails.getRemoteAddress()); + results.put("sessionId", authenticationDetails.getSessionId()); + } else { + results.put(entry.getKey(), Objects.toString(entry.getValue())); + } + } + } + return results; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/audit/package-info.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/audit/package-info.java new file mode 100644 index 0000000000..2772f6041d --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/audit/package-info.java @@ -0,0 +1,4 @@ +/** + * Audit specific code. + */ +package com.baeldung.jhipster.gateway.config.audit; diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/oauth2/OAuth2AuthenticationConfiguration.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/oauth2/OAuth2AuthenticationConfiguration.java new file mode 100644 index 0000000000..bc5a4979a1 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/oauth2/OAuth2AuthenticationConfiguration.java @@ -0,0 +1,80 @@ +package com.baeldung.jhipster.gateway.config.oauth2; + +import com.baeldung.jhipster.gateway.security.oauth2.CookieTokenExtractor; +import com.baeldung.jhipster.gateway.security.oauth2.OAuth2AuthenticationService; +import com.baeldung.jhipster.gateway.security.oauth2.OAuth2CookieHelper; +import com.baeldung.jhipster.gateway.security.oauth2.OAuth2TokenEndpointClient; +import com.baeldung.jhipster.gateway.web.filter.RefreshTokenFilterConfigurer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer; +import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter; +import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer; +import org.springframework.security.oauth2.provider.authentication.TokenExtractor; +import org.springframework.security.oauth2.provider.token.TokenStore; + +/** + * Configures the RefreshFilter refreshing expired OAuth2 token Cookies. + */ +@Configuration +@EnableResourceServer +@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) +public class OAuth2AuthenticationConfiguration extends ResourceServerConfigurerAdapter { + private final OAuth2Properties oAuth2Properties; + private final OAuth2TokenEndpointClient tokenEndpointClient; + private final TokenStore tokenStore; + + public OAuth2AuthenticationConfiguration(OAuth2Properties oAuth2Properties, OAuth2TokenEndpointClient tokenEndpointClient, TokenStore tokenStore) { + this.oAuth2Properties = oAuth2Properties; + this.tokenEndpointClient = tokenEndpointClient; + this.tokenStore = tokenStore; + } + + @Override + public void configure(HttpSecurity http) throws Exception { + http + .authorizeRequests() + .antMatchers("/auth/login").permitAll() + .antMatchers("/auth/logout").authenticated() + .and() + .apply(refreshTokenSecurityConfigurerAdapter()); + } + + /** + * A SecurityConfigurerAdapter to install a servlet filter that refreshes OAuth2 tokens. + */ + private RefreshTokenFilterConfigurer refreshTokenSecurityConfigurerAdapter() { + return new RefreshTokenFilterConfigurer(uaaAuthenticationService(), tokenStore); + } + + @Bean + public OAuth2CookieHelper cookieHelper() { + return new OAuth2CookieHelper(oAuth2Properties); + } + + @Bean + public OAuth2AuthenticationService uaaAuthenticationService() { + return new OAuth2AuthenticationService(tokenEndpointClient, cookieHelper()); + } + + /** + * Configure the ResourceServer security by installing a new TokenExtractor. + */ + @Override + public void configure(ResourceServerSecurityConfigurer resources) throws Exception { + resources.tokenExtractor(tokenExtractor()); + } + + /** + * The new TokenExtractor can extract tokens from Cookies and Authorization headers. + * + * @return the CookieTokenExtractor bean. + */ + @Bean + public TokenExtractor tokenExtractor() { + return new CookieTokenExtractor(); + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/oauth2/OAuth2JwtAccessTokenConverter.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/oauth2/OAuth2JwtAccessTokenConverter.java new file mode 100644 index 0000000000..64bbac0008 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/oauth2/OAuth2JwtAccessTokenConverter.java @@ -0,0 +1,109 @@ +package com.baeldung.jhipster.gateway.config.oauth2; + +import com.baeldung.jhipster.gateway.security.oauth2.OAuth2SignatureVerifierClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.jwt.crypto.sign.SignatureVerifier; +import org.springframework.security.oauth2.common.exceptions.InvalidTokenException; +import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; +import org.springframework.security.oauth2.provider.OAuth2Authentication; + +import java.util.Map; + +/** + * Improved JwtAccessTokenConverter that can handle lazy fetching of public verifier keys. + */ +public class OAuth2JwtAccessTokenConverter extends JwtAccessTokenConverter { + private final Logger log = LoggerFactory.getLogger(OAuth2JwtAccessTokenConverter.class); + + private final OAuth2Properties oAuth2Properties; + private final OAuth2SignatureVerifierClient signatureVerifierClient; + /** + * When did we last fetch the public key? + */ + private long lastKeyFetchTimestamp; + + public OAuth2JwtAccessTokenConverter(OAuth2Properties oAuth2Properties, OAuth2SignatureVerifierClient signatureVerifierClient) { + this.oAuth2Properties = oAuth2Properties; + this.signatureVerifierClient = signatureVerifierClient; + tryCreateSignatureVerifier(); + } + + /** + * Try to decode the token with the current public key. + * If it fails, contact the OAuth2 server to get a new public key, then try again. + * We might not have fetched it in the first place or it might have changed. + * + * @param token the JWT token to decode. + * @return the resulting claims. + * @throws InvalidTokenException if we cannot decode the token. + */ + @Override + protected Map decode(String token) { + try { + //check if our public key and thus SignatureVerifier have expired + long ttl = oAuth2Properties.getSignatureVerification().getTtl(); + if (ttl > 0 && System.currentTimeMillis() - lastKeyFetchTimestamp > ttl) { + throw new InvalidTokenException("public key expired"); + } + return super.decode(token); + } catch (InvalidTokenException ex) { + if (tryCreateSignatureVerifier()) { + return super.decode(token); + } + throw ex; + } + } + + /** + * Fetch a new public key from the AuthorizationServer. + * + * @return true, if we could fetch it; false, if we could not. + */ + private boolean tryCreateSignatureVerifier() { + long t = System.currentTimeMillis(); + if (t - lastKeyFetchTimestamp < oAuth2Properties.getSignatureVerification().getPublicKeyRefreshRateLimit()) { + return false; + } + try { + SignatureVerifier verifier = signatureVerifierClient.getSignatureVerifier(); + if (verifier != null) { + setVerifier(verifier); + lastKeyFetchTimestamp = t; + log.debug("Public key retrieved from OAuth2 server to create SignatureVerifier"); + return true; + } + } catch (Throwable ex) { + log.error("could not get public key from OAuth2 server to create SignatureVerifier", ex); + } + return false; + } + /** + * Extract JWT claims and set it to OAuth2Authentication decoded details. + * Here is how to get details: + * + *

+     * 
+     *  SecurityContext securityContext = SecurityContextHolder.getContext();
+     *  Authentication authentication = securityContext.getAuthentication();
+     *  if (authentication != null) {
+     *      Object details = authentication.getDetails();
+     *      if(details instanceof OAuth2AuthenticationDetails) {
+     *          Object decodedDetails = ((OAuth2AuthenticationDetails) details).getDecodedDetails();
+     *          if(decodedDetails != null && decodedDetails instanceof Map) {
+     *             String detailFoo = ((Map) decodedDetails).get("foo");
+     *          }
+     *      }
+     *  }
+     * 
+     *  
+ * @param claims OAuth2JWTToken claims + * @return OAuth2Authentication + */ + @Override + public OAuth2Authentication extractAuthentication(Map claims) { + OAuth2Authentication authentication = super.extractAuthentication(claims); + authentication.setDetails(claims); + return authentication; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/oauth2/OAuth2Properties.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/oauth2/OAuth2Properties.java new file mode 100644 index 0000000000..1280994304 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/oauth2/OAuth2Properties.java @@ -0,0 +1,118 @@ +package com.baeldung.jhipster.gateway.config.oauth2; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * OAuth2 properties define properties for OAuth2-based microservices. + */ +@Component +@ConfigurationProperties(prefix = "oauth2", ignoreUnknownFields = false) +public class OAuth2Properties { + private WebClientConfiguration webClientConfiguration = new WebClientConfiguration(); + + private SignatureVerification signatureVerification = new SignatureVerification(); + + public WebClientConfiguration getWebClientConfiguration() { + return webClientConfiguration; + } + + public SignatureVerification getSignatureVerification() { + return signatureVerification; + } + + public static class WebClientConfiguration { + private String clientId = "web_app"; + private String secret = "changeit"; + /** + * Holds the session timeout in seconds for non-remember-me sessions. + * After so many seconds of inactivity, the session will be terminated. + * Only checked during token refresh, so long access token validity may + * delay the session timeout accordingly. + */ + private int sessionTimeoutInSeconds = 1800; + /** + * Defines the cookie domain. If specified, cookies will be set on this domain. + * If not configured, then cookies will be set on the top-level domain of the + * request you sent, i.e. if you send a request to app1.your-domain.com, + * then cookies will be set on .your-domain.com, such that they + * are also valid for app2.your-domain.com. + */ + private String cookieDomain; + + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public String getSecret() { + return secret; + } + + public void setSecret(String secret) { + this.secret = secret; + } + + public int getSessionTimeoutInSeconds() { + return sessionTimeoutInSeconds; + } + + public void setSessionTimeoutInSeconds(int sessionTimeoutInSeconds) { + this.sessionTimeoutInSeconds = sessionTimeoutInSeconds; + } + + public String getCookieDomain() { + return cookieDomain; + } + + public void setCookieDomain(String cookieDomain) { + this.cookieDomain = cookieDomain; + } + } + + public static class SignatureVerification { + /** + * Maximum refresh rate for public keys in ms. + * We won't fetch new public keys any faster than that to avoid spamming UAA in case + * we receive a lot of "illegal" tokens. + */ + private long publicKeyRefreshRateLimit = 10 * 1000L; + /** + * Maximum TTL for the public key in ms. + * The public key will be fetched again from UAA if it gets older than that. + * That way, we make sure that we get the newest keys always in case they are updated there. + */ + private long ttl = 24 * 60 * 60 * 1000L; + /** + * Endpoint where to retrieve the public key used to verify token signatures. + */ + private String publicKeyEndpointUri = "http://uaa/oauth/token_key"; + + public long getPublicKeyRefreshRateLimit() { + return publicKeyRefreshRateLimit; + } + + public void setPublicKeyRefreshRateLimit(long publicKeyRefreshRateLimit) { + this.publicKeyRefreshRateLimit = publicKeyRefreshRateLimit; + } + + public long getTtl() { + return ttl; + } + + public void setTtl(long ttl) { + this.ttl = ttl; + } + + public String getPublicKeyEndpointUri() { + return publicKeyEndpointUri; + } + + public void setPublicKeyEndpointUri(String publicKeyEndpointUri) { + this.publicKeyEndpointUri = publicKeyEndpointUri; + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/package-info.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/package-info.java new file mode 100644 index 0000000000..2ee9067535 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/config/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring Framework configuration files. + */ +package com.baeldung.jhipster.gateway.config; diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/domain/AbstractAuditingEntity.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/domain/AbstractAuditingEntity.java new file mode 100644 index 0000000000..b626ca0633 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/domain/AbstractAuditingEntity.java @@ -0,0 +1,79 @@ +package com.baeldung.jhipster.gateway.domain; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.hibernate.envers.Audited; +import org.springframework.data.annotation.CreatedBy; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedBy; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import java.io.Serializable; +import java.time.Instant; +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; + +/** + * Base abstract class for entities which will hold definitions for created, last modified by and created, + * last modified by date. + */ +@MappedSuperclass +@Audited +@EntityListeners(AuditingEntityListener.class) +public abstract class AbstractAuditingEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + @CreatedBy + @Column(name = "created_by", nullable = false, length = 50, updatable = false) + @JsonIgnore + private String createdBy; + + @CreatedDate + @Column(name = "created_date", nullable = false, updatable = false) + @JsonIgnore + private Instant createdDate = Instant.now(); + + @LastModifiedBy + @Column(name = "last_modified_by", length = 50) + @JsonIgnore + private String lastModifiedBy; + + @LastModifiedDate + @Column(name = "last_modified_date") + @JsonIgnore + private Instant lastModifiedDate = Instant.now(); + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Instant getCreatedDate() { + return createdDate; + } + + public void setCreatedDate(Instant createdDate) { + this.createdDate = createdDate; + } + + public String getLastModifiedBy() { + return lastModifiedBy; + } + + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public Instant getLastModifiedDate() { + return lastModifiedDate; + } + + public void setLastModifiedDate(Instant lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/domain/PersistentAuditEvent.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/domain/PersistentAuditEvent.java new file mode 100644 index 0000000000..3922b96000 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/domain/PersistentAuditEvent.java @@ -0,0 +1,81 @@ +package com.baeldung.jhipster.gateway.domain; + +import javax.persistence.*; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; + +/** + * Persist AuditEvent managed by the Spring Boot actuator. + * + * @see org.springframework.boot.actuate.audit.AuditEvent + */ +@Entity +@Table(name = "jhi_persistent_audit_event") +public class PersistentAuditEvent implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "event_id") + private Long id; + + @NotNull + @Column(nullable = false) + private String principal; + + @Column(name = "event_date") + private Instant auditEventDate; + + @Column(name = "event_type") + private String auditEventType; + + @ElementCollection + @MapKeyColumn(name = "name") + @Column(name = "value") + @CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns=@JoinColumn(name="event_id")) + private Map data = new HashMap<>(); + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getPrincipal() { + return principal; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public Instant getAuditEventDate() { + return auditEventDate; + } + + public void setAuditEventDate(Instant auditEventDate) { + this.auditEventDate = auditEventDate; + } + + public String getAuditEventType() { + return auditEventType; + } + + public void setAuditEventType(String auditEventType) { + this.auditEventType = auditEventType; + } + + public Map getData() { + return data; + } + + public void setData(Map data) { + this.data = data; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/domain/package-info.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/domain/package-info.java new file mode 100644 index 0000000000..912c64f019 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/domain/package-info.java @@ -0,0 +1,4 @@ +/** + * JPA domain objects. + */ +package com.baeldung.jhipster.gateway.domain; diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/gateway/accesscontrol/AccessControlFilter.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/gateway/accesscontrol/AccessControlFilter.java new file mode 100644 index 0000000000..102789c198 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/gateway/accesscontrol/AccessControlFilter.java @@ -0,0 +1,99 @@ +package com.baeldung.jhipster.gateway.gateway.accesscontrol; + +import io.github.jhipster.config.JHipsterProperties; + +import java.util.List; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cloud.netflix.zuul.filters.Route; +import org.springframework.cloud.netflix.zuul.filters.RouteLocator; +import org.springframework.http.HttpStatus; + +import com.netflix.zuul.ZuulFilter; +import com.netflix.zuul.context.RequestContext; + +/** + * Zuul filter for restricting access to backend micro-services endpoints. + */ +public class AccessControlFilter extends ZuulFilter { + + private final Logger log = LoggerFactory.getLogger(AccessControlFilter.class); + + private final RouteLocator routeLocator; + + private final JHipsterProperties jHipsterProperties; + + public AccessControlFilter(RouteLocator routeLocator, JHipsterProperties jHipsterProperties) { + this.routeLocator = routeLocator; + this.jHipsterProperties = jHipsterProperties; + } + + @Override + public String filterType() { + return "pre"; + } + + @Override + public int filterOrder() { + return 0; + } + + /** + * Filter requests on endpoints that are not in the list of authorized microservices endpoints. + */ + @Override + public boolean shouldFilter() { + String requestUri = RequestContext.getCurrentContext().getRequest().getRequestURI(); + String contextPath = RequestContext.getCurrentContext().getRequest().getContextPath(); + + // If the request Uri does not start with the path of the authorized endpoints, we block the request + for (Route route : routeLocator.getRoutes()) { + String serviceUrl = contextPath + route.getFullPath(); + String serviceName = route.getId(); + + // If this route correspond to the current request URI + // We do a substring to remove the "**" at the end of the route URL + if (requestUri.startsWith(serviceUrl.substring(0, serviceUrl.length() - 2))) { + return !isAuthorizedRequest(serviceUrl, serviceName, requestUri); + } + } + return true; + } + + private boolean isAuthorizedRequest(String serviceUrl, String serviceName, String requestUri) { + Map> authorizedMicroservicesEndpoints = jHipsterProperties.getGateway() + .getAuthorizedMicroservicesEndpoints(); + + // If the authorized endpoints list was left empty for this route, all access are allowed + if (authorizedMicroservicesEndpoints.get(serviceName) == null) { + log.debug("Access Control: allowing access for {}, as no access control policy has been set up for " + + "service: {}", requestUri, serviceName); + return true; + } else { + List authorizedEndpoints = authorizedMicroservicesEndpoints.get(serviceName); + + // Go over the authorized endpoints to control that the request URI matches it + for (String endpoint : authorizedEndpoints) { + // We do a substring to remove the "**/" at the end of the route URL + String gatewayEndpoint = serviceUrl.substring(0, serviceUrl.length() - 3) + endpoint; + if (requestUri.startsWith(gatewayEndpoint)) { + log.debug("Access Control: allowing access for {}, as it matches the following authorized " + + "microservice endpoint: {}", requestUri, gatewayEndpoint); + return true; + } + } + } + return false; + } + + @Override + public Object run() { + RequestContext ctx = RequestContext.getCurrentContext(); + ctx.setResponseStatusCode(HttpStatus.FORBIDDEN.value()); + ctx.setSendZuulResponse(false); + log.debug("Access Control: filtered unauthorized access on endpoint {}", ctx.getRequest().getRequestURI()); + return null; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/gateway/ratelimiting/RateLimitingFilter.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/gateway/ratelimiting/RateLimitingFilter.java new file mode 100644 index 0000000000..4c0673282c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/gateway/ratelimiting/RateLimitingFilter.java @@ -0,0 +1,121 @@ +package com.baeldung.jhipster.gateway.gateway.ratelimiting; + +import com.baeldung.jhipster.gateway.security.SecurityUtils; + +import java.time.Duration; +import java.util.function.Supplier; +import javax.cache.CacheManager; +import javax.cache.Caching; +import javax.cache.configuration.CompleteConfiguration; +import javax.cache.configuration.MutableConfiguration; +import javax.cache.spi.CachingProvider; +import javax.servlet.http.HttpServletRequest; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; + +import com.netflix.zuul.ZuulFilter; +import com.netflix.zuul.context.RequestContext; + +import io.github.bucket4j.*; +import io.github.bucket4j.grid.GridBucketState; +import io.github.bucket4j.grid.ProxyManager; +import io.github.bucket4j.grid.jcache.JCache; +import io.github.jhipster.config.JHipsterProperties; + +/** + * Zuul filter for limiting the number of HTTP calls per client. + * + * See the Bucket4j documentation at https://github.com/vladimir-bukhtoyarov/bucket4j + * https://github.com/vladimir-bukhtoyarov/bucket4j/blob/master/doc-pages/jcache-usage + * .md#example-1---limiting-access-to-http-server-by-ip-address + */ +public class RateLimitingFilter extends ZuulFilter { + + private final Logger log = LoggerFactory.getLogger(RateLimitingFilter.class); + + public final static String GATEWAY_RATE_LIMITING_CACHE_NAME = "gateway-rate-limiting"; + + private final JHipsterProperties jHipsterProperties; + + private javax.cache.Cache cache; + + private ProxyManager buckets; + + public RateLimitingFilter(JHipsterProperties jHipsterProperties) { + this.jHipsterProperties = jHipsterProperties; + + CachingProvider cachingProvider = Caching.getCachingProvider(); + CacheManager cacheManager = cachingProvider.getCacheManager(); + CompleteConfiguration config = + new MutableConfiguration() + .setTypes(String.class, GridBucketState.class); + + this.cache = cacheManager.createCache(GATEWAY_RATE_LIMITING_CACHE_NAME, config); + this.buckets = Bucket4j.extension(JCache.class).proxyManagerForCache(cache); + } + + @Override + public String filterType() { + return "pre"; + } + + @Override + public int filterOrder() { + return 10; + } + + @Override + public boolean shouldFilter() { + // specific APIs can be filtered out using + // if (RequestContext.getCurrentContext().getRequest().getRequestURI().startsWith("/api")) { ... } + return true; + } + + @Override + public Object run() { + String bucketId = getId(RequestContext.getCurrentContext().getRequest()); + Bucket bucket = buckets.getProxy(bucketId, getConfigSupplier()); + if (bucket.tryConsume(1)) { + // the limit is not exceeded + log.debug("API rate limit OK for {}", bucketId); + } else { + // limit is exceeded + log.info("API rate limit exceeded for {}", bucketId); + apiLimitExceeded(); + } + return null; + } + + private Supplier getConfigSupplier() { + return () -> { + JHipsterProperties.Gateway.RateLimiting rateLimitingProperties = + jHipsterProperties.getGateway().getRateLimiting(); + + return Bucket4j.configurationBuilder() + .addLimit(Bandwidth.simple(rateLimitingProperties.getLimit(), + Duration.ofSeconds(rateLimitingProperties.getDurationInSeconds()))) + .build(); + }; + } + + /** + * Create a Zuul response error when the API limit is exceeded. + */ + private void apiLimitExceeded() { + RequestContext ctx = RequestContext.getCurrentContext(); + ctx.setResponseStatusCode(HttpStatus.TOO_MANY_REQUESTS.value()); + if (ctx.getResponseBody() == null) { + ctx.setResponseBody("API rate limit exceeded"); + ctx.setSendZuulResponse(false); + } + } + + /** + * The ID that will identify the limit: the user login or the user IP address. + */ + private String getId(HttpServletRequest httpServletRequest) { + return SecurityUtils.getCurrentUserLogin().orElse(httpServletRequest.getRemoteAddr()); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/gateway/responserewriting/SwaggerBasePathRewritingFilter.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/gateway/responserewriting/SwaggerBasePathRewritingFilter.java new file mode 100644 index 0000000000..6dd2d4de8f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/gateway/responserewriting/SwaggerBasePathRewritingFilter.java @@ -0,0 +1,99 @@ +package com.baeldung.jhipster.gateway.gateway.responserewriting; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.netflix.zuul.context.RequestContext; +import org.apache.commons.io.IOUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cloud.netflix.zuul.filters.ZuulProperties; +import org.springframework.cloud.netflix.zuul.filters.post.SendResponseFilter; +import springfox.documentation.swagger2.web.Swagger2Controller; + +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.util.LinkedHashMap; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; + +/** + * Zuul filter to rewrite micro-services Swagger URL Base Path. + */ +public class SwaggerBasePathRewritingFilter extends SendResponseFilter { + + private final Logger log = LoggerFactory.getLogger(SwaggerBasePathRewritingFilter.class); + + private ObjectMapper mapper = new ObjectMapper(); + + public SwaggerBasePathRewritingFilter() { + super(new ZuulProperties()); + } + + @Override + public String filterType() { + return "post"; + } + + @Override + public int filterOrder() { + return 100; + } + + /** + * Filter requests to micro-services Swagger docs. + */ + @Override + public boolean shouldFilter() { + return RequestContext.getCurrentContext().getRequest().getRequestURI().endsWith(Swagger2Controller.DEFAULT_URL); + } + + @Override + public Object run() { + RequestContext context = RequestContext.getCurrentContext(); + + context.getResponse().setCharacterEncoding("UTF-8"); + + String rewrittenResponse = rewriteBasePath(context); + if (context.getResponseGZipped()) { + try { + context.setResponseDataStream(new ByteArrayInputStream(gzipData(rewrittenResponse))); + } catch (IOException e) { + log.error("Swagger-docs filter error", e); + } + } else { + context.setResponseBody(rewrittenResponse); + } + return null; + } + + @SuppressWarnings("unchecked") + private String rewriteBasePath(RequestContext context) { + InputStream responseDataStream = context.getResponseDataStream(); + String requestUri = RequestContext.getCurrentContext().getRequest().getRequestURI(); + try { + if (context.getResponseGZipped()) { + responseDataStream = new GZIPInputStream(context.getResponseDataStream()); + } + String response = IOUtils.toString(responseDataStream, StandardCharsets.UTF_8); + if (response != null) { + LinkedHashMap map = this.mapper.readValue(response, LinkedHashMap.class); + + String basePath = requestUri.replace(Swagger2Controller.DEFAULT_URL, ""); + map.put("basePath", basePath); + log.debug("Swagger-docs: rewritten Base URL with correct micro-service route: {}", basePath); + return mapper.writeValueAsString(map); + } + } catch (IOException e) { + log.error("Swagger-docs filter error", e); + } + return null; + } + + public static byte[] gzipData(String content) throws IOException { + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + PrintWriter gzip = new PrintWriter(new GZIPOutputStream(bos)); + gzip.print(content); + gzip.flush(); + gzip.close(); + return bos.toByteArray(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/repository/package-info.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/repository/package-info.java new file mode 100644 index 0000000000..10a1bec77c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/repository/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring Data JPA repositories. + */ +package com.baeldung.jhipster.gateway.repository; diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/AuthoritiesConstants.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/AuthoritiesConstants.java new file mode 100644 index 0000000000..31480b886b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/AuthoritiesConstants.java @@ -0,0 +1,16 @@ +package com.baeldung.jhipster.gateway.security; + +/** + * Constants for Spring Security authorities. + */ +public final class AuthoritiesConstants { + + public static final String ADMIN = "ROLE_ADMIN"; + + public static final String USER = "ROLE_USER"; + + public static final String ANONYMOUS = "ROLE_ANONYMOUS"; + + private AuthoritiesConstants() { + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/SecurityUtils.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/SecurityUtils.java new file mode 100644 index 0000000000..e7d4ca3238 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/SecurityUtils.java @@ -0,0 +1,64 @@ +package com.baeldung.jhipster.gateway.security; + +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; + +import java.util.Optional; + +/** + * Utility class for Spring Security. + */ +public final class SecurityUtils { + + private SecurityUtils() { + } + + /** + * Get the login of the current user. + * + * @return the login of the current user + */ + public static Optional getCurrentUserLogin() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional.ofNullable(securityContext.getAuthentication()) + .map(authentication -> { + if (authentication.getPrincipal() instanceof UserDetails) { + UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal(); + return springSecurityUser.getUsername(); + } else if (authentication.getPrincipal() instanceof String) { + return (String) authentication.getPrincipal(); + } + return null; + }); + } + + /** + * Check if a user is authenticated. + * + * @return true if the user is authenticated, false otherwise + */ + public static boolean isAuthenticated() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional.ofNullable(securityContext.getAuthentication()) + .map(authentication -> authentication.getAuthorities().stream() + .noneMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(AuthoritiesConstants.ANONYMOUS))) + .orElse(false); + } + + /** + * If the current user has a specific authority (security role). + *

+ * The name of this method comes from the isUserInRole() method in the Servlet API + * + * @param authority the authority to check + * @return true if the current user has the authority, false otherwise + */ + public static boolean isCurrentUserInRole(String authority) { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional.ofNullable(securityContext.getAuthentication()) + .map(authentication -> authentication.getAuthorities().stream() + .anyMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(authority))) + .orElse(false); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/SpringSecurityAuditorAware.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/SpringSecurityAuditorAware.java new file mode 100644 index 0000000000..0329d5202b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/SpringSecurityAuditorAware.java @@ -0,0 +1,20 @@ +package com.baeldung.jhipster.gateway.security; + +import com.baeldung.jhipster.gateway.config.Constants; + +import java.util.Optional; + +import org.springframework.data.domain.AuditorAware; +import org.springframework.stereotype.Component; + +/** + * Implementation of AuditorAware based on Spring Security. + */ +@Component +public class SpringSecurityAuditorAware implements AuditorAware { + + @Override + public Optional getCurrentAuditor() { + return Optional.of(SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT)); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/CookieCollection.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/CookieCollection.java new file mode 100644 index 0000000000..7810ed8661 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/CookieCollection.java @@ -0,0 +1,139 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import javax.servlet.http.Cookie; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +/** + * A Collection of Cookies that allows modification - unlike a mere array. + *

+ * Since {@link Cookie} doesn't implement hashCode nor equals, + * we cannot simply put it into a HashSet. + */ +public class CookieCollection implements Collection { + private final Map cookieMap; + + public CookieCollection() { + cookieMap = new HashMap<>(); + } + + public CookieCollection(Cookie... cookies) { + this(Arrays.asList(cookies)); + } + + public CookieCollection(Collection cookies) { + cookieMap = new HashMap<>(cookies.size()); + addAll(cookies); + } + + @Override + public int size() { + return cookieMap.size(); + } + + @Override + public boolean isEmpty() { + return cookieMap.isEmpty(); + } + + @Override + public boolean contains(Object o) { + if (o instanceof String) { + return cookieMap.containsKey(o); + } + if (o instanceof Cookie) { + return cookieMap.containsValue(o); + } + return false; + } + + @Override + public Iterator iterator() { + return cookieMap.values().iterator(); + } + + public Cookie[] toArray() { + Cookie[] cookies = new Cookie[cookieMap.size()]; + return toArray(cookies); + } + + @Override + public T[] toArray(T[] ts) { + return cookieMap.values().toArray(ts); + } + + @Override + public boolean add(Cookie cookie) { + if (cookie == null) { + return false; + } + cookieMap.put(cookie.getName(), cookie); + return true; + } + + @Override + public boolean remove(Object o) { + if (o instanceof String) { + return cookieMap.remove((String)o) != null; + } + if (o instanceof Cookie) { + Cookie c = (Cookie)o; + return cookieMap.remove(c.getName()) != null; + } + return false; + } + + public Cookie get(String name) { + return cookieMap.get(name); + } + + @Override + public boolean containsAll(Collection collection) { + for(Object o : collection) { + if (!contains(o)) { + return false; + } + } + return true; + } + + @Override + public boolean addAll(Collection collection) { + boolean result = false; + for(Cookie cookie : collection) { + result|= add(cookie); + } + return result; + } + + @Override + public boolean removeAll(Collection collection) { + boolean result = false; + for(Object cookie : collection) { + result|= remove(cookie); + } + return result; + } + + @Override + public boolean retainAll(Collection collection) { + boolean result = false; + Iterator> it = cookieMap.entrySet().iterator(); + while(it.hasNext()) { + Map.Entry e = it.next(); + if (!collection.contains(e.getKey()) && !collection.contains(e.getValue())) { + it.remove(); + result = true; + } + } + return result; + } + + @Override + public void clear() { + cookieMap.clear(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/CookieTokenExtractor.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/CookieTokenExtractor.java new file mode 100644 index 0000000000..0128d80c46 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/CookieTokenExtractor.java @@ -0,0 +1,33 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import org.springframework.security.oauth2.provider.authentication.BearerTokenExtractor; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; + +/** + * Extracts the access token from a cookie. + * Falls back to a BearerTokenExtractor extracting information from the Authorization header, if no + * cookie was found. + */ +public class CookieTokenExtractor extends BearerTokenExtractor { + /** + * Extract the JWT access token from the request, if present. + * If not, then it falls back to the {@link BearerTokenExtractor} behaviour. + * + * @param request the request containing the cookies. + * @return the extracted JWT token; or null. + */ + @Override + protected String extractToken(HttpServletRequest request) { + String result; + Cookie accessTokenCookie = OAuth2CookieHelper.getAccessTokenCookie(request); + if (accessTokenCookie != null) { + result = accessTokenCookie.getValue(); + } else { + result = super.extractToken(request); + } + return result; + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/CookiesHttpServletRequestWrapper.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/CookiesHttpServletRequestWrapper.java new file mode 100644 index 0000000000..98fa68188f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/CookiesHttpServletRequestWrapper.java @@ -0,0 +1,31 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; + +/** + * A request mapper used to modify the cookies in the original request. + * This is needed such that we can modify the cookies of the request during a token refresh. + * The token refresh happens before authentication by the OAuth2AuthenticationProcessingFilter + * so we must make sure that further in the filter chain, we have the new cookies and not the expired/missing ones. + */ +class CookiesHttpServletRequestWrapper extends HttpServletRequestWrapper { + /** + * The new cookies of the request. Use these instead of the ones found in the wrapped request. + */ + private Cookie[] cookies; + + public CookiesHttpServletRequestWrapper(HttpServletRequest request, Cookie[] cookies) { + super(request); + this.cookies = cookies; + } + + /** + * Return the modified cookies instead of the original ones. + */ + @Override + public Cookie[] getCookies() { + return cookies; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2AuthenticationService.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2AuthenticationService.java new file mode 100644 index 0000000000..ba8dcaf988 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2AuthenticationService.java @@ -0,0 +1,163 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import com.baeldung.jhipster.gateway.web.rest.errors.InvalidPasswordException; +import io.github.jhipster.security.PersistentTokenCache; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.ResponseEntity; +import org.springframework.security.oauth2.common.OAuth2AccessToken; +import org.springframework.web.client.HttpClientErrorException; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Map; + +/** + * Manages authentication cases for OAuth2 updating the cookies holding access and refresh tokens accordingly. + *

+ * It can authenticate users, refresh the token cookies should they expire and log users out. + */ +public class OAuth2AuthenticationService { + + private final Logger log = LoggerFactory.getLogger(OAuth2AuthenticationService.class); + + /** + * Number of milliseconds to cache refresh token grants so we don't have to repeat them in case of parallel requests. + */ + private static final long REFRESH_TOKEN_VALIDITY_MILLIS = 10000l; + + /** + * Used to contact the OAuth2 token endpoint. + */ + private final OAuth2TokenEndpointClient authorizationClient; + + /** + * Helps us with cookie handling. + */ + private final OAuth2CookieHelper cookieHelper; + + /** + * Caches Refresh grant results for a refresh token value so we can reuse them. + * This avoids hammering UAA in case of several multi-threaded requests arriving in parallel. + */ + private final PersistentTokenCache recentlyRefreshed; + + public OAuth2AuthenticationService(OAuth2TokenEndpointClient authorizationClient, OAuth2CookieHelper cookieHelper) { + this.authorizationClient = authorizationClient; + this.cookieHelper = cookieHelper; + recentlyRefreshed = new PersistentTokenCache<>(REFRESH_TOKEN_VALIDITY_MILLIS); + } + + /** + * Authenticate the user by username and password. + * + * @param request the request coming from the client. + * @param response the response going back to the server. + * @param params the params holding the username, password and rememberMe. + * @return the OAuth2AccessToken as a ResponseEntity. Will return OK (200), if successful. + * If the UAA cannot authenticate the user, the status code returned by UAA will be returned. + */ + public ResponseEntity authenticate(HttpServletRequest request, HttpServletResponse response, + Map params) { + try { + String username = params.get("username"); + String password = params.get("password"); + boolean rememberMe = Boolean.valueOf(params.get("rememberMe")); + OAuth2AccessToken accessToken = authorizationClient.sendPasswordGrant(username, password); + OAuth2Cookies cookies = new OAuth2Cookies(); + cookieHelper.createCookies(request, accessToken, rememberMe, cookies); + cookies.addCookiesTo(response); + if (log.isDebugEnabled()) { + log.debug("successfully authenticated user {}", params.get("username")); + } + return ResponseEntity.ok(accessToken); + } catch (HttpClientErrorException ex) { + log.error("failed to get OAuth2 tokens from UAA", ex); + throw new InvalidPasswordException(); + } + } + + /** + * Try to refresh the access token using the refresh token provided as cookie. + * Note that browsers typically send multiple requests in parallel which means the access token + * will be expired on multiple threads. We don't want to send multiple requests to UAA though, + * so we need to cache results for a certain duration and synchronize threads to avoid sending + * multiple requests in parallel. + * + * @param request the request potentially holding the refresh token. + * @param response the response setting the new cookies (if refresh was successful). + * @param refreshCookie the refresh token cookie. Must not be null. + * @return the new servlet request containing the updated cookies for relaying downstream. + */ + public HttpServletRequest refreshToken(HttpServletRequest request, HttpServletResponse response, Cookie + refreshCookie) { + //check if non-remember-me session has expired + if (cookieHelper.isSessionExpired(refreshCookie)) { + log.info("session has expired due to inactivity"); + logout(request, response); //logout to clear cookies in browser + return stripTokens(request); //don't include cookies downstream + } + OAuth2Cookies cookies = getCachedCookies(refreshCookie.getValue()); + synchronized (cookies) { + //check if we have a result from another thread already + if (cookies.getAccessTokenCookie() == null) { //no, we are first! + //send a refresh_token grant to UAA, getting new tokens + String refreshCookieValue = OAuth2CookieHelper.getRefreshTokenValue(refreshCookie); + OAuth2AccessToken accessToken = authorizationClient.sendRefreshGrant(refreshCookieValue); + boolean rememberMe = OAuth2CookieHelper.isRememberMe(refreshCookie); + cookieHelper.createCookies(request, accessToken, rememberMe, cookies); + //add cookies to response to update browser + cookies.addCookiesTo(response); + } else { + log.debug("reusing cached refresh_token grant"); + } + //replace cookies in original request with new ones + CookieCollection requestCookies = new CookieCollection(request.getCookies()); + requestCookies.add(cookies.getAccessTokenCookie()); + requestCookies.add(cookies.getRefreshTokenCookie()); + return new CookiesHttpServletRequestWrapper(request, requestCookies.toArray()); + } + } + + /** + * Get the result from the cache in a thread-safe manner. + * + * @param refreshTokenValue the refresh token for which we want the results. + * @return a RefreshGrantResult for that token. This will either be empty, if we are the first one to do the + * request, + * or contain some results already, if another thread already handled the grant for us. + */ + private OAuth2Cookies getCachedCookies(String refreshTokenValue) { + synchronized (recentlyRefreshed) { + OAuth2Cookies ctx = recentlyRefreshed.get(refreshTokenValue); + if (ctx == null) { + ctx = new OAuth2Cookies(); + recentlyRefreshed.put(refreshTokenValue, ctx); + } + return ctx; + } + } + + /** + * Logs the user out by clearing all cookies. + * + * @param httpServletRequest the request containing the Cookies. + * @param httpServletResponse the response used to clear them. + */ + public void logout(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { + cookieHelper.clearCookies(httpServletRequest, httpServletResponse); + } + + /** + * Strips token cookies preventing them from being used further down the chain. + * For example, the OAuth2 client won't checked them and they won't be relayed to other services. + * + * @param httpServletRequest the incoming request. + * @return the request to replace it with which has the tokens stripped. + */ + public HttpServletRequest stripTokens(HttpServletRequest httpServletRequest) { + Cookie[] cookies = cookieHelper.stripCookies(httpServletRequest.getCookies()); + return new CookiesHttpServletRequestWrapper(httpServletRequest, cookies); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2CookieHelper.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2CookieHelper.java new file mode 100644 index 0000000000..7250fbd219 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2CookieHelper.java @@ -0,0 +1,334 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import com.baeldung.jhipster.gateway.config.oauth2.OAuth2Properties; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.json.JsonParser; +import org.springframework.boot.json.JsonParserFactory; +import org.springframework.security.jwt.Jwt; +import org.springframework.security.jwt.JwtHelper; +import org.springframework.security.oauth2.common.OAuth2AccessToken; +import org.springframework.security.oauth2.common.OAuth2RefreshToken; +import org.springframework.security.oauth2.common.exceptions.InvalidTokenException; +import org.springframework.security.oauth2.provider.token.AccessTokenConverter; +import org.springframework.util.StringUtils; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import static org.apache.http.conn.util.InetAddressUtils.isIPv4Address; +import static org.apache.http.conn.util.InetAddressUtils.isIPv6Address; +import org.apache.http.conn.util.PublicSuffixMatcher; +import org.apache.http.conn.util.PublicSuffixMatcherLoader; + +/** + * Helps with OAuth2 cookie handling. + */ +public class OAuth2CookieHelper { + /** + * Name of the access token cookie. + */ + public static final String ACCESS_TOKEN_COOKIE = OAuth2AccessToken.ACCESS_TOKEN; + /** + * Name of the refresh token cookie in case of remember me. + */ + public static final String REFRESH_TOKEN_COOKIE = OAuth2AccessToken.REFRESH_TOKEN; + /** + * Name of the session-only refresh token in case the user did not check remember me. + */ + public static final String SESSION_TOKEN_COOKIE = "session_token"; + /** + * The names of the Cookies we set. + */ + private static final List COOKIE_NAMES = Arrays.asList(ACCESS_TOKEN_COOKIE, REFRESH_TOKEN_COOKIE, + SESSION_TOKEN_COOKIE); + /** + * Number of seconds to expire refresh token cookies before the enclosed token expires. + * This makes sure we don't run into race conditions where the cookie is still there but + * expires while we process it. + */ + private static final long REFRESH_TOKEN_EXPIRATION_WINDOW_SECS = 3L; + + /** + * Public suffix matcher (to strip private subdomains off cookie scope). + */ + PublicSuffixMatcher suffixMatcher; + + private final Logger log = LoggerFactory.getLogger(OAuth2CookieHelper.class); + + private OAuth2Properties oAuth2Properties; + + /** + * Used to parse JWT claims. + */ + private JsonParser jsonParser = JsonParserFactory.getJsonParser(); + + public OAuth2CookieHelper(OAuth2Properties oAuth2Properties) { + this.oAuth2Properties = oAuth2Properties; + + // Alternatively, always get an up-to-date list by passing an URL + this.suffixMatcher = PublicSuffixMatcherLoader.getDefault(); + } + + public static Cookie getAccessTokenCookie(HttpServletRequest request) { + return getCookie(request, ACCESS_TOKEN_COOKIE); + } + + public static Cookie getRefreshTokenCookie(HttpServletRequest request) { + Cookie cookie = getCookie(request, REFRESH_TOKEN_COOKIE); + if (cookie == null) { + cookie = getCookie(request, SESSION_TOKEN_COOKIE); + } + return cookie; + } + + + /** + * Get a cookie by name from the given servlet request. + * + * @param request the request containing the cookie. + * @param cookieName the case-sensitive name of the cookie to get. + * @return the resulting Cookie; or null, if not found. + */ + private static Cookie getCookie(HttpServletRequest request, String cookieName) { + if (request.getCookies() != null) { + for (Cookie cookie : request.getCookies()) { + if (cookie.getName().equals(cookieName)) { + String value = cookie.getValue(); + if (StringUtils.hasText(value)) { + return cookie; + } + } + } + } + return null; + } + + /** + * Create cookies using the provided values. + * + * @param request the request we are handling. + * @param accessToken the access token and enclosed refresh token for our cookies. + * @param rememberMe whether the user had originally checked "remember me". + * @param result will get the resulting cookies set. + */ + public void createCookies(HttpServletRequest request, OAuth2AccessToken accessToken, boolean rememberMe, + OAuth2Cookies result) { + String domain = getCookieDomain(request); + log.debug("creating cookies for domain {}", domain); + Cookie accessTokenCookie = new Cookie(ACCESS_TOKEN_COOKIE, accessToken.getValue()); + setCookieProperties(accessTokenCookie, request.isSecure(), domain); + log.debug("created access token cookie '{}'", accessTokenCookie.getName()); + + OAuth2RefreshToken refreshToken = accessToken.getRefreshToken(); + Cookie refreshTokenCookie = createRefreshTokenCookie(refreshToken, rememberMe); + setCookieProperties(refreshTokenCookie, request.isSecure(), domain); + log.debug("created refresh token cookie '{}', age: {}", refreshTokenCookie.getName(), refreshTokenCookie + .getMaxAge()); + + result.setCookies(accessTokenCookie, refreshTokenCookie); + } + + /** + * Create a cookie out of the given refresh token. + * Refresh token cookies contain the base64 encoded refresh token (a JWT token). + * They also contain a hint whether the refresh token was for remember me or not. + * If not, then the cookie will be prefixed by the timestamp it was created at followed by a pipe '|'. + * This gives us the chance to expire session cookies regardless of the token duration. + */ + private Cookie createRefreshTokenCookie(OAuth2RefreshToken refreshToken, boolean rememberMe) { + int maxAge = -1; + String name = SESSION_TOKEN_COOKIE; + String value = refreshToken.getValue(); + if (rememberMe) { + name = REFRESH_TOKEN_COOKIE; + //get expiration in seconds from the token's "exp" claim + Integer exp = getClaim(refreshToken.getValue(), AccessTokenConverter.EXP, Integer.class); + if (exp != null) { + int now = (int) (System.currentTimeMillis() / 1000L); + maxAge = exp - now; + log.debug("refresh token valid for another {} secs", maxAge); + //let cookie expire a bit earlier than the token to avoid race conditions + maxAge -= REFRESH_TOKEN_EXPIRATION_WINDOW_SECS; + } + } + Cookie refreshTokenCookie = new Cookie(name, value); + refreshTokenCookie.setMaxAge(maxAge); + return refreshTokenCookie; + } + + /** + * Returns true if the refresh token cookie was set with remember me checked. + * We can recognize this by the name of the cookie. + * + * @param refreshTokenCookie the cookie holding the refresh token. + * @return true, if it was set persistently (i.e. for "remember me"). + */ + public static boolean isRememberMe(Cookie refreshTokenCookie) { + return refreshTokenCookie.getName().equals(REFRESH_TOKEN_COOKIE); + } + + /** + * Extracts the refresh token from the refresh token cookie. + * Since we encode additional information into the cookie, this needs to be called to get + * hold of the enclosed JWT. + * + * @param refreshCookie the cookie we store the value in. + * @return the refresh JWT from the cookie. + */ + public static String getRefreshTokenValue(Cookie refreshCookie) { + String value = refreshCookie.getValue(); + int i = value.indexOf('|'); + if (i > 0) { + return value.substring(i + 1); + } + return value; + } + + /** + * Checks if the refresh token session has expired. + * Only makes sense for non-persistent cookies, i.e. when remember me was not checked. + * The motivation for this is that we want to throw out a user after a while if he's inactive. + * We cannot do this via refresh token validity because that one is also used for remember me. + * + * @param refreshCookie the refresh token cookie to check. + * @return true, if the session is expired. + */ + public boolean isSessionExpired(Cookie refreshCookie) { + if (isRememberMe(refreshCookie)) { //no session expiration for "remember me" + return false; + } + //read non-remember-me session length in secs + int validity = oAuth2Properties.getWebClientConfiguration().getSessionTimeoutInSeconds(); + if (validity < 0) { //no session expiration configured + return false; + } + Integer iat = getClaim(refreshCookie.getValue(), "iat", Integer.class); + if (iat == null) { //token creating timestamp in secs is missing, session does not expire + return false; + } + int now = (int) (System.currentTimeMillis() / 1000L); + int sessionDuration = now - iat; + log.debug("session duration {} secs, will timeout at {}", sessionDuration, validity); + return sessionDuration > validity; //session has expired + } + + /** + * Retrieve the given claim from the given token. + * + * @param refreshToken the JWT token to examine. + * @param claimName name of the claim to get. + * @param clazz the Class we expect to find there. + * @return the desired claim. + * @throws InvalidTokenException if we cannot find the claim in the token or it is of wrong type. + */ + @SuppressWarnings("unchecked") + private T getClaim(String refreshToken, String claimName, Class clazz) { + Jwt jwt = JwtHelper.decode(refreshToken); + String claims = jwt.getClaims(); + Map claimsMap = jsonParser.parseMap(claims); + Object claimValue = claimsMap.get(claimName); + if (claimValue == null) { + return null; + } + if (!clazz.isAssignableFrom(claimValue.getClass())) { + throw new InvalidTokenException("claim is not of expected type: " + claimName); + } + return (T) claimValue; + } + + /** + * Set cookie properties of access and refresh tokens. + * + * @param cookie the cookie to modify. + * @param isSecure whether it is coming from a secure request. + * @param domain the domain for which the cookie is valid. If null, then will fall back to default. + */ + private void setCookieProperties(Cookie cookie, boolean isSecure, String domain) { + cookie.setHttpOnly(true); + cookie.setPath("/"); + cookie.setSecure(isSecure); //if the request comes per HTTPS set the secure option on the cookie + if (domain != null) { + cookie.setDomain(domain); + } + } + + /** + * Logs the user out by clearing all cookies. + * + * @param httpServletRequest the request containing the Cookies. + * @param httpServletResponse the response used to clear them. + */ + public void clearCookies(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) { + String domain = getCookieDomain(httpServletRequest); + for (String cookieName : COOKIE_NAMES) { + clearCookie(httpServletRequest, httpServletResponse, domain, cookieName); + } + } + + private void clearCookie(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, + String domain, String cookieName) { + Cookie cookie = new Cookie(cookieName, ""); + setCookieProperties(cookie, httpServletRequest.isSecure(), domain); + cookie.setMaxAge(0); + httpServletResponse.addCookie(cookie); + log.debug("clearing cookie {}", cookie.getName()); + } + + /** + * Returns the top level domain of the server from the request. This is used to limit the Cookie + * to the top domain instead of the full domain name. + *

+ * A lot of times, individual gateways of the same domain get their own subdomain but authentication + * shall work across all subdomains of the top level domain. + *

+ * For example, when sending a request to app1.domain.com, + * this returns .domain.com. + * + * @param request the HTTP request we received from the client. + * @return the top level domain to set the cookies for. + * Returns null if the domain is not under a public suffix (.com, .co.uk), e.g. for localhost. + */ + private String getCookieDomain(HttpServletRequest request) { + String domain = oAuth2Properties.getWebClientConfiguration().getCookieDomain(); + if (domain != null) { + return domain; + } + // if not explicitly defined, use top-level domain + domain = request.getServerName().toLowerCase(); + // strip off leading www. + if (domain.startsWith("www.")) { + domain = domain.substring(4); + } + // if it isn't an IP address + if (!isIPv4Address(domain) && !isIPv6Address(domain)) { + // strip off private subdomains, leaving public TLD only + String suffix = suffixMatcher.getDomainRoot(domain); + if (suffix != null && !suffix.equals(domain)) { + // preserve leading dot + return "." + suffix; + } + } + // no top-level domain, stick with default domain + return null; + } + + /** + * Strip our token cookies from the array. + * + * @param cookies the cookies we receive as input. + * @return the new cookie array without our tokens. + */ + Cookie[] stripCookies(Cookie[] cookies) { + CookieCollection cc = new CookieCollection(cookies); + if (cc.removeAll(COOKIE_NAMES)) { + return cc.toArray(); + } + return cookies; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2Cookies.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2Cookies.java new file mode 100644 index 0000000000..5dfc898b24 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2Cookies.java @@ -0,0 +1,35 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletResponse; + +/** + * Holds the access token and refresh token cookies. + */ +class OAuth2Cookies { + private Cookie accessTokenCookie; + private Cookie refreshTokenCookie; + + public Cookie getAccessTokenCookie() { + return accessTokenCookie; + } + + public Cookie getRefreshTokenCookie() { + return refreshTokenCookie; + } + + public void setCookies(Cookie accessTokenCookie, Cookie refreshTokenCookie) { + this.accessTokenCookie = accessTokenCookie; + this.refreshTokenCookie = refreshTokenCookie; + } + + /** + * Add the access token and refresh token as cookies to the response after successful authentication. + * + * @param response the response to add them to. + */ + void addCookiesTo(HttpServletResponse response) { + response.addCookie(getAccessTokenCookie()); + response.addCookie(getRefreshTokenCookie()); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2SignatureVerifierClient.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2SignatureVerifierClient.java new file mode 100644 index 0000000000..5c07b38b8a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2SignatureVerifierClient.java @@ -0,0 +1,23 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import org.springframework.security.jwt.crypto.sign.SignatureVerifier; + +/** + * Abstracts how to create a SignatureVerifier to verify JWT tokens with a public key. + * Implementations will have to contact the OAuth2 authorization server to fetch the public key + * and use it to build a SignatureVerifier in a server specific way. + * + * @see UaaSignatureVerifierClient + */ +public interface OAuth2SignatureVerifierClient { + /** + * Returns the SignatureVerifier used to verify JWT tokens. + * Fetches the public key from the Authorization server to create + * this verifier. + * + * @return the new verifier used to verify JWT signatures. + * Will be null if we cannot contact the token endpoint. + * @throws Exception if we could not create a SignatureVerifier or contact the token endpoint. + */ + SignatureVerifier getSignatureVerifier() throws Exception; +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2TokenEndpointClient.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2TokenEndpointClient.java new file mode 100644 index 0000000000..9a68d4e93f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2TokenEndpointClient.java @@ -0,0 +1,32 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import org.springframework.security.oauth2.common.OAuth2AccessToken; + +/** + * Client talking to an OAuth2 Authorization server token endpoint. + * + * @see UaaTokenEndpointClient + * @see OAuth2TokenEndpointClientAdapter + */ +public interface OAuth2TokenEndpointClient { + /** + * Send a password grant to the token endpoint. + * + * @param username the username to authenticate. + * @param password his password. + * @return the access token and enclosed refresh token received from the token endpoint. + * @throws org.springframework.security.oauth2.common.exceptions.ClientAuthenticationException + * if we cannot contact the token endpoint. + */ + OAuth2AccessToken sendPasswordGrant(String username, String password); + + /** + * Send a refresh_token grant to the token endpoint. + * + * @param refreshTokenValue the refresh token used to get new tokens. + * @return the new access/refresh token pair. + * @throws org.springframework.security.oauth2.common.exceptions.ClientAuthenticationException + * if we cannot contact the token endpoint. + */ + OAuth2AccessToken sendRefreshGrant(String refreshTokenValue); +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2TokenEndpointClientAdapter.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2TokenEndpointClientAdapter.java new file mode 100644 index 0000000000..5506ce895c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2TokenEndpointClientAdapter.java @@ -0,0 +1,120 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import com.baeldung.jhipster.gateway.config.oauth2.OAuth2Properties; +import io.github.jhipster.config.JHipsterProperties; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.security.oauth2.common.OAuth2AccessToken; +import org.springframework.security.oauth2.common.exceptions.InvalidClientException; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestTemplate; + +/** + * Default base class for an OAuth2TokenEndpointClient. + * Individual implementations for a particular OAuth2 provider can use this as a starting point. + */ +public abstract class OAuth2TokenEndpointClientAdapter implements OAuth2TokenEndpointClient { + private final Logger log = LoggerFactory.getLogger(OAuth2TokenEndpointClientAdapter.class); + protected final RestTemplate restTemplate; + protected final JHipsterProperties jHipsterProperties; + protected final OAuth2Properties oAuth2Properties; + + public OAuth2TokenEndpointClientAdapter(RestTemplate restTemplate, JHipsterProperties jHipsterProperties, OAuth2Properties oAuth2Properties) { + this.restTemplate = restTemplate; + this.jHipsterProperties = jHipsterProperties; + this.oAuth2Properties = oAuth2Properties; + } + + /** + * Sends a password grant to the token endpoint. + * + * @param username the username to authenticate. + * @param password his password. + * @return the access token. + */ + @Override + public OAuth2AccessToken sendPasswordGrant(String username, String password) { + HttpHeaders reqHeaders = new HttpHeaders(); + reqHeaders.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + MultiValueMap formParams = new LinkedMultiValueMap<>(); + formParams.set("username", username); + formParams.set("password", password); + formParams.set("grant_type", "password"); + addAuthentication(reqHeaders, formParams); + HttpEntity> entity = new HttpEntity<>(formParams, reqHeaders); + log.debug("contacting OAuth2 token endpoint to login user: {}", username); + ResponseEntity + responseEntity = restTemplate.postForEntity(getTokenEndpoint(), entity, OAuth2AccessToken.class); + if (responseEntity.getStatusCode() != HttpStatus.OK) { + log.debug("failed to authenticate user with OAuth2 token endpoint, status: {}", responseEntity.getStatusCodeValue()); + throw new HttpClientErrorException(responseEntity.getStatusCode()); + } + OAuth2AccessToken accessToken = responseEntity.getBody(); + return accessToken; + } + + /** + * Sends a refresh grant to the token endpoint using the current refresh token to obtain new tokens. + * + * @param refreshTokenValue the refresh token to use to obtain new tokens. + * @return the new, refreshed access token. + */ + @Override + public OAuth2AccessToken sendRefreshGrant(String refreshTokenValue) { + MultiValueMap params = new LinkedMultiValueMap<>(); + params.add("grant_type", "refresh_token"); + params.add("refresh_token", refreshTokenValue); + HttpHeaders headers = new HttpHeaders(); + addAuthentication(headers, params); + HttpEntity> entity = new HttpEntity<>(params, headers); + log.debug("contacting OAuth2 token endpoint to refresh OAuth2 JWT tokens"); + ResponseEntity responseEntity = restTemplate.postForEntity(getTokenEndpoint(), entity, + OAuth2AccessToken.class); + if (responseEntity.getStatusCode() != HttpStatus.OK) { + log.debug("failed to refresh tokens: {}", responseEntity.getStatusCodeValue()); + throw new HttpClientErrorException(responseEntity.getStatusCode()); + } + OAuth2AccessToken accessToken = responseEntity.getBody(); + log.info("refreshed OAuth2 JWT cookies using refresh_token grant"); + return accessToken; + } + + protected abstract void addAuthentication(HttpHeaders reqHeaders, MultiValueMap formParams); + + protected String getClientSecret() { + String clientSecret = oAuth2Properties.getWebClientConfiguration().getSecret(); + if (clientSecret == null) { + throw new InvalidClientException("no client-secret configured in application properties"); + } + return clientSecret; + } + + protected String getClientId() { + String clientId = oAuth2Properties.getWebClientConfiguration().getClientId(); + if (clientId == null) { + throw new InvalidClientException("no client-id configured in application properties"); + } + return clientId; + } + + /** + * Returns the configured OAuth2 token endpoint URI. + * + * @return the OAuth2 token endpoint URI. + */ + protected String getTokenEndpoint() { + String tokenEndpointUrl = jHipsterProperties.getSecurity().getClientAuthorization().getAccessTokenUri(); + if (tokenEndpointUrl == null) { + throw new InvalidClientException("no token endpoint configured in application properties"); + } + return tokenEndpointUrl; + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/UaaSignatureVerifierClient.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/UaaSignatureVerifierClient.java new file mode 100644 index 0000000000..1a4ff10852 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/UaaSignatureVerifierClient.java @@ -0,0 +1,63 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import com.baeldung.jhipster.gateway.config.oauth2.OAuth2Properties; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.cloud.client.discovery.DiscoveryClient; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.security.jwt.crypto.sign.RsaVerifier; +import org.springframework.security.jwt.crypto.sign.SignatureVerifier; +import org.springframework.security.oauth2.common.exceptions.InvalidClientException; +import org.springframework.stereotype.Component; +import org.springframework.web.client.RestTemplate; + +import java.util.Map; + +/** + * Client fetching the public key from UAA to create a SignatureVerifier. + */ +@Component +public class UaaSignatureVerifierClient implements OAuth2SignatureVerifierClient { + private final Logger log = LoggerFactory.getLogger(UaaSignatureVerifierClient.class); + private final RestTemplate restTemplate; + protected final OAuth2Properties oAuth2Properties; + + public UaaSignatureVerifierClient(DiscoveryClient discoveryClient, @Qualifier("loadBalancedRestTemplate") RestTemplate restTemplate, + OAuth2Properties oAuth2Properties) { + this.restTemplate = restTemplate; + this.oAuth2Properties = oAuth2Properties; + // Load available UAA servers + discoveryClient.getServices(); + } + + /** + * Fetches the public key from the UAA. + * + * @return the public key used to verify JWT tokens; or null. + */ + @Override + public SignatureVerifier getSignatureVerifier() throws Exception { + try { + HttpEntity request = new HttpEntity(new HttpHeaders()); + String key = (String) restTemplate + .exchange(getPublicKeyEndpoint(), HttpMethod.GET, request, Map.class).getBody() + .get("value"); + return new RsaVerifier(key); + } catch (IllegalStateException ex) { + log.warn("could not contact UAA to get public key"); + return null; + } + } + + /** Returns the configured endpoint URI to retrieve the public key. */ + private String getPublicKeyEndpoint() { + String tokenEndpointUrl = oAuth2Properties.getSignatureVerification().getPublicKeyEndpointUri(); + if (tokenEndpointUrl == null) { + throw new InvalidClientException("no token endpoint configured in application properties"); + } + return tokenEndpointUrl; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/UaaTokenEndpointClient.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/UaaTokenEndpointClient.java new file mode 100644 index 0000000000..01c8febdb2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/oauth2/UaaTokenEndpointClient.java @@ -0,0 +1,40 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import com.baeldung.jhipster.gateway.config.oauth2.OAuth2Properties; +import io.github.jhipster.config.JHipsterProperties; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.http.HttpHeaders; +import org.springframework.stereotype.Component; +import org.springframework.util.Base64Utils; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestTemplate; + +import java.nio.charset.StandardCharsets; + +/** + * Client talking to UAA's token endpoint to do different OAuth2 grants. + */ +@Component +public class UaaTokenEndpointClient extends OAuth2TokenEndpointClientAdapter implements OAuth2TokenEndpointClient { + + public UaaTokenEndpointClient(@Qualifier("loadBalancedRestTemplate") RestTemplate restTemplate, + JHipsterProperties jHipsterProperties, OAuth2Properties oAuth2Properties) { + super(restTemplate, jHipsterProperties, oAuth2Properties); + } + + @Override + protected void addAuthentication(HttpHeaders reqHeaders, MultiValueMap formParams) { + reqHeaders.add("Authorization", getAuthorizationHeader()); + } + + /** + * @return a Basic authorization header to be used to talk to UAA. + */ + protected String getAuthorizationHeader() { + String clientId = getClientId(); + String clientSecret = getClientSecret(); + String authorization = clientId + ":" + clientSecret; + return "Basic " + Base64Utils.encodeToString(authorization.getBytes(StandardCharsets.UTF_8)); + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/package-info.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/package-info.java new file mode 100644 index 0000000000..ae119e4f05 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/security/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring Security configuration. + */ +package com.baeldung.jhipster.gateway.security; diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/service/package-info.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/service/package-info.java new file mode 100644 index 0000000000..14fd609c71 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/service/package-info.java @@ -0,0 +1,4 @@ +/** + * Service layer beans. + */ +package com.baeldung.jhipster.gateway.service; diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/filter/RefreshTokenFilter.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/filter/RefreshTokenFilter.java new file mode 100644 index 0000000000..07ba790047 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/filter/RefreshTokenFilter.java @@ -0,0 +1,118 @@ +package com.baeldung.jhipster.gateway.web.filter; + +import com.baeldung.jhipster.gateway.security.oauth2.OAuth2AuthenticationService; +import com.baeldung.jhipster.gateway.security.oauth2.OAuth2CookieHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.oauth2.common.OAuth2AccessToken; +import org.springframework.security.oauth2.common.exceptions.ClientAuthenticationException; +import org.springframework.security.oauth2.common.exceptions.InvalidTokenException; +import org.springframework.security.oauth2.common.exceptions.UnauthorizedClientException; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.filter.GenericFilterBean; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * Filters incoming requests and refreshes the access token before it expires. + */ +public class RefreshTokenFilter extends GenericFilterBean { + /** + * Number of seconds before expiry to start refreshing access tokens so we don't run into race conditions when forwarding + * requests downstream. Otherwise, access tokens may still be valid when we check here but may then be expired + * when relayed to another microservice a wee bit later. + */ + private static final int REFRESH_WINDOW_SECS = 30; + + private final Logger log = LoggerFactory.getLogger(RefreshTokenFilter.class); + + /** + * The OAuth2AuthenticationService is doing the actual work. We are just a simple filter after all. + */ + private final OAuth2AuthenticationService authenticationService; + private final TokenStore tokenStore; + + public RefreshTokenFilter(OAuth2AuthenticationService authenticationService, TokenStore tokenStore) { + this.authenticationService = authenticationService; + this.tokenStore = tokenStore; + } + + /** + * Check access token cookie and refresh it, if it is either not present, expired or about to expire. + */ + @Override + public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) + throws IOException, ServletException { + HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest; + HttpServletResponse httpServletResponse = (HttpServletResponse) servletResponse; + try { + httpServletRequest = refreshTokensIfExpiring(httpServletRequest, httpServletResponse); + } catch (ClientAuthenticationException ex) { + log.warn("Security exception: could not refresh tokens", ex); + httpServletRequest = authenticationService.stripTokens(httpServletRequest); + } + filterChain.doFilter(httpServletRequest, servletResponse); + } + + /** + * Refresh the access and refresh tokens if they are about to expire. + * + * @param httpServletRequest the servlet request holding the current cookies. If no refresh cookie is present, + * then we are out of luck. + * @param httpServletResponse the servlet response that gets the new set-cookie headers, if they had to be + * refreshed. + * @return a new request to use downstream that contains the new cookies, if they had to be refreshed. + * @throws InvalidTokenException if the tokens could not be refreshed. + */ + public HttpServletRequest refreshTokensIfExpiring(HttpServletRequest httpServletRequest, HttpServletResponse + httpServletResponse) { + HttpServletRequest newHttpServletRequest = httpServletRequest; + //get access token from cookie + Cookie accessTokenCookie = OAuth2CookieHelper.getAccessTokenCookie(httpServletRequest); + if (mustRefreshToken(accessTokenCookie)) { //we either have no access token, or it is expired, or it is about to expire + //get the refresh token cookie and, if present, request new tokens + Cookie refreshCookie = OAuth2CookieHelper.getRefreshTokenCookie(httpServletRequest); + if (refreshCookie != null) { + try { + newHttpServletRequest = authenticationService.refreshToken(httpServletRequest, httpServletResponse, refreshCookie); + } catch (HttpClientErrorException ex) { + throw new UnauthorizedClientException("could not refresh OAuth2 token", ex); + } + } else if (accessTokenCookie != null) { + log.warn("access token found, but no refresh token, stripping them all"); + OAuth2AccessToken token = tokenStore.readAccessToken(accessTokenCookie.getValue()); + if (token.isExpired()) { + throw new InvalidTokenException("access token has expired, but there's no refresh token"); + } + } + } + return newHttpServletRequest; + } + + /** + * Check if we must refresh the access token. + * We must refresh it, if we either have no access token, or it is expired, or it is about to expire. + * + * @param accessTokenCookie the current access token. + * @return true, if it must be refreshed; false, otherwise. + */ + private boolean mustRefreshToken(Cookie accessTokenCookie) { + if (accessTokenCookie == null) { + return true; + } + OAuth2AccessToken token = tokenStore.readAccessToken(accessTokenCookie.getValue()); + //check if token is expired or about to expire + if (token.isExpired() || token.getExpiresIn() < REFRESH_WINDOW_SECS) { + return true; + } + return false; //access token is still fine + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/filter/RefreshTokenFilterConfigurer.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/filter/RefreshTokenFilterConfigurer.java new file mode 100644 index 0000000000..dda1da763a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/filter/RefreshTokenFilterConfigurer.java @@ -0,0 +1,36 @@ +package com.baeldung.jhipster.gateway.web.filter; + +import com.baeldung.jhipster.gateway.security.oauth2.OAuth2AuthenticationService; + +import org.springframework.security.config.annotation.SecurityConfigurerAdapter; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.security.web.DefaultSecurityFilterChain; + +/** + * Configures a RefreshTokenFilter to refresh access tokens if they are about to expire. + * + * @see RefreshTokenFilter + */ +public class RefreshTokenFilterConfigurer extends SecurityConfigurerAdapter { + /** + * RefreshTokenFilter needs the OAuth2AuthenticationService to refresh cookies using the refresh token. + */ + private OAuth2AuthenticationService authenticationService; + private final TokenStore tokenStore; + + public RefreshTokenFilterConfigurer(OAuth2AuthenticationService authenticationService, TokenStore tokenStore) { + this.authenticationService = authenticationService; + this.tokenStore = tokenStore; + } + + /** + * Install RefreshTokenFilter as a servlet Filter. + */ + @Override + public void configure(HttpSecurity http) throws Exception { + RefreshTokenFilter customFilter = new RefreshTokenFilter(authenticationService, tokenStore); + http.addFilterBefore(customFilter, OAuth2AuthenticationProcessingFilter.class); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/AuthResource.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/AuthResource.java new file mode 100644 index 0000000000..0a5d89b6d8 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/AuthResource.java @@ -0,0 +1,68 @@ +package com.baeldung.jhipster.gateway.web.rest; + +import com.codahale.metrics.annotation.Timed; +import com.baeldung.jhipster.gateway.security.oauth2.OAuth2AuthenticationService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.oauth2.common.OAuth2AccessToken; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Map; + +/** + * Authentication endpoint for web client. + * Used to authenticate a user using OAuth2 access tokens or log him out. + * + * @author markus.oellinger + */ +@RestController +@RequestMapping("/auth") +public class AuthResource { + + private final Logger log = LoggerFactory.getLogger(AuthResource.class); + + private OAuth2AuthenticationService authenticationService; + + public AuthResource(OAuth2AuthenticationService authenticationService) { + this.authenticationService = authenticationService; + } + + /** + * Authenticates a user setting the access and refresh token cookies. + * + * @param request the HttpServletRequest holding - among others - the headers passed from the client. + * @param response the HttpServletResponse getting the cookies set upon successful authentication. + * @param params the login params (username, password, rememberMe). + * @return the access token of the authenticated user. Will return an error code if it fails to authenticate the user. + */ + @RequestMapping(value = "/login", method = RequestMethod.POST, consumes = MediaType + .APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @Timed + public ResponseEntity authenticate(HttpServletRequest request, HttpServletResponse response, @RequestBody + Map params) { + return authenticationService.authenticate(request, response, params); + } + + /** + * Logout current user deleting his cookies. + * + * @param request the HttpServletRequest holding - among others - the headers passed from the client. + * @param response the HttpServletResponse getting the cookies set upon successful authentication. + * @return an empty response entity. + */ + @RequestMapping(value = "/logout", method = RequestMethod.POST) + @Timed + public ResponseEntity logout(HttpServletRequest request, HttpServletResponse response) { + log.info("logging out user {}", SecurityContextHolder.getContext().getAuthentication().getName()); + authenticationService.logout(request, response); + return ResponseEntity.noContent().build(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/GatewayResource.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/GatewayResource.java new file mode 100644 index 0000000000..13cd7d60ec --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/GatewayResource.java @@ -0,0 +1,54 @@ +package com.baeldung.jhipster.gateway.web.rest; + +import com.baeldung.jhipster.gateway.web.rest.vm.RouteVM; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.cloud.client.discovery.DiscoveryClient; +import org.springframework.cloud.netflix.zuul.filters.Route; +import org.springframework.cloud.netflix.zuul.filters.RouteLocator; +import org.springframework.http.*; +import org.springframework.security.access.annotation.Secured; +import com.baeldung.jhipster.gateway.security.AuthoritiesConstants; +import org.springframework.web.bind.annotation.*; + +import com.codahale.metrics.annotation.Timed; + +/** + * REST controller for managing Gateway configuration. + */ +@RestController +@RequestMapping("/api/gateway") +public class GatewayResource { + + private final RouteLocator routeLocator; + + private final DiscoveryClient discoveryClient; + + public GatewayResource(RouteLocator routeLocator, DiscoveryClient discoveryClient) { + this.routeLocator = routeLocator; + this.discoveryClient = discoveryClient; + } + + /** + * GET /routes : get the active routes. + * + * @return the ResponseEntity with status 200 (OK) and with body the list of routes + */ + @GetMapping("/routes") + @Timed + @Secured(AuthoritiesConstants.ADMIN) + public ResponseEntity> activeRoutes() { + List routes = routeLocator.getRoutes(); + List routeVMs = new ArrayList<>(); + routes.forEach(route -> { + RouteVM routeVM = new RouteVM(); + routeVM.setPath(route.getFullPath()); + routeVM.setServiceId(route.getId()); + routeVM.setServiceInstances(discoveryClient.getInstances(route.getLocation())); + routeVMs.add(routeVM); + }); + return new ResponseEntity<>(routeVMs, HttpStatus.OK); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/LogsResource.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/LogsResource.java new file mode 100644 index 0000000000..c631d57c02 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/LogsResource.java @@ -0,0 +1,39 @@ +package com.baeldung.jhipster.gateway.web.rest; + +import com.baeldung.jhipster.gateway.web.rest.vm.LoggerVM; + +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.LoggerContext; +import com.codahale.metrics.annotation.Timed; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * Controller for view and managing Log Level at runtime. + */ +@RestController +@RequestMapping("/management") +public class LogsResource { + + @GetMapping("/logs") + @Timed + public List getList() { + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + return context.getLoggerList() + .stream() + .map(LoggerVM::new) + .collect(Collectors.toList()); + } + + @PutMapping("/logs") + @ResponseStatus(HttpStatus.NO_CONTENT) + @Timed + public void changeLevel(@RequestBody LoggerVM jsonLogger) { + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel())); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/BadRequestAlertException.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/BadRequestAlertException.java new file mode 100644 index 0000000000..981b964c69 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/BadRequestAlertException.java @@ -0,0 +1,42 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +import java.net.URI; +import java.util.HashMap; +import java.util.Map; + +public class BadRequestAlertException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + private final String entityName; + + private final String errorKey; + + public BadRequestAlertException(String defaultMessage, String entityName, String errorKey) { + this(ErrorConstants.DEFAULT_TYPE, defaultMessage, entityName, errorKey); + } + + public BadRequestAlertException(URI type, String defaultMessage, String entityName, String errorKey) { + super(type, defaultMessage, Status.BAD_REQUEST, null, null, null, getAlertParameters(entityName, errorKey)); + this.entityName = entityName; + this.errorKey = errorKey; + } + + public String getEntityName() { + return entityName; + } + + public String getErrorKey() { + return errorKey; + } + + private static Map getAlertParameters(String entityName, String errorKey) { + Map parameters = new HashMap<>(); + parameters.put("message", "error." + errorKey); + parameters.put("params", entityName); + return parameters; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/CustomParameterizedException.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/CustomParameterizedException.java new file mode 100644 index 0000000000..640e80b911 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/CustomParameterizedException.java @@ -0,0 +1,54 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; + +import java.util.HashMap; +import java.util.Map; + +import static org.zalando.problem.Status.BAD_REQUEST; + +/** + * Custom, parameterized exception, which can be translated on the client side. + * For example: + * + *

+ * throw new CustomParameterizedException("myCustomError", "hello", "world");
+ * 
+ * + * Can be translated with: + * + *
+ * "error.myCustomError" :  "The server says {{param0}} to {{param1}}"
+ * 
+ */ +public class CustomParameterizedException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + private static final String PARAM = "param"; + + public CustomParameterizedException(String message, String... params) { + this(message, toParamMap(params)); + } + + public CustomParameterizedException(String message, Map paramMap) { + super(ErrorConstants.PARAMETERIZED_TYPE, "Parameterized Exception", BAD_REQUEST, null, null, null, toProblemParameters(message, paramMap)); + } + + public static Map toParamMap(String... params) { + Map paramMap = new HashMap<>(); + if (params != null && params.length > 0) { + for (int i = 0; i < params.length; i++) { + paramMap.put(PARAM + i, params[i]); + } + } + return paramMap; + } + + public static Map toProblemParameters(String message, Map paramMap) { + Map parameters = new HashMap<>(); + parameters.put("message", message); + parameters.put("params", paramMap); + return parameters; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/EmailAlreadyUsedException.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/EmailAlreadyUsedException.java new file mode 100644 index 0000000000..37df808e98 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/EmailAlreadyUsedException.java @@ -0,0 +1,10 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +public class EmailAlreadyUsedException extends BadRequestAlertException { + + private static final long serialVersionUID = 1L; + + public EmailAlreadyUsedException() { + super(ErrorConstants.EMAIL_ALREADY_USED_TYPE, "Email is already in use!", "userManagement", "emailexists"); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/EmailNotFoundException.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/EmailNotFoundException.java new file mode 100644 index 0000000000..42a3bad8bf --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/EmailNotFoundException.java @@ -0,0 +1,13 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +public class EmailNotFoundException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + public EmailNotFoundException() { + super(ErrorConstants.EMAIL_NOT_FOUND_TYPE, "Email address not registered", Status.BAD_REQUEST); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/ErrorConstants.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/ErrorConstants.java new file mode 100644 index 0000000000..15c9755956 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/ErrorConstants.java @@ -0,0 +1,21 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +import java.net.URI; + +public final class ErrorConstants { + + public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure"; + public static final String ERR_VALIDATION = "error.validation"; + public static final String PROBLEM_BASE_URL = "https://www.jhipster.tech/problem"; + public static final URI DEFAULT_TYPE = URI.create(PROBLEM_BASE_URL + "/problem-with-message"); + public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create(PROBLEM_BASE_URL + "/constraint-violation"); + public static final URI PARAMETERIZED_TYPE = URI.create(PROBLEM_BASE_URL + "/parameterized"); + public static final URI ENTITY_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/entity-not-found"); + public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password"); + public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used"); + public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used"); + public static final URI EMAIL_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-found"); + + private ErrorConstants() { + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/ExceptionTranslator.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/ExceptionTranslator.java new file mode 100644 index 0000000000..d5c9e577a6 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/ExceptionTranslator.java @@ -0,0 +1,107 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +import com.baeldung.jhipster.gateway.web.rest.util.HeaderUtil; + +import org.springframework.dao.ConcurrencyFailureException; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.context.request.NativeWebRequest; +import org.zalando.problem.DefaultProblem; +import org.zalando.problem.Problem; +import org.zalando.problem.ProblemBuilder; +import org.zalando.problem.Status; +import org.zalando.problem.spring.web.advice.ProblemHandling; +import org.zalando.problem.violations.ConstraintViolationProblem; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.stream.Collectors; + +/** + * Controller advice to translate the server side exceptions to client-friendly json structures. + * The error response follows RFC7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807) + */ +@ControllerAdvice +public class ExceptionTranslator implements ProblemHandling { + + /** + * Post-process the Problem payload to add the message key for the front-end if needed + */ + @Override + public ResponseEntity process(@Nullable ResponseEntity entity, NativeWebRequest request) { + if (entity == null) { + return entity; + } + Problem problem = entity.getBody(); + if (!(problem instanceof ConstraintViolationProblem || problem instanceof DefaultProblem)) { + return entity; + } + ProblemBuilder builder = Problem.builder() + .withType(Problem.DEFAULT_TYPE.equals(problem.getType()) ? ErrorConstants.DEFAULT_TYPE : problem.getType()) + .withStatus(problem.getStatus()) + .withTitle(problem.getTitle()) + .with("path", request.getNativeRequest(HttpServletRequest.class).getRequestURI()); + + if (problem instanceof ConstraintViolationProblem) { + builder + .with("violations", ((ConstraintViolationProblem) problem).getViolations()) + .with("message", ErrorConstants.ERR_VALIDATION); + } else { + builder + .withCause(((DefaultProblem) problem).getCause()) + .withDetail(problem.getDetail()) + .withInstance(problem.getInstance()); + problem.getParameters().forEach(builder::with); + if (!problem.getParameters().containsKey("message") && problem.getStatus() != null) { + builder.with("message", "error.http." + problem.getStatus().getStatusCode()); + } + } + return new ResponseEntity<>(builder.build(), entity.getHeaders(), entity.getStatusCode()); + } + + @Override + public ResponseEntity handleMethodArgumentNotValid(MethodArgumentNotValidException ex, @Nonnull NativeWebRequest request) { + BindingResult result = ex.getBindingResult(); + List fieldErrors = result.getFieldErrors().stream() + .map(f -> new FieldErrorVM(f.getObjectName(), f.getField(), f.getCode())) + .collect(Collectors.toList()); + + Problem problem = Problem.builder() + .withType(ErrorConstants.CONSTRAINT_VIOLATION_TYPE) + .withTitle("Method argument not valid") + .withStatus(defaultConstraintViolationStatus()) + .with("message", ErrorConstants.ERR_VALIDATION) + .with("fieldErrors", fieldErrors) + .build(); + return create(ex, problem, request); + } + + @ExceptionHandler + public ResponseEntity handleNoSuchElementException(NoSuchElementException ex, NativeWebRequest request) { + Problem problem = Problem.builder() + .withStatus(Status.NOT_FOUND) + .with("message", ErrorConstants.ENTITY_NOT_FOUND_TYPE) + .build(); + return create(ex, problem, request); + } + + @ExceptionHandler + public ResponseEntity handleBadRequestAlertException(BadRequestAlertException ex, NativeWebRequest request) { + return create(ex, request, HeaderUtil.createFailureAlert(ex.getEntityName(), ex.getErrorKey(), ex.getMessage())); + } + + @ExceptionHandler + public ResponseEntity handleConcurrencyFailure(ConcurrencyFailureException ex, NativeWebRequest request) { + Problem problem = Problem.builder() + .withStatus(Status.CONFLICT) + .with("message", ErrorConstants.ERR_CONCURRENCY_FAILURE) + .build(); + return create(ex, problem, request); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/FieldErrorVM.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/FieldErrorVM.java new file mode 100644 index 0000000000..cb49de90eb --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/FieldErrorVM.java @@ -0,0 +1,33 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +import java.io.Serializable; + +public class FieldErrorVM implements Serializable { + + private static final long serialVersionUID = 1L; + + private final String objectName; + + private final String field; + + private final String message; + + public FieldErrorVM(String dto, String field, String message) { + this.objectName = dto; + this.field = field; + this.message = message; + } + + public String getObjectName() { + return objectName; + } + + public String getField() { + return field; + } + + public String getMessage() { + return message; + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/InternalServerErrorException.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/InternalServerErrorException.java new file mode 100644 index 0000000000..7e64638fe1 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/InternalServerErrorException.java @@ -0,0 +1,16 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +/** + * Simple exception with a message, that returns an Internal Server Error code. + */ +public class InternalServerErrorException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + public InternalServerErrorException(String message) { + super(ErrorConstants.DEFAULT_TYPE, message, Status.INTERNAL_SERVER_ERROR); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/InvalidPasswordException.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/InvalidPasswordException.java new file mode 100644 index 0000000000..101763b703 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/InvalidPasswordException.java @@ -0,0 +1,13 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +public class InvalidPasswordException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + public InvalidPasswordException() { + super(ErrorConstants.INVALID_PASSWORD_TYPE, "Incorrect password", Status.BAD_REQUEST); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/LoginAlreadyUsedException.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/LoginAlreadyUsedException.java new file mode 100644 index 0000000000..60518572fe --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/LoginAlreadyUsedException.java @@ -0,0 +1,10 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +public class LoginAlreadyUsedException extends BadRequestAlertException { + + private static final long serialVersionUID = 1L; + + public LoginAlreadyUsedException() { + super(ErrorConstants.LOGIN_ALREADY_USED_TYPE, "Login name already used!", "userManagement", "userexists"); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/package-info.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/package-info.java new file mode 100644 index 0000000000..f13641c5b8 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/errors/package-info.java @@ -0,0 +1,6 @@ +/** + * Specific errors used with Zalando's "problem-spring-web" library. + * + * More information on https://github.com/zalando/problem-spring-web + */ +package com.baeldung.jhipster.gateway.web.rest.errors; diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/package-info.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/package-info.java new file mode 100644 index 0000000000..e64efc7eed --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring MVC REST controllers. + */ +package com.baeldung.jhipster.gateway.web.rest; diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/util/HeaderUtil.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/util/HeaderUtil.java new file mode 100644 index 0000000000..979064f3d7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/util/HeaderUtil.java @@ -0,0 +1,45 @@ +package com.baeldung.jhipster.gateway.web.rest.util; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpHeaders; + +/** + * Utility class for HTTP headers creation. + */ +public final class HeaderUtil { + + private static final Logger log = LoggerFactory.getLogger(HeaderUtil.class); + + private static final String APPLICATION_NAME = "gatewayApp"; + + private HeaderUtil() { + } + + public static HttpHeaders createAlert(String message, String param) { + HttpHeaders headers = new HttpHeaders(); + headers.add("X-" + APPLICATION_NAME + "-alert", message); + headers.add("X-" + APPLICATION_NAME + "-params", param); + return headers; + } + + public static HttpHeaders createEntityCreationAlert(String entityName, String param) { + return createAlert(APPLICATION_NAME + "." + entityName + ".created", param); + } + + public static HttpHeaders createEntityUpdateAlert(String entityName, String param) { + return createAlert(APPLICATION_NAME + "." + entityName + ".updated", param); + } + + public static HttpHeaders createEntityDeletionAlert(String entityName, String param) { + return createAlert(APPLICATION_NAME + "." + entityName + ".deleted", param); + } + + public static HttpHeaders createFailureAlert(String entityName, String errorKey, String defaultMessage) { + log.error("Entity processing failed, {}", defaultMessage); + HttpHeaders headers = new HttpHeaders(); + headers.add("X-" + APPLICATION_NAME + "-error", "error." + errorKey); + headers.add("X-" + APPLICATION_NAME + "-params", entityName); + return headers; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/util/PaginationUtil.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/util/PaginationUtil.java new file mode 100644 index 0000000000..bf6308068d --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/util/PaginationUtil.java @@ -0,0 +1,45 @@ +package com.baeldung.jhipster.gateway.web.rest.util; + +import org.springframework.data.domain.Page; +import org.springframework.http.HttpHeaders; +import org.springframework.web.util.UriComponentsBuilder; + +/** + * Utility class for handling pagination. + * + *

+ * Pagination uses the same principles as the GitHub API, + * and follow RFC 5988 (Link header). + */ +public final class PaginationUtil { + + private PaginationUtil() { + } + + public static HttpHeaders generatePaginationHttpHeaders(Page page, String baseUrl) { + + HttpHeaders headers = new HttpHeaders(); + headers.add("X-Total-Count", Long.toString(page.getTotalElements())); + String link = ""; + if ((page.getNumber() + 1) < page.getTotalPages()) { + link = "<" + generateUri(baseUrl, page.getNumber() + 1, page.getSize()) + ">; rel=\"next\","; + } + // prev link + if ((page.getNumber()) > 0) { + link += "<" + generateUri(baseUrl, page.getNumber() - 1, page.getSize()) + ">; rel=\"prev\","; + } + // last and first link + int lastPage = 0; + if (page.getTotalPages() > 0) { + lastPage = page.getTotalPages() - 1; + } + link += "<" + generateUri(baseUrl, lastPage, page.getSize()) + ">; rel=\"last\","; + link += "<" + generateUri(baseUrl, 0, page.getSize()) + ">; rel=\"first\""; + headers.add(HttpHeaders.LINK, link); + return headers; + } + + private static String generateUri(String baseUrl, int page, int size) { + return UriComponentsBuilder.fromUriString(baseUrl).queryParam("page", page).queryParam("size", size).toUriString(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/vm/LoggerVM.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/vm/LoggerVM.java new file mode 100644 index 0000000000..b5a25603de --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/vm/LoggerVM.java @@ -0,0 +1,46 @@ +package com.baeldung.jhipster.gateway.web.rest.vm; + +import ch.qos.logback.classic.Logger; + +/** + * View Model object for storing a Logback logger. + */ +public class LoggerVM { + + private String name; + + private String level; + + public LoggerVM(Logger logger) { + this.name = logger.getName(); + this.level = logger.getEffectiveLevel().toString(); + } + + public LoggerVM() { + // Empty public constructor used by Jackson. + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLevel() { + return level; + } + + public void setLevel(String level) { + this.level = level; + } + + @Override + public String toString() { + return "LoggerVM{" + + "name='" + name + '\'' + + ", level='" + level + '\'' + + '}'; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/vm/RouteVM.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/vm/RouteVM.java new file mode 100644 index 0000000000..28ff5578f5 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/vm/RouteVM.java @@ -0,0 +1,41 @@ +package com.baeldung.jhipster.gateway.web.rest.vm; + +import java.util.List; + +import org.springframework.cloud.client.ServiceInstance; + +/** + * View Model that stores a route managed by the Gateway. + */ +public class RouteVM { + + private String path; + + private String serviceId; + + private List serviceInstances; + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getServiceId() { + return serviceId; + } + + public void setServiceId(String serviceId) { + this.serviceId = serviceId; + } + + public List getServiceInstances() { + return serviceInstances; + } + + public void setServiceInstances(List serviceInstances) { + this.serviceInstances = serviceInstances; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/vm/package-info.java b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/vm/package-info.java new file mode 100644 index 0000000000..a20ce3226e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/java/com/baeldung/jhipster/gateway/web/rest/vm/package-info.java @@ -0,0 +1,4 @@ +/** + * View Models used by Spring MVC REST controllers. + */ +package com.baeldung.jhipster.gateway.web.rest.vm; diff --git a/jhipster/jhipster-uaa/gateway/src/main/jib/entrypoint.sh b/jhipster/jhipster-uaa/gateway/src/main/jib/entrypoint.sh new file mode 100644 index 0000000000..5ac1e54b29 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/jib/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} +exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -cp /app/resources/:/app/classes/:/app/libs/* "com.baeldung.jhipster.gateway.GatewayApp" "$@" diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/.h2.server.properties b/jhipster/jhipster-uaa/gateway/src/main/resources/.h2.server.properties new file mode 100644 index 0000000000..22c176d4ac --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/.h2.server.properties @@ -0,0 +1,6 @@ +#H2 Server Properties +#Tue Oct 16 03:48:16 BRT 2018 +0=JHipster H2 (Disk)|org.h2.Driver|jdbc\:h2\:file\:./target/h2db/db/gateway|gateway +webAllowOthers=true +webPort=8082 +webSSL=false diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/banner.txt b/jhipster/jhipster-uaa/gateway/src/main/resources/banner.txt new file mode 100644 index 0000000000..e0bc55aaff --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + + ${AnsiColor.GREEN} ██╗${AnsiColor.RED} ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗ + ${AnsiColor.GREEN} ██║${AnsiColor.RED} ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗ + ${AnsiColor.GREEN} ██║${AnsiColor.RED} ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝ + ${AnsiColor.GREEN}██╗ ██║${AnsiColor.RED} ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ + ${AnsiColor.GREEN}╚██████╔╝${AnsiColor.RED} ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ + ${AnsiColor.GREEN} ╚═════╝ ${AnsiColor.RED} ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ + +${AnsiColor.BRIGHT_BLUE}:: JHipster 🤓 :: Running Spring Boot ${spring-boot.version} :: +:: https://www.jhipster.tech ::${AnsiColor.DEFAULT} diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/config/application-dev.yml b/jhipster/jhipster-uaa/gateway/src/main/resources/config/application-dev.yml new file mode 100644 index 0000000000..c2a47d3ab9 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/config/application-dev.yml @@ -0,0 +1,168 @@ +# =================================================================== +# Spring Boot configuration for the "dev" profile. +# +# This configuration overrides the application.yml file. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +logging: + level: + ROOT: DEBUG + io.github.jhipster: DEBUG + com.baeldung.jhipster.gateway: DEBUG + +eureka: + instance: + prefer-ip-address: true + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@localhost:8761/eureka/ + +spring: + profiles: + active: dev + include: + - swagger + # Uncomment to activate TLS for the dev profile + #- tls + devtools: + restart: + enabled: true + livereload: + enabled: false # we use Webpack dev server + BrowserSync for livereload + jackson: + serialization.indent_output: true + datasource: + type: com.zaxxer.hikari.HikariDataSource + url: jdbc:h2:file:./target/h2db/db/gateway;DB_CLOSE_DELAY=-1 + username: gateway + password: + hikari: + auto-commit: false + h2: + console: + enabled: false + jpa: + database-platform: io.github.jhipster.domain.util.FixedH2Dialect + database: H2 + show-sql: true + properties: + hibernate.id.new_generator_mappings: true + hibernate.connection.provider_disables_autocommit: true + hibernate.cache.use_second_level_cache: true + hibernate.cache.use_query_cache: false + hibernate.generate_statistics: true + hibernate.cache.region.factory_class: com.hazelcast.hibernate.HazelcastCacheRegionFactory + hibernate.cache.hazelcast.instance_name: gateway + hibernate.cache.use_minimal_puts: true + hibernate.cache.hazelcast.use_lite_member: true + liquibase: + contexts: dev + mail: + host: localhost + port: 25 + username: + password: + messages: + cache-duration: PT1S # 1 second, see the ISO 8601 standard + thymeleaf: + cache: false + sleuth: + sampler: + percentage: 1 # report 100% of traces + zipkin: # Use the "zipkin" Maven profile to have the Spring Cloud Zipkin dependencies + base-url: http://localhost:9411 + enabled: false + locator: + discovery: + enabled: true + +server: + port: 8080 + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + gateway: + rate-limiting: + enabled: false + limit: 100000 + duration-in-seconds: 3600 + authorized-microservices-endpoints: # Access Control Policy, if left empty for a route, all endpoints will be accessible + app1: /api,/v2/api-docs # recommended dev configuration + http: + version: V_1_1 # To use HTTP/2 you will need to activate TLS (see application-tls.yml) + cache: # Cache configuration + hazelcast: # Hazelcast distributed cache + time-to-live-seconds: 3600 + backup-count: 1 + management-center: # Full reference is available at: http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html + enabled: false + update-interval: 3 + url: http://localhost:8180/mancenter + # CORS is only enabled by default with the "dev" profile, so BrowserSync can access the API + cors: + allowed-origins: "*" + allowed-methods: "*" + allowed-headers: "*" + exposed-headers: "Authorization,Link,X-Total-Count" + allow-credentials: true + max-age: 1800 + security: + client-authorization: + access-token-uri: http://uaa/oauth/token + token-service-id: uaa + client-id: internal + client-secret: internal + mail: # specific JHipster mail property, for standard properties see MailProperties + from: gateway@localhost + base-url: http://127.0.0.1:8080 + metrics: # DropWizard Metrics configuration, used by MetricsConfiguration + jmx: + enabled: true + logs: # Reports Dropwizard metrics in the logs + enabled: false + report-frequency: 60 # in seconds + logging: + logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration + enabled: false + host: localhost + port: 5000 + queue-size: 512 +oauth2: + signature-verification: + public-key-endpoint-uri: http://uaa/oauth/token_key + #ttl for public keys to verify JWT tokens (in ms) + ttl: 3600000 + #max. rate at which public keys will be fetched (in ms) + public-key-refresh-rate-limit: 10000 + web-client-configuration: + #keep in sync with UAA configuration + client-id: web_app + secret: changeit + # Controls session expiration due to inactivity (ignored for remember-me). + # Negative values disable session inactivity expiration. + session-timeout-in-seconds: 1800 + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/config/application-prod.yml b/jhipster/jhipster-uaa/gateway/src/main/resources/config/application-prod.yml new file mode 100644 index 0000000000..a0f1a00859 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/config/application-prod.yml @@ -0,0 +1,175 @@ +# =================================================================== +# Spring Boot configuration for the "prod" profile. +# +# This configuration overrides the application.yml file. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +logging: + level: + ROOT: INFO + com.baeldung.jhipster.gateway: INFO + io.github.jhipster: INFO + +eureka: + instance: + prefer-ip-address: true + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@localhost:8761/eureka/ + +spring: + devtools: + restart: + enabled: false + livereload: + enabled: false + datasource: + type: com.zaxxer.hikari.HikariDataSource + url: jdbc:mysql://localhost:3306/gateway?useUnicode=true&characterEncoding=utf8&useSSL=false + username: root + password: + hikari: + auto-commit: false + data-source-properties: + cachePrepStmts: true + prepStmtCacheSize: 250 + prepStmtCacheSqlLimit: 2048 + useServerPrepStmts: true + jpa: + database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + database: MYSQL + show-sql: false + properties: + hibernate.id.new_generator_mappings: true + hibernate.connection.provider_disables_autocommit: true + hibernate.cache.use_second_level_cache: true + hibernate.cache.use_query_cache: false + hibernate.generate_statistics: false + hibernate.cache.region.factory_class: com.hazelcast.hibernate.HazelcastCacheRegionFactory + hibernate.cache.hazelcast.instance_name: gateway + hibernate.cache.use_minimal_puts: true + hibernate.cache.hazelcast.use_lite_member: true + liquibase: + contexts: prod + mail: + host: localhost + port: 25 + username: + password: + thymeleaf: + cache: true + sleuth: + sampler: + percentage: 1 # report 100% of traces + zipkin: # Use the "zipkin" Maven profile to have the Spring Cloud Zipkin dependencies + base-url: http://localhost:9411 + enabled: false + locator: + discovery: + enabled: true + +# =================================================================== +# To enable TLS in production, generate a certificate using: +# keytool -genkey -alias gateway -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650 +# +# You can also use Let's Encrypt: +# https://maximilian-boehm.com/hp2121/Create-a-Java-Keystore-JKS-from-Let-s-Encrypt-Certificates.htm +# +# Then, modify the server.ssl properties so your "server" configuration looks like: +# +# server: +# port: 443 +# ssl: +# key-store: classpath:config/tls/keystore.p12 +# key-store-password: password +# key-store-type: PKCS12 +# key-alias: gateway +# # The ciphers suite enforce the security by deactivating some old and deprecated SSL cipher, this list was tested against SSL Labs (https://www.ssllabs.com/ssltest/) +# ciphers: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 ,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 ,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,TLS_RSA_WITH_CAMELLIA_128_CBC_SHA +# =================================================================== +server: + port: 8080 + compression: + enabled: true + mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json + min-response-size: 1024 + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + gateway: + rate-limiting: + enabled: false + authorized-microservices-endpoints: # Access Control Policy, if left empty for a route, all endpoints will be accessible + app1: /api # recommended prod configuration + http: + version: V_1_1 # To use HTTP/2 you will need SSL support (see above the "server.ssl" configuration) + cache: # Used by the CachingHttpHeadersFilter + timeToLiveInDays: 1461 + cache: # Cache configuration + hazelcast: # Hazelcast distributed cache + time-to-live-seconds: 3600 + backup-count: 1 + management-center: # Full reference is available at: http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html + enabled: false + update-interval: 3 + url: + security: + client-authorization: + access-token-uri: http://uaa/oauth/token + token-service-id: uaa + client-id: internal + client-secret: internal + mail: # specific JHipster mail property, for standard properties see MailProperties + from: gateway@localhost + base-url: http://my-server-url-to-change # Modify according to your server's URL + metrics: # DropWizard Metrics configuration, used by MetricsConfiguration + jmx: + enabled: true + logs: # Reports Dropwizard metrics in the logs + enabled: false + report-frequency: 60 # in seconds + logging: + logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration + enabled: false + host: localhost + port: 5000 + queue-size: 512 +oauth2: + signature-verification: + public-key-endpoint-uri: http://uaa/oauth/token_key + #ttl for public keys to verify JWT tokens (in ms) + ttl: 3600000 + #max. rate at which public keys will be fetched (in ms) + public-key-refresh-rate-limit: 10000 + web-client-configuration: + #change client secret in production, keep in sync with UAA configuration + client-id: web_app + secret: changeit + # Controls session expiration due to inactivity (ignored for remember-me). + # Negative values disable session inactivity expiration. + session-timeout-in-seconds: 1800 + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/config/application-tls.yml b/jhipster/jhipster-uaa/gateway/src/main/resources/config/application-tls.yml new file mode 100644 index 0000000000..e082c8f455 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/config/application-tls.yml @@ -0,0 +1,18 @@ +# =================================================================== +# Activate this profile to enable TLS and HTTP/2. +# +# JHipster has generated a self-signed certificate, which will be used to encrypt traffic. +# As your browser will not understand this certificate, you will need to import it. +# +# Another (easiest) solution with Chrome is to enable the "allow-insecure-localhost" flag +# at chrome://flags/#allow-insecure-localhost +# =================================================================== +server: + ssl: + key-store: classpath:config/tls/keystore.p12 + key-store-password: password + key-store-type: PKCS12 + key-alias: selfsigned +jhipster: + http: + version: V_2_0 diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/config/application.yml b/jhipster/jhipster-uaa/gateway/src/main/resources/config/application.yml new file mode 100644 index 0000000000..b5848e8963 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/config/application.yml @@ -0,0 +1,157 @@ +# =================================================================== +# Spring Boot configuration. +# +# This configuration will be overridden by the Spring profile you use, +# for example application-dev.yml if you use the "dev" profile. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +eureka: + client: + enabled: true + healthcheck: + enabled: true + fetch-registry: true + register-with-eureka: true + instance-info-replication-interval-seconds: 10 + registry-fetch-interval-seconds: 10 + instance: + appname: gateway + instanceId: gateway:${spring.application.instance-id:${random.value}} + lease-renewal-interval-in-seconds: 5 + lease-expiration-duration-in-seconds: 10 + status-page-url-path: ${management.endpoints.web.base-path}/info + health-check-url-path: ${management.endpoints.web.base-path}/health + metadata-map: + zone: primary # This is needed for the load balancer + profile: ${spring.profiles.active} + version: ${info.project.version:} + git-version: ${git.commit.id.describe:} + git-commit: ${git.commit.id.abbrev:} + git-branch: ${git.branch:} +ribbon: + eureka: + enabled: true +# See http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html +zuul: # those values must be configured depending on the application specific needs + sensitive-headers: Cookie,Set-Cookie #see https://github.com/spring-cloud/spring-cloud-netflix/issues/3126 + host: + max-total-connections: 1000 + max-per-route-connections: 100 + semaphore: + max-semaphores: 500 + +# See https://github.com/Netflix/Hystrix/wiki/Configuration +hystrix: + command: + default: + execution: + isolation: + thread: + timeoutInMilliseconds: 10000 + +management: + endpoints: + web: + base-path: /management + exposure: + include: ["configprops", "env", "health", "info", "threaddump", "logfile" ] + endpoint: + health: + show-details: when_authorized + info: + git: + mode: full + health: + mail: + enabled: false # When using the MailService, configure an SMTP server and set this to true + metrics: + enabled: false # http://micrometer.io/ is disabled by default, as we use http://metrics.dropwizard.io/ instead + +spring: + application: + name: gateway + jpa: + open-in-view: false + hibernate: + ddl-auto: none + naming: + physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy + implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy + messages: + basename: i18n/messages + mvc: + favicon: + enabled: false + thymeleaf: + mode: HTML +security: + oauth2: + resource: + filter-order: 3 + +server: + servlet: + session: + cookie: + http-only: true + +# Properties to be exposed on the /info management endpoint +info: + # Comma separated list of profiles that will trigger the ribbon to show + display-ribbon-on-profiles: "dev" + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + async: + core-pool-size: 2 + max-pool-size: 50 + queue-capacity: 10000 + # By default CORS is disabled. Uncomment to enable. + #cors: + #allowed-origins: "*" + #allowed-methods: "*" + #allowed-headers: "*" + #exposed-headers: "Authorization,Link,X-Total-Count" + #allow-credentials: true + #max-age: 1800 + mail: + from: gateway@localhost + swagger: + default-include-pattern: /api/.* + title: gateway API + description: gateway API documentation + version: 0.0.1 + terms-of-service-url: + contact-name: + contact-url: + contact-email: + license: + license-url: + +logging: + file: target/gateway.log + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/config/bootstrap-prod.yml b/jhipster/jhipster-uaa/gateway/src/main/resources/config/bootstrap-prod.yml new file mode 100644 index 0000000000..9d8989f5a6 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/config/bootstrap-prod.yml @@ -0,0 +1,22 @@ +# =================================================================== +# Spring Cloud Config bootstrap configuration for the "prod" profile +# =================================================================== + +spring: + cloud: + config: + fail-fast: true + retry: + initial-interval: 1000 + max-interval: 2000 + max-attempts: 100 + uri: http://admin:${jhipster.registry.password}@localhost:8761/config + # name of the config server's property source (file.yml) that we want to use + name: gateway + profile: prod # profile(s) of the property source + label: master # toggle to switch to a different version of the configuration as stored in git + # it can be set to any label, branch or commit of the configuration source Git repository + +jhipster: + registry: + password: admin diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/config/bootstrap.yml b/jhipster/jhipster-uaa/gateway/src/main/resources/config/bootstrap.yml new file mode 100644 index 0000000000..a6ebd56b33 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/config/bootstrap.yml @@ -0,0 +1,26 @@ +# =================================================================== +# Spring Cloud Config bootstrap configuration for the "dev" profile +# In prod profile, properties will be overwriten by the ones defined in bootstrap-prod.yml +# =================================================================== + +jhipster: + registry: + password: admin + +spring: + application: + name: gateway + profiles: + # The commented value for `active` can be replaced with valid Spring profiles to load. + # Otherwise, it will be filled in by maven when building the WAR file + # Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS` + active: #spring.profiles.active# + cloud: + config: + fail-fast: false # if not in "prod" profile, do not force to use Spring Cloud Config + uri: http://admin:${jhipster.registry.password}@localhost:8761/config + # name of the config server's property source (file.yml) that we want to use + name: gateway + profile: dev # profile(s) of the property source + label: master # toggle to switch to a different version of the configuration as stored in git + # it can be set to any label, branch or commit of the configuration source Git repository diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml b/jhipster/jhipster-uaa/gateway/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml new file mode 100644 index 0000000000..d75921613c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/config/liquibase/master.xml b/jhipster/jhipster-uaa/gateway/src/main/resources/config/liquibase/master.xml new file mode 100644 index 0000000000..f2b0b1f7e6 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/config/liquibase/master.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/config/tls/keystore.p12 b/jhipster/jhipster-uaa/gateway/src/main/resources/config/tls/keystore.p12 new file mode 100644 index 0000000000..f308de393d Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/src/main/resources/config/tls/keystore.p12 differ diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages.properties b/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages.properties new file mode 100644 index 0000000000..124274d5c3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages.properties @@ -0,0 +1,21 @@ +# Error page +error.title=Your request cannot be processed +error.subtitle=Sorry, an error has occurred. +error.status=Status: +error.message=Message: + +# Activation email +email.activation.title=gateway account activation +email.activation.greeting=Dear {0} +email.activation.text1=Your gateway account has been created, please click on the URL below to activate it: +email.activation.text2=Regards, +email.signature=gateway Team. + +# Creation email +email.creation.text1=Your gateway account has been created, please click on the URL below to access it: + +# Reset email +email.reset.title=gateway password reset +email.reset.greeting=Dear {0} +email.reset.text1=For your gateway account a password reset was requested, please click on the URL below to reset it: +email.reset.text2=Regards, diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages_en.properties b/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages_en.properties new file mode 100644 index 0000000000..124274d5c3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages_en.properties @@ -0,0 +1,21 @@ +# Error page +error.title=Your request cannot be processed +error.subtitle=Sorry, an error has occurred. +error.status=Status: +error.message=Message: + +# Activation email +email.activation.title=gateway account activation +email.activation.greeting=Dear {0} +email.activation.text1=Your gateway account has been created, please click on the URL below to activate it: +email.activation.text2=Regards, +email.signature=gateway Team. + +# Creation email +email.creation.text1=Your gateway account has been created, please click on the URL below to access it: + +# Reset email +email.reset.title=gateway password reset +email.reset.greeting=Dear {0} +email.reset.text1=For your gateway account a password reset was requested, please click on the URL below to reset it: +email.reset.text2=Regards, diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages_fr.properties b/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages_fr.properties new file mode 100644 index 0000000000..84cea81d74 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages_fr.properties @@ -0,0 +1,21 @@ +# Error page +error.title=Votre demande ne peut être traitée +error.subtitle=Désolé, une erreur s'est produite. +error.status=Statut : +error.message=Message : + +# Activation email +email.activation.title=Activation de votre compte gateway +email.activation.greeting=Cher {0} +email.activation.text1=Votre compte gateway a été créé, pour l'activer merci de cliquer sur le lien ci-dessous : +email.activation.text2=Cordialement, +email.signature=gateway. + +# Creation email +email.creation.text1=Votre compte gateway a été créé, merci de cliquer sur le lien ci-dessous pour y accéder : + +# Reset email +email.reset.title=gateway Réinitialisation de mot de passe +email.reset.greeting=Cher {0} +email.reset.text1=Un nouveau mot de passe pour votre compte gateway a été demandé, veuillez cliquer sur le lien ci-dessous pour le réinitialiser : +email.reset.text2=Cordialement, diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages_pt_br.properties b/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages_pt_br.properties new file mode 100644 index 0000000000..f8853b507a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/i18n/messages_pt_br.properties @@ -0,0 +1,21 @@ +# Error page +error.title=A requisição não pode ser processada +error.subtitle=Desculpe, ocorreu um erro. +error.status=Status: +error.message=Mensagem: + +# Activation email +email.activation.title=gateway ativação +email.activation.greeting=Caro {0} +email.activation.text1=Sua conta gateway foi criada, por favor click na URL abaixo para ativar: +email.activation.text2=Atenciosamente, +email.signature=gateway. + +# Creation email +email.creation.text1=Sua gateway account foi criada, por favor clique no URL abaixo para acessá-lo: + +# Reset email +email.reset.title=A Senha da aplicação gateway foi reiniciada +email.reset.greeting=Caro {0} +email.reset.text1=Foi solicitado o reinicio de senha da sua conta gateway. Por favor clique na url abaixo para alterá-la: +email.reset.text2=Prezado, diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/logback-spring.xml b/jhipster/jhipster-uaa/gateway/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..a30ab8c1d2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/logback-spring.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + diff --git a/jhipster/jhipster-uaa/gateway/src/main/resources/templates/error.html b/jhipster/jhipster-uaa/gateway/src/main/resources/templates/error.html new file mode 100644 index 0000000000..08616bcf1e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/resources/templates/error.html @@ -0,0 +1,163 @@ + + + + + + Your request cannot be processed + + + +

+

Your request cannot be processed :(

+ +

Sorry, an error has occurred.

+ + Status:  ()
+ + Message: 
+
+ + + +
+ + diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/404.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/404.html new file mode 100644 index 0000000000..3fdc0bee1a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/404.html @@ -0,0 +1,61 @@ + + + + + Page Not Found + + + + + +

Page Not Found

+

Sorry, but the page you were trying to view does not exist.

+ + + diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/account.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/account.module.ts new file mode 100644 index 0000000000..e597aa0052 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/account.module.ts @@ -0,0 +1,30 @@ +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { RouterModule } from '@angular/router'; + +import { GatewaySharedModule } from 'app/shared'; + +import { + PasswordStrengthBarComponent, + RegisterComponent, + ActivateComponent, + PasswordComponent, + PasswordResetInitComponent, + PasswordResetFinishComponent, + SettingsComponent, + accountState +} from './'; + +@NgModule({ + imports: [GatewaySharedModule, RouterModule.forChild(accountState)], + declarations: [ + ActivateComponent, + RegisterComponent, + PasswordComponent, + PasswordStrengthBarComponent, + PasswordResetInitComponent, + PasswordResetFinishComponent, + SettingsComponent + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}) +export class GatewayAccountModule {} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/account.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/account.route.ts new file mode 100644 index 0000000000..f849342e69 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/account.route.ts @@ -0,0 +1,12 @@ +import { Routes } from '@angular/router'; + +import { activateRoute, passwordRoute, passwordResetFinishRoute, passwordResetInitRoute, registerRoute, settingsRoute } from './'; + +const ACCOUNT_ROUTES = [activateRoute, passwordRoute, passwordResetFinishRoute, passwordResetInitRoute, registerRoute, settingsRoute]; + +export const accountState: Routes = [ + { + path: '', + children: ACCOUNT_ROUTES + } +]; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.component.html new file mode 100644 index 0000000000..6a28eef775 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.component.html @@ -0,0 +1,17 @@ +
+
+
+

Activation

+ +
+ Your user account has been activated. Please + sign in. +
+ +
+ Your user could not be activated. Please use the registration form to sign up. +
+ +
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.component.ts new file mode 100644 index 0000000000..5c398073c3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.component.ts @@ -0,0 +1,37 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { ActivatedRoute } from '@angular/router'; + +import { LoginModalService } from 'app/core'; +import { ActivateService } from './activate.service'; + +@Component({ + selector: 'jhi-activate', + templateUrl: './activate.component.html' +}) +export class ActivateComponent implements OnInit { + error: string; + success: string; + modalRef: NgbModalRef; + + constructor(private activateService: ActivateService, private loginModalService: LoginModalService, private route: ActivatedRoute) {} + + ngOnInit() { + this.route.queryParams.subscribe(params => { + this.activateService.get(params['key']).subscribe( + () => { + this.error = null; + this.success = 'OK'; + }, + () => { + this.success = null; + this.error = 'ERROR'; + } + ); + }); + } + + login() { + this.modalRef = this.loginModalService.open(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.route.ts new file mode 100644 index 0000000000..f958dcfd51 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.route.ts @@ -0,0 +1,14 @@ +import { Route } from '@angular/router'; + +import { UserRouteAccessService } from 'app/core'; +import { ActivateComponent } from './activate.component'; + +export const activateRoute: Route = { + path: 'activate', + component: ActivateComponent, + data: { + authorities: [], + pageTitle: 'activate.title' + }, + canActivate: [UserRouteAccessService] +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.service.ts new file mode 100644 index 0000000000..0e7297c64d --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/activate/activate.service.ts @@ -0,0 +1,16 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpParams } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; + +@Injectable({ providedIn: 'root' }) +export class ActivateService { + constructor(private http: HttpClient) {} + + get(key: string): Observable { + return this.http.get(SERVER_API_URL + 'uaa/api/activate', { + params: new HttpParams().set('key', key) + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/index.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/index.ts new file mode 100644 index 0000000000..aeada0551c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/index.ts @@ -0,0 +1,19 @@ +export * from './activate/activate.component'; +export * from './activate/activate.service'; +export * from './activate/activate.route'; +export * from './password/password.component'; +export * from './password/password-strength-bar.component'; +export * from './password/password.service'; +export * from './password/password.route'; +export * from './password-reset/finish/password-reset-finish.component'; +export * from './password-reset/finish/password-reset-finish.service'; +export * from './password-reset/finish/password-reset-finish.route'; +export * from './password-reset/init/password-reset-init.component'; +export * from './password-reset/init/password-reset-init.service'; +export * from './password-reset/init/password-reset-init.route'; +export * from './register/register.component'; +export * from './register/register.service'; +export * from './register/register.route'; +export * from './settings/settings.component'; +export * from './settings/settings.route'; +export * from './account.route'; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.html new file mode 100644 index 0000000000..bcbc911114 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.html @@ -0,0 +1,77 @@ +
+
+
+

Reset password

+ +
+ The password reset key is missing. +
+ +
+

Choose a new password

+
+ +
+

Your password couldn't be reset. Remember a password request is only valid for 24 hours.

+
+ +

+ Your password has been reset. Please + sign in. +

+ +
+ The password and its confirmation do not match! +
+ +
+
+
+ + +
+ + Your password is required. + + + Your password is required to be at least 4 characters. + + + Your password cannot be longer than 50 characters. + +
+ +
+ +
+ + +
+ + Your password confirmation is required. + + + Your password confirmation is required to be at least 4 characters. + + + Your password confirmation cannot be longer than 50 characters. + +
+
+ +
+
+ +
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts new file mode 100644 index 0000000000..72aac25c96 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts @@ -0,0 +1,65 @@ +import { Component, OnInit, AfterViewInit, Renderer, ElementRef } from '@angular/core'; +import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { ActivatedRoute } from '@angular/router'; + +import { LoginModalService } from 'app/core'; +import { PasswordResetFinishService } from './password-reset-finish.service'; + +@Component({ + selector: 'jhi-password-reset-finish', + templateUrl: './password-reset-finish.component.html' +}) +export class PasswordResetFinishComponent implements OnInit, AfterViewInit { + confirmPassword: string; + doNotMatch: string; + error: string; + keyMissing: boolean; + resetAccount: any; + success: string; + modalRef: NgbModalRef; + key: string; + + constructor( + private passwordResetFinishService: PasswordResetFinishService, + private loginModalService: LoginModalService, + private route: ActivatedRoute, + private elementRef: ElementRef, + private renderer: Renderer + ) {} + + ngOnInit() { + this.route.queryParams.subscribe(params => { + this.key = params['key']; + }); + this.resetAccount = {}; + this.keyMissing = !this.key; + } + + ngAfterViewInit() { + if (this.elementRef.nativeElement.querySelector('#password') != null) { + this.renderer.invokeElementMethod(this.elementRef.nativeElement.querySelector('#password'), 'focus', []); + } + } + + finishReset() { + this.doNotMatch = null; + this.error = null; + if (this.resetAccount.password !== this.confirmPassword) { + this.doNotMatch = 'ERROR'; + } else { + this.passwordResetFinishService.save({ key: this.key, newPassword: this.resetAccount.password }).subscribe( + () => { + this.success = 'OK'; + }, + () => { + this.success = null; + this.error = 'ERROR'; + } + ); + } + } + + login() { + this.modalRef = this.loginModalService.open(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.route.ts new file mode 100644 index 0000000000..686cb972e3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.route.ts @@ -0,0 +1,12 @@ +import { Route } from '@angular/router'; + +import { PasswordResetFinishComponent } from './password-reset-finish.component'; + +export const passwordResetFinishRoute: Route = { + path: 'reset/finish', + component: PasswordResetFinishComponent, + data: { + authorities: [], + pageTitle: 'global.menu.account.password' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.ts new file mode 100644 index 0000000000..0e483d882b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.ts @@ -0,0 +1,14 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; + +@Injectable({ providedIn: 'root' }) +export class PasswordResetFinishService { + constructor(private http: HttpClient) {} + + save(keyAndPassword: any): Observable { + return this.http.post(SERVER_API_URL + 'uaa/api/account/reset-password/finish', keyAndPassword); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html new file mode 100644 index 0000000000..8f42e600e2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html @@ -0,0 +1,46 @@ +
+
+
+

Reset your password

+ +
+ Email address isn't registered! Please check and try again. +
+ +
+

Enter the email address you used to register.

+
+ +
+

Check your emails for details on how to reset your password.

+
+ +
+
+ + +
+ + Your email is required. + + + Your email is invalid. + + + Your email is required to be at least 5 characters. + + + Your email cannot be longer than 100 characters. + +
+
+ +
+
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.component.ts new file mode 100644 index 0000000000..e32617341c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.component.ts @@ -0,0 +1,43 @@ +import { Component, OnInit, AfterViewInit, Renderer, ElementRef } from '@angular/core'; +import { EMAIL_NOT_FOUND_TYPE } from 'app/shared'; +import { PasswordResetInitService } from './password-reset-init.service'; + +@Component({ + selector: 'jhi-password-reset-init', + templateUrl: './password-reset-init.component.html' +}) +export class PasswordResetInitComponent implements OnInit, AfterViewInit { + error: string; + errorEmailNotExists: string; + resetAccount: any; + success: string; + + constructor(private passwordResetInitService: PasswordResetInitService, private elementRef: ElementRef, private renderer: Renderer) {} + + ngOnInit() { + this.resetAccount = {}; + } + + ngAfterViewInit() { + this.renderer.invokeElementMethod(this.elementRef.nativeElement.querySelector('#email'), 'focus', []); + } + + requestReset() { + this.error = null; + this.errorEmailNotExists = null; + + this.passwordResetInitService.save(this.resetAccount.email).subscribe( + () => { + this.success = 'OK'; + }, + response => { + this.success = null; + if (response.status === 400 && response.error.type === EMAIL_NOT_FOUND_TYPE) { + this.errorEmailNotExists = 'ERROR'; + } else { + this.error = 'ERROR'; + } + } + ); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.route.ts new file mode 100644 index 0000000000..6d7da08cd7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.route.ts @@ -0,0 +1,12 @@ +import { Route } from '@angular/router'; + +import { PasswordResetInitComponent } from './password-reset-init.component'; + +export const passwordResetInitRoute: Route = { + path: 'reset/request', + component: PasswordResetInitComponent, + data: { + authorities: [], + pageTitle: 'global.menu.account.password' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.service.ts new file mode 100644 index 0000000000..462eee3f91 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password-reset/init/password-reset-init.service.ts @@ -0,0 +1,14 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; + +@Injectable({ providedIn: 'root' }) +export class PasswordResetInitService { + constructor(private http: HttpClient) {} + + save(mail: string): Observable { + return this.http.post(SERVER_API_URL + 'uaa/api/account/reset-password/init', mail); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password-strength-bar.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password-strength-bar.component.ts new file mode 100644 index 0000000000..326b5ec888 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password-strength-bar.component.ts @@ -0,0 +1,84 @@ +import { Component, ElementRef, Input, Renderer } from '@angular/core'; + +@Component({ + selector: 'jhi-password-strength-bar', + template: ` +
+ Password strength: +
    +
  • +
  • +
  • +
  • +
  • +
+
`, + styleUrls: ['password-strength-bar.scss'] +}) +export class PasswordStrengthBarComponent { + colors = ['#F00', '#F90', '#FF0', '#9F0', '#0F0']; + + constructor(private renderer: Renderer, private elementRef: ElementRef) {} + + measureStrength(p: string): number { + let force = 0; + const regex = /[$-/:-?{-~!"^_`\[\]]/g; // " + const lowerLetters = /[a-z]+/.test(p); + const upperLetters = /[A-Z]+/.test(p); + const numbers = /[0-9]+/.test(p); + const symbols = regex.test(p); + + const flags = [lowerLetters, upperLetters, numbers, symbols]; + const passedMatches = flags.filter((isMatchedFlag: boolean) => { + return isMatchedFlag === true; + }).length; + + force += 2 * p.length + (p.length >= 10 ? 1 : 0); + force += passedMatches * 10; + + // penality (short password) + force = p.length <= 6 ? Math.min(force, 10) : force; + + // penality (poor variety of characters) + force = passedMatches === 1 ? Math.min(force, 10) : force; + force = passedMatches === 2 ? Math.min(force, 20) : force; + force = passedMatches === 3 ? Math.min(force, 40) : force; + + return force; + } + + getColor(s: number): any { + let idx = 0; + if (s <= 10) { + idx = 0; + } else if (s <= 20) { + idx = 1; + } else if (s <= 30) { + idx = 2; + } else if (s <= 40) { + idx = 3; + } else { + idx = 4; + } + return { idx: idx + 1, col: this.colors[idx] }; + } + + @Input() + set passwordToCheck(password: string) { + if (password) { + const c = this.getColor(this.measureStrength(password)); + const element = this.elementRef.nativeElement; + if (element.className) { + this.renderer.setElementClass(element, element.className, false); + } + const lis = element.getElementsByTagName('li'); + for (let i = 0; i < lis.length; i++) { + if (i < c.idx) { + this.renderer.setElementStyle(lis[i], 'backgroundColor', c.col); + } else { + this.renderer.setElementStyle(lis[i], 'backgroundColor', '#DDD'); + } + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password-strength-bar.scss b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password-strength-bar.scss new file mode 100644 index 0000000000..9744b9b784 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password-strength-bar.scss @@ -0,0 +1,23 @@ +/* ========================================================================== +start Password strength bar style +========================================================================== */ +ul#strength { + display: inline; + list-style: none; + margin: 0; + margin-left: 15px; + padding: 0; + vertical-align: 2px; +} + +.point { + background: #ddd; + border-radius: 2px; + display: inline-block; + height: 5px; + margin-right: 1px; + width: 20px; + &:last-child { + margin: 0 !important; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.component.html new file mode 100644 index 0000000000..fafe672d8b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.component.html @@ -0,0 +1,77 @@ +
+
+
+

Password for [{{account.login}}]

+ +
+ Password changed! +
+
+ An error has occurred! The password could not be changed. +
+ +
+ The password and its confirmation do not match! +
+ +
+ +
+ + +
+ + Your password is required. + +
+
+
+ + +
+ + Your password is required. + + + Your password is required to be at least 4 characters. + + + Your password cannot be longer than 50 characters. + +
+ +
+
+ + +
+ + Your confirmation password is required. + + + Your confirmation password is required to be at least 4 characters. + + + Your confirmation password cannot be longer than 50 characters. + +
+
+ + +
+
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.component.ts new file mode 100644 index 0000000000..64d4d87f00 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.component.ts @@ -0,0 +1,46 @@ +import { Component, OnInit } from '@angular/core'; + +import { Principal } from 'app/core'; +import { PasswordService } from './password.service'; + +@Component({ + selector: 'jhi-password', + templateUrl: './password.component.html' +}) +export class PasswordComponent implements OnInit { + doNotMatch: string; + error: string; + success: string; + account: any; + currentPassword: string; + newPassword: string; + confirmPassword: string; + + constructor(private passwordService: PasswordService, private principal: Principal) {} + + ngOnInit() { + this.principal.identity().then(account => { + this.account = account; + }); + } + + changePassword() { + if (this.newPassword !== this.confirmPassword) { + this.error = null; + this.success = null; + this.doNotMatch = 'ERROR'; + } else { + this.doNotMatch = null; + this.passwordService.save(this.newPassword, this.currentPassword).subscribe( + () => { + this.error = null; + this.success = 'OK'; + }, + () => { + this.success = null; + this.error = 'ERROR'; + } + ); + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.route.ts new file mode 100644 index 0000000000..2a6ec475ed --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.route.ts @@ -0,0 +1,14 @@ +import { Route } from '@angular/router'; + +import { UserRouteAccessService } from 'app/core'; +import { PasswordComponent } from './password.component'; + +export const passwordRoute: Route = { + path: 'password', + component: PasswordComponent, + data: { + authorities: ['ROLE_USER'], + pageTitle: 'global.menu.account.password' + }, + canActivate: [UserRouteAccessService] +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.service.ts new file mode 100644 index 0000000000..b93ab26d33 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/password/password.service.ts @@ -0,0 +1,14 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; + +@Injectable({ providedIn: 'root' }) +export class PasswordService { + constructor(private http: HttpClient) {} + + save(newPassword: string, currentPassword: string): Observable { + return this.http.post(SERVER_API_URL + 'uaa/api/account/change-password', { currentPassword, newPassword }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.component.html new file mode 100644 index 0000000000..fd5c89e2de --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.component.html @@ -0,0 +1,124 @@ +
+
+
+

Registration

+ +
+ Registration saved! Please check your email for confirmation. +
+ +
+ Registration failed! Please try again later. +
+ +
+ Login name already registered! Please choose another one. +
+ +
+ Email is already in use! Please choose another one. +
+ +
+ The password and its confirmation do not match! +
+
+
+
+
+
+
+ + +
+ + Your username is required. + + + Your username is required to be at least 1 character. + + + Your username cannot be longer than 50 characters. + + + Your username can only contain letters and digits. + +
+
+
+ + +
+ + Your email is required. + + + Your email is invalid. + + + Your email is required to be at least 5 characters. + + + Your email cannot be longer than 100 characters. + +
+
+
+ + +
+ + Your password is required. + + + Your password is required to be at least 4 characters. + + + Your password cannot be longer than 50 characters. + +
+ +
+
+ + +
+ + Your confirmation password is required. + + + Your confirmation password is required to be at least 4 characters. + + + Your confirmation password cannot be longer than 50 characters. + +
+
+ + +
+

+
+ If you want to + sign in, you can try the default accounts:
- Administrator (login="admin" and password="admin")
- User (login="user" and password="user").
+
+
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.component.ts new file mode 100644 index 0000000000..de97a880df --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.component.ts @@ -0,0 +1,75 @@ +import { Component, OnInit, AfterViewInit, Renderer, ElementRef } from '@angular/core'; +import { HttpErrorResponse } from '@angular/common/http'; +import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { JhiLanguageService } from 'ng-jhipster'; + +import { EMAIL_ALREADY_USED_TYPE, LOGIN_ALREADY_USED_TYPE } from 'app/shared'; +import { LoginModalService } from 'app/core'; +import { Register } from './register.service'; + +@Component({ + selector: 'jhi-register', + templateUrl: './register.component.html' +}) +export class RegisterComponent implements OnInit, AfterViewInit { + confirmPassword: string; + doNotMatch: string; + error: string; + errorEmailExists: string; + errorUserExists: string; + registerAccount: any; + success: boolean; + modalRef: NgbModalRef; + + constructor( + private languageService: JhiLanguageService, + private loginModalService: LoginModalService, + private registerService: Register, + private elementRef: ElementRef, + private renderer: Renderer + ) {} + + ngOnInit() { + this.success = false; + this.registerAccount = {}; + } + + ngAfterViewInit() { + this.renderer.invokeElementMethod(this.elementRef.nativeElement.querySelector('#login'), 'focus', []); + } + + register() { + if (this.registerAccount.password !== this.confirmPassword) { + this.doNotMatch = 'ERROR'; + } else { + this.doNotMatch = null; + this.error = null; + this.errorUserExists = null; + this.errorEmailExists = null; + this.languageService.getCurrent().then(key => { + this.registerAccount.langKey = key; + this.registerService.save(this.registerAccount).subscribe( + () => { + this.success = true; + }, + response => this.processError(response) + ); + }); + } + } + + openLogin() { + this.modalRef = this.loginModalService.open(); + } + + private processError(response: HttpErrorResponse) { + this.success = null; + if (response.status === 400 && response.error.type === LOGIN_ALREADY_USED_TYPE) { + this.errorUserExists = 'ERROR'; + } else if (response.status === 400 && response.error.type === EMAIL_ALREADY_USED_TYPE) { + this.errorEmailExists = 'ERROR'; + } else { + this.error = 'ERROR'; + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.route.ts new file mode 100644 index 0000000000..ca834d5d58 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.route.ts @@ -0,0 +1,12 @@ +import { Route } from '@angular/router'; + +import { RegisterComponent } from './register.component'; + +export const registerRoute: Route = { + path: 'register', + component: RegisterComponent, + data: { + authorities: [], + pageTitle: 'register.title' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.service.ts new file mode 100644 index 0000000000..e9b14c42ba --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/register/register.service.ts @@ -0,0 +1,14 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; + +@Injectable({ providedIn: 'root' }) +export class Register { + constructor(private http: HttpClient) {} + + save(account: any): Observable { + return this.http.post(SERVER_API_URL + 'uaa/api/register', account); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/settings/settings.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/settings/settings.component.html new file mode 100644 index 0000000000..b0c114b819 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/settings/settings.component.html @@ -0,0 +1,86 @@ +
+
+
+

User settings for [{{settingsAccount.login}}]

+ +
+ Settings saved! +
+ + + +
+ +
+ + +
+ + Your first name is required. + + + Your first name is required to be at least 1 character. + + + Your first name cannot be longer than 50 characters. + +
+
+
+ + +
+ + Your last name is required. + + + Your last name is required to be at least 1 character. + + + Your last name cannot be longer than 50 characters. + +
+
+
+ + +
+ + Your email is required. + + + Your email is invalid. + + + Your email is required to be at least 5 characters. + + + Your email cannot be longer than 100 characters. + +
+
+
+ + +
+ +
+
+
+ +
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/settings/settings.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/settings/settings.component.ts new file mode 100644 index 0000000000..1b5b88b626 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/settings/settings.component.ts @@ -0,0 +1,64 @@ +import { Component, OnInit } from '@angular/core'; +import { JhiLanguageService } from 'ng-jhipster'; + +import { Principal, AccountService, JhiLanguageHelper } from 'app/core'; + +@Component({ + selector: 'jhi-settings', + templateUrl: './settings.component.html' +}) +export class SettingsComponent implements OnInit { + error: string; + success: string; + settingsAccount: any; + languages: any[]; + + constructor( + private account: AccountService, + private principal: Principal, + private languageService: JhiLanguageService, + private languageHelper: JhiLanguageHelper + ) {} + + ngOnInit() { + this.principal.identity().then(account => { + this.settingsAccount = this.copyAccount(account); + }); + this.languageHelper.getAll().then(languages => { + this.languages = languages; + }); + } + + save() { + this.account.save(this.settingsAccount).subscribe( + () => { + this.error = null; + this.success = 'OK'; + this.principal.identity(true).then(account => { + this.settingsAccount = this.copyAccount(account); + }); + this.languageService.getCurrent().then(current => { + if (this.settingsAccount.langKey !== current) { + this.languageService.changeLanguage(this.settingsAccount.langKey); + } + }); + }, + () => { + this.success = null; + this.error = 'ERROR'; + } + ); + } + + copyAccount(account) { + return { + activated: account.activated, + email: account.email, + firstName: account.firstName, + langKey: account.langKey, + lastName: account.lastName, + login: account.login, + imageUrl: account.imageUrl + }; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/settings/settings.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/settings/settings.route.ts new file mode 100644 index 0000000000..95c2de6e0f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/account/settings/settings.route.ts @@ -0,0 +1,14 @@ +import { Route } from '@angular/router'; + +import { UserRouteAccessService } from 'app/core'; +import { SettingsComponent } from './settings.component'; + +export const settingsRoute: Route = { + path: 'settings', + component: SettingsComponent, + data: { + authorities: ['ROLE_USER'], + pageTitle: 'global.menu.account.settings' + }, + canActivate: [UserRouteAccessService] +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/admin.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/admin.module.ts new file mode 100644 index 0000000000..3ecbaa49ff --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/admin.module.ts @@ -0,0 +1,57 @@ +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { JhiLanguageService } from 'ng-jhipster'; +import { JhiLanguageHelper } from 'app/core'; +import { GatewaySharedModule } from 'app/shared'; +/* jhipster-needle-add-admin-module-import - JHipster will add admin modules imports here */ + +import { + adminState, + AuditsComponent, + UserMgmtComponent, + UserMgmtDetailComponent, + UserMgmtUpdateComponent, + UserMgmtDeleteDialogComponent, + LogsComponent, + JhiMetricsMonitoringModalComponent, + JhiMetricsMonitoringComponent, + JhiHealthModalComponent, + JhiHealthCheckComponent, + JhiConfigurationComponent, + JhiDocsComponent, + JhiGatewayComponent +} from './'; + +@NgModule({ + imports: [ + GatewaySharedModule, + RouterModule.forChild(adminState) + /* jhipster-needle-add-admin-module - JHipster will add admin modules here */ + ], + declarations: [ + AuditsComponent, + UserMgmtComponent, + UserMgmtDetailComponent, + UserMgmtUpdateComponent, + UserMgmtDeleteDialogComponent, + LogsComponent, + JhiConfigurationComponent, + JhiHealthCheckComponent, + JhiHealthModalComponent, + JhiDocsComponent, + JhiGatewayComponent, + JhiMetricsMonitoringComponent, + JhiMetricsMonitoringModalComponent + ], + entryComponents: [UserMgmtDeleteDialogComponent, JhiHealthModalComponent, JhiMetricsMonitoringModalComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}) +export class GatewayAdminModule { + constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) { + this.languageHelper.language.subscribe((languageKey: string) => { + if (languageKey !== undefined) { + this.languageService.changeLanguage(languageKey); + } + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/admin.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/admin.route.ts new file mode 100644 index 0000000000..79fb15cf7a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/admin.route.ts @@ -0,0 +1,18 @@ +import { Routes } from '@angular/router'; + +import { auditsRoute, configurationRoute, docsRoute, healthRoute, logsRoute, metricsRoute, gatewayRoute, userMgmtRoute } from './'; + +import { UserRouteAccessService } from 'app/core'; + +const ADMIN_ROUTES = [auditsRoute, configurationRoute, docsRoute, healthRoute, logsRoute, gatewayRoute, ...userMgmtRoute, metricsRoute]; + +export const adminState: Routes = [ + { + path: '', + data: { + authorities: ['ROLE_ADMIN'] + }, + canActivate: [UserRouteAccessService], + children: ADMIN_ROUTES + } +]; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audit-data.model.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audit-data.model.ts new file mode 100644 index 0000000000..a2506c4090 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audit-data.model.ts @@ -0,0 +1,3 @@ +export class AuditData { + constructor(public remoteAddress: string, public sessionId: string) {} +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audit.model.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audit.model.ts new file mode 100644 index 0000000000..6497fb444e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audit.model.ts @@ -0,0 +1,5 @@ +import { AuditData } from './audit-data.model'; + +export class Audit { + constructor(public data: AuditData, public principal: string, public timestamp: string, public type: string) {} +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.component.html new file mode 100644 index 0000000000..e55799e91e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.component.html @@ -0,0 +1,52 @@ +
+

Audits

+ +
+
+

Filter by date

+
+
+ from +
+ + +
+ To +
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + +
DateUserStateExtra data
{{audit.timestamp| date:'medium'}}{{audit.principal}}{{audit.type}} + {{audit.data.message}} + Remote Address {{audit.data.remoteAddress}} +
+
+
+
+ +
+
+ +
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.component.ts new file mode 100644 index 0000000000..bda472d634 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.component.ts @@ -0,0 +1,128 @@ +import { Component, OnInit, OnDestroy } from '@angular/core'; +import { HttpResponse } from '@angular/common/http'; +import { DatePipe } from '@angular/common'; +import { ActivatedRoute, Router } from '@angular/router'; +import { JhiParseLinks, JhiAlertService } from 'ng-jhipster'; + +import { ITEMS_PER_PAGE } from 'app/shared'; +import { Audit } from './audit.model'; +import { AuditsService } from './audits.service'; + +@Component({ + selector: 'jhi-audit', + templateUrl: './audits.component.html' +}) +export class AuditsComponent implements OnInit, OnDestroy { + audits: Audit[]; + fromDate: string; + itemsPerPage: any; + links: any; + queryCount: number; + page: number; + routeData: any; + predicate: any; + previousPage: any; + reverse: boolean; + toDate: string; + totalItems: number; + + constructor( + private auditsService: AuditsService, + private alertService: JhiAlertService, + private parseLinks: JhiParseLinks, + private activatedRoute: ActivatedRoute, + private datePipe: DatePipe, + private router: Router + ) { + this.itemsPerPage = ITEMS_PER_PAGE; + this.routeData = this.activatedRoute.data.subscribe(data => { + this.page = data['pagingParams'].page; + this.previousPage = data['pagingParams'].page; + this.reverse = data['pagingParams'].ascending; + this.predicate = data['pagingParams'].predicate; + }); + } + + ngOnInit() { + this.today(); + this.previousMonth(); + this.loadAll(); + } + + ngOnDestroy() { + this.routeData.unsubscribe(); + } + + previousMonth() { + const dateFormat = 'yyyy-MM-dd'; + let fromDate: Date = new Date(); + + if (fromDate.getMonth() === 0) { + fromDate = new Date(fromDate.getFullYear() - 1, 11, fromDate.getDate()); + } else { + fromDate = new Date(fromDate.getFullYear(), fromDate.getMonth() - 1, fromDate.getDate()); + } + + this.fromDate = this.datePipe.transform(fromDate, dateFormat); + } + + today() { + const dateFormat = 'yyyy-MM-dd'; + // Today + 1 day - needed if the current day must be included + const today: Date = new Date(); + today.setDate(today.getDate() + 1); + const date = new Date(today.getFullYear(), today.getMonth(), today.getDate()); + this.toDate = this.datePipe.transform(date, dateFormat); + } + + loadAll() { + this.auditsService + .query({ + page: this.page - 1, + size: this.itemsPerPage, + sort: this.sort(), + fromDate: this.fromDate, + toDate: this.toDate + }) + .subscribe( + (res: HttpResponse) => this.onSuccess(res.body, res.headers), + (res: HttpResponse) => this.onError(res.body) + ); + } + + sort() { + const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; + if (this.predicate !== 'id') { + result.push('id'); + } + return result; + } + + loadPage(page: number) { + if (page !== this.previousPage) { + this.previousPage = page; + this.transition(); + } + } + + transition() { + this.router.navigate(['/admin/audits'], { + queryParams: { + page: this.page, + sort: this.predicate + ',' + (this.reverse ? 'asc' : 'desc') + } + }); + this.loadAll(); + } + + private onSuccess(data, headers) { + this.links = this.parseLinks.parse(headers.get('link')); + this.totalItems = headers.get('X-Total-Count'); + this.queryCount = this.totalItems; + this.audits = data; + } + + private onError(error) { + this.alertService.error(error.error, error.message, null); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.route.ts new file mode 100644 index 0000000000..9c161dca4a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.route.ts @@ -0,0 +1,17 @@ +import { Injectable } from '@angular/core'; +import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Route } from '@angular/router'; +import { JhiPaginationUtil, JhiResolvePagingParams } from 'ng-jhipster'; + +import { AuditsComponent } from './audits.component'; + +export const auditsRoute: Route = { + path: 'audits', + component: AuditsComponent, + resolve: { + pagingParams: JhiResolvePagingParams + }, + data: { + pageTitle: 'audits.title', + defaulSort: 'auditEventDate,desc' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.service.ts new file mode 100644 index 0000000000..fba5285b6e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/audits/audits.service.ts @@ -0,0 +1,25 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { createRequestOption } from 'app/shared'; +import { SERVER_API_URL } from 'app/app.constants'; +import { Audit } from './audit.model'; + +@Injectable({ providedIn: 'root' }) +export class AuditsService { + constructor(private http: HttpClient) {} + + query(req: any): Observable> { + const params: HttpParams = createRequestOption(req); + params.set('fromDate', req.fromDate); + params.set('toDate', req.toDate); + + const requestURL = SERVER_API_URL + 'uaa/management/audits'; + + return this.http.get(requestURL, { + params, + observe: 'response' + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.component.html new file mode 100644 index 0000000000..c95775a0ab --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.component.html @@ -0,0 +1,46 @@ +
+

Configuration

+ + Filter (by prefix) +

Spring configuration

+ + + + + + + + + + + + + +
PrefixProperties
{{entry.prefix}} +
+
{{key}}
+
+ {{entry.properties[key] | json}} +
+
+
+
+

{{key}}

+ + + + + + + + + + + + + +
PropertyValue
{{item.key}} + {{item.val}} +
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.component.ts new file mode 100644 index 0000000000..6867210c91 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.component.ts @@ -0,0 +1,43 @@ +import { Component, OnInit } from '@angular/core'; + +import { JhiConfigurationService } from './configuration.service'; + +@Component({ + selector: 'jhi-configuration', + templateUrl: './configuration.component.html' +}) +export class JhiConfigurationComponent implements OnInit { + allConfiguration: any = null; + configuration: any = null; + configKeys: any[]; + filter: string; + orderProp: string; + reverse: boolean; + + constructor(private configurationService: JhiConfigurationService) { + this.configKeys = []; + this.filter = ''; + this.orderProp = 'prefix'; + this.reverse = false; + } + + keys(dict): Array { + return dict === undefined ? [] : Object.keys(dict); + } + + ngOnInit() { + this.configurationService.get().subscribe(configuration => { + this.configuration = configuration; + + for (const config of configuration) { + if (config.properties !== undefined) { + this.configKeys.push(Object.keys(config.properties)); + } + } + }); + + this.configurationService.getEnv().subscribe(configuration => { + this.allConfiguration = configuration; + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.route.ts new file mode 100644 index 0000000000..1ff61dfa57 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.route.ts @@ -0,0 +1,11 @@ +import { Route } from '@angular/router'; + +import { JhiConfigurationComponent } from './configuration.component'; + +export const configurationRoute: Route = { + path: 'jhi-configuration', + component: JhiConfigurationComponent, + data: { + pageTitle: 'configuration.title' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.service.ts new file mode 100644 index 0000000000..cd6ba93766 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/configuration/configuration.service.ts @@ -0,0 +1,67 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { SERVER_API_URL } from 'app/app.constants'; + +@Injectable({ providedIn: 'root' }) +export class JhiConfigurationService { + constructor(private http: HttpClient) {} + + get(): Observable { + return this.http.get(SERVER_API_URL + 'management/configprops', { observe: 'response' }).pipe( + map((res: HttpResponse) => { + const properties: any[] = []; + const propertiesObject = this.getConfigPropertiesObjects(res.body); + for (const key in propertiesObject) { + if (propertiesObject.hasOwnProperty(key)) { + properties.push(propertiesObject[key]); + } + } + + return properties.sort((propertyA, propertyB) => { + return propertyA.prefix === propertyB.prefix ? 0 : propertyA.prefix < propertyB.prefix ? -1 : 1; + }); + }) + ); + } + + getConfigPropertiesObjects(res: Object) { + // This code is for Spring Boot 2 + if (res['contexts'] !== undefined) { + for (const key in res['contexts']) { + // If the key is not bootstrap, it will be the ApplicationContext Id + // For default app, it is baseName + // For microservice, it is baseName-1 + if (!key.startsWith('bootstrap')) { + return res['contexts'][key]['beans']; + } + } + } + // by default, use the default ApplicationContext Id + return res['contexts']['gateway']['beans']; + } + + getEnv(): Observable { + return this.http.get(SERVER_API_URL + 'management/env', { observe: 'response' }).pipe( + map((res: HttpResponse) => { + const properties: any = {}; + const propertySources = res.body['propertySources']; + + for (const propertyObject of propertySources) { + const name = propertyObject['name']; + const detailProperties = propertyObject['properties']; + const vals: any[] = []; + for (const keyDetail in detailProperties) { + if (detailProperties.hasOwnProperty(keyDetail)) { + vals.push({ key: keyDetail, val: detailProperties[keyDetail]['value'] }); + } + } + properties[name] = vals; + } + return properties; + }) + ); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/docs/docs.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/docs/docs.component.html new file mode 100644 index 0000000000..30efbbb93e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/docs/docs.component.html @@ -0,0 +1,2 @@ + diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/docs/docs.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/docs/docs.component.ts new file mode 100644 index 0000000000..b338e7c3a6 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/docs/docs.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'jhi-docs', + templateUrl: './docs.component.html' +}) +export class JhiDocsComponent { + constructor() {} +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/docs/docs.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/docs/docs.route.ts new file mode 100644 index 0000000000..9a3a3f80c2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/docs/docs.route.ts @@ -0,0 +1,11 @@ +import { Route } from '@angular/router'; + +import { JhiDocsComponent } from './docs.component'; + +export const docsRoute: Route = { + path: 'docs', + component: JhiDocsComponent, + data: { + pageTitle: 'global.menu.admin.apidocs' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway-route.model.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway-route.model.ts new file mode 100644 index 0000000000..d8a304ea3c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway-route.model.ts @@ -0,0 +1,3 @@ +export class GatewayRoute { + constructor(public path: string, public serviceId: string, public serviceInstances: any[]) {} +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway-routes.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway-routes.service.ts new file mode 100644 index 0000000000..ad3a2eee5c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway-routes.service.ts @@ -0,0 +1,15 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; +import { GatewayRoute } from './gateway-route.model'; + +@Injectable() +export class GatewayRoutesService { + constructor(private http: HttpClient) {} + + findAll(): Observable { + return this.http.get(SERVER_API_URL + 'api/gateway/routes/'); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway.component.html new file mode 100644 index 0000000000..7154c4b3b7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway.component.html @@ -0,0 +1,50 @@ +
+

+ Gateway + +

+

Current routes

+
+ + + + + + + + + + + + + + + +
URLServiceAvailable servers
{{route.path}}{{route.serviceId}} +
+ Warning: no server available! +
+
+ + + + + + +
{{instance.uri}} +
{{instance.instanceInfo.status}}
+
?
+
+ + + {{entry.key}} + {{entry.value}} + + +
+
+
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway.component.ts new file mode 100644 index 0000000000..55bc9cc42f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway.component.ts @@ -0,0 +1,28 @@ +import { Component, OnInit } from '@angular/core'; + +import { GatewayRoutesService } from './gateway-routes.service'; +import { GatewayRoute } from './gateway-route.model'; + +@Component({ + selector: 'jhi-gateway', + templateUrl: './gateway.component.html', + providers: [GatewayRoutesService] +}) +export class JhiGatewayComponent implements OnInit { + gatewayRoutes: GatewayRoute[]; + updatingRoutes: Boolean; + + constructor(private gatewayRoutesService: GatewayRoutesService) {} + + ngOnInit() { + this.refresh(); + } + + refresh() { + this.updatingRoutes = true; + this.gatewayRoutesService.findAll().subscribe(gatewayRoutes => { + this.gatewayRoutes = gatewayRoutes; + this.updatingRoutes = false; + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway.route.ts new file mode 100644 index 0000000000..fffcd6a8a8 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/gateway/gateway.route.ts @@ -0,0 +1,11 @@ +import { Route } from '@angular/router'; + +import { JhiGatewayComponent } from './gateway.component'; + +export const gatewayRoute: Route = { + path: 'gateway', + component: JhiGatewayComponent, + data: { + pageTitle: 'gateway.title' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health-modal.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health-modal.component.html new file mode 100644 index 0000000000..4f698460d0 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health-modal.component.html @@ -0,0 +1,36 @@ + + + diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health-modal.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health-modal.component.ts new file mode 100644 index 0000000000..28128bf321 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health-modal.component.ts @@ -0,0 +1,41 @@ +import { Component } from '@angular/core'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; + +import { JhiHealthService } from './health.service'; + +@Component({ + selector: 'jhi-health-modal', + templateUrl: './health-modal.component.html' +}) +export class JhiHealthModalComponent { + currentHealth: any; + + constructor(private healthService: JhiHealthService, public activeModal: NgbActiveModal) {} + + baseName(name) { + return this.healthService.getBaseName(name); + } + + subSystemName(name) { + return this.healthService.getSubSystemName(name); + } + + readableValue(value: number) { + if (this.currentHealth.name === 'diskSpace') { + // Should display storage space in an human readable unit + const val = value / 1073741824; + if (val > 1) { + // Value + return val.toFixed(2) + ' GB'; + } else { + return (value / 1048576).toFixed(2) + ' MB'; + } + } + + if (typeof value === 'object') { + return JSON.stringify(value); + } else { + return value.toString(); + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.component.html new file mode 100644 index 0000000000..c17bde9af1 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.component.html @@ -0,0 +1,34 @@ +
+

+ Health Checks + +

+
+ + + + + + + + + + + + + + + +
Service NameStatusDetails
{{'health.indicator.' + baseName(health.name) | translate}} {{subSystemName(health.name)}} + + {{health.status}} + + + + + +
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.component.ts new file mode 100644 index 0000000000..ada3ef62f4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.component.ts @@ -0,0 +1,66 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; + +import { JhiHealthService } from './health.service'; +import { JhiHealthModalComponent } from './health-modal.component'; + +@Component({ + selector: 'jhi-health', + templateUrl: './health.component.html' +}) +export class JhiHealthCheckComponent implements OnInit { + healthData: any; + updatingHealth: boolean; + + constructor(private modalService: NgbModal, private healthService: JhiHealthService) {} + + ngOnInit() { + this.refresh(); + } + + baseName(name: string) { + return this.healthService.getBaseName(name); + } + + getBadgeClass(statusState) { + if (statusState === 'UP') { + return 'badge-success'; + } else { + return 'badge-danger'; + } + } + + refresh() { + this.updatingHealth = true; + + this.healthService.checkHealth().subscribe( + health => { + this.healthData = this.healthService.transformHealthData(health); + this.updatingHealth = false; + }, + error => { + if (error.status === 503) { + this.healthData = this.healthService.transformHealthData(error.error); + this.updatingHealth = false; + } + } + ); + } + + showHealth(health: any) { + const modalRef = this.modalService.open(JhiHealthModalComponent); + modalRef.componentInstance.currentHealth = health; + modalRef.result.then( + result => { + // Left blank intentionally, nothing to do here + }, + reason => { + // Left blank intentionally, nothing to do here + } + ); + } + + subSystemName(name: string) { + return this.healthService.getSubSystemName(name); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.route.ts new file mode 100644 index 0000000000..df801e0c0e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.route.ts @@ -0,0 +1,11 @@ +import { Route } from '@angular/router'; + +import { JhiHealthCheckComponent } from './health.component'; + +export const healthRoute: Route = { + path: 'jhi-health', + component: JhiHealthCheckComponent, + data: { + pageTitle: 'health.title' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.service.ts new file mode 100644 index 0000000000..4c1b0e5ec8 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/health/health.service.ts @@ -0,0 +1,133 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; + +@Injectable({ providedIn: 'root' }) +export class JhiHealthService { + separator: string; + + constructor(private http: HttpClient) { + this.separator = '.'; + } + + checkHealth(): Observable { + return this.http.get(SERVER_API_URL + 'management/health'); + } + + transformHealthData(data): any { + const response = []; + this.flattenHealthData(response, null, data.details); + return response; + } + + getBaseName(name): string { + if (name) { + const split = name.split('.'); + return split[0]; + } + } + + getSubSystemName(name): string { + if (name) { + const split = name.split('.'); + split.splice(0, 1); + const remainder = split.join('.'); + return remainder ? ' - ' + remainder : ''; + } + } + + /* private methods */ + private addHealthObject(result, isLeaf, healthObject, name): any { + const healthData: any = { + name + }; + + const details = {}; + let hasDetails = false; + + for (const key in healthObject) { + if (healthObject.hasOwnProperty(key)) { + const value = healthObject[key]; + if (key === 'status' || key === 'error') { + healthData[key] = value; + } else { + if (!this.isHealthObject(value)) { + details[key] = value; + hasDetails = true; + } + } + } + } + + // Add the details + if (hasDetails) { + healthData.details = details; + } + + // Only add nodes if they provide additional information + if (isLeaf || hasDetails || healthData.error) { + result.push(healthData); + } + return healthData; + } + + private flattenHealthData(result, path, data): any { + for (const key in data) { + if (data.hasOwnProperty(key)) { + const value = data[key]; + if (this.isHealthObject(value)) { + if (this.hasSubSystem(value)) { + this.addHealthObject(result, false, value, this.getModuleName(path, key)); + this.flattenHealthData(result, this.getModuleName(path, key), value); + } else { + this.addHealthObject(result, true, value, this.getModuleName(path, key)); + } + } + } + } + return result; + } + + private getModuleName(path, name): string { + let result; + if (path && name) { + result = path + this.separator + name; + } else if (path) { + result = path; + } else if (name) { + result = name; + } else { + result = ''; + } + return result; + } + + private hasSubSystem(healthObject): boolean { + let result = false; + + for (const key in healthObject) { + if (healthObject.hasOwnProperty(key)) { + const value = healthObject[key]; + if (value && value.status) { + result = true; + } + } + } + return result; + } + + private isHealthObject(healthObject): boolean { + let result = false; + + for (const key in healthObject) { + if (healthObject.hasOwnProperty(key)) { + if (key === 'status') { + result = true; + } + } + } + return result; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/index.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/index.ts new file mode 100644 index 0000000000..c5bfdb81a7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/index.ts @@ -0,0 +1,32 @@ +export * from './audits/audits.component'; +export * from './audits/audits.service'; +export * from './audits/audits.route'; +export * from './audits/audit.model'; +export * from './audits/audit-data.model'; +export * from './configuration/configuration.component'; +export * from './configuration/configuration.service'; +export * from './configuration/configuration.route'; +export * from './docs/docs.component'; +export * from './docs/docs.route'; +export * from './health/health.component'; +export * from './health/health-modal.component'; +export * from './health/health.service'; +export * from './health/health.route'; +export * from './logs/logs.component'; +export * from './logs/logs.service'; +export * from './logs/logs.route'; +export * from './logs/log.model'; +export * from './gateway/gateway.component'; +export * from './gateway/gateway-routes.service'; +export * from './gateway/gateway.route'; +export * from './gateway/gateway-route.model'; +export * from './metrics/metrics.component'; +export * from './metrics/metrics-modal.component'; +export * from './metrics/metrics.service'; +export * from './metrics/metrics.route'; +export * from './user-management/user-management-update.component'; +export * from './user-management/user-management-delete-dialog.component'; +export * from './user-management/user-management-detail.component'; +export * from './user-management/user-management.component'; +export * from './user-management/user-management.route'; +export * from './admin.route'; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/log.model.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/log.model.ts new file mode 100644 index 0000000000..3f27b6728c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/log.model.ts @@ -0,0 +1,3 @@ +export class Log { + constructor(public name: string, public level: string) {} +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.component.html new file mode 100644 index 0000000000..0a3f7de683 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.component.html @@ -0,0 +1,28 @@ +
+

Logs

+ +

There are {{ loggers.length }} loggers.

+ + Filter + + + + + + + + + + + + + +
NameLevel
{{logger.name | slice:0:140}} + + + + + + +
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.component.ts new file mode 100644 index 0000000000..28547f9ae6 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.component.ts @@ -0,0 +1,32 @@ +import { Component, OnInit } from '@angular/core'; + +import { Log } from './log.model'; +import { LogsService } from './logs.service'; + +@Component({ + selector: 'jhi-logs', + templateUrl: './logs.component.html' +}) +export class LogsComponent implements OnInit { + loggers: Log[]; + filter: string; + orderProp: string; + reverse: boolean; + + constructor(private logsService: LogsService) { + this.filter = ''; + this.orderProp = 'name'; + this.reverse = false; + } + + ngOnInit() { + this.logsService.findAll().subscribe(response => (this.loggers = response.body)); + } + + changeLevel(name: string, level: string) { + const log = new Log(name, level); + this.logsService.changeLevel(log).subscribe(() => { + this.logsService.findAll().subscribe(response => (this.loggers = response.body)); + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.route.ts new file mode 100644 index 0000000000..1de755c758 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.route.ts @@ -0,0 +1,11 @@ +import { Route } from '@angular/router'; + +import { LogsComponent } from './logs.component'; + +export const logsRoute: Route = { + path: 'logs', + component: LogsComponent, + data: { + pageTitle: 'logs.title' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.service.ts new file mode 100644 index 0000000000..71a596b0ab --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/logs/logs.service.ts @@ -0,0 +1,19 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; +import { Log } from './log.model'; + +@Injectable({ providedIn: 'root' }) +export class LogsService { + constructor(private http: HttpClient) {} + + changeLevel(log: Log): Observable> { + return this.http.put(SERVER_API_URL + 'management/logs', log, { observe: 'response' }); + } + + findAll(): Observable> { + return this.http.get(SERVER_API_URL + 'management/logs', { observe: 'response' }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics-modal.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics-modal.component.html new file mode 100644 index 0000000000..72da2ff6ce --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics-modal.component.html @@ -0,0 +1,56 @@ + + + + diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics-modal.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics-modal.component.ts new file mode 100644 index 0000000000..24585fb44e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics-modal.component.ts @@ -0,0 +1,46 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + selector: 'jhi-metrics-modal', + templateUrl: './metrics-modal.component.html' +}) +export class JhiMetricsMonitoringModalComponent implements OnInit { + threadDumpFilter: any; + threadDump: any; + threadDumpAll = 0; + threadDumpBlocked = 0; + threadDumpRunnable = 0; + threadDumpTimedWaiting = 0; + threadDumpWaiting = 0; + + constructor(public activeModal: NgbActiveModal) {} + + ngOnInit() { + this.threadDump.forEach(value => { + if (value.threadState === 'RUNNABLE') { + this.threadDumpRunnable += 1; + } else if (value.threadState === 'WAITING') { + this.threadDumpWaiting += 1; + } else if (value.threadState === 'TIMED_WAITING') { + this.threadDumpTimedWaiting += 1; + } else if (value.threadState === 'BLOCKED') { + this.threadDumpBlocked += 1; + } + }); + + this.threadDumpAll = this.threadDumpRunnable + this.threadDumpWaiting + this.threadDumpTimedWaiting + this.threadDumpBlocked; + } + + getBadgeClass(threadState) { + if (threadState === 'RUNNABLE') { + return 'badge-success'; + } else if (threadState === 'WAITING') { + return 'badge-info'; + } else if (threadState === 'TIMED_WAITING') { + return 'badge-warning'; + } else if (threadState === 'BLOCKED') { + return 'badge-danger'; + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.component.html new file mode 100644 index 0000000000..2cf13dad55 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.component.html @@ -0,0 +1,216 @@ +
+

+ Application Metrics + +

+ +

JVM Metrics

+
+
+ Memory +

Total Memory ({{metrics.gauges['jvm.memory.total.used'].value / 1048576 | number:'1.0-0'}}M / {{metrics.gauges['jvm.memory.total.max'].value / 1048576 | number:'1.0-0'}}M)

+ + {{metrics.gauges['jvm.memory.total.used'].value * 100 / metrics.gauges['jvm.memory.total.max'].value | number:'1.0-0'}}% + +

Heap Memory ({{metrics.gauges['jvm.memory.heap.used'].value / 1048576 | number:'1.0-0'}}M / {{metrics.gauges['jvm.memory.heap.max'].value / 1048576 | number:'1.0-0'}}M)

+ + {{metrics.gauges['jvm.memory.heap.used'].value * 100 / metrics.gauges['jvm.memory.heap.max'].value | number:'1.0-0'}}% + +

Non-Heap Memory ({{metrics.gauges['jvm.memory.non-heap.used'].value / 1048576 | number:'1.0-0'}}M / {{metrics.gauges['jvm.memory.non-heap.committed'].value / 1048576 | number:'1.0-0'}}M)

+ + {{metrics.gauges['jvm.memory.non-heap.used'].value * 100 / metrics.gauges['jvm.memory.non-heap.committed'].value | number:'1.0-0'}}% + +
+
+ Threads (Total: {{metrics.gauges['jvm.threads.count'].value}}) +

Runnable {{metrics.gauges['jvm.threads.runnable.count'].value}}

+ + {{metrics.gauges['jvm.threads.runnable.count'].value * 100 / metrics.gauges['jvm.threads.count'].value | number:'1.0-0'}}% + +

Timed Waiting ({{metrics.gauges['jvm.threads.timed_waiting.count'].value}})

+ + {{metrics.gauges['jvm.threads.timed_waiting.count'].value * 100 / metrics.gauges['jvm.threads.count'].value | number:'1.0-0'}}% + +

Waiting ({{metrics.gauges['jvm.threads.waiting.count'].value}})

+ + {{metrics.gauges['jvm.threads.waiting.count'].value * 100 / metrics.gauges['jvm.threads.count'].value | number:'1.0-0'}}% + +

Blocked ({{metrics.gauges['jvm.threads.blocked.count'].value}})

+ + {{metrics.gauges['jvm.threads.blocked.count'].value * 100 / metrics.gauges['jvm.threads.count'].value | number:'1.0-0'}}% + +
+
+ Garbage collections +
+
Mark Sweep count
+
{{metrics.gauges['jvm.garbage.PS-MarkSweep.count'].value}}
+
+
+
Mark Sweep time
+
{{metrics.gauges['jvm.garbage.PS-MarkSweep.time'].value}}ms
+
+
+
Scavenge count
+
{{metrics.gauges['jvm.garbage.PS-Scavenge.count'].value}}
+
+
+
Scavenge time
+
{{metrics.gauges['jvm.garbage.PS-Scavenge.time'].value}}ms
+
+
+
+
Updating...
+ +

HTTP requests (events per second)

+

+ Active requests {{metrics.counters['com.codahale.metrics.servlet.InstrumentedFilter.activeRequests'].count | number:'1.0-0'}} - Total requests {{metrics.timers['com.codahale.metrics.servlet.InstrumentedFilter.requests'].count | number:'1.0-0'}} +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeCountMeanAverage (1 min)Average (5 min)Average (15 min)
OK + + {{metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].count}} + + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].mean_rate) | number:'1.0-2'}} + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m1_rate) | number:'1.0-2'}} + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m5_rate) | number:'1.0-2'}} + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.ok'].m15_rate) | number:'1.0-2'}} +
Not Found + + {{metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].count}} + + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].mean_rate) | number:'1.0-2'}} + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m1_rate) | number:'1.0-2'}} + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m5_rate) | number:'1.0-2'}} + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.notFound'].m15_rate) | number:'1.0-2'}} +
Server error + + {{metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].count}} + + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].mean_rate) | number:'1.0-2'}} + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m1_rate) | number:'1.0-2'}} + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m5_rate) | number:'1.0-2'}} + + {{filterNaN(metrics.meters['com.codahale.metrics.servlet.InstrumentedFilter.responseCodes.serverError'].m15_rate) | number:'1.0-2'}} +
+
+ +

Services statistics (time in millisecond)

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Service nameCountMeanMinp50p75p95p99Max
{{entry.key}}{{entry.value.count}}{{entry.value.mean * 1024 | number:'1.0-0'}}{{entry.value.min * 1024 | number:'1.0-0'}}{{entry.value.p50 * 1024 | number:'1.0-0'}}{{entry.value.p75 * 1024 | number:'1.0-0'}}{{entry.value.p95 * 1024 | number:'1.0-0'}}{{entry.value.p99 * 1024 | number:'1.0-0'}}{{entry.value.max * 1024 | number:'1.0-0'}}
+
+

DataSource statistics (time in millisecond)

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Usage ({{metrics.gauges['HikariPool-1.pool.ActiveConnections'].value}} / {{metrics.gauges['HikariPool-1.pool.TotalConnections'].value}})CountMeanMinp50p75p95p99Max
+
+ + {{metrics.gauges['HikariPool-1.pool.ActiveConnections'].value * 100 / metrics.gauges['HikariPool-1.pool.TotalConnections'].value | number:'1.0-0'}}% + +
+
{{metrics.histograms['HikariPool-1.pool.Usage'].count}}{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].mean) | number:'1.0-2'}}{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].min) | number:'1.0-2'}}{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p50) | number:'1.0-2'}}{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p75) | number:'1.0-2'}}{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p95) | number:'1.0-2'}}{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].p99) | number:'1.0-2'}}{{filterNaN(metrics.histograms['HikariPool-1.pool.Usage'].max) | number:'1.0-2'}}
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.component.ts new file mode 100644 index 0000000000..c86c9f1c97 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.component.ts @@ -0,0 +1,77 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; + +import { JhiMetricsMonitoringModalComponent } from './metrics-modal.component'; +import { JhiMetricsService } from './metrics.service'; + +@Component({ + selector: 'jhi-metrics', + templateUrl: './metrics.component.html' +}) +export class JhiMetricsMonitoringComponent implements OnInit { + metrics: any = {}; + cachesStats: any = {}; + servicesStats: any = {}; + updatingMetrics = true; + JCACHE_KEY: string; + + constructor(private modalService: NgbModal, private metricsService: JhiMetricsService) { + this.JCACHE_KEY = 'jcache.statistics'; + } + + ngOnInit() { + this.refresh(); + } + + refresh() { + this.updatingMetrics = true; + this.metricsService.getMetrics().subscribe(metrics => { + this.metrics = metrics; + this.updatingMetrics = false; + this.servicesStats = {}; + this.cachesStats = {}; + Object.keys(metrics.timers).forEach(key => { + const value = metrics.timers[key]; + if (key.includes('web.rest') || key.includes('service')) { + this.servicesStats[key] = value; + } + }); + Object.keys(metrics.gauges).forEach(key => { + if (key.includes('jcache.statistics')) { + const value = metrics.gauges[key].value; + // remove gets or puts + const index = key.lastIndexOf('.'); + const newKey = key.substr(0, index); + + // Keep the name of the domain + this.cachesStats[newKey] = { + name: this.JCACHE_KEY.length, + value + }; + } + }); + }); + } + + refreshThreadDumpData() { + this.metricsService.threadDump().subscribe(data => { + const modalRef = this.modalService.open(JhiMetricsMonitoringModalComponent, { size: 'lg' }); + modalRef.componentInstance.threadDump = data.threads; + modalRef.result.then( + result => { + // Left blank intentionally, nothing to do here + }, + reason => { + // Left blank intentionally, nothing to do here + } + ); + }); + } + + filterNaN(input) { + if (isNaN(input)) { + return 0; + } + return input; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.route.ts new file mode 100644 index 0000000000..ba8f59363a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.route.ts @@ -0,0 +1,11 @@ +import { Route } from '@angular/router'; + +import { JhiMetricsMonitoringComponent } from './metrics.component'; + +export const metricsRoute: Route = { + path: 'jhi-metrics', + component: JhiMetricsMonitoringComponent, + data: { + pageTitle: 'metrics.title' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.service.ts new file mode 100644 index 0000000000..16ccc07324 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/metrics/metrics.service.ts @@ -0,0 +1,18 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; + +@Injectable({ providedIn: 'root' }) +export class JhiMetricsService { + constructor(private http: HttpClient) {} + + getMetrics(): Observable { + return this.http.get(SERVER_API_URL + 'management/metrics'); + } + + threadDump(): Observable { + return this.http.get(SERVER_API_URL + 'management/threaddump'); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.html new file mode 100644 index 0000000000..5b2eec36e2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.html @@ -0,0 +1,19 @@ +
+ + + +
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.ts new file mode 100644 index 0000000000..d7674f6cd9 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.ts @@ -0,0 +1,29 @@ +import { Component } from '@angular/core'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { JhiEventManager } from 'ng-jhipster'; + +import { User, UserService } from 'app/core'; + +@Component({ + selector: 'jhi-user-mgmt-delete-dialog', + templateUrl: './user-management-delete-dialog.component.html' +}) +export class UserMgmtDeleteDialogComponent { + user: User; + + constructor(private userService: UserService, public activeModal: NgbActiveModal, private eventManager: JhiEventManager) {} + + clear() { + this.activeModal.dismiss('cancel'); + } + + confirmDelete(login) { + this.userService.delete(login).subscribe(response => { + this.eventManager.broadcast({ + name: 'userListModification', + content: 'Deleted a user' + }); + this.activeModal.dismiss(true); + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-detail.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-detail.component.html new file mode 100644 index 0000000000..0fee91b953 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-detail.component.html @@ -0,0 +1,49 @@ +
+
+
+

+ User [{{user.login}}] +

+
+
Login
+
+ {{user.login}} + + +
+
First Name
+
{{user.firstName}}
+
Last Name
+
{{user.lastName}}
+
Email
+
{{user.email}}
+
Lang Key
+
{{user.langKey}}
+
Created By
+
{{user.createdBy}}
+
Created Date
+
{{user.createdDate | date:'dd/MM/yy HH:mm' }}
+
Last Modified By
+
{{user.lastModifiedBy}}
+
Last Modified Date
+
{{user.lastModifiedDate | date:'dd/MM/yy HH:mm'}}
+
Profiles
+
+
    +
  • + {{authority}} +
  • +
+
+
+ +
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-detail.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-detail.component.ts new file mode 100644 index 0000000000..0b323d89a0 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-detail.component.ts @@ -0,0 +1,20 @@ +import { Component, OnInit, OnDestroy } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +import { User } from 'app/core'; + +@Component({ + selector: 'jhi-user-mgmt-detail', + templateUrl: './user-management-detail.component.html' +}) +export class UserMgmtDetailComponent implements OnInit { + user: User; + + constructor(private route: ActivatedRoute) {} + + ngOnInit() { + this.route.data.subscribe(({ user }) => { + this.user = user.body ? user.body : user; + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-update.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-update.component.html new file mode 100644 index 0000000000..3d1975ae86 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-update.component.html @@ -0,0 +1,124 @@ +
+
+
+

+ Create or edit a User +

+
+ +
+ + +
+ +
+ + + +
+ + This field is required. + + + + This field cannot be longer than 50 characters. + + + + This field can only contain letters, digits and e-mail addresses. + +
+
+
+ + + +
+ + This field cannot be longer than 50 characters. + +
+
+
+ + + +
+ + This field cannot be longer than 50 characters. + +
+
+
+ + + +
+ + This field is required. + + + + This field cannot be longer than 100 characters. + + + + This field is required to be at least 5 characters. + + + + Your email is invalid. + +
+
+
+ +
+ +
+ + +
+
+ + +
+
+
+ + +
+
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-update.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-update.component.ts new file mode 100644 index 0000000000..84e06c5bdf --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management-update.component.ts @@ -0,0 +1,58 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; + +import { JhiLanguageHelper, User, UserService } from 'app/core'; + +@Component({ + selector: 'jhi-user-mgmt-update', + templateUrl: './user-management-update.component.html' +}) +export class UserMgmtUpdateComponent implements OnInit { + user: User; + languages: any[]; + authorities: any[]; + isSaving: boolean; + + constructor( + private languageHelper: JhiLanguageHelper, + private userService: UserService, + private route: ActivatedRoute, + private router: Router + ) {} + + ngOnInit() { + this.isSaving = false; + this.route.data.subscribe(({ user }) => { + this.user = user.body ? user.body : user; + }); + this.authorities = []; + this.userService.authorities().subscribe(authorities => { + this.authorities = authorities; + }); + this.languageHelper.getAll().then(languages => { + this.languages = languages; + }); + } + + previousState() { + window.history.back(); + } + + save() { + this.isSaving = true; + if (this.user.id !== null) { + this.userService.update(this.user).subscribe(response => this.onSaveSuccess(response), () => this.onSaveError()); + } else { + this.userService.create(this.user).subscribe(response => this.onSaveSuccess(response), () => this.onSaveError()); + } + } + + private onSaveSuccess(result) { + this.isSaving = false; + this.previousState(); + } + + private onSaveError() { + this.isSaving = false; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management.component.html new file mode 100644 index 0000000000..7cbf79c460 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management.component.html @@ -0,0 +1,79 @@ +
+

+ Users + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID Login Email Lang Key ProfilesCreated Date Last Modified By Last Modified Date
{{user.id}}{{user.login}}{{user.email}} + + + {{user.langKey}} +
+ {{ authority }} +
+
{{user.createdDate | date:'dd/MM/yy HH:mm'}}{{user.lastModifiedBy}}{{user.lastModifiedDate | date:'dd/MM/yy HH:mm'}} +
+ + + +
+
+
+
+
+ +
+
+ +
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management.component.ts new file mode 100644 index 0000000000..9ef046d655 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management.component.ts @@ -0,0 +1,146 @@ +import { Component, OnInit, OnDestroy } from '@angular/core'; +import { HttpResponse } from '@angular/common/http'; +import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; + +import { ActivatedRoute, Router } from '@angular/router'; +import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster'; + +import { ITEMS_PER_PAGE } from 'app/shared'; +import { Principal, UserService, User } from 'app/core'; +import { UserMgmtDeleteDialogComponent } from 'app/admin'; + +@Component({ + selector: 'jhi-user-mgmt', + templateUrl: './user-management.component.html' +}) +export class UserMgmtComponent implements OnInit, OnDestroy { + currentAccount: any; + users: User[]; + error: any; + success: any; + routeData: any; + links: any; + totalItems: any; + queryCount: any; + itemsPerPage: any; + page: any; + predicate: any; + previousPage: any; + reverse: any; + + constructor( + private userService: UserService, + private alertService: JhiAlertService, + private principal: Principal, + private parseLinks: JhiParseLinks, + private activatedRoute: ActivatedRoute, + private router: Router, + private eventManager: JhiEventManager, + private modalService: NgbModal + ) { + this.itemsPerPage = ITEMS_PER_PAGE; + this.routeData = this.activatedRoute.data.subscribe(data => { + this.page = data['pagingParams'].page; + this.previousPage = data['pagingParams'].page; + this.reverse = data['pagingParams'].ascending; + this.predicate = data['pagingParams'].predicate; + }); + } + + ngOnInit() { + this.principal.identity().then(account => { + this.currentAccount = account; + this.loadAll(); + this.registerChangeInUsers(); + }); + } + + ngOnDestroy() { + this.routeData.unsubscribe(); + } + + registerChangeInUsers() { + this.eventManager.subscribe('userListModification', response => this.loadAll()); + } + + setActive(user, isActivated) { + user.activated = isActivated; + + this.userService.update(user).subscribe(response => { + if (response.status === 200) { + this.error = null; + this.success = 'OK'; + this.loadAll(); + } else { + this.success = null; + this.error = 'ERROR'; + } + }); + } + + loadAll() { + this.userService + .query({ + page: this.page - 1, + size: this.itemsPerPage, + sort: this.sort() + }) + .subscribe( + (res: HttpResponse) => this.onSuccess(res.body, res.headers), + (res: HttpResponse) => this.onError(res.body) + ); + } + + trackIdentity(index, item: User) { + return item.id; + } + + sort() { + const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; + if (this.predicate !== 'id') { + result.push('id'); + } + return result; + } + + loadPage(page: number) { + if (page !== this.previousPage) { + this.previousPage = page; + this.transition(); + } + } + + transition() { + this.router.navigate(['/admin/user-management'], { + queryParams: { + page: this.page, + sort: this.predicate + ',' + (this.reverse ? 'asc' : 'desc') + } + }); + this.loadAll(); + } + + deleteUser(user: User) { + const modalRef = this.modalService.open(UserMgmtDeleteDialogComponent, { size: 'lg', backdrop: 'static' }); + modalRef.componentInstance.user = user; + modalRef.result.then( + result => { + // Left blank intentionally, nothing to do here + }, + reason => { + // Left blank intentionally, nothing to do here + } + ); + } + + private onSuccess(data, headers) { + this.links = this.parseLinks.parse(headers.get('link')); + this.totalItems = headers.get('X-Total-Count'); + this.queryCount = this.totalItems; + this.users = data; + } + + private onError(error) { + this.alertService.error(error.error, error.message, null); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management.route.ts new file mode 100644 index 0000000000..29675e93d8 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/admin/user-management/user-management.route.ts @@ -0,0 +1,68 @@ +import { Injectable } from '@angular/core'; +import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes, CanActivate } from '@angular/router'; +import { JhiPaginationUtil, JhiResolvePagingParams } from 'ng-jhipster'; + +import { Principal, User, UserService } from 'app/core'; +import { UserMgmtComponent } from './user-management.component'; +import { UserMgmtDetailComponent } from './user-management-detail.component'; +import { UserMgmtUpdateComponent } from './user-management-update.component'; + +@Injectable({ providedIn: 'root' }) +export class UserResolve implements CanActivate { + constructor(private principal: Principal) {} + + canActivate() { + return this.principal.identity().then(account => this.principal.hasAnyAuthority(['ROLE_ADMIN'])); + } +} + +@Injectable({ providedIn: 'root' }) +export class UserMgmtResolve implements Resolve { + constructor(private service: UserService) {} + + resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { + const id = route.params['login'] ? route.params['login'] : null; + if (id) { + return this.service.find(id); + } + return new User(); + } +} + +export const userMgmtRoute: Routes = [ + { + path: 'user-management', + component: UserMgmtComponent, + resolve: { + pagingParams: JhiResolvePagingParams + }, + data: { + pageTitle: 'userManagement.home.title', + defaultSort: 'id,asc' + } + }, + { + path: 'user-management/:login/view', + component: UserMgmtDetailComponent, + resolve: { + user: UserMgmtResolve + }, + data: { + pageTitle: 'userManagement.home.title' + } + }, + { + path: 'user-management/new', + component: UserMgmtUpdateComponent, + resolve: { + user: UserMgmtResolve + } + }, + { + path: 'user-management/:login/edit', + component: UserMgmtUpdateComponent, + resolve: { + user: UserMgmtResolve + } + } +]; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app-routing.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app-routing.module.ts new file mode 100644 index 0000000000..8491f5ffea --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app-routing.module.ts @@ -0,0 +1,23 @@ +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { errorRoute, navbarRoute } from './layouts'; +import { DEBUG_INFO_ENABLED } from 'app/app.constants'; + +const LAYOUT_ROUTES = [navbarRoute, ...errorRoute]; + +@NgModule({ + imports: [ + RouterModule.forRoot( + [ + ...LAYOUT_ROUTES, + { + path: 'admin', + loadChildren: './admin/admin.module#GatewayAdminModule' + } + ], + { useHash: true, enableTracing: DEBUG_INFO_ENABLED } + ) + ], + exports: [RouterModule] +}) +export class GatewayAppRoutingModule {} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app.constants.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app.constants.ts new file mode 100644 index 0000000000..9760a49a91 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app.constants.ts @@ -0,0 +1,8 @@ +// These constants are injected via webpack environment variables. +// You can add more variables in webpack.common.js or in profile specific webpack..js files. +// If you change the values in the webpack config files, you need to re run webpack to update the application + +export const VERSION = process.env.VERSION; +export const DEBUG_INFO_ENABLED: boolean = !!process.env.DEBUG_INFO_ENABLED; +export const SERVER_API_URL = process.env.SERVER_API_URL; +export const BUILD_TIMESTAMP = process.env.BUILD_TIMESTAMP; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app.main.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app.main.ts new file mode 100644 index 0000000000..0404cd69e8 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app.main.ts @@ -0,0 +1,14 @@ +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { ProdConfig } from './blocks/config/prod.config'; +import { GatewayAppModule } from './app.module'; + +ProdConfig(); + +if (module['hot']) { + module['hot'].accept(); +} + +platformBrowserDynamic() + .bootstrapModule(GatewayAppModule, { preserveWhitespaces: true }) + .then(success => console.log(`Application started`)) + .catch(err => console.error(err)); diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app.module.ts new file mode 100644 index 0000000000..a490c03db8 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/app.module.ts @@ -0,0 +1,62 @@ +import './vendor.ts'; + +import { NgModule, Injector } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { HTTP_INTERCEPTORS } from '@angular/common/http'; +import { NgbDatepickerConfig } from '@ng-bootstrap/ng-bootstrap'; +import { Ng2Webstorage } from 'ngx-webstorage'; +import { JhiEventManager } from 'ng-jhipster'; + +import { AuthExpiredInterceptor } from './blocks/interceptor/auth-expired.interceptor'; +import { ErrorHandlerInterceptor } from './blocks/interceptor/errorhandler.interceptor'; +import { NotificationInterceptor } from './blocks/interceptor/notification.interceptor'; +import { GatewaySharedModule } from 'app/shared'; +import { GatewayCoreModule } from 'app/core'; +import { GatewayAppRoutingModule } from './app-routing.module'; +import { GatewayHomeModule } from './home/home.module'; +import { GatewayAccountModule } from './account/account.module'; +import { GatewayEntityModule } from './entities/entity.module'; +import * as moment from 'moment'; +// jhipster-needle-angular-add-module-import JHipster will add new module here +import { JhiMainComponent, NavbarComponent, FooterComponent, PageRibbonComponent, ActiveMenuDirective, ErrorComponent } from './layouts'; + +@NgModule({ + imports: [ + BrowserModule, + GatewayAppRoutingModule, + Ng2Webstorage.forRoot({ prefix: 'jhi', separator: '-' }), + GatewaySharedModule, + GatewayCoreModule, + GatewayHomeModule, + GatewayAccountModule, + GatewayEntityModule + // jhipster-needle-angular-add-module JHipster will add new module here + ], + declarations: [JhiMainComponent, NavbarComponent, ErrorComponent, PageRibbonComponent, ActiveMenuDirective, FooterComponent], + providers: [ + { + provide: HTTP_INTERCEPTORS, + useClass: AuthExpiredInterceptor, + multi: true, + deps: [Injector] + }, + { + provide: HTTP_INTERCEPTORS, + useClass: ErrorHandlerInterceptor, + multi: true, + deps: [JhiEventManager] + }, + { + provide: HTTP_INTERCEPTORS, + useClass: NotificationInterceptor, + multi: true, + deps: [Injector] + } + ], + bootstrap: [JhiMainComponent] +}) +export class GatewayAppModule { + constructor(private dpConfig: NgbDatepickerConfig) { + this.dpConfig.minDate = { year: moment().year() - 100, month: 1, day: 1 }; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/config/prod.config.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/config/prod.config.ts new file mode 100644 index 0000000000..c6221c1eaf --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/config/prod.config.ts @@ -0,0 +1,9 @@ +import { enableProdMode } from '@angular/core'; +import { DEBUG_INFO_ENABLED } from 'app/app.constants'; + +export function ProdConfig() { + // disable debug data on prod profile to improve performance + if (!DEBUG_INFO_ENABLED) { + enableProdMode(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/config/uib-pagination.config.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/config/uib-pagination.config.ts new file mode 100644 index 0000000000..0c2ea94808 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/config/uib-pagination.config.ts @@ -0,0 +1,14 @@ +import { Injectable } from '@angular/core'; +import { NgbPaginationConfig } from '@ng-bootstrap/ng-bootstrap'; +import { ITEMS_PER_PAGE } from 'app/shared'; + +@Injectable({ providedIn: 'root' }) +export class PaginationConfig { + // tslint:disable-next-line: no-unused-variable + constructor(private config: NgbPaginationConfig) { + config.boundaryLinks = true; + config.maxSize = 5; + config.pageSize = ITEMS_PER_PAGE; + config.size = 'sm'; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/interceptor/auth-expired.interceptor.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/interceptor/auth-expired.interceptor.ts new file mode 100644 index 0000000000..a4a67f3bf4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/interceptor/auth-expired.interceptor.ts @@ -0,0 +1,39 @@ +import { Injector } from '@angular/core'; +import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpErrorResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { tap } from 'rxjs/operators'; +import { Router } from '@angular/router'; + +import { LoginModalService } from 'app/core/login/login-modal.service'; +import { Principal } from 'app/core/auth/principal.service'; +import { LoginService } from 'app/core/login/login.service'; + +export class AuthExpiredInterceptor implements HttpInterceptor { + constructor(private injector: Injector) {} + + intercept(request: HttpRequest, next: HttpHandler): Observable> { + return next.handle(request).pipe( + tap( + (event: HttpEvent) => {}, + (err: any) => { + if (err instanceof HttpErrorResponse) { + if (err.status === 401) { + const principal = this.injector.get(Principal); + + if (principal.isAuthenticated()) { + principal.authenticate(null); + const loginModalService: LoginModalService = this.injector.get(LoginModalService); + loginModalService.open(); + } else { + const loginService: LoginService = this.injector.get(LoginService); + loginService.logout(); + const router = this.injector.get(Router); + router.navigate(['/']); + } + } + } + } + ) + ); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/interceptor/errorhandler.interceptor.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/interceptor/errorhandler.interceptor.ts new file mode 100644 index 0000000000..dba028244e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/interceptor/errorhandler.interceptor.ts @@ -0,0 +1,25 @@ +import { JhiEventManager } from 'ng-jhipster'; +import { HttpInterceptor, HttpRequest, HttpErrorResponse, HttpHandler, HttpEvent } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { tap } from 'rxjs/operators'; + +export class ErrorHandlerInterceptor implements HttpInterceptor { + constructor(private eventManager: JhiEventManager) {} + + intercept(request: HttpRequest, next: HttpHandler): Observable> { + return next.handle(request).pipe( + tap( + (event: HttpEvent) => {}, + (err: any) => { + if (err instanceof HttpErrorResponse) { + if (!(err.status === 401 && (err.message === '' || (err.url && err.url.includes('/api/account'))))) { + if (this.eventManager !== undefined) { + this.eventManager.broadcast({ name: 'gatewayApp.httpError', content: err }); + } + } + } + } + ) + ); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/interceptor/notification.interceptor.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/interceptor/notification.interceptor.ts new file mode 100644 index 0000000000..5edfdcfa64 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/blocks/interceptor/notification.interceptor.ts @@ -0,0 +1,43 @@ +import { JhiAlertService } from 'ng-jhipster'; +import { HttpInterceptor, HttpRequest, HttpResponse, HttpHandler, HttpEvent } from '@angular/common/http'; +import { Injector } from '@angular/core'; +import { Observable } from 'rxjs'; +import { tap } from 'rxjs/operators'; + +export class NotificationInterceptor implements HttpInterceptor { + private alertService: JhiAlertService; + + // tslint:disable-next-line: no-unused-variable + constructor(private injector: Injector) { + setTimeout(() => (this.alertService = injector.get(JhiAlertService))); + } + + intercept(request: HttpRequest, next: HttpHandler): Observable> { + return next.handle(request).pipe( + tap( + (event: HttpEvent) => { + if (event instanceof HttpResponse) { + const arr = event.headers.keys(); + let alert = null; + let alertParams = null; + arr.forEach(entry => { + if (entry.toLowerCase().endsWith('app-alert')) { + alert = event.headers.get(entry); + } else if (entry.toLowerCase().endsWith('app-params')) { + alertParams = event.headers.get(entry); + } + }); + if (alert) { + if (typeof alert === 'string') { + if (this.alertService) { + this.alertService.success(alert, { param: alertParams }, null); + } + } + } + } + }, + (err: any) => {} + ) + ); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/account.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/account.service.ts new file mode 100644 index 0000000000..fab4e415bc --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/account.service.ts @@ -0,0 +1,18 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; + +@Injectable({ providedIn: 'root' }) +export class AccountService { + constructor(private http: HttpClient) {} + + get(): Observable> { + return this.http.get(SERVER_API_URL + 'uaa/api/account', { observe: 'response' }); + } + + save(account: any): Observable> { + return this.http.post(SERVER_API_URL + 'uaa/api/account', account, { observe: 'response' }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/auth-jwt.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/auth-jwt.service.ts new file mode 100644 index 0000000000..221f5586bd --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/auth-jwt.service.ts @@ -0,0 +1,39 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { SERVER_API_URL } from 'app/app.constants'; + +@Injectable({ providedIn: 'root' }) +export class AuthServerProvider { + constructor(private http: HttpClient) {} + + getToken() { + return null; + } + + login(credentials): Observable { + const data = { + username: credentials.username, + password: credentials.password, + rememberMe: credentials.rememberMe + }; + return this.http.post(SERVER_API_URL + 'auth/login', data, {}); + } + + loginWithToken(jwt, rememberMe) { + if (jwt) { + this.storeAuthenticationToken(jwt, rememberMe); + return Promise.resolve(jwt); + } else { + return Promise.reject('auth-jwt-service Promise reject'); // Put appropriate error message here + } + } + + storeAuthenticationToken(jwt, rememberMe) {} + + logout(): Observable { + return this.http.post(SERVER_API_URL + 'auth/logout', null); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/csrf.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/csrf.service.ts new file mode 100644 index 0000000000..1eeee79972 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/csrf.service.ts @@ -0,0 +1,12 @@ +import { Injectable } from '@angular/core'; +import { CookieService } from 'ngx-cookie'; + +@Injectable({ providedIn: 'root' }) +export class CSRFService { + constructor(private cookieService: CookieService) {} + + getCSRF(name?: string) { + name = `${name ? name : 'XSRF-TOKEN'}`; + return this.cookieService.get(name); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/principal.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/principal.service.ts new file mode 100644 index 0000000000..a074bbd3bb --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/principal.service.ts @@ -0,0 +1,102 @@ +import { Injectable } from '@angular/core'; +import { Observable, Subject } from 'rxjs'; +import { AccountService } from './account.service'; + +@Injectable({ providedIn: 'root' }) +export class Principal { + private userIdentity: any; + private authenticated = false; + private authenticationState = new Subject(); + + constructor(private account: AccountService) {} + + authenticate(identity) { + this.userIdentity = identity; + this.authenticated = identity !== null; + this.authenticationState.next(this.userIdentity); + } + + hasAnyAuthority(authorities: string[]): Promise { + return Promise.resolve(this.hasAnyAuthorityDirect(authorities)); + } + + hasAnyAuthorityDirect(authorities: string[]): boolean { + if (!this.authenticated || !this.userIdentity || !this.userIdentity.authorities) { + return false; + } + + for (let i = 0; i < authorities.length; i++) { + if (this.userIdentity.authorities.includes(authorities[i])) { + return true; + } + } + + return false; + } + + hasAuthority(authority: string): Promise { + if (!this.authenticated) { + return Promise.resolve(false); + } + + return this.identity().then( + id => { + return Promise.resolve(id.authorities && id.authorities.includes(authority)); + }, + () => { + return Promise.resolve(false); + } + ); + } + + identity(force?: boolean): Promise { + if (force === true) { + this.userIdentity = undefined; + } + + // check and see if we have retrieved the userIdentity data from the server. + // if we have, reuse it by immediately resolving + if (this.userIdentity) { + return Promise.resolve(this.userIdentity); + } + + // retrieve the userIdentity data from the server, update the identity object, and then resolve. + return this.account + .get() + .toPromise() + .then(response => { + const account = response.body; + if (account) { + this.userIdentity = account; + this.authenticated = true; + } else { + this.userIdentity = null; + this.authenticated = false; + } + this.authenticationState.next(this.userIdentity); + return this.userIdentity; + }) + .catch(err => { + this.userIdentity = null; + this.authenticated = false; + this.authenticationState.next(this.userIdentity); + return null; + }); + } + + isAuthenticated(): boolean { + return this.authenticated; + } + + isIdentityResolved(): boolean { + return this.userIdentity !== undefined; + } + + getAuthenticationState(): Observable { + return this.authenticationState.asObservable(); + } + + getImageUrl(): string { + return this.isIdentityResolved() ? this.userIdentity.imageUrl : null; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/state-storage.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/state-storage.service.ts new file mode 100644 index 0000000000..0e5befbfc3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/state-storage.service.ts @@ -0,0 +1,46 @@ +import { Injectable } from '@angular/core'; +import { SessionStorageService } from 'ngx-webstorage'; + +@Injectable({ providedIn: 'root' }) +export class StateStorageService { + constructor(private $sessionStorage: SessionStorageService) {} + + getPreviousState() { + return this.$sessionStorage.retrieve('previousState'); + } + + resetPreviousState() { + this.$sessionStorage.clear('previousState'); + } + + storePreviousState(previousStateName, previousStateParams) { + const previousState = { name: previousStateName, params: previousStateParams }; + this.$sessionStorage.store('previousState', previousState); + } + + getDestinationState() { + return this.$sessionStorage.retrieve('destinationState'); + } + + storeUrl(url: string) { + this.$sessionStorage.store('previousUrl', url); + } + + getUrl() { + return this.$sessionStorage.retrieve('previousUrl'); + } + + storeDestinationState(destinationState, destinationStateParams, fromState) { + const destinationInfo = { + destination: { + name: destinationState.name, + data: destinationState.data + }, + params: destinationStateParams, + from: { + name: fromState.name + } + }; + this.$sessionStorage.store('destinationState', destinationInfo); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/user-route-access-service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/user-route-access-service.ts new file mode 100644 index 0000000000..e86cba3497 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/auth/user-route-access-service.ts @@ -0,0 +1,56 @@ +import { Injectable, isDevMode } from '@angular/core'; +import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router'; + +import { Principal } from '../'; +import { LoginModalService } from '../login/login-modal.service'; +import { StateStorageService } from './state-storage.service'; + +@Injectable({ providedIn: 'root' }) +export class UserRouteAccessService implements CanActivate { + constructor( + private router: Router, + private loginModalService: LoginModalService, + private principal: Principal, + private stateStorageService: StateStorageService + ) {} + + canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | Promise { + const authorities = route.data['authorities']; + // We need to call the checkLogin / and so the principal.identity() function, to ensure, + // that the client has a principal too, if they already logged in by the server. + // This could happen on a page refresh. + return this.checkLogin(authorities, state.url); + } + + checkLogin(authorities: string[], url: string): Promise { + const principal = this.principal; + return Promise.resolve( + principal.identity().then(account => { + if (!authorities || authorities.length === 0) { + return true; + } + + if (account) { + return principal.hasAnyAuthority(authorities).then(response => { + if (response) { + return true; + } + if (isDevMode()) { + console.error('User has not any of required authorities: ', authorities); + } + return false; + }); + } + + this.stateStorageService.storeUrl(url); + this.router.navigate(['accessdenied']).then(() => { + // only show the login dialog, if the user hasn't logged in yet + if (!account) { + this.loginModalService.open(); + } + }); + return false; + }) + ); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/core.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/core.module.ts new file mode 100644 index 0000000000..92807732dd --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/core.module.ts @@ -0,0 +1,24 @@ +import { NgModule, LOCALE_ID } from '@angular/core'; +import { DatePipe, registerLocaleData } from '@angular/common'; +import { HttpClientModule } from '@angular/common/http'; +import { Title } from '@angular/platform-browser'; +import locale from '@angular/common/locales/en'; + +@NgModule({ + imports: [HttpClientModule], + exports: [], + declarations: [], + providers: [ + Title, + { + provide: LOCALE_ID, + useValue: 'en' + }, + DatePipe + ] +}) +export class GatewayCoreModule { + constructor() { + registerLocaleData(locale); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/index.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/index.ts new file mode 100644 index 0000000000..7663d225ad --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/index.ts @@ -0,0 +1,14 @@ +export * from './auth/csrf.service'; +export * from './auth/state-storage.service'; +export * from './auth/account.service'; +export * from './auth/auth-jwt.service'; +export * from './language/language.helper'; +export * from './language/language.constants'; +export * from './user/account.model'; +export * from './user/user.model'; +export * from './auth/principal.service'; +export * from './auth/user-route-access-service'; +export * from './login/login-modal.service'; +export * from './login/login.service'; +export * from './user/user.service'; +export * from './core.module'; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/language/language.constants.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/language/language.constants.ts new file mode 100644 index 0000000000..000d72837a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/language/language.constants.ts @@ -0,0 +1,10 @@ +/* + Languages codes are ISO_639-1 codes, see http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes + They are written in English to avoid character encoding issues (not a perfect solution) +*/ +export const LANGUAGES: string[] = [ + 'en', + 'fr', + 'pt-br' + // jhipster-needle-i18n-language-constant - JHipster will add/remove languages in this array +]; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/language/language.helper.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/language/language.helper.ts new file mode 100644 index 0000000000..6abfc8d271 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/language/language.helper.ts @@ -0,0 +1,66 @@ +import { Injectable, RendererFactory2, Renderer2 } from '@angular/core'; +import { Title } from '@angular/platform-browser'; +import { Router, ActivatedRouteSnapshot } from '@angular/router'; +import { TranslateService, LangChangeEvent } from '@ngx-translate/core'; +import { BehaviorSubject, Observable } from 'rxjs'; + +import { LANGUAGES } from 'app/core/language/language.constants'; + +@Injectable({ providedIn: 'root' }) +export class JhiLanguageHelper { + renderer: Renderer2 = null; + private _language: BehaviorSubject; + + constructor( + private translateService: TranslateService, + // tslint:disable-next-line: no-unused-variable + private rootRenderer: RendererFactory2, + private titleService: Title, + private router: Router + ) { + this._language = new BehaviorSubject(this.translateService.currentLang); + this.renderer = rootRenderer.createRenderer(document.querySelector('html'), null); + this.init(); + } + + getAll(): Promise { + return Promise.resolve(LANGUAGES); + } + + get language(): Observable { + return this._language.asObservable(); + } + + /** + * Update the window title using params in the following + * order: + * 1. titleKey parameter + * 2. $state.$current.data.pageTitle (current state page title) + * 3. 'global.title' + */ + updateTitle(titleKey?: string) { + if (!titleKey) { + titleKey = this.getPageTitle(this.router.routerState.snapshot.root); + } + + this.translateService.get(titleKey).subscribe(title => { + this.titleService.setTitle(title); + }); + } + + private init() { + this.translateService.onLangChange.subscribe((event: LangChangeEvent) => { + this._language.next(this.translateService.currentLang); + this.renderer.setAttribute(document.querySelector('html'), 'lang', this.translateService.currentLang); + this.updateTitle(); + }); + } + + private getPageTitle(routeSnapshot: ActivatedRouteSnapshot) { + let title: string = routeSnapshot.data && routeSnapshot.data['pageTitle'] ? routeSnapshot.data['pageTitle'] : 'gatewayApp'; + if (routeSnapshot.firstChild) { + title = this.getPageTitle(routeSnapshot.firstChild) || title; + } + return title; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/login/login-modal.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/login/login-modal.service.ts new file mode 100644 index 0000000000..a0002aa56b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/login/login-modal.service.ts @@ -0,0 +1,27 @@ +import { Injectable } from '@angular/core'; +import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; + +import { JhiLoginModalComponent } from 'app/shared/login/login.component'; + +@Injectable({ providedIn: 'root' }) +export class LoginModalService { + private isOpen = false; + constructor(private modalService: NgbModal) {} + + open(): NgbModalRef { + if (this.isOpen) { + return; + } + this.isOpen = true; + const modalRef = this.modalService.open(JhiLoginModalComponent); + modalRef.result.then( + result => { + this.isOpen = false; + }, + reason => { + this.isOpen = false; + } + ); + return modalRef; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/login/login.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/login/login.service.ts new file mode 100644 index 0000000000..0a2970dc02 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/login/login.service.ts @@ -0,0 +1,47 @@ +import { Injectable } from '@angular/core'; +import { JhiLanguageService } from 'ng-jhipster'; + +import { Principal } from '../auth/principal.service'; +import { AuthServerProvider } from '../auth/auth-jwt.service'; + +@Injectable({ providedIn: 'root' }) +export class LoginService { + constructor( + private languageService: JhiLanguageService, + private principal: Principal, + private authServerProvider: AuthServerProvider + ) {} + + login(credentials, callback?) { + const cb = callback || function() {}; + + return new Promise((resolve, reject) => { + this.authServerProvider.login(credentials).subscribe( + data => { + this.principal.identity(true).then(account => { + // After the login the language will be changed to + // the language selected by the user during his registration + if (account !== null) { + this.languageService.changeLanguage(account.langKey); + } + resolve(data); + }); + return cb(); + }, + err => { + this.logout(); + reject(err); + return cb(err); + } + ); + }); + } + + logout() { + if (this.principal.isAuthenticated()) { + this.authServerProvider.logout().subscribe(() => this.principal.authenticate(null)); + } else { + this.principal.authenticate(null); + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/user/account.model.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/user/account.model.ts new file mode 100644 index 0000000000..35679657e3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/user/account.model.ts @@ -0,0 +1,12 @@ +export class Account { + constructor( + public activated: boolean, + public authorities: string[], + public email: string, + public firstName: string, + public langKey: string, + public lastName: string, + public login: string, + public imageUrl: string + ) {} +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/user/user.model.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/user/user.model.ts new file mode 100644 index 0000000000..e82da11ac5 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/user/user.model.ts @@ -0,0 +1,47 @@ +export interface IUser { + id?: any; + login?: string; + firstName?: string; + lastName?: string; + email?: string; + activated?: boolean; + langKey?: string; + authorities?: any[]; + createdBy?: string; + createdDate?: Date; + lastModifiedBy?: string; + lastModifiedDate?: Date; + password?: string; +} + +export class User implements IUser { + constructor( + public id?: any, + public login?: string, + public firstName?: string, + public lastName?: string, + public email?: string, + public activated?: boolean, + public langKey?: string, + public authorities?: any[], + public createdBy?: string, + public createdDate?: Date, + public lastModifiedBy?: string, + public lastModifiedDate?: Date, + public password?: string + ) { + this.id = id ? id : null; + this.login = login ? login : null; + this.firstName = firstName ? firstName : null; + this.lastName = lastName ? lastName : null; + this.email = email ? email : null; + this.activated = activated ? activated : false; + this.langKey = langKey ? langKey : null; + this.authorities = authorities ? authorities : null; + this.createdBy = createdBy ? createdBy : null; + this.createdDate = createdDate ? createdDate : null; + this.lastModifiedBy = lastModifiedBy ? lastModifiedBy : null; + this.lastModifiedDate = lastModifiedDate ? lastModifiedDate : null; + this.password = password ? password : null; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/user/user.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/user/user.service.ts new file mode 100644 index 0000000000..2b0a46f7cd --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/core/user/user.service.ts @@ -0,0 +1,39 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpResponse } from '@angular/common/http'; +import { Observable, of } from 'rxjs'; + +import { SERVER_API_URL } from 'app/app.constants'; +import { createRequestOption } from 'app/shared/util/request-util'; +import { IUser } from './user.model'; + +@Injectable({ providedIn: 'root' }) +export class UserService { + private resourceUrl = SERVER_API_URL + 'uaa/api/users'; + + constructor(private http: HttpClient) {} + + create(user: IUser): Observable> { + return this.http.post(this.resourceUrl, user, { observe: 'response' }); + } + + update(user: IUser): Observable> { + return this.http.put(this.resourceUrl, user, { observe: 'response' }); + } + + find(login: string): Observable> { + return this.http.get(`${this.resourceUrl}/${login}`, { observe: 'response' }); + } + + query(req?: any): Observable> { + const options = createRequestOption(req); + return this.http.get(this.resourceUrl, { params: options, observe: 'response' }); + } + + delete(login: string): Observable> { + return this.http.delete(`${this.resourceUrl}/${login}`, { observe: 'response' }); + } + + authorities(): Observable { + return this.http.get(SERVER_API_URL + 'uaa/api/users/authorities'); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/entity.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/entity.module.ts new file mode 100644 index 0000000000..0c0ba652ad --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/entity.module.ts @@ -0,0 +1,17 @@ +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; + +import { GatewayQuoteModule as QuotesQuoteModule } from './quotes/quote/quote.module'; +/* jhipster-needle-add-entity-module-import - JHipster will add entity modules imports here */ + +@NgModule({ + // prettier-ignore + imports: [ + QuotesQuoteModule, + /* jhipster-needle-add-entity-module - JHipster will add entity modules here */ + ], + declarations: [], + entryComponents: [], + providers: [], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}) +export class GatewayEntityModule {} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/index.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/index.ts new file mode 100644 index 0000000000..0944894e50 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/index.ts @@ -0,0 +1,6 @@ +export * from './quote.service'; +export * from './quote-update.component'; +export * from './quote-delete-dialog.component'; +export * from './quote-detail.component'; +export * from './quote.component'; +export * from './quote.route'; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-delete-dialog.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-delete-dialog.component.html new file mode 100644 index 0000000000..c915ac0411 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-delete-dialog.component.html @@ -0,0 +1,19 @@ +
+ + + +
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-delete-dialog.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-delete-dialog.component.ts new file mode 100644 index 0000000000..585f3bbcdd --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-delete-dialog.component.ts @@ -0,0 +1,65 @@ +import { Component, OnInit, OnDestroy } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; + +import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { JhiEventManager } from 'ng-jhipster'; + +import { IQuote } from 'app/shared/model/quotes/quote.model'; +import { QuoteService } from './quote.service'; + +@Component({ + selector: 'jhi-quote-delete-dialog', + templateUrl: './quote-delete-dialog.component.html' +}) +export class QuoteDeleteDialogComponent { + quote: IQuote; + + constructor(private quoteService: QuoteService, public activeModal: NgbActiveModal, private eventManager: JhiEventManager) {} + + clear() { + this.activeModal.dismiss('cancel'); + } + + confirmDelete(id: number) { + this.quoteService.delete(id).subscribe(response => { + this.eventManager.broadcast({ + name: 'quoteListModification', + content: 'Deleted an quote' + }); + this.activeModal.dismiss(true); + }); + } +} + +@Component({ + selector: 'jhi-quote-delete-popup', + template: '' +}) +export class QuoteDeletePopupComponent implements OnInit, OnDestroy { + private ngbModalRef: NgbModalRef; + + constructor(private activatedRoute: ActivatedRoute, private router: Router, private modalService: NgbModal) {} + + ngOnInit() { + this.activatedRoute.data.subscribe(({ quote }) => { + setTimeout(() => { + this.ngbModalRef = this.modalService.open(QuoteDeleteDialogComponent as Component, { size: 'lg', backdrop: 'static' }); + this.ngbModalRef.componentInstance.quote = quote; + this.ngbModalRef.result.then( + result => { + this.router.navigate([{ outlets: { popup: null } }], { replaceUrl: true, queryParamsHandling: 'merge' }); + this.ngbModalRef = null; + }, + reason => { + this.router.navigate([{ outlets: { popup: null } }], { replaceUrl: true, queryParamsHandling: 'merge' }); + this.ngbModalRef = null; + } + ); + }, 0); + }); + } + + ngOnDestroy() { + this.ngbModalRef = null; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-detail.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-detail.component.html new file mode 100644 index 0000000000..b18be8b19f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-detail.component.html @@ -0,0 +1,35 @@ +
+
+
+

Quote {{quote.id}}

+
+ +
+
Symbol
+
+ {{quote.symbol}} +
+
Price
+
+ {{quote.price}} +
+
Last Trade
+
+ {{quote.lastTrade}} +
+
+ + + + +
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-detail.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-detail.component.ts new file mode 100644 index 0000000000..9c6ac3e8f1 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-detail.component.ts @@ -0,0 +1,24 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +import { IQuote } from 'app/shared/model/quotes/quote.model'; + +@Component({ + selector: 'jhi-quote-detail', + templateUrl: './quote-detail.component.html' +}) +export class QuoteDetailComponent implements OnInit { + quote: IQuote; + + constructor(private activatedRoute: ActivatedRoute) {} + + ngOnInit() { + this.activatedRoute.data.subscribe(({ quote }) => { + this.quote = quote; + }); + } + + previousState() { + window.history.back(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-update.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-update.component.html new file mode 100644 index 0000000000..fe76ccd9e6 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-update.component.html @@ -0,0 +1,67 @@ +
+
+
+

Create or edit a Quote

+
+ +
+ + +
+
+ + +
+ + This field is required. + +
+
+
+ + +
+ + This field is required. + + + This field should be a number. + +
+
+
+ +
+ +
+
+ + This field is required. + + + This field should be a date and time. + +
+
+ +
+
+ + +
+
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-update.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-update.component.ts new file mode 100644 index 0000000000..06badc70dd --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote-update.component.ts @@ -0,0 +1,56 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import * as moment from 'moment'; +import { DATE_TIME_FORMAT } from 'app/shared/constants/input.constants'; + +import { IQuote } from 'app/shared/model/quotes/quote.model'; +import { QuoteService } from './quote.service'; + +@Component({ + selector: 'jhi-quote-update', + templateUrl: './quote-update.component.html' +}) +export class QuoteUpdateComponent implements OnInit { + quote: IQuote; + isSaving: boolean; + lastTrade: string; + + constructor(private quoteService: QuoteService, private activatedRoute: ActivatedRoute) {} + + ngOnInit() { + this.isSaving = false; + this.activatedRoute.data.subscribe(({ quote }) => { + this.quote = quote; + this.lastTrade = this.quote.lastTrade != null ? this.quote.lastTrade.format(DATE_TIME_FORMAT) : null; + }); + } + + previousState() { + window.history.back(); + } + + save() { + this.isSaving = true; + this.quote.lastTrade = this.lastTrade != null ? moment(this.lastTrade, DATE_TIME_FORMAT) : null; + if (this.quote.id !== undefined) { + this.subscribeToSaveResponse(this.quoteService.update(this.quote)); + } else { + this.subscribeToSaveResponse(this.quoteService.create(this.quote)); + } + } + + private subscribeToSaveResponse(result: Observable>) { + result.subscribe((res: HttpResponse) => this.onSaveSuccess(), (res: HttpErrorResponse) => this.onSaveError()); + } + + private onSaveSuccess() { + this.isSaving = false; + this.previousState(); + } + + private onSaveError() { + this.isSaving = false; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.component.html new file mode 100644 index 0000000000..20362f3799 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.component.html @@ -0,0 +1,66 @@ +
+

+ Quotes + +

+ +
+
+ + + + + + + + + + + + + + + + + + + +
ID Symbol Price Last Trade
{{quote.id}}{{quote.symbol}}{{quote.price}}{{quote.lastTrade | date:'medium'}} +
+ + + +
+
+
+
+
+ +
+
+ +
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.component.ts new file mode 100644 index 0000000000..c855ceeafb --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.component.ts @@ -0,0 +1,132 @@ +import { Component, OnInit, OnDestroy } from '@angular/core'; +import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http'; +import { ActivatedRoute, Router } from '@angular/router'; +import { Subscription } from 'rxjs'; +import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster'; + +import { IQuote } from 'app/shared/model/quotes/quote.model'; +import { Principal } from 'app/core'; + +import { ITEMS_PER_PAGE } from 'app/shared'; +import { QuoteService } from './quote.service'; + +@Component({ + selector: 'jhi-quote', + templateUrl: './quote.component.html' +}) +export class QuoteComponent implements OnInit, OnDestroy { + currentAccount: any; + quotes: IQuote[]; + error: any; + success: any; + eventSubscriber: Subscription; + routeData: any; + links: any; + totalItems: any; + queryCount: any; + itemsPerPage: any; + page: any; + predicate: any; + previousPage: any; + reverse: any; + + constructor( + private quoteService: QuoteService, + private parseLinks: JhiParseLinks, + private jhiAlertService: JhiAlertService, + private principal: Principal, + private activatedRoute: ActivatedRoute, + private router: Router, + private eventManager: JhiEventManager + ) { + this.itemsPerPage = ITEMS_PER_PAGE; + this.routeData = this.activatedRoute.data.subscribe(data => { + this.page = data.pagingParams.page; + this.previousPage = data.pagingParams.page; + this.reverse = data.pagingParams.ascending; + this.predicate = data.pagingParams.predicate; + }); + } + + loadAll() { + this.quoteService + .query({ + page: this.page - 1, + size: this.itemsPerPage, + sort: this.sort() + }) + .subscribe( + (res: HttpResponse) => this.paginateQuotes(res.body, res.headers), + (res: HttpErrorResponse) => this.onError(res.message) + ); + } + + loadPage(page: number) { + if (page !== this.previousPage) { + this.previousPage = page; + this.transition(); + } + } + + transition() { + this.router.navigate(['/quote'], { + queryParams: { + page: this.page, + size: this.itemsPerPage, + sort: this.predicate + ',' + (this.reverse ? 'asc' : 'desc') + } + }); + this.loadAll(); + } + + clear() { + this.page = 0; + this.router.navigate([ + '/quote', + { + page: this.page, + sort: this.predicate + ',' + (this.reverse ? 'asc' : 'desc') + } + ]); + this.loadAll(); + } + + ngOnInit() { + this.loadAll(); + this.principal.identity().then(account => { + this.currentAccount = account; + }); + this.registerChangeInQuotes(); + } + + ngOnDestroy() { + this.eventManager.destroy(this.eventSubscriber); + } + + trackId(index: number, item: IQuote) { + return item.id; + } + + registerChangeInQuotes() { + this.eventSubscriber = this.eventManager.subscribe('quoteListModification', response => this.loadAll()); + } + + sort() { + const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; + if (this.predicate !== 'id') { + result.push('id'); + } + return result; + } + + private paginateQuotes(data: IQuote[], headers: HttpHeaders) { + this.links = this.parseLinks.parse(headers.get('link')); + this.totalItems = parseInt(headers.get('X-Total-Count'), 10); + this.queryCount = this.totalItems; + this.quotes = data; + } + + private onError(errorMessage: string) { + this.jhiAlertService.error(errorMessage, null, null); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.module.ts new file mode 100644 index 0000000000..b29613b4a4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.module.ts @@ -0,0 +1,23 @@ +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { RouterModule } from '@angular/router'; + +import { GatewaySharedModule } from 'app/shared'; +import { + QuoteComponent, + QuoteDetailComponent, + QuoteUpdateComponent, + QuoteDeletePopupComponent, + QuoteDeleteDialogComponent, + quoteRoute, + quotePopupRoute +} from './'; + +const ENTITY_STATES = [...quoteRoute, ...quotePopupRoute]; + +@NgModule({ + imports: [GatewaySharedModule, RouterModule.forChild(ENTITY_STATES)], + declarations: [QuoteComponent, QuoteDetailComponent, QuoteUpdateComponent, QuoteDeleteDialogComponent, QuoteDeletePopupComponent], + entryComponents: [QuoteComponent, QuoteUpdateComponent, QuoteDeleteDialogComponent, QuoteDeletePopupComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}) +export class GatewayQuoteModule {} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.route.ts new file mode 100644 index 0000000000..1479f1c56a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.route.ts @@ -0,0 +1,95 @@ +import { Injectable } from '@angular/core'; +import { HttpResponse } from '@angular/common/http'; +import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router'; +import { JhiPaginationUtil, JhiResolvePagingParams } from 'ng-jhipster'; +import { UserRouteAccessService } from 'app/core'; +import { of } from 'rxjs'; +import { map } from 'rxjs/operators'; +import { Quote } from 'app/shared/model/quotes/quote.model'; +import { QuoteService } from './quote.service'; +import { QuoteComponent } from './quote.component'; +import { QuoteDetailComponent } from './quote-detail.component'; +import { QuoteUpdateComponent } from './quote-update.component'; +import { QuoteDeletePopupComponent } from './quote-delete-dialog.component'; +import { IQuote } from 'app/shared/model/quotes/quote.model'; + +@Injectable({ providedIn: 'root' }) +export class QuoteResolve implements Resolve { + constructor(private service: QuoteService) {} + + resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { + const id = route.params['id'] ? route.params['id'] : null; + if (id) { + return this.service.find(id).pipe(map((quote: HttpResponse) => quote.body)); + } + return of(new Quote()); + } +} + +export const quoteRoute: Routes = [ + { + path: 'quote', + component: QuoteComponent, + resolve: { + pagingParams: JhiResolvePagingParams + }, + data: { + authorities: ['ROLE_USER'], + defaultSort: 'id,asc', + pageTitle: 'gatewayApp.quotesQuote.home.title' + }, + canActivate: [UserRouteAccessService] + }, + { + path: 'quote/:id/view', + component: QuoteDetailComponent, + resolve: { + quote: QuoteResolve + }, + data: { + authorities: ['ROLE_USER'], + pageTitle: 'gatewayApp.quotesQuote.home.title' + }, + canActivate: [UserRouteAccessService] + }, + { + path: 'quote/new', + component: QuoteUpdateComponent, + resolve: { + quote: QuoteResolve + }, + data: { + authorities: ['ROLE_USER'], + pageTitle: 'gatewayApp.quotesQuote.home.title' + }, + canActivate: [UserRouteAccessService] + }, + { + path: 'quote/:id/edit', + component: QuoteUpdateComponent, + resolve: { + quote: QuoteResolve + }, + data: { + authorities: ['ROLE_USER'], + pageTitle: 'gatewayApp.quotesQuote.home.title' + }, + canActivate: [UserRouteAccessService] + } +]; + +export const quotePopupRoute: Routes = [ + { + path: 'quote/:id/delete', + component: QuoteDeletePopupComponent, + resolve: { + quote: QuoteResolve + }, + data: { + authorities: ['ROLE_USER'], + pageTitle: 'gatewayApp.quotesQuote.home.title' + }, + canActivate: [UserRouteAccessService], + outlet: 'popup' + } +]; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.service.ts new file mode 100644 index 0000000000..3551d0e3e8 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/entities/quotes/quote/quote.service.ts @@ -0,0 +1,70 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import * as moment from 'moment'; +import { DATE_FORMAT } from 'app/shared/constants/input.constants'; +import { map } from 'rxjs/operators'; + +import { SERVER_API_URL } from 'app/app.constants'; +import { createRequestOption } from 'app/shared'; +import { IQuote } from 'app/shared/model/quotes/quote.model'; + +type EntityResponseType = HttpResponse; +type EntityArrayResponseType = HttpResponse; + +@Injectable({ providedIn: 'root' }) +export class QuoteService { + private resourceUrl = SERVER_API_URL + 'quotes/api/quotes'; + + constructor(private http: HttpClient) {} + + create(quote: IQuote): Observable { + const copy = this.convertDateFromClient(quote); + return this.http + .post(this.resourceUrl, copy, { observe: 'response' }) + .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); + } + + update(quote: IQuote): Observable { + const copy = this.convertDateFromClient(quote); + return this.http + .put(this.resourceUrl, copy, { observe: 'response' }) + .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); + } + + find(id: number): Observable { + return this.http + .get(`${this.resourceUrl}/${id}`, { observe: 'response' }) + .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); + } + + query(req?: any): Observable { + const options = createRequestOption(req); + return this.http + .get(this.resourceUrl, { params: options, observe: 'response' }) + .pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res))); + } + + delete(id: number): Observable> { + return this.http.delete(`${this.resourceUrl}/${id}`, { observe: 'response' }); + } + + private convertDateFromClient(quote: IQuote): IQuote { + const copy: IQuote = Object.assign({}, quote, { + lastTrade: quote.lastTrade != null && quote.lastTrade.isValid() ? quote.lastTrade.toJSON() : null + }); + return copy; + } + + private convertDateFromServer(res: EntityResponseType): EntityResponseType { + res.body.lastTrade = res.body.lastTrade != null ? moment(res.body.lastTrade) : null; + return res; + } + + private convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType { + res.body.forEach((quote: IQuote) => { + quote.lastTrade = quote.lastTrade != null ? moment(quote.lastTrade) : null; + }); + return res; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.component.html new file mode 100644 index 0000000000..0afe9ec7ed --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.component.html @@ -0,0 +1,41 @@ +
+
+ +
+
+

Welcome, Java Hipster!

+

This is your homepage

+ +
+
+ You are logged in as user "{{account.login}}". +
+ +
+ If you want to + sign in, you can try the default accounts:
- Administrator (login="admin" and password="admin")
- User (login="user" and password="user").
+
+
+ You don't have an account yet?  + Register a new account +
+
+ +

+ If you have any question on JHipster: +

+ + + +

+ If you like JHipster, don't forget to give us a star on GitHub! +

+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.component.ts new file mode 100644 index 0000000000..4c155c521b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.component.ts @@ -0,0 +1,40 @@ +import { Component, OnInit } from '@angular/core'; +import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { JhiEventManager } from 'ng-jhipster'; + +import { LoginModalService, Principal, Account } from 'app/core'; + +@Component({ + selector: 'jhi-home', + templateUrl: './home.component.html', + styleUrls: ['home.scss'] +}) +export class HomeComponent implements OnInit { + account: Account; + modalRef: NgbModalRef; + + constructor(private principal: Principal, private loginModalService: LoginModalService, private eventManager: JhiEventManager) {} + + ngOnInit() { + this.principal.identity().then(account => { + this.account = account; + }); + this.registerAuthenticationSuccess(); + } + + registerAuthenticationSuccess() { + this.eventManager.subscribe('authenticationSuccess', message => { + this.principal.identity().then(account => { + this.account = account; + }); + }); + } + + isAuthenticated() { + return this.principal.isAuthenticated(); + } + + login() { + this.modalRef = this.loginModalService.open(); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.module.ts new file mode 100644 index 0000000000..9d3e34c3d3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.module.ts @@ -0,0 +1,12 @@ +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { RouterModule } from '@angular/router'; + +import { GatewaySharedModule } from 'app/shared'; +import { HOME_ROUTE, HomeComponent } from './'; + +@NgModule({ + imports: [GatewaySharedModule, RouterModule.forChild([HOME_ROUTE])], + declarations: [HomeComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}) +export class GatewayHomeModule {} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.route.ts new file mode 100644 index 0000000000..cfa1a3fb42 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.route.ts @@ -0,0 +1,12 @@ +import { Route } from '@angular/router'; + +import { HomeComponent } from './'; + +export const HOME_ROUTE: Route = { + path: '', + component: HomeComponent, + data: { + authorities: [], + pageTitle: 'home.title' + } +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.scss b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.scss new file mode 100644 index 0000000000..e0545ef6f5 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/home.scss @@ -0,0 +1,23 @@ +/* ========================================================================== +Main page styles +========================================================================== */ + +.hipster { + display: inline-block; + width: 347px; + height: 497px; + background: url('../../content/images/hipster.png') no-repeat center top; + background-size: contain; +} + +/* wait autoprefixer update to allow simple generation of high pixel density media query */ +@media only screen and (-webkit-min-device-pixel-ratio: 2), + only screen and (-moz-min-device-pixel-ratio: 2), + only screen and (-o-min-device-pixel-ratio: 2/1), + only screen and (min-resolution: 192dpi), + only screen and (min-resolution: 2dppx) { + .hipster { + background: url('../../content/images/hipster2x.png') no-repeat center top; + background-size: contain; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/index.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/index.ts new file mode 100644 index 0000000000..d76285b277 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/home/index.ts @@ -0,0 +1,3 @@ +export * from './home.component'; +export * from './home.route'; +export * from './home.module'; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/error/error.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/error/error.component.html new file mode 100644 index 0000000000..78e20d984e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/error/error.component.html @@ -0,0 +1,17 @@ +
+
+
+ +
+
+

Error Page!

+ +
+
{{errorMessage}} +
+
+
You are not authorized to access this page. +
+
+
+
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/error/error.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/error/error.component.ts new file mode 100644 index 0000000000..3548172827 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/error/error.component.ts @@ -0,0 +1,24 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +@Component({ + selector: 'jhi-error', + templateUrl: './error.component.html' +}) +export class ErrorComponent implements OnInit { + errorMessage: string; + error403: boolean; + + constructor(private route: ActivatedRoute) {} + + ngOnInit() { + this.route.data.subscribe(routeData => { + if (routeData.error403) { + this.error403 = routeData.error403; + } + if (routeData.errorMessage) { + this.errorMessage = routeData.errorMessage; + } + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/error/error.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/error/error.route.ts new file mode 100644 index 0000000000..365249d627 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/error/error.route.ts @@ -0,0 +1,23 @@ +import { Routes } from '@angular/router'; + +import { ErrorComponent } from './error.component'; + +export const errorRoute: Routes = [ + { + path: 'error', + component: ErrorComponent, + data: { + authorities: [], + pageTitle: 'error.title' + } + }, + { + path: 'accessdenied', + component: ErrorComponent, + data: { + authorities: [], + pageTitle: 'error.title', + error403: true + } + } +]; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/footer/footer.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/footer/footer.component.html new file mode 100644 index 0000000000..9312ad063e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/footer/footer.component.html @@ -0,0 +1,3 @@ + diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/footer/footer.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/footer/footer.component.ts new file mode 100644 index 0000000000..37da8bca75 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/footer/footer.component.ts @@ -0,0 +1,7 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'jhi-footer', + templateUrl: './footer.component.html' +}) +export class FooterComponent {} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/index.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/index.ts new file mode 100644 index 0000000000..d7432602a7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/index.ts @@ -0,0 +1,10 @@ +export * from './error/error.component'; +export * from './error/error.route'; +export * from './main/main.component'; +export * from './footer/footer.component'; +export * from './navbar/navbar.component'; +export * from './navbar/navbar.route'; +export * from './navbar/active-menu.directive'; +export * from './profiles/page-ribbon.component'; +export * from './profiles/profile.service'; +export * from './profiles/profile-info.model'; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/main/main.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/main/main.component.html new file mode 100644 index 0000000000..5bcd12ab0b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/main/main.component.html @@ -0,0 +1,11 @@ + +
+ +
+
+
+ + +
+ +
diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/main/main.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/main/main.component.ts new file mode 100644 index 0000000000..4554218504 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/main/main.component.ts @@ -0,0 +1,28 @@ +import { Component, OnInit } from '@angular/core'; +import { Router, ActivatedRouteSnapshot, NavigationEnd } from '@angular/router'; + +import { JhiLanguageHelper } from 'app/core'; + +@Component({ + selector: 'jhi-main', + templateUrl: './main.component.html' +}) +export class JhiMainComponent implements OnInit { + constructor(private jhiLanguageHelper: JhiLanguageHelper, private router: Router) {} + + private getPageTitle(routeSnapshot: ActivatedRouteSnapshot) { + let title: string = routeSnapshot.data && routeSnapshot.data['pageTitle'] ? routeSnapshot.data['pageTitle'] : 'gatewayApp'; + if (routeSnapshot.firstChild) { + title = this.getPageTitle(routeSnapshot.firstChild) || title; + } + return title; + } + + ngOnInit() { + this.router.events.subscribe(event => { + if (event instanceof NavigationEnd) { + this.jhiLanguageHelper.updateTitle(this.getPageTitle(this.router.routerState.snapshot.root)); + } + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/active-menu.directive.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/active-menu.directive.ts new file mode 100644 index 0000000000..edbdeb94fd --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/active-menu.directive.ts @@ -0,0 +1,26 @@ +import { Directive, OnInit, ElementRef, Renderer, Input } from '@angular/core'; +import { TranslateService, LangChangeEvent } from '@ngx-translate/core'; + +@Directive({ + selector: '[jhiActiveMenu]' +}) +export class ActiveMenuDirective implements OnInit { + @Input() jhiActiveMenu: string; + + constructor(private el: ElementRef, private renderer: Renderer, private translateService: TranslateService) {} + + ngOnInit() { + this.translateService.onLangChange.subscribe((event: LangChangeEvent) => { + this.updateActiveFlag(event.lang); + }); + this.updateActiveFlag(this.translateService.currentLang); + } + + updateActiveFlag(selectedLanguage) { + if (this.jhiActiveMenu === selectedLanguage) { + this.renderer.setElementClass(this.el.nativeElement, 'active', true); + } else { + this.renderer.setElementClass(this.el.nativeElement, 'active', false); + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.component.html new file mode 100644 index 0000000000..4491fd34bb --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.component.html @@ -0,0 +1,166 @@ + diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.component.ts new file mode 100644 index 0000000000..e16b4d343f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.component.ts @@ -0,0 +1,76 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { JhiLanguageService } from 'ng-jhipster'; + +import { VERSION } from 'app/app.constants'; +import { JhiLanguageHelper, Principal, LoginModalService, LoginService } from 'app/core'; +import { ProfileService } from '../profiles/profile.service'; + +@Component({ + selector: 'jhi-navbar', + templateUrl: './navbar.component.html', + styleUrls: ['navbar.scss'] +}) +export class NavbarComponent implements OnInit { + inProduction: boolean; + isNavbarCollapsed: boolean; + languages: any[]; + swaggerEnabled: boolean; + modalRef: NgbModalRef; + version: string; + + constructor( + private loginService: LoginService, + private languageService: JhiLanguageService, + private languageHelper: JhiLanguageHelper, + private principal: Principal, + private loginModalService: LoginModalService, + private profileService: ProfileService, + private router: Router + ) { + this.version = VERSION ? 'v' + VERSION : ''; + this.isNavbarCollapsed = true; + } + + ngOnInit() { + this.languageHelper.getAll().then(languages => { + this.languages = languages; + }); + + this.profileService.getProfileInfo().then(profileInfo => { + this.inProduction = profileInfo.inProduction; + this.swaggerEnabled = profileInfo.swaggerEnabled; + }); + } + + changeLanguage(languageKey: string) { + this.languageService.changeLanguage(languageKey); + } + + collapseNavbar() { + this.isNavbarCollapsed = true; + } + + isAuthenticated() { + return this.principal.isAuthenticated(); + } + + login() { + this.modalRef = this.loginModalService.open(); + } + + logout() { + this.collapseNavbar(); + this.loginService.logout(); + this.router.navigate(['']); + } + + toggleNavbar() { + this.isNavbarCollapsed = !this.isNavbarCollapsed; + } + + getImageUrl() { + return this.isAuthenticated() ? this.principal.getImageUrl() : null; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.route.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.route.ts new file mode 100644 index 0000000000..317d99604b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.route.ts @@ -0,0 +1,9 @@ +import { Route } from '@angular/router'; + +import { NavbarComponent } from './navbar.component'; + +export const navbarRoute: Route = { + path: '', + component: NavbarComponent, + outlet: 'navbar' +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.scss b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.scss new file mode 100644 index 0000000000..be76638270 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/navbar/navbar.scss @@ -0,0 +1,78 @@ +/* ========================================================================== +Navbar +========================================================================== */ + +.navbar-version { + font-size: 10px; + color: #ccc; +} + +.jh-navbar { + background-color: #353d47; + padding: 0.2em 1em; + .profile-image { + margin: -10px 0px; + height: 40px; + width: 40px; + border-radius: 50%; + } + .dropdown-item.active, + .dropdown-item.active:focus, + .dropdown-item.active:hover { + background-color: #353d47; + } + .dropdown-toggle::after { + margin-left: 0.15em; + } + ul.navbar-nav { + padding: 0.5em; + .nav-item { + margin-left: 1.5rem; + } + } + a.nav-link { + font-weight: 400; + } + .jh-navbar-toggler { + color: #ccc; + font-size: 1.5em; + padding: 10px; + &:hover { + color: #fff; + } + } +} + +@media screen and (min-width: 768px) { + .jh-navbar-toggler { + display: none; + } +} + +@media screen and (max-width: 992px) { + .jh-logo-container { + width: 100%; + } +} + +.navbar-title { + display: inline-block; + vertical-align: middle; +} + +/* ========================================================================== +Logo styles +========================================================================== */ +.navbar-brand { + &.logo { + padding: 5px 15px; + .logo-img { + height: 45px; + width: 70px; + display: inline-block; + vertical-align: middle; + background: url('../../../content/images/logo-jhipster.png') no-repeat center center; + background-size: contain; + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/page-ribbon.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/page-ribbon.component.ts new file mode 100644 index 0000000000..f2c48078b4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/page-ribbon.component.ts @@ -0,0 +1,22 @@ +import { Component, OnInit } from '@angular/core'; +import { ProfileService } from './profile.service'; +import { ProfileInfo } from './profile-info.model'; + +@Component({ + selector: 'jhi-page-ribbon', + template: ``, + styleUrls: ['page-ribbon.scss'] +}) +export class PageRibbonComponent implements OnInit { + profileInfo: ProfileInfo; + ribbonEnv: string; + + constructor(private profileService: ProfileService) {} + + ngOnInit() { + this.profileService.getProfileInfo().then(profileInfo => { + this.profileInfo = profileInfo; + this.ribbonEnv = profileInfo.ribbonEnv; + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/page-ribbon.scss b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/page-ribbon.scss new file mode 100644 index 0000000000..90125b70cb --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/page-ribbon.scss @@ -0,0 +1,31 @@ +/* ========================================================================== +Developement Ribbon +========================================================================== */ +.ribbon { + background-color: rgba(170, 0, 0, 0.5); + left: -3.5em; + -moz-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + overflow: hidden; + position: absolute; + top: 40px; + white-space: nowrap; + width: 15em; + z-index: 9999; + pointer-events: none; + opacity: 0.75; + a { + color: #fff; + display: block; + font-weight: 400; + margin: 1px 0; + padding: 10px 50px; + text-align: center; + text-decoration: none; + text-shadow: 0 0 5px #444; + pointer-events: none; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/profile-info.model.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/profile-info.model.ts new file mode 100644 index 0000000000..f1adc52c7b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/profile-info.model.ts @@ -0,0 +1,6 @@ +export class ProfileInfo { + activeProfiles: string[]; + ribbonEnv: string; + inProduction: boolean; + swaggerEnabled: boolean; +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/profile.service.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/profile.service.ts new file mode 100644 index 0000000000..d07fad7e7f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/layouts/profiles/profile.service.ts @@ -0,0 +1,40 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpResponse } from '@angular/common/http'; + +import { SERVER_API_URL } from 'app/app.constants'; +import { ProfileInfo } from './profile-info.model'; +import { map } from 'rxjs/operators'; + +@Injectable({ providedIn: 'root' }) +export class ProfileService { + private infoUrl = SERVER_API_URL + 'management/info'; + private profileInfo: Promise; + + constructor(private http: HttpClient) {} + + getProfileInfo(): Promise { + if (!this.profileInfo) { + this.profileInfo = this.http + .get(this.infoUrl, { observe: 'response' }) + .pipe( + map((res: HttpResponse) => { + const data = res.body; + const pi = new ProfileInfo(); + pi.activeProfiles = data['activeProfiles']; + const displayRibbonOnProfiles = data['display-ribbon-on-profiles'].split(','); + if (pi.activeProfiles) { + const ribbonProfiles = displayRibbonOnProfiles.filter(profile => pi.activeProfiles.includes(profile)); + if (ribbonProfiles.length !== 0) { + pi.ribbonEnv = ribbonProfiles[0]; + } + pi.inProduction = pi.activeProfiles.includes('prod'); + pi.swaggerEnabled = pi.activeProfiles.includes('swagger'); + } + return pi; + }) + ) + .toPromise(); + } + return this.profileInfo; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/polyfills.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/polyfills.ts new file mode 100644 index 0000000000..cf38f3221b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/polyfills.ts @@ -0,0 +1,70 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +import 'core-js/es6/symbol'; +import 'core-js/es6/object'; +import 'core-js/es6/function'; +import 'core-js/es6/parse-int'; +import 'core-js/es6/parse-float'; +import 'core-js/es6/number'; +import 'core-js/es6/math'; +import 'core-js/es6/string'; +import 'core-js/es6/date'; +import 'core-js/es6/array'; +import 'core-js/es7/array'; +import 'core-js/es6/regexp'; +import 'core-js/es6/map'; +import 'core-js/es6/weak-map'; +import 'core-js/es6/set'; + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** Evergreen browsers require these. **/ +import 'core-js/es6/reflect'; +import 'core-js/es7/reflect'; + +/** + * Required to support Web Animations `@angular/animation`. + * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + +/*************************************************************************************************** + * Zone JS is required by Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ + +/** + * Date, currency, decimal and percent pipes. + * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 + */ +// import 'intl'; // Run `npm install --save intl`. +/** + * Need to import at least one locale-data with intl. + */ +// import 'intl/locale-data/jsonp/en'; + +require('../manifest.webapp'); diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/alert/alert-error.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/alert/alert-error.component.ts new file mode 100644 index 0000000000..6553dcc312 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/alert/alert-error.component.ts @@ -0,0 +1,115 @@ +import { Component, OnDestroy } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; +import { JhiEventManager, JhiAlertService } from 'ng-jhipster'; +import { Subscription } from 'rxjs'; + +@Component({ + selector: 'jhi-alert-error', + template: ` + ` +}) +export class JhiAlertErrorComponent implements OnDestroy { + alerts: any[]; + cleanHttpErrorListener: Subscription; + /* tslint:disable */ + constructor(private alertService: JhiAlertService, private eventManager: JhiEventManager, private translateService: TranslateService) { + /* tslint:enable */ + this.alerts = []; + + this.cleanHttpErrorListener = eventManager.subscribe('gatewayApp.httpError', response => { + let i; + const httpErrorResponse = response.content; + switch (httpErrorResponse.status) { + // connection refused, server not reachable + case 0: + this.addErrorAlert('Server not reachable', 'error.server.not.reachable'); + break; + + case 400: + const arr = httpErrorResponse.headers.keys(); + let errorHeader = null; + let entityKey = null; + arr.forEach(entry => { + if (entry.toLowerCase().endsWith('app-error')) { + errorHeader = httpErrorResponse.headers.get(entry); + } else if (entry.toLowerCase().endsWith('app-params')) { + entityKey = httpErrorResponse.headers.get(entry); + } + }); + if (errorHeader) { + const entityName = translateService.instant('global.menu.entities.' + entityKey); + this.addErrorAlert(errorHeader, errorHeader, { entityName }); + } else if (httpErrorResponse.error !== '' && httpErrorResponse.error.fieldErrors) { + const fieldErrors = httpErrorResponse.error.fieldErrors; + for (i = 0; i < fieldErrors.length; i++) { + const fieldError = fieldErrors[i]; + if (['Min', 'Max', 'DecimalMin', 'DecimalMax'].includes(fieldError.message)) { + fieldError.message = 'Size'; + } + // convert 'something[14].other[4].id' to 'something[].other[].id' so translations can be written to it + const convertedField = fieldError.field.replace(/\[\d*\]/g, '[]'); + const fieldName = translateService.instant('gatewayApp.' + fieldError.objectName + '.' + convertedField); + this.addErrorAlert('Error on field "' + fieldName + '"', 'error.' + fieldError.message, { fieldName }); + } + } else if (httpErrorResponse.error !== '' && httpErrorResponse.error.message) { + this.addErrorAlert( + httpErrorResponse.error.message, + httpErrorResponse.error.message, + httpErrorResponse.error.params + ); + } else { + this.addErrorAlert(httpErrorResponse.error); + } + break; + + case 404: + this.addErrorAlert('Not found', 'error.url.not.found'); + break; + + default: + if (httpErrorResponse.error !== '' && httpErrorResponse.error.message) { + this.addErrorAlert(httpErrorResponse.error.message); + } else { + this.addErrorAlert(httpErrorResponse.error); + } + } + }); + } + + setClasses(alert) { + return { + toast: !!alert.toast, + [alert.position]: true + }; + } + + ngOnDestroy() { + if (this.cleanHttpErrorListener !== undefined && this.cleanHttpErrorListener !== null) { + this.eventManager.destroy(this.cleanHttpErrorListener); + this.alerts = []; + } + } + + addErrorAlert(message, key?, data?) { + key = key && key !== null ? key : message; + this.alerts.push( + this.alertService.addAlert( + { + type: 'danger', + msg: key, + params: data, + timeout: 5000, + toast: this.alertService.isToast(), + scoped: true + }, + this.alerts + ) + ); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/alert/alert.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/alert/alert.component.ts new file mode 100644 index 0000000000..b864f53066 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/alert/alert.component.ts @@ -0,0 +1,34 @@ +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { JhiAlertService } from 'ng-jhipster'; + +@Component({ + selector: 'jhi-alert', + template: ` + ` +}) +export class JhiAlertComponent implements OnInit, OnDestroy { + alerts: any[]; + + constructor(private alertService: JhiAlertService) {} + + ngOnInit() { + this.alerts = this.alertService.get(); + } + + setClasses(alert) { + return { + toast: !!alert.toast, + [alert.position]: true + }; + } + + ngOnDestroy() { + this.alerts = []; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/auth/has-any-authority.directive.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/auth/has-any-authority.directive.ts new file mode 100644 index 0000000000..16a7d40858 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/auth/has-any-authority.directive.ts @@ -0,0 +1,39 @@ +import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core'; +import { Principal } from 'app/core/auth/principal.service'; + +/** + * @whatItDoes Conditionally includes an HTML element if current user has any + * of the authorities passed as the `expression`. + * + * @howToUse + * ``` + * ... + * + * ... + * ``` + */ +@Directive({ + selector: '[jhiHasAnyAuthority]' +}) +export class HasAnyAuthorityDirective { + private authorities: string[]; + + constructor(private principal: Principal, private templateRef: TemplateRef, private viewContainerRef: ViewContainerRef) {} + + @Input() + set jhiHasAnyAuthority(value: string | string[]) { + this.authorities = typeof value === 'string' ? [value] : value; + this.updateView(); + // Get notified each time authentication state changes. + this.principal.getAuthenticationState().subscribe(identity => this.updateView()); + } + + private updateView(): void { + this.principal.hasAnyAuthority(this.authorities).then(result => { + this.viewContainerRef.clear(); + if (result) { + this.viewContainerRef.createEmbeddedView(this.templateRef); + } + }); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/constants/error.constants.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/constants/error.constants.ts new file mode 100644 index 0000000000..2ebea94220 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/constants/error.constants.ts @@ -0,0 +1,4 @@ +export const PROBLEM_BASE_URL = 'https://www.jhipster.tech/problem'; +export const EMAIL_ALREADY_USED_TYPE = PROBLEM_BASE_URL + '/email-already-used'; +export const LOGIN_ALREADY_USED_TYPE = PROBLEM_BASE_URL + '/login-already-used'; +export const EMAIL_NOT_FOUND_TYPE = PROBLEM_BASE_URL + '/email-not-found'; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/constants/input.constants.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/constants/input.constants.ts new file mode 100644 index 0000000000..1e3978a9b3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/constants/input.constants.ts @@ -0,0 +1,2 @@ +export const DATE_FORMAT = 'YYYY-MM-DD'; +export const DATE_TIME_FORMAT = 'YYYY-MM-DDTHH:mm'; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/constants/pagination.constants.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/constants/pagination.constants.ts new file mode 100644 index 0000000000..a148d4579b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/constants/pagination.constants.ts @@ -0,0 +1 @@ +export const ITEMS_PER_PAGE = 20; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/index.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/index.ts new file mode 100644 index 0000000000..27d7cc078c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/index.ts @@ -0,0 +1,13 @@ +export * from './constants/error.constants'; +export * from './constants/pagination.constants'; +export * from './constants/input.constants'; +export * from './alert/alert.component'; +export * from './alert/alert-error.component'; +export * from './auth/has-any-authority.directive'; +export * from './language/find-language-from-key.pipe'; +export * from './login/login.component'; +export * from './util/request-util'; +export * from './shared-libs.module'; +export * from './shared-common.module'; +export * from './shared.module'; +export * from './util/datepicker-adapter'; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/language/find-language-from-key.pipe.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/language/find-language-from-key.pipe.ts new file mode 100644 index 0000000000..0886c9297b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/language/find-language-from-key.pipe.ts @@ -0,0 +1,14 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ name: 'findLanguageFromKey' }) +export class FindLanguageFromKeyPipe implements PipeTransform { + private languages: any = { + en: { name: 'English' }, + fr: { name: 'Français' }, + 'pt-br': { name: 'Português (Brasil)' } + // jhipster-needle-i18n-language-key-pipe - JHipster will add/remove languages in this object + }; + transform(lang: string): string { + return this.languages[lang].name; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/login/login.component.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/login/login.component.html new file mode 100644 index 0000000000..6112e0a657 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/login/login.component.html @@ -0,0 +1,43 @@ + + diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/login/login.component.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/login/login.component.ts new file mode 100644 index 0000000000..6715983b2c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/login/login.component.ts @@ -0,0 +1,87 @@ +import { Component, AfterViewInit, Renderer, ElementRef } from '@angular/core'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { Router } from '@angular/router'; +import { JhiEventManager } from 'ng-jhipster'; + +import { LoginService } from 'app/core/login/login.service'; +import { StateStorageService } from 'app/core/auth/state-storage.service'; + +@Component({ + selector: 'jhi-login-modal', + templateUrl: './login.component.html' +}) +export class JhiLoginModalComponent implements AfterViewInit { + authenticationError: boolean; + password: string; + rememberMe: boolean; + username: string; + credentials: any; + + constructor( + private eventManager: JhiEventManager, + private loginService: LoginService, + private stateStorageService: StateStorageService, + private elementRef: ElementRef, + private renderer: Renderer, + private router: Router, + public activeModal: NgbActiveModal + ) { + this.credentials = {}; + } + + ngAfterViewInit() { + setTimeout(() => this.renderer.invokeElementMethod(this.elementRef.nativeElement.querySelector('#username'), 'focus', []), 0); + } + + cancel() { + this.credentials = { + username: null, + password: null, + rememberMe: true + }; + this.authenticationError = false; + this.activeModal.dismiss('cancel'); + } + + login() { + this.loginService + .login({ + username: this.username, + password: this.password, + rememberMe: this.rememberMe + }) + .then(() => { + this.authenticationError = false; + this.activeModal.dismiss('login success'); + if (this.router.url === '/register' || /^\/activate\//.test(this.router.url) || /^\/reset\//.test(this.router.url)) { + this.router.navigate(['']); + } + + this.eventManager.broadcast({ + name: 'authenticationSuccess', + content: 'Sending Authentication Success' + }); + + // previousState was set in the authExpiredInterceptor before being redirected to login modal. + // since login is succesful, go to stored previousState and clear previousState + const redirect = this.stateStorageService.getUrl(); + if (redirect) { + this.stateStorageService.storeUrl(null); + this.router.navigate([redirect]); + } + }) + .catch(() => { + this.authenticationError = true; + }); + } + + register() { + this.activeModal.dismiss('to state register'); + this.router.navigate(['/register']); + } + + requestResetPassword() { + this.activeModal.dismiss('to state requestReset'); + this.router.navigate(['/reset', 'request']); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/model/quotes/quote.model.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/model/quotes/quote.model.ts new file mode 100644 index 0000000000..a937ab8589 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/model/quotes/quote.model.ts @@ -0,0 +1,12 @@ +import { Moment } from 'moment'; + +export interface IQuote { + id?: number; + symbol?: string; + price?: number; + lastTrade?: Moment; +} + +export class Quote implements IQuote { + constructor(public id?: number, public symbol?: string, public price?: number, public lastTrade?: Moment) {} +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/shared-common.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/shared-common.module.ts new file mode 100644 index 0000000000..af68857fe2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/shared-common.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; + +import { GatewaySharedLibsModule, FindLanguageFromKeyPipe, JhiAlertComponent, JhiAlertErrorComponent } from './'; + +@NgModule({ + imports: [GatewaySharedLibsModule], + declarations: [FindLanguageFromKeyPipe, JhiAlertComponent, JhiAlertErrorComponent], + exports: [GatewaySharedLibsModule, FindLanguageFromKeyPipe, JhiAlertComponent, JhiAlertErrorComponent] +}) +export class GatewaySharedCommonModule {} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/shared-libs.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/shared-libs.module.ts new file mode 100644 index 0000000000..b5fdd1457c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/shared-libs.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { CommonModule } from '@angular/common'; +import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgJhipsterModule } from 'ng-jhipster'; +import { InfiniteScrollModule } from 'ngx-infinite-scroll'; +import { CookieModule } from 'ngx-cookie'; +import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; + +@NgModule({ + imports: [ + NgbModule.forRoot(), + NgJhipsterModule.forRoot({ + // set below to true to make alerts look like toast + alertAsToast: false, + alertTimeout: 5000, + i18nEnabled: true, + defaultI18nLang: 'en' + }), + InfiniteScrollModule, + CookieModule.forRoot(), + FontAwesomeModule + ], + exports: [FormsModule, CommonModule, NgbModule, NgJhipsterModule, InfiniteScrollModule, FontAwesomeModule] +}) +export class GatewaySharedLibsModule {} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/shared.module.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/shared.module.ts new file mode 100644 index 0000000000..d83c1a54f9 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/shared.module.ts @@ -0,0 +1,15 @@ +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap'; + +import { NgbDateMomentAdapter } from './util/datepicker-adapter'; +import { GatewaySharedLibsModule, GatewaySharedCommonModule, JhiLoginModalComponent, HasAnyAuthorityDirective } from './'; + +@NgModule({ + imports: [GatewaySharedLibsModule, GatewaySharedCommonModule], + declarations: [JhiLoginModalComponent, HasAnyAuthorityDirective], + providers: [{ provide: NgbDateAdapter, useClass: NgbDateMomentAdapter }], + entryComponents: [JhiLoginModalComponent], + exports: [GatewaySharedCommonModule, JhiLoginModalComponent, HasAnyAuthorityDirective], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}) +export class GatewaySharedModule {} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/util/datepicker-adapter.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/util/datepicker-adapter.ts new file mode 100644 index 0000000000..61b1bf02dd --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/util/datepicker-adapter.ts @@ -0,0 +1,21 @@ +/** + * Angular bootstrap Date adapter + */ +import { Injectable } from '@angular/core'; +import { NgbDateAdapter, NgbDateStruct } from '@ng-bootstrap/ng-bootstrap'; +import { Moment } from 'moment'; +import * as moment from 'moment'; + +@Injectable() +export class NgbDateMomentAdapter extends NgbDateAdapter { + fromModel(date: Moment): NgbDateStruct { + if (date != null && date.isValid()) { + return { year: date.year(), month: date.month() + 1, day: date.date() }; + } + return null; + } + + toModel(date: NgbDateStruct): Moment { + return date ? moment(date.year + '-' + date.month + '-' + date.day, 'YYYY-MM-DD') : null; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/util/request-util.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/util/request-util.ts new file mode 100644 index 0000000000..6579c3cb2a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/shared/util/request-util.ts @@ -0,0 +1,18 @@ +import { HttpParams } from '@angular/common/http'; + +export const createRequestOption = (req?: any): HttpParams => { + let options: HttpParams = new HttpParams(); + if (req) { + Object.keys(req).forEach(key => { + if (key !== 'sort') { + options = options.set(key, req[key]); + } + }); + if (req.sort) { + req.sort.forEach(val => { + options = options.append('sort', val); + }); + } + } + return options; +}; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/app/vendor.ts b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/vendor.ts new file mode 100644 index 0000000000..e8923d5c66 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/app/vendor.ts @@ -0,0 +1,81 @@ +/* after changing this file run 'npm run webpack:build' */ +/* tslint:disable */ +import '../content/scss/vendor.scss'; + +// Imports all fontawesome core and solid icons + +import { library } from '@fortawesome/fontawesome-svg-core'; +import { + faUser, + faSort, + faSortUp, + faSortDown, + faSync, + faEye, + faBan, + faTimes, + faArrowLeft, + faSave, + faPlus, + faPencilAlt, + faBars, + faThList, + faUserPlus, + faRoad, + faTachometerAlt, + faHeart, + faList, + faBell, + faBook, + faHdd, + faFlag, + faWrench, + faClock, + faCloud, + faSignOutAlt, + faSignInAlt, + faCalendarAlt, + faSearch, + faTrashAlt, + faAsterisk, + faTasks, + faHome +} from '@fortawesome/free-solid-svg-icons'; + +// Adds the SVG icon to the library so you can use it in your page +library.add(faUser); +library.add(faSort); +library.add(faSortUp); +library.add(faSortDown); +library.add(faSync); +library.add(faEye); +library.add(faBan); +library.add(faTimes); +library.add(faArrowLeft); +library.add(faSave); +library.add(faPlus); +library.add(faPencilAlt); +library.add(faBars); +library.add(faHome); +library.add(faThList); +library.add(faUserPlus); +library.add(faRoad); +library.add(faTachometerAlt); +library.add(faHeart); +library.add(faList); +library.add(faBell); +library.add(faTasks); +library.add(faBook); +library.add(faHdd); +library.add(faFlag); +library.add(faWrench); +library.add(faClock); +library.add(faCloud); +library.add(faSignOutAlt); +library.add(faSignInAlt); +library.add(faCalendarAlt); +library.add(faSearch); +library.add(faTrashAlt); +library.add(faAsterisk); + +// jhipster-needle-add-element-to-vendor - JHipster will add new menu items here diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster.png b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster.png new file mode 100644 index 0000000000..141778d482 Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster.png differ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster192.png b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster192.png new file mode 100644 index 0000000000..2ab1093017 Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster192.png differ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster256.png b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster256.png new file mode 100644 index 0000000000..49d6c76d5d Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster256.png differ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster2x.png b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster2x.png new file mode 100644 index 0000000000..4751c91680 Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster2x.png differ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster384.png b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster384.png new file mode 100644 index 0000000000..616e470fce Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster384.png differ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster512.png b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster512.png new file mode 100644 index 0000000000..61a543639d Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/hipster512.png differ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/logo-jhipster.png b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/logo-jhipster.png new file mode 100644 index 0000000000..d8eb48da05 Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/images/logo-jhipster.png differ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/content/scss/_bootstrap-variables.scss b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/scss/_bootstrap-variables.scss new file mode 100644 index 0000000000..be0f226497 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/scss/_bootstrap-variables.scss @@ -0,0 +1,42 @@ +/* +* Bootstrap overrides https://getbootstrap.com/docs/4.0/getting-started/theming/ +* All values defined in bootstrap source +* https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss can be overwritten here +* Make sure not to add !default to values here +*/ + +// Colors: +// Grayscale and brand colors for use across Bootstrap. + +$primary: #3e8acc; +$success: #28a745; +$info: #17a2b8; +$warning: #ffc107; +$danger: #dc3545; + +// Options: +// Quickly modify global styling by enabling or disabling optional features. +$enable-rounded: true; +$enable-shadows: false; +$enable-gradients: false; +$enable-transitions: true; +$enable-hover-media-query: false; +$enable-grid-classes: true; +$enable-print-styles: true; + +// Components: +// Define common padding and border radius sizes and more. + +$border-radius: 0.15rem; +$border-radius-lg: 0.125rem; +$border-radius-sm: 0.1rem; + +// Body: +// Settings for the `` element. + +$body-bg: #e4e5e6; + +// Typography: +// Font, line-height, and color for body text, headings, and more. + +$font-size-base: 1rem; diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/content/scss/global.scss b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/scss/global.scss new file mode 100644 index 0000000000..cfbb9bf5b8 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/scss/global.scss @@ -0,0 +1,226 @@ +@import 'bootstrap-variables'; + +/* ============================================================== +Bootstrap tweaks +===============================================================*/ + +body, +h1, +h2, +h3, +h4 { + font-weight: 300; +} + +a { + color: #533f03; + font-weight: bold; +} + +a:hover { + color: #533f03; + font-weight: bold; + /* make sure browsers use the pointer cursor for anchors, even with no href */ + cursor: pointer; +} + +/* ========================================================================== +Browser Upgrade Prompt +========================================================================== */ +.browserupgrade { + margin: 0.2em 0; + background: #ccc; + color: #000; + padding: 0.2em 0; +} + +/* ========================================================================== +Generic styles +========================================================================== */ + +/* Error highlight on input fields */ +.ng-valid[required], +.ng-valid.required { + border-left: 5px solid green; +} + +.ng-invalid:not(form) { + border-left: 5px solid red; +} + +/* other generic styles */ + +.jh-card { + padding: 1.5%; + margin-top: 20px; + border: none; +} + +.error { + color: white; + background-color: red; +} + +.pad { + padding: 10px; +} + +.w-40 { + width: 40% !important; +} + +.w-60 { + width: 60% !important; +} + +.break { + white-space: normal; + word-break: break-all; +} + +.readonly { + background-color: #eee; + opacity: 1; +} + +.footer { + border-top: 1px solid rgba(0, 0, 0, 0.125); +} + +.hand, +[jhisortby] { + cursor: pointer; +} + +/* ========================================================================== +Custom alerts for notification +========================================================================== */ +.alerts { + .alert { + text-overflow: ellipsis; + pre { + background: none; + border: none; + font: inherit; + color: inherit; + padding: 0; + margin: 0; + } + .popover pre { + font-size: 10px; + } + } + .toast { + position: fixed; + width: 100%; + &.left { + left: 5px; + } + &.right { + right: 5px; + } + &.top { + top: 55px; + } + &.bottom { + bottom: 55px; + } + } +} + +@media screen and (min-width: 480px) { + .alerts .toast { + width: 50%; + } +} + +/* ========================================================================== +entity tables helpers +========================================================================== */ + +/* Remove Bootstrap padding from the element +http://stackoverflow.com/questions/19562903/remove-padding-from-columns-in-bootstrap-3 */ +@mixin no-padding($side) { + @if $side == 'all' { + .no-padding { + padding: 0 !important; + } + } @else { + .no-padding-#{$side} { + padding-#{$side}: 0 !important; + } + } +} +@include no-padding('left'); +@include no-padding('right'); +@include no-padding('top'); +@include no-padding('bottom'); +@include no-padding('all'); + +/* bootstrap 3 input-group 100% width +http://stackoverflow.com/questions/23436430/bootstrap-3-input-group-100-width */ +.width-min { + width: 1% !important; +} + +/* Makes toolbar not wrap on smaller screens +http://www.sketchingwithcss.com/samplechapter/cheatsheet.html#right */ +.flex-btn-group-container { + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + flex-direction: row; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} + +/* ========================================================================== +entity detail page css +========================================================================== */ +.row.jh-entity-details > { + dd { + margin-bottom: 15px; + } +} + +@media screen and (min-width: 768px) { + .row.jh-entity-details > { + dt { + margin-bottom: 15px; + } + dd { + border-bottom: 1px solid #eee; + padding-left: 180px; + margin-left: 0; + } + } +} + +/* ========================================================================== +ui bootstrap tweaks +========================================================================== */ +.nav, +.pagination, +.carousel, +.panel-title a { + cursor: pointer; +} + +.datetime-picker-dropdown > li.date-picker-menu div > table .btn-default, +.uib-datepicker-popup > li > div.uib-datepicker > table .btn-default { + border: 0; +} + +.datetime-picker-dropdown > li.date-picker-menu div > table:focus, +.uib-datepicker-popup > li > div.uib-datepicker > table:focus { + outline: none; +} + +.thread-dump-modal-lock { + max-width: 450px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* jhipster-needle-scss-add-main JHipster will add new css style */ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/content/scss/vendor.scss b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/scss/vendor.scss new file mode 100644 index 0000000000..12a8f54b83 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/content/scss/vendor.scss @@ -0,0 +1,12 @@ +/* after changing this file run 'npm run webpack:build' */ + +/*************************** +put Sass variables here: +eg $input-color: red; +****************************/ +// Override Boostrap variables +@import 'bootstrap-variables'; +// Import Bootstrap source files from node_modules +@import '~bootstrap/scss/bootstrap'; + +/* jhipster-needle-scss-add-vendor JHipster will add new css style */ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/favicon.ico b/jhipster/jhipster-uaa/gateway/src/main/webapp/favicon.ico new file mode 100644 index 0000000000..44c7595f58 Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/src/main/webapp/favicon.ico differ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/activate.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/activate.json new file mode 100644 index 0000000000..2926b78913 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/activate.json @@ -0,0 +1,9 @@ +{ + "activate": { + "title": "Activation", + "messages": { + "success": "Your user account has been activated. Please ", + "error": "Your user could not be activated. Please use the registration form to sign up." + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/audits.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/audits.json new file mode 100644 index 0000000000..ed5e16d4c5 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/audits.json @@ -0,0 +1,27 @@ +{ + "audits": { + "title": "Audits", + "filter": { + "title": "Filter per date", + "from": "from", + "to": "to", + "button": { + "weeks": "Weeks", + "today": "today", + "clear": "clear", + "close": "close" + } + }, + "table": { + "header": { + "principal": "User", + "date": "Date", + "status": "State", + "data": "Extra data" + }, + "data": { + "remoteAddress": "Remote Address:" + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/configuration.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/configuration.json new file mode 100644 index 0000000000..81e208de5c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/configuration.json @@ -0,0 +1,10 @@ +{ + "configuration": { + "title": "Configuration", + "filter": "Filter (by prefix)", + "table": { + "prefix": "Prefix", + "properties": "Properties" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/error.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/error.json new file mode 100644 index 0000000000..943389899c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/error.json @@ -0,0 +1,13 @@ +{ + "error": { + "title": "Error page!", + "http": { + "400": "Bad request.", + "403": "You are not authorized to access this page.", + "405": "The HTTP verb you used is not supported for this URL.", + "500": "Internal server error." + }, + "concurrencyFailure": "Another user modified this data at the same time as you. Your changes were rejected.", + "validation": "Validation error on the server." + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/gateway.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/gateway.json new file mode 100644 index 0000000000..6eb7791bc2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/gateway.json @@ -0,0 +1,15 @@ +{ + "gateway": { + "title": "Gateway", + "routes": { + "title": "Current routes", + "url": "URL", + "service": "Service", + "servers": "Available servers", + "error": "Warning: no server available!" + }, + "refresh": { + "button": "Refresh" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/global.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/global.json new file mode 100644 index 0000000000..2de18534e0 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/global.json @@ -0,0 +1,138 @@ +{ + "global": { + "title": "Gateway", + "browsehappy": "You are using an outdated browser. Please upgrade your browser to improve your experience.", + "menu": { + "home": "Home", + "jhipster-needle-menu-add-element": "JHipster will add additional menu entries here (do not translate!)", + "entities": { + "main": "Entities", + "quotesQuote": "Quote", + "jhipster-needle-menu-add-entry": "JHipster will add additional entities here (do not translate!)" + }, + "account": { + "main": "Account", + "settings": "Settings", + "password": "Password", + "sessions": "Sessions", + "login": "Sign in", + "logout": "Sign out", + "register": "Register" + }, + "admin": { + "main": "Administration", + "gateway": "Gateway", + "userManagement": "User management", + "tracker": "User tracker", + "metrics": "Metrics", + "health": "Health", + "configuration": "Configuration", + "logs": "Logs", + "audits": "Audits", + "apidocs": "API", + "database": "Database", + "jhipster-needle-menu-add-admin-element": "JHipster will add additional menu entries here (do not translate!)" + }, + "language": "Language" + }, + "form": { + "username": "Username", + "username.placeholder": "Your username", + "currentpassword": "Current password", + "currentpassword.placeholder": "Current password", + "newpassword": "New password", + "newpassword.placeholder": "New password", + "confirmpassword": "New password confirmation", + "confirmpassword.placeholder": "Confirm the new password", + "email": "Email", + "email.placeholder": "Your email" + }, + "messages": { + "info": { + "authenticated": { + "prefix": "If you want to ", + "link": "sign in", + "suffix": ", you can try the default accounts:
- Administrator (login=\"admin\" and password=\"admin\")
- User (login=\"user\" and password=\"user\")." + }, + "register": { + "noaccount": "You don't have an account yet?", + "link": "Register a new account" + } + }, + "error": { + "dontmatch": "The password and its confirmation do not match!" + }, + "validate": { + "newpassword": { + "required": "Your password is required.", + "minlength": "Your password is required to be at least 4 characters.", + "maxlength": "Your password cannot be longer than 50 characters.", + "strength": "Password strength:" + }, + "confirmpassword": { + "required": "Your confirmation password is required.", + "minlength": "Your confirmation password is required to be at least 4 characters.", + "maxlength": "Your confirmation password cannot be longer than 50 characters." + }, + "email": { + "required": "Your email is required.", + "invalid": "Your email is invalid.", + "minlength": "Your email is required to be at least 5 characters.", + "maxlength": "Your email cannot be longer than 50 characters." + } + } + }, + "field": { + "id": "ID" + }, + "ribbon": { + "dev":"Development" + }, + "item-count": "Showing {{first}} - {{second}} of {{total}} items." + }, + "entity": { + "action": { + "addblob": "Add blob", + "addimage": "Add image", + "back": "Back", + "cancel": "Cancel", + "delete": "Delete", + "edit": "Edit", + "open": "Open", + "save": "Save", + "view": "View" + }, + "detail": { + "field": "Field", + "value": "Value" + }, + "delete": { + "title": "Confirm delete operation" + }, + "validation": { + "required": "This field is required.", + "minlength": "This field is required to be at least {{ min }} characters.", + "maxlength": "This field cannot be longer than {{ max }} characters.", + "min": "This field should be at least {{ min }}.", + "max": "This field cannot be more than {{ max }}.", + "minbytes": "This field should be at least {{ min }} bytes.", + "maxbytes": "This field cannot be more than {{ max }} bytes.", + "pattern": "This field should follow pattern for {{ pattern }}.", + "number": "This field should be a number.", + "datetimelocal": "This field should be a date and time.", + "patternLogin": "This field can only contain letters, digits and e-mail addresses." + } + }, + "error": { + "internalServerError": "Internal server error", + "server.not.reachable": "Server not reachable", + "url.not.found": "Not found", + "NotNull": "Field {{ fieldName }} cannot be empty!", + "Size": "Field {{ fieldName }} does not meet min/max size requirements!", + "userexists": "Login name already used!", + "emailexists": "Email is already in use!", + "idexists": "A new {{ entityName }} cannot already have an ID", + "idnull": "Invalid ID" + }, + "footer": "This is your footer" +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/health.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/health.json new file mode 100644 index 0000000000..6084146524 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/health.json @@ -0,0 +1,32 @@ +{ + "health": { + "title": "Health Checks", + "refresh.button": "Refresh", + "stacktrace": "Stacktrace", + "details": { + "details": "Details", + "properties": "Properties", + "name": "Name", + "value": "Value", + "error": "Error" + }, + "indicator": { + "discoveryComposite": "Discovery Composite", + "refreshScope": "Microservice Refresh Scope", + "configServer": "Microservice Config Server", + "hystrix": "Hystrix", + "diskSpace": "Disk space", + "mail": "Email", + "db": "Database" + }, + "table": { + "service": "Service name", + "status": "Status" + }, + "status": { + "UNKNOWN": "UNKNOWN", + "UP": "UP", + "DOWN": "DOWN" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/home.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/home.json new file mode 100644 index 0000000000..402f18700a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/home.json @@ -0,0 +1,19 @@ +{ + "home": { + "title": "Welcome, Java Hipster!", + "subtitle": "This is your homepage", + "logged": { + "message": "You are logged in as user \"{{username}}\"." + }, + "question": "If you have any question on JHipster:", + "link": { + "homepage": "JHipster homepage", + "stackoverflow": "JHipster on Stack Overflow", + "bugtracker": "JHipster bug tracker", + "chat": "JHipster public chat room", + "follow": "follow @java_hipster on Twitter" + }, + "like": "If you like JHipster, don't forget to give us a star on", + "github": "GitHub" + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/login.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/login.json new file mode 100644 index 0000000000..3a000852e6 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/login.json @@ -0,0 +1,19 @@ +{ + "login": { + "title": "Sign in", + "form": { + "password": "Password", + "password.placeholder": "Your password", + "rememberme": "Remember me", + "button": "Sign in" + }, + "messages": { + "error": { + "authentication": "Failed to sign in! Please check your credentials and try again." + } + }, + "password" : { + "forgot": "Did you forget your password?" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/logs.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/logs.json new file mode 100644 index 0000000000..a614b128da --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/logs.json @@ -0,0 +1,11 @@ +{ + "logs": { + "title": "Logs", + "nbloggers": "There are {{ total }} loggers.", + "filter": "Filter", + "table": { + "name": "Name", + "level": "Level" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/metrics.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/metrics.json new file mode 100644 index 0000000000..9d804947c5 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/metrics.json @@ -0,0 +1,101 @@ +{ + "metrics": { + "title": "Application Metrics", + "refresh.button": "Refresh", + "updating": "Updating...", + "jvm": { + "title": "JVM Metrics", + "memory": { + "title": "Memory", + "total": "Total Memory", + "heap": "Heap Memory", + "nonheap": "Non-Heap Memory" + }, + "threads": { + "title": "Threads", + "all": "All", + "runnable": "Runnable", + "timedwaiting": "Timed waiting", + "waiting": "Waiting", + "blocked": "Blocked", + "dump": { + "title": "Threads dump", + "id": "Id: ", + "blockedtime": "Blocked Time", + "blockedcount": "Blocked Count", + "waitedtime": "Waited Time", + "waitedcount": "Waited Count", + "lockname": "Lock name", + "stacktrace": "Stacktrace", + "show": "Show Stacktrace", + "hide": "Hide Stacktrace" + } + }, + "gc": { + "title": "Garbage collections", + "marksweepcount": "Mark Sweep count", + "marksweeptime": "Mark Sweep time", + "scavengecount": "Scavenge count", + "scavengetime": "Scavenge time" + }, + "http": { + "title": "HTTP requests (events per second)", + "active": "Active requests:", + "total": "Total requests:", + "table": { + "code": "Code", + "count": "Count", + "mean": "Mean", + "average": "Average" + }, + "code": { + "ok": "Ok", + "notfound": "Not found", + "servererror": "Server Error" + } + } + }, + "servicesstats": { + "title": "Services statistics (time in millisecond)", + "table": { + "name": "Service name", + "count": "Count", + "mean": "Mean", + "min": "Min", + "max": "Max", + "p50": "p50", + "p75": "p75", + "p95": "p95", + "p99": "p99" + } + }, + "cache": { + "title": "Cache statistics", + "cachename": "Cache name", + "hits": "Cache Hits", + "misses": "Cache Misses", + "gets": "Cache Gets", + "puts": "Cache Puts", + "removals": "Cache Removals", + "evictions": "Cache Evictions", + "hitPercent": "Cache Hit %", + "missPercent": "Cache Miss %", + "averageGetTime": "Average get time (µs)", + "averagePutTime": "Average put time (µs)", + "averageRemoveTime": "Average remove time (µs)" + }, + "datasource": { + "usage": "Usage", + "title": "DataSource statistics (time in millisecond)", + "name": "Pool usage", + "count": "Count", + "mean": "Mean", + "min": "Min", + "max": "Max", + "p50": "p50", + "p75": "p75", + "p95": "p95", + "p99": "p99" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/password.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/password.json new file mode 100644 index 0000000000..46227a7702 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/password.json @@ -0,0 +1,12 @@ +{ + "password": { + "title": "Password for [{{username}}]", + "form": { + "button": "Save" + }, + "messages": { + "error": "An error has occurred! The password could not be changed.", + "success": "Password changed!" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/quotesQuote.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/quotesQuote.json new file mode 100644 index 0000000000..f538c6c895 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/quotesQuote.json @@ -0,0 +1,28 @@ + +{ + "gatewayApp": { + "quotesQuote" : { + "home": { + "title": "Quotes", + "createLabel": "Create a new Quote", + "createOrEditLabel": "Create or edit a Quote" + }, + "delete": { + "question": "Are you sure you want to delete Quote {{ id }}?" + }, + "detail": { + "title": "Quote" + }, + "symbol": "Symbol", + "price": "Price", + "lastTrade": "Last Trade" + } + }, + "quotesApp": { + "quotesQuote" : { + "created": "A new Quote is created with identifier {{ param }}", + "updated": "A Quote is updated with identifier {{ param }}", + "deleted": "A Quote is deleted with identifier {{ param }}" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/register.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/register.json new file mode 100644 index 0000000000..3a03980bf2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/register.json @@ -0,0 +1,24 @@ +{ + "register": { + "title": "Registration", + "form": { + "button": "Register" + }, + "messages": { + "validate": { + "login": { + "required": "Your username is required.", + "minlength": "Your username is required to be at least 1 character.", + "maxlength": "Your username cannot be longer than 50 characters.", + "pattern": "Your username can only contain letters and digits." + } + }, + "success": "Registration saved! Please check your email for confirmation.", + "error": { + "fail": "Registration failed! Please try again later.", + "userexists": "Login name already registered! Please choose another one.", + "emailexists": "Email is already in use! Please choose another one." + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/reset.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/reset.json new file mode 100644 index 0000000000..92edb191cd --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/reset.json @@ -0,0 +1,27 @@ +{ + "reset": { + "request": { + "title": "Reset your password", + "form": { + "button": "Reset password" + }, + "messages": { + "info": "Enter the email address you used to register", + "success": "Check your emails for details on how to reset your password.", + "notfound": "Email address isn't registered! Please check and try again" + } + }, + "finish" : { + "title": "Reset password", + "form": { + "button": "Validate new password" + }, + "messages": { + "info": "Choose a new password", + "success": "Your password has been reset. Please ", + "keymissing": "The reset key is missing.", + "error": "Your password couldn't be reset. Remember a password request is only valid for 24 hours." + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/sessions.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/sessions.json new file mode 100644 index 0000000000..d410035ee7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/sessions.json @@ -0,0 +1,15 @@ +{ + "sessions": { + "title": "Active sessions for [{{username}}]", + "table": { + "ipaddress": "IP address", + "useragent": "User Agent", + "date": "Date", + "button": "Invalidate" + }, + "messages": { + "success": "Session invalidated!", + "error": "An error has occurred! The session could not be invalidated." + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/settings.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/settings.json new file mode 100644 index 0000000000..d941381969 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/settings.json @@ -0,0 +1,32 @@ +{ + "settings": { + "title": "User settings for [{{username}}]", + "form": { + "firstname": "First Name", + "firstname.placeholder": "Your first name", + "lastname": "Last Name", + "lastname.placeholder": "Your last name", + "language": "Language", + "button": "Save" + }, + "messages": { + "error": { + "fail": "An error has occurred! Settings could not be saved.", + "emailexists": "Email is already in use! Please choose another one." + }, + "success": "Settings saved!", + "validate": { + "firstname": { + "required": "Your first name is required.", + "minlength": "Your first name is required to be at least 1 character", + "maxlength": "Your first name cannot be longer than 50 characters" + }, + "lastname": { + "required": "Your last name is required.", + "minlength": "Your last name is required to be at least 1 character", + "maxlength": "Your last name cannot be longer than 50 characters" + } + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/user-management.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/user-management.json new file mode 100644 index 0000000000..30c125b6d0 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/en/user-management.json @@ -0,0 +1,30 @@ +{ + "userManagement": { + "home": { + "title": "Users", + "createLabel": "Create a new user", + "createOrEditLabel": "Create or edit a user" + }, + "created": "A new user is created with identifier {{ param }}", + "updated": "An user is updated with identifier {{ param }}", + "deleted": "An user is deleted with identifier {{ param }}", + "delete": { + "question": "Are you sure you want to delete user {{ login }}?" + }, + "detail": { + "title": "User" + }, + "login": "Login", + "firstName": "First name", + "lastName": "Last name", + "email": "Email", + "activated": "Activated", + "deactivated": "Deactivated", + "profiles": "Profiles", + "langKey": "Language", + "createdBy": "Created by", + "createdDate": "Created date", + "lastModifiedBy": "Modified by", + "lastModifiedDate": "Modified date" + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/activate.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/activate.json new file mode 100644 index 0000000000..d9a3de0b24 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/activate.json @@ -0,0 +1,9 @@ +{ + "activate": { + "title": "Activation", + "messages": { + "success": "Votre compte utilisateur a été activé. Merci de vous ", + "error": "Votre compte utilisateur n'a pas pu être activé. Utilisez le formulaire d'enregistrement pour en créer un nouveau." + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/audits.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/audits.json new file mode 100644 index 0000000000..d4c4e06ab7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/audits.json @@ -0,0 +1,27 @@ +{ + "audits": { + "title": "Audits", + "filter": { + "title": "Filtrer par date", + "from": "De", + "to": "à", + "button": { + "weeks": "Semaines", + "today": "Aujourd'hui", + "clear": "Effacer", + "close": "Fermer" + } + }, + "table": { + "header": { + "principal": "Utilisateur", + "date": "Date", + "status": "Status", + "data": "Autres données" + }, + "data": { + "remoteAddress": "Adresse Distante :" + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/configuration.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/configuration.json new file mode 100644 index 0000000000..2b2ae1297f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/configuration.json @@ -0,0 +1,10 @@ +{ + "configuration": { + "title": "Configuration", + "filter": "Filtrer (par préfixe)", + "table": { + "prefix": "Préfixe", + "properties": "Propriétés" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/error.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/error.json new file mode 100644 index 0000000000..71a601a381 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/error.json @@ -0,0 +1,13 @@ +{ + "error": { + "title": "Page d'erreur !", + "http": { + "400": "Mauvaise requête.", + "403": "Vous n'avez pas les droits pour accéder à cette page.", + "405": "Le verbe HTTP que vous avez utilisé n'est pas reconnu par cet URL.", + "500": "Erreur interne du serveur." + }, + "concurrencyFailure": "Un autre utilisateur a modifié ces données en même temps que vous. Vos changements n'ont pas été sauvegardés.", + "validation": "Erreur de validation côté serveur." + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/gateway.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/gateway.json new file mode 100644 index 0000000000..31abf02831 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/gateway.json @@ -0,0 +1,15 @@ +{ + "gateway": { + "title": "Gateway", + "routes": { + "title": "Routes actuelles", + "url": "URL", + "service": "Service", + "servers": "Serveurs disponibles", + "error": "Attention : aucun serveur disponible !" + }, + "refresh": { + "button": "Rafraîchir" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/global.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/global.json new file mode 100644 index 0000000000..2143410005 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/global.json @@ -0,0 +1,137 @@ +{ + "global": { + "title": "Gateway", + "browsehappy": "Vous utilisez un ancien navigateur. Veuillez mettre à jour votre navigateur pour une meilleure expérience.", + "menu": { + "home": "Accueil", + "jhipster-needle-menu-add-element": "JHipster will add additional menu entries here (do not translate!)", + "entities": { + "main": "Entités", + "quotesQuote": "Quote", + "jhipster-needle-menu-add-entry": "JHipster will add additional entities here (do not translate!)" + }, + "account": { + "main": "Compte", + "settings": "Profil", + "password": "Mot de passe", + "sessions": "Sessions", + "login": "S'authentifier", + "logout": "Déconnexion", + "register": "Créer un compte" + }, + "admin": { + "main": "Administration", + "gateway": "Gateway", + "userManagement": "Gestion des utilisateurs", + "tracker": "Suivi des utilisateurs", + "metrics": "Métriques", + "health": "Diagnostics", + "configuration": "Configuration", + "logs": "Logs", + "audits": "Audits", + "apidocs": "API", + "database": "Base de données", + "jhipster-needle-menu-add-admin-element": "JHipster will add additional menu entries here (do not translate!)" + }, + "language": "Langue" + }, + "form": { + "username": "Nom d'utilisateur", + "username.placeholder": "Votre nom d'utilisateur", + "currentpassword": "Current password", + "currentpassword.placeholder": "Current password", + "newpassword": "Nouveau mot de passe", + "newpassword.placeholder": "Nouveau mot de passe", + "confirmpassword": "Confirmation du nouveau mot de passe", + "confirmpassword.placeholder": "Confirmation du nouveau mot de passe", + "email": "Email", + "email.placeholder": "Votre email" + }, + "messages": { + "info": { + "authenticated": { + "prefix": "Si vous voulez vous ", + "link": "connecter", + "suffix": ", vous pouvez utiliser les comptes par défaut :
- Administrateur (nom d'utilisateur=\"admin\" et mot de passe =\"admin\")
- Utilisateur (nom d'utilisateur=\"user\" et mot de passe =\"user\")." + }, + "register": { + "noaccount": "Vous n'avez pas encore de compte ?", + "link": "Créer un compte" + } + }, + "error": { + "dontmatch": "Le nouveau mot de passe et sa confirmation ne sont pas égaux !" + }, + "validate": { + "newpassword": { + "required": "Votre mot de passe est requis.", + "minlength": "Votre mot de passe doit comporter au moins 5 caractères.", + "maxlength": "Votre mot de passe ne doit pas comporter plus de 50 caractères.", + "strength": "Robustesse du mot de passe :" + }, + "confirmpassword": { + "required": "Votre confirmation du mot de passe est requise.", + "minlength": "Votre confirmation du mot de passe doit comporter au moins 5 caractères.", + "maxlength": "Votre confirmation du mot de passe ne doit pas comporter plus de 50 caractères." + }, + "email": { + "required": "Votre email est requis.", + "minlength": "Votre email doit comporter au moins 5 caractères.", + "maxlength": "Votre email ne doit pas comporter plus de 50 caractères.", + "invalid": "Votre email n'est pas valide." + } + } + }, + "field": { + "id": "ID" + }, + "ribbon": { + "dev":"Développement" + }, + "item-count": "Affichage {{first}} - {{second}} de {{total}} items." + }, + "entity": { + "action": { + "addblob": "Ajouter blob", + "addimage": "Ajouter image", + "back": "Retour", + "cancel": "Annuler", + "edit": "Editer", + "delete": "Supprimer", + "open": "Ouvrir", + "save": "Sauvegarder", + "view": "Voir" + }, + "detail": { + "field": "Champs", + "value": "Valeur" + }, + "delete": { + "title": "Confirmation de suppression" + }, + "validation": { + "required": "Ce champ est obligatoire.", + "minlength": "Ce champ doit faire au minimum {{min}} caractères.", + "maxlength": "Ce champ doit faire moins de {{max}} caractères.", + "min": "Ce champ doit être supérieur à {{min}}.", + "max": "Ce champ doit être inférieur à {{max}}.", + "minbytes": "Ce champ doit être supérieur à {{min}} bytes.", + "maxbytes": "Ce champ doit être inférieur à {{max}} bytes.", + "pattern": "Ce champ doit suivre l'expression régulière {{pattern}}.", + "number": "Ce champ doit être un nombre.", + "datetimelocal": "Ce champ doit être une date et une heure." + } + }, + "error": { + "internalServerError": "Erreur interne du serveur", + "server.not.reachable": "Serveur inaccessible", + "url.not.found": "Non trouvé", + "NotNull": "Le champ {{fieldName}} ne peut pas être vide !", + "Size": "Le champ {{fieldName}} ne respecte pas les critères minimum et maximum !", + "userexists": "Login déjà utilisé !", + "emailexists": "Email déjà utilisé !", + "idexists": "Une nouvelle entité {{entityName}} ne peut pas avoir d'ID !", + "idnull": "Invalid ID" + }, + "footer": "Ceci est votre pied de page" +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/health.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/health.json new file mode 100644 index 0000000000..ec52f4c421 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/health.json @@ -0,0 +1,32 @@ +{ + "health": { + "title": "Diagnostics", + "refresh.button": "Rafraichir", + "stacktrace": "Stacktrace", + "details": { + "details": "Détails", + "properties": "Propriétés", + "name": "Nom", + "value": "Valeur", + "error": "Erreur" + }, + "indicator": { + "discoveryComposite": "Discovery Composite", + "refreshScope": "Microservice Refresh Scope", + "configServer": "Microservice Config Server", + "hystrix": "Hystrix", + "diskSpace": "Espace disque", + "mail": "Email", + "db": "Base de données" + }, + "table": { + "service": "Nom du service", + "status": "Etat" + }, + "status": { + "UNKNOWN": "UNKNOWN", + "UP": "DISPONIBLE", + "DOWN": "HORS SERVICE" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/home.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/home.json new file mode 100644 index 0000000000..634a6e9816 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/home.json @@ -0,0 +1,19 @@ +{ + "home": { + "title": "Bienvenue, Java Hipster !", + "subtitle": "Ceci est votre page d'accueil", + "logged": { + "message": "Vous êtes connecté en tant que \"{{username}}\"." + }, + "question": "Si vous avez des questions à propos de JHipster :", + "link": { + "homepage": "Page d'accueil de JHipster", + "stackoverflow": "JHipster sur Stack Overflow", + "bugtracker": "JHipster bug tracker", + "chat": "JHipster public chat room", + "follow": "Suivez @java_hipster sur Twitter" + }, + "like": "Si vous aimez JHipster, donnez nous une étoile sur", + "github": "GitHub " + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/login.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/login.json new file mode 100644 index 0000000000..31e6138b66 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/login.json @@ -0,0 +1,19 @@ +{ + "login": { + "title": "Authentification", + "form": { + "password": "Mot de passe", + "password.placeholder": "Votre mot de passe", + "rememberme": "Garder la session ouverte", + "button": "Connexion" + }, + "messages": { + "error": { + "authentication": "Erreur d'authentification ! Veuillez vérifier vos identifiants de connexion." + } + }, + "password" : { + "forgot": "Avez-vous oublié votre mot de passe ?" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/logs.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/logs.json new file mode 100644 index 0000000000..c87c6e4b61 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/logs.json @@ -0,0 +1,11 @@ +{ + "logs": { + "title": "Logs", + "nbloggers": "Total de {{ total }} \"loggers\".", + "filter": "Filtrer", + "table": { + "name": "Nom", + "level": "Niveau" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/metrics.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/metrics.json new file mode 100644 index 0000000000..e2006488c4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/metrics.json @@ -0,0 +1,101 @@ +{ + "metrics": { + "title": "Métriques de l'application", + "refresh.button": "Rafraîchir", + "updating": "Mise à jour...", + "jvm": { + "title": "Métriques de la JVM", + "memory": { + "title": "Mémoire", + "total": "Mémoire totale", + "heap": "Mémoire \"Heap\"", + "nonheap": "Mémoire \"Non-Heap\"" + }, + "threads": { + "title": "Threads", + "all": "Tous", + "runnable": "Exécutable", + "timedwaiting": "Temps d'attente", + "waiting": "En attente", + "blocked": "Bloqué", + "dump": { + "title": "Threads dump", + "id": "Id :", + "blockedtime": "Temps bloqué", + "blockedcount": "Nb fois bloqué", + "waitedtime": "Temps d'attente", + "waitedcount": "Nb fois en attente", + "lockname": "Nom du process bloquant", + "stacktrace": "Stacktrace", + "show": "Afficher", + "hide": "Cacher" + } + }, + "gc": { + "title": "Garbage collections", + "marksweepcount": "Total de \"Mark Sweep\"", + "marksweeptime": "Temps \"Mark Sweep\"", + "scavengecount": "Total \"Scavenge\"", + "scavengetime": "Temps \"Scavenge\"" + }, + "http": { + "title": "Requêtes HTTP (évènements par seconde)", + "active": "Requêtes actives :", + "total": "Requêtes totales :", + "table": { + "code": "Code", + "count": "Total", + "mean": "Médian", + "average": "Moyenne" + }, + "code": { + "ok": "Ok", + "notfound": "Non trouvé", + "servererror": "Erreur serveur" + } + } + }, + "servicesstats": { + "title": "Statistiques des services (temps en millisecondes)", + "table": { + "name": "Nom du server", + "count": "Total", + "mean": "Médian", + "min": "Min", + "max": "Max", + "p50": "p50", + "p75": "p75", + "p95": "p95", + "p99": "p99" + } + }, + "cache": { + "title": "Statistiques de cache", + "cachename": "Nom du cache", + "hits": "Données existantes", + "misses": "Données non existantes", + "gets": "Lectures", + "puts": "Écritures", + "removals": "Suppressions", + "evictions": "Évictions", + "hitPercent": "% données existantes", + "missPercent": "% données non existantes", + "averageGetTime": "Temps de lecture moyen (µs)", + "averagePutTime": "Temps d'écriture moyen (µs)", + "averageRemoveTime": "Temps de suppression moyen (µs)" + }, + "datasource": { + "usage": "Usage", + "title": "Statistiques du pool de connexions (temps en millisecondes)", + "name": "Utilisation du pool", + "count": "Total", + "mean": "Médian", + "min": "Min", + "max": "Max", + "p50": "p50", + "p75": "p75", + "p95": "p95", + "p99": "p99" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/password.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/password.json new file mode 100644 index 0000000000..755cc15173 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/password.json @@ -0,0 +1,12 @@ +{ + "password": { + "title": "Changer le mot de passe pour [{{username}}]", + "form": { + "button": "Sauvegarder" + }, + "messages": { + "error": "Une erreur est survenue ! Le mot de passe n'a pas pu être modifié.", + "success": "Le mot de passe a été modifié !" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/quotesQuote.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/quotesQuote.json new file mode 100644 index 0000000000..afe91e2686 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/quotesQuote.json @@ -0,0 +1,28 @@ + +{ + "gatewayApp": { + "quotesQuote" : { + "home": { + "title": "Quotes", + "createLabel": "Créer un nouveau Quote", + "createOrEditLabel": "Créer ou éditer un Quote" + }, + "delete": { + "question": "Etes-vous certain de vouloir supprimer le Quote {{ id }} ?" + }, + "detail": { + "title": "Quote" + }, + "symbol": "Symbol", + "price": "Price", + "lastTrade": "Last Trade" + } + }, + "quotesApp": { + "quotesQuote" : { + "created": "Un nouveau Quote a été créé avec l'identifiant {{ param }}", + "updated": "Le Quote avec l'identifiant {{ param }} a été mis à jour", + "deleted": "Le Quote avec l'identifiant {{ param }} a été supprimé" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/register.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/register.json new file mode 100644 index 0000000000..a8dd74684a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/register.json @@ -0,0 +1,24 @@ +{ + "register": { + "title": "Création de compte utilisateur", + "form": { + "button": "Enregistrement" + }, + "messages": { + "validate": { + "login": { + "required": "Votre nom d'utilisateur est obligatoire.", + "minlength": "Votre nom d'utilisateur doit contenir plus d'un caractère.", + "maxlength": "Votre nom d'utilisateur ne peut pas contenir plus de 50 caractères.", + "pattern": "Votre nom d'utilisateur ne peut contenir que des lettres minuscules ou des nombres." + } + }, + "success": "Compte enregistré ! Merci de vérifier votre email de confirmation.", + "error": { + "fail": "Compte non créé ! Merci d'essayer à nouveau plus tard.", + "userexists": "Ce compte utilisateur existe déjà ! Veuillez en choisir un autre.", + "emailexists": "Cet email est déjà utilisé ! Veuillez en choisir un autre." + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/reset.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/reset.json new file mode 100644 index 0000000000..d9376b836a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/reset.json @@ -0,0 +1,27 @@ +{ + "reset": { + "request": { + "title": "Réinitialiser son mot de passe", + "form": { + "button": "Réinitialiser le mot de passe" + }, + "messages": { + "info": "Veuillez renseigner l'adresse email utilisée pour vous enregistrer", + "success": "Veuillez vérifier vos nouveaux emails et suivre les instructions pour réinitialiser votre mot de passe.", + "notfound": "L'adresse email n'existe pas ! Merci de la vérifier et de réessayer." + } + }, + "finish" : { + "title": "Réinitialisation du mot de passe", + "form": { + "button": "Réinitialiser le mot de passe" + }, + "messages": { + "info": "Choisir un nouveau mot de passe", + "success": "Votre mot de passe a été réinitialisé. Merci de ", + "keymissing": "La clef de réinitilisation est manquante", + "error": "Votre mot de passe n'a pas pu être réinitialisé. La demande de réinitialisation n'est valable que 24 heures." + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/sessions.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/sessions.json new file mode 100644 index 0000000000..b2d45dcc48 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/sessions.json @@ -0,0 +1,15 @@ +{ + "sessions": { + "title": "Sessions actives de [{{username}}]", + "table": { + "ipaddress": "Adresse IP", + "useragent": "User Agent", + "date": "Date", + "button": "Invalider" + }, + "messages": { + "success": "La session a été invalidée !", + "error": "Une erreur est survenue ! La session ne peut pas être invalidée." + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/settings.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/settings.json new file mode 100644 index 0000000000..78e74c8b2c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/settings.json @@ -0,0 +1,32 @@ +{ + "settings": { + "title": "Profil de l'utilisateur [{{username}}]", + "form": { + "firstname": "Prénom", + "firstname.placeholder": "Votre prénom", + "lastname": "Nom", + "lastname.placeholder": "Votre nom", + "language": "Langue", + "button": "Sauvegarder" + }, + "messages": { + "error": { + "fail": "Une erreur est survenue ! Votre profil n'a pas été sauvegardé.", + "emailexists": "Cet email est déjà utilisé ! Veuillez en choisir un autre." + }, + "success": "Votre profil a été sauvegardé !", + "validate": { + "firstname": { + "required": "Votre prénom est requis.", + "minlength": "Votre prénom doit comporter au moins un caractère.", + "maxlength": "Votre prénom ne doit pas comporter plus de 50 caractères." + }, + "lastname": { + "required": "Votre nom est requis.", + "minlength": "Votre nom doit comporter au moins un caractère.", + "maxlength": "Votre nom ne doit pas comporter plus de 50 caractères." + } + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/user-management.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/user-management.json new file mode 100644 index 0000000000..03fb1632c4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/fr/user-management.json @@ -0,0 +1,30 @@ +{ + "userManagement": { + "home": { + "title": "Utilisateurs", + "createLabel": "Créer un nouvel utilisateur", + "createOrEditLabel": "Créer ou éditer un utilisateur" + }, + "created": "L'utilisateur {{ param }} a été créé.", + "updated": "L'utilisateur {{ param }} a été mis à jour.", + "deleted": "L'utilisateur {{ param }} a été supprimé.", + "delete": { + "question": "Etes-vous certain de vouloir supprimer l'utilisateur {{ login }} ?" + }, + "detail": { + "title": "Utilisateur" + }, + "login": "Login", + "firstName": "Prénom", + "lastName": "Nom", + "email": "Email", + "activated": "Activé", + "deactivated": "Désactivé", + "profiles": "Droits", + "langKey": "Langue", + "createdBy": "Créé par", + "createdDate": "Créé le", + "lastModifiedBy": "Modifié par", + "lastModifiedDate": "Modifié le" + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/activate.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/activate.json new file mode 100644 index 0000000000..b526a9e3cf --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/activate.json @@ -0,0 +1,9 @@ +{ + "activate": { + "title": "Ativação", + "messages": { + "success": "Usuário ativado com sucesso. Favor ", + "error": "O usuário não pode ser ativado. Favor utilizar o formulário de cadastro para criar uma nova conta." + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/audits.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/audits.json new file mode 100644 index 0000000000..845dcbb437 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/audits.json @@ -0,0 +1,27 @@ +{ + "audits": { + "title": "Auditorias", + "filter": { + "title": "Filtro por data", + "from": "de", + "to": "até", + "button": { + "weeks": "Semanas", + "today": "hoje", + "clear": "limpar", + "close": "fechar" + } + }, + "table": { + "header": { + "principal": "Usuário", + "date": "Data", + "status": "Estado", + "data": "Informações extras" + }, + "data": { + "remoteAddress": "Endereço remoto:" + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/configuration.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/configuration.json new file mode 100644 index 0000000000..6f80c59028 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/configuration.json @@ -0,0 +1,10 @@ +{ + "configuration": { + "title": "Configuração", + "filter": "Filtro", + "table": { + "prefix": "Prefixo", + "properties": "Propriedades" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/error.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/error.json new file mode 100644 index 0000000000..92fdff4f11 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/error.json @@ -0,0 +1,13 @@ +{ + "error": { + "title": "Página de erro!", + "http": { + "400": "Bad request.", + "403": "Você não tem autorização para acessar esta página.", + "405": "The HTTP verb you used is not supported for this URL.", + "500": "Internal server error." + }, + "concurrencyFailure": "Another user modified this data at the same time as you. Your changes were rejected.", + "validation": "Validation error on the server." + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/gateway.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/gateway.json new file mode 100644 index 0000000000..8c8bbd7e98 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/gateway.json @@ -0,0 +1,15 @@ +{ + "gateway": { + "title": "Gateway", + "routes": { + "title": "Current routes", + "url": "URL", + "service": "service", + "servers": "Available servers", + "error": "Warning: no server available!" + }, + "refresh": { + "button": "Refresh" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/global.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/global.json new file mode 100644 index 0000000000..e40f936589 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/global.json @@ -0,0 +1,137 @@ +{ + "global": { + "title": "Gateway", + "browsehappy": "Você está usando um navegador desatualizado. Favor atualizar o seu navegador para ter uma experiência melhor.", + "menu": { + "home": "Início", + "jhipster-needle-menu-add-element": "JHipster will add additional menu entries here (do not translate!)", + "entities": { + "main": "Entidades", + "quotesQuote": "Quote", + "jhipster-needle-menu-add-entry": "JHipster will add additional entities here (do not translate!)" + }, + "account": { + "main": "Conta", + "settings": "Configuração", + "password": "Senha", + "sessions": "Sessões", + "login": "Entrar", + "logout": "Sair", + "register": "Registrar" + }, + "admin": { + "main": "Administração", + "gateway": "Gateway", + "userManagement": "Gerenciamento de usuário", + "tracker": "Rastreamento de usuário", + "metrics": "Métricas", + "health": "Estado do Sistema", + "configuration": "Configuração", + "logs": "Logs", + "audits": "Auditorias", + "apidocs": "API", + "database": "Banco de dados", + "jhipster-needle-menu-add-admin-element": "JHipster will add additional menu entries here (do not translate!)" + }, + "language": "Idioma" + }, + "form": { + "username": "Usuário", + "username.placeholder": "Seu usuário", + "currentpassword": "Current password", + "currentpassword.placeholder": "Current password", + "newpassword": "Nova senha", + "newpassword.placeholder": "Nova senha", + "confirmpassword": "Confirmação de nova senha", + "confirmpassword.placeholder": "Confirme a nova senha", + "email": "Email", + "email.placeholder": "Seu email" + }, + "messages": { + "info": { + "authenticated": { + "prefix": "Para ", + "link": "entrar", + "suffix": ", utilize as seguintes contas padrões:
- Administrador (usuário=\"admin\" and senha=\"admin\")
- Usuário (usuário=\"user\" and senha=\"user\")." + }, + "register": { + "noaccount": "Não possui uma conta ainda?", + "link": "Crie uma nova conta" + } + }, + "error": { + "dontmatch" : "A senha e sua confirmação devem ser iguais!" + }, + "validate": { + "newpassword": { + "required": "A senha é obrigatória.", + "minlength": "A senha deve ter pelo menos 5 caracteres", + "maxlength": "A senha não pode ter mais de 50 caracteres", + "strength": "Nível de dificuldade da senha:" + }, + "confirmpassword": { + "required": "A confirmação da senha é obrigatória.", + "minlength": "A confirmação da senha deve ter pelo menos 5 caracteres", + "maxlength": "A confirmação da senha não pode ter mais de 50 caracteres" + }, + "email": { + "required": "O email é obrigatório.", + "invalid": "Email inválido.", + "minlength": "O email deve ter pelo menos 5 caracteres", + "maxlength": "O email não pode ter mais de 50 caracteres" + } + } + }, + "field": { + "id" : "Código" + }, + "ribbon": { + "dev":"Development" + }, + "item-count": "Mostrando {{first}} - {{second}} de {{total}} resultados." + }, + "entity": { + "action": { + "addblob": "Adicionar blob", + "addimage": "Adicionar imagem", + "back": "Voltar", + "cancel": "Cancelar", + "delete": "Excluir", + "edit": "Editar", + "open": "Open", + "save": "Salvar", + "view": "Visualizar" + }, + "detail": { + "field": "Campo", + "value": "Valor" + }, + "delete": { + "title": "Confirme a exclusão" + }, + "validation": { + "required": "O campo é obrigatório.", + "minlength": "Este campo deve ter ao menos {{min}} caracteres.", + "maxlength": "Este campo não pode ter mais que {{max}} caracteres.", + "min": "Este campo deve ser maior que {{min}}.", + "max": "Este campo não pode ser maior que {{max}}.", + "minbytes": "Este campo deve ter ao menos {{min}} bytes.", + "maxbytes": "Este campo não pode ter mais que {{max}} bytes.", + "pattern": "Este campo deve estar dentro do seguinte padrão {{pattern}}.", + "number": "Este campo é do tipo número.", + "datetimelocal": "Este campo é do tipo data/hora." + } + }, + "error": { + "internalServerError": "Internal server error", + "server.not.reachable": "Servidor indisponível", + "url.not.found": "Not found", + "NotNull": "O Campo {{fieldName}} não pode ser vazio!", + "Size": "O campo {{fieldName}} não obedece os requisitos de tamanho mínimo ou máximo!", + "userexists": "Usuário já existente!", + "emailexists": "Este email já está cadastrado!", + "idexists": "Novo(a) {{entityName}} não pode ter uma ID", + "idnull": "Invalid ID" + }, + "footer": "Este é o seu rodapé" +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/health.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/health.json new file mode 100644 index 0000000000..e74a4e87e2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/health.json @@ -0,0 +1,32 @@ +{ + "health": { + "title": "Estado do Sistema", + "refresh.button": "Atualizar", + "stacktrace": "Stacktrace", + "details": { + "details": "Details", + "properties": "Properties", + "name": "Name", + "value": "Value", + "error": "Error" + }, + "indicator": { + "discoveryComposite": "Discovery Composite", + "refreshScope": "Microservice Refresh Scope", + "configServer": "Microservice Config Server", + "hystrix": "Hystrix", + "diskSpace": "Espaço em disco", + "mail": "Email", + "db": "Banco de dados" + }, + "table": { + "service": "Nome do Serviço", + "status": "Estado" + }, + "status": { + "UNKNOWN": "UNKNOWN", + "UP": "UP", + "DOWN": "DOWN" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/home.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/home.json new file mode 100644 index 0000000000..efa2736361 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/home.json @@ -0,0 +1,19 @@ +{ + "home": { + "title": "Bem vindo, Java Hipster!", + "subtitle": "Esta é a página principal", + "logged": { + "message": "Você está logado como \"{{username}}\"." + }, + "question": "Em caso de dúvida sobre o JHipster:", + "link": { + "homepage": "JHipster homepage", + "stackoverflow": "JHipster no Stack Overflow", + "bugtracker": "JHipster bug tracker", + "chat": "JHipster public chat room", + "follow": "contate @java_hipster on Twitter" + }, + "like": "Se você gosta do JHipster, não se esqueça de avaliar no", + "github": "GitHub" + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/login.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/login.json new file mode 100644 index 0000000000..4453845af2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/login.json @@ -0,0 +1,19 @@ +{ + "login": { + "title": "Autenticação", + "form": { + "password": "Senha", + "password.placeholder": "Sua senha", + "rememberme": "Manter-me logado", + "button": "Entrar" + }, + "messages": { + "error": { + "authentication": "Erro de autenticação! Por favor verifique suas credenciais e tente novamente." + } + }, + "password" : { + "forgot": "Esqueceu sua senha?" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/logs.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/logs.json new file mode 100644 index 0000000000..50a07fa996 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/logs.json @@ -0,0 +1,11 @@ +{ + "logs": { + "title": "Logs", + "nbloggers": "Existem {{ total }} loggers.", + "filter": "Filtro", + "table": { + "name": "Nome", + "level": "Nível" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/metrics.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/metrics.json new file mode 100644 index 0000000000..a00bc96cd7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/metrics.json @@ -0,0 +1,93 @@ +{ + "metrics": { + "title": "Métricas da aplicação", + "refresh.button": "Atualizar", + "updating": "Atualização...", + "jvm": { + "title": "Métricas da JVM", + "memory": { + "title": "Memória", + "total": "Memória Total", + "heap": "Memória Heap", + "nonheap": "Memória não Heap" + }, + "threads": { + "title": "Threads", + "all": "Tudo", + "runnable": "Runnable", + "timedwaiting": "Tempo de espera", + "waiting": "Aguardando", + "blocked": "Bloqueado", + "dump": { + "title": "Threads dump", + "id": "Id: ", + "blockedtime": "Tempo bloqueado", + "blockedcount": "Número de bloqueios", + "waitedtime": "Tempo de espera", + "waitedcount": "Número de esperas", + "lockname": "Nome do Lock", + "stacktrace": "Stacktrace", + "show": "Mostrar", + "hide": "Esconder" + } + }, + "gc": { + "title": "Coletas de lixo", + "marksweepcount": "Número de marcados para coleta", + "marksweeptime": "Tempo de marcação para coleta", + "scavengecount": "Número de varreduras", + "scavengetime": "Tempo de varreduras" + }, + "http": { + "title": "Requisições HTTP (eventos por segundo)", + "active": "Requisições ativas:", + "total": "Total de requisições:", + "table": { + "code": "Código", + "count": "Contagem", + "mean": "Mediana", + "average": "Média" + }, + "code": { + "ok": "Ok", + "notfound": "Não encontrado", + "servererror": "Erro do servidor" + } + } + }, + "servicesstats": { + "title": "Estatísticas dos serviços (tempo em milisegundos)", + "table": { + "name": "Nome do serviço", + "count": "Contagem", + "mean": "Mediana", + "min": "Min", + "max": "Max", + "p50": "p50", + "p75": "p75", + "p95": "p95", + "p99": "p99" + } + }, + "cache": { + "title": "Estatísticas da cache", + "cachename": "Nome da cache", + "hits": "Hits", + "misses": "Misses", + "evictions": "Número de despejos" + }, + "datasource": { + "usage": "Utilização", + "title": "Estatísticas do datasource (tempo em milisegundos)", + "name": "Utilização do pool", + "count": "Contagem", + "mean": "Mediana", + "min": "Min", + "max": "Max", + "p50": "p50", + "p75": "p75", + "p95": "p95", + "p99": "p99" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/password.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/password.json new file mode 100644 index 0000000000..4ecdcc136f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/password.json @@ -0,0 +1,12 @@ +{ + "password": { + "title": "Senha para [{{username}}]", + "form": { + "button": "Salvar" + }, + "messages": { + "error": "Ocorreu um erro! A senha não pode ser alterada.", + "success": "Senha alterada com sucesso!" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/quotesQuote.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/quotesQuote.json new file mode 100644 index 0000000000..6f89dfa411 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/quotesQuote.json @@ -0,0 +1,28 @@ + +{ + "gatewayApp": { + "quotesQuote" : { + "home": { + "title": "Quotes", + "createLabel": "Criar novo Quote", + "createOrEditLabel": "Criar ou editar Quote" + }, + "delete": { + "question": "Tem certeza de que deseja excluir Quote {{ id }}?" + }, + "detail": { + "title": "Quote" + }, + "symbol": "Symbol", + "price": "Price", + "lastTrade": "Last Trade" + } + }, + "quotesApp": { + "quotesQuote" : { + "created": "Um novo Quote foi criado com o identificador {{ param }}", + "updated": "Um Quote foi atualizado com o identificador {{ param }}", + "deleted": "Um Quote foi deletado com o identificador {{ param }}" + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/register.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/register.json new file mode 100644 index 0000000000..a19994c09f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/register.json @@ -0,0 +1,24 @@ +{ + "register": { + "title": "Cadastro", + "form": { + "button": "Cadastre" + }, + "messages": { + "validate": { + "login": { + "required": "O usuário é obrigatório.", + "minlength": "O usuário deve ter pelo menos 1 caractere", + "maxlength": "O usuário não pode ter mais de 50 caracteres", + "pattern": "Your login can only contain lower-case letters and digits" + } + }, + "success": "Cadstro salvo com sucesso! Favor verificar seu email para confirmar a conta.", + "error": { + "fail": "Erro ao realizar o cadastro! Favor tentar novamente mais tarde.", + "userexists": "Usuário já registrado! Favor escolher outro.", + "emailexists": "Email já está em uso! Por favor informe outro." + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/reset.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/reset.json new file mode 100644 index 0000000000..56bba46692 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/reset.json @@ -0,0 +1,30 @@ +{ + "reset": { + "request": { + "title": "Nova senha", + "form": { + "button": "Criar nova senha" + }, + "messages": { + "info": "Informe endereço de email utilizado no cadastro.", + "success": "Verifique seu email para detalhes sobre a criação de uma nova senha.", + "notfound": "Endereço de email não cadastrado! Por favor verifique e tente novamente" + + } + + }, + "finish" : { + "title": "Criar nova senha", + "form": { + "button": "Validar nova senha" + }, + "messages": { + "info": "Escolha uma nova senha", + "success": "Sua senha foi alterada com sucesso! Por favor ", + "keymissing": "Chave de reestabelecimento não encontrada.", + "error": "Sua senha não pôde ser trocada. Lembre-se, requisição de troca de senha é válida apenas por 24h." + } + } + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/sessions.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/sessions.json new file mode 100644 index 0000000000..007a4dd93b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/sessions.json @@ -0,0 +1,15 @@ +{ + "sessions": { + "title": "Sessões ativas para [{{username}}]", + "table": { + "ipaddress": "IP", + "useragent": "Agente", + "date": "Data", + "button": "Invalidar" + }, + "messages": { + "success": "Sessão invalidada com sucesso!", + "error": "Ocorreu um erro! A sessão não pode ser invalidada." + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/settings.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/settings.json new file mode 100644 index 0000000000..7e01c2b829 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/settings.json @@ -0,0 +1,32 @@ +{ + "settings": { + "title": "Configurações para o usuário [{{username}}]", + "form": { + "firstname": "Primeiro nome", + "firstname.placeholder": "Seu primeiro nome", + "lastname": "Sobrenome", + "lastname.placeholder": "Seu sobrenome", + "language": "Idioma", + "button": "Salvar" + }, + "messages": { + "error": { + "fail": "Ocorreu um erro! As configurações não foram salvas.", + "emailexists": "Email is already in use! Please choose another one." + }, + "success": "Configurações salvas com sucesso!", + "validate": { + "firstname": { + "required": "O primeiro nome é obrigatório.", + "minlength": "O primeiro nome deve ter pelo menos 1 caractere", + "maxlength": "O primeiro nome não pode ter mais de 50 caracteres" + }, + "lastname": { + "required": "O sobrenome é obrigatório.", + "minlength": "O sobrenome deve ter pelo menos 1 caractere", + "maxlength": "O sobrenome não pode ter mais de 50 caracteres" + } + } + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/user-management.json b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/user-management.json new file mode 100644 index 0000000000..59cc4b89f2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/i18n/pt-br/user-management.json @@ -0,0 +1,30 @@ +{ + "userManagement": { + "home": { + "title": "Usuários", + "createLabel": "Adicionar", + "createOrEditLabel": "Criar ou editar usuário" + }, + "created": "Novo usuário foi criado com a identificação {{ param }}", + "updated": "Usuário com a identificação {{ param }} foi atualizado ", + "deleted": "Usuário com a identificação {{ param }} foi removido", + "delete": { + "question": "Você tem certeza que deseja excluir o usuário {{ login }}?" + }, + "detail": { + "title": "Usuário" + }, + "login": "Login", + "firstName": "Primeiro nome", + "lastName": "Último nome", + "email": "Email", + "activated": "Ativo", + "deactivated": "Inativo", + "profiles": "Perfis", + "langKey": "Idioma", + "createdBy": "Criado por", + "createdDate": "Criado em", + "lastModifiedBy": "Alterado por", + "lastModifiedDate": "Alterado em" + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/index.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/index.html new file mode 100644 index 0000000000..30f3a81557 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/index.html @@ -0,0 +1,46 @@ + + + + + + + gateway + + + + + + + + + + + + + + + + diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/manifest.webapp b/jhipster/jhipster-uaa/gateway/src/main/webapp/manifest.webapp new file mode 100644 index 0000000000..e448079a5c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/manifest.webapp @@ -0,0 +1,31 @@ +{ + "name": "Gateway", + "short_name": "Gateway", + "icons": [ + { + "src": "./content/images/hipster192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "./content/images/hipster256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "./content/images/hipster384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "./content/images/hipster512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#000000", + "background_color": "#e0e0e0", + "start_url": "/index.html", + "display": "standalone", + "orientation": "portrait" +} diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/robots.txt b/jhipster/jhipster-uaa/gateway/src/main/webapp/robots.txt new file mode 100644 index 0000000000..7cda27477d --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/robots.txt @@ -0,0 +1,11 @@ +# robotstxt.org/ + +User-agent: * +Disallow: /api/account +Disallow: /api/account/change-password +Disallow: /api/account/sessions +Disallow: /api/audits/ +Disallow: /api/logs/ +Disallow: /api/users/ +Disallow: /management/ +Disallow: /v2/api-docs/ diff --git a/jhipster/jhipster-uaa/gateway/src/main/webapp/swagger-ui/index.html b/jhipster/jhipster-uaa/gateway/src/main/webapp/swagger-ui/index.html new file mode 100644 index 0000000000..7bdc777eb3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/main/webapp/swagger-ui/index.html @@ -0,0 +1,175 @@ + + + + + Swagger UI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+
+ + diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/config/SecurityBeanOverrideConfiguration.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/config/SecurityBeanOverrideConfiguration.java new file mode 100644 index 0000000000..c5925cde03 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/config/SecurityBeanOverrideConfiguration.java @@ -0,0 +1,35 @@ +package com.baeldung.jhipster.gateway.config; + +import org.springframework.cloud.client.loadbalancer.RestTemplateCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; +import org.springframework.web.client.RestTemplate; + +/** + * Overrides UAA specific beans, so they do not interfere the testing + * This configuration must be included in @SpringBootTest in order to take effect. + */ +@Configuration +public class SecurityBeanOverrideConfiguration { + + @Bean + @Primary + public TokenStore tokenStore() { + return null; + } + + @Bean + @Primary + public JwtAccessTokenConverter jwtAccessTokenConverter() { + return null; + } + + @Bean + @Primary + public RestTemplate loadBalancedRestTemplate(RestTemplateCustomizer customizer) { + return null; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/config/WebConfigurerTest.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/config/WebConfigurerTest.java new file mode 100644 index 0000000000..c1f6062c51 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/config/WebConfigurerTest.java @@ -0,0 +1,204 @@ +package com.baeldung.jhipster.gateway.config; + +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.servlet.InstrumentedFilter; +import com.codahale.metrics.servlets.MetricsServlet; +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.JHipsterProperties; +import io.github.jhipster.web.filter.CachingHttpHeadersFilter; +import io.undertow.Undertow; +import io.undertow.Undertow.Builder; +import io.undertow.UndertowOptions; +import org.apache.commons.io.FilenameUtils; + +import org.h2.server.web.WebServlet; +import org.junit.Before; +import org.junit.Test; +import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; +import org.springframework.http.HttpHeaders; +import org.springframework.mock.env.MockEnvironment; +import org.springframework.mock.web.MockServletContext; +import org.springframework.test.util.ReflectionTestUtils; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.xnio.OptionMap; + +import javax.servlet.*; +import java.util.*; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.*; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.options; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * Unit tests for the WebConfigurer class. + * + * @see WebConfigurer + */ +public class WebConfigurerTest { + + private WebConfigurer webConfigurer; + + private MockServletContext servletContext; + + private MockEnvironment env; + + private JHipsterProperties props; + + private MetricRegistry metricRegistry; + + @Before + public void setup() { + servletContext = spy(new MockServletContext()); + doReturn(mock(FilterRegistration.Dynamic.class)) + .when(servletContext).addFilter(anyString(), any(Filter.class)); + doReturn(mock(ServletRegistration.Dynamic.class)) + .when(servletContext).addServlet(anyString(), any(Servlet.class)); + + env = new MockEnvironment(); + props = new JHipsterProperties(); + + webConfigurer = new WebConfigurer(env, props); + metricRegistry = new MetricRegistry(); + webConfigurer.setMetricRegistry(metricRegistry); + } + + @Test + public void testStartUpProdServletContext() throws ServletException { + env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); + webConfigurer.onStartup(servletContext); + + assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry); + assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry); + verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class)); + verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class)); + verify(servletContext).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class)); + verify(servletContext, never()).addServlet(eq("H2Console"), any(WebServlet.class)); + } + + @Test + public void testStartUpDevServletContext() throws ServletException { + env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); + webConfigurer.onStartup(servletContext); + + assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry); + assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry); + verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class)); + verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class)); + verify(servletContext, never()).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class)); + verify(servletContext).addServlet(eq("H2Console"), any(WebServlet.class)); + } + + @Test + public void testCustomizeServletContainer() { + env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); + UndertowServletWebServerFactory container = new UndertowServletWebServerFactory(); + webConfigurer.customize(container); + assertThat(container.getMimeMappings().get("abs")).isEqualTo("audio/x-mpeg"); + assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html;charset=utf-8"); + assertThat(container.getMimeMappings().get("json")).isEqualTo("text/html;charset=utf-8"); + if (container.getDocumentRoot() != null) { + assertThat(container.getDocumentRoot().getPath()).isEqualTo(FilenameUtils.separatorsToSystem("target/www")); + } + + Builder builder = Undertow.builder(); + container.getBuilderCustomizers().forEach(c -> c.customize(builder)); + OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); + assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isNull(); + } + + @Test + public void testUndertowHttp2Enabled() { + props.getHttp().setVersion(JHipsterProperties.Http.Version.V_2_0); + UndertowServletWebServerFactory container = new UndertowServletWebServerFactory(); + webConfigurer.customize(container); + Builder builder = Undertow.builder(); + container.getBuilderCustomizers().forEach(c -> c.customize(builder)); + OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); + assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isTrue(); + } + + @Test + public void testCorsFilterOnApiPath() throws Exception { + props.getCors().setAllowedOrigins(Collections.singletonList("*")); + props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); + props.getCors().setAllowedHeaders(Collections.singletonList("*")); + props.getCors().setMaxAge(1800L); + props.getCors().setAllowCredentials(true); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + options("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com") + .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "POST")) + .andExpect(status().isOk()) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")) + .andExpect(header().string(HttpHeaders.VARY, "Origin")) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,POST,PUT,DELETE")) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true")) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "1800")); + + mockMvc.perform( + get("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")); + } + + @Test + public void testCorsFilterOnOtherPath() throws Exception { + props.getCors().setAllowedOrigins(Collections.singletonList("*")); + props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); + props.getCors().setAllowedHeaders(Collections.singletonList("*")); + props.getCors().setMaxAge(1800L); + props.getCors().setAllowCredentials(true); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + get("/test/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + } + + @Test + public void testCorsFilterDeactivated() throws Exception { + props.getCors().setAllowedOrigins(null); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + get("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + } + + @Test + public void testCorsFilterDeactivated2() throws Exception { + props.getCors().setAllowedOrigins(new ArrayList<>()); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + get("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/config/WebConfigurerTestController.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/config/WebConfigurerTestController.java new file mode 100644 index 0000000000..87d997afb1 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/config/WebConfigurerTestController.java @@ -0,0 +1,16 @@ +package com.baeldung.jhipster.gateway.config; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class WebConfigurerTestController { + + @GetMapping("/api/test-cors") + public void testCorsOnApiPath() { + } + + @GetMapping("/test/test-cors") + public void testCorsOnOtherPath() { + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/gateway/responserewriting/SwaggerBasePathRewritingFilterTest.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/gateway/responserewriting/SwaggerBasePathRewritingFilterTest.java new file mode 100644 index 0000000000..893c446922 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/gateway/responserewriting/SwaggerBasePathRewritingFilterTest.java @@ -0,0 +1,95 @@ +package com.baeldung.jhipster.gateway.gateway.responserewriting; + +import com.netflix.zuul.context.RequestContext; +import org.apache.commons.io.IOUtils; +import org.junit.Test; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.mock.web.MockHttpServletResponse; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.util.zip.GZIPInputStream; + +import static com.baeldung.jhipster.gateway.gateway.responserewriting.SwaggerBasePathRewritingFilter.gzipData; +import static org.junit.Assert.*; +import static springfox.documentation.swagger2.web.Swagger2Controller.DEFAULT_URL; + +/** + * Tests SwaggerBasePathRewritingFilter class. + */ +public class SwaggerBasePathRewritingFilterTest { + + private SwaggerBasePathRewritingFilter filter = new SwaggerBasePathRewritingFilter(); + + @Test + public void shouldFilter_on_default_swagger_url() { + + MockHttpServletRequest request = new MockHttpServletRequest("GET", DEFAULT_URL); + RequestContext.getCurrentContext().setRequest(request); + + assertTrue(filter.shouldFilter()); + } + + /** + * Zuul DebugFilter can be triggered by "deug" parameter. + */ + @Test + public void shouldFilter_on_default_swagger_url_with_param() { + + MockHttpServletRequest request = new MockHttpServletRequest("GET", DEFAULT_URL); + request.setParameter("debug", "true"); + RequestContext.getCurrentContext().setRequest(request); + + assertTrue(filter.shouldFilter()); + } + + @Test + public void shouldNotFilter_on_wrong_url() { + + MockHttpServletRequest request = new MockHttpServletRequest("GET", "/management/info"); + RequestContext.getCurrentContext().setRequest(request); + + assertFalse(filter.shouldFilter()); + } + + @Test + public void run_on_valid_response() throws Exception { + MockHttpServletRequest request = new MockHttpServletRequest("GET", "/service1" + DEFAULT_URL); + RequestContext context = RequestContext.getCurrentContext(); + context.setRequest(request); + + MockHttpServletResponse response = new MockHttpServletResponse(); + context.setResponseGZipped(false); + context.setResponse(response); + + InputStream in = IOUtils.toInputStream("{\"basePath\":\"/\"}", StandardCharsets.UTF_8); + context.setResponseDataStream(in); + + filter.run(); + + assertEquals("UTF-8", response.getCharacterEncoding()); + assertEquals("{\"basePath\":\"/service1\"}", context.getResponseBody()); + } + + @Test + public void run_on_valid_response_gzip() throws Exception { + MockHttpServletRequest request = new MockHttpServletRequest("GET", "/service1" + DEFAULT_URL); + RequestContext context = RequestContext.getCurrentContext(); + context.setRequest(request); + + MockHttpServletResponse response = new MockHttpServletResponse(); + context.setResponseGZipped(true); + context.setResponse(response); + + context.setResponseDataStream(new ByteArrayInputStream(gzipData("{\"basePath\":\"/\"}"))); + + filter.run(); + + assertEquals("UTF-8", response.getCharacterEncoding()); + + InputStream responseDataStream = new GZIPInputStream(context.getResponseDataStream()); + String responseBody = IOUtils.toString(responseDataStream, StandardCharsets.UTF_8); + assertEquals("{\"basePath\":\"/service1\"}", responseBody); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/OAuth2TokenMockUtil.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/OAuth2TokenMockUtil.java new file mode 100644 index 0000000000..2a3d103d45 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/OAuth2TokenMockUtil.java @@ -0,0 +1,83 @@ +package com.baeldung.jhipster.gateway.security; + +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; +import org.springframework.security.oauth2.provider.OAuth2Authentication; +import org.springframework.security.oauth2.provider.OAuth2Request; +import org.springframework.security.oauth2.provider.token.ResourceServerTokenServices; +import org.springframework.stereotype.Component; +import org.springframework.test.web.servlet.request.RequestPostProcessor; + +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import java.util.stream.Collectors; + +import static org.mockito.BDDMockito.given; + +/** + * A bean providing simple mocking of OAuth2 access tokens for security integration tests. + */ +@Component +public class OAuth2TokenMockUtil { + + @MockBean + private ResourceServerTokenServices tokenServices; + + private OAuth2Authentication createAuthentication(String username, Set scopes, Set roles) { + List authorities = roles.stream() + .map(SimpleGrantedAuthority::new) + .collect(Collectors.toList()); + + User principal = new User(username, "test", true, true, true, true, authorities); + Authentication authentication = new UsernamePasswordAuthenticationToken(principal, principal.getPassword(), + principal.getAuthorities()); + + // Create the authorization request and OAuth2Authentication object + OAuth2Request authRequest = new OAuth2Request(null, "testClient", null, true, scopes, null, null, null, + null); + return new OAuth2Authentication(authRequest, authentication); + } + + public RequestPostProcessor oauth2Authentication(String username, Set scopes, Set roles) { + String uuid = String.valueOf(UUID.randomUUID()); + + given(tokenServices.loadAuthentication(uuid)) + .willReturn(createAuthentication(username, scopes, roles)); + + given(tokenServices.readAccessToken(uuid)).willReturn(new DefaultOAuth2AccessToken(uuid)); + + return new OAuth2PostProcessor(uuid); + } + + public RequestPostProcessor oauth2Authentication(String username, Set scopes) { + return oauth2Authentication(username, scopes, Collections.emptySet()); + } + + public RequestPostProcessor oauth2Authentication(String username) { + return oauth2Authentication(username, Collections.emptySet()); + } + + public static class OAuth2PostProcessor implements RequestPostProcessor { + + private String token; + + public OAuth2PostProcessor(String token) { + this.token = token; + } + + @Override + public MockHttpServletRequest postProcessRequest(MockHttpServletRequest mockHttpServletRequest) { + mockHttpServletRequest.addHeader("Authorization", "Bearer " + token); + + return mockHttpServletRequest; + } + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/CookieCollectionTest.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/CookieCollectionTest.java new file mode 100644 index 0000000000..1b2a22dd90 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/CookieCollectionTest.java @@ -0,0 +1,191 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import javax.servlet.http.Cookie; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +/** + * Test the CookieCollection. + * + * @see CookieCollection + */ +public class CookieCollectionTest { + public static final String COOKIE_NAME = "chocolate"; + public static final String COOKIE_VALUE = "yummy"; + public static final String BROWNIE_NAME = "brownie"; + private Cookie cookie; + private Cookie cupsCookie; + private Cookie brownieCookie; + + @Before + public void setUp() throws Exception { + cookie = new Cookie(COOKIE_NAME, COOKIE_VALUE); + cupsCookie = new Cookie("cups", "delicious"); + brownieCookie = new Cookie(BROWNIE_NAME, "mmh"); + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void size() throws Exception { + CookieCollection cookies = new CookieCollection(); + Assert.assertEquals(0, cookies.size()); + cookies.add(cookie); + Assert.assertEquals(1, cookies.size()); + } + + @Test + public void isEmpty() throws Exception { + CookieCollection cookies = new CookieCollection(); + Assert.assertTrue(cookies.isEmpty()); + cookies.add(cookie); + Assert.assertFalse(cookies.isEmpty()); + } + + @Test + public void contains() throws Exception { + CookieCollection cookies = new CookieCollection(cookie); + Assert.assertTrue(cookies.contains(cookie)); + Assert.assertTrue(cookies.contains(COOKIE_NAME)); + Assert.assertFalse(cookies.contains("yuck")); + } + + @Test + public void iterator() throws Exception { + CookieCollection cookies = new CookieCollection(cookie); + Iterator it = cookies.iterator(); + Assert.assertTrue(it.hasNext()); + Assert.assertEquals(cookie, it.next()); + Assert.assertFalse(it.hasNext()); + } + + @Test + public void toArray() throws Exception { + CookieCollection cookies = new CookieCollection(cookie); + Cookie[] array = cookies.toArray(); + Assert.assertEquals(cookies.size(), array.length); + Assert.assertEquals(cookie, array[0]); + } + + @Test + public void toArray1() throws Exception { + CookieCollection cookies = new CookieCollection(cookie); + Cookie[] array = new Cookie[cookies.size()]; + cookies.toArray(array); + Assert.assertEquals(cookies.size(), array.length); + Assert.assertEquals(cookie, array[0]); + } + + @Test + public void add() throws Exception { + CookieCollection cookies = new CookieCollection(cookie); + Cookie newCookie = new Cookie(BROWNIE_NAME, "mmh"); + cookies.add(newCookie); + Assert.assertEquals(2, cookies.size()); + Assert.assertTrue(cookies.contains(newCookie)); + Assert.assertTrue(cookies.contains(BROWNIE_NAME)); + } + + @Test + public void addAgain() { + CookieCollection cookies = new CookieCollection(cookie, brownieCookie, cupsCookie); + Cookie white = new Cookie(COOKIE_NAME, "white"); + boolean modified = cookies.add(white); + Assert.assertTrue(modified); + Assert.assertEquals(white, cookies.get(COOKIE_NAME)); + Assert.assertTrue(cookies.contains(white)); + Assert.assertFalse(cookies.contains(cookie)); + Assert.assertTrue(cookies.contains(COOKIE_NAME)); + } + + @Test + public void get() { + CookieCollection cookies = new CookieCollection(cookie, brownieCookie, cupsCookie); + Cookie c = cookies.get(COOKIE_NAME); + Assert.assertNotNull(c); + Assert.assertEquals(cookie, c); + } + + @Test + public void remove() throws Exception { + CookieCollection cookies = new CookieCollection(cookie, brownieCookie, cupsCookie); + cookies.remove(cookie); + Assert.assertEquals(2, cookies.size()); + Assert.assertFalse(cookies.contains(cookie)); + Assert.assertFalse(cookies.contains(COOKIE_NAME)); + Assert.assertTrue(cookies.contains(brownieCookie)); + Assert.assertTrue(cookies.contains(BROWNIE_NAME)); + } + + @Test + public void containsAll() throws Exception { + List content = Arrays.asList(cookie, brownieCookie); + CookieCollection cookies = new CookieCollection(content); + Assert.assertTrue(cookies.containsAll(content)); + Assert.assertTrue(cookies.containsAll(Collections.singletonList(cookie))); + Assert.assertFalse(cookies.containsAll(Arrays.asList(cookie, brownieCookie, cupsCookie))); + Assert.assertTrue(cookies.containsAll(Arrays.asList(COOKIE_NAME, BROWNIE_NAME))); + } + + @Test + @SuppressWarnings("unchecked") + public void addAll() throws Exception { + CookieCollection cookies = new CookieCollection(); + List content = Arrays.asList(cookie, brownieCookie, cupsCookie); + boolean modified = cookies.addAll(content); + Assert.assertTrue(modified); + Assert.assertEquals(3, cookies.size()); + Assert.assertTrue(cookies.containsAll(content)); + Assert.assertFalse(cookies.addAll(Collections.EMPTY_LIST)); + } + + @Test + public void removeAll() throws Exception { + CookieCollection cookies = new CookieCollection(cookie, brownieCookie, cupsCookie); + boolean modified = cookies.removeAll(Arrays.asList(brownieCookie, cupsCookie)); + Assert.assertTrue(modified); + Assert.assertEquals(1, cookies.size()); + Assert.assertFalse(cookies.contains(brownieCookie)); + Assert.assertFalse(cookies.contains(cupsCookie)); + Assert.assertFalse(cookies.removeAll(Collections.EMPTY_LIST)); + } + + @Test + public void removeAllByName() throws Exception { + CookieCollection cookies = new CookieCollection(cookie, brownieCookie, cupsCookie); + boolean modified = cookies.removeAll(Arrays.asList(COOKIE_NAME, BROWNIE_NAME)); + Assert.assertTrue(modified); + Assert.assertEquals(1, cookies.size()); + Assert.assertFalse(cookies.contains(brownieCookie)); + Assert.assertFalse(cookies.contains(cookie)); + Assert.assertFalse(cookies.removeAll(Collections.EMPTY_LIST)); + } + + @Test + public void retainAll() throws Exception { + CookieCollection cookies = new CookieCollection(cookie, brownieCookie, cupsCookie); + List content = Arrays.asList(cookie, brownieCookie); + boolean modified = cookies.retainAll(content); + Assert.assertTrue(modified); + Assert.assertEquals(2, cookies.size()); + Assert.assertTrue(cookies.containsAll(content)); + Assert.assertFalse(cookies.contains(cupsCookie)); + Assert.assertFalse(cookies.retainAll(content)); + } + + @Test + public void clear() throws Exception { + CookieCollection cookies = new CookieCollection(cookie); + cookies.clear(); + Assert.assertTrue(cookies.isEmpty()); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/CookieTokenExtractorTest.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/CookieTokenExtractorTest.java new file mode 100644 index 0000000000..af7dec99c4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/CookieTokenExtractorTest.java @@ -0,0 +1,45 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.springframework.http.HttpMethod; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.security.core.Authentication; +import org.springframework.security.oauth2.common.OAuth2AccessToken; + +/** + * Test whether the CookieTokenExtractor can properly extract access tokens from + * Cookies and Headers. + */ +public class CookieTokenExtractorTest { + private CookieTokenExtractor cookieTokenExtractor; + + @Before + public void init() { + cookieTokenExtractor = new CookieTokenExtractor(); + } + + @Test + public void testExtractTokenCookie() { + MockHttpServletRequest request = OAuth2AuthenticationServiceTest.createMockHttpServletRequest(); + Authentication authentication = cookieTokenExtractor.extract(request); + Assert.assertEquals(OAuth2AuthenticationServiceTest.ACCESS_TOKEN_VALUE, authentication.getPrincipal().toString()); + } + + @Test + public void testExtractTokenHeader() { + MockHttpServletRequest request = new MockHttpServletRequest(HttpMethod.GET.name(), "http://www.test.com"); + request.addHeader("Authorization", OAuth2AccessToken.BEARER_TYPE + " " + OAuth2AuthenticationServiceTest.ACCESS_TOKEN_VALUE); + Authentication authentication = cookieTokenExtractor.extract(request); + Assert.assertEquals(OAuth2AuthenticationServiceTest.ACCESS_TOKEN_VALUE, authentication.getPrincipal().toString()); + } + + @Test + public void testExtractTokenParam() { + MockHttpServletRequest request = new MockHttpServletRequest(HttpMethod.GET.name(), "http://www.test.com"); + request.addParameter(OAuth2AccessToken.ACCESS_TOKEN, OAuth2AuthenticationServiceTest.ACCESS_TOKEN_VALUE); + Authentication authentication = cookieTokenExtractor.extract(request); + Assert.assertEquals(OAuth2AuthenticationServiceTest.ACCESS_TOKEN_VALUE, authentication.getPrincipal().toString()); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2AuthenticationServiceTest.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2AuthenticationServiceTest.java new file mode 100644 index 0000000000..4902b5306e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2AuthenticationServiceTest.java @@ -0,0 +1,252 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import com.baeldung.jhipster.gateway.config.oauth2.OAuth2Properties; +import com.baeldung.jhipster.gateway.web.filter.RefreshTokenFilter; +import com.baeldung.jhipster.gateway.web.rest.errors.InvalidPasswordException; +import io.github.jhipster.config.JHipsterProperties; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.http.*; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.mock.web.MockHttpServletResponse; +import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; +import org.springframework.security.oauth2.common.DefaultOAuth2RefreshToken; +import org.springframework.security.oauth2.common.OAuth2AccessToken; +import org.springframework.security.oauth2.common.exceptions.InvalidTokenException; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestTemplate; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import static org.mockito.Mockito.when; + +/** + * Test password and refresh token grants. + * + * @see OAuth2AuthenticationService + */ +@RunWith(MockitoJUnitRunner.class) +public class OAuth2AuthenticationServiceTest { + public static final String CLIENT_AUTHORIZATION = "Basic d2ViX2FwcDpjaGFuZ2VpdA=="; + public static final String ACCESS_TOKEN_VALUE = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQyNzI4NDQsInVzZXJfbmFtZSI6InVzZXIiLCJhdXRob3JpdGllcyI6WyJST0xFX1VTRVIiXSwianRpIjoiNzc1ZTJkYWUtYWYzZi00YTdhLWExOTktNzNiZTU1MmIxZDVkIiwiY2xpZW50X2lkIjoid2ViX2FwcCIsInNjb3BlIjpbIm9wZW5pZCJdfQ.gEK0YcX2IpkpxnkxXXHQ4I0xzTjcy7edqb89ukYE0LPe7xUcZVwkkCJF_nBxsGJh2jtA6NzNLfY5zuL6nP7uoAq3fmvsyrcyR2qPk8JuuNzGtSkICx3kPDRjAT4ST8SZdeh7XCbPVbySJ7ZmPlRWHyedzLA1wXN0NUf8yZYS4ELdUwVBYIXSjkNoKqfWm88cwuNr0g0teypjPtjDqCnXFt1pibwdfIXn479Y1neNAdvSpHcI4Ost-c7APCNxW2gqX-0BItZQearxRgKDdBQ7CGPAIky7dA0gPuKUpp_VCoqowKCXqkE9yKtRQGIISewtj2UkDRZePmzmYrUBXRzfYw"; + public static final String REFRESH_TOKEN_VALUE = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJ1c2VyIiwic2NvcGUiOlsib3BlbmlkIl0sImF0aSI6Ijc3NWUyZGFlLWFmM2YtNGE3YS1hMTk5LTczYmU1NTJiMWQ1ZCIsImV4cCI6MTQ5Njg2NDc0MywiYXV0aG9yaXRpZXMiOlsiUk9MRV9VU0VSIl0sImp0aSI6IjhmYjI2YTllLTdjYzQtNDFlMi1hNzBjLTk4MDc0N2U2YWFiOSIsImNsaWVudF9pZCI6IndlYl9hcHAifQ.q1-Df9_AFO6TJNiLKV2YwTjRbnd7qcXv52skXYnog5siHYRoR6cPtm6TNQ04iDAoIHljTSTNnD6DS3bHk41mV55gsSVxGReL8VCb_R8ZmhVL4-5yr90sfms0wFp6lgD2bPmZ-TXiS2Oe9wcbNWagy5RsEplZ-sbXu3tjmDao4FN35ojPsXmUs84XnNQH3Y_-PY9GjZG0JEfLQIvE0J5BkXS18Z015GKyA6GBIoLhAGBQQYyG9m10ld_a9fD5SmCyCF72Jad_pfP1u8Z_WyvO-wrlBvm2x-zBthreVrXU5mOb9795wJEP-xaw3dXYGjht_grcW4vKUFtj61JgZk98CQ"; + public static final String EXPIRED_SESSION_TOKEN_VALUE = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJ1c2VyIiwic2NvcGUiOlsib3BlbmlkIl0sImF0aSI6IjE0NTkwYzdkLTQ5M2YtNDU0NS05MzlmLTg1ODM4ZjRmNzNmNSIsImV4cCI6MTQ5NTU3Mjg5MywiaWF0IjoxNDk1MzIwODkzLCJhdXRob3JpdGllcyI6WyJST0xFX1VTRVIiXSwianRpIjoiNzVhYTIxNzEtMzFmNi00MWJmLWExZGUtYWU0YTg1ZjZiMjEyIiwiY2xpZW50X2lkIjoid2ViX2FwcCJ9.gAH-yly7WAslQUeGhyHmjYXwQN3dluvoT84iOJ2mVWYGVlnDRsoxN3_d1ozqtiso9UM7dWpAr80o3gK7AyK-cO1GGBXa3lg0ETsbucFoqHLivgGZA2qVOsFlDq8E7DZENAbOWmywmhFUOogCfZ-BqsuFSi8waMLL-1qlhehBPuK1KzGxIZbjSVUFFFYTxoWPKi2NNTBzYSwwCV0ixj-gHyFC6Gl5ByA4EvYygGUZF2pACxs4tIRkmT90pXWCjWeKS9k9MlxZ7C4UHqyTRW-IYzqAm8OHdwsnXeu0GkFYc08gxoUuPcjMby8ziYLG5uWj0Ua0msmiSjoafzs-5xfH-Q"; + public static final String NEW_ACCESS_TOKEN_VALUE = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQyNzY2NDEsInVzZXJfbmFtZSI6InVzZXIiLCJhdXRob3JpdGllcyI6WyJST0xFX1VTRVIiXSwianRpIjoiYzIyY2YzMDgtZTIyYi00YzNjLWI5MjctOTYwYzA2YmY1ZmU0IiwiY2xpZW50X2lkIjoid2ViX2FwcCIsInNjb3BlIjpbIm9wZW5pZCJdfQ.IAhE39GCqWRUuXdWy-raOcE9NYXRhGiqkeJH649501LeqNPH5HtRUNWmudVRgwT52Bj7HcbJapMLGetKIMEASqC1-WARfcZ_PR0r7Kfg3OlFALWOH_oVT5kvi2H-QCoSAF9mRYK6abCh_tPk5KryVB5c7YxTMIXDT2nTsSexD8eNQOMBWRCg0RaLHZ9bKfeyVgncQJsu7-vTo1xJyh-keYpdNZ0TA2SjYJgezmB7gwW1Kmc7_83htr8VycG7XA_PuD9--yRNlrN0LtNHEBqNypZsOe6NvpKiNlodFYHlsU1CaumzcF9U7dpVanjIUKJ5VRWVUlSFY6JJ755W29VCTw"; + public static final String NEW_REFRESH_TOKEN_VALUE = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJ1c2VyIiwic2NvcGUiOlsib3BlbmlkIl0sImF0aSI6ImMyMmNmMzA4LWUyMmItNGMzYy1iOTI3LTk2MGMwNmJmNWZlNCIsImV4cCI6MTQ5Njg2ODU4MSwiYXV0aG9yaXRpZXMiOlsiUk9MRV9VU0VSIl0sImp0aSI6ImU4YmZhZWJlLWYzMDItNGNjZS1hZGY1LWQ4MzE5OWM1MjBlOSIsImNsaWVudF9pZCI6IndlYl9hcHAifQ.OemWBUfc-2rl4t4VVqolYxul3L527PbSbX2Xvo7oyy3Vy5nmmblqp4hVGdTEjivrlldGVQX03ERbrA-oFkpmfWbBzLvnKS6AUq1MGjut6dXZJeiEqNYmiAABn6jSgK26S0k6b2ADgmf7mxJO8EBypb5sT1DMAbY5cbOe7r4ZG7zMTVSvlvjHTXp_FM8Y9i6nehLD4XDYY57cb_ZA89vAXNzvTAjoopDliExgR0bApG6nvvDEhEYgTS65lccEQocoev6bISJ3RvNYNPJxWcNPftKDp4HrEt2E2WP28K5IivRtQgDQNlQeormf1tp6AG-Oj__NXyAPM7yhAKXNy2zWdQ"; + @Mock + private RestTemplate restTemplate; + @Mock + private TokenStore tokenStore; + private OAuth2TokenEndpointClient authorizationClient; + private OAuth2AuthenticationService authenticationService; + private RefreshTokenFilter refreshTokenFilter; + @Rule + public ExpectedException expectedException = ExpectedException.none(); + private OAuth2Properties oAuth2Properties; + private JHipsterProperties jHipsterProperties; + + @Before + public void init() { + oAuth2Properties = new OAuth2Properties(); + jHipsterProperties = new JHipsterProperties(); + jHipsterProperties.getSecurity().getClientAuthorization().setAccessTokenUri("http://uaa/oauth/token"); + OAuth2CookieHelper cookieHelper = new OAuth2CookieHelper(oAuth2Properties); + OAuth2AccessToken accessToken = createAccessToken(ACCESS_TOKEN_VALUE, REFRESH_TOKEN_VALUE); + + mockInvalidPassword(); + mockPasswordGrant(accessToken); + mockRefreshGrant(); + + authorizationClient = new UaaTokenEndpointClient(restTemplate, jHipsterProperties, oAuth2Properties); + authenticationService = new OAuth2AuthenticationService(authorizationClient, cookieHelper); + when(tokenStore.readAccessToken(ACCESS_TOKEN_VALUE)).thenReturn(accessToken); + refreshTokenFilter = new RefreshTokenFilter(authenticationService, tokenStore); + } + + public static OAuth2AccessToken createAccessToken(String accessTokenValue, String refreshTokenValue) { + DefaultOAuth2AccessToken accessToken = new DefaultOAuth2AccessToken(accessTokenValue); + accessToken.setExpiration(new Date()); //token expires now + DefaultOAuth2RefreshToken refreshToken = new DefaultOAuth2RefreshToken(refreshTokenValue); + accessToken.setRefreshToken(refreshToken); + return accessToken; + } + + public static MockHttpServletRequest createMockHttpServletRequest() { + MockHttpServletRequest request = new MockHttpServletRequest(HttpMethod.GET.name(), "http://www.test.com"); + Cookie accessTokenCookie = new Cookie(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE, ACCESS_TOKEN_VALUE); + Cookie refreshTokenCookie = new Cookie(OAuth2CookieHelper.REFRESH_TOKEN_COOKIE, REFRESH_TOKEN_VALUE); + request.setCookies(accessTokenCookie, refreshTokenCookie); + return request; + } + + private void mockInvalidPassword() { + HttpHeaders reqHeaders = new HttpHeaders(); + reqHeaders.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + reqHeaders.add("Authorization", CLIENT_AUTHORIZATION); //take over Authorization header from client request to UAA request + MultiValueMap formParams = new LinkedMultiValueMap<>(); + formParams.set("username", "user"); + formParams.set("password", "user2"); + formParams.add("grant_type", "password"); + HttpEntity> entity = new HttpEntity<>(formParams, reqHeaders); + when(restTemplate.postForEntity("http://uaa/oauth/token", entity, OAuth2AccessToken.class)) + .thenThrow(new HttpClientErrorException(HttpStatus.BAD_REQUEST)); + } + + private void mockPasswordGrant(OAuth2AccessToken accessToken) { + HttpHeaders reqHeaders = new HttpHeaders(); + reqHeaders.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + reqHeaders.add("Authorization", CLIENT_AUTHORIZATION); //take over Authorization header from client request to UAA request + MultiValueMap formParams = new LinkedMultiValueMap<>(); + formParams.set("username", "user"); + formParams.set("password", "user"); + formParams.add("grant_type", "password"); + HttpEntity> entity = new HttpEntity<>(formParams, reqHeaders); + when(restTemplate.postForEntity("http://uaa/oauth/token", entity, OAuth2AccessToken.class)) + .thenReturn(new ResponseEntity(accessToken, HttpStatus.OK)); + } + + private void mockRefreshGrant() { + MultiValueMap params = new LinkedMultiValueMap<>(); + params.add("grant_type", "refresh_token"); + params.add("refresh_token", REFRESH_TOKEN_VALUE); + //we must authenticate with the UAA server via HTTP basic authentication using the browser's client_id with no client secret + HttpHeaders headers = new HttpHeaders(); + headers.add("Authorization", CLIENT_AUTHORIZATION); + HttpEntity> entity = new HttpEntity<>(params, headers); + OAuth2AccessToken newAccessToken = createAccessToken(NEW_ACCESS_TOKEN_VALUE, NEW_REFRESH_TOKEN_VALUE); + when(restTemplate.postForEntity("http://uaa/oauth/token", entity, OAuth2AccessToken.class)) + .thenReturn(new ResponseEntity(newAccessToken, HttpStatus.OK)); + } + + @Test + public void testAuthenticationCookies() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("www.test.com"); + request.addHeader("Authorization", CLIENT_AUTHORIZATION); + Map params = new HashMap<>(); + params.put("username", "user"); + params.put("password", "user"); + params.put("rememberMe", "true"); + MockHttpServletResponse response = new MockHttpServletResponse(); + authenticationService.authenticate(request, response, params); + //check that cookies are set correctly + Cookie accessTokenCookie = response.getCookie(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE); + Assert.assertEquals(ACCESS_TOKEN_VALUE, accessTokenCookie.getValue()); + Cookie refreshTokenCookie = response.getCookie(OAuth2CookieHelper.REFRESH_TOKEN_COOKIE); + Assert.assertEquals(REFRESH_TOKEN_VALUE, OAuth2CookieHelper.getRefreshTokenValue(refreshTokenCookie)); + Assert.assertTrue(OAuth2CookieHelper.isRememberMe(refreshTokenCookie)); + } + + @Test + public void testAuthenticationNoRememberMe() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("www.test.com"); + Map params = new HashMap<>(); + params.put("username", "user"); + params.put("password", "user"); + params.put("rememberMe", "false"); + MockHttpServletResponse response = new MockHttpServletResponse(); + authenticationService.authenticate(request, response, params); + //check that cookies are set correctly + Cookie accessTokenCookie = response.getCookie(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE); + Assert.assertEquals(ACCESS_TOKEN_VALUE, accessTokenCookie.getValue()); + Cookie refreshTokenCookie = response.getCookie(OAuth2CookieHelper.SESSION_TOKEN_COOKIE); + Assert.assertEquals(REFRESH_TOKEN_VALUE, OAuth2CookieHelper.getRefreshTokenValue(refreshTokenCookie)); + Assert.assertFalse(OAuth2CookieHelper.isRememberMe(refreshTokenCookie)); + } + + @Test + public void testInvalidPassword() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("www.test.com"); + Map params = new HashMap<>(); + params.put("username", "user"); + params.put("password", "user2"); + params.put("rememberMe", "false"); + MockHttpServletResponse response = new MockHttpServletResponse(); + expectedException.expect(InvalidPasswordException.class); + authenticationService.authenticate(request, response, params); + } + + @Test + public void testRefreshGrant() { + MockHttpServletRequest request = createMockHttpServletRequest(); + MockHttpServletResponse response = new MockHttpServletResponse(); + HttpServletRequest newRequest = refreshTokenFilter.refreshTokensIfExpiring(request, response); + Cookie newAccessTokenCookie = response.getCookie(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE); + Assert.assertEquals(NEW_ACCESS_TOKEN_VALUE, newAccessTokenCookie.getValue()); + Cookie newRefreshTokenCookie = response.getCookie(OAuth2CookieHelper.REFRESH_TOKEN_COOKIE); + Assert.assertEquals(NEW_REFRESH_TOKEN_VALUE, newRefreshTokenCookie.getValue()); + Cookie requestAccessTokenCookie = OAuth2CookieHelper.getAccessTokenCookie(newRequest); + Assert.assertEquals(NEW_ACCESS_TOKEN_VALUE, requestAccessTokenCookie.getValue()); + } + + @Test + public void testSessionExpired() { + MockHttpServletRequest request = new MockHttpServletRequest(HttpMethod.GET.name(), "http://www.test.com"); + Cookie accessTokenCookie = new Cookie(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE, ACCESS_TOKEN_VALUE); + Cookie refreshTokenCookie = new Cookie(OAuth2CookieHelper.SESSION_TOKEN_COOKIE, EXPIRED_SESSION_TOKEN_VALUE); + request.setCookies(accessTokenCookie, refreshTokenCookie); + MockHttpServletResponse response = new MockHttpServletResponse(); + HttpServletRequest newRequest = refreshTokenFilter.refreshTokensIfExpiring(request, response); + //cookies in response are deleted + Cookie newAccessTokenCookie = response.getCookie(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE); + Assert.assertEquals(0, newAccessTokenCookie.getMaxAge()); + Cookie newRefreshTokenCookie = response.getCookie(OAuth2CookieHelper.REFRESH_TOKEN_COOKIE); + Assert.assertEquals(0, newRefreshTokenCookie.getMaxAge()); + //request no longer contains cookies + Cookie requestAccessTokenCookie = OAuth2CookieHelper.getAccessTokenCookie(newRequest); + Assert.assertNull(requestAccessTokenCookie); + Cookie requestRefreshTokenCookie = OAuth2CookieHelper.getRefreshTokenCookie(newRequest); + Assert.assertNull(requestRefreshTokenCookie); + } + + /** + * If no refresh token is found and the access token has expired, then expect an exception. + */ + @Test + public void testRefreshGrantNoRefreshToken() { + MockHttpServletRequest request = new MockHttpServletRequest(HttpMethod.GET.name(), "http://www.test.com"); + Cookie accessTokenCookie = new Cookie(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE, ACCESS_TOKEN_VALUE); + request.setCookies(accessTokenCookie); + MockHttpServletResponse response = new MockHttpServletResponse(); + expectedException.expect(InvalidTokenException.class); + refreshTokenFilter.refreshTokensIfExpiring(request, response); + } + + @Test + public void testLogout() { + MockHttpServletRequest request = new MockHttpServletRequest(); + Cookie accessTokenCookie = new Cookie(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE, ACCESS_TOKEN_VALUE); + Cookie refreshTokenCookie = new Cookie(OAuth2CookieHelper.REFRESH_TOKEN_COOKIE, REFRESH_TOKEN_VALUE); + request.setCookies(accessTokenCookie, refreshTokenCookie); + MockHttpServletResponse response = new MockHttpServletResponse(); + authenticationService.logout(request, response); + Cookie newAccessTokenCookie = response.getCookie(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE); + Assert.assertEquals(0, newAccessTokenCookie.getMaxAge()); + Cookie newRefreshTokenCookie = response.getCookie(OAuth2CookieHelper.REFRESH_TOKEN_COOKIE); + Assert.assertEquals(0, newRefreshTokenCookie.getMaxAge()); + } + + @Test + public void testStripTokens() { + MockHttpServletRequest request = createMockHttpServletRequest(); + HttpServletRequest newRequest = authenticationService.stripTokens(request); + CookieCollection cookies = new CookieCollection(newRequest.getCookies()); + Assert.assertFalse(cookies.contains(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE)); + Assert.assertFalse(cookies.contains(OAuth2CookieHelper.REFRESH_TOKEN_COOKIE)); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2CookieHelperTest.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2CookieHelperTest.java new file mode 100644 index 0000000000..d36a67bf66 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/security/oauth2/OAuth2CookieHelperTest.java @@ -0,0 +1,98 @@ +package com.baeldung.jhipster.gateway.security.oauth2; + +import com.baeldung.jhipster.gateway.config.oauth2.OAuth2Properties; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.test.util.ReflectionTestUtils; + +/** + * Tests helper functions around OAuth2 Cookies. + * + * @see OAuth2CookieHelper + */ +public class OAuth2CookieHelperTest { + public static final String GET_COOKIE_DOMAIN_METHOD = "getCookieDomain"; + private OAuth2Properties oAuth2Properties; + private OAuth2CookieHelper cookieHelper; + + @Before + public void setUp() throws NoSuchMethodException { + oAuth2Properties = new OAuth2Properties(); + cookieHelper = new OAuth2CookieHelper(oAuth2Properties); + } + + @Test + public void testLocalhostDomain() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("localhost"); + String name = ReflectionTestUtils.invokeMethod(cookieHelper, GET_COOKIE_DOMAIN_METHOD, request); + Assert.assertNull(name); + } + + @Test + public void testComDomain() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("test.com"); + String name = ReflectionTestUtils.invokeMethod(cookieHelper, GET_COOKIE_DOMAIN_METHOD, request); + Assert.assertNull(name); //already top-level domain + } + + @Test + public void testWwwDomainCom() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("www.test.com"); + String name = ReflectionTestUtils.invokeMethod(cookieHelper, GET_COOKIE_DOMAIN_METHOD, request); + Assert.assertNull(name); + } + + @Test + public void testComSubDomain() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("abc.test.com"); + String name = ReflectionTestUtils.invokeMethod(cookieHelper, GET_COOKIE_DOMAIN_METHOD, request); + Assert.assertEquals(".test.com", name); + } + + @Test + public void testWwwSubDomainCom() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("www.abc.test.com"); + String name = ReflectionTestUtils.invokeMethod(cookieHelper, GET_COOKIE_DOMAIN_METHOD, request); + Assert.assertEquals(".test.com", name); + } + + + @Test + public void testCoUkDomain() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("test.co.uk"); + String name = ReflectionTestUtils.invokeMethod(cookieHelper, GET_COOKIE_DOMAIN_METHOD, request); + Assert.assertNull(name); //already top-level domain + } + + @Test + public void testCoUkSubDomain() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("abc.test.co.uk"); + String name = ReflectionTestUtils.invokeMethod(cookieHelper, GET_COOKIE_DOMAIN_METHOD, request); + Assert.assertEquals(".test.co.uk", name); + } + + @Test + public void testNestedDomain() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("abc.xyu.test.co.uk"); + String name = ReflectionTestUtils.invokeMethod(cookieHelper, GET_COOKIE_DOMAIN_METHOD, request); + Assert.assertEquals(".test.co.uk", name); + } + + @Test + public void testIpAddress() { + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setServerName("127.0.0.1"); + String name = ReflectionTestUtils.invokeMethod(cookieHelper, GET_COOKIE_DOMAIN_METHOD, request); + Assert.assertNull(name); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/LogsResourceIntTest.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/LogsResourceIntTest.java new file mode 100644 index 0000000000..2e52eabbca --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/LogsResourceIntTest.java @@ -0,0 +1,67 @@ +package com.baeldung.jhipster.gateway.web.rest; + +import com.baeldung.jhipster.gateway.GatewayApp; +import com.baeldung.jhipster.gateway.config.SecurityBeanOverrideConfiguration; +import com.baeldung.jhipster.gateway.web.rest.vm.LoggerVM; +import ch.qos.logback.classic.AsyncAppender; +import ch.qos.logback.classic.LoggerContext; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.slf4j.LoggerFactory; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.http.MediaType; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * Test class for the LogsResource REST controller. + * + * @see LogsResource + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, GatewayApp.class}) +public class LogsResourceIntTest { + + private MockMvc restLogsMockMvc; + + @Before + public void setup() { + LogsResource logsResource = new LogsResource(); + this.restLogsMockMvc = MockMvcBuilders + .standaloneSetup(logsResource) + .build(); + } + + @Test + public void getAllLogs() throws Exception { + restLogsMockMvc.perform(get("/management/logs")) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)); + } + + @Test + public void changeLogs() throws Exception { + LoggerVM logger = new LoggerVM(); + logger.setLevel("INFO"); + logger.setName("ROOT"); + + restLogsMockMvc.perform(put("/management/logs") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(logger))) + .andExpect(status().isNoContent()); + } + + @Test + public void testLogstashAppender() { + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + assertThat(context.getLogger("ROOT").getAppender("ASYNC_LOGSTASH")).isInstanceOf(AsyncAppender.class); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/TestUtil.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/TestUtil.java new file mode 100644 index 0000000000..88795b3f2c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/TestUtil.java @@ -0,0 +1,135 @@ +package com.baeldung.jhipster.gateway.web.rest; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import org.hamcrest.Description; +import org.hamcrest.TypeSafeDiagnosingMatcher; +import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; +import org.springframework.format.support.DefaultFormattingConversionService; +import org.springframework.format.support.FormattingConversionService; +import org.springframework.http.MediaType; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.time.ZonedDateTime; +import java.time.format.DateTimeParseException; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Utility class for testing REST controllers. + */ +public class TestUtil { + + /** MediaType for JSON UTF8 */ + public static final MediaType APPLICATION_JSON_UTF8 = new MediaType( + MediaType.APPLICATION_JSON.getType(), + MediaType.APPLICATION_JSON.getSubtype(), StandardCharsets.UTF_8); + + /** + * Convert an object to JSON byte array. + * + * @param object + * the object to convert + * @return the JSON byte array + * @throws IOException + */ + public static byte[] convertObjectToJsonBytes(Object object) + throws IOException { + ObjectMapper mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); + + JavaTimeModule module = new JavaTimeModule(); + mapper.registerModule(module); + + return mapper.writeValueAsBytes(object); + } + + /** + * Create a byte array with a specific size filled with specified data. + * + * @param size the size of the byte array + * @param data the data to put in the byte array + * @return the JSON byte array + */ + public static byte[] createByteArray(int size, String data) { + byte[] byteArray = new byte[size]; + for (int i = 0; i < size; i++) { + byteArray[i] = Byte.parseByte(data, 2); + } + return byteArray; + } + + /** + * A matcher that tests that the examined string represents the same instant as the reference datetime. + */ + public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher { + + private final ZonedDateTime date; + + public ZonedDateTimeMatcher(ZonedDateTime date) { + this.date = date; + } + + @Override + protected boolean matchesSafely(String item, Description mismatchDescription) { + try { + if (!date.isEqual(ZonedDateTime.parse(item))) { + mismatchDescription.appendText("was ").appendValue(item); + return false; + } + return true; + } catch (DateTimeParseException e) { + mismatchDescription.appendText("was ").appendValue(item) + .appendText(", which could not be parsed as a ZonedDateTime"); + return false; + } + + } + + @Override + public void describeTo(Description description) { + description.appendText("a String representing the same Instant as ").appendValue(date); + } + } + + /** + * Creates a matcher that matches when the examined string reprensents the same instant as the reference datetime + * @param date the reference datetime against which the examined string is checked + */ + public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) { + return new ZonedDateTimeMatcher(date); + } + + /** + * Verifies the equals/hashcode contract on the domain object. + */ + public static void equalsVerifier(Class clazz) throws Exception { + T domainObject1 = clazz.getConstructor().newInstance(); + assertThat(domainObject1.toString()).isNotNull(); + assertThat(domainObject1).isEqualTo(domainObject1); + assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode()); + // Test with an instance of another class + Object testOtherObject = new Object(); + assertThat(domainObject1).isNotEqualTo(testOtherObject); + assertThat(domainObject1).isNotEqualTo(null); + // Test with an instance of the same class + T domainObject2 = clazz.getConstructor().newInstance(); + assertThat(domainObject1).isNotEqualTo(domainObject2); + // HashCodes are equals because the objects are not persisted yet + assertThat(domainObject1.hashCode()).isEqualTo(domainObject2.hashCode()); + } + + /** + * Create a FormattingConversionService which use ISO date format, instead of the localized one. + * @return the FormattingConversionService + */ + public static FormattingConversionService createFormattingConversionService() { + DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService (); + DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); + registrar.setUseIsoFormat(true); + registrar.registerFormatters(dfcs); + return dfcs; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/errors/ExceptionTranslatorIntTest.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/errors/ExceptionTranslatorIntTest.java new file mode 100644 index 0000000000..3a453b1179 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/errors/ExceptionTranslatorIntTest.java @@ -0,0 +1,151 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +import com.baeldung.jhipster.gateway.GatewayApp; +import com.baeldung.jhipster.gateway.config.SecurityBeanOverrideConfiguration; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.http.MediaType; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * Test class for the ExceptionTranslator controller advice. + * + * @see ExceptionTranslator + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, GatewayApp.class}) +public class ExceptionTranslatorIntTest { + + @Autowired + private ExceptionTranslatorTestController controller; + + @Autowired + private ExceptionTranslator exceptionTranslator; + + @Autowired + private MappingJackson2HttpMessageConverter jacksonMessageConverter; + + private MockMvc mockMvc; + + @Before + public void setup() { + mockMvc = MockMvcBuilders.standaloneSetup(controller) + .setControllerAdvice(exceptionTranslator) + .setMessageConverters(jacksonMessageConverter) + .build(); + } + + @Test + public void testConcurrencyFailure() throws Exception { + mockMvc.perform(get("/test/concurrency-failure")) + .andExpect(status().isConflict()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_CONCURRENCY_FAILURE)); + } + + @Test + public void testMethodArgumentNotValid() throws Exception { + mockMvc.perform(post("/test/method-argument").content("{}").contentType(MediaType.APPLICATION_JSON)) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_VALIDATION)) + .andExpect(jsonPath("$.fieldErrors.[0].objectName").value("testDTO")) + .andExpect(jsonPath("$.fieldErrors.[0].field").value("test")) + .andExpect(jsonPath("$.fieldErrors.[0].message").value("NotNull")); + } + + @Test + public void testParameterizedError() throws Exception { + mockMvc.perform(get("/test/parameterized-error")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("test parameterized error")) + .andExpect(jsonPath("$.params.param0").value("param0_value")) + .andExpect(jsonPath("$.params.param1").value("param1_value")); + } + + @Test + public void testParameterizedError2() throws Exception { + mockMvc.perform(get("/test/parameterized-error2")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("test parameterized error")) + .andExpect(jsonPath("$.params.foo").value("foo_value")) + .andExpect(jsonPath("$.params.bar").value("bar_value")); + } + + @Test + public void testMissingServletRequestPartException() throws Exception { + mockMvc.perform(get("/test/missing-servlet-request-part")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.400")); + } + + @Test + public void testMissingServletRequestParameterException() throws Exception { + mockMvc.perform(get("/test/missing-servlet-request-parameter")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.400")); + } + + @Test + public void testAccessDenied() throws Exception { + mockMvc.perform(get("/test/access-denied")) + .andExpect(status().isForbidden()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.403")) + .andExpect(jsonPath("$.detail").value("test access denied!")); + } + + @Test + public void testUnauthorized() throws Exception { + mockMvc.perform(get("/test/unauthorized")) + .andExpect(status().isUnauthorized()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.401")) + .andExpect(jsonPath("$.path").value("/test/unauthorized")) + .andExpect(jsonPath("$.detail").value("test authentication failed!")); + } + + @Test + public void testMethodNotSupported() throws Exception { + mockMvc.perform(post("/test/access-denied")) + .andExpect(status().isMethodNotAllowed()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.405")) + .andExpect(jsonPath("$.detail").value("Request method 'POST' not supported")); + } + + @Test + public void testExceptionWithResponseStatus() throws Exception { + mockMvc.perform(get("/test/response-status")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.400")) + .andExpect(jsonPath("$.title").value("test response status")); + } + + @Test + public void testInternalServerError() throws Exception { + mockMvc.perform(get("/test/internal-server-error")) + .andExpect(status().isInternalServerError()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.500")) + .andExpect(jsonPath("$.title").value("Internal Server Error")); + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/errors/ExceptionTranslatorTestController.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/errors/ExceptionTranslatorTestController.java new file mode 100644 index 0000000000..dfad64b0d6 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/errors/ExceptionTranslatorTestController.java @@ -0,0 +1,86 @@ +package com.baeldung.jhipster.gateway.web.rest.errors; + +import org.springframework.dao.ConcurrencyFailureException; +import org.springframework.http.HttpStatus; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import java.util.HashMap; +import java.util.Map; + +@RestController +public class ExceptionTranslatorTestController { + + @GetMapping("/test/concurrency-failure") + public void concurrencyFailure() { + throw new ConcurrencyFailureException("test concurrency failure"); + } + + @PostMapping("/test/method-argument") + public void methodArgument(@Valid @RequestBody TestDTO testDTO) { + } + + @GetMapping("/test/parameterized-error") + public void parameterizedError() { + throw new CustomParameterizedException("test parameterized error", "param0_value", "param1_value"); + } + + @GetMapping("/test/parameterized-error2") + public void parameterizedError2() { + Map params = new HashMap<>(); + params.put("foo", "foo_value"); + params.put("bar", "bar_value"); + throw new CustomParameterizedException("test parameterized error", params); + } + + @GetMapping("/test/missing-servlet-request-part") + public void missingServletRequestPartException(@RequestPart String part) { + } + + @GetMapping("/test/missing-servlet-request-parameter") + public void missingServletRequestParameterException(@RequestParam String param) { + } + + @GetMapping("/test/access-denied") + public void accessdenied() { + throw new AccessDeniedException("test access denied!"); + } + + @GetMapping("/test/unauthorized") + public void unauthorized() { + throw new BadCredentialsException("test authentication failed!"); + } + + @GetMapping("/test/response-status") + public void exceptionWithReponseStatus() { + throw new TestResponseStatusException(); + } + + @GetMapping("/test/internal-server-error") + public void internalServerError() { + throw new RuntimeException(); + } + + public static class TestDTO { + + @NotNull + private String test; + + public String getTest() { + return test; + } + + public void setTest(String test) { + this.test = test; + } + } + + @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status") + @SuppressWarnings("serial") + public static class TestResponseStatusException extends RuntimeException { + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/util/PaginationUtilUnitTest.java b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/util/PaginationUtilUnitTest.java new file mode 100644 index 0000000000..07b343403a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/java/com/baeldung/jhipster/gateway/web/rest/util/PaginationUtilUnitTest.java @@ -0,0 +1,44 @@ +package com.baeldung.jhipster.gateway.web.rest.util; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.HttpHeaders; + +/** + * Tests based on parsing algorithm in app/components/util/pagination-util.service.js + * + * @see PaginationUtil + */ +public class PaginationUtilUnitTest { + + @Test + public void generatePaginationHttpHeadersTest() { + String baseUrl = "/api/_search/example"; + List content = new ArrayList<>(); + Page page = new PageImpl<>(content, PageRequest.of(6, 50), 400L); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, baseUrl); + List strHeaders = headers.get(HttpHeaders.LINK); + assertNotNull(strHeaders); + assertTrue(strHeaders.size() == 1); + String headerData = strHeaders.get(0); + assertTrue(headerData.split(",").length == 4); + String expectedData = "; rel=\"next\"," + + "; rel=\"prev\"," + + "; rel=\"last\"," + + "; rel=\"first\""; + assertEquals(expectedData, headerData); + List xTotalCountHeaders = headers.get("X-Total-Count"); + assertTrue(xTotalCountHeaders.size() == 1); + assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L)); + } + +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/jest-global-mocks.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/jest-global-mocks.ts new file mode 100644 index 0000000000..a998259857 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/jest-global-mocks.ts @@ -0,0 +1,15 @@ +const mock = () => { + let storage = {}; + return { + getItem: key => (key in storage ? storage[key] : null), + setItem: (key, value) => (storage[key] = value || ''), + removeItem: key => delete storage[key], + clear: () => (storage = {}) + }; +}; + +Object.defineProperty(window, 'localStorage', { value: mock() }); +Object.defineProperty(window, 'sessionStorage', { value: mock() }); +Object.defineProperty(window, 'getComputedStyle', { + value: () => ['-webkit-appearance'] +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/jest.conf.js b/jhipster/jhipster-uaa/gateway/src/test/javascript/jest.conf.js new file mode 100644 index 0000000000..80948154fd --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/jest.conf.js @@ -0,0 +1,23 @@ +module.exports = { + preset: 'jest-preset-angular', + setupTestFrameworkScriptFile: '/src/test/javascript/jest.ts', + coverageDirectory: '/target/test-results/', + globals: { + 'ts-jest': { + tsConfigFile: 'tsconfig.json' + }, + __TRANSFORM_HTML__: true + }, + moduleNameMapper: { + 'app/(.*)': '/src/main/webapp/app/$1' + }, + reporters: [ + 'default', + [ 'jest-junit', { output: './target/test-results/jest/TESTS-results.xml' } ] + ], + testResultsProcessor: 'jest-sonar-reporter', + transformIgnorePatterns: ['node_modules/(?!@angular/common/locales)'], + testMatch: ['/src/test/javascript/spec/**/+(*.)+(spec.ts)'], + rootDir: '../../../', + testURL: "http://localhost/" +}; diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/jest.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/jest.ts new file mode 100644 index 0000000000..904329f538 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/jest.ts @@ -0,0 +1,2 @@ +import 'jest-preset-angular'; +import './jest-global-mocks'; diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/activate/activate.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/activate/activate.component.spec.ts new file mode 100644 index 0000000000..a67e03db43 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/activate/activate.component.spec.ts @@ -0,0 +1,83 @@ +import { TestBed, async, tick, fakeAsync, inject } from '@angular/core/testing'; +import { ActivatedRoute } from '@angular/router'; +import { Observable, of, throwError } from 'rxjs'; + +import { GatewayTestModule } from '../../../test.module'; +import { MockActivatedRoute } from '../../../helpers/mock-route.service'; +import { ActivateService } from 'app/account/activate/activate.service'; +import { ActivateComponent } from 'app/account/activate/activate.component'; + +describe('Component Tests', () => { + describe('ActivateComponent', () => { + let comp: ActivateComponent; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [ActivateComponent], + providers: [ + { + provide: ActivatedRoute, + useValue: new MockActivatedRoute({ key: 'ABC123' }) + } + ] + }) + .overrideTemplate(ActivateComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + const fixture = TestBed.createComponent(ActivateComponent); + comp = fixture.componentInstance; + }); + + it( + 'calls activate.get with the key from params', + inject( + [ActivateService], + fakeAsync((service: ActivateService) => { + spyOn(service, 'get').and.returnValue(of()); + + comp.ngOnInit(); + tick(); + + expect(service.get).toHaveBeenCalledWith('ABC123'); + }) + ) + ); + + it( + 'should set set success to OK upon successful activation', + inject( + [ActivateService], + fakeAsync((service: ActivateService) => { + spyOn(service, 'get').and.returnValue(of({})); + + comp.ngOnInit(); + tick(); + + expect(comp.error).toBe(null); + expect(comp.success).toEqual('OK'); + }) + ) + ); + + it( + 'should set set error to ERROR upon activation failure', + inject( + [ActivateService], + fakeAsync((service: ActivateService) => { + spyOn(service, 'get').and.returnValue(throwError('ERROR')); + + comp.ngOnInit(); + tick(); + + expect(comp.error).toBe('ERROR'); + expect(comp.success).toEqual(null); + }) + ) + ); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password-reset/finish/password-reset-finish.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password-reset/finish/password-reset-finish.component.spec.ts new file mode 100644 index 0000000000..cc17dcd3e0 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password-reset/finish/password-reset-finish.component.spec.ts @@ -0,0 +1,128 @@ +import { ComponentFixture, TestBed, inject, tick, fakeAsync } from '@angular/core/testing'; +import { Observable, of, throwError } from 'rxjs'; +import { Renderer, ElementRef } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; + +import { GatewayTestModule } from '../../../../test.module'; +import { PasswordResetFinishComponent } from 'app/account/password-reset/finish/password-reset-finish.component'; +import { PasswordResetFinishService } from 'app/account/password-reset/finish/password-reset-finish.service'; +import { MockActivatedRoute } from '../../../../helpers/mock-route.service'; + +describe('Component Tests', () => { + describe('PasswordResetFinishComponent', () => { + let fixture: ComponentFixture; + let comp: PasswordResetFinishComponent; + + beforeEach(() => { + fixture = TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [PasswordResetFinishComponent], + providers: [ + { + provide: ActivatedRoute, + useValue: new MockActivatedRoute({ key: 'XYZPDQ' }) + }, + { + provide: Renderer, + useValue: { + invokeElementMethod(renderElement: any, methodName: string, args?: any[]) {} + } + }, + { + provide: ElementRef, + useValue: new ElementRef(null) + } + ] + }) + .overrideTemplate(PasswordResetFinishComponent, '') + .createComponent(PasswordResetFinishComponent); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(PasswordResetFinishComponent); + comp = fixture.componentInstance; + comp.ngOnInit(); + }); + + it('should define its initial state', () => { + comp.ngOnInit(); + + expect(comp.keyMissing).toBeFalsy(); + expect(comp.key).toEqual('XYZPDQ'); + expect(comp.resetAccount).toEqual({}); + }); + + it( + 'sets focus after the view has been initialized', + inject([ElementRef], (elementRef: ElementRef) => { + const element = fixture.nativeElement; + const node = { + focus() {} + }; + + elementRef.nativeElement = element; + spyOn(element, 'querySelector').and.returnValue(node); + spyOn(node, 'focus'); + + comp.ngAfterViewInit(); + + expect(element.querySelector).toHaveBeenCalledWith('#password'); + expect(node.focus).toHaveBeenCalled(); + }) + ); + + it('should ensure the two passwords entered match', () => { + comp.resetAccount.password = 'password'; + comp.confirmPassword = 'non-matching'; + + comp.finishReset(); + + expect(comp.doNotMatch).toEqual('ERROR'); + }); + + it( + 'should update success to OK after resetting password', + inject( + [PasswordResetFinishService], + fakeAsync((service: PasswordResetFinishService) => { + spyOn(service, 'save').and.returnValue(of({})); + + comp.resetAccount.password = 'password'; + comp.confirmPassword = 'password'; + + comp.finishReset(); + tick(); + + expect(service.save).toHaveBeenCalledWith({ + key: 'XYZPDQ', + newPassword: 'password' + }); + expect(comp.success).toEqual('OK'); + }) + ) + ); + + it( + 'should notify of generic error', + inject( + [PasswordResetFinishService], + fakeAsync((service: PasswordResetFinishService) => { + spyOn(service, 'save').and.returnValue(throwError('ERROR')); + + comp.resetAccount.password = 'password'; + comp.confirmPassword = 'password'; + + comp.finishReset(); + tick(); + + expect(service.save).toHaveBeenCalledWith({ + key: 'XYZPDQ', + newPassword: 'password' + }); + expect(comp.success).toBeNull(); + expect(comp.error).toEqual('ERROR'); + }) + ) + ); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password-reset/init/password-reset-init.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password-reset/init/password-reset-init.component.spec.ts new file mode 100644 index 0000000000..9a4300ae9a --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password-reset/init/password-reset-init.component.spec.ts @@ -0,0 +1,119 @@ +import { ComponentFixture, TestBed, inject } from '@angular/core/testing'; +import { Renderer, ElementRef } from '@angular/core'; +import { Observable, of, throwError } from 'rxjs'; + +import { GatewayTestModule } from '../../../../test.module'; +import { PasswordResetInitComponent } from 'app/account/password-reset/init/password-reset-init.component'; +import { PasswordResetInitService } from 'app/account/password-reset/init/password-reset-init.service'; +import { EMAIL_NOT_FOUND_TYPE } from 'app/shared'; + +describe('Component Tests', () => { + describe('PasswordResetInitComponent', () => { + let fixture: ComponentFixture; + let comp: PasswordResetInitComponent; + + beforeEach(() => { + fixture = TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [PasswordResetInitComponent], + providers: [ + { + provide: Renderer, + useValue: { + invokeElementMethod(renderElement: any, methodName: string, args?: any[]) {} + } + }, + { + provide: ElementRef, + useValue: new ElementRef(null) + } + ] + }) + .overrideTemplate(PasswordResetInitComponent, '') + .createComponent(PasswordResetInitComponent); + comp = fixture.componentInstance; + comp.ngOnInit(); + }); + + it('should define its initial state', () => { + expect(comp.success).toBeUndefined(); + expect(comp.error).toBeUndefined(); + expect(comp.errorEmailNotExists).toBeUndefined(); + expect(comp.resetAccount).toEqual({}); + }); + + it( + 'sets focus after the view has been initialized', + inject([ElementRef], (elementRef: ElementRef) => { + const element = fixture.nativeElement; + const node = { + focus() {} + }; + + elementRef.nativeElement = element; + spyOn(element, 'querySelector').and.returnValue(node); + spyOn(node, 'focus'); + + comp.ngAfterViewInit(); + + expect(element.querySelector).toHaveBeenCalledWith('#email'); + expect(node.focus).toHaveBeenCalled(); + }) + ); + + it( + 'notifies of success upon successful requestReset', + inject([PasswordResetInitService], (service: PasswordResetInitService) => { + spyOn(service, 'save').and.returnValue(of({})); + comp.resetAccount.email = 'user@domain.com'; + + comp.requestReset(); + + expect(service.save).toHaveBeenCalledWith('user@domain.com'); + expect(comp.success).toEqual('OK'); + expect(comp.error).toBeNull(); + expect(comp.errorEmailNotExists).toBeNull(); + }) + ); + + it( + 'notifies of unknown email upon email address not registered/400', + inject([PasswordResetInitService], (service: PasswordResetInitService) => { + spyOn(service, 'save').and.returnValue( + throwError({ + status: 400, + error: { type: EMAIL_NOT_FOUND_TYPE } + }) + ); + comp.resetAccount.email = 'user@domain.com'; + + comp.requestReset(); + + expect(service.save).toHaveBeenCalledWith('user@domain.com'); + expect(comp.success).toBeNull(); + expect(comp.error).toBeNull(); + expect(comp.errorEmailNotExists).toEqual('ERROR'); + }) + ); + + it( + 'notifies of error upon error response', + inject([PasswordResetInitService], (service: PasswordResetInitService) => { + spyOn(service, 'save').and.returnValue( + throwError({ + status: 503, + data: 'something else' + }) + ); + comp.resetAccount.email = 'user@domain.com'; + + comp.requestReset(); + + expect(service.save).toHaveBeenCalledWith('user@domain.com'); + expect(comp.success).toBeNull(); + expect(comp.errorEmailNotExists).toBeNull(); + expect(comp.error).toEqual('ERROR'); + }) + ); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password/password-strength-bar.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password/password-strength-bar.component.spec.ts new file mode 100644 index 0000000000..b856cf4fd7 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password/password-strength-bar.component.spec.ts @@ -0,0 +1,50 @@ +import { ComponentFixture, TestBed, async } from '@angular/core/testing'; + +import { PasswordStrengthBarComponent } from 'app/account/password/password-strength-bar.component'; + +describe('Component Tests', () => { + describe('PasswordStrengthBarComponent', () => { + let comp: PasswordStrengthBarComponent; + let fixture: ComponentFixture; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + declarations: [PasswordStrengthBarComponent] + }) + .overrideTemplate(PasswordStrengthBarComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(PasswordStrengthBarComponent); + comp = fixture.componentInstance; + }); + + describe('PasswordStrengthBarComponents', () => { + it('should initialize with default values', () => { + expect(comp.measureStrength('')).toBe(0); + expect(comp.colors).toEqual(['#F00', '#F90', '#FF0', '#9F0', '#0F0']); + expect(comp.getColor(0).idx).toBe(1); + expect(comp.getColor(0).col).toBe(comp.colors[0]); + }); + + it('should increase strength upon password value change', () => { + expect(comp.measureStrength('')).toBe(0); + expect(comp.measureStrength('aa')).toBeGreaterThanOrEqual(comp.measureStrength('')); + expect(comp.measureStrength('aa^6')).toBeGreaterThanOrEqual(comp.measureStrength('aa')); + expect(comp.measureStrength('Aa090(**)')).toBeGreaterThanOrEqual(comp.measureStrength('aa^6')); + expect(comp.measureStrength('Aa090(**)+-07365')).toBeGreaterThanOrEqual(comp.measureStrength('Aa090(**)')); + }); + + it('should change the color based on strength', () => { + expect(comp.getColor(0).col).toBe(comp.colors[0]); + expect(comp.getColor(11).col).toBe(comp.colors[1]); + expect(comp.getColor(22).col).toBe(comp.colors[2]); + expect(comp.getColor(33).col).toBe(comp.colors[3]); + expect(comp.getColor(44).col).toBe(comp.colors[4]); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password/password.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password/password.component.spec.ts new file mode 100644 index 0000000000..7665cc3a12 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/password/password.component.spec.ts @@ -0,0 +1,91 @@ +import { ComponentFixture, TestBed, async } from '@angular/core/testing'; +import { HttpResponse } from '@angular/common/http'; +import { Observable, of, throwError } from 'rxjs'; + +import { GatewayTestModule } from '../../../test.module'; +import { PasswordComponent } from 'app/account/password/password.component'; +import { PasswordService } from 'app/account/password/password.service'; + +describe('Component Tests', () => { + describe('PasswordComponent', () => { + let comp: PasswordComponent; + let fixture: ComponentFixture; + let service: PasswordService; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [PasswordComponent], + providers: [] + }) + .overrideTemplate(PasswordComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(PasswordComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(PasswordService); + }); + + it('should show error if passwords do not match', () => { + // GIVEN + comp.newPassword = 'password1'; + comp.confirmPassword = 'password2'; + // WHEN + comp.changePassword(); + // THEN + expect(comp.doNotMatch).toBe('ERROR'); + expect(comp.error).toBeNull(); + expect(comp.success).toBeNull(); + }); + + it('should call Auth.changePassword when passwords match', () => { + // GIVEN + const passwordValues = { + currentPassword: 'oldPassword', + newPassword: 'myPassword' + }; + + spyOn(service, 'save').and.returnValue(of(new HttpResponse({ body: true }))); + comp.currentPassword = passwordValues.currentPassword; + comp.newPassword = comp.confirmPassword = passwordValues.newPassword; + + // WHEN + comp.changePassword(); + + // THEN + expect(service.save).toHaveBeenCalledWith(passwordValues.newPassword, passwordValues.currentPassword); + }); + + it('should set success to OK upon success', function() { + // GIVEN + spyOn(service, 'save').and.returnValue(of(new HttpResponse({ body: true }))); + comp.newPassword = comp.confirmPassword = 'myPassword'; + + // WHEN + comp.changePassword(); + + // THEN + expect(comp.doNotMatch).toBeNull(); + expect(comp.error).toBeNull(); + expect(comp.success).toBe('OK'); + }); + + it('should notify of error if change password fails', function() { + // GIVEN + spyOn(service, 'save').and.returnValue(throwError('ERROR')); + comp.newPassword = comp.confirmPassword = 'myPassword'; + + // WHEN + comp.changePassword(); + + // THEN + expect(comp.doNotMatch).toBeNull(); + expect(comp.success).toBeNull(); + expect(comp.error).toBe('ERROR'); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/register/register.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/register/register.component.spec.ts new file mode 100644 index 0000000000..89793ae6b3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/register/register.component.spec.ts @@ -0,0 +1,135 @@ +import { ComponentFixture, TestBed, async, inject, tick, fakeAsync } from '@angular/core/testing'; +import { Observable, of, throwError } from 'rxjs'; + +import { JhiLanguageService } from 'ng-jhipster'; +import { MockLanguageService } from '../../../helpers/mock-language.service'; +import { GatewayTestModule } from '../../../test.module'; +import { EMAIL_ALREADY_USED_TYPE, LOGIN_ALREADY_USED_TYPE } from 'app/shared'; +import { Register } from 'app/account/register/register.service'; +import { RegisterComponent } from 'app/account/register/register.component'; + +describe('Component Tests', () => { + describe('RegisterComponent', () => { + let fixture: ComponentFixture; + let comp: RegisterComponent; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [RegisterComponent] + }) + .overrideTemplate(RegisterComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(RegisterComponent); + comp = fixture.componentInstance; + comp.ngOnInit(); + }); + + it('should ensure the two passwords entered match', () => { + comp.registerAccount.password = 'password'; + comp.confirmPassword = 'non-matching'; + + comp.register(); + + expect(comp.doNotMatch).toEqual('ERROR'); + }); + + it( + 'should update success to OK after creating an account', + inject( + [Register, JhiLanguageService], + fakeAsync((service: Register, mockTranslate: MockLanguageService) => { + spyOn(service, 'save').and.returnValue(of({})); + comp.registerAccount.password = comp.confirmPassword = 'password'; + + comp.register(); + tick(); + + expect(service.save).toHaveBeenCalledWith({ + password: 'password', + langKey: 'en' + }); + expect(comp.success).toEqual(true); + expect(comp.registerAccount.langKey).toEqual('en'); + expect(mockTranslate.getCurrentSpy).toHaveBeenCalled(); + expect(comp.errorUserExists).toBeNull(); + expect(comp.errorEmailExists).toBeNull(); + expect(comp.error).toBeNull(); + }) + ) + ); + + it( + 'should notify of user existence upon 400/login already in use', + inject( + [Register], + fakeAsync((service: Register) => { + spyOn(service, 'save').and.returnValue( + throwError({ + status: 400, + error: { type: LOGIN_ALREADY_USED_TYPE } + }) + ); + comp.registerAccount.password = comp.confirmPassword = 'password'; + + comp.register(); + tick(); + + expect(comp.errorUserExists).toEqual('ERROR'); + expect(comp.errorEmailExists).toBeNull(); + expect(comp.error).toBeNull(); + }) + ) + ); + + it( + 'should notify of email existence upon 400/email address already in use', + inject( + [Register], + fakeAsync((service: Register) => { + spyOn(service, 'save').and.returnValue( + throwError({ + status: 400, + error: { type: EMAIL_ALREADY_USED_TYPE } + }) + ); + comp.registerAccount.password = comp.confirmPassword = 'password'; + + comp.register(); + tick(); + + expect(comp.errorEmailExists).toEqual('ERROR'); + expect(comp.errorUserExists).toBeNull(); + expect(comp.error).toBeNull(); + }) + ) + ); + + it( + 'should notify of generic error', + inject( + [Register], + fakeAsync((service: Register) => { + spyOn(service, 'save').and.returnValue( + throwError({ + status: 503 + }) + ); + comp.registerAccount.password = comp.confirmPassword = 'password'; + + comp.register(); + tick(); + + expect(comp.errorUserExists).toBeNull(); + expect(comp.errorEmailExists).toBeNull(); + expect(comp.error).toEqual('ERROR'); + }) + ) + ); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/settings/settings.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/settings/settings.component.spec.ts new file mode 100644 index 0000000000..253c2dd555 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/account/settings/settings.component.spec.ts @@ -0,0 +1,85 @@ +import { ComponentFixture, TestBed, async } from '@angular/core/testing'; +import { Observable, throwError } from 'rxjs'; + +import { GatewayTestModule } from '../../../test.module'; +import { Principal, AccountService } from 'app/core'; +import { SettingsComponent } from 'app/account/settings/settings.component'; + +describe('Component Tests', () => { + describe('SettingsComponent', () => { + let comp: SettingsComponent; + let fixture: ComponentFixture; + let mockAuth: any; + let mockPrincipal: any; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [SettingsComponent], + providers: [] + }) + .overrideTemplate(SettingsComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(SettingsComponent); + comp = fixture.componentInstance; + mockAuth = fixture.debugElement.injector.get(AccountService); + mockPrincipal = fixture.debugElement.injector.get(Principal); + }); + + it('should send the current identity upon save', () => { + // GIVEN + const accountValues = { + firstName: 'John', + lastName: 'Doe', + + activated: true, + email: 'john.doe@mail.com', + langKey: 'en', + login: 'john' + }; + mockPrincipal.setResponse(accountValues); + + // WHEN + comp.settingsAccount = accountValues; + comp.save(); + + // THEN + expect(mockPrincipal.identitySpy).toHaveBeenCalled(); + expect(mockAuth.saveSpy).toHaveBeenCalledWith(accountValues); + expect(comp.settingsAccount).toEqual(accountValues); + }); + + it('should notify of success upon successful save', () => { + // GIVEN + const accountValues = { + firstName: 'John', + lastName: 'Doe' + }; + mockPrincipal.setResponse(accountValues); + + // WHEN + comp.save(); + + // THEN + expect(comp.error).toBeNull(); + expect(comp.success).toBe('OK'); + }); + + it('should notify of error upon failed save', () => { + // GIVEN + mockAuth.saveSpy.and.returnValue(throwError('ERROR')); + + // WHEN + comp.save(); + + // THEN + expect(comp.error).toEqual('ERROR'); + expect(comp.success).toBeNull(); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/audits/audits.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/audits/audits.component.spec.ts new file mode 100644 index 0000000000..0a53aeddb3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/audits/audits.component.spec.ts @@ -0,0 +1,135 @@ +import { ComponentFixture, TestBed, async } from '@angular/core/testing'; +import { Observable, of } from 'rxjs'; +import { HttpHeaders, HttpResponse } from '@angular/common/http'; + +import { GatewayTestModule } from '../../../test.module'; +import { AuditsComponent } from 'app/admin/audits/audits.component'; +import { AuditsService } from 'app/admin/audits/audits.service'; +import { Audit } from 'app/admin/audits/audit.model'; +import { ITEMS_PER_PAGE } from 'app/shared'; + +function build2DigitsDatePart(datePart: number) { + return `0${datePart}`.slice(-2); +} + +function getDate(isToday = true) { + let date: Date = new Date(); + if (isToday) { + // Today + 1 day - needed if the current day must be included + date.setDate(date.getDate() + 1); + } else { + // get last month + if (date.getMonth() === 0) { + date = new Date(date.getFullYear() - 1, 11, date.getDate()); + } else { + date = new Date(date.getFullYear(), date.getMonth() - 1, date.getDate()); + } + } + const monthString = build2DigitsDatePart(date.getMonth() + 1); + const dateString = build2DigitsDatePart(date.getDate()); + return `${date.getFullYear()}-${monthString}-${dateString}`; +} + +describe('Component Tests', () => { + describe('AuditsComponent', () => { + let comp: AuditsComponent; + let fixture: ComponentFixture; + let service: AuditsService; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [AuditsComponent], + providers: [AuditsService] + }) + .overrideTemplate(AuditsComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(AuditsComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(AuditsService); + }); + + describe('today function ', () => { + it('should set toDate to current date', () => { + comp.today(); + expect(comp.toDate).toBe(getDate()); + }); + }); + + describe('previousMonth function ', () => { + it('should set fromDate to current date', () => { + comp.previousMonth(); + expect(comp.fromDate).toBe(getDate(false)); + }); + }); + + describe('By default, on init', () => { + it('should set all default values correctly', () => { + fixture.detectChanges(); + expect(comp.toDate).toBe(getDate()); + expect(comp.fromDate).toBe(getDate(false)); + expect(comp.itemsPerPage).toBe(ITEMS_PER_PAGE); + expect(comp.page).toBe(10); + expect(comp.reverse).toBeFalsy(); + expect(comp.predicate).toBe('id'); + }); + }); + + describe('OnInit', () => { + it('Should call load all on init', () => { + // GIVEN + const headers = new HttpHeaders().append('link', 'link;link'); + const audit = new Audit({ remoteAddress: '127.0.0.1', sessionId: '123' }, 'user', '20140101', 'AUTHENTICATION_SUCCESS'); + spyOn(service, 'query').and.returnValue( + of( + new HttpResponse({ + body: [audit], + headers + }) + ) + ); + + // WHEN + comp.ngOnInit(); + + // THEN + expect(service.query).toHaveBeenCalled(); + expect(comp.audits[0]).toEqual(jasmine.objectContaining(audit)); + }); + }); + + describe('Create sort object', () => { + it('Should sort only by id asc', () => { + // GIVEN + comp.predicate = 'id'; + comp.reverse = false; + + // WHEN + const sort = comp.sort(); + + // THEN + expect(sort.length).toEqual(1); + expect(sort[0]).toEqual('id,desc'); + }); + + it('Should sort by timestamp asc then by id', () => { + // GIVEN + comp.predicate = 'timestamp'; + comp.reverse = true; + + // WHEN + const sort = comp.sort(); + + // THEN + expect(sort.length).toEqual(2); + expect(sort[0]).toEqual('timestamp,asc'); + expect(sort[1]).toEqual('id'); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/audits/audits.service.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/audits/audits.service.spec.ts new file mode 100644 index 0000000000..d03559108b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/audits/audits.service.spec.ts @@ -0,0 +1,59 @@ +import { TestBed } from '@angular/core/testing'; + +import { AuditsService } from 'app/admin/audits/audits.service'; +import { Audit } from 'app/admin/audits/audit.model'; +import { SERVER_API_URL } from 'app/app.constants'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; + +describe('Service Tests', () => { + describe('Audits Service', () => { + let service: AuditsService; + let httpMock; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule] + }); + + service = TestBed.get(AuditsService); + httpMock = TestBed.get(HttpTestingController); + }); + + afterEach(() => { + httpMock.verify(); + }); + + describe('Service methods', () => { + it('should call correct URL', () => { + service.query({}).subscribe(() => {}); + + const req = httpMock.expectOne({ method: 'GET' }); + const resourceUrl = SERVER_API_URL + 'uaa/management/audits'; + expect(req.request.url).toEqual(resourceUrl); + }); + + it('should return Audits', () => { + const audit = new Audit({ remoteAddress: '127.0.0.1', sessionId: '123' }, 'user', '20140101', 'AUTHENTICATION_SUCCESS'); + + service.query({}).subscribe(received => { + expect(received.body[0]).toEqual(audit); + }); + + const req = httpMock.expectOne({ method: 'GET' }); + req.flush([audit]); + }); + + it('should propagate not found response', () => { + service.query({}).subscribe(null, (_error: any) => { + expect(_error.status).toEqual(404); + }); + + const req = httpMock.expectOne({ method: 'GET' }); + req.flush('Invalid request parameters', { + status: 404, + statusText: 'Bad Request' + }); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/configuration/configuration.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/configuration/configuration.component.spec.ts new file mode 100644 index 0000000000..463c9373a9 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/configuration/configuration.component.spec.ts @@ -0,0 +1,73 @@ +import { ComponentFixture, TestBed, async } from '@angular/core/testing'; +import { of } from 'rxjs'; +import { HttpHeaders, HttpResponse } from '@angular/common/http'; + +import { GatewayTestModule } from '../../../test.module'; +import { JhiConfigurationComponent } from 'app/admin/configuration/configuration.component'; +import { JhiConfigurationService } from 'app/admin/configuration/configuration.service'; +import { ITEMS_PER_PAGE } from 'app/shared'; +import { Log } from 'app/admin'; + +describe('Component Tests', () => { + describe('JhiConfigurationComponent', () => { + let comp: JhiConfigurationComponent; + let fixture: ComponentFixture; + let service: JhiConfigurationService; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [JhiConfigurationComponent], + providers: [JhiConfigurationService] + }) + .overrideTemplate(JhiConfigurationComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(JhiConfigurationComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(JhiConfigurationService); + }); + + describe('OnInit', () => { + it('should set all default values correctly', () => { + expect(comp.configKeys).toEqual([]); + expect(comp.filter).toBe(''); + expect(comp.orderProp).toBe('prefix'); + expect(comp.reverse).toBe(false); + }); + it('Should call load all on init', () => { + // GIVEN + const body = [{ config: 'test', properties: 'test' }, { config: 'test2' }]; + const envConfig = { envConfig: 'test' }; + spyOn(service, 'get').and.returnValue(of(body)); + spyOn(service, 'getEnv').and.returnValue(of(envConfig)); + + // WHEN + comp.ngOnInit(); + + // THEN + expect(service.get).toHaveBeenCalled(); + expect(service.getEnv).toHaveBeenCalled(); + expect(comp.configKeys).toEqual([['0', '1', '2', '3']]); + expect(comp.allConfiguration).toEqual(envConfig); + }); + }); + describe('keys method', () => { + it('should return the keys of an Object', () => { + // GIVEN + const data = { + key1: 'test', + key2: 'test2' + }; + + // THEN + expect(comp.keys(data)).toEqual(['key1', 'key2']); + expect(comp.keys(undefined)).toEqual([]); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/configuration/configuration.service.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/configuration/configuration.service.spec.ts new file mode 100644 index 0000000000..6039044b7f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/configuration/configuration.service.spec.ts @@ -0,0 +1,64 @@ +import { TestBed } from '@angular/core/testing'; + +import { JhiConfigurationService } from 'app/admin/configuration/configuration.service'; +import { SERVER_API_URL } from 'app/app.constants'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; +import { HttpResponse } from '@angular/common/http'; + +describe('Service Tests', () => { + describe('Logs Service', () => { + let service: JhiConfigurationService; + let httpMock; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule] + }); + + service = TestBed.get(JhiConfigurationService); + httpMock = TestBed.get(HttpTestingController); + }); + + afterEach(() => { + httpMock.verify(); + }); + + describe('Service methods', () => { + it('should call correct URL', () => { + service.get().subscribe(() => {}); + + const req = httpMock.expectOne({ method: 'GET' }); + const resourceUrl = SERVER_API_URL + 'management/configprops'; + expect(req.request.url).toEqual(resourceUrl); + }); + + it('should get the config', () => { + const angularConfig = { + contexts: { + angular: { + beans: ['test2'] + } + } + }; + service.get().subscribe(received => { + expect(received.body[0]).toEqual(angularConfig); + }); + + const req = httpMock.expectOne({ method: 'GET' }); + req.flush(angularConfig); + }); + + it('should get the env', () => { + const propertySources = new HttpResponse({ + body: [{ name: 'test1', properties: 'test1' }, { name: 'test2', properties: 'test2' }] + }); + service.get().subscribe(received => { + expect(received.body[0]).toEqual(propertySources); + }); + + const req = httpMock.expectOne({ method: 'GET' }); + req.flush(propertySources); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/health/health.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/health/health.component.spec.ts new file mode 100644 index 0000000000..1ffe425fd5 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/health/health.component.spec.ts @@ -0,0 +1,323 @@ +import { ComponentFixture, TestBed, async } from '@angular/core/testing'; +import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; +import { of, throwError } from 'rxjs'; + +import { GatewayTestModule } from '../../../test.module'; +import { JhiHealthCheckComponent } from 'app/admin/health/health.component'; +import { JhiHealthService } from 'app/admin/health/health.service'; + +describe('Component Tests', () => { + describe('JhiHealthCheckComponent', () => { + let comp: JhiHealthCheckComponent; + let fixture: ComponentFixture; + let service: JhiHealthService; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [JhiHealthCheckComponent] + }) + .overrideTemplate(JhiHealthCheckComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(JhiHealthCheckComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(JhiHealthService); + }); + + describe('baseName and subSystemName', () => { + it('should return the basename when it has no sub system', () => { + expect(comp.baseName('base')).toBe('base'); + }); + + it('should return the basename when it has sub systems', () => { + expect(comp.baseName('base.subsystem.system')).toBe('base'); + }); + + it('should return the sub system name', () => { + expect(comp.subSystemName('subsystem')).toBe(''); + }); + + it('should return the subsystem when it has multiple keys', () => { + expect(comp.subSystemName('subsystem.subsystem.system')).toBe(' - subsystem.system'); + }); + }); + + describe('transformHealthData', () => { + it('should flatten empty health data', () => { + const data = {}; + const expected = []; + expect(service.transformHealthData(data)).toEqual(expected); + }); + + it('should flatten health data with no subsystems', () => { + const data = { + details: { + status: 'UP', + db: { + status: 'UP', + database: 'H2', + hello: '1' + }, + mail: { + status: 'UP', + error: 'mail.a.b.c' + } + } + }; + const expected = [ + { + name: 'db', + status: 'UP', + details: { + database: 'H2', + hello: '1' + } + }, + { + name: 'mail', + error: 'mail.a.b.c', + status: 'UP' + } + ]; + expect(service.transformHealthData(data)).toEqual(expected); + }); + + it('should flatten health data with subsystems at level 1, main system has no additional information', () => { + const data = { + details: { + status: 'UP', + db: { + status: 'UP', + database: 'H2', + hello: '1' + }, + mail: { + status: 'UP', + error: 'mail.a.b.c' + }, + system: { + status: 'DOWN', + subsystem1: { + status: 'UP', + property1: 'system.subsystem1.property1' + }, + subsystem2: { + status: 'DOWN', + error: 'system.subsystem1.error', + property2: 'system.subsystem2.property2' + } + } + } + }; + const expected = [ + { + name: 'db', + status: 'UP', + details: { + database: 'H2', + hello: '1' + } + }, + { + name: 'mail', + error: 'mail.a.b.c', + status: 'UP' + }, + { + name: 'system.subsystem1', + status: 'UP', + details: { + property1: 'system.subsystem1.property1' + } + }, + { + name: 'system.subsystem2', + error: 'system.subsystem1.error', + status: 'DOWN', + details: { + property2: 'system.subsystem2.property2' + } + } + ]; + expect(service.transformHealthData(data)).toEqual(expected); + }); + + it('should flatten health data with subsystems at level 1, main system has additional information', () => { + const data = { + details: { + status: 'UP', + db: { + status: 'UP', + database: 'H2', + hello: '1' + }, + mail: { + status: 'UP', + error: 'mail.a.b.c' + }, + system: { + status: 'DOWN', + property1: 'system.property1', + subsystem1: { + status: 'UP', + property1: 'system.subsystem1.property1' + }, + subsystem2: { + status: 'DOWN', + error: 'system.subsystem1.error', + property2: 'system.subsystem2.property2' + } + } + } + }; + const expected = [ + { + name: 'db', + status: 'UP', + details: { + database: 'H2', + hello: '1' + } + }, + { + name: 'mail', + error: 'mail.a.b.c', + status: 'UP' + }, + { + name: 'system', + status: 'DOWN', + details: { + property1: 'system.property1' + } + }, + { + name: 'system.subsystem1', + status: 'UP', + details: { + property1: 'system.subsystem1.property1' + } + }, + { + name: 'system.subsystem2', + error: 'system.subsystem1.error', + status: 'DOWN', + details: { + property2: 'system.subsystem2.property2' + } + } + ]; + expect(service.transformHealthData(data)).toEqual(expected); + }); + + it('should flatten health data with subsystems at level 1, main system has additional error', () => { + const data = { + details: { + status: 'UP', + db: { + status: 'UP', + database: 'H2', + hello: '1' + }, + mail: { + status: 'UP', + error: 'mail.a.b.c' + }, + system: { + status: 'DOWN', + error: 'show me', + subsystem1: { + status: 'UP', + property1: 'system.subsystem1.property1' + }, + subsystem2: { + status: 'DOWN', + error: 'system.subsystem1.error', + property2: 'system.subsystem2.property2' + } + } + } + }; + const expected = [ + { + name: 'db', + status: 'UP', + details: { + database: 'H2', + hello: '1' + } + }, + { + name: 'mail', + error: 'mail.a.b.c', + status: 'UP' + }, + { + name: 'system', + error: 'show me', + status: 'DOWN' + }, + { + name: 'system.subsystem1', + status: 'UP', + details: { + property1: 'system.subsystem1.property1' + } + }, + { + name: 'system.subsystem2', + error: 'system.subsystem1.error', + status: 'DOWN', + details: { + property2: 'system.subsystem2.property2' + } + } + ]; + expect(service.transformHealthData(data)).toEqual(expected); + }); + }); + + describe('getBadgeClass', () => { + it('should get badge class', () => { + const upBadgeClass = comp.getBadgeClass('UP'); + const downBadgeClass = comp.getBadgeClass('DOWN'); + expect(upBadgeClass).toEqual('badge-success'); + expect(downBadgeClass).toEqual('badge-danger'); + }); + }); + + describe('refresh', () => { + it('should call refresh on init', () => { + // GIVEN + spyOn(service, 'checkHealth').and.returnValue(of(new HttpResponse())); + spyOn(service, 'transformHealthData').and.returnValue(of({ data: 'test' })); + + // WHEN + comp.ngOnInit(); + + // THEN + expect(service.checkHealth).toHaveBeenCalled(); + expect(service.transformHealthData).toHaveBeenCalled(); + expect(comp.healthData.value).toEqual({ data: 'test' }); + }); + it('should handle a 503 on refreshing health data', () => { + // GIVEN + spyOn(service, 'checkHealth').and.returnValue(throwError(new HttpErrorResponse({ status: 503, error: 'Mail down' }))); + spyOn(service, 'transformHealthData').and.returnValue(of({ health: 'down' })); + + // WHEN + comp.refresh(); + + // THEN + expect(service.checkHealth).toHaveBeenCalled(); + expect(service.transformHealthData).toHaveBeenCalled(); + expect(comp.healthData.value).toEqual({ health: 'down' }); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/logs/logs.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/logs/logs.component.spec.ts new file mode 100644 index 0000000000..77587271c9 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/logs/logs.component.spec.ts @@ -0,0 +1,79 @@ +import { ComponentFixture, TestBed, async } from '@angular/core/testing'; +import { of } from 'rxjs'; +import { HttpHeaders, HttpResponse } from '@angular/common/http'; + +import { GatewayTestModule } from '../../../test.module'; +import { LogsComponent } from 'app/admin/logs/logs.component'; +import { LogsService } from 'app/admin/logs/logs.service'; +import { ITEMS_PER_PAGE } from 'app/shared'; +import { Log } from 'app/admin'; + +describe('Component Tests', () => { + describe('LogsComponent', () => { + let comp: LogsComponent; + let fixture: ComponentFixture; + let service: LogsService; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [LogsComponent], + providers: [LogsService] + }) + .overrideTemplate(LogsComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(LogsComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(LogsService); + }); + + describe('OnInit', () => { + it('should set all default values correctly', () => { + expect(comp.filter).toBe(''); + expect(comp.orderProp).toBe('name'); + expect(comp.reverse).toBe(false); + }); + it('Should call load all on init', () => { + // GIVEN + const headers = new HttpHeaders().append('link', 'link;link'); + const log = new Log('main', 'WARN'); + spyOn(service, 'findAll').and.returnValue( + of( + new HttpResponse({ + body: [log], + headers + }) + ) + ); + + // WHEN + comp.ngOnInit(); + + // THEN + expect(service.findAll).toHaveBeenCalled(); + expect(comp.loggers[0]).toEqual(jasmine.objectContaining(log)); + }); + }); + describe('change log level', () => { + it('should change log level correctly', () => { + // GIVEN + const log = new Log('main', 'ERROR'); + spyOn(service, 'changeLevel').and.returnValue(of(new HttpResponse())); + spyOn(service, 'findAll').and.returnValue(of(new HttpResponse({ body: [log] }))); + + // WHEN + comp.changeLevel('main', 'ERROR'); + + // THEN + expect(service.changeLevel).toHaveBeenCalled(); + expect(service.findAll).toHaveBeenCalled(); + expect(comp.loggers[0]).toEqual(jasmine.objectContaining(log)); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/logs/logs.service.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/logs/logs.service.spec.ts new file mode 100644 index 0000000000..c34833922e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/logs/logs.service.spec.ts @@ -0,0 +1,58 @@ +import { TestBed } from '@angular/core/testing'; + +import { LogsService } from 'app/admin/logs/logs.service'; +import { Log } from 'app/admin/logs/log.model'; +import { SERVER_API_URL } from 'app/app.constants'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; + +describe('Service Tests', () => { + describe('Logs Service', () => { + let service: LogsService; + let httpMock; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule] + }); + + service = TestBed.get(LogsService); + httpMock = TestBed.get(HttpTestingController); + }); + + afterEach(() => { + httpMock.verify(); + }); + + describe('Service methods', () => { + it('should call correct URL', () => { + service.findAll().subscribe(() => {}); + + const req = httpMock.expectOne({ method: 'GET' }); + const resourceUrl = SERVER_API_URL + 'management/logs'; + expect(req.request.url).toEqual(resourceUrl); + }); + + it('should return Logs', () => { + const log = new Log('main', 'ERROR'); + + service.findAll().subscribe(received => { + expect(received.body[0]).toEqual(log); + }); + + const req = httpMock.expectOne({ method: 'GET' }); + req.flush([log]); + }); + + it('should change log level', () => { + const log = new Log('main', 'ERROR'); + + service.changeLevel(log).subscribe(received => { + expect(received.body[0]).toEqual(log); + }); + + const req = httpMock.expectOne({ method: 'PUT' }); + req.flush([log]); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/metrics/metrics-modal.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/metrics/metrics-modal.component.spec.ts new file mode 100644 index 0000000000..917d3e4f74 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/metrics/metrics-modal.component.spec.ts @@ -0,0 +1,90 @@ +import { ComponentFixture, TestBed, async } from '@angular/core/testing'; +import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; +import { of, throwError } from 'rxjs'; + +import { GatewayTestModule } from '../../../test.module'; +import { JhiMetricsMonitoringModalComponent } from 'app/admin/metrics/metrics-modal.component'; +import { JhiMetricsService } from 'app/admin/metrics/metrics.service'; + +describe('Component Tests', () => { + describe('JhiMetricsMonitoringModalComponent', () => { + let comp: JhiMetricsMonitoringModalComponent; + let fixture: ComponentFixture; + let service: JhiMetricsService; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [JhiMetricsMonitoringModalComponent] + }) + .overrideTemplate(JhiMetricsMonitoringModalComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(JhiMetricsMonitoringModalComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(JhiMetricsService); + }); + + describe('ngOnInit', () => { + it('should count the numbers of each thread type', () => { + comp.threadDump = [ + { name: 'test1', threadState: 'RUNNABLE' }, + { name: 'test2', threadState: 'WAITING' }, + { name: 'test3', threadState: 'TIMED_WAITING' }, + { name: 'test4', threadState: 'BLOCKED' }, + { name: 'test5', threadState: 'BLOCKED' }, + { name: 'test5', threadState: 'NONE' } + ]; + fixture.detectChanges(); + + expect(comp.threadDumpRunnable).toBe(1); + expect(comp.threadDumpWaiting).toBe(1); + expect(comp.threadDumpTimedWaiting).toBe(1); + expect(comp.threadDumpBlocked).toBe(2); + expect(comp.threadDumpAll).toBe(5); + }); + + it('should return badge-info for WAITING', () => { + expect(comp.getBadgeClass('WAITING')).toBe('badge-info'); + }); + + it('should return badge-warning for TIMED_WAITING', () => { + expect(comp.getBadgeClass('TIMED_WAITING')).toBe('badge-warning'); + }); + + it('should return badge-danger for BLOCKED', () => { + expect(comp.getBadgeClass('BLOCKED')).toBe('badge-danger'); + }); + + it('should return undefined for anything else', () => { + expect(comp.getBadgeClass('')).toBe(undefined); + }); + }); + + describe('getBadgeClass', () => { + it('should return badge-success for RUNNABLE', () => { + expect(comp.getBadgeClass('RUNNABLE')).toBe('badge-success'); + }); + + it('should return badge-info for WAITING', () => { + expect(comp.getBadgeClass('WAITING')).toBe('badge-info'); + }); + + it('should return badge-warning for TIMED_WAITING', () => { + expect(comp.getBadgeClass('TIMED_WAITING')).toBe('badge-warning'); + }); + + it('should return badge-danger for BLOCKED', () => { + expect(comp.getBadgeClass('BLOCKED')).toBe('badge-danger'); + }); + + it('should return undefined for anything else', () => { + expect(comp.getBadgeClass('')).toBe(undefined); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts new file mode 100644 index 0000000000..6acc877aa3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts @@ -0,0 +1,66 @@ +import { ComponentFixture, TestBed, async } from '@angular/core/testing'; +import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; +import { of, throwError } from 'rxjs'; + +import { GatewayTestModule } from '../../../test.module'; +import { JhiMetricsMonitoringComponent } from 'app/admin/metrics/metrics.component'; +import { JhiMetricsService } from 'app/admin/metrics/metrics.service'; + +describe('Component Tests', () => { + describe('JhiMetricsMonitoringComponent', () => { + let comp: JhiMetricsMonitoringComponent; + let fixture: ComponentFixture; + let service: JhiMetricsService; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [JhiMetricsMonitoringComponent] + }) + .overrideTemplate(JhiMetricsMonitoringComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(JhiMetricsMonitoringComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(JhiMetricsService); + }); + + describe('refresh', () => { + it('should call refresh on init', () => { + // GIVEN + const response = { + timers: { + service: 'test', + unrelatedKey: 'test' + }, + gauges: { + 'jcache.statistics': { + value: 2 + }, + unrelatedKey: 'test' + } + }; + spyOn(service, 'getMetrics').and.returnValue(of(response)); + + // WHEN + comp.ngOnInit(); + + // THEN + expect(service.getMetrics).toHaveBeenCalled(); + expect(comp.servicesStats).toEqual({ service: 'test' }); + expect(comp.cachesStats).toEqual({ jcache: { name: 17, value: 2 } }); + }); + }); + + describe('isNan', () => { + it('should return if a variable is NaN', () => { + expect(comp.filterNaN(1)).toBe(1); + expect(comp.filterNaN('test')).toBe(0); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts new file mode 100644 index 0000000000..62fab44ba8 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts @@ -0,0 +1,57 @@ +import { TestBed } from '@angular/core/testing'; + +import { JhiMetricsService } from 'app/admin/metrics/metrics.service'; +import { SERVER_API_URL } from 'app/app.constants'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; + +describe('Service Tests', () => { + describe('Logs Service', () => { + let service: JhiMetricsService; + let httpMock; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule] + }); + + service = TestBed.get(JhiMetricsService); + httpMock = TestBed.get(HttpTestingController); + }); + + afterEach(() => { + httpMock.verify(); + }); + + describe('Service methods', () => { + it('should call correct URL', () => { + service.getMetrics().subscribe(() => {}); + + const req = httpMock.expectOne({ method: 'GET' }); + const resourceUrl = SERVER_API_URL + 'management/metrics'; + expect(req.request.url).toEqual(resourceUrl); + }); + + it('should return Metrics', () => { + const metrics = []; + + service.getMetrics().subscribe(received => { + expect(received.body[0]).toEqual(metrics); + }); + + const req = httpMock.expectOne({ method: 'GET' }); + req.flush([metrics]); + }); + + it('should return Thread Dump', () => { + const dump = [{ name: 'test1', threadState: 'RUNNABLE' }]; + + service.threadDump().subscribe(received => { + expect(received.body[0]).toEqual(dump); + }); + + const req = httpMock.expectOne({ method: 'GET' }); + req.flush([dump]); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management-delete-dialog.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management-delete-dialog.component.spec.ts new file mode 100644 index 0000000000..72406e4a93 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management-delete-dialog.component.spec.ts @@ -0,0 +1,59 @@ +import { ComponentFixture, TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { Observable, of } from 'rxjs'; +import { JhiEventManager } from 'ng-jhipster'; + +import { GatewayTestModule } from '../../../test.module'; +import { UserMgmtDeleteDialogComponent } from 'app/admin/user-management/user-management-delete-dialog.component'; +import { UserService } from 'app/core'; + +describe('Component Tests', () => { + describe('User Management Delete Component', () => { + let comp: UserMgmtDeleteDialogComponent; + let fixture: ComponentFixture; + let service: UserService; + let mockEventManager: any; + let mockActiveModal: any; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [UserMgmtDeleteDialogComponent] + }) + .overrideTemplate(UserMgmtDeleteDialogComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(UserMgmtDeleteDialogComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(UserService); + mockEventManager = fixture.debugElement.injector.get(JhiEventManager); + mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); + }); + + describe('confirmDelete', () => { + it( + 'Should call delete service on confirmDelete', + inject( + [], + fakeAsync(() => { + // GIVEN + spyOn(service, 'delete').and.returnValue(of({})); + + // WHEN + comp.confirmDelete('user'); + tick(); + + // THEN + expect(service.delete).toHaveBeenCalledWith('user'); + expect(mockActiveModal.dismissSpy).toHaveBeenCalled(); + expect(mockEventManager.broadcastSpy).toHaveBeenCalled(); + }) + ) + ); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management-detail.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management-detail.component.spec.ts new file mode 100644 index 0000000000..c535523fe3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management-detail.component.spec.ts @@ -0,0 +1,67 @@ +import { ComponentFixture, TestBed, async } from '@angular/core/testing'; +import { ActivatedRoute } from '@angular/router'; +import { of } from 'rxjs'; + +import { GatewayTestModule } from '../../../test.module'; +import { UserMgmtDetailComponent } from 'app/admin/user-management/user-management-detail.component'; +import { User } from 'app/core'; + +describe('Component Tests', () => { + describe('User Management Detail Component', () => { + let comp: UserMgmtDetailComponent; + let fixture: ComponentFixture; + const route = ({ + data: of({ user: new User(1, 'user', 'first', 'last', 'first@last.com', true, 'en', ['ROLE_USER'], 'admin', null, null, null) }) + } as any) as ActivatedRoute; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [UserMgmtDetailComponent], + providers: [ + { + provide: ActivatedRoute, + useValue: route + } + ] + }) + .overrideTemplate(UserMgmtDetailComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(UserMgmtDetailComponent); + comp = fixture.componentInstance; + }); + + describe('OnInit', () => { + it('Should call load all on init', () => { + // GIVEN + + // WHEN + comp.ngOnInit(); + + // THEN + expect(comp.user).toEqual( + jasmine.objectContaining({ + id: 1, + login: 'user', + firstName: 'first', + lastName: 'last', + email: 'first@last.com', + activated: true, + langKey: 'en', + authorities: ['ROLE_USER'], + createdBy: 'admin', + createdDate: null, + lastModifiedBy: null, + lastModifiedDate: null, + password: null + }) + ); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management-update.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management-update.component.spec.ts new file mode 100644 index 0000000000..80c40f7b29 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management-update.component.spec.ts @@ -0,0 +1,113 @@ +import { ComponentFixture, TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing'; +import { HttpResponse } from '@angular/common/http'; +import { ActivatedRoute } from '@angular/router'; +import { Observable, of } from 'rxjs'; + +import { GatewayTestModule } from '../../../test.module'; +import { UserMgmtUpdateComponent } from 'app/admin/user-management/user-management-update.component'; +import { UserService, User, JhiLanguageHelper } from 'app/core'; + +describe('Component Tests', () => { + describe('User Management Update Component', () => { + let comp: UserMgmtUpdateComponent; + let fixture: ComponentFixture; + let service: UserService; + let mockLanguageHelper: any; + const route = ({ + data: of({ user: new User(1, 'user', 'first', 'last', 'first@last.com', true, 'en', ['ROLE_USER'], 'admin', null, null, null) }) + } as any) as ActivatedRoute; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [UserMgmtUpdateComponent], + providers: [ + { + provide: ActivatedRoute, + useValue: route + } + ] + }) + .overrideTemplate(UserMgmtUpdateComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(UserMgmtUpdateComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(UserService); + mockLanguageHelper = fixture.debugElement.injector.get(JhiLanguageHelper); + }); + + describe('OnInit', () => { + it( + 'Should load authorities and language on init', + inject( + [], + fakeAsync(() => { + // GIVEN + spyOn(service, 'authorities').and.returnValue(of(['USER'])); + + // WHEN + comp.ngOnInit(); + + // THEN + expect(service.authorities).toHaveBeenCalled(); + expect(comp.authorities).toEqual(['USER']); + expect(mockLanguageHelper.getAllSpy).toHaveBeenCalled(); + }) + ) + ); + }); + + describe('save', () => { + it( + 'Should call update service on save for existing user', + inject( + [], + fakeAsync(() => { + // GIVEN + const entity = new User(123); + spyOn(service, 'update').and.returnValue( + of( + new HttpResponse({ + body: entity + }) + ) + ); + comp.user = entity; + // WHEN + comp.save(); + tick(); // simulate async + + // THEN + expect(service.update).toHaveBeenCalledWith(entity); + expect(comp.isSaving).toEqual(false); + }) + ) + ); + + it( + 'Should call create service on save for new user', + inject( + [], + fakeAsync(() => { + // GIVEN + const entity = new User(); + spyOn(service, 'create').and.returnValue(of(new HttpResponse({ body: entity }))); + comp.user = entity; + // WHEN + comp.save(); + tick(); // simulate async + + // THEN + expect(service.create).toHaveBeenCalledWith(entity); + expect(comp.isSaving).toEqual(false); + }) + ) + ); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management.component.spec.ts new file mode 100644 index 0000000000..1088b6102f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/admin/user-management/user-management.component.spec.ts @@ -0,0 +1,93 @@ +import { ComponentFixture, TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing'; +import { Observable, of } from 'rxjs'; +import { HttpHeaders, HttpResponse } from '@angular/common/http'; + +import { GatewayTestModule } from '../../../test.module'; +import { UserMgmtComponent } from 'app/admin/user-management/user-management.component'; +import { UserService, User } from 'app/core'; + +describe('Component Tests', () => { + describe('User Management Component', () => { + let comp: UserMgmtComponent; + let fixture: ComponentFixture; + let service: UserService; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [UserMgmtComponent] + }) + .overrideTemplate(UserMgmtComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(UserMgmtComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(UserService); + }); + + describe('OnInit', () => { + it( + 'Should call load all on init', + inject( + [], + fakeAsync(() => { + // GIVEN + const headers = new HttpHeaders().append('link', 'link;link'); + spyOn(service, 'query').and.returnValue( + of( + new HttpResponse({ + body: [new User(123)], + headers + }) + ) + ); + + // WHEN + comp.ngOnInit(); + tick(); // simulate async + + // THEN + expect(service.query).toHaveBeenCalled(); + expect(comp.users[0]).toEqual(jasmine.objectContaining({ id: 123 })); + }) + ) + ); + }); + + describe('setActive', () => { + it( + 'Should update user and call load all', + inject( + [], + fakeAsync(() => { + // GIVEN + const headers = new HttpHeaders().append('link', 'link;link'); + const user = new User(123); + spyOn(service, 'query').and.returnValue( + of( + new HttpResponse({ + body: [user], + headers + }) + ) + ); + spyOn(service, 'update').and.returnValue(of(new HttpResponse({ status: 200 }))); + + // WHEN + comp.setActive(user, true); + tick(); // simulate async + + // THEN + expect(service.update).toHaveBeenCalledWith(user); + expect(service.query).toHaveBeenCalled(); + expect(comp.users[0]).toEqual(jasmine.objectContaining({ id: 123 })); + }) + ) + ); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/core/user/user.service.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/core/user/user.service.spec.ts new file mode 100644 index 0000000000..eeb97266d4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/core/user/user.service.spec.ts @@ -0,0 +1,66 @@ +import { TestBed } from '@angular/core/testing'; +import { JhiDateUtils } from 'ng-jhipster'; + +import { UserService, User } from 'app/core'; +import { SERVER_API_URL } from 'app/app.constants'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; + +describe('Service Tests', () => { + describe('User Service', () => { + let service: UserService; + let httpMock; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [JhiDateUtils] + }); + + service = TestBed.get(UserService); + httpMock = TestBed.get(HttpTestingController); + }); + + afterEach(() => { + httpMock.verify(); + }); + + describe('Service methods', () => { + it('should call correct URL', () => { + service.find('user').subscribe(() => {}); + + const req = httpMock.expectOne({ method: 'GET' }); + const resourceUrl = SERVER_API_URL + 'uaa/api/users'; + expect(req.request.url).toEqual(`${resourceUrl}/user`); + }); + it('should return User', () => { + service.find('user').subscribe(received => { + expect(received.body.login).toEqual('user'); + }); + + const req = httpMock.expectOne({ method: 'GET' }); + req.flush(new User(1, 'user')); + }); + + it('should return Authorities', () => { + service.authorities().subscribe(_authorities => { + expect(_authorities).toEqual(['ROLE_USER', 'ROLE_ADMIN']); + }); + const req = httpMock.expectOne({ method: 'GET' }); + + req.flush(['ROLE_USER', 'ROLE_ADMIN']); + }); + + it('should propagate not found response', () => { + service.find('user').subscribe(null, (_error: any) => { + expect(_error.status).toEqual(404); + }); + + const req = httpMock.expectOne({ method: 'GET' }); + req.flush('Invalid request parameters', { + status: 404, + statusText: 'Bad Request' + }); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote-delete-dialog.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote-delete-dialog.component.spec.ts new file mode 100644 index 0000000000..3413992166 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote-delete-dialog.component.spec.ts @@ -0,0 +1,55 @@ +/* tslint:disable max-line-length */ +import { ComponentFixture, TestBed, inject, fakeAsync, tick } from '@angular/core/testing'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { Observable, of } from 'rxjs'; +import { JhiEventManager } from 'ng-jhipster'; + +import { GatewayTestModule } from '../../../../test.module'; +import { QuoteDeleteDialogComponent } from 'app/entities/quotes/quote/quote-delete-dialog.component'; +import { QuoteService } from 'app/entities/quotes/quote/quote.service'; + +describe('Component Tests', () => { + describe('Quote Management Delete Component', () => { + let comp: QuoteDeleteDialogComponent; + let fixture: ComponentFixture; + let service: QuoteService; + let mockEventManager: any; + let mockActiveModal: any; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [QuoteDeleteDialogComponent] + }) + .overrideTemplate(QuoteDeleteDialogComponent, '') + .compileComponents(); + fixture = TestBed.createComponent(QuoteDeleteDialogComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(QuoteService); + mockEventManager = fixture.debugElement.injector.get(JhiEventManager); + mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); + }); + + describe('confirmDelete', () => { + it( + 'Should call delete service on confirmDelete', + inject( + [], + fakeAsync(() => { + // GIVEN + spyOn(service, 'delete').and.returnValue(of({})); + + // WHEN + comp.confirmDelete(123); + tick(); + + // THEN + expect(service.delete).toHaveBeenCalledWith(123); + expect(mockActiveModal.dismissSpy).toHaveBeenCalled(); + expect(mockEventManager.broadcastSpy).toHaveBeenCalled(); + }) + ) + ); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote-detail.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote-detail.component.spec.ts new file mode 100644 index 0000000000..446e7bde8e --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote-detail.component.spec.ts @@ -0,0 +1,40 @@ +/* tslint:disable max-line-length */ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { ActivatedRoute } from '@angular/router'; +import { of } from 'rxjs'; + +import { GatewayTestModule } from '../../../../test.module'; +import { QuoteDetailComponent } from 'app/entities/quotes/quote/quote-detail.component'; +import { Quote } from 'app/shared/model/quotes/quote.model'; + +describe('Component Tests', () => { + describe('Quote Management Detail Component', () => { + let comp: QuoteDetailComponent; + let fixture: ComponentFixture; + const route = ({ data: of({ quote: new Quote(123) }) } as any) as ActivatedRoute; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [QuoteDetailComponent], + providers: [{ provide: ActivatedRoute, useValue: route }] + }) + .overrideTemplate(QuoteDetailComponent, '') + .compileComponents(); + fixture = TestBed.createComponent(QuoteDetailComponent); + comp = fixture.componentInstance; + }); + + describe('OnInit', () => { + it('Should call load all on init', () => { + // GIVEN + + // WHEN + comp.ngOnInit(); + + // THEN + expect(comp.quote).toEqual(jasmine.objectContaining({ id: 123 })); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote-update.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote-update.component.spec.ts new file mode 100644 index 0000000000..063d905ef6 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote-update.component.spec.ts @@ -0,0 +1,66 @@ +/* tslint:disable max-line-length */ +import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; +import { HttpResponse } from '@angular/common/http'; +import { Observable, of } from 'rxjs'; + +import { GatewayTestModule } from '../../../../test.module'; +import { QuoteUpdateComponent } from 'app/entities/quotes/quote/quote-update.component'; +import { QuoteService } from 'app/entities/quotes/quote/quote.service'; +import { Quote } from 'app/shared/model/quotes/quote.model'; + +describe('Component Tests', () => { + describe('Quote Management Update Component', () => { + let comp: QuoteUpdateComponent; + let fixture: ComponentFixture; + let service: QuoteService; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [QuoteUpdateComponent] + }) + .overrideTemplate(QuoteUpdateComponent, '') + .compileComponents(); + + fixture = TestBed.createComponent(QuoteUpdateComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(QuoteService); + }); + + describe('save', () => { + it( + 'Should call update service on save for existing entity', + fakeAsync(() => { + // GIVEN + const entity = new Quote(123); + spyOn(service, 'update').and.returnValue(of(new HttpResponse({ body: entity }))); + comp.quote = entity; + // WHEN + comp.save(); + tick(); // simulate async + + // THEN + expect(service.update).toHaveBeenCalledWith(entity); + expect(comp.isSaving).toEqual(false); + }) + ); + + it( + 'Should call create service on save for new entity', + fakeAsync(() => { + // GIVEN + const entity = new Quote(); + spyOn(service, 'create').and.returnValue(of(new HttpResponse({ body: entity }))); + comp.quote = entity; + // WHEN + comp.save(); + tick(); // simulate async + + // THEN + expect(service.create).toHaveBeenCalledWith(entity); + expect(comp.isSaving).toEqual(false); + }) + ); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote.component.spec.ts new file mode 100644 index 0000000000..efadc7a22c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote.component.spec.ts @@ -0,0 +1,138 @@ +/* tslint:disable max-line-length */ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { Observable, of } from 'rxjs'; +import { HttpHeaders, HttpResponse } from '@angular/common/http'; +import { ActivatedRoute, Data } from '@angular/router'; + +import { GatewayTestModule } from '../../../../test.module'; +import { QuoteComponent } from 'app/entities/quotes/quote/quote.component'; +import { QuoteService } from 'app/entities/quotes/quote/quote.service'; +import { Quote } from 'app/shared/model/quotes/quote.model'; + +describe('Component Tests', () => { + describe('Quote Management Component', () => { + let comp: QuoteComponent; + let fixture: ComponentFixture; + let service: QuoteService; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [QuoteComponent], + providers: [ + { + provide: ActivatedRoute, + useValue: { + data: { + subscribe: (fn: (value: Data) => void) => + fn({ + pagingParams: { + predicate: 'id', + reverse: false, + page: 0 + } + }) + } + } + } + ] + }) + .overrideTemplate(QuoteComponent, '') + .compileComponents(); + + fixture = TestBed.createComponent(QuoteComponent); + comp = fixture.componentInstance; + service = fixture.debugElement.injector.get(QuoteService); + }); + + it('Should call load all on init', () => { + // GIVEN + const headers = new HttpHeaders().append('link', 'link;link'); + spyOn(service, 'query').and.returnValue( + of( + new HttpResponse({ + body: [new Quote(123)], + headers + }) + ) + ); + + // WHEN + comp.ngOnInit(); + + // THEN + expect(service.query).toHaveBeenCalled(); + expect(comp.quotes[0]).toEqual(jasmine.objectContaining({ id: 123 })); + }); + + it('should load a page', () => { + // GIVEN + const headers = new HttpHeaders().append('link', 'link;link'); + spyOn(service, 'query').and.returnValue( + of( + new HttpResponse({ + body: [new Quote(123)], + headers + }) + ) + ); + + // WHEN + comp.loadPage(1); + + // THEN + expect(service.query).toHaveBeenCalled(); + expect(comp.quotes[0]).toEqual(jasmine.objectContaining({ id: 123 })); + }); + + it('should not load a page is the page is the same as the previous page', () => { + spyOn(service, 'query').and.callThrough(); + + // WHEN + comp.loadPage(0); + + // THEN + expect(service.query).toHaveBeenCalledTimes(0); + }); + + it('should re-initialize the page', () => { + // GIVEN + const headers = new HttpHeaders().append('link', 'link;link'); + spyOn(service, 'query').and.returnValue( + of( + new HttpResponse({ + body: [new Quote(123)], + headers + }) + ) + ); + + // WHEN + comp.loadPage(1); + comp.clear(); + + // THEN + expect(comp.page).toEqual(0); + expect(service.query).toHaveBeenCalledTimes(2); + expect(comp.quotes[0]).toEqual(jasmine.objectContaining({ id: 123 })); + }); + it('should calculate the sort attribute for an id', () => { + // WHEN + const result = comp.sort(); + + // THEN + expect(result).toEqual(['id,desc']); + }); + + it('should calculate the sort attribute for a non-id attribute', () => { + // GIVEN + comp.predicate = 'name'; + + // WHEN + const result = comp.sort(); + + // THEN + expect(result).toEqual(['name,desc', 'id']); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote.service.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote.service.spec.ts new file mode 100644 index 0000000000..5cb5a57b98 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/entities/quotes/quote/quote.service.spec.ts @@ -0,0 +1,130 @@ +/* tslint:disable max-line-length */ +import { TestBed, getTestBed } from '@angular/core/testing'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; +import { HttpClient, HttpResponse } from '@angular/common/http'; +import { of } from 'rxjs'; +import { take, map } from 'rxjs/operators'; +import * as moment from 'moment'; +import { DATE_TIME_FORMAT } from 'app/shared/constants/input.constants'; +import { QuoteService } from 'app/entities/quotes/quote/quote.service'; +import { IQuote, Quote } from 'app/shared/model/quotes/quote.model'; + +describe('Service Tests', () => { + describe('Quote Service', () => { + let injector: TestBed; + let service: QuoteService; + let httpMock: HttpTestingController; + let elemDefault: IQuote; + let currentDate: moment.Moment; + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule] + }); + injector = getTestBed(); + service = injector.get(QuoteService); + httpMock = injector.get(HttpTestingController); + currentDate = moment(); + + elemDefault = new Quote(0, 'AAAAAAA', 0, currentDate); + }); + + describe('Service methods', async () => { + it('should find an element', async () => { + const returnedFromService = Object.assign( + { + lastTrade: currentDate.format(DATE_TIME_FORMAT) + }, + elemDefault + ); + service + .find(123) + .pipe(take(1)) + .subscribe(resp => expect(resp).toMatchObject({ body: elemDefault })); + + const req = httpMock.expectOne({ method: 'GET' }); + req.flush(JSON.stringify(returnedFromService)); + }); + + it('should create a Quote', async () => { + const returnedFromService = Object.assign( + { + id: 0, + lastTrade: currentDate.format(DATE_TIME_FORMAT) + }, + elemDefault + ); + const expected = Object.assign( + { + lastTrade: currentDate + }, + returnedFromService + ); + service + .create(new Quote(null)) + .pipe(take(1)) + .subscribe(resp => expect(resp).toMatchObject({ body: expected })); + const req = httpMock.expectOne({ method: 'POST' }); + req.flush(JSON.stringify(returnedFromService)); + }); + + it('should update a Quote', async () => { + const returnedFromService = Object.assign( + { + symbol: 'BBBBBB', + price: 1, + lastTrade: currentDate.format(DATE_TIME_FORMAT) + }, + elemDefault + ); + + const expected = Object.assign( + { + lastTrade: currentDate + }, + returnedFromService + ); + service + .update(expected) + .pipe(take(1)) + .subscribe(resp => expect(resp).toMatchObject({ body: expected })); + const req = httpMock.expectOne({ method: 'PUT' }); + req.flush(JSON.stringify(returnedFromService)); + }); + + it('should return a list of Quote', async () => { + const returnedFromService = Object.assign( + { + symbol: 'BBBBBB', + price: 1, + lastTrade: currentDate.format(DATE_TIME_FORMAT) + }, + elemDefault + ); + const expected = Object.assign( + { + lastTrade: currentDate + }, + returnedFromService + ); + service + .query(expected) + .pipe(take(1), map(resp => resp.body)) + .subscribe(body => expect(body).toContainEqual(expected)); + const req = httpMock.expectOne({ method: 'GET' }); + req.flush(JSON.stringify([returnedFromService])); + httpMock.verify(); + }); + + it('should delete a Quote', async () => { + const rxPromise = service.delete(123).subscribe(resp => expect(resp.ok)); + + const req = httpMock.expectOne({ method: 'DELETE' }); + req.flush({ status: 200 }); + }); + }); + + afterEach(() => { + httpMock.verify(); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/shared/alert/alert-error.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/shared/alert/alert-error.component.spec.ts new file mode 100644 index 0000000000..9ffdd49165 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/shared/alert/alert-error.component.spec.ts @@ -0,0 +1,137 @@ +import { ComponentFixture, TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing'; +import { HttpErrorResponse, HttpHeaders } from '@angular/common/http'; +import { JhiAlertService, JhiEventManager } from 'ng-jhipster'; +import { TranslateModule } from '@ngx-translate/core'; + +import { GatewayTestModule } from '../../../test.module'; +import { JhiAlertErrorComponent } from 'app/shared/alert/alert-error.component'; +import { MockAlertService } from '../../../helpers/mock-alert.service'; + +describe('Component Tests', () => { + describe('Alert Error Component', () => { + let comp: JhiAlertErrorComponent; + let fixture: ComponentFixture; + let eventManager: JhiEventManager; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule, TranslateModule.forRoot()], + declarations: [JhiAlertErrorComponent], + providers: [ + JhiEventManager, + { + provide: JhiAlertService, + useClass: MockAlertService + } + ] + }) + .overrideTemplate(JhiAlertErrorComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(JhiAlertErrorComponent); + comp = fixture.componentInstance; + eventManager = fixture.debugElement.injector.get(JhiEventManager); + }); + + describe('Error Handling', () => { + it('Should display an alert on status 0', () => { + // GIVEN + eventManager.broadcast({ name: 'gatewayApp.httpError', content: { status: 0 } }); + // THEN + expect(comp.alerts.length).toBe(1); + expect(comp.alerts[0].msg).toBe('error.server.not.reachable'); + }); + it('Should display an alert on status 404', () => { + // GIVEN + eventManager.broadcast({ name: 'gatewayApp.httpError', content: { status: 404 } }); + // THEN + expect(comp.alerts.length).toBe(1); + expect(comp.alerts[0].msg).toBe('error.url.not.found'); + }); + it('Should display an alert on generic error', () => { + // GIVEN + eventManager.broadcast({ name: 'gatewayApp.httpError', content: { error: { message: 'Error Message' } } }); + eventManager.broadcast({ name: 'gatewayApp.httpError', content: { error: 'Second Error Message' } }); + // THEN + expect(comp.alerts.length).toBe(2); + expect(comp.alerts[0].msg).toBe('Error Message'); + expect(comp.alerts[1].msg).toBe('Second Error Message'); + }); + it('Should display an alert on status 400 for generic error', () => { + // GIVEN + const response = new HttpErrorResponse({ + url: 'http://localhost:8080/api/foos', + headers: new HttpHeaders(), + status: 400, + statusText: 'Bad Request', + error: { + type: 'https://www.jhipster.tech/problem/constraint-violation', + title: 'Bad Request', + status: 400, + path: '/api/foos', + message: 'error.validation' + } + }); + eventManager.broadcast({ name: 'gatewayApp.httpError', content: response }); + // THEN + expect(comp.alerts.length).toBe(1); + expect(comp.alerts[0].msg).toBe('error.validation'); + }); + it('Should display an alert on status 400 for generic error without message', () => { + // GIVEN + const response = new HttpErrorResponse({ + url: 'http://localhost:8080/api/foos', + headers: new HttpHeaders(), + status: 400, + error: 'Bad Request' + }); + eventManager.broadcast({ name: 'gatewayApp.httpError', content: response }); + // THEN + expect(comp.alerts.length).toBe(1); + expect(comp.alerts[0].msg).toBe('Bad Request'); + }); + it('Should display an alert on status 400 for invalid parameters', () => { + // GIVEN + const response = new HttpErrorResponse({ + url: 'http://localhost:8080/api/foos', + headers: new HttpHeaders(), + status: 400, + statusText: 'Bad Request', + error: { + type: 'https://www.jhipster.tech/problem/constraint-violation', + title: 'Method argument not valid', + status: 400, + path: '/api/foos', + message: 'error.validation', + fieldErrors: [{ objectName: 'foo', field: 'minField', message: 'Min' }] + } + }); + eventManager.broadcast({ name: 'gatewayApp.httpError', content: response }); + // THEN + expect(comp.alerts.length).toBe(1); + expect(comp.alerts[0].msg).toBe('error.Size'); + }); + it('Should display an alert on status 400 for error headers', () => { + // GIVEN + const response = new HttpErrorResponse({ + url: 'http://localhost:8080/api/foos', + headers: new HttpHeaders().append('app-error', 'Error Message').append('app-params', 'foo'), + status: 400, + statusText: 'Bad Request', + error: { + status: 400, + message: 'error.validation' + } + }); + eventManager.broadcast({ name: 'gatewayApp.httpError', content: response }); + // THEN + expect(comp.alerts.length).toBe(1); + expect(comp.alerts[0].msg).toBe('Error Message'); + }); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/shared/login/login.component.spec.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/shared/login/login.component.spec.ts new file mode 100644 index 0000000000..1f4002563d --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/app/shared/login/login.component.spec.ts @@ -0,0 +1,165 @@ +import { ComponentFixture, TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing'; +import { Router } from '@angular/router'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { JhiEventManager } from 'ng-jhipster'; + +import { LoginService } from 'app/core/login/login.service'; +import { JhiLoginModalComponent } from 'app/shared/login/login.component'; +import { StateStorageService } from 'app/core/auth/state-storage.service'; +import { GatewayTestModule } from '../../../test.module'; +import { MockLoginService } from '../../../helpers/mock-login.service'; +import { MockStateStorageService } from '../../../helpers/mock-state-storage.service'; + +describe('Component Tests', () => { + describe('LoginComponent', () => { + let comp: JhiLoginModalComponent; + let fixture: ComponentFixture; + let mockLoginService: any; + let mockStateStorageService: any; + let mockRouter: any; + let mockEventManager: any; + let mockActiveModal: any; + + beforeEach( + async(() => { + TestBed.configureTestingModule({ + imports: [GatewayTestModule], + declarations: [JhiLoginModalComponent], + providers: [ + { + provide: LoginService, + useClass: MockLoginService + }, + { + provide: StateStorageService, + useClass: MockStateStorageService + } + ] + }) + .overrideTemplate(JhiLoginModalComponent, '') + .compileComponents(); + }) + ); + + beforeEach(() => { + fixture = TestBed.createComponent(JhiLoginModalComponent); + comp = fixture.componentInstance; + mockLoginService = fixture.debugElement.injector.get(LoginService); + mockStateStorageService = fixture.debugElement.injector.get(StateStorageService); + mockRouter = fixture.debugElement.injector.get(Router); + mockEventManager = fixture.debugElement.injector.get(JhiEventManager); + mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); + }); + + it( + 'should authenticate the user upon login when previous state was set', + inject( + [], + fakeAsync(() => { + // GIVEN + const credentials = { + username: 'admin', + password: 'admin', + rememberMe: true + }; + comp.username = 'admin'; + comp.password = 'admin'; + comp.rememberMe = true; + comp.credentials = credentials; + mockLoginService.setResponse({}); + mockStateStorageService.setResponse({ redirect: 'dummy' }); + + // WHEN/ + comp.login(); + tick(); // simulate async + + // THEN + expect(comp.authenticationError).toEqual(false); + expect(mockActiveModal.dismissSpy).toHaveBeenCalledWith('login success'); + expect(mockEventManager.broadcastSpy).toHaveBeenCalledTimes(1); + expect(mockLoginService.loginSpy).toHaveBeenCalledWith(credentials); + expect(mockStateStorageService.getUrlSpy).toHaveBeenCalledTimes(1); + expect(mockStateStorageService.storeUrlSpy).toHaveBeenCalledWith(null); + expect(mockRouter.navigateSpy).toHaveBeenCalledWith([{ redirect: 'dummy' }]); + }) + ) + ); + + it( + 'should authenticate the user upon login when previous state was not set', + inject( + [], + fakeAsync(() => { + // GIVEN + const credentials = { + username: 'admin', + password: 'admin', + rememberMe: true + }; + comp.username = 'admin'; + comp.password = 'admin'; + comp.rememberMe = true; + comp.credentials = credentials; + mockLoginService.setResponse({}); + mockStateStorageService.setResponse(null); + + // WHEN + comp.login(); + tick(); // simulate async + + // THEN + expect(comp.authenticationError).toEqual(false); + expect(mockActiveModal.dismissSpy).toHaveBeenCalledWith('login success'); + expect(mockEventManager.broadcastSpy).toHaveBeenCalledTimes(1); + expect(mockLoginService.loginSpy).toHaveBeenCalledWith(credentials); + expect(mockStateStorageService.getUrlSpy).toHaveBeenCalledTimes(1); + expect(mockStateStorageService.storeUrlSpy).not.toHaveBeenCalled(); + expect(mockRouter.navigateSpy).not.toHaveBeenCalled(); + }) + ) + ); + + it('should empty the credentials upon cancel', () => { + // GIVEN + const credentials = { + username: 'admin', + password: 'admin', + rememberMe: true + }; + + const expected = { + username: null, + password: null, + rememberMe: true + }; + + comp.credentials = credentials; + + // WHEN + comp.cancel(); + + // THEN + expect(comp.authenticationError).toEqual(false); + expect(comp.credentials).toEqual(expected); + expect(mockActiveModal.dismissSpy).toHaveBeenCalledWith('cancel'); + }); + + it('should redirect user when register', () => { + // WHEN + comp.register(); + + // THEN + expect(mockActiveModal.dismissSpy).toHaveBeenCalledWith('to state register'); + expect(mockRouter.navigateSpy).toHaveBeenCalledWith(['/register']); + }); + + it('should redirect user when request password', () => { + // WHEN + comp.requestResetPassword(); + + // THEN + expect(mockActiveModal.dismissSpy).toHaveBeenCalledWith('to state requestReset'); + expect(mockRouter.navigateSpy).toHaveBeenCalledWith(['/reset', 'request']); + }); + }); +}); diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-account.service.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-account.service.ts new file mode 100644 index 0000000000..8b3965ff4c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-account.service.ts @@ -0,0 +1,25 @@ +import { SpyObject } from './spyobject'; +import { AccountService } from 'app/core/auth/account.service'; +import Spy = jasmine.Spy; + +export class MockAccountService extends SpyObject { + getSpy: Spy; + saveSpy: Spy; + fakeResponse: any; + + constructor() { + super(AccountService); + + this.fakeResponse = null; + this.getSpy = this.spy('get').andReturn(this); + this.saveSpy = this.spy('save').andReturn(this); + } + + subscribe(callback: any) { + callback(this.fakeResponse); + } + + setResponse(json: any): void { + this.fakeResponse = json; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-active-modal.service.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-active-modal.service.ts new file mode 100644 index 0000000000..8bf0cc966f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-active-modal.service.ts @@ -0,0 +1,12 @@ +import { SpyObject } from './spyobject'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import Spy = jasmine.Spy; + +export class MockActiveModal extends SpyObject { + dismissSpy: Spy; + + constructor() { + super(NgbActiveModal); + this.dismissSpy = this.spy('dismiss').andReturn(this); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-alert.service.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-alert.service.ts new file mode 100644 index 0000000000..87f36c71e2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-alert.service.ts @@ -0,0 +1,11 @@ +import { SpyObject } from './spyobject'; +import { JhiAlertService, JhiAlert } from 'ng-jhipster'; + +export class MockAlertService extends SpyObject { + constructor() { + super(JhiAlertService); + } + addAlert(alertOptions: JhiAlert) { + return alertOptions; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-event-manager.service.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-event-manager.service.ts new file mode 100644 index 0000000000..a71b5d9314 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-event-manager.service.ts @@ -0,0 +1,12 @@ +import { SpyObject } from './spyobject'; +import { JhiEventManager } from 'ng-jhipster'; +import Spy = jasmine.Spy; + +export class MockEventManager extends SpyObject { + broadcastSpy: Spy; + + constructor() { + super(JhiEventManager); + this.broadcastSpy = this.spy('broadcast').andReturn(this); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-language.service.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-language.service.ts new file mode 100644 index 0000000000..0dea7984d2 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-language.service.ts @@ -0,0 +1,36 @@ +import { SpyObject } from './spyobject'; +import { JhiLanguageService } from 'ng-jhipster'; +import { JhiLanguageHelper } from 'app/core/language/language.helper'; +import Spy = jasmine.Spy; + +export class MockLanguageService extends SpyObject { + getCurrentSpy: Spy; + fakeResponse: any; + + constructor() { + super(JhiLanguageService); + + this.fakeResponse = 'en'; + this.getCurrentSpy = this.spy('getCurrent').andReturn(Promise.resolve(this.fakeResponse)); + } + + init() {} + + changeLanguage(languageKey: string) {} + + setLocations(locations: string[]) {} + + addLocation(location: string) {} + + reload() {} +} + +export class MockLanguageHelper extends SpyObject { + getAllSpy: Spy; + + constructor() { + super(JhiLanguageHelper); + + this.getAllSpy = this.spy('getAll').andReturn(Promise.resolve(['en', 'fr'])); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-login.service.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-login.service.ts new file mode 100644 index 0000000000..93a8ca575f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-login.service.ts @@ -0,0 +1,29 @@ +import { SpyObject } from './spyobject'; +import { LoginService } from 'app/core/login/login.service'; +import Spy = jasmine.Spy; + +export class MockLoginService extends SpyObject { + loginSpy: Spy; + logoutSpy: Spy; + registerSpy: Spy; + requestResetPasswordSpy: Spy; + cancelSpy: Spy; + + constructor() { + super(LoginService); + + this.setLoginSpy({}); + this.logoutSpy = this.spy('logout').andReturn(this); + this.registerSpy = this.spy('register').andReturn(this); + this.requestResetPasswordSpy = this.spy('requestResetPassword').andReturn(this); + this.cancelSpy = this.spy('cancel').andReturn(this); + } + + setLoginSpy(json: any) { + this.loginSpy = this.spy('login').andReturn(Promise.resolve(json)); + } + + setResponse(json: any): void { + this.setLoginSpy(json); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-principal.service.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-principal.service.ts new file mode 100644 index 0000000000..cb1f175cd3 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-principal.service.ts @@ -0,0 +1,20 @@ +import { SpyObject } from './spyobject'; +import { Principal } from 'app/core/auth/principal.service'; +import Spy = jasmine.Spy; + +export class MockPrincipal extends SpyObject { + identitySpy: Spy; + + constructor() { + super(Principal); + + this.setIdentitySpy({}); + } + setIdentitySpy(json: any): any { + this.identitySpy = this.spy('identity').andReturn(Promise.resolve(json)); + } + + setResponse(json: any): void { + this.setIdentitySpy(json); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-route.service.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-route.service.ts new file mode 100644 index 0000000000..3465e05524 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-route.service.ts @@ -0,0 +1,29 @@ +import { ActivatedRoute, Router } from '@angular/router'; +import { SpyObject } from './spyobject'; +import { Observable, of } from 'rxjs'; +import Spy = jasmine.Spy; + +export class MockActivatedRoute extends ActivatedRoute { + constructor(parameters?: any) { + super(); + this.queryParams = of(parameters); + this.params = of(parameters); + this.data = of({ + ...parameters, + pagingParams: { + page: 10, + ascending: false, + predicate: 'id' + } + }); + } +} + +export class MockRouter extends SpyObject { + navigateSpy: Spy; + + constructor() { + super(Router); + this.navigateSpy = this.spy('navigate'); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-state-storage.service.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-state-storage.service.ts new file mode 100644 index 0000000000..1398c7b28b --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/mock-state-storage.service.ts @@ -0,0 +1,22 @@ +import { SpyObject } from './spyobject'; +import { StateStorageService } from 'app/core/auth/state-storage.service'; +import Spy = jasmine.Spy; + +export class MockStateStorageService extends SpyObject { + getUrlSpy: Spy; + storeUrlSpy: Spy; + + constructor() { + super(StateStorageService); + this.setUrlSpy({}); + this.storeUrlSpy = this.spy('storeUrl').andReturn(this); + } + + setUrlSpy(json) { + this.getUrlSpy = this.spy('getUrl').andReturn(json); + } + + setResponse(json: any): void { + this.setUrlSpy(json); + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/spyobject.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/spyobject.ts new file mode 100644 index 0000000000..949e067ef5 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/helpers/spyobject.ts @@ -0,0 +1,69 @@ +export interface GuinessCompatibleSpy extends jasmine.Spy { + /** By chaining the spy with and.returnValue, all calls to the function will return a specific + * value. */ + andReturn(val: any): void; + /** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied + * function. */ + andCallFake(fn: Function): GuinessCompatibleSpy; + /** removes all recorded calls */ + reset(); +} + +export class SpyObject { + static stub(object = null, config = null, overrides = null) { + if (!(object instanceof SpyObject)) { + overrides = config; + config = object; + object = new SpyObject(); + } + + const m = {}; + Object.keys(config).forEach(key => (m[key] = config[key])); + Object.keys(overrides).forEach(key => (m[key] = overrides[key])); + Object.keys(m).forEach(key => { + object.spy(key).andReturn(m[key]); + }); + return object; + } + + constructor(type = null) { + if (type) { + Object.keys(type.prototype).forEach(prop => { + let m = null; + try { + m = type.prototype[prop]; + } catch (e) { + // As we are creating spys for abstract classes, + // these classes might have getters that throw when they are accessed. + // As we are only auto creating spys for methods, this + // should not matter. + } + if (typeof m === 'function') { + this.spy(prop); + } + }); + } + } + + spy(name) { + if (!this[name]) { + this[name] = this._createGuinnessCompatibleSpy(name); + } + return this[name]; + } + + prop(name, value) { + this[name] = value; + } + + /** @internal */ + _createGuinnessCompatibleSpy(name): GuinessCompatibleSpy { + const newSpy: GuinessCompatibleSpy = jasmine.createSpy(name); + newSpy.andCallFake = newSpy.and.callFake; + newSpy.andReturn = newSpy.and.returnValue; + newSpy.reset = newSpy.calls.reset; + // revisit return null here (previously needed for rtts_assert). + newSpy.and.returnValue(null); + return newSpy; + } +} diff --git a/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/test.module.ts b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/test.module.ts new file mode 100644 index 0000000000..0f5aa6ffb4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/javascript/spec/test.module.ts @@ -0,0 +1,77 @@ +import { DatePipe } from '@angular/common'; +import { ActivatedRoute, Router } from '@angular/router'; +import { NgModule, ElementRef, Renderer } from '@angular/core'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { JhiLanguageService, JhiDataUtils, JhiDateUtils, JhiEventManager, JhiAlertService, JhiParseLinks } from 'ng-jhipster'; + +import { MockLanguageService, MockLanguageHelper } from './helpers/mock-language.service'; +import { JhiLanguageHelper, Principal, AccountService, LoginModalService } from 'app/core'; +import { MockPrincipal } from './helpers/mock-principal.service'; +import { MockAccountService } from './helpers/mock-account.service'; +import { MockActivatedRoute, MockRouter } from './helpers/mock-route.service'; +import { MockActiveModal } from './helpers/mock-active-modal.service'; +import { MockEventManager } from './helpers/mock-event-manager.service'; + +@NgModule({ + providers: [ + DatePipe, + JhiDataUtils, + JhiDateUtils, + JhiParseLinks, + { + provide: JhiLanguageService, + useClass: MockLanguageService + }, + { + provide: JhiLanguageHelper, + useClass: MockLanguageHelper + }, + { + provide: JhiEventManager, + useClass: MockEventManager + }, + { + provide: NgbActiveModal, + useClass: MockActiveModal + }, + { + provide: ActivatedRoute, + useValue: new MockActivatedRoute({ id: 123 }) + }, + { + provide: Router, + useClass: MockRouter + }, + { + provide: Principal, + useClass: MockPrincipal + }, + { + provide: AccountService, + useClass: MockAccountService + }, + { + provide: LoginModalService, + useValue: null + }, + { + provide: ElementRef, + useValue: null + }, + { + provide: Renderer, + useValue: null + }, + { + provide: JhiAlertService, + useValue: null + }, + { + provide: NgbModal, + useValue: null + } + ], + imports: [HttpClientTestingModule] +}) +export class GatewayTestModule {} diff --git a/jhipster/jhipster-uaa/gateway/src/test/resources/config/application.yml b/jhipster/jhipster-uaa/gateway/src/test/resources/config/application.yml new file mode 100644 index 0000000000..a8aaef6e43 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/resources/config/application.yml @@ -0,0 +1,114 @@ +# =================================================================== +# Spring Boot configuration. +# +# This configuration is used for unit/integration tests. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +eureka: + client: + enabled: false + instance: + appname: gateway + instanceId: gateway:${spring.application.instance-id:${random.value}} + +spring: + application: + name: gateway + cache: + type: simple + datasource: + type: com.zaxxer.hikari.HikariDataSource + url: jdbc:h2:mem:gateway;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE + name: + username: + password: + hikari: + auto-commit: false + jpa: + database-platform: io.github.jhipster.domain.util.FixedH2Dialect + database: H2 + open-in-view: false + show-sql: false + hibernate: + ddl-auto: none + naming: + physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy + implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy + properties: + hibernate.id.new_generator_mappings: true + hibernate.connection.provider_disables_autocommit: true + hibernate.cache.use_second_level_cache: false + hibernate.cache.use_query_cache: false + hibernate.generate_statistics: true + hibernate.hbm2ddl.auto: validate + liquibase: + contexts: test + mail: + host: localhost + messages: + basename: i18n/messages + mvc: + favicon: + enabled: false + thymeleaf: + mode: HTML + + +server: + port: 10344 + address: localhost + +info: + project: + version: #project.version# + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + async: + core-pool-size: 1 + max-pool-size: 50 + queue-capacity: 10000 + # To test logstash appender + logging: + logstash: + enabled: true + host: localhost + port: 5000 + queue-size: 512 + security: + authentication: + jwt: + # This token must be encoded using Base64 (you can type `echo 'secret-key'|base64` on your command line) + base64-secret: + # Token is valid 24 hours + token-validity-in-seconds: 86400 + metrics: # DropWizard Metrics configuration, used by MetricsConfiguration + jmx.enabled: true + logs: # Reports Dropwizard metrics in the logs + enabled: true + report-frequency: 60 # in seconds + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/gateway/src/test/resources/config/bootstrap.yml b/jhipster/jhipster-uaa/gateway/src/test/resources/config/bootstrap.yml new file mode 100644 index 0000000000..11cd6af21c --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/resources/config/bootstrap.yml @@ -0,0 +1,4 @@ +spring: + cloud: + config: + enabled: false diff --git a/jhipster/jhipster-uaa/gateway/src/test/resources/logback.xml b/jhipster/jhipster-uaa/gateway/src/test/resources/logback.xml new file mode 100644 index 0000000000..266d1e88a4 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/src/test/resources/logback.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jhipster/jhipster-uaa/gateway/tsconfig-aot.json b/jhipster/jhipster-uaa/gateway/tsconfig-aot.json new file mode 100644 index 0000000000..16552d03a0 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/tsconfig-aot.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "es2015", + "moduleResolution": "node", + "sourceMap": false, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "removeComments": false, + "noImplicitAny": false, + "suppressImplicitAnyIndexErrors": true, + "skipLibCheck": true, + "outDir": "target/www/app", + "lib": ["es7", "dom"], + "typeRoots": [ + "node_modules/@types" + ], + "baseUrl": "./", + "paths": { + "app/*": ["src/main/webapp/app/*"] + }, + "importHelpers": true + }, + "angularCompilerOptions": { + "genDir": "target/aot", + "skipMetadataEmit" : true, + "fullTemplateTypeCheck": true, + "preserveWhitespaces": true + } +} diff --git a/jhipster/jhipster-uaa/gateway/tsconfig.json b/jhipster/jhipster-uaa/gateway/tsconfig.json new file mode 100644 index 0000000000..e9209830ee --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "removeComments": false, + "noImplicitAny": false, + "skipLibCheck": true, + "suppressImplicitAnyIndexErrors": true, + "outDir": "target/www/app", + "lib": ["es7", "dom"], + "typeRoots": [ + "node_modules/@types" + ], + "baseUrl": "./", + "paths": { + "app/*": ["src/main/webapp/app/*"] + }, + "importHelpers": true, + "allowJs": true + }, + "include": [ + "src/main/webapp/app", + "src/test/javascript/" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/jhipster/jhipster-uaa/gateway/tslint.json b/jhipster/jhipster-uaa/gateway/tslint.json new file mode 100644 index 0000000000..ece05c2c16 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/tslint.json @@ -0,0 +1,122 @@ +{ + "rulesDirectory": [ + "node_modules/codelyzer" + ], + "extends": [ + "tslint-config-prettier" + ], + "rules": { + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "eofline": true, + "forin": true, + "indent": [ + true, + "spaces" + ], + "label-position": true, + "max-line-length": [ + true, + 180 + ], + "member-access": false, + "member-ordering": [ + true, + "static-before-instance", + "variables-before-functions" + ], + "no-arg": true, + "no-bitwise": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-variable": true, + "no-empty": false, + "no-eval": true, + "no-inferrable-types": [true], + "no-shadowed-variable": true, + "no-string-literal": false, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unused-expression": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "quotemark": [ + true, + "single", + "avoid-escape" + ], + "radix": true, + "semicolon": [ + true, + "always", + "ignore-bound-class-methods" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ], + "prefer-const": true, + "arrow-parens": [true, "ban-single-arg-parens"], + "arrow-return-shorthand": [true], + "import-spacing": true, + "no-consecutive-blank-lines": [true], + "object-literal-shorthand": true, + "space-before-function-paren": [true, { + "asyncArrow": "always", + "anonymous": "never", + "constructor": "never", + "method": "never", + "named": "never" + }], + + "directive-selector": [true, "attribute", "jhi", "camelCase"], + "component-selector": [true, "element", "jhi", "kebab-case"], + "use-input-property-decorator": true, + "use-output-property-decorator": true, + "use-host-property-decorator": true, + "no-input-rename": true, + "no-output-rename": true, + "use-life-cycle-interface": true, + "use-pipe-transform-interface": false, + "component-class-suffix": true, + "directive-class-suffix": true + } +} diff --git a/jhipster/jhipster-uaa/gateway/webpack/logo-jhipster.png b/jhipster/jhipster-uaa/gateway/webpack/logo-jhipster.png new file mode 100644 index 0000000000..d8eb48da05 Binary files /dev/null and b/jhipster/jhipster-uaa/gateway/webpack/logo-jhipster.png differ diff --git a/jhipster/jhipster-uaa/gateway/webpack/utils.js b/jhipster/jhipster-uaa/gateway/webpack/utils.js new file mode 100644 index 0000000000..2fce772341 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/webpack/utils.js @@ -0,0 +1,44 @@ +const fs = require('fs'); +const path = require('path'); + +module.exports = { + parseVersion, + root, + isExternalLib +}; + +const parseString = require('xml2js').parseString; +// return the version number from `pom.xml` file +function parseVersion() { + let version = null; + const pomXml = fs.readFileSync('pom.xml', 'utf8'); + parseString(pomXml, (err, result) => { + if (err) { + throw new Error('Failed to parse pom.xml: ' + err); + } + if (result.project.version && result.project.version[0]) { + version = result.project.version[0]; + } else if (result.project.parent && result.project.parent[0] && result.project.parent[0].version && result.project.parent[0].version[0]) { + version = result.project.parent[0].version[0]; + } + }); + if (version === null) { + throw new Error('pom.xml is malformed. No version is defined'); + } + return version; +} + +const _root = path.resolve(__dirname, '..'); + +function root(args) { + args = Array.prototype.slice.call(arguments, 0); + return path.join.apply(path, [_root].concat(args)); +} + +function isExternalLib(module, check = /node_modules/) { + const req = module.userRequest; + if (typeof req !== 'string') { + return false; + } + return req.search(check) >= 0; +} diff --git a/jhipster/jhipster-uaa/gateway/webpack/webpack.common.js b/jhipster/jhipster-uaa/gateway/webpack/webpack.common.js new file mode 100644 index 0000000000..701aff702f --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/webpack/webpack.common.js @@ -0,0 +1,97 @@ +const webpack = require('webpack'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const rxPaths = require('rxjs/_esm5/path-mapping'); +const MergeJsonWebpackPlugin = require("merge-jsons-webpack-plugin"); + +const utils = require('./utils.js'); + +module.exports = (options) => ({ + resolve: { + extensions: ['.ts', '.js'], + modules: ['node_modules'], + alias: { + app: utils.root('src/main/webapp/app/'), + ...rxPaths() + } + }, + stats: { + children: false + }, + module: { + rules: [ + { + test: /\.html$/, + loader: 'html-loader', + options: { + minimize: true, + caseSensitive: true, + removeAttributeQuotes:false, + minifyJS:false, + minifyCSS:false + }, + exclude: ['./src/main/webapp/index.html'] + }, + { + test: /\.(jpe?g|png|gif|svg|woff2?|ttf|eot)$/i, + loader: 'file-loader', + options: { + digest: 'hex', + hash: 'sha512', + name: 'content/[hash].[ext]' + } + }, + { + test: /manifest.webapp$/, + loader: 'file-loader', + options: { + name: 'manifest.webapp' + } + }, + // Ignore warnings about System.import in Angular + { test: /[\/\\]@angular[\/\\].+\.js$/, parser: { system: true } }, + ] + }, + plugins: [ + new webpack.DefinePlugin({ + 'process.env': { + NODE_ENV: `'${options.env}'`, + BUILD_TIMESTAMP: `'${new Date().getTime()}'`, + VERSION: `'${utils.parseVersion()}'`, + DEBUG_INFO_ENABLED: options.env === 'development', + // The root URL for API calls, ending with a '/' - for example: `"https://www.jhipster.tech:8081/myservice/"`. + // If this URL is left empty (""), then it will be relative to the current context. + // If you use an API server, in `prod` mode, you will need to enable CORS + // (see the `jhipster.cors` common JHipster property in the `application-*.yml` configurations) + SERVER_API_URL: `''` + } + }), + new CopyWebpackPlugin([ + { from: './node_modules/swagger-ui/dist/css', to: 'swagger-ui/dist/css' }, + { from: './node_modules/swagger-ui/dist/lib', to: 'swagger-ui/dist/lib' }, + { from: './node_modules/swagger-ui/dist/swagger-ui.min.js', to: 'swagger-ui/dist/swagger-ui.min.js' }, + { from: './src/main/webapp/swagger-ui/', to: 'swagger-ui' }, + { from: './src/main/webapp/content/', to: 'content' }, + { from: './src/main/webapp/favicon.ico', to: 'favicon.ico' }, + { from: './src/main/webapp/manifest.webapp', to: 'manifest.webapp' }, + // jhipster-needle-add-assets-to-webpack - JHipster will add/remove third-party resources in this array + { from: './src/main/webapp/robots.txt', to: 'robots.txt' } + ]), + new MergeJsonWebpackPlugin({ + output: { + groupBy: [ + { pattern: "./src/main/webapp/i18n/en/*.json", fileName: "./i18n/en.json" }, + { pattern: "./src/main/webapp/i18n/fr/*.json", fileName: "./i18n/fr.json" }, + { pattern: "./src/main/webapp/i18n/pt-br/*.json", fileName: "./i18n/pt-br.json" } + // jhipster-needle-i18n-language-webpack - JHipster will add/remove languages in this array + ] + } + }), + new HtmlWebpackPlugin({ + template: './src/main/webapp/index.html', + chunks: ['vendors', 'polyfills', 'global', 'main'], + chunksSortMode: 'manual', + inject: 'body' + }) + ] +}); diff --git a/jhipster/jhipster-uaa/gateway/webpack/webpack.dev.js b/jhipster/jhipster-uaa/gateway/webpack/webpack.dev.js new file mode 100644 index 0000000000..ed3c981706 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/webpack/webpack.dev.js @@ -0,0 +1,150 @@ +const webpack = require('webpack'); +const writeFilePlugin = require('write-file-webpack-plugin'); +const webpackMerge = require('webpack-merge'); +const BrowserSyncPlugin = require('browser-sync-webpack-plugin'); +const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); +const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin'); +const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin'); +const WebpackNotifierPlugin = require('webpack-notifier'); +const path = require('path'); +const sass = require('sass'); + +const utils = require('./utils.js'); +const commonConfig = require('./webpack.common.js'); + +const ENV = 'development'; + +module.exports = (options) => webpackMerge(commonConfig({ env: ENV }), { + devtool: 'eval-source-map', + devServer: { + contentBase: './target/www', + proxy: [{ + context: [ + '/uaa', + '/quotes', + /* jhipster-needle-add-entity-to-webpack - JHipster will add entity api paths here */ + '/api', + '/management', + '/swagger-resources', + '/v2/api-docs', + '/h2-console', + '/auth' + ], + target: `http${options.tls ? 's' : ''}://127.0.0.1:8080`, + secure: false, + changeOrigin: options.tls, + headers: { host: 'localhost:9000' } + }], + stats: options.stats, + watchOptions: { + ignored: /node_modules/ + } + }, + entry: { + polyfills: './src/main/webapp/app/polyfills', + global: './src/main/webapp/content/scss/global.scss', + main: './src/main/webapp/app/app.main' + }, + output: { + path: utils.root('target/www'), + filename: 'app/[name].bundle.js', + chunkFilename: 'app/[id].chunk.js' + }, + module: { + rules: [{ + test: /\.ts$/, + enforce: 'pre', + loader: 'tslint-loader', + exclude: ['node_modules', new RegExp('reflect-metadata\\' + path.sep + 'Reflect\\.ts')] + }, + { + test: /\.ts$/, + use: [ + 'angular2-template-loader', + { + loader: 'cache-loader', + options: { + cacheDirectory: path.resolve('target/cache-loader') + } + }, + { + loader: 'thread-loader', + options: { + // there should be 1 cpu for the fork-ts-checker-webpack-plugin + workers: require('os').cpus().length - 1 + } + }, + { + loader: 'ts-loader', + options: { + transpileOnly: true, + happyPackMode: true + } + }, + 'angular-router-loader' + ], + exclude: ['node_modules'] + }, + { + test: /\.scss$/, + use: ['to-string-loader', 'css-loader', { + loader: 'sass-loader', + options: { implementation: sass } + }], + exclude: /(vendor\.scss|global\.scss)/ + }, + { + test: /(vendor\.scss|global\.scss)/, + use: ['style-loader', 'css-loader', 'postcss-loader', { + loader: 'sass-loader', + options: { implementation: sass } + }] + }, + { + test: /\.css$/, + use: ['to-string-loader', 'css-loader'], + exclude: /(vendor\.css|global\.css)/ + }, + { + test: /(vendor\.css|global\.css)/, + use: ['style-loader', 'css-loader'] + }] + }, + stats: process.env.JHI_DISABLE_WEBPACK_LOGS ? 'none' : options.stats, + plugins: [ + process.env.JHI_DISABLE_WEBPACK_LOGS + ? null + : new SimpleProgressWebpackPlugin({ + format: options.stats === 'minimal' ? 'compact' : 'expanded' + }), + new FriendlyErrorsWebpackPlugin(), + new ForkTsCheckerWebpackPlugin(), + new BrowserSyncPlugin({ + host: 'localhost', + port: 9000, + proxy: { + target: 'http://localhost:9060' + }, + socket: { + clients: { + heartbeatTimeout: 60000 + } + } + }, { + reload: false + }), + new webpack.ContextReplacementPlugin( + /angular(\\|\/)core(\\|\/)/, + path.resolve(__dirname, './src/main/webapp') + ), + new writeFilePlugin(), + new webpack.WatchIgnorePlugin([ + utils.root('src/test'), + ]), + new WebpackNotifierPlugin({ + title: 'JHipster', + contentImage: path.join(__dirname, 'logo-jhipster.png') + }) + ].filter(Boolean), + mode: 'development' +}); diff --git a/jhipster/jhipster-uaa/gateway/webpack/webpack.prod.js b/jhipster/jhipster-uaa/gateway/webpack/webpack.prod.js new file mode 100644 index 0000000000..a9f9627772 --- /dev/null +++ b/jhipster/jhipster-uaa/gateway/webpack/webpack.prod.js @@ -0,0 +1,147 @@ +const webpack = require('webpack'); +const webpackMerge = require('webpack-merge'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); +const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); +const Visualizer = require('webpack-visualizer-plugin'); +const MomentLocalesPlugin = require('moment-locales-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); +const WorkboxPlugin = require('workbox-webpack-plugin'); +const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin; +const path = require('path'); + +const utils = require('./utils.js'); +const commonConfig = require('./webpack.common.js'); + +const ENV = 'production'; +const sass = require('sass'); + +module.exports = webpackMerge(commonConfig({ env: ENV }), { + // Enable source maps. Please note that this will slow down the build. + // You have to enable it in UglifyJSPlugin config below and in tsconfig-aot.json as well + // devtool: 'source-map', + entry: { + polyfills: './src/main/webapp/app/polyfills', + global: './src/main/webapp/content/scss/global.scss', + main: './src/main/webapp/app/app.main' + }, + output: { + path: utils.root('target/classes/public'), + filename: 'app/[name].[hash].bundle.js', + chunkFilename: 'app/[id].[hash].chunk.js' + }, + module: { + rules: [{ + test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/, + loader: '@ngtools/webpack' + }, + { + test: /\.scss$/, + use: ['to-string-loader', 'css-loader', { + loader: 'sass-loader', + options: { implementation: sass } + }], + exclude: /(vendor\.scss|global\.scss)/ + }, + { + test: /(vendor\.scss|global\.scss)/, + use: [ + MiniCssExtractPlugin.loader, + 'css-loader', + 'postcss-loader', + { + loader: 'sass-loader', + options: { implementation: sass } + } + ] + }, + { + test: /\.css$/, + use: ['to-string-loader', 'css-loader'], + exclude: /(vendor\.css|global\.css)/ + }, + { + test: /(vendor\.css|global\.css)/, + use: [ + MiniCssExtractPlugin.loader, + 'css-loader', + 'postcss-loader' + ] + }] + }, + optimization: { + runtimeChunk: false, + splitChunks: { + cacheGroups: { + commons: { + test: /[\\/]node_modules[\\/]/, + name: 'vendors', + chunks: 'all' + } + } + }, + minimizer: [ + new TerserPlugin({ + parallel: true, + cache: true, + terserOptions: { + ie8: false, + // sourceMap: true, // Enable source maps. Please note that this will slow down the build + compress: { + dead_code: true, + warnings: false, + properties: true, + drop_debugger: true, + conditionals: true, + booleans: true, + loops: true, + unused: true, + toplevel: true, + if_return: true, + inline: true, + join_vars: true + }, + output: { + comments: false, + beautify: false, + indent_level: 2 + } + } + }), + new OptimizeCSSAssetsPlugin({}) + ] + }, + plugins: [ + new MiniCssExtractPlugin({ + // Options similar to the same options in webpackOptions.output + // both options are optional + filename: '[name].[contenthash].css', + chunkFilename: '[id].css' + }), + new MomentLocalesPlugin({ + localesToKeep: [ + 'en', + 'fr', + 'pt-br' + // jhipster-needle-i18n-language-moment-webpack - JHipster will add/remove languages in this array + ] + }), + new Visualizer({ + // Webpack statistics in target folder + filename: '../stats.html' + }), + new AngularCompilerPlugin({ + mainPath: utils.root('src/main/webapp/app/app.main.ts'), + tsConfigPath: utils.root('tsconfig-aot.json'), + sourceMap: true + }), + new webpack.LoaderOptionsPlugin({ + minimize: true, + debug: false + }), + new WorkboxPlugin.GenerateSW({ + clientsClaim: true, + skipWaiting: true, + }) + ], + mode: 'production' +}); diff --git a/jhipster/jhipster-uaa/quotes/.editorconfig b/jhipster/jhipster-uaa/quotes/.editorconfig new file mode 100644 index 0000000000..a03599dd04 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/.editorconfig @@ -0,0 +1,24 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] + +# Change these settings to your own preference +indent_style = space +indent_size = 4 + +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[{package,bower}.json] +indent_style = space +indent_size = 2 diff --git a/jhipster/jhipster-uaa/quotes/.gitattributes b/jhipster/jhipster-uaa/quotes/.gitattributes new file mode 100644 index 0000000000..8ab72fe637 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/.gitattributes @@ -0,0 +1,149 @@ +# This file is inspired by https://github.com/alexkaratarakis/gitattributes +# +# Auto detect text files and perform LF normalization +# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +* text=auto + +# The above will handle all files NOT found below +# These files are text and should be normalized (Convert crlf => lf) + +*.bat text eol=crlf +*.coffee text +*.css text +*.cql text +*.df text +*.ejs text +*.html text +*.java text +*.js text +*.json text +*.less text +*.properties text +*.sass text +*.scss text +*.sh text eol=lf +*.sql text +*.txt text +*.ts text +*.xml text +*.yaml text +*.yml text + +# Documents +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.markdown text +*.md text +*.adoc text +*.textile text +*.mustache text +*.csv text +*.tab text +*.tsv text +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +copyright text +*COPYRIGHT* text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as an asset (binary) by default. If you want to treat it as text, +# comment-out the following line and uncomment the line after. +*.svg binary +#*.svg text +*.eps binary + +# These files are binary and should be left untouched +# (binary is a macro for -text -diff) +*.class binary +*.jar binary +*.war binary + +## LINTERS +.csslintrc text +.eslintrc text +.jscsrc text +.jshintrc text +.jshintignore text +.stylelintrc text + +## CONFIGS +*.bowerrc text +*.conf text +*.config text +.editorconfig text +.gitattributes text +.gitconfig text +.gitignore text +.htaccess text +*.npmignore text + +## HEROKU +Procfile text +.slugignore text + +## AUDIO +*.kar binary +*.m4a binary +*.mid binary +*.midi binary +*.mp3 binary +*.ogg binary +*.ra binary + +## VIDEO +*.3gpp binary +*.3gp binary +*.as binary +*.asf binary +*.asx binary +*.fla binary +*.flv binary +*.m4v binary +*.mng binary +*.mov binary +*.mp4 binary +*.mpeg binary +*.mpg binary +*.swc binary +*.swf binary +*.webm binary + +## ARCHIVES +*.7z binary +*.gz binary +*.rar binary +*.tar binary +*.zip binary + +## FONTS +*.ttf binary +*.eot binary +*.otf binary +*.woff binary +*.woff2 binary diff --git a/jhipster/jhipster-uaa/quotes/.gitignore b/jhipster/jhipster-uaa/quotes/.gitignore new file mode 100644 index 0000000000..e746b25ae6 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/.gitignore @@ -0,0 +1,144 @@ +###################### +# Project Specific +###################### +/target/www/** +/src/test/javascript/coverage/ + +###################### +# Node +###################### +/node/ +node_tmp/ +node_modules/ +npm-debug.log.* +/.awcache/* +/.cache-loader/* + +###################### +# SASS +###################### +.sass-cache/ + +###################### +# Eclipse +###################### +*.pydevproject +.project +.metadata +tmp/ +tmp/**/* +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath +.factorypath +/src/main/resources/rebel.xml + +# External tool builders +.externalToolBuilders/** + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + +###################### +# Intellij +###################### +.idea/ +*.iml +*.iws +*.ipr +*.ids +*.orig +classes/ +out/ + +###################### +# Visual Studio Code +###################### +.vscode/ + +###################### +# Maven +###################### +/log/ +/target/ + +###################### +# Gradle +###################### +.gradle/ +/build/ + +###################### +# Package Files +###################### +*.jar +*.war +*.ear +*.db + +###################### +# Windows +###################### +# Windows image file caches +Thumbs.db + +# Folder config file +Desktop.ini + +###################### +# Mac OSX +###################### +.DS_Store +.svn + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +###################### +# Directories +###################### +/bin/ +/deploy/ + +###################### +# Logs +###################### +*.log* + +###################### +# Others +###################### +*.class +*.*~ +*~ +.merge_file* + +###################### +# Gradle Wrapper +###################### +!gradle/wrapper/gradle-wrapper.jar + +###################### +# Maven Wrapper +###################### +!.mvn/wrapper/maven-wrapper.jar + +###################### +# ESLint +###################### +.eslintcache diff --git a/jhipster/jhipster-uaa/quotes/.jhipster/Quote.json b/jhipster/jhipster-uaa/quotes/.jhipster/Quote.json new file mode 100644 index 0000000000..a5305270a1 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/.jhipster/Quote.json @@ -0,0 +1,37 @@ +{ + "fluentMethods": true, + "clientRootFolder": "quotes", + "relationships": [], + "fields": [ + { + "fieldName": "symbol", + "fieldType": "String", + "fieldValidateRules": [ + "required", + "unique" + ] + }, + { + "fieldName": "price", + "fieldType": "BigDecimal", + "fieldValidateRules": [ + "required" + ] + }, + { + "fieldName": "lastTrade", + "fieldType": "ZonedDateTime", + "fieldValidateRules": [ + "required" + ] + } + ], + "changelogDate": "20181019033648", + "dto": "mapstruct", + "searchEngine": false, + "service": "serviceImpl", + "entityTableName": "quote", + "jpaMetamodelFiltering": true, + "pagination": "pagination", + "microserviceName": "quotes" +} diff --git a/jhipster/jhipster-uaa/quotes/.mvn/wrapper/MavenWrapperDownloader.java b/jhipster/jhipster-uaa/quotes/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 0000000000..fa4f7b499f --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,110 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/jhipster/jhipster-uaa/quotes/.mvn/wrapper/maven-wrapper.jar b/jhipster/jhipster-uaa/quotes/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000000..01e6799737 Binary files /dev/null and b/jhipster/jhipster-uaa/quotes/.mvn/wrapper/maven-wrapper.jar differ diff --git a/jhipster/jhipster-uaa/quotes/.mvn/wrapper/maven-wrapper.properties b/jhipster/jhipster-uaa/quotes/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000000..00d32aab1d --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip \ No newline at end of file diff --git a/jhipster/jhipster-uaa/quotes/.yo-rc.json b/jhipster/jhipster-uaa/quotes/.yo-rc.json new file mode 100644 index 0000000000..fb9c05f786 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/.yo-rc.json @@ -0,0 +1,38 @@ +{ + "generator-jhipster": { + "promptValues": { + "packageName": "com.baeldung.jhipster.quotes", + "nativeLanguage": "en" + }, + "jhipsterVersion": "5.4.2", + "applicationType": "microservice", + "baseName": "quotes", + "packageName": "com.baeldung.jhipster.quotes", + "packageFolder": "com/baeldung/jhipster/quotes", + "serverPort": "8081", + "authenticationType": "uaa", + "uaaBaseName": "uaa", + "cacheProvider": "hazelcast", + "enableHibernateCache": true, + "websocket": false, + "databaseType": "sql", + "devDatabaseType": "h2Disk", + "prodDatabaseType": "mysql", + "searchEngine": false, + "messageBroker": false, + "serviceDiscoveryType": "eureka", + "buildTool": "maven", + "enableSwaggerCodegen": false, + "jwtSecretKey": "YTQzODg4YTM4NDU3YTJjMDZiZDczYTI5NThmNGU5Y2Y4ZDcxMjUxMzI1MmI4MmQwM2RmMzYxMzVjYzljN2MzNjcyYjhiNzk3NTVhN2M2NjY1YjVhZjk1YTkyMTI0MGJlODczZDZkNzA5YjAxZThhMDMyMDFkMTgyZjBhYjJkM2Y=", + "enableTranslation": true, + "languages": [ + "en" + ], + "testFrameworks": [], + "jhiPrefix": "jhi", + "clientPackageManager": "npm", + "nativeLanguage": "en", + "skipClient": true, + "skipUserManagement": true + } +} \ No newline at end of file diff --git a/jhipster/jhipster-uaa/quotes/README.md b/jhipster/jhipster-uaa/quotes/README.md new file mode 100644 index 0000000000..7a985ae786 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/README.md @@ -0,0 +1,94 @@ +# quotes +This application was generated using JHipster 5.4.2, you can find documentation and help at [https://www.jhipster.tech/documentation-archive/v5.4.2](https://www.jhipster.tech/documentation-archive/v5.4.2). + +This is a "microservice" application intended to be part of a microservice architecture, please refer to the [Doing microservices with JHipster][] page of the documentation for more information. + +This application is configured for Service Discovery and Configuration with the JHipster-Registry. On launch, it will refuse to start if it is not able to connect to the JHipster-Registry at [http://localhost:8761](http://localhost:8761). For more information, read our documentation on [Service Discovery and Configuration with the JHipster-Registry][]. + +## Development + +To start your application in the dev profile, simply run: + + ./mvnw + + +For further instructions on how to develop with JHipster, have a look at [Using JHipster in development][]. + + + +## Building for production + +To optimize the quotes application for production, run: + + ./mvnw -Pprod clean package + +To ensure everything worked, run: + + java -jar target/*.war + + +Refer to [Using JHipster in production][] for more details. + +## Testing + +To launch your application's tests, run: + + ./mvnw clean test + +For more information, refer to the [Running tests page][]. + +### Code quality + +Sonar is used to analyse code quality. You can start a local Sonar server (accessible on http://localhost:9001) with: + +``` +docker-compose -f src/main/docker/sonar.yml up -d +``` + +Then, run a Sonar analysis: + +``` +./mvnw -Pprod clean test sonar:sonar +``` + +For more information, refer to the [Code quality page][]. + +## Using Docker to simplify development (optional) + +You can use Docker to improve your JHipster development experience. A number of docker-compose configuration are available in the [src/main/docker](src/main/docker) folder to launch required third party services. + +For example, to start a mysql database in a docker container, run: + + docker-compose -f src/main/docker/mysql.yml up -d + +To stop it and remove the container, run: + + docker-compose -f src/main/docker/mysql.yml down + +You can also fully dockerize your application and all the services that it depends on. +To achieve this, first build a docker image of your app by running: + + ./mvnw package -Pprod jib:dockerBuild + +Then run: + + docker-compose -f src/main/docker/app.yml up -d + +For more information refer to [Using Docker and Docker-Compose][], this page also contains information on the docker-compose sub-generator (`jhipster docker-compose`), which is able to generate docker configurations for one or several JHipster applications. + +## Continuous Integration (optional) + +To configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information. + +[JHipster Homepage and latest documentation]: https://www.jhipster.tech +[JHipster 5.4.2 archive]: https://www.jhipster.tech/documentation-archive/v5.4.2 +[Doing microservices with JHipster]: https://www.jhipster.tech/documentation-archive/v5.4.2/microservices-architecture/ +[Using JHipster in development]: https://www.jhipster.tech/documentation-archive/v5.4.2/development/ +[Service Discovery and Configuration with the JHipster-Registry]: https://www.jhipster.tech/documentation-archive/v5.4.2/microservices-architecture/#jhipster-registry +[Using Docker and Docker-Compose]: https://www.jhipster.tech/documentation-archive/v5.4.2/docker-compose +[Using JHipster in production]: https://www.jhipster.tech/documentation-archive/v5.4.2/production/ +[Running tests page]: https://www.jhipster.tech/documentation-archive/v5.4.2/running-tests/ +[Code quality page]: https://www.jhipster.tech/documentation-archive/v5.4.2/code-quality/ +[Setting up Continuous Integration]: https://www.jhipster.tech/documentation-archive/v5.4.2/setting-up-ci/ + + diff --git a/jhipster/jhipster-uaa/quotes/mvnw b/jhipster/jhipster-uaa/quotes/mvnw new file mode 100644 index 0000000000..5551fde8e7 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/jhipster/jhipster-uaa/quotes/mvnw.cmd b/jhipster/jhipster-uaa/quotes/mvnw.cmd new file mode 100644 index 0000000000..e5cfb0ae9e --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/jhipster/jhipster-uaa/quotes/package-lock.json b/jhipster/jhipster-uaa/quotes/package-lock.json new file mode 100644 index 0000000000..aea41979a7 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/package-lock.json @@ -0,0 +1,4409 @@ +{ + "name": "quotes", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@nodelib/fs.stat/-/fs.stat-1.1.2.tgz", + "integrity": "sha512-yprFYuno9FtNsSHVlSWd+nRlmGoAbqbeCwOryP6sC/zoCjhpArcRMYp19EvpSUSizJAlsXEwJv+wcWS9XaXdMw==", + "dev": true + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ansi": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi/-/ansi-0.3.1.tgz", + "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=", + "dev": true + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, + "axios": { + "version": "0.18.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", + "dev": true, + "requires": { + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binaryextensions": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/binaryextensions/-/binaryextensions-2.1.1.tgz", + "integrity": "sha512-XBaoWE9RW8pPdPQNibZsW2zh8TW6gcarXp1FZPwT8Uop8ScSNldJEWf2k9l3HeTqdrEwsOsFcq74RiJECW34yA==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "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" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "chevrotain": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chevrotain/-/chevrotain-4.1.0.tgz", + "integrity": "sha512-iwuK4FOV+vZlvKonoXVw6G+rXJm4jWk17aJFkm6FloVYcVSrAaJLdCdQo+IIyX98jm0WJVcdK9cllRZQpNBnBg==", + "dev": true, + "requires": { + "regexp-to-ast": "0.3.5" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "arr-union": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-table": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-table/-/cli-table-0.3.1.tgz", + "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "dev": true, + "requires": { + "colors": "1.0.3" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + } + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "clone": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cloneable-readable/-/cloneable-readable-1.1.2.tgz", + "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-string": { + "version": "1.5.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-string/-/color-string-1.5.3.tgz", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "colornames": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colornames/-/colornames-1.1.1.tgz", + "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=", + "dev": true + }, + "colors": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colors/-/colors-1.3.2.tgz", + "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==", + "dev": true + }, + "colorspace": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colorspace/-/colorspace-1.1.1.tgz", + "integrity": "sha512-pI3btWyiuz7Ken0BWh9Elzsmv2bM9AhA7psXib4anUXy/orfZ/E0MbQwhSOG/9L8hLlalqrU0UhOuqxW1YjmVw==", + "dev": true, + "requires": { + "color": "3.0.x", + "text-hex": "1.0.x" + } + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.16.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commander/-/commander-2.16.0.tgz", + "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "conf": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/conf/-/conf-2.0.0.tgz", + "integrity": "sha512-iCLzBsGFi8S73EANsEJZz0JnJ/e5VZef/kSaxydYZLAvw0rFNAUx5R7K5leC/CXXR2mZfXWhUvcZOO/dM2D5xg==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "env-paths": "^1.0.0", + "make-dir": "^1.0.0", + "pkg-up": "^2.0.0", + "write-file-atomic": "^2.3.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "dargs": { + "version": "6.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dargs/-/dargs-6.0.0.tgz", + "integrity": "sha512-6lJauzNaI7MiM8EHQWmGj+s3rP5/i1nYs8GAvKrLAx/9dpc9xS/4seFb1ioR39A+kcfu4v3jnEa/EE5qWYnitQ==", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "detect-conflict": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/detect-conflict/-/detect-conflict-1.0.1.tgz", + "integrity": "sha1-CIZXpmqWHAUBnbfEIwiDsca0F24=", + "dev": true + }, + "diagnostics": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/diagnostics/-/diagnostics-1.1.1.tgz", + "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", + "dev": true, + "requires": { + "colorspace": "1.1.x", + "enabled": "1.0.x", + "kuler": "1.0.x" + } + }, + "didyoumean": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/didyoumean/-/didyoumean-1.2.1.tgz", + "integrity": "sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "drange": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", + "dev": true + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "editions": { + "version": "1.3.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/editions/-/editions-1.3.4.tgz", + "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==", + "dev": true + }, + "ejs": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ejs/-/ejs-2.6.1.tgz", + "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", + "dev": true + }, + "enabled": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/enabled/-/enabled-1.0.2.tgz", + "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", + "dev": true, + "requires": { + "env-variable": "0.0.x" + } + }, + "env-paths": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/env-paths/-/env-paths-1.0.0.tgz", + "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=", + "dev": true + }, + "env-variable": { + "version": "0.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/env-variable/-/env-variable-0.0.5.tgz", + "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==", + "dev": true + }, + "error": { + "version": "7.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/error/-/error-7.0.2.tgz", + "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=", + "dev": true, + "requires": { + "string-template": "~0.2.1", + "xtend": "~4.0.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "execa": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-glob": { + "version": "2.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-glob/-/fast-glob-2.2.3.tgz", + "integrity": "sha512-NiX+JXjnx43RzvVFwRWfPKo4U+1BrK5pJPsHQdKMlLoFHrrGktXglQhHliSihWAq+m1z6fHk3uwGHrtRbS9vLA==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.0.1", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.1", + "micromatch": "^3.1.10" + } + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-safe-stringify": { + "version": "2.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", + "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==", + "dev": true + }, + "fecha": { + "version": "2.3.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fecha/-/fecha-2.3.3.tgz", + "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "first-chunk-stream": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", + "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "follow-redirects": { + "version": "1.5.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/follow-redirects/-/follow-redirects-1.5.9.tgz", + "integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==", + "dev": true, + "requires": { + "debug": "=3.1.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + }, + "dependencies": { + "combined-stream": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + } + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-extra": { + "version": "7.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fs-extra/-/fs-extra-7.0.0.tgz", + "integrity": "sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "gauge": { + "version": "1.2.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/gauge/-/gauge-1.2.7.tgz", + "integrity": "sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=", + "dev": true, + "requires": { + "ansi": "^0.3.0", + "has-unicode": "^2.0.0", + "lodash.pad": "^4.1.0", + "lodash.padend": "^4.1.0", + "lodash.padstart": "^4.1.0" + } + }, + "generator-jhipster": { + "version": "5.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/generator-jhipster/-/generator-jhipster-5.4.2.tgz", + "integrity": "sha512-iuTZGPonlMFWrabTC7x27UnCa8sckWFKD7HiwMp2JOYLlLU+BPt0WJWlQ9hJv5JHHx+pe0pUxwEHbi0fSu0Ljw==", + "dev": true, + "requires": { + "axios": "0.18.0", + "chalk": "2.4.1", + "commander": "2.16.0", + "conf": "2.0.0", + "didyoumean": "1.2.1", + "ejs": "2.6.1", + "glob": "7.1.2", + "gulp-filter": "5.1.0", + "insight": "0.10.1", + "jhipster-core": "3.4.0", + "js-object-pretty-print": "0.3.0", + "js-yaml": "3.12.0", + "lodash": "4.17.10", + "meow": "5.0.0", + "mkdirp": "0.5.1", + "os-locale": "2.1.0", + "parse-gitignore": "1.0.1", + "pluralize": "7.0.0", + "prettier": "1.13.7", + "randexp": "0.4.9", + "semver": "5.5.0", + "shelljs": "0.8.2", + "tabtab": "2.2.2", + "through2": "2.0.3", + "uuid": "3.3.2", + "yeoman-environment": "2.3.0", + "yeoman-generator": "3.0.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "gh-got": { + "version": "6.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/gh-got/-/gh-got-6.0.0.tgz", + "integrity": "sha512-F/mS+fsWQMo1zfgG9MD8KWvTWPPzzhuVwY++fhQ5Ggd+0P+CAMHtzMZhNxG+TqGfHDChJKsbh6otfMGqO2AKBw==", + "dev": true, + "requires": { + "got": "^7.0.0", + "is-plain-obj": "^1.1.0" + } + }, + "github-username": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/github-username/-/github-username-4.1.0.tgz", + "integrity": "sha1-y+KABBiDIG2kISrp5LXxacML9Bc=", + "dev": true, + "requires": { + "gh-got": "^6.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "globby": { + "version": "8.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/globby/-/globby-8.0.1.tgz", + "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "got": { + "version": "7.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "grouped-queue": { + "version": "0.3.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/grouped-queue/-/grouped-queue-0.3.3.tgz", + "integrity": "sha1-wWfSpTGcWg4JZO9qJbfC34mWyFw=", + "dev": true, + "requires": { + "lodash": "^4.17.2" + } + }, + "gulp-filter": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/gulp-filter/-/gulp-filter-5.1.0.tgz", + "integrity": "sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM=", + "dev": true, + "requires": { + "multimatch": "^2.0.0", + "plugin-error": "^0.1.2", + "streamfilter": "^1.0.5" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "dev": true, + "requires": { + "ajv": "^5.3.0", + "har-schema": "^2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + } + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inquirer": { + "version": "5.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "insight": { + "version": "0.10.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/insight/-/insight-0.10.1.tgz", + "integrity": "sha512-kLGeYQkh18f8KuC68QKdi0iwUcIaayJVB/STpX7x452/7pAUm1yfG4giJwcxbrTh0zNYtc8kBR+6maLMOzglOQ==", + "dev": true, + "requires": { + "async": "^2.1.4", + "chalk": "^2.3.0", + "conf": "^1.3.1", + "inquirer": "^5.0.0", + "lodash.debounce": "^4.0.8", + "os-name": "^2.0.1", + "request": "^2.74.0", + "tough-cookie": "^2.0.0", + "uuid": "^3.0.0" + }, + "dependencies": { + "conf": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/conf/-/conf-1.4.0.tgz", + "integrity": "sha512-bzlVWS2THbMetHqXKB8ypsXN4DQ/1qopGwNJi1eYbpwesJcd86FBjFciCQX/YwAhp9bM7NVnPFqZ5LpV7gP0Dg==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "env-paths": "^1.0.0", + "make-dir": "^1.0.0", + "pkg-up": "^2.0.0", + "write-file-atomic": "^2.3.0" + } + } + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-scoped": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-scoped/-/is-scoped-1.0.0.tgz", + "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", + "dev": true, + "requires": { + "scoped-regex": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isbinaryfile": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isbinaryfile/-/isbinaryfile-3.0.3.tgz", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "dev": true, + "requires": { + "buffer-alloc": "^1.2.0" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istextorbinary": { + "version": "2.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istextorbinary/-/istextorbinary-2.2.1.tgz", + "integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==", + "dev": true, + "requires": { + "binaryextensions": "2", + "editions": "^1.3.3", + "textextensions": "2" + } + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "jhipster-core": { + "version": "3.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jhipster-core/-/jhipster-core-3.4.0.tgz", + "integrity": "sha512-iVJ6MF4jlpvtVL5gbn9t4Jw27RodjY04SXYSGfTLAzHyQRMmehHLvNq/3DBjVwHgBrDn1u2k17oLGouJus9MhA==", + "dev": true, + "requires": { + "chevrotain": "4.1.0", + "fs-extra": "7.0.0", + "lodash": "4.17.11", + "winston": "3.1.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "js-object-pretty-print": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-object-pretty-print/-/js-object-pretty-print-0.3.0.tgz", + "integrity": "sha1-RnDkUAZu4ezPNRdMfRl/WqOLz3Q=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "kuler": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kuler/-/kuler-1.0.1.tgz", + "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", + "dev": true, + "requires": { + "colornames": "^1.1.1" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "lodash.pad": { + "version": "4.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.pad/-/lodash.pad-4.5.1.tgz", + "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=", + "dev": true + }, + "lodash.padend": { + "version": "4.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.padend/-/lodash.padend-4.6.1.tgz", + "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", + "dev": true + }, + "lodash.padstart": { + "version": "4.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.padstart/-/lodash.padstart-4.6.1.tgz", + "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "logform": { + "version": "1.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/logform/-/logform-1.10.0.tgz", + "integrity": "sha512-em5ojIhU18fIMOw/333mD+ZLE2fis0EzXl1ZwHx4iQzmpQi6odNiY/t+ITNr33JZhT9/KEaH+UPIipr6a9EjWg==", + "dev": true, + "requires": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^2.3.3", + "ms": "^2.1.1", + "triple-beam": "^1.2.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "macos-release": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/macos-release/-/macos-release-1.1.0.tgz", + "integrity": "sha512-mmLbumEYMi5nXReB9js3WGsB8UE6cDBWyIO62Z4DNx6GbRhDxHNjA1MlzSpJ2S2KM1wyiPRA0d19uHWYYvMHjA==", + "dev": true + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "mem-fs": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mem-fs/-/mem-fs-1.1.3.tgz", + "integrity": "sha1-uK6NLj/Lb10/kWXBLUVRoGXZicw=", + "dev": true, + "requires": { + "through2": "^2.0.0", + "vinyl": "^1.1.0", + "vinyl-file": "^2.0.0" + } + }, + "mem-fs-editor": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mem-fs-editor/-/mem-fs-editor-5.1.0.tgz", + "integrity": "sha512-2Yt2GCYEbcotYbIJagmow4gEtHDqzpq5XN94+yAx/NT5+bGqIjkXnm3KCUQfE6kRfScGp9IZknScoGRKu8L78w==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "deep-extend": "^0.6.0", + "ejs": "^2.5.9", + "glob": "^7.0.3", + "globby": "^8.0.1", + "isbinaryfile": "^3.0.2", + "mkdirp": "^0.5.0", + "multimatch": "^2.0.0", + "rimraf": "^2.2.8", + "through2": "^2.0.0", + "vinyl": "^2.0.1" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "meow": { + "version": "5.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" + } + }, + "merge2": { + "version": "1.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/merge2/-/merge2-1.2.3.tgz", + "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "mime-db": { + "version": "1.36.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", + "dev": true + }, + "mime-types": { + "version": "2.1.20", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mime-types/-/mime-types-2.1.20.tgz", + "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "dev": true, + "requires": { + "mime-db": "~1.36.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npmlog/-/npmlog-2.0.4.tgz", + "integrity": "sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI=", + "dev": true, + "requires": { + "ansi": "~0.3.1", + "are-we-there-yet": "~1.1.2", + "gauge": "~1.2.5" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "one-time": { + "version": "0.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/one-time/-/one-time-0.0.4.tgz", + "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "os-name": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-name/-/os-name-2.0.1.tgz", + "integrity": "sha1-uaOGNhwXrjohc27wWZQFyajF3F4=", + "dev": true, + "requires": { + "macos-release": "^1.0.0", + "win-release": "^1.0.0" + } + }, + "os-shim": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-shim/-/os-shim-0.1.3.tgz", + "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-gitignore": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-gitignore/-/parse-gitignore-1.0.1.tgz", + "integrity": "sha512-UGyowyjtx26n65kdAMWhm6/3uy5uSrpcuH7tt+QEVudiBoVS+eqHxD5kbi9oWVRwj7sCzXqwuM+rUGw7earl6A==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "prettier": { + "version": "1.13.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prettier/-/prettier-1.13.7.tgz", + "integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==", + "dev": true + }, + "pretty-bytes": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pretty-bytes/-/pretty-bytes-5.1.0.tgz", + "integrity": "sha512-wa5+qGVg9Yt7PB6rYm3kXlKzgzgivYTLRandezh43jjRqgyDyP+9YxfJpJiLs9yKD1WeU8/OvtToWpW7255FtA==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.1.29", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "randexp": { + "version": "0.4.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/randexp/-/randexp-0.4.9.tgz", + "integrity": "sha512-maAX1cnBkzIZ89O4tSQUOF098xjGMC8N+9vuY/WfHwg87THw6odD2Br35donlj5e6KnB1SB0QBHhTQhhDHuTPQ==", + "dev": true, + "requires": { + "drange": "^1.0.0", + "ret": "^0.2.0" + } + }, + "read-chunk": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-chunk/-/read-chunk-2.1.0.tgz", + "integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=", + "dev": true, + "requires": { + "pify": "^3.0.0", + "safe-buffer": "^5.1.1" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "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" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "regexp-to-ast": { + "version": "0.3.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regexp-to-ast/-/regexp-to-ast-0.3.5.tgz", + "integrity": "sha512-1CJygtdvsfNFwiyjaMLBWtg2tfEqx/jSZ8S6TV+GlNL8kiH8rb4cm5Pb7A/C2BpyM/fA8ZJEudlCwi/jvAY+Ow==", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "request": { + "version": "2.88.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rx": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rx/-/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", + "dev": true + }, + "rxjs": { + "version": "5.5.12", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + }, + "dependencies": { + "ret": { + "version": "0.1.15", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + } + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "scoped-regex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/scoped-regex/-/scoped-regex-1.0.0.tgz", + "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=", + "dev": true + }, + "semver": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shelljs": { + "version": "0.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shelljs/-/shelljs-0.8.2.tgz", + "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spawn-sync": { + "version": "1.0.15", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spawn-sync/-/spawn-sync-1.0.15.tgz", + "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", + "dev": true, + "requires": { + "concat-stream": "^1.4.7", + "os-shim": "^0.1.2" + } + }, + "spdx-correct": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", + "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.15.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sshpk/-/sshpk-1.15.1.tgz", + "integrity": "sha512-mSdgNUaidk+dRU5MhYtN9zebdzF2iG0cNPWy8HG+W8y+fT1JnSkh0fzzpjOa0L7P8i1Rscz38t0h4gPcKz43xA==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "streamfilter": { + "version": "1.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/streamfilter/-/streamfilter-1.0.7.tgz", + "integrity": "sha512-Gk6KZM+yNA1JpW0KzlZIhjo3EaBJDkYfXtYSbOwNIQ7Zd6006E6+sCFlW1NDvFG/vnXhKmw6TJJgiEQg/8lXfQ==", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "string-template": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-bom-stream": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", + "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", + "dev": true, + "requires": { + "first-chunk-stream": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, + "tabtab": { + "version": "2.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tabtab/-/tabtab-2.2.2.tgz", + "integrity": "sha1-egR/FDsBC0y9MfhX6ClhUSy/ThQ=", + "dev": true, + "requires": { + "debug": "^2.2.0", + "inquirer": "^1.0.2", + "lodash.difference": "^4.5.0", + "lodash.uniq": "^4.5.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "npmlog": "^2.0.3", + "object-assign": "^4.1.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "external-editor": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/external-editor/-/external-editor-1.1.1.tgz", + "integrity": "sha1-Etew24UPf/fnCBuvQAVwAGDEYAs=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "spawn-sync": "^1.0.15", + "tmp": "^0.0.29" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "inquirer": { + "version": "1.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inquirer/-/inquirer-1.2.3.tgz", + "integrity": "sha1-TexvMvN+97sLLtPx0aXD9UUHSRg=", + "dev": true, + "requires": { + "ansi-escapes": "^1.1.0", + "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", + "cli-width": "^2.0.0", + "external-editor": "^1.1.0", + "figures": "^1.3.5", + "lodash": "^4.3.0", + "mute-stream": "0.0.6", + "pinkie-promise": "^2.0.0", + "run-async": "^2.2.0", + "rx": "^4.1.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mute-stream": { + "version": "0.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mute-stream/-/mute-stream-0.0.6.tgz", + "integrity": "sha1-SJYrGeFp/R38JAs/HnMXYnu8R9s=", + "dev": true + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "tmp": { + "version": "0.0.29", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tmp/-/tmp-0.0.29.tgz", + "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.1" + } + } + } + }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "textextensions": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/textextensions/-/textextensions-2.2.0.tgz", + "integrity": "sha512-j5EMxnryTvKxwH2Cq+Pb43tsf6sdEgw6Pdwxk83mPaq0ToeFJt6WE4J3s5BqY7vmjlLgkgXvhtXUxo80FyBhCA==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + }, + "triple-beam": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "arr-union": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "untildify": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-file": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vinyl-file/-/vinyl-file-2.0.0.tgz", + "integrity": "sha1-p+v1/779obfRjRQPyweyI++2dRo=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.3.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0", + "strip-bom-stream": "^2.0.0", + "vinyl": "^1.1.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "win-release": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/win-release/-/win-release-1.1.1.tgz", + "integrity": "sha1-X6VeAr58qTTt/BJmVjLoSbcuUgk=", + "dev": true, + "requires": { + "semver": "^5.0.1" + } + }, + "winston": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/winston/-/winston-3.1.0.tgz", + "integrity": "sha512-FsQfEE+8YIEeuZEYhHDk5cILo1HOcWkGwvoidLrDgPog0r4bser1lEIOco2dN9zpDJ1M88hfDgZvxe5z4xNcwg==", + "dev": true, + "requires": { + "async": "^2.6.0", + "diagnostics": "^1.1.1", + "is-stream": "^1.1.0", + "logform": "^1.9.1", + "one-time": "0.0.4", + "readable-stream": "^2.3.6", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.2.0" + } + }, + "winston-transport": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/winston-transport/-/winston-transport-4.2.0.tgz", + "integrity": "sha512-0R1bvFqxSlK/ZKTH86nymOuKv/cT1PQBMuDdA7k7f0S9fM44dNH6bXnuxwXPrN8lefJgtZq08BKdyZ0DZIy/rg==", + "dev": true, + "requires": { + "readable-stream": "^2.3.6", + "triple-beam": "^1.2.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + }, + "yeoman-environment": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yeoman-environment/-/yeoman-environment-2.3.0.tgz", + "integrity": "sha512-PHSAkVOqYdcR+C+Uht1SGC4eVD/9OhygYFkYaI66xF8vKIeS1RNYay+umj2ZrQeJ50tF5Q/RSO6qGDz9y3Ifug==", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "diff": "^3.3.1", + "escape-string-regexp": "^1.0.2", + "globby": "^8.0.1", + "grouped-queue": "^0.3.3", + "inquirer": "^5.2.0", + "is-scoped": "^1.0.0", + "lodash": "^4.17.10", + "log-symbols": "^2.1.0", + "mem-fs": "^1.1.0", + "strip-ansi": "^4.0.0", + "text-table": "^0.2.0", + "untildify": "^3.0.2" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } + } + }, + "yeoman-generator": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yeoman-generator/-/yeoman-generator-3.0.0.tgz", + "integrity": "sha512-aHsNXzkdgAoakZTZsDX7T56wYWYd1O5E/GBIFAVMJLH7TKRr+1MiEJszZQbbCSA+J+lpT743/8L88j35yNdTLQ==", + "dev": true, + "requires": { + "async": "^2.6.0", + "chalk": "^2.3.0", + "cli-table": "^0.3.1", + "cross-spawn": "^6.0.5", + "dargs": "^6.0.0", + "dateformat": "^3.0.3", + "debug": "^3.1.0", + "detect-conflict": "^1.0.0", + "error": "^7.0.2", + "find-up": "^3.0.0", + "github-username": "^4.0.0", + "istextorbinary": "^2.2.1", + "lodash": "^4.17.10", + "make-dir": "^1.1.0", + "mem-fs-editor": "^5.0.0", + "minimist": "^1.2.0", + "pretty-bytes": "^5.1.0", + "read-chunk": "^2.1.0", + "read-pkg-up": "^4.0.0", + "rimraf": "^2.6.2", + "run-async": "^2.0.0", + "shelljs": "^0.8.0", + "text-table": "^0.2.0", + "through2": "^2.0.0", + "yeoman-environment": "^2.0.5" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "p-limit": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-limit/-/p-limit-2.0.0.tgz", + "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + } + } + } + } +} diff --git a/jhipster/jhipster-uaa/quotes/package.json b/jhipster/jhipster-uaa/quotes/package.json new file mode 100644 index 0000000000..797077d9d2 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/package.json @@ -0,0 +1,16 @@ +{ + "name": "quotes", + "version": "0.0.0", + "description": "Description for quotes", + "private": true, + "license": "UNLICENSED", + "cacheDirectories": [ + "node_modules" + ], + "devDependencies": { + "generator-jhipster": "5.4.2" + }, + "engines": { + "node": ">=8.9.0" + } +} diff --git a/jhipster/jhipster-uaa/quotes/pom.xml b/jhipster/jhipster-uaa/quotes/pom.xml new file mode 100644 index 0000000000..9984f009ff --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/pom.xml @@ -0,0 +1,915 @@ + + + 4.0.0 + + com.baeldung.jhipster.quotes + quotes + 0.0.1-SNAPSHOT + war + Quotes + + + + + + + + + + 3.0.0 + 1.8 + 2.12.6 + v8.12.0 + 6.4.1 + UTF-8 + UTF-8 + ${project.build.directory}/test-results + yyyyMMddHHmmss + ${java.version} + ${java.version} + -Djava.security.egd=file:/dev/./urandom -Xmx256m + jdt_apt + false + + + + + + + 2.0.25 + + 2.0.5.RELEASE + + 5.2.17.Final + + 3.22.0-GA + + 3.5.5 + 3.6 + 2.0.1.Final + 1.2.0.Final + + + 3.1.0 + 3.8.0 + 2.10 + 3.0.0-M2 + 3.1.0 + 2.22.0 + 3.2.2 + 0.9.11 + 0.8.2 + 3.4.2 + 3.5.0.1254 + 2.2.5 + + + http://localhost:9001 + src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* + S3437,S4684,UndocumentedApi,BoldAndItalicTagsCheck + + src/main/webapp/app/**/*.* + Web:BoldAndItalicTagsCheck + + src/main/java/**/* + squid:S3437 + + src/main/java/**/* + squid:UndocumentedApi + + src/main/java/**/* + squid:S4684 + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + jacoco + ${project.testresult.directory}/lcov.info + ${project.basedir}/src/main/ + ${project.testresult.directory}/surefire-reports + ${project.basedir}/src/test/ + + + + + + + + io.github.jhipster + jhipster-dependencies + ${jhipster-dependencies.version} + pom + import + + + + + + + + io.github.jhipster + jhipster-framework + + + + org.springframework.boot + spring-boot-starter-cache + + + io.dropwizard.metrics + metrics-core + + + io.dropwizard.metrics + metrics-annotation + + + io.dropwizard.metrics + metrics-json + + + io.dropwizard.metrics + metrics-jvm + + + io.dropwizard.metrics + metrics-servlet + + + io.dropwizard.metrics + metrics-servlets + + + com.fasterxml.jackson.datatype + jackson-datatype-hibernate5 + + + com.fasterxml.jackson.datatype + jackson-datatype-hppc + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + com.fasterxml.jackson.module + jackson-module-afterburner + + + com.h2database + h2 + test + + + com.hazelcast + hazelcast + + + com.hazelcast + hazelcast-hibernate52 + + + com.hazelcast + hazelcast-spring + + + com.jayway.jsonpath + json-path + test + + + + io.springfox + springfox-swagger2 + + + io.springfox + springfox-bean-validators + + + com.mattbertolini + liquibase-slf4j + + + com.ryantenney.metrics + metrics-spring + + + com.zaxxer + HikariCP + + + commons-io + commons-io + + + org.apache.commons + commons-lang3 + + + javax.cache + cache-api + + + mysql + mysql-connector-java + + + org.assertj + assertj-core + test + + + org.hibernate + hibernate-jpamodelgen + ${hibernate.version} + provided + + + org.hibernate + hibernate-envers + + + org.hibernate.validator + hibernate-validator + + + org.liquibase + liquibase-core + + + net.logstash.logback + logstash-logback-encoder + + + org.mapstruct + mapstruct-jdk8 + ${mapstruct.version} + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + provided + + + org.springframework.boot + spring-boot-configuration-processor + provided + + + org.springframework.boot + spring-boot-loader-tools + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-logging + + + org.springframework.boot + spring-boot-starter-mail + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-test + test + + + org.springframework.security + spring-security-test + test + + + org.zalando + problem-spring-web + 0.24.0-RC.0 + + + org.springframework.security.oauth + spring-security-oauth2 + + + org.springframework.security + spring-security-jwt + + + + org.springframework.cloud + spring-cloud-starter + + + org.springframework.cloud + spring-cloud-starter-netflix-ribbon + + + org.springframework.cloud + spring-cloud-starter-netflix-hystrix + + + org.springframework.retry + spring-retry + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + org.springframework.cloud + spring-cloud-starter-config + + + org.springframework.cloud + spring-cloud-security + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.cloud + spring-cloud-spring-service-connector + + + + org.springframework.security + spring-security-data + + + + + + spring-boot:run + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + + org.hibernate + hibernate-jpamodelgen + ${hibernate.version} + + + + + + + org.apache.maven.plugins + maven-eclipse-plugin + ${maven-eclipse-plugin.version} + + true + true + + + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-plugin.version} + + + enforce-versions + + enforce + + + + + + + You are running an older version of Maven. JHipster requires at least Maven ${maven.version} + [${maven.version},) + + + + You are running an incompatible version of Java. JHipster requires JDK ${java.version} + [1.8,1.9) + + + + + + org.apache.maven.plugins + maven-resources-plugin + ${maven-resources-plugin.version} + + + default-resources + validate + + copy-resources + + + target/classes + false + + # + + + + src/main/resources/ + true + + config/*.yml + + + + src/main/resources/ + false + + config/*.yml + + + + + + + docker-resources + verify + + copy-resources + + + target/classes/static/ + + + target/www + false + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + alphabetical + + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + pre-unit-tests + + prepare-agent + + + + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + + + + + post-unit-test + test + + report + + + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + ${project.testresult.directory}/coverage/jacoco + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + org.liquibase + liquibase-maven-plugin + ${liquibase.version} + + src/main/resources/config/liquibase/master.xml + src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml + org.h2.Driver + jdbc:h2:file:./target/h2db/db/quotes + + quotes + + hibernate:spring:com.baeldung.jhipster.quotes.domain?dialect=org.hibernate.dialect.H2Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy + true + debug + + + + org.javassist + javassist + ${javassist.version} + + + org.liquibase.ext + liquibase-hibernate5 + ${liquibase-hibernate5.version} + + + org.springframework.boot + spring-boot-starter-data-jpa + ${spring-boot.version} + + + javax.validation + validation-api + ${validation-api.version} + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + + + repackage + + + + + ${start-class} + true + true + + + + + com.google.cloud.tools + jib-maven-plugin + ${jib-maven-plugin.version} + + + openjdk:8-jre-alpine + + + quotes:latest + + + + sh + + chmod +x /entrypoint.sh && sync && /entrypoint.sh + + + 8081 + 5701/udp + + + ALWAYS + 0 + + true + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.jacoco + + jacoco-maven-plugin + + + ${jacoco-maven-plugin.version} + + + prepare-agent + + + + + + + + + + + + + + + + no-liquibase + + ,no-liquibase + + + + swagger + + ,swagger + + + + tls + + ,tls + + + + dev + + true + + + + org.springframework.boot + spring-boot-starter-undertow + + + org.springframework.boot + spring-boot-devtools + true + + + com.h2database + h2 + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + false + + + + + + + dev${profile.tls}${profile.no-liquibase} + + + + prod + + + org.springframework.boot + spring-boot-starter-undertow + + + + + + maven-clean-plugin + ${maven-clean-plugin.version} + + + + target/www/ + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + false + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + ${start-class} + true + + + + + build-info + + + + + + pl.project13.maven + git-commit-id-plugin + ${git-commit-id-plugin.version} + + + + revision + + + + + false + true + + ^git.commit.id.abbrev$ + ^git.commit.id.describe$ + ^git.branch$ + + + + + + + + prod${profile.swagger}${profile.no-liquibase} + + + + + cc + + + org.springframework.boot + spring-boot-starter-undertow + + + org.springframework.boot + spring-boot-devtools + true + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + false + src/main/webapp/ + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + ${start-class} + true + true + true + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + default-compile + none + + + default-testCompile + none + + + + + net.alchim31.maven + scala-maven-plugin + ${scala-maven-plugin.version} + + + compile + compile + + add-source + compile + + + + test-compile + test-compile + + add-source + testCompile + + + + + incremental + true + ${scala.version} + + + + + + + dev,swagger + + + + + zipkin + + + org.springframework.cloud + spring-cloud-starter-zipkin + + + + + + IDE + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + org.hibernate + hibernate-jpamodelgen + ${hibernate.version} + + + + + + diff --git a/jhipster/jhipster-uaa/quotes/quotes.jh b/jhipster/jhipster-uaa/quotes/quotes.jh new file mode 100644 index 0000000000..daa5698fc4 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/quotes.jh @@ -0,0 +1,13 @@ +// JDL definition for application 'quotes' generated with command 'jhipster export-jdl' + +entity Quote { + symbol String required unique, + price BigDecimal required, + lastTrade ZonedDateTime required +} +dto Quote with mapstruct +paginate Quote with pagination +service Quote with serviceImpl +microservice Quote with quotes +filter Quote +clientRootFolder Quote with quotes diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/.dockerignore b/jhipster/jhipster-uaa/quotes/src/main/docker/.dockerignore new file mode 100644 index 0000000000..b03bdc71ee --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/.dockerignore @@ -0,0 +1,14 @@ +# https://docs.docker.com/engine/reference/builder/#dockerignore-file +classes/ +generated-sources/ +generated-test-sources/ +h2db/ +maven-archiver/ +maven-status/ +reports/ +surefire-reports/ +test-classes/ +test-results/ +www/ +!*.jar +!*.war diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/Dockerfile b/jhipster/jhipster-uaa/quotes/src/main/docker/Dockerfile new file mode 100644 index 0000000000..6c663a2919 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/Dockerfile @@ -0,0 +1,20 @@ +FROM openjdk:8-jre-alpine + +ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ + JHIPSTER_SLEEP=0 \ + JAVA_OPTS="" + +# Add a jhipster user to run our application so that it doesn't need to run as root +RUN adduser -D -s /bin/sh jhipster +WORKDIR /home/jhipster + +ADD entrypoint.sh entrypoint.sh +RUN chmod 755 entrypoint.sh && chown jhipster:jhipster entrypoint.sh +USER jhipster + +ENTRYPOINT ["./entrypoint.sh"] + +EXPOSE 8081 5701/udp + +ADD *.war app.war + diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/app.yml b/jhipster/jhipster-uaa/quotes/src/main/docker/app.yml new file mode 100644 index 0000000000..8c28c83011 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/app.yml @@ -0,0 +1,22 @@ +version: '2' +services: + quotes-app: + image: quotes + environment: + # - _JAVA_OPTIONS=-Xmx512m -Xms256m + - SPRING_PROFILES_ACTIVE=prod,swagger + - EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka + - SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config + - SPRING_DATASOURCE_URL=jdbc:mysql://quotes-mysql:3306/quotes?useUnicode=true&characterEncoding=utf8&useSSL=false + - JHIPSTER_SLEEP=30 # gives time for the JHipster Registry to boot before the application + quotes-mysql: + extends: + file: mysql.yml + service: quotes-mysql + jhipster-registry: + extends: + file: jhipster-registry.yml + service: jhipster-registry + environment: + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_TYPE=native + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_SEARCH_LOCATIONS=file:./central-config/docker-config/ diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/central-server-config/README.md b/jhipster/jhipster-uaa/quotes/src/main/docker/central-server-config/README.md new file mode 100644 index 0000000000..6aab9ffdd5 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/central-server-config/README.md @@ -0,0 +1,7 @@ +# Central configuration sources details + +The JHipster-Registry will use the following directories as its configuration source : +- localhost-config : when running the registry in docker with the jhipster-registry.yml docker-compose file +- docker-config : when running the registry and the app both in docker with the app.yml docker-compose file + +For more info, refer to https://www.jhipster.tech/microservices-architecture/#registry_app_configuration diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/central-server-config/docker-config/application.yml b/jhipster/jhipster-uaa/quotes/src/main/docker/central-server-config/docker-config/application.yml new file mode 100644 index 0000000000..8a973c0a35 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/central-server-config/docker-config/application.yml @@ -0,0 +1,15 @@ +# Common configuration shared between all applications +configserver: + name: Docker JHipster Registry + status: Connected to the JHipster Registry running in Docker + +jhipster: + security: + authentication: + jwt: + secret: my-secret-key-which-should-be-changed-in-production-and-be-base64-encoded + +eureka: + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@jhipster-registry:8761/eureka/ diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/central-server-config/localhost-config/application.yml b/jhipster/jhipster-uaa/quotes/src/main/docker/central-server-config/localhost-config/application.yml new file mode 100644 index 0000000000..db4602e419 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/central-server-config/localhost-config/application.yml @@ -0,0 +1,15 @@ +# Common configuration shared between all applications +configserver: + name: Docker JHipster Registry + status: Connected to the JHipster Registry running in Docker + +jhipster: + security: + authentication: + jwt: + secret: my-secret-key-which-should-be-changed-in-production-and-be-base64-encoded + +eureka: + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@localhost:8761/eureka/ diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/entrypoint.sh b/jhipster/jhipster-uaa/quotes/src/main/docker/entrypoint.sh new file mode 100644 index 0000000000..ccffafb5a4 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} +exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar "${HOME}/app.war" "$@" diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/hazelcast-management-center.yml b/jhipster/jhipster-uaa/quotes/src/main/docker/hazelcast-management-center.yml new file mode 100644 index 0000000000..c7e342303d --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/hazelcast-management-center.yml @@ -0,0 +1,6 @@ +version: '2' +services: + quotes-hazelcast-management-center: + image: hazelcast/management-center:3.9.3 + ports: + - 8180:8080 diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/jhipster-registry.yml b/jhipster/jhipster-uaa/quotes/src/main/docker/jhipster-registry.yml new file mode 100644 index 0000000000..512bc54be6 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/jhipster-registry.yml @@ -0,0 +1,22 @@ +version: '2' +services: + jhipster-registry: + image: jhipster/jhipster-registry:v4.0.4 + volumes: + - ./central-server-config:/central-config + # When run with the "dev" Spring profile, the JHipster Registry will + # read the config from the local filesystem (central-server-config directory) + # When run with the "prod" Spring profile, it will read the configuration from a Git repository + # See https://www.jhipster.tech/microservices-architecture/#registry_app_configuration + environment: + # - _JAVA_OPTIONS=-Xmx512m -Xms256m + - SPRING_PROFILES_ACTIVE=dev,swagger,uaa + - SPRING_SECURITY_USER_PASSWORD=admin + - JHIPSTER_REGISTRY_PASSWORD=admin + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_TYPE=native + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_SEARCH_LOCATIONS=file:./central-config/localhost-config/ + # - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_TYPE=git + # - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_URI=https://github.com/jhipster/jhipster-registry/ + # - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_SEARCH_PATHS=central-config + ports: + - 8761:8761 diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/mysql.yml b/jhipster/jhipster-uaa/quotes/src/main/docker/mysql.yml new file mode 100644 index 0000000000..0c6cccdaba --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/mysql.yml @@ -0,0 +1,13 @@ +version: '2' +services: + quotes-mysql: + image: mysql:5.7.20 + # volumes: + # - ~/volumes/jhipster/quotes/mysql/:/var/lib/mysql/ + environment: + - MYSQL_USER=root + - MYSQL_ALLOW_EMPTY_PASSWORD=yes + - MYSQL_DATABASE=quotes + ports: + - 3306:3306 + command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp diff --git a/jhipster/jhipster-uaa/quotes/src/main/docker/sonar.yml b/jhipster/jhipster-uaa/quotes/src/main/docker/sonar.yml new file mode 100644 index 0000000000..075e5f17f6 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/docker/sonar.yml @@ -0,0 +1,7 @@ +version: '2' +services: + quotes-sonar: + image: sonarqube:7.1-alpine + ports: + - 9001:9000 + - 9092:9092 diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/ApplicationWebXml.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/ApplicationWebXml.java new file mode 100644 index 0000000000..24b9c098c7 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/ApplicationWebXml.java @@ -0,0 +1,21 @@ +package com.baeldung.jhipster.quotes; + +import com.baeldung.jhipster.quotes.config.DefaultProfileUtil; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +/** + * This is a helper Java class that provides an alternative to creating a web.xml. + * This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc. + */ +public class ApplicationWebXml extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + /** + * set a default to use when no profile is configured. + */ + DefaultProfileUtil.addDefaultProfile(application.application()); + return application.sources(QuotesApp.class); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/QuotesApp.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/QuotesApp.java new file mode 100644 index 0000000000..7104bcd5fa --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/QuotesApp.java @@ -0,0 +1,113 @@ +package com.baeldung.jhipster.quotes; + +import com.baeldung.jhipster.quotes.client.OAuth2InterceptedFeignConfiguration; +import com.baeldung.jhipster.quotes.config.ApplicationProperties; +import com.baeldung.jhipster.quotes.config.DefaultProfileUtil; + +import io.github.jhipster.config.JHipsterConstants; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.FilterType; +import org.springframework.core.env.Environment; + +import javax.annotation.PostConstruct; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Arrays; +import java.util.Collection; + +@ComponentScan( + excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = OAuth2InterceptedFeignConfiguration.class) +) +@SpringBootApplication +@EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class}) +@EnableDiscoveryClient +public class QuotesApp { + + private static final Logger log = LoggerFactory.getLogger(QuotesApp.class); + + private final Environment env; + + public QuotesApp(Environment env) { + this.env = env; + } + + /** + * Initializes quotes. + *

+ * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile + *

+ * You can find more information on how profiles work with JHipster on https://www.jhipster.tech/profiles/. + */ + @PostConstruct + public void initApplication() { + Collection activeProfiles = Arrays.asList(env.getActiveProfiles()); + if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { + log.error("You have misconfigured your application! It should not run " + + "with both the 'dev' and 'prod' profiles at the same time."); + } + if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) { + log.error("You have misconfigured your application! It should not " + + "run with both the 'dev' and 'cloud' profiles at the same time."); + } + } + + /** + * Main method, used to run the application. + * + * @param args the command line arguments + */ + public static void main(String[] args) { + SpringApplication app = new SpringApplication(QuotesApp.class); + DefaultProfileUtil.addDefaultProfile(app); + Environment env = app.run(args).getEnvironment(); + logApplicationStartup(env); + } + + private static void logApplicationStartup(Environment env) { + String protocol = "http"; + if (env.getProperty("server.ssl.key-store") != null) { + protocol = "https"; + } + String serverPort = env.getProperty("server.port"); + String contextPath = env.getProperty("server.servlet.context-path"); + if (StringUtils.isBlank(contextPath)) { + contextPath = "/"; + } + String hostAddress = "localhost"; + try { + hostAddress = InetAddress.getLocalHost().getHostAddress(); + } catch (UnknownHostException e) { + log.warn("The host name could not be determined, using `localhost` as fallback"); + } + log.info("\n----------------------------------------------------------\n\t" + + "Application '{}' is running! Access URLs:\n\t" + + "Local: \t\t{}://localhost:{}{}\n\t" + + "External: \t{}://{}:{}{}\n\t" + + "Profile(s): \t{}\n----------------------------------------------------------", + env.getProperty("spring.application.name"), + protocol, + serverPort, + contextPath, + protocol, + hostAddress, + serverPort, + contextPath, + env.getActiveProfiles()); + + String configServerStatus = env.getProperty("configserver.status"); + if (configServerStatus == null) { + configServerStatus = "Not found or not setup for this application"; + } + log.info("\n----------------------------------------------------------\n\t" + + "Config Server: \t{}\n----------------------------------------------------------", configServerStatus); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/aop/logging/LoggingAspect.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/aop/logging/LoggingAspect.java new file mode 100644 index 0000000000..1649384bac --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/aop/logging/LoggingAspect.java @@ -0,0 +1,98 @@ +package com.baeldung.jhipster.quotes.aop.logging; + +import io.github.jhipster.config.JHipsterConstants; + +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.env.Environment; + +import java.util.Arrays; + +/** + * Aspect for logging execution of service and repository Spring components. + * + * By default, it only runs with the "dev" profile. + */ +@Aspect +public class LoggingAspect { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + private final Environment env; + + public LoggingAspect(Environment env) { + this.env = env; + } + + /** + * Pointcut that matches all repositories, services and Web REST endpoints. + */ + @Pointcut("within(@org.springframework.stereotype.Repository *)" + + " || within(@org.springframework.stereotype.Service *)" + + " || within(@org.springframework.web.bind.annotation.RestController *)") + public void springBeanPointcut() { + // Method is empty as this is just a Pointcut, the implementations are in the advices. + } + + /** + * Pointcut that matches all Spring beans in the application's main packages. + */ + @Pointcut("within(com.baeldung.jhipster.quotes.repository..*)"+ + " || within(com.baeldung.jhipster.quotes.service..*)"+ + " || within(com.baeldung.jhipster.quotes.web.rest..*)") + public void applicationPackagePointcut() { + // Method is empty as this is just a Pointcut, the implementations are in the advices. + } + + /** + * Advice that logs methods throwing exceptions. + * + * @param joinPoint join point for advice + * @param e exception + */ + @AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e") + public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { + log.error("Exception in {}.{}() with cause = \'{}\' and exception = \'{}\'", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL", e.getMessage(), e); + + } else { + log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL"); + } + } + + /** + * Advice that logs when a method is entered and exited. + * + * @param joinPoint join point for advice + * @return result + * @throws Throwable throws IllegalArgumentException + */ + @Around("applicationPackagePointcut() && springBeanPointcut()") + public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { + if (log.isDebugEnabled()) { + log.debug("Enter: {}.{}() with argument[s] = {}", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs())); + } + try { + Object result = joinPoint.proceed(); + if (log.isDebugEnabled()) { + log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), result); + } + return result; + } catch (IllegalArgumentException e) { + log.error("Illegal argument: {} in {}.{}()", Arrays.toString(joinPoint.getArgs()), + joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName()); + + throw e; + } + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/AuthorizedFeignClient.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/AuthorizedFeignClient.java new file mode 100644 index 0000000000..3fad4533a8 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/AuthorizedFeignClient.java @@ -0,0 +1,51 @@ +package com.baeldung.jhipster.quotes.client; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.FeignClientsConfiguration; +import org.springframework.core.annotation.AliasFor; + +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Documented +@FeignClient +public @interface AuthorizedFeignClient { + + @AliasFor(annotation = FeignClient.class, attribute = "name") + String name() default ""; + + /** + * A custom @Configuration for the feign client. + * + * Can contain override @Bean definition for the pieces that + * make up the client, for instance {@link feign.codec.Decoder}, + * {@link feign.codec.Encoder}, {@link feign.Contract}. + * + * @see FeignClientsConfiguration for the defaults + */ + @AliasFor(annotation = FeignClient.class, attribute = "configuration") + Class[] configuration() default OAuth2InterceptedFeignConfiguration.class; + + /** + * An absolute URL or resolvable hostname (the protocol is optional). + */ + String url() default ""; + + /** + * Whether 404s should be decoded instead of throwing FeignExceptions. + */ + boolean decode404() default false; + + /** + * Fallback class for the specified Feign client interface. The fallback class must + * implement the interface annotated by this annotation and be a valid Spring bean. + */ + Class fallback() default void.class; + + /** + * Path prefix to be used by all method-level mappings. Can be used with or without + * @RibbonClient. + */ + String path() default ""; +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/AuthorizedUserFeignClient.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/AuthorizedUserFeignClient.java new file mode 100644 index 0000000000..5f40c2257d --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/AuthorizedUserFeignClient.java @@ -0,0 +1,49 @@ +package com.baeldung.jhipster.quotes.client; + +import java.lang.annotation.*; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.FeignClientsConfiguration; +import org.springframework.core.annotation.AliasFor; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Documented +@FeignClient +public @interface AuthorizedUserFeignClient { + + @AliasFor(annotation = FeignClient.class, attribute = "name") + String name() default ""; + + /** + * A custom @Configuration for the feign client. + * + * Can contain override @Bean definition for the pieces that make up the client, for instance {@link + * feign.codec.Decoder}, {@link feign.codec.Encoder}, {@link feign.Contract}. + * + * @see FeignClientsConfiguration for the defaults + */ + @AliasFor(annotation = FeignClient.class, attribute = "configuration") + Class[] configuration() default OAuth2UserClientFeignConfiguration.class; + + /** + * An absolute URL or resolvable hostname (the protocol is optional). + */ + String url() default ""; + + /** + * Whether 404s should be decoded instead of throwing FeignExceptions. + */ + boolean decode404() default false; + + /** + * Fallback class for the specified Feign client interface. The fallback class must implement the interface + * annotated by this annotation and be a valid Spring bean. + */ + Class fallback() default void.class; + + /** + * Path prefix to be used by all method-level mappings. Can be used with or without @RibbonClient. + */ + String path() default ""; +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/OAuth2InterceptedFeignConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/OAuth2InterceptedFeignConfiguration.java new file mode 100644 index 0000000000..4f60051e3d --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/OAuth2InterceptedFeignConfiguration.java @@ -0,0 +1,24 @@ +package com.baeldung.jhipster.quotes.client; + +import java.io.IOException; + +import org.springframework.cloud.security.oauth2.client.feign.OAuth2FeignRequestInterceptor; +import org.springframework.context.annotation.Bean; +import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext; + +import feign.RequestInterceptor; +import io.github.jhipster.security.uaa.LoadBalancedResourceDetails; + +public class OAuth2InterceptedFeignConfiguration { + + private final LoadBalancedResourceDetails loadBalancedResourceDetails; + + public OAuth2InterceptedFeignConfiguration(LoadBalancedResourceDetails loadBalancedResourceDetails) { + this.loadBalancedResourceDetails = loadBalancedResourceDetails; + } + + @Bean(name = "oauth2RequestInterceptor") + public RequestInterceptor getOAuth2RequestInterceptor() throws IOException { + return new OAuth2FeignRequestInterceptor(new DefaultOAuth2ClientContext(), loadBalancedResourceDetails); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/OAuth2UserClientFeignConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/OAuth2UserClientFeignConfiguration.java new file mode 100644 index 0000000000..1b828ac4d2 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/OAuth2UserClientFeignConfiguration.java @@ -0,0 +1,15 @@ +package com.baeldung.jhipster.quotes.client; + +import java.io.IOException; + +import org.springframework.context.annotation.Bean; + +import feign.RequestInterceptor; + +public class OAuth2UserClientFeignConfiguration { + + @Bean(name = "userFeignClientInterceptor") + public RequestInterceptor getUserFeignClientInterceptor() throws IOException { + return new UserFeignClientInterceptor(); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/UserFeignClientInterceptor.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/UserFeignClientInterceptor.java new file mode 100644 index 0000000000..541d1ebfd8 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/client/UserFeignClientInterceptor.java @@ -0,0 +1,29 @@ +package com.baeldung.jhipster.quotes.client; + +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationDetails; + +import feign.RequestInterceptor; +import feign.RequestTemplate; + +public class UserFeignClientInterceptor implements RequestInterceptor{ + + private static final String AUTHORIZATION_HEADER = "Authorization"; + + private static final String BEARER_TOKEN_TYPE = "Bearer"; + + @Override + public void apply(RequestTemplate template) { + + SecurityContext securityContext = SecurityContextHolder.getContext(); + Authentication authentication = securityContext.getAuthentication(); + + if (authentication != null && authentication.getDetails() instanceof OAuth2AuthenticationDetails) { + + OAuth2AuthenticationDetails details = (OAuth2AuthenticationDetails) authentication.getDetails(); + template.header(AUTHORIZATION_HEADER, String.format("%s %s", BEARER_TOKEN_TYPE, details.getTokenValue())); + } + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/ApplicationProperties.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/ApplicationProperties.java new file mode 100644 index 0000000000..fe6d0291ce --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/ApplicationProperties.java @@ -0,0 +1,14 @@ +package com.baeldung.jhipster.quotes.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Properties specific to Quotes. + *

+ * Properties are configured in the application.yml file. + * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. + */ +@ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) +public class ApplicationProperties { + +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/AsyncConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/AsyncConfiguration.java new file mode 100644 index 0000000000..8ab3139915 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/AsyncConfiguration.java @@ -0,0 +1,59 @@ +package com.baeldung.jhipster.quotes.config; + +import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor; +import io.github.jhipster.config.JHipsterProperties; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; +import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.*; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; + +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; + +@Configuration +@EnableAsync +@EnableScheduling +public class AsyncConfiguration implements AsyncConfigurer, SchedulingConfigurer { + + private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); + + private final JHipsterProperties jHipsterProperties; + + public AsyncConfiguration(JHipsterProperties jHipsterProperties) { + this.jHipsterProperties = jHipsterProperties; + } + + @Override + @Bean(name = "taskExecutor") + public Executor getAsyncExecutor() { + log.debug("Creating Async Task Executor"); + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize()); + executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize()); + executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity()); + executor.setThreadNamePrefix("quotes-Executor-"); + return new ExceptionHandlingAsyncTaskExecutor(executor); + } + + @Override + public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { + return new SimpleAsyncUncaughtExceptionHandler(); + } + + @Override + public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { + taskRegistrar.setScheduler(scheduledTaskExecutor()); + } + + @Bean + public Executor scheduledTaskExecutor() { + return Executors.newScheduledThreadPool(jHipsterProperties.getAsync().getCorePoolSize()); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/CacheConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/CacheConfiguration.java new file mode 100644 index 0000000000..c8afb491c1 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/CacheConfiguration.java @@ -0,0 +1,155 @@ +package com.baeldung.jhipster.quotes.config; + +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.JHipsterProperties; + +import com.hazelcast.config.*; +import com.hazelcast.core.HazelcastInstance; +import com.hazelcast.core.Hazelcast; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.web.ServerProperties; + +import org.springframework.cache.CacheManager; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.cloud.client.ServiceInstance; +import org.springframework.cloud.client.discovery.DiscoveryClient; +import org.springframework.cloud.client.serviceregistry.Registration; +import org.springframework.context.annotation.*; +import org.springframework.core.env.Environment; + +import javax.annotation.PreDestroy; + +@Configuration +@EnableCaching +public class CacheConfiguration { + + private final Logger log = LoggerFactory.getLogger(CacheConfiguration.class); + + private final Environment env; + + private final ServerProperties serverProperties; + + private final DiscoveryClient discoveryClient; + + private Registration registration; + + public CacheConfiguration(Environment env, ServerProperties serverProperties, DiscoveryClient discoveryClient) { + this.env = env; + this.serverProperties = serverProperties; + this.discoveryClient = discoveryClient; + } + + @Autowired(required = false) + public void setRegistration(Registration registration) { + this.registration = registration; + } + + @PreDestroy + public void destroy() { + log.info("Closing Cache Manager"); + Hazelcast.shutdownAll(); + } + + @Bean + public CacheManager cacheManager(HazelcastInstance hazelcastInstance) { + log.debug("Starting HazelcastCacheManager"); + CacheManager cacheManager = new com.hazelcast.spring.cache.HazelcastCacheManager(hazelcastInstance); + return cacheManager; + } + + @Bean + public HazelcastInstance hazelcastInstance(JHipsterProperties jHipsterProperties) { + log.debug("Configuring Hazelcast"); + HazelcastInstance hazelCastInstance = Hazelcast.getHazelcastInstanceByName("quotes"); + if (hazelCastInstance != null) { + log.debug("Hazelcast already initialized"); + return hazelCastInstance; + } + Config config = new Config(); + config.setInstanceName("quotes"); + config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); + if (this.registration == null) { + log.warn("No discovery service is set up, Hazelcast cannot create a cluster."); + } else { + // The serviceId is by default the application's name, + // see the "spring.application.name" standard Spring property + String serviceId = registration.getServiceId(); + log.debug("Configuring Hazelcast clustering for instanceId: {}", serviceId); + // In development, everything goes through 127.0.0.1, with a different port + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { + log.debug("Application is running with the \"dev\" profile, Hazelcast " + + "cluster will only work with localhost instances"); + + System.setProperty("hazelcast.local.localAddress", "127.0.0.1"); + config.getNetworkConfig().setPort(serverProperties.getPort() + 5701); + config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true); + for (ServiceInstance instance : discoveryClient.getInstances(serviceId)) { + String clusterMember = "127.0.0.1:" + (instance.getPort() + 5701); + log.debug("Adding Hazelcast (dev) cluster member " + clusterMember); + config.getNetworkConfig().getJoin().getTcpIpConfig().addMember(clusterMember); + } + } else { // Production configuration, one host per instance all using port 5701 + config.getNetworkConfig().setPort(5701); + config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true); + for (ServiceInstance instance : discoveryClient.getInstances(serviceId)) { + String clusterMember = instance.getHost() + ":5701"; + log.debug("Adding Hazelcast (prod) cluster member " + clusterMember); + config.getNetworkConfig().getJoin().getTcpIpConfig().addMember(clusterMember); + } + } + } + config.getMapConfigs().put("default", initializeDefaultMapConfig(jHipsterProperties)); + + // Full reference is available at: http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html + config.setManagementCenterConfig(initializeDefaultManagementCenterConfig(jHipsterProperties)); + config.getMapConfigs().put("com.baeldung.jhipster.quotes.domain.*", initializeDomainMapConfig(jHipsterProperties)); + return Hazelcast.newHazelcastInstance(config); + } + + private ManagementCenterConfig initializeDefaultManagementCenterConfig(JHipsterProperties jHipsterProperties) { + ManagementCenterConfig managementCenterConfig = new ManagementCenterConfig(); + managementCenterConfig.setEnabled(jHipsterProperties.getCache().getHazelcast().getManagementCenter().isEnabled()); + managementCenterConfig.setUrl(jHipsterProperties.getCache().getHazelcast().getManagementCenter().getUrl()); + managementCenterConfig.setUpdateInterval(jHipsterProperties.getCache().getHazelcast().getManagementCenter().getUpdateInterval()); + return managementCenterConfig; + } + + private MapConfig initializeDefaultMapConfig(JHipsterProperties jHipsterProperties) { + MapConfig mapConfig = new MapConfig(); + + /* + Number of backups. If 1 is set as the backup-count for example, + then all entries of the map will be copied to another JVM for + fail-safety. Valid numbers are 0 (no backup), 1, 2, 3. + */ + mapConfig.setBackupCount(jHipsterProperties.getCache().getHazelcast().getBackupCount()); + + /* + Valid values are: + NONE (no eviction), + LRU (Least Recently Used), + LFU (Least Frequently Used). + NONE is the default. + */ + mapConfig.setEvictionPolicy(EvictionPolicy.LRU); + + /* + Maximum size of the map. When max size is reached, + map is evicted based on the policy defined. + Any integer between 0 and Integer.MAX_VALUE. 0 means + Integer.MAX_VALUE. Default is 0. + */ + mapConfig.setMaxSizeConfig(new MaxSizeConfig(0, MaxSizeConfig.MaxSizePolicy.USED_HEAP_SIZE)); + + return mapConfig; + } + + private MapConfig initializeDomainMapConfig(JHipsterProperties jHipsterProperties) { + MapConfig mapConfig = new MapConfig(); + mapConfig.setTimeToLiveSeconds(jHipsterProperties.getCache().getHazelcast().getTimeToLiveSeconds()); + return mapConfig; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/CloudDatabaseConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/CloudDatabaseConfiguration.java new file mode 100644 index 0000000000..32044187ab --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/CloudDatabaseConfiguration.java @@ -0,0 +1,24 @@ +package com.baeldung.jhipster.quotes.config; + +import io.github.jhipster.config.JHipsterConstants; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cache.CacheManager; +import org.springframework.cloud.config.java.AbstractCloudConfig; +import org.springframework.context.annotation.*; + +import javax.sql.DataSource; + +@Configuration +@Profile(JHipsterConstants.SPRING_PROFILE_CLOUD) +public class CloudDatabaseConfiguration extends AbstractCloudConfig { + + private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class); + + @Bean + public DataSource dataSource(CacheManager cacheManager) { + log.info("Configuring JDBC datasource from a cloud provider"); + return connectionFactory().dataSource(); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/Constants.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/Constants.java new file mode 100644 index 0000000000..6be8ffcf95 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/Constants.java @@ -0,0 +1,17 @@ +package com.baeldung.jhipster.quotes.config; + +/** + * Application constants. + */ +public final class Constants { + + // Regex for acceptable logins + public static final String LOGIN_REGEX = "^[_.@A-Za-z0-9-]*$"; + + public static final String SYSTEM_ACCOUNT = "system"; + public static final String ANONYMOUS_USER = "anonymoususer"; + public static final String DEFAULT_LANGUAGE = "en"; + + private Constants() { + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/DatabaseConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/DatabaseConfiguration.java new file mode 100644 index 0000000000..cb7012cfc8 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/DatabaseConfiguration.java @@ -0,0 +1,39 @@ +package com.baeldung.jhipster.quotes.config; + +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.h2.H2ConfigurationHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; + +import org.springframework.data.jpa.repository.config.EnableJpaAuditing; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +import java.sql.SQLException; + +@Configuration +@EnableJpaRepositories("com.baeldung.jhipster.quotes.repository") +@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware") +@EnableTransactionManagement +public class DatabaseConfiguration { + + private final Logger log = LoggerFactory.getLogger(DatabaseConfiguration.class); + + + /** + * Open the TCP port for the H2 database, so it is available remotely. + * + * @return the H2 database TCP server + * @throws SQLException if the server failed to start + */ + @Bean(initMethod = "start", destroyMethod = "stop") + @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) + public Object h2TCPServer() throws SQLException { + log.debug("Starting H2 database"); + return H2ConfigurationHelper.createServer(); + } + +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/DateTimeFormatConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/DateTimeFormatConfiguration.java new file mode 100644 index 0000000000..1205fdf593 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/DateTimeFormatConfiguration.java @@ -0,0 +1,20 @@ +package com.baeldung.jhipster.quotes.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.format.FormatterRegistry; +import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * Configure the converters to use the ISO format for dates by default. + */ +@Configuration +public class DateTimeFormatConfiguration implements WebMvcConfigurer { + + @Override + public void addFormatters(FormatterRegistry registry) { + DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); + registrar.setUseIsoFormat(true); + registrar.registerFormatters(registry); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/DefaultProfileUtil.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/DefaultProfileUtil.java new file mode 100644 index 0000000000..b029b31b67 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/DefaultProfileUtil.java @@ -0,0 +1,51 @@ +package com.baeldung.jhipster.quotes.config; + +import io.github.jhipster.config.JHipsterConstants; + +import org.springframework.boot.SpringApplication; +import org.springframework.core.env.Environment; + +import java.util.*; + +/** + * Utility class to load a Spring profile to be used as default + * when there is no spring.profiles.active set in the environment or as command line argument. + * If the value is not available in application.yml then dev profile will be used as default. + */ +public final class DefaultProfileUtil { + + private static final String SPRING_PROFILE_DEFAULT = "spring.profiles.default"; + + private DefaultProfileUtil() { + } + + /** + * Set a default to use when no profile is configured. + * + * @param app the Spring application + */ + public static void addDefaultProfile(SpringApplication app) { + Map defProperties = new HashMap<>(); + /* + * The default profile to use when no other profiles are defined + * This cannot be set in the application.yml file. + * See https://github.com/spring-projects/spring-boot/issues/1219 + */ + defProperties.put(SPRING_PROFILE_DEFAULT, JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); + app.setDefaultProperties(defProperties); + } + + /** + * Get the profiles that are applied else get default profiles. + * + * @param env spring environment + * @return profiles + */ + public static String[] getActiveProfiles(Environment env) { + String[] profiles = env.getActiveProfiles(); + if (profiles.length == 0) { + return env.getDefaultProfiles(); + } + return profiles; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/FeignConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/FeignConfiguration.java new file mode 100644 index 0000000000..85c4784a00 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/FeignConfiguration.java @@ -0,0 +1,18 @@ +package com.baeldung.jhipster.quotes.config; + +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +@EnableFeignClients(basePackages = "com.baeldung.jhipster.quotes") +public class FeignConfiguration { + + /** + * Set the Feign specific log level to log client REST requests + */ + @Bean + feign.Logger.Level feignLoggerLevel() { + return feign.Logger.Level.BASIC; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/JacksonConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/JacksonConfiguration.java new file mode 100644 index 0000000000..03747296a2 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/JacksonConfiguration.java @@ -0,0 +1,63 @@ +package com.baeldung.jhipster.quotes.config; + +import com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.module.afterburner.AfterburnerModule; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.zalando.problem.ProblemModule; +import org.zalando.problem.violations.ConstraintViolationProblemModule; + +@Configuration +public class JacksonConfiguration { + + /** + * Support for Java date and time API. + * @return the corresponding Jackson module. + */ + @Bean + public JavaTimeModule javaTimeModule() { + return new JavaTimeModule(); + } + + @Bean + public Jdk8Module jdk8TimeModule() { + return new Jdk8Module(); + } + + + /* + * Support for Hibernate types in Jackson. + */ + @Bean + public Hibernate5Module hibernate5Module() { + return new Hibernate5Module(); + } + + /* + * Jackson Afterburner module to speed up serialization/deserialization. + */ + @Bean + public AfterburnerModule afterburnerModule() { + return new AfterburnerModule(); + } + + /* + * Module for serialization/deserialization of RFC7807 Problem. + */ + @Bean + ProblemModule problemModule() { + return new ProblemModule(); + } + + /* + * Module for serialization/deserialization of ConstraintViolationProblem. + */ + @Bean + ConstraintViolationProblemModule constraintViolationProblemModule() { + return new ConstraintViolationProblemModule(); + } + +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LiquibaseConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LiquibaseConfiguration.java new file mode 100644 index 0000000000..686d6a221e --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LiquibaseConfiguration.java @@ -0,0 +1,53 @@ +package com.baeldung.jhipster.quotes.config; + +import javax.sql.DataSource; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; +import org.springframework.cache.CacheManager; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.core.task.TaskExecutor; + +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.liquibase.AsyncSpringLiquibase; +import liquibase.integration.spring.SpringLiquibase; + +@Configuration +public class LiquibaseConfiguration { + + private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); + + private final Environment env; + + private final CacheManager cacheManager; + + public LiquibaseConfiguration(Environment env, CacheManager cacheManager) { + this.env = env; + this.cacheManager = cacheManager; + } + + @Bean + public SpringLiquibase liquibase(@Qualifier("taskExecutor") TaskExecutor taskExecutor, + DataSource dataSource, LiquibaseProperties liquibaseProperties) { + + // Use liquibase.integration.spring.SpringLiquibase if you don't want Liquibase to start asynchronously + SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env); + liquibase.setDataSource(dataSource); + liquibase.setChangeLog("classpath:config/liquibase/master.xml"); + liquibase.setContexts(liquibaseProperties.getContexts()); + liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); + liquibase.setDropFirst(liquibaseProperties.isDropFirst()); + liquibase.setChangeLogParameters(liquibaseProperties.getParameters()); + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) { + liquibase.setShouldRun(false); + } else { + liquibase.setShouldRun(liquibaseProperties.isEnabled()); + log.debug("Configuring Liquibase"); + } + return liquibase; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LocaleConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LocaleConfiguration.java new file mode 100644 index 0000000000..46ab99a3ea --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LocaleConfiguration.java @@ -0,0 +1,27 @@ +package com.baeldung.jhipster.quotes.config; + +import io.github.jhipster.config.locale.AngularCookieLocaleResolver; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.LocaleResolver; +import org.springframework.web.servlet.config.annotation.*; +import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; + +@Configuration +public class LocaleConfiguration implements WebMvcConfigurer { + + @Bean(name = "localeResolver") + public LocaleResolver localeResolver() { + AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver(); + cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY"); + return cookieLocaleResolver; + } + + @Override + public void addInterceptors(InterceptorRegistry registry) { + LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); + localeChangeInterceptor.setParamName("language"); + registry.addInterceptor(localeChangeInterceptor); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LoggingAspectConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LoggingAspectConfiguration.java new file mode 100644 index 0000000000..1a1eb93eeb --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LoggingAspectConfiguration.java @@ -0,0 +1,19 @@ +package com.baeldung.jhipster.quotes.config; + +import com.baeldung.jhipster.quotes.aop.logging.LoggingAspect; + +import io.github.jhipster.config.JHipsterConstants; + +import org.springframework.context.annotation.*; +import org.springframework.core.env.Environment; + +@Configuration +@EnableAspectJAutoProxy +public class LoggingAspectConfiguration { + + @Bean + @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) + public LoggingAspect loggingAspect(Environment env) { + return new LoggingAspect(env); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LoggingConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LoggingConfiguration.java new file mode 100644 index 0000000000..2739133ffe --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/LoggingConfiguration.java @@ -0,0 +1,163 @@ +package com.baeldung.jhipster.quotes.config; + +import java.net.InetSocketAddress; +import java.util.Iterator; + +import io.github.jhipster.config.JHipsterProperties; + +import ch.qos.logback.classic.AsyncAppender; +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.LoggerContext; +import ch.qos.logback.classic.boolex.OnMarkerEvaluator; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.classic.spi.LoggerContextListener; +import ch.qos.logback.core.Appender; +import ch.qos.logback.core.filter.EvaluatorFilter; +import ch.qos.logback.core.spi.ContextAwareBase; +import ch.qos.logback.core.spi.FilterReply; +import net.logstash.logback.appender.LogstashTcpSocketAppender; +import net.logstash.logback.encoder.LogstashEncoder; +import net.logstash.logback.stacktrace.ShortenedThrowableConverter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cloud.context.config.annotation.RefreshScope; +import org.springframework.context.annotation.Configuration; + +@Configuration +@RefreshScope +public class LoggingConfiguration { + + private static final String LOGSTASH_APPENDER_NAME = "LOGSTASH"; + + private static final String ASYNC_LOGSTASH_APPENDER_NAME = "ASYNC_LOGSTASH"; + + private final Logger log = LoggerFactory.getLogger(LoggingConfiguration.class); + + private LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + + private final String appName; + + private final String serverPort; + + private final String version; + + private final JHipsterProperties jHipsterProperties; + + public LoggingConfiguration(@Value("${spring.application.name}") String appName, @Value("${server.port}") String serverPort, + @Value("${info.project.version:}") String version, JHipsterProperties jHipsterProperties) { + this.appName = appName; + this.serverPort = serverPort; + this.version = version; + this.jHipsterProperties = jHipsterProperties; + if (jHipsterProperties.getLogging().getLogstash().isEnabled()) { + addLogstashAppender(context); + addContextListener(context); + } + if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { + setMetricsMarkerLogbackFilter(context); + } + } + + private void addContextListener(LoggerContext context) { + LogbackLoggerContextListener loggerContextListener = new LogbackLoggerContextListener(); + loggerContextListener.setContext(context); + context.addListener(loggerContextListener); + } + + private void addLogstashAppender(LoggerContext context) { + log.info("Initializing Logstash logging"); + + LogstashTcpSocketAppender logstashAppender = new LogstashTcpSocketAppender(); + logstashAppender.setName(LOGSTASH_APPENDER_NAME); + logstashAppender.setContext(context); + String optionalFields = ""; + String customFields = "{\"app_name\":\"" + appName + "\",\"app_port\":\"" + serverPort + "\"," + + optionalFields + "\"version\":\"" + version + "\"}"; + + // More documentation is available at: https://github.com/logstash/logstash-logback-encoder + LogstashEncoder logstashEncoder = new LogstashEncoder(); + // Set the Logstash appender config from JHipster properties + logstashEncoder.setCustomFields(customFields); + // Set the Logstash appender config from JHipster properties + logstashAppender.addDestinations(new InetSocketAddress(jHipsterProperties.getLogging().getLogstash().getHost(), jHipsterProperties.getLogging().getLogstash().getPort())); + + ShortenedThrowableConverter throwableConverter = new ShortenedThrowableConverter(); + throwableConverter.setRootCauseFirst(true); + logstashEncoder.setThrowableConverter(throwableConverter); + logstashEncoder.setCustomFields(customFields); + + logstashAppender.setEncoder(logstashEncoder); + logstashAppender.start(); + + // Wrap the appender in an Async appender for performance + AsyncAppender asyncLogstashAppender = new AsyncAppender(); + asyncLogstashAppender.setContext(context); + asyncLogstashAppender.setName(ASYNC_LOGSTASH_APPENDER_NAME); + asyncLogstashAppender.setQueueSize(jHipsterProperties.getLogging().getLogstash().getQueueSize()); + asyncLogstashAppender.addAppender(logstashAppender); + asyncLogstashAppender.start(); + + context.getLogger("ROOT").addAppender(asyncLogstashAppender); + } + + // Configure a log filter to remove "metrics" logs from all appenders except the "LOGSTASH" appender + private void setMetricsMarkerLogbackFilter(LoggerContext context) { + log.info("Filtering metrics logs from all appenders except the {} appender", LOGSTASH_APPENDER_NAME); + OnMarkerEvaluator onMarkerMetricsEvaluator = new OnMarkerEvaluator(); + onMarkerMetricsEvaluator.setContext(context); + onMarkerMetricsEvaluator.addMarker("metrics"); + onMarkerMetricsEvaluator.start(); + EvaluatorFilter metricsFilter = new EvaluatorFilter<>(); + metricsFilter.setContext(context); + metricsFilter.setEvaluator(onMarkerMetricsEvaluator); + metricsFilter.setOnMatch(FilterReply.DENY); + metricsFilter.start(); + + for (ch.qos.logback.classic.Logger logger : context.getLoggerList()) { + for (Iterator> it = logger.iteratorForAppenders(); it.hasNext();) { + Appender appender = it.next(); + if (!appender.getName().equals(ASYNC_LOGSTASH_APPENDER_NAME)) { + log.debug("Filter metrics logs from the {} appender", appender.getName()); + appender.setContext(context); + appender.addFilter(metricsFilter); + appender.start(); + } + } + } + } + + /** + * Logback configuration is achieved by configuration file and API. + * When configuration file change is detected, the configuration is reset. + * This listener ensures that the programmatic configuration is also re-applied after reset. + */ + class LogbackLoggerContextListener extends ContextAwareBase implements LoggerContextListener { + + @Override + public boolean isResetResistant() { + return true; + } + + @Override + public void onStart(LoggerContext context) { + addLogstashAppender(context); + } + + @Override + public void onReset(LoggerContext context) { + addLogstashAppender(context); + } + + @Override + public void onStop(LoggerContext context) { + // Nothing to do. + } + + @Override + public void onLevelChange(ch.qos.logback.classic.Logger logger, Level level) { + // Nothing to do. + } + } + +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/MetricsConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/MetricsConfiguration.java new file mode 100644 index 0000000000..8a83d5c31d --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/MetricsConfiguration.java @@ -0,0 +1,99 @@ +package com.baeldung.jhipster.quotes.config; + +import io.github.jhipster.config.JHipsterProperties; + +import com.codahale.metrics.JmxReporter; +import com.codahale.metrics.JvmAttributeGaugeSet; +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.Slf4jReporter; +import com.codahale.metrics.health.HealthCheckRegistry; +import com.codahale.metrics.jvm.*; +import com.ryantenney.metrics.spring.config.annotation.EnableMetrics; +import com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerAdapter; +import com.zaxxer.hikari.HikariDataSource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.*; + +import javax.annotation.PostConstruct; +import java.lang.management.ManagementFactory; +import java.util.concurrent.TimeUnit; + +@Configuration +@EnableMetrics(proxyTargetClass = true) +public class MetricsConfiguration extends MetricsConfigurerAdapter { + + private static final String PROP_METRIC_REG_JVM_MEMORY = "jvm.memory"; + private static final String PROP_METRIC_REG_JVM_GARBAGE = "jvm.garbage"; + private static final String PROP_METRIC_REG_JVM_THREADS = "jvm.threads"; + private static final String PROP_METRIC_REG_JVM_FILES = "jvm.files"; + private static final String PROP_METRIC_REG_JVM_BUFFERS = "jvm.buffers"; + private static final String PROP_METRIC_REG_JVM_ATTRIBUTE_SET = "jvm.attributes"; + + private final Logger log = LoggerFactory.getLogger(MetricsConfiguration.class); + + private MetricRegistry metricRegistry = new MetricRegistry(); + + private HealthCheckRegistry healthCheckRegistry = new HealthCheckRegistry(); + + private final JHipsterProperties jHipsterProperties; + + private HikariDataSource hikariDataSource; + + public MetricsConfiguration(JHipsterProperties jHipsterProperties) { + this.jHipsterProperties = jHipsterProperties; + } + + @Autowired(required = false) + public void setHikariDataSource(HikariDataSource hikariDataSource) { + this.hikariDataSource = hikariDataSource; + } + + @Override + @Bean + public MetricRegistry getMetricRegistry() { + return metricRegistry; + } + + @Override + @Bean + public HealthCheckRegistry getHealthCheckRegistry() { + return healthCheckRegistry; + } + + @PostConstruct + public void init() { + log.debug("Registering JVM gauges"); + metricRegistry.register(PROP_METRIC_REG_JVM_MEMORY, new MemoryUsageGaugeSet()); + metricRegistry.register(PROP_METRIC_REG_JVM_GARBAGE, new GarbageCollectorMetricSet()); + metricRegistry.register(PROP_METRIC_REG_JVM_THREADS, new ThreadStatesGaugeSet()); + metricRegistry.register(PROP_METRIC_REG_JVM_FILES, new FileDescriptorRatioGauge()); + metricRegistry.register(PROP_METRIC_REG_JVM_BUFFERS, new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer())); + metricRegistry.register(PROP_METRIC_REG_JVM_ATTRIBUTE_SET, new JvmAttributeGaugeSet()); + if (hikariDataSource != null) { + log.debug("Monitoring the datasource"); + // remove the factory created by HikariDataSourceMetricsPostProcessor until JHipster migrate to Micrometer + hikariDataSource.setMetricsTrackerFactory(null); + hikariDataSource.setMetricRegistry(metricRegistry); + } + if (jHipsterProperties.getMetrics().getJmx().isEnabled()) { + log.debug("Initializing Metrics JMX reporting"); + JmxReporter jmxReporter = JmxReporter.forRegistry(metricRegistry).build(); + jmxReporter.start(); + } + if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { + log.info("Initializing Metrics Log reporting"); + Marker metricsMarker = MarkerFactory.getMarker("metrics"); + final Slf4jReporter reporter = Slf4jReporter.forRegistry(metricRegistry) + .outputTo(LoggerFactory.getLogger("metrics")) + .markWith(metricsMarker) + .convertRatesTo(TimeUnit.SECONDS) + .convertDurationsTo(TimeUnit.MILLISECONDS) + .build(); + reporter.start(jHipsterProperties.getMetrics().getLogs().getReportFrequency(), TimeUnit.SECONDS); + } + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/SecurityConfiguration.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/SecurityConfiguration.java new file mode 100644 index 0000000000..8c95001dcc --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/SecurityConfiguration.java @@ -0,0 +1,75 @@ +package com.baeldung.jhipster.quotes.config; + +import com.baeldung.jhipster.quotes.config.oauth2.OAuth2JwtAccessTokenConverter; +import com.baeldung.jhipster.quotes.config.oauth2.OAuth2Properties; +import com.baeldung.jhipster.quotes.security.oauth2.OAuth2SignatureVerifierClient; +import com.baeldung.jhipster.quotes.security.AuthoritiesConstants; + +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.cloud.client.loadbalancer.RestTemplateCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer; +import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; +import org.springframework.security.oauth2.provider.token.store.JwtTokenStore; +import org.springframework.security.web.csrf.CookieCsrfTokenRepository; +import org.springframework.web.client.RestTemplate; + +@Configuration +@EnableResourceServer +@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) +public class SecurityConfiguration extends ResourceServerConfigurerAdapter { + private final OAuth2Properties oAuth2Properties; + + public SecurityConfiguration(OAuth2Properties oAuth2Properties) { + this.oAuth2Properties = oAuth2Properties; + } + + @Override + public void configure(HttpSecurity http) throws Exception { + http + .csrf() + .disable() + .headers() + .frameOptions() + .disable() + .and() + .sessionManagement() + .sessionCreationPolicy(SessionCreationPolicy.STATELESS) + .and() + .authorizeRequests() + .antMatchers("/api/**").authenticated() + .antMatchers("/management/health").permitAll() + .antMatchers("/management/info").permitAll() + .antMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN); + } + + @Bean + public TokenStore tokenStore(JwtAccessTokenConverter jwtAccessTokenConverter) { + return new JwtTokenStore(jwtAccessTokenConverter); + } + + @Bean + public JwtAccessTokenConverter jwtAccessTokenConverter(OAuth2SignatureVerifierClient signatureVerifierClient) { + return new OAuth2JwtAccessTokenConverter(oAuth2Properties, signatureVerifierClient); + } + + @Bean + @Qualifier("loadBalancedRestTemplate") + public RestTemplate loadBalancedRestTemplate(RestTemplateCustomizer customizer) { + RestTemplate restTemplate = new RestTemplate(); + customizer.customize(restTemplate); + return restTemplate; + } + + @Bean + @Qualifier("vanillaRestTemplate") + public RestTemplate vanillaRestTemplate() { + return new RestTemplate(); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/WebConfigurer.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/WebConfigurer.java new file mode 100644 index 0000000000..4c2d0e4adc --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/WebConfigurer.java @@ -0,0 +1,148 @@ +package com.baeldung.jhipster.quotes.config; + +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.servlet.InstrumentedFilter; +import com.codahale.metrics.servlets.MetricsServlet; +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.JHipsterProperties; +import io.github.jhipster.config.h2.H2ConfigurationHelper; +import io.undertow.UndertowOptions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; +import org.springframework.boot.web.server.*; +import org.springframework.boot.web.servlet.ServletContextInitializer; +import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.http.MediaType; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +import javax.servlet.*; +import java.nio.charset.StandardCharsets; +import java.util.*; + + +/** + * Configuration of web application with Servlet 3.0 APIs. + */ +@Configuration +public class WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer { + + private final Logger log = LoggerFactory.getLogger(WebConfigurer.class); + + private final Environment env; + + private final JHipsterProperties jHipsterProperties; + + private MetricRegistry metricRegistry; + + public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) { + + this.env = env; + this.jHipsterProperties = jHipsterProperties; + } + + @Override + public void onStartup(ServletContext servletContext) throws ServletException { + if (env.getActiveProfiles().length != 0) { + log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles()); + } + EnumSet disps = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.ASYNC); + initMetrics(servletContext, disps); + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { + initH2Console(servletContext); + } + log.info("Web application fully configured"); + } + + /** + * Customize the Servlet engine: Mime types, the document root, the cache. + */ + @Override + public void customize(WebServerFactory server) { + setMimeMappings(server); + + /* + * Enable HTTP/2 for Undertow - https://twitter.com/ankinson/status/829256167700492288 + * HTTP/2 requires HTTPS, so HTTP requests will fallback to HTTP/1.1. + * See the JHipsterProperties class and your application-*.yml configuration files + * for more information. + */ + if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && + server instanceof UndertowServletWebServerFactory) { + + ((UndertowServletWebServerFactory) server) + .addBuilderCustomizers(builder -> + builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true)); + } + } + + private void setMimeMappings(WebServerFactory server) { + if (server instanceof ConfigurableServletWebServerFactory) { + MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT); + // IE issue, see https://github.com/jhipster/generator-jhipster/pull/711 + mappings.add("html", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase()); + // CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64 + mappings.add("json", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase()); + ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server; + servletWebServer.setMimeMappings(mappings); + } + } + + /** + * Initializes Metrics. + */ + private void initMetrics(ServletContext servletContext, EnumSet disps) { + log.debug("Initializing Metrics registries"); + servletContext.setAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE, + metricRegistry); + servletContext.setAttribute(MetricsServlet.METRICS_REGISTRY, + metricRegistry); + + log.debug("Registering Metrics Filter"); + FilterRegistration.Dynamic metricsFilter = servletContext.addFilter("webappMetricsFilter", + new InstrumentedFilter()); + + metricsFilter.addMappingForUrlPatterns(disps, true, "/*"); + metricsFilter.setAsyncSupported(true); + + log.debug("Registering Metrics Servlet"); + ServletRegistration.Dynamic metricsAdminServlet = + servletContext.addServlet("metricsServlet", new MetricsServlet()); + + metricsAdminServlet.addMapping("/management/metrics/*"); + metricsAdminServlet.setAsyncSupported(true); + metricsAdminServlet.setLoadOnStartup(2); + } + + @Bean + public CorsFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + CorsConfiguration config = jHipsterProperties.getCors(); + if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) { + log.debug("Registering CORS filter"); + source.registerCorsConfiguration("/api/**", config); + source.registerCorsConfiguration("/management/**", config); + source.registerCorsConfiguration("/v2/api-docs", config); + } + return new CorsFilter(source); + } + + /** + * Initializes H2 console. + */ + private void initH2Console(ServletContext servletContext) { + log.debug("Initialize H2 console"); + H2ConfigurationHelper.initH2Console(servletContext); + } + + @Autowired(required = false) + public void setMetricRegistry(MetricRegistry metricRegistry) { + this.metricRegistry = metricRegistry; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/audit/AuditEventConverter.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/audit/AuditEventConverter.java new file mode 100644 index 0000000000..4b5f60595f --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/audit/AuditEventConverter.java @@ -0,0 +1,86 @@ +package com.baeldung.jhipster.quotes.config.audit; + +import com.baeldung.jhipster.quotes.domain.PersistentAuditEvent; + +import org.springframework.boot.actuate.audit.AuditEvent; +import org.springframework.security.web.authentication.WebAuthenticationDetails; +import org.springframework.stereotype.Component; + +import java.util.*; + +@Component +public class AuditEventConverter { + + /** + * Convert a list of PersistentAuditEvent to a list of AuditEvent + * + * @param persistentAuditEvents the list to convert + * @return the converted list. + */ + public List convertToAuditEvent(Iterable persistentAuditEvents) { + if (persistentAuditEvents == null) { + return Collections.emptyList(); + } + List auditEvents = new ArrayList<>(); + for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) { + auditEvents.add(convertToAuditEvent(persistentAuditEvent)); + } + return auditEvents; + } + + /** + * Convert a PersistentAuditEvent to an AuditEvent + * + * @param persistentAuditEvent the event to convert + * @return the converted list. + */ + public AuditEvent convertToAuditEvent(PersistentAuditEvent persistentAuditEvent) { + if (persistentAuditEvent == null) { + return null; + } + return new AuditEvent(persistentAuditEvent.getAuditEventDate(), persistentAuditEvent.getPrincipal(), + persistentAuditEvent.getAuditEventType(), convertDataToObjects(persistentAuditEvent.getData())); + } + + /** + * Internal conversion. This is needed to support the current SpringBoot actuator AuditEventRepository interface + * + * @param data the data to convert + * @return a map of String, Object + */ + public Map convertDataToObjects(Map data) { + Map results = new HashMap<>(); + + if (data != null) { + for (Map.Entry entry : data.entrySet()) { + results.put(entry.getKey(), entry.getValue()); + } + } + return results; + } + + /** + * Internal conversion. This method will allow to save additional data. + * By default, it will save the object as string + * + * @param data the data to convert + * @return a map of String, String + */ + public Map convertDataToStrings(Map data) { + Map results = new HashMap<>(); + + if (data != null) { + for (Map.Entry entry : data.entrySet()) { + // Extract the data that will be saved. + if (entry.getValue() instanceof WebAuthenticationDetails) { + WebAuthenticationDetails authenticationDetails = (WebAuthenticationDetails) entry.getValue(); + results.put("remoteAddress", authenticationDetails.getRemoteAddress()); + results.put("sessionId", authenticationDetails.getSessionId()); + } else { + results.put(entry.getKey(), Objects.toString(entry.getValue())); + } + } + } + return results; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/audit/package-info.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/audit/package-info.java new file mode 100644 index 0000000000..20cbbd0eb0 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/audit/package-info.java @@ -0,0 +1,4 @@ +/** + * Audit specific code. + */ +package com.baeldung.jhipster.quotes.config.audit; diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/oauth2/OAuth2JwtAccessTokenConverter.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/oauth2/OAuth2JwtAccessTokenConverter.java new file mode 100644 index 0000000000..6450e83034 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/oauth2/OAuth2JwtAccessTokenConverter.java @@ -0,0 +1,109 @@ +package com.baeldung.jhipster.quotes.config.oauth2; + +import com.baeldung.jhipster.quotes.security.oauth2.OAuth2SignatureVerifierClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.jwt.crypto.sign.SignatureVerifier; +import org.springframework.security.oauth2.common.exceptions.InvalidTokenException; +import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; +import org.springframework.security.oauth2.provider.OAuth2Authentication; + +import java.util.Map; + +/** + * Improved JwtAccessTokenConverter that can handle lazy fetching of public verifier keys. + */ +public class OAuth2JwtAccessTokenConverter extends JwtAccessTokenConverter { + private final Logger log = LoggerFactory.getLogger(OAuth2JwtAccessTokenConverter.class); + + private final OAuth2Properties oAuth2Properties; + private final OAuth2SignatureVerifierClient signatureVerifierClient; + /** + * When did we last fetch the public key? + */ + private long lastKeyFetchTimestamp; + + public OAuth2JwtAccessTokenConverter(OAuth2Properties oAuth2Properties, OAuth2SignatureVerifierClient signatureVerifierClient) { + this.oAuth2Properties = oAuth2Properties; + this.signatureVerifierClient = signatureVerifierClient; + tryCreateSignatureVerifier(); + } + + /** + * Try to decode the token with the current public key. + * If it fails, contact the OAuth2 server to get a new public key, then try again. + * We might not have fetched it in the first place or it might have changed. + * + * @param token the JWT token to decode. + * @return the resulting claims. + * @throws InvalidTokenException if we cannot decode the token. + */ + @Override + protected Map decode(String token) { + try { + //check if our public key and thus SignatureVerifier have expired + long ttl = oAuth2Properties.getSignatureVerification().getTtl(); + if (ttl > 0 && System.currentTimeMillis() - lastKeyFetchTimestamp > ttl) { + throw new InvalidTokenException("public key expired"); + } + return super.decode(token); + } catch (InvalidTokenException ex) { + if (tryCreateSignatureVerifier()) { + return super.decode(token); + } + throw ex; + } + } + + /** + * Fetch a new public key from the AuthorizationServer. + * + * @return true, if we could fetch it; false, if we could not. + */ + private boolean tryCreateSignatureVerifier() { + long t = System.currentTimeMillis(); + if (t - lastKeyFetchTimestamp < oAuth2Properties.getSignatureVerification().getPublicKeyRefreshRateLimit()) { + return false; + } + try { + SignatureVerifier verifier = signatureVerifierClient.getSignatureVerifier(); + if (verifier != null) { + setVerifier(verifier); + lastKeyFetchTimestamp = t; + log.debug("Public key retrieved from OAuth2 server to create SignatureVerifier"); + return true; + } + } catch (Throwable ex) { + log.error("could not get public key from OAuth2 server to create SignatureVerifier", ex); + } + return false; + } + /** + * Extract JWT claims and set it to OAuth2Authentication decoded details. + * Here is how to get details: + * + *

+     * 
+     *  SecurityContext securityContext = SecurityContextHolder.getContext();
+     *  Authentication authentication = securityContext.getAuthentication();
+     *  if (authentication != null) {
+     *      Object details = authentication.getDetails();
+     *      if(details instanceof OAuth2AuthenticationDetails) {
+     *          Object decodedDetails = ((OAuth2AuthenticationDetails) details).getDecodedDetails();
+     *          if(decodedDetails != null && decodedDetails instanceof Map) {
+     *             String detailFoo = ((Map) decodedDetails).get("foo");
+     *          }
+     *      }
+     *  }
+     * 
+     *  
+ * @param claims OAuth2JWTToken claims + * @return OAuth2Authentication + */ + @Override + public OAuth2Authentication extractAuthentication(Map claims) { + OAuth2Authentication authentication = super.extractAuthentication(claims); + authentication.setDetails(claims); + return authentication; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/oauth2/OAuth2Properties.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/oauth2/OAuth2Properties.java new file mode 100644 index 0000000000..32a76d4a21 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/oauth2/OAuth2Properties.java @@ -0,0 +1,118 @@ +package com.baeldung.jhipster.quotes.config.oauth2; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * OAuth2 properties define properties for OAuth2-based microservices. + */ +@Component +@ConfigurationProperties(prefix = "oauth2", ignoreUnknownFields = false) +public class OAuth2Properties { + private WebClientConfiguration webClientConfiguration = new WebClientConfiguration(); + + private SignatureVerification signatureVerification = new SignatureVerification(); + + public WebClientConfiguration getWebClientConfiguration() { + return webClientConfiguration; + } + + public SignatureVerification getSignatureVerification() { + return signatureVerification; + } + + public static class WebClientConfiguration { + private String clientId = "web_app"; + private String secret = "changeit"; + /** + * Holds the session timeout in seconds for non-remember-me sessions. + * After so many seconds of inactivity, the session will be terminated. + * Only checked during token refresh, so long access token validity may + * delay the session timeout accordingly. + */ + private int sessionTimeoutInSeconds = 1800; + /** + * Defines the cookie domain. If specified, cookies will be set on this domain. + * If not configured, then cookies will be set on the top-level domain of the + * request you sent, i.e. if you send a request to app1.your-domain.com, + * then cookies will be set on .your-domain.com, such that they + * are also valid for app2.your-domain.com. + */ + private String cookieDomain; + + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public String getSecret() { + return secret; + } + + public void setSecret(String secret) { + this.secret = secret; + } + + public int getSessionTimeoutInSeconds() { + return sessionTimeoutInSeconds; + } + + public void setSessionTimeoutInSeconds(int sessionTimeoutInSeconds) { + this.sessionTimeoutInSeconds = sessionTimeoutInSeconds; + } + + public String getCookieDomain() { + return cookieDomain; + } + + public void setCookieDomain(String cookieDomain) { + this.cookieDomain = cookieDomain; + } + } + + public static class SignatureVerification { + /** + * Maximum refresh rate for public keys in ms. + * We won't fetch new public keys any faster than that to avoid spamming UAA in case + * we receive a lot of "illegal" tokens. + */ + private long publicKeyRefreshRateLimit = 10 * 1000L; + /** + * Maximum TTL for the public key in ms. + * The public key will be fetched again from UAA if it gets older than that. + * That way, we make sure that we get the newest keys always in case they are updated there. + */ + private long ttl = 24 * 60 * 60 * 1000L; + /** + * Endpoint where to retrieve the public key used to verify token signatures. + */ + private String publicKeyEndpointUri = "http://uaa/oauth/token_key"; + + public long getPublicKeyRefreshRateLimit() { + return publicKeyRefreshRateLimit; + } + + public void setPublicKeyRefreshRateLimit(long publicKeyRefreshRateLimit) { + this.publicKeyRefreshRateLimit = publicKeyRefreshRateLimit; + } + + public long getTtl() { + return ttl; + } + + public void setTtl(long ttl) { + this.ttl = ttl; + } + + public String getPublicKeyEndpointUri() { + return publicKeyEndpointUri; + } + + public void setPublicKeyEndpointUri(String publicKeyEndpointUri) { + this.publicKeyEndpointUri = publicKeyEndpointUri; + } + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/package-info.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/package-info.java new file mode 100644 index 0000000000..210bf685fb --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/config/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring Framework configuration files. + */ +package com.baeldung.jhipster.quotes.config; diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/AbstractAuditingEntity.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/AbstractAuditingEntity.java new file mode 100644 index 0000000000..c6e2635f98 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/AbstractAuditingEntity.java @@ -0,0 +1,79 @@ +package com.baeldung.jhipster.quotes.domain; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.hibernate.envers.Audited; +import org.springframework.data.annotation.CreatedBy; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedBy; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import java.io.Serializable; +import java.time.Instant; +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; + +/** + * Base abstract class for entities which will hold definitions for created, last modified by and created, + * last modified by date. + */ +@MappedSuperclass +@Audited +@EntityListeners(AuditingEntityListener.class) +public abstract class AbstractAuditingEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + @CreatedBy + @Column(name = "created_by", nullable = false, length = 50, updatable = false) + @JsonIgnore + private String createdBy; + + @CreatedDate + @Column(name = "created_date", nullable = false, updatable = false) + @JsonIgnore + private Instant createdDate = Instant.now(); + + @LastModifiedBy + @Column(name = "last_modified_by", length = 50) + @JsonIgnore + private String lastModifiedBy; + + @LastModifiedDate + @Column(name = "last_modified_date") + @JsonIgnore + private Instant lastModifiedDate = Instant.now(); + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Instant getCreatedDate() { + return createdDate; + } + + public void setCreatedDate(Instant createdDate) { + this.createdDate = createdDate; + } + + public String getLastModifiedBy() { + return lastModifiedBy; + } + + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public Instant getLastModifiedDate() { + return lastModifiedDate; + } + + public void setLastModifiedDate(Instant lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/PersistentAuditEvent.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/PersistentAuditEvent.java new file mode 100644 index 0000000000..c4ead3a122 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/PersistentAuditEvent.java @@ -0,0 +1,81 @@ +package com.baeldung.jhipster.quotes.domain; + +import javax.persistence.*; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; + +/** + * Persist AuditEvent managed by the Spring Boot actuator. + * + * @see org.springframework.boot.actuate.audit.AuditEvent + */ +@Entity +@Table(name = "jhi_persistent_audit_event") +public class PersistentAuditEvent implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "event_id") + private Long id; + + @NotNull + @Column(nullable = false) + private String principal; + + @Column(name = "event_date") + private Instant auditEventDate; + + @Column(name = "event_type") + private String auditEventType; + + @ElementCollection + @MapKeyColumn(name = "name") + @Column(name = "value") + @CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns=@JoinColumn(name="event_id")) + private Map data = new HashMap<>(); + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getPrincipal() { + return principal; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public Instant getAuditEventDate() { + return auditEventDate; + } + + public void setAuditEventDate(Instant auditEventDate) { + this.auditEventDate = auditEventDate; + } + + public String getAuditEventType() { + return auditEventType; + } + + public void setAuditEventType(String auditEventType) { + this.auditEventType = auditEventType; + } + + public Map getData() { + return data; + } + + public void setData(Map data) { + this.data = data; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/Quote.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/Quote.java new file mode 100644 index 0000000000..7d9d0aa93e --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/Quote.java @@ -0,0 +1,118 @@ +package com.baeldung.jhipster.quotes.domain; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; + +import javax.persistence.*; +import javax.validation.constraints.*; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.ZonedDateTime; +import java.util.Objects; + +/** + * A Quote. + */ +@Entity +@Table(name = "quote") +@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) +public class Quote implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + @NotNull + @Column(name = "symbol", nullable = false) + private String symbol; + + @NotNull + @Column(name = "price", precision = 10, scale = 2, nullable = false) + private BigDecimal price; + + @NotNull + @Column(name = "last_trade", nullable = false) + private ZonedDateTime lastTrade; + + // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getSymbol() { + return symbol; + } + + public Quote symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public BigDecimal getPrice() { + return price; + } + + public Quote price(BigDecimal price) { + this.price = price; + return this; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public ZonedDateTime getLastTrade() { + return lastTrade; + } + + public Quote lastTrade(ZonedDateTime lastTrade) { + this.lastTrade = lastTrade; + return this; + } + + public void setLastTrade(ZonedDateTime lastTrade) { + this.lastTrade = lastTrade; + } + // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Quote quote = (Quote) o; + if (quote.getId() == null || getId() == null) { + return false; + } + return Objects.equals(getId(), quote.getId()); + } + + @Override + public int hashCode() { + return Objects.hashCode(getId()); + } + + @Override + public String toString() { + return "Quote{" + + "id=" + getId() + + ", symbol='" + getSymbol() + "'" + + ", price=" + getPrice() + + ", lastTrade='" + getLastTrade() + "'" + + "}"; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/package-info.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/package-info.java new file mode 100644 index 0000000000..03404faf86 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/domain/package-info.java @@ -0,0 +1,4 @@ +/** + * JPA domain objects. + */ +package com.baeldung.jhipster.quotes.domain; diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/repository/QuoteRepository.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/repository/QuoteRepository.java new file mode 100644 index 0000000000..714c57d0d6 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/repository/QuoteRepository.java @@ -0,0 +1,15 @@ +package com.baeldung.jhipster.quotes.repository; + +import com.baeldung.jhipster.quotes.domain.Quote; +import org.springframework.data.jpa.repository.*; +import org.springframework.stereotype.Repository; + + +/** + * Spring Data repository for the Quote entity. + */ +@SuppressWarnings("unused") +@Repository +public interface QuoteRepository extends JpaRepository, JpaSpecificationExecutor { + +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/repository/package-info.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/repository/package-info.java new file mode 100644 index 0000000000..c7edddfb4b --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/repository/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring Data JPA repositories. + */ +package com.baeldung.jhipster.quotes.repository; diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/AuthoritiesConstants.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/AuthoritiesConstants.java new file mode 100644 index 0000000000..e33affbb10 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/AuthoritiesConstants.java @@ -0,0 +1,16 @@ +package com.baeldung.jhipster.quotes.security; + +/** + * Constants for Spring Security authorities. + */ +public final class AuthoritiesConstants { + + public static final String ADMIN = "ROLE_ADMIN"; + + public static final String USER = "ROLE_USER"; + + public static final String ANONYMOUS = "ROLE_ANONYMOUS"; + + private AuthoritiesConstants() { + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/SecurityUtils.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/SecurityUtils.java new file mode 100644 index 0000000000..613099ff45 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/SecurityUtils.java @@ -0,0 +1,64 @@ +package com.baeldung.jhipster.quotes.security; + +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; + +import java.util.Optional; + +/** + * Utility class for Spring Security. + */ +public final class SecurityUtils { + + private SecurityUtils() { + } + + /** + * Get the login of the current user. + * + * @return the login of the current user + */ + public static Optional getCurrentUserLogin() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional.ofNullable(securityContext.getAuthentication()) + .map(authentication -> { + if (authentication.getPrincipal() instanceof UserDetails) { + UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal(); + return springSecurityUser.getUsername(); + } else if (authentication.getPrincipal() instanceof String) { + return (String) authentication.getPrincipal(); + } + return null; + }); + } + + /** + * Check if a user is authenticated. + * + * @return true if the user is authenticated, false otherwise + */ + public static boolean isAuthenticated() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional.ofNullable(securityContext.getAuthentication()) + .map(authentication -> authentication.getAuthorities().stream() + .noneMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(AuthoritiesConstants.ANONYMOUS))) + .orElse(false); + } + + /** + * If the current user has a specific authority (security role). + *

+ * The name of this method comes from the isUserInRole() method in the Servlet API + * + * @param authority the authority to check + * @return true if the current user has the authority, false otherwise + */ + public static boolean isCurrentUserInRole(String authority) { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional.ofNullable(securityContext.getAuthentication()) + .map(authentication -> authentication.getAuthorities().stream() + .anyMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(authority))) + .orElse(false); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/SpringSecurityAuditorAware.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/SpringSecurityAuditorAware.java new file mode 100644 index 0000000000..12464f25f0 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/SpringSecurityAuditorAware.java @@ -0,0 +1,20 @@ +package com.baeldung.jhipster.quotes.security; + +import com.baeldung.jhipster.quotes.config.Constants; + +import java.util.Optional; + +import org.springframework.data.domain.AuditorAware; +import org.springframework.stereotype.Component; + +/** + * Implementation of AuditorAware based on Spring Security. + */ +@Component +public class SpringSecurityAuditorAware implements AuditorAware { + + @Override + public Optional getCurrentAuditor() { + return Optional.of(SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT)); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/oauth2/OAuth2SignatureVerifierClient.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/oauth2/OAuth2SignatureVerifierClient.java new file mode 100644 index 0000000000..9f495f45ee --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/oauth2/OAuth2SignatureVerifierClient.java @@ -0,0 +1,23 @@ +package com.baeldung.jhipster.quotes.security.oauth2; + +import org.springframework.security.jwt.crypto.sign.SignatureVerifier; + +/** + * Abstracts how to create a SignatureVerifier to verify JWT tokens with a public key. + * Implementations will have to contact the OAuth2 authorization server to fetch the public key + * and use it to build a SignatureVerifier in a server specific way. + * + * @see UaaSignatureVerifierClient + */ +public interface OAuth2SignatureVerifierClient { + /** + * Returns the SignatureVerifier used to verify JWT tokens. + * Fetches the public key from the Authorization server to create + * this verifier. + * + * @return the new verifier used to verify JWT signatures. + * Will be null if we cannot contact the token endpoint. + * @throws Exception if we could not create a SignatureVerifier or contact the token endpoint. + */ + SignatureVerifier getSignatureVerifier() throws Exception; +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/oauth2/UaaSignatureVerifierClient.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/oauth2/UaaSignatureVerifierClient.java new file mode 100644 index 0000000000..49568ff71b --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/oauth2/UaaSignatureVerifierClient.java @@ -0,0 +1,63 @@ +package com.baeldung.jhipster.quotes.security.oauth2; + +import com.baeldung.jhipster.quotes.config.oauth2.OAuth2Properties; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.cloud.client.discovery.DiscoveryClient; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.security.jwt.crypto.sign.RsaVerifier; +import org.springframework.security.jwt.crypto.sign.SignatureVerifier; +import org.springframework.security.oauth2.common.exceptions.InvalidClientException; +import org.springframework.stereotype.Component; +import org.springframework.web.client.RestTemplate; + +import java.util.Map; + +/** + * Client fetching the public key from UAA to create a SignatureVerifier. + */ +@Component +public class UaaSignatureVerifierClient implements OAuth2SignatureVerifierClient { + private final Logger log = LoggerFactory.getLogger(UaaSignatureVerifierClient.class); + private final RestTemplate restTemplate; + protected final OAuth2Properties oAuth2Properties; + + public UaaSignatureVerifierClient(DiscoveryClient discoveryClient, @Qualifier("loadBalancedRestTemplate") RestTemplate restTemplate, + OAuth2Properties oAuth2Properties) { + this.restTemplate = restTemplate; + this.oAuth2Properties = oAuth2Properties; + // Load available UAA servers + discoveryClient.getServices(); + } + + /** + * Fetches the public key from the UAA. + * + * @return the public key used to verify JWT tokens; or null. + */ + @Override + public SignatureVerifier getSignatureVerifier() throws Exception { + try { + HttpEntity request = new HttpEntity(new HttpHeaders()); + String key = (String) restTemplate + .exchange(getPublicKeyEndpoint(), HttpMethod.GET, request, Map.class).getBody() + .get("value"); + return new RsaVerifier(key); + } catch (IllegalStateException ex) { + log.warn("could not contact UAA to get public key"); + return null; + } + } + + /** Returns the configured endpoint URI to retrieve the public key. */ + private String getPublicKeyEndpoint() { + String tokenEndpointUrl = oAuth2Properties.getSignatureVerification().getPublicKeyEndpointUri(); + if (tokenEndpointUrl == null) { + throw new InvalidClientException("no token endpoint configured in application properties"); + } + return tokenEndpointUrl; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/package-info.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/package-info.java new file mode 100644 index 0000000000..b598b92ff3 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/security/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring Security configuration. + */ +package com.baeldung.jhipster.quotes.security; diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/QuoteQueryService.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/QuoteQueryService.java new file mode 100644 index 0000000000..bec9b9b218 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/QuoteQueryService.java @@ -0,0 +1,104 @@ +package com.baeldung.jhipster.quotes.service; + +import java.util.List; + +import javax.persistence.criteria.JoinType; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.domain.Specification; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import io.github.jhipster.service.QueryService; + +import com.baeldung.jhipster.quotes.domain.Quote; +import com.baeldung.jhipster.quotes.domain.*; // for static metamodels +import com.baeldung.jhipster.quotes.repository.QuoteRepository; +import com.baeldung.jhipster.quotes.service.dto.QuoteCriteria; +import com.baeldung.jhipster.quotes.service.dto.QuoteDTO; +import com.baeldung.jhipster.quotes.service.mapper.QuoteMapper; + +/** + * Service for executing complex queries for Quote entities in the database. + * The main input is a {@link QuoteCriteria} which gets converted to {@link Specification}, + * in a way that all the filters must apply. + * It returns a {@link List} of {@link QuoteDTO} or a {@link Page} of {@link QuoteDTO} which fulfills the criteria. + */ +@Service +@Transactional(readOnly = true) +public class QuoteQueryService extends QueryService { + + private final Logger log = LoggerFactory.getLogger(QuoteQueryService.class); + + private final QuoteRepository quoteRepository; + + private final QuoteMapper quoteMapper; + + public QuoteQueryService(QuoteRepository quoteRepository, QuoteMapper quoteMapper) { + this.quoteRepository = quoteRepository; + this.quoteMapper = quoteMapper; + } + + /** + * Return a {@link List} of {@link QuoteDTO} which matches the criteria from the database + * @param criteria The object which holds all the filters, which the entities should match. + * @return the matching entities. + */ + @Transactional(readOnly = true) + public List findByCriteria(QuoteCriteria criteria) { + log.debug("find by criteria : {}", criteria); + final Specification specification = createSpecification(criteria); + return quoteMapper.toDto(quoteRepository.findAll(specification)); + } + + /** + * Return a {@link Page} of {@link QuoteDTO} which matches the criteria from the database + * @param criteria The object which holds all the filters, which the entities should match. + * @param page The page, which should be returned. + * @return the matching entities. + */ + @Transactional(readOnly = true) + public Page findByCriteria(QuoteCriteria criteria, Pageable page) { + log.debug("find by criteria : {}, page: {}", criteria, page); + final Specification specification = createSpecification(criteria); + return quoteRepository.findAll(specification, page) + .map(quoteMapper::toDto); + } + + /** + * Return the number of matching entities in the database + * @param criteria The object which holds all the filters, which the entities should match. + * @return the number of matching entities. + */ + @Transactional(readOnly = true) + public long countByCriteria(QuoteCriteria criteria) { + log.debug("count by criteria : {}", criteria); + final Specification specification = createSpecification(criteria); + return quoteRepository.count(specification); + } + + /** + * Function to convert QuoteCriteria to a {@link Specification} + */ + private Specification createSpecification(QuoteCriteria criteria) { + Specification specification = Specification.where(null); + if (criteria != null) { + if (criteria.getId() != null) { + specification = specification.and(buildSpecification(criteria.getId(), Quote_.id)); + } + if (criteria.getSymbol() != null) { + specification = specification.and(buildStringSpecification(criteria.getSymbol(), Quote_.symbol)); + } + if (criteria.getPrice() != null) { + specification = specification.and(buildRangeSpecification(criteria.getPrice(), Quote_.price)); + } + if (criteria.getLastTrade() != null) { + specification = specification.and(buildRangeSpecification(criteria.getLastTrade(), Quote_.lastTrade)); + } + } + return specification; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/QuoteService.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/QuoteService.java new file mode 100644 index 0000000000..f99c3e25db --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/QuoteService.java @@ -0,0 +1,46 @@ +package com.baeldung.jhipster.quotes.service; + +import com.baeldung.jhipster.quotes.service.dto.QuoteDTO; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import java.util.Optional; + +/** + * Service Interface for managing Quote. + */ +public interface QuoteService { + + /** + * Save a quote. + * + * @param quoteDTO the entity to save + * @return the persisted entity + */ + QuoteDTO save(QuoteDTO quoteDTO); + + /** + * Get all the quotes. + * + * @param pageable the pagination information + * @return the list of entities + */ + Page findAll(Pageable pageable); + + + /** + * Get the "id" quote. + * + * @param id the id of the entity + * @return the entity + */ + Optional findOne(Long id); + + /** + * Delete the "id" quote. + * + * @param id the id of the entity + */ + void delete(Long id); +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/dto/QuoteCriteria.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/dto/QuoteCriteria.java new file mode 100644 index 0000000000..0400c1e5d4 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/dto/QuoteCriteria.java @@ -0,0 +1,107 @@ +package com.baeldung.jhipster.quotes.service.dto; + +import java.io.Serializable; +import java.util.Objects; +import io.github.jhipster.service.filter.BooleanFilter; +import io.github.jhipster.service.filter.DoubleFilter; +import io.github.jhipster.service.filter.Filter; +import io.github.jhipster.service.filter.FloatFilter; +import io.github.jhipster.service.filter.IntegerFilter; +import io.github.jhipster.service.filter.LongFilter; +import io.github.jhipster.service.filter.StringFilter; +import io.github.jhipster.service.filter.BigDecimalFilter; +import io.github.jhipster.service.filter.ZonedDateTimeFilter; + +/** + * Criteria class for the Quote entity. This class is used in QuoteResource to + * receive all the possible filtering options from the Http GET request parameters. + * For example the following could be a valid requests: + * /quotes?id.greaterThan=5&attr1.contains=something&attr2.specified=false + * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use + * fix type specific filters. + */ +public class QuoteCriteria implements Serializable { + + private static final long serialVersionUID = 1L; + + private LongFilter id; + + private StringFilter symbol; + + private BigDecimalFilter price; + + private ZonedDateTimeFilter lastTrade; + + public QuoteCriteria() { + } + + public LongFilter getId() { + return id; + } + + public void setId(LongFilter id) { + this.id = id; + } + + public StringFilter getSymbol() { + return symbol; + } + + public void setSymbol(StringFilter symbol) { + this.symbol = symbol; + } + + public BigDecimalFilter getPrice() { + return price; + } + + public void setPrice(BigDecimalFilter price) { + this.price = price; + } + + public ZonedDateTimeFilter getLastTrade() { + return lastTrade; + } + + public void setLastTrade(ZonedDateTimeFilter lastTrade) { + this.lastTrade = lastTrade; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final QuoteCriteria that = (QuoteCriteria) o; + return + Objects.equals(id, that.id) && + Objects.equals(symbol, that.symbol) && + Objects.equals(price, that.price) && + Objects.equals(lastTrade, that.lastTrade); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + symbol, + price, + lastTrade + ); + } + + @Override + public String toString() { + return "QuoteCriteria{" + + (id != null ? "id=" + id + ", " : "") + + (symbol != null ? "symbol=" + symbol + ", " : "") + + (price != null ? "price=" + price + ", " : "") + + (lastTrade != null ? "lastTrade=" + lastTrade + ", " : "") + + "}"; + } + +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/dto/QuoteDTO.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/dto/QuoteDTO.java new file mode 100644 index 0000000000..44042afe07 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/dto/QuoteDTO.java @@ -0,0 +1,87 @@ +package com.baeldung.jhipster.quotes.service.dto; + +import java.time.ZonedDateTime; +import javax.validation.constraints.*; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Objects; + +/** + * A DTO for the Quote entity. + */ +public class QuoteDTO implements Serializable { + + private Long id; + + @NotNull + private String symbol; + + @NotNull + private BigDecimal price; + + @NotNull + private ZonedDateTime lastTrade; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getSymbol() { + return symbol; + } + + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public ZonedDateTime getLastTrade() { + return lastTrade; + } + + public void setLastTrade(ZonedDateTime lastTrade) { + this.lastTrade = lastTrade; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + QuoteDTO quoteDTO = (QuoteDTO) o; + if (quoteDTO.getId() == null || getId() == null) { + return false; + } + return Objects.equals(getId(), quoteDTO.getId()); + } + + @Override + public int hashCode() { + return Objects.hashCode(getId()); + } + + @Override + public String toString() { + return "QuoteDTO{" + + "id=" + getId() + + ", symbol='" + getSymbol() + "'" + + ", price=" + getPrice() + + ", lastTrade='" + getLastTrade() + "'" + + "}"; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/impl/QuoteServiceImpl.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/impl/QuoteServiceImpl.java new file mode 100644 index 0000000000..91a868d0db --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/impl/QuoteServiceImpl.java @@ -0,0 +1,90 @@ +package com.baeldung.jhipster.quotes.service.impl; + +import com.baeldung.jhipster.quotes.service.QuoteService; +import com.baeldung.jhipster.quotes.domain.Quote; +import com.baeldung.jhipster.quotes.repository.QuoteRepository; +import com.baeldung.jhipster.quotes.service.dto.QuoteDTO; +import com.baeldung.jhipster.quotes.service.mapper.QuoteMapper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Optional; + +/** + * Service Implementation for managing Quote. + */ +@Service +@Transactional +public class QuoteServiceImpl implements QuoteService { + + private final Logger log = LoggerFactory.getLogger(QuoteServiceImpl.class); + + private final QuoteRepository quoteRepository; + + private final QuoteMapper quoteMapper; + + public QuoteServiceImpl(QuoteRepository quoteRepository, QuoteMapper quoteMapper) { + this.quoteRepository = quoteRepository; + this.quoteMapper = quoteMapper; + } + + /** + * Save a quote. + * + * @param quoteDTO the entity to save + * @return the persisted entity + */ + @Override + public QuoteDTO save(QuoteDTO quoteDTO) { + log.debug("Request to save Quote : {}", quoteDTO); + + Quote quote = quoteMapper.toEntity(quoteDTO); + quote = quoteRepository.save(quote); + return quoteMapper.toDto(quote); + } + + /** + * Get all the quotes. + * + * @param pageable the pagination information + * @return the list of entities + */ + @Override + @Transactional(readOnly = true) + public Page findAll(Pageable pageable) { + log.debug("Request to get all Quotes"); + return quoteRepository.findAll(pageable) + .map(quoteMapper::toDto); + } + + + /** + * Get one quote by id. + * + * @param id the id of the entity + * @return the entity + */ + @Override + @Transactional(readOnly = true) + public Optional findOne(Long id) { + log.debug("Request to get Quote : {}", id); + return quoteRepository.findById(id) + .map(quoteMapper::toDto); + } + + /** + * Delete the quote by id. + * + * @param id the id of the entity + */ + @Override + public void delete(Long id) { + log.debug("Request to delete Quote : {}", id); + quoteRepository.deleteById(id); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/mapper/EntityMapper.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/mapper/EntityMapper.java new file mode 100644 index 0000000000..219254a776 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/mapper/EntityMapper.java @@ -0,0 +1,21 @@ +package com.baeldung.jhipster.quotes.service.mapper; + +import java.util.List; + +/** + * Contract for a generic dto to entity mapper. + * + * @param - DTO type parameter. + * @param - Entity type parameter. + */ + +public interface EntityMapper { + + E toEntity(D dto); + + D toDto(E entity); + + List toEntity(List dtoList); + + List toDto(List entityList); +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/mapper/QuoteMapper.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/mapper/QuoteMapper.java new file mode 100644 index 0000000000..b8bb71d870 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/mapper/QuoteMapper.java @@ -0,0 +1,24 @@ +package com.baeldung.jhipster.quotes.service.mapper; + +import com.baeldung.jhipster.quotes.domain.*; +import com.baeldung.jhipster.quotes.service.dto.QuoteDTO; + +import org.mapstruct.*; + +/** + * Mapper for the entity Quote and its DTO QuoteDTO. + */ +@Mapper(componentModel = "spring", uses = {}) +public interface QuoteMapper extends EntityMapper { + + + + default Quote fromId(Long id) { + if (id == null) { + return null; + } + Quote quote = new Quote(); + quote.setId(id); + return quote; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/package-info.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/package-info.java new file mode 100644 index 0000000000..082757bde9 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/service/package-info.java @@ -0,0 +1,4 @@ +/** + * Service layer beans. + */ +package com.baeldung.jhipster.quotes.service; diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/LogsResource.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/LogsResource.java new file mode 100644 index 0000000000..633bc9edf9 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/LogsResource.java @@ -0,0 +1,39 @@ +package com.baeldung.jhipster.quotes.web.rest; + +import com.baeldung.jhipster.quotes.web.rest.vm.LoggerVM; + +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.LoggerContext; +import com.codahale.metrics.annotation.Timed; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * Controller for view and managing Log Level at runtime. + */ +@RestController +@RequestMapping("/management") +public class LogsResource { + + @GetMapping("/logs") + @Timed + public List getList() { + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + return context.getLoggerList() + .stream() + .map(LoggerVM::new) + .collect(Collectors.toList()); + } + + @PutMapping("/logs") + @ResponseStatus(HttpStatus.NO_CONTENT) + @Timed + public void changeLevel(@RequestBody LoggerVM jsonLogger) { + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel())); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/QuoteResource.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/QuoteResource.java new file mode 100644 index 0000000000..0fdcf518ae --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/QuoteResource.java @@ -0,0 +1,146 @@ +package com.baeldung.jhipster.quotes.web.rest; + +import com.codahale.metrics.annotation.Timed; +import com.baeldung.jhipster.quotes.service.QuoteService; +import com.baeldung.jhipster.quotes.web.rest.errors.BadRequestAlertException; +import com.baeldung.jhipster.quotes.web.rest.util.HeaderUtil; +import com.baeldung.jhipster.quotes.web.rest.util.PaginationUtil; +import com.baeldung.jhipster.quotes.service.dto.QuoteDTO; +import com.baeldung.jhipster.quotes.service.dto.QuoteCriteria; +import com.baeldung.jhipster.quotes.service.QuoteQueryService; +import io.github.jhipster.web.util.ResponseUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.net.URI; +import java.net.URISyntaxException; + +import java.util.List; +import java.util.Optional; + +/** + * REST controller for managing Quote. + */ +@RestController +@RequestMapping("/api") +public class QuoteResource { + + private final Logger log = LoggerFactory.getLogger(QuoteResource.class); + + private static final String ENTITY_NAME = "quotesQuote"; + + private final QuoteService quoteService; + + private final QuoteQueryService quoteQueryService; + + public QuoteResource(QuoteService quoteService, QuoteQueryService quoteQueryService) { + this.quoteService = quoteService; + this.quoteQueryService = quoteQueryService; + } + + /** + * POST /quotes : Create a new quote. + * + * @param quoteDTO the quoteDTO to create + * @return the ResponseEntity with status 201 (Created) and with body the new quoteDTO, or with status 400 (Bad Request) if the quote has already an ID + * @throws URISyntaxException if the Location URI syntax is incorrect + */ + @PostMapping("/quotes") + @Timed + public ResponseEntity createQuote(@Valid @RequestBody QuoteDTO quoteDTO) throws URISyntaxException { + log.debug("REST request to save Quote : {}", quoteDTO); + if (quoteDTO.getId() != null) { + throw new BadRequestAlertException("A new quote cannot already have an ID", ENTITY_NAME, "idexists"); + } + QuoteDTO result = quoteService.save(quoteDTO); + return ResponseEntity.created(new URI("/api/quotes/" + result.getId())) + .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) + .body(result); + } + + /** + * PUT /quotes : Updates an existing quote. + * + * @param quoteDTO the quoteDTO to update + * @return the ResponseEntity with status 200 (OK) and with body the updated quoteDTO, + * or with status 400 (Bad Request) if the quoteDTO is not valid, + * or with status 500 (Internal Server Error) if the quoteDTO couldn't be updated + * @throws URISyntaxException if the Location URI syntax is incorrect + */ + @PutMapping("/quotes") + @Timed + public ResponseEntity updateQuote(@Valid @RequestBody QuoteDTO quoteDTO) throws URISyntaxException { + log.debug("REST request to update Quote : {}", quoteDTO); + if (quoteDTO.getId() == null) { + throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); + } + QuoteDTO result = quoteService.save(quoteDTO); + return ResponseEntity.ok() + .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, quoteDTO.getId().toString())) + .body(result); + } + + /** + * GET /quotes : get all the quotes. + * + * @param pageable the pagination information + * @param criteria the criterias which the requested entities should match + * @return the ResponseEntity with status 200 (OK) and the list of quotes in body + */ + @GetMapping("/quotes") + @Timed + public ResponseEntity> getAllQuotes(QuoteCriteria criteria, Pageable pageable) { + log.debug("REST request to get Quotes by criteria: {}", criteria); + Page page = quoteQueryService.findByCriteria(criteria, pageable); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/quotes"); + return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); + } + + /** + * GET /quotes/count : count all the quotes. + * + * @param criteria the criterias which the requested entities should match + * @return the ResponseEntity with status 200 (OK) and the count in body + */ + @GetMapping("/quotes/count") + @Timed + public ResponseEntity countQuotes (QuoteCriteria criteria) { + log.debug("REST request to count Quotes by criteria: {}", criteria); + return ResponseEntity.ok().body(quoteQueryService.countByCriteria(criteria)); + } + + /** + * GET /quotes/:id : get the "id" quote. + * + * @param id the id of the quoteDTO to retrieve + * @return the ResponseEntity with status 200 (OK) and with body the quoteDTO, or with status 404 (Not Found) + */ + @GetMapping("/quotes/{id}") + @Timed + public ResponseEntity getQuote(@PathVariable Long id) { + log.debug("REST request to get Quote : {}", id); + Optional quoteDTO = quoteService.findOne(id); + return ResponseUtil.wrapOrNotFound(quoteDTO); + } + + /** + * DELETE /quotes/:id : delete the "id" quote. + * + * @param id the id of the quoteDTO to delete + * @return the ResponseEntity with status 200 (OK) + */ + @DeleteMapping("/quotes/{id}") + @Timed + public ResponseEntity deleteQuote(@PathVariable Long id) { + log.debug("REST request to delete Quote : {}", id); + quoteService.delete(id); + return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/BadRequestAlertException.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/BadRequestAlertException.java new file mode 100644 index 0000000000..9a8574bddc --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/BadRequestAlertException.java @@ -0,0 +1,42 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +import java.net.URI; +import java.util.HashMap; +import java.util.Map; + +public class BadRequestAlertException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + private final String entityName; + + private final String errorKey; + + public BadRequestAlertException(String defaultMessage, String entityName, String errorKey) { + this(ErrorConstants.DEFAULT_TYPE, defaultMessage, entityName, errorKey); + } + + public BadRequestAlertException(URI type, String defaultMessage, String entityName, String errorKey) { + super(type, defaultMessage, Status.BAD_REQUEST, null, null, null, getAlertParameters(entityName, errorKey)); + this.entityName = entityName; + this.errorKey = errorKey; + } + + public String getEntityName() { + return entityName; + } + + public String getErrorKey() { + return errorKey; + } + + private static Map getAlertParameters(String entityName, String errorKey) { + Map parameters = new HashMap<>(); + parameters.put("message", "error." + errorKey); + parameters.put("params", entityName); + return parameters; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/CustomParameterizedException.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/CustomParameterizedException.java new file mode 100644 index 0000000000..47b7d16247 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/CustomParameterizedException.java @@ -0,0 +1,54 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; + +import java.util.HashMap; +import java.util.Map; + +import static org.zalando.problem.Status.BAD_REQUEST; + +/** + * Custom, parameterized exception, which can be translated on the client side. + * For example: + * + *

+ * throw new CustomParameterizedException("myCustomError", "hello", "world");
+ * 
+ * + * Can be translated with: + * + *
+ * "error.myCustomError" :  "The server says {{param0}} to {{param1}}"
+ * 
+ */ +public class CustomParameterizedException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + private static final String PARAM = "param"; + + public CustomParameterizedException(String message, String... params) { + this(message, toParamMap(params)); + } + + public CustomParameterizedException(String message, Map paramMap) { + super(ErrorConstants.PARAMETERIZED_TYPE, "Parameterized Exception", BAD_REQUEST, null, null, null, toProblemParameters(message, paramMap)); + } + + public static Map toParamMap(String... params) { + Map paramMap = new HashMap<>(); + if (params != null && params.length > 0) { + for (int i = 0; i < params.length; i++) { + paramMap.put(PARAM + i, params[i]); + } + } + return paramMap; + } + + public static Map toProblemParameters(String message, Map paramMap) { + Map parameters = new HashMap<>(); + parameters.put("message", message); + parameters.put("params", paramMap); + return parameters; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/EmailAlreadyUsedException.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/EmailAlreadyUsedException.java new file mode 100644 index 0000000000..5d5a9103e3 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/EmailAlreadyUsedException.java @@ -0,0 +1,10 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +public class EmailAlreadyUsedException extends BadRequestAlertException { + + private static final long serialVersionUID = 1L; + + public EmailAlreadyUsedException() { + super(ErrorConstants.EMAIL_ALREADY_USED_TYPE, "Email is already in use!", "userManagement", "emailexists"); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/EmailNotFoundException.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/EmailNotFoundException.java new file mode 100644 index 0000000000..f92e7dd013 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/EmailNotFoundException.java @@ -0,0 +1,13 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +public class EmailNotFoundException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + public EmailNotFoundException() { + super(ErrorConstants.EMAIL_NOT_FOUND_TYPE, "Email address not registered", Status.BAD_REQUEST); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/ErrorConstants.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/ErrorConstants.java new file mode 100644 index 0000000000..c07bdbdb00 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/ErrorConstants.java @@ -0,0 +1,21 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +import java.net.URI; + +public final class ErrorConstants { + + public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure"; + public static final String ERR_VALIDATION = "error.validation"; + public static final String PROBLEM_BASE_URL = "https://www.jhipster.tech/problem"; + public static final URI DEFAULT_TYPE = URI.create(PROBLEM_BASE_URL + "/problem-with-message"); + public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create(PROBLEM_BASE_URL + "/constraint-violation"); + public static final URI PARAMETERIZED_TYPE = URI.create(PROBLEM_BASE_URL + "/parameterized"); + public static final URI ENTITY_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/entity-not-found"); + public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password"); + public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used"); + public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used"); + public static final URI EMAIL_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-found"); + + private ErrorConstants() { + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/ExceptionTranslator.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/ExceptionTranslator.java new file mode 100644 index 0000000000..18baa42736 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/ExceptionTranslator.java @@ -0,0 +1,107 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +import com.baeldung.jhipster.quotes.web.rest.util.HeaderUtil; + +import org.springframework.dao.ConcurrencyFailureException; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.context.request.NativeWebRequest; +import org.zalando.problem.DefaultProblem; +import org.zalando.problem.Problem; +import org.zalando.problem.ProblemBuilder; +import org.zalando.problem.Status; +import org.zalando.problem.spring.web.advice.ProblemHandling; +import org.zalando.problem.violations.ConstraintViolationProblem; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.stream.Collectors; + +/** + * Controller advice to translate the server side exceptions to client-friendly json structures. + * The error response follows RFC7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807) + */ +@ControllerAdvice +public class ExceptionTranslator implements ProblemHandling { + + /** + * Post-process the Problem payload to add the message key for the front-end if needed + */ + @Override + public ResponseEntity process(@Nullable ResponseEntity entity, NativeWebRequest request) { + if (entity == null) { + return entity; + } + Problem problem = entity.getBody(); + if (!(problem instanceof ConstraintViolationProblem || problem instanceof DefaultProblem)) { + return entity; + } + ProblemBuilder builder = Problem.builder() + .withType(Problem.DEFAULT_TYPE.equals(problem.getType()) ? ErrorConstants.DEFAULT_TYPE : problem.getType()) + .withStatus(problem.getStatus()) + .withTitle(problem.getTitle()) + .with("path", request.getNativeRequest(HttpServletRequest.class).getRequestURI()); + + if (problem instanceof ConstraintViolationProblem) { + builder + .with("violations", ((ConstraintViolationProblem) problem).getViolations()) + .with("message", ErrorConstants.ERR_VALIDATION); + } else { + builder + .withCause(((DefaultProblem) problem).getCause()) + .withDetail(problem.getDetail()) + .withInstance(problem.getInstance()); + problem.getParameters().forEach(builder::with); + if (!problem.getParameters().containsKey("message") && problem.getStatus() != null) { + builder.with("message", "error.http." + problem.getStatus().getStatusCode()); + } + } + return new ResponseEntity<>(builder.build(), entity.getHeaders(), entity.getStatusCode()); + } + + @Override + public ResponseEntity handleMethodArgumentNotValid(MethodArgumentNotValidException ex, @Nonnull NativeWebRequest request) { + BindingResult result = ex.getBindingResult(); + List fieldErrors = result.getFieldErrors().stream() + .map(f -> new FieldErrorVM(f.getObjectName(), f.getField(), f.getCode())) + .collect(Collectors.toList()); + + Problem problem = Problem.builder() + .withType(ErrorConstants.CONSTRAINT_VIOLATION_TYPE) + .withTitle("Method argument not valid") + .withStatus(defaultConstraintViolationStatus()) + .with("message", ErrorConstants.ERR_VALIDATION) + .with("fieldErrors", fieldErrors) + .build(); + return create(ex, problem, request); + } + + @ExceptionHandler + public ResponseEntity handleNoSuchElementException(NoSuchElementException ex, NativeWebRequest request) { + Problem problem = Problem.builder() + .withStatus(Status.NOT_FOUND) + .with("message", ErrorConstants.ENTITY_NOT_FOUND_TYPE) + .build(); + return create(ex, problem, request); + } + + @ExceptionHandler + public ResponseEntity handleBadRequestAlertException(BadRequestAlertException ex, NativeWebRequest request) { + return create(ex, request, HeaderUtil.createFailureAlert(ex.getEntityName(), ex.getErrorKey(), ex.getMessage())); + } + + @ExceptionHandler + public ResponseEntity handleConcurrencyFailure(ConcurrencyFailureException ex, NativeWebRequest request) { + Problem problem = Problem.builder() + .withStatus(Status.CONFLICT) + .with("message", ErrorConstants.ERR_CONCURRENCY_FAILURE) + .build(); + return create(ex, problem, request); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/FieldErrorVM.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/FieldErrorVM.java new file mode 100644 index 0000000000..4e14b33d09 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/FieldErrorVM.java @@ -0,0 +1,33 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +import java.io.Serializable; + +public class FieldErrorVM implements Serializable { + + private static final long serialVersionUID = 1L; + + private final String objectName; + + private final String field; + + private final String message; + + public FieldErrorVM(String dto, String field, String message) { + this.objectName = dto; + this.field = field; + this.message = message; + } + + public String getObjectName() { + return objectName; + } + + public String getField() { + return field; + } + + public String getMessage() { + return message; + } + +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/InternalServerErrorException.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/InternalServerErrorException.java new file mode 100644 index 0000000000..4744eee829 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/InternalServerErrorException.java @@ -0,0 +1,16 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +/** + * Simple exception with a message, that returns an Internal Server Error code. + */ +public class InternalServerErrorException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + public InternalServerErrorException(String message) { + super(ErrorConstants.DEFAULT_TYPE, message, Status.INTERNAL_SERVER_ERROR); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/InvalidPasswordException.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/InvalidPasswordException.java new file mode 100644 index 0000000000..fa258a1430 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/InvalidPasswordException.java @@ -0,0 +1,13 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +public class InvalidPasswordException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + public InvalidPasswordException() { + super(ErrorConstants.INVALID_PASSWORD_TYPE, "Incorrect password", Status.BAD_REQUEST); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/LoginAlreadyUsedException.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/LoginAlreadyUsedException.java new file mode 100644 index 0000000000..d52fcd4477 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/LoginAlreadyUsedException.java @@ -0,0 +1,10 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +public class LoginAlreadyUsedException extends BadRequestAlertException { + + private static final long serialVersionUID = 1L; + + public LoginAlreadyUsedException() { + super(ErrorConstants.LOGIN_ALREADY_USED_TYPE, "Login name already used!", "userManagement", "userexists"); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/package-info.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/package-info.java new file mode 100644 index 0000000000..bb1e69db80 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/errors/package-info.java @@ -0,0 +1,6 @@ +/** + * Specific errors used with Zalando's "problem-spring-web" library. + * + * More information on https://github.com/zalando/problem-spring-web + */ +package com.baeldung.jhipster.quotes.web.rest.errors; diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/package-info.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/package-info.java new file mode 100644 index 0000000000..a7f972195b --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring MVC REST controllers. + */ +package com.baeldung.jhipster.quotes.web.rest; diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/util/HeaderUtil.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/util/HeaderUtil.java new file mode 100644 index 0000000000..ef7baf0687 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/util/HeaderUtil.java @@ -0,0 +1,45 @@ +package com.baeldung.jhipster.quotes.web.rest.util; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpHeaders; + +/** + * Utility class for HTTP headers creation. + */ +public final class HeaderUtil { + + private static final Logger log = LoggerFactory.getLogger(HeaderUtil.class); + + private static final String APPLICATION_NAME = "quotesApp"; + + private HeaderUtil() { + } + + public static HttpHeaders createAlert(String message, String param) { + HttpHeaders headers = new HttpHeaders(); + headers.add("X-" + APPLICATION_NAME + "-alert", message); + headers.add("X-" + APPLICATION_NAME + "-params", param); + return headers; + } + + public static HttpHeaders createEntityCreationAlert(String entityName, String param) { + return createAlert(APPLICATION_NAME + "." + entityName + ".created", param); + } + + public static HttpHeaders createEntityUpdateAlert(String entityName, String param) { + return createAlert(APPLICATION_NAME + "." + entityName + ".updated", param); + } + + public static HttpHeaders createEntityDeletionAlert(String entityName, String param) { + return createAlert(APPLICATION_NAME + "." + entityName + ".deleted", param); + } + + public static HttpHeaders createFailureAlert(String entityName, String errorKey, String defaultMessage) { + log.error("Entity processing failed, {}", defaultMessage); + HttpHeaders headers = new HttpHeaders(); + headers.add("X-" + APPLICATION_NAME + "-error", "error." + errorKey); + headers.add("X-" + APPLICATION_NAME + "-params", entityName); + return headers; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/util/PaginationUtil.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/util/PaginationUtil.java new file mode 100644 index 0000000000..fb74b16ab8 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/util/PaginationUtil.java @@ -0,0 +1,45 @@ +package com.baeldung.jhipster.quotes.web.rest.util; + +import org.springframework.data.domain.Page; +import org.springframework.http.HttpHeaders; +import org.springframework.web.util.UriComponentsBuilder; + +/** + * Utility class for handling pagination. + * + *

+ * Pagination uses the same principles as the GitHub API, + * and follow RFC 5988 (Link header). + */ +public final class PaginationUtil { + + private PaginationUtil() { + } + + public static HttpHeaders generatePaginationHttpHeaders(Page page, String baseUrl) { + + HttpHeaders headers = new HttpHeaders(); + headers.add("X-Total-Count", Long.toString(page.getTotalElements())); + String link = ""; + if ((page.getNumber() + 1) < page.getTotalPages()) { + link = "<" + generateUri(baseUrl, page.getNumber() + 1, page.getSize()) + ">; rel=\"next\","; + } + // prev link + if ((page.getNumber()) > 0) { + link += "<" + generateUri(baseUrl, page.getNumber() - 1, page.getSize()) + ">; rel=\"prev\","; + } + // last and first link + int lastPage = 0; + if (page.getTotalPages() > 0) { + lastPage = page.getTotalPages() - 1; + } + link += "<" + generateUri(baseUrl, lastPage, page.getSize()) + ">; rel=\"last\","; + link += "<" + generateUri(baseUrl, 0, page.getSize()) + ">; rel=\"first\""; + headers.add(HttpHeaders.LINK, link); + return headers; + } + + private static String generateUri(String baseUrl, int page, int size) { + return UriComponentsBuilder.fromUriString(baseUrl).queryParam("page", page).queryParam("size", size).toUriString(); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/vm/LoggerVM.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/vm/LoggerVM.java new file mode 100644 index 0000000000..6e6e8a7f99 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/vm/LoggerVM.java @@ -0,0 +1,46 @@ +package com.baeldung.jhipster.quotes.web.rest.vm; + +import ch.qos.logback.classic.Logger; + +/** + * View Model object for storing a Logback logger. + */ +public class LoggerVM { + + private String name; + + private String level; + + public LoggerVM(Logger logger) { + this.name = logger.getName(); + this.level = logger.getEffectiveLevel().toString(); + } + + public LoggerVM() { + // Empty public constructor used by Jackson. + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLevel() { + return level; + } + + public void setLevel(String level) { + this.level = level; + } + + @Override + public String toString() { + return "LoggerVM{" + + "name='" + name + '\'' + + ", level='" + level + '\'' + + '}'; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/vm/package-info.java b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/vm/package-info.java new file mode 100644 index 0000000000..64bc8f241c --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/java/com/baeldung/jhipster/quotes/web/rest/vm/package-info.java @@ -0,0 +1,4 @@ +/** + * View Models used by Spring MVC REST controllers. + */ +package com.baeldung.jhipster.quotes.web.rest.vm; diff --git a/jhipster/jhipster-uaa/quotes/src/main/jib/entrypoint.sh b/jhipster/jhipster-uaa/quotes/src/main/jib/entrypoint.sh new file mode 100644 index 0000000000..9a369e8cf8 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/jib/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} +exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -cp /app/resources/:/app/classes/:/app/libs/* "com.baeldung.jhipster.quotes.QuotesApp" "$@" diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/.h2.server.properties b/jhipster/jhipster-uaa/quotes/src/main/resources/.h2.server.properties new file mode 100644 index 0000000000..c13694dfe9 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/.h2.server.properties @@ -0,0 +1,5 @@ +#H2 Server Properties +0=JHipster H2 (Disk)|org.h2.Driver|jdbc\:h2\:file\:./target/h2db/db/quotes|quotes +webAllowOthers=true +webPort=8082 +webSSL=false diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/banner.txt b/jhipster/jhipster-uaa/quotes/src/main/resources/banner.txt new file mode 100644 index 0000000000..e0bc55aaff --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + + ${AnsiColor.GREEN} ██╗${AnsiColor.RED} ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗ + ${AnsiColor.GREEN} ██║${AnsiColor.RED} ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗ + ${AnsiColor.GREEN} ██║${AnsiColor.RED} ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝ + ${AnsiColor.GREEN}██╗ ██║${AnsiColor.RED} ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ + ${AnsiColor.GREEN}╚██████╔╝${AnsiColor.RED} ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ + ${AnsiColor.GREEN} ╚═════╝ ${AnsiColor.RED} ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ + +${AnsiColor.BRIGHT_BLUE}:: JHipster 🤓 :: Running Spring Boot ${spring-boot.version} :: +:: https://www.jhipster.tech ::${AnsiColor.DEFAULT} diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/config/application-dev.yml b/jhipster/jhipster-uaa/quotes/src/main/resources/config/application-dev.yml new file mode 100644 index 0000000000..19a3192ef9 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/config/application-dev.yml @@ -0,0 +1,159 @@ +# =================================================================== +# Spring Boot configuration for the "dev" profile. +# +# This configuration overrides the application.yml file. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +logging: + level: + ROOT: DEBUG + io.github.jhipster: DEBUG + com.baeldung.jhipster.quotes: DEBUG + +eureka: + instance: + prefer-ip-address: true + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@localhost:8761/eureka/ + +spring: + profiles: + active: dev + include: + - swagger + # Uncomment to activate TLS for the dev profile + #- tls + devtools: + restart: + enabled: true + livereload: + enabled: false # we use Webpack dev server + BrowserSync for livereload + jackson: + serialization.indent_output: true + datasource: + type: com.zaxxer.hikari.HikariDataSource + url: jdbc:h2:file:./target/h2db/db/quotes;DB_CLOSE_DELAY=-1 + username: quotes + password: + hikari: + auto-commit: false + h2: + console: + enabled: false + jpa: + database-platform: io.github.jhipster.domain.util.FixedH2Dialect + database: H2 + show-sql: true + properties: + hibernate.id.new_generator_mappings: true + hibernate.connection.provider_disables_autocommit: true + hibernate.cache.use_second_level_cache: true + hibernate.cache.use_query_cache: false + hibernate.generate_statistics: true + hibernate.cache.region.factory_class: com.hazelcast.hibernate.HazelcastCacheRegionFactory + hibernate.cache.hazelcast.instance_name: quotes + hibernate.cache.use_minimal_puts: true + hibernate.cache.hazelcast.use_lite_member: true + liquibase: + contexts: dev + mail: + host: localhost + port: 25 + username: + password: + messages: + cache-duration: PT1S # 1 second, see the ISO 8601 standard + thymeleaf: + cache: false + sleuth: + sampler: + percentage: 1 # report 100% of traces + zipkin: # Use the "zipkin" Maven profile to have the Spring Cloud Zipkin dependencies + base-url: http://localhost:9411 + enabled: false + locator: + discovery: + enabled: true + +server: + port: 8081 + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + http: + version: V_1_1 # To use HTTP/2 you will need to activate TLS (see application-tls.yml) + cache: # Cache configuration + hazelcast: # Hazelcast distributed cache + time-to-live-seconds: 3600 + backup-count: 1 + management-center: # Full reference is available at: http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html + enabled: false + update-interval: 3 + url: http://localhost:8180/mancenter + # CORS is disabled by default on microservices, as you should access them through a gateway. + # If you want to enable it, please uncomment the configuration below. + # cors: + # allowed-origins: "*" + # allowed-methods: "*" + # allowed-headers: "*" + # exposed-headers: "Authorization,Link,X-Total-Count" + # allow-credentials: true + # max-age: 1800 + security: + client-authorization: + access-token-uri: http://uaa/oauth/token + token-service-id: uaa + client-id: internal + client-secret: internal + mail: # specific JHipster mail property, for standard properties see MailProperties + from: quotes@localhost + base-url: http://127.0.0.1:8081 + metrics: # DropWizard Metrics configuration, used by MetricsConfiguration + jmx: + enabled: true + logs: # Reports Dropwizard metrics in the logs + enabled: false + report-frequency: 60 # in seconds + logging: + logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration + enabled: false + host: localhost + port: 5000 + queue-size: 512 +oauth2: + signature-verification: + public-key-endpoint-uri: http://uaa/oauth/token_key + #ttl for public keys to verify JWT tokens (in ms) + ttl: 3600000 + #max. rate at which public keys will be fetched (in ms) + public-key-refresh-rate-limit: 10000 + web-client-configuration: + #keep in sync with UAA configuration + client-id: web_app + secret: changeit + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/config/application-prod.yml b/jhipster/jhipster-uaa/quotes/src/main/resources/config/application-prod.yml new file mode 100644 index 0000000000..b9cd66ece3 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/config/application-prod.yml @@ -0,0 +1,167 @@ +# =================================================================== +# Spring Boot configuration for the "prod" profile. +# +# This configuration overrides the application.yml file. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +logging: + level: + ROOT: INFO + com.baeldung.jhipster.quotes: INFO + io.github.jhipster: INFO + +eureka: + instance: + prefer-ip-address: true + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@localhost:8761/eureka/ + +spring: + devtools: + restart: + enabled: false + livereload: + enabled: false + datasource: + type: com.zaxxer.hikari.HikariDataSource + url: jdbc:mysql://localhost:3306/quotes?useUnicode=true&characterEncoding=utf8&useSSL=false + username: root + password: + hikari: + auto-commit: false + data-source-properties: + cachePrepStmts: true + prepStmtCacheSize: 250 + prepStmtCacheSqlLimit: 2048 + useServerPrepStmts: true + jpa: + database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + database: MYSQL + show-sql: false + properties: + hibernate.id.new_generator_mappings: true + hibernate.connection.provider_disables_autocommit: true + hibernate.cache.use_second_level_cache: true + hibernate.cache.use_query_cache: false + hibernate.generate_statistics: false + hibernate.cache.region.factory_class: com.hazelcast.hibernate.HazelcastCacheRegionFactory + hibernate.cache.hazelcast.instance_name: quotes + hibernate.cache.use_minimal_puts: true + hibernate.cache.hazelcast.use_lite_member: true + liquibase: + contexts: prod + mail: + host: localhost + port: 25 + username: + password: + thymeleaf: + cache: true + sleuth: + sampler: + percentage: 1 # report 100% of traces + zipkin: # Use the "zipkin" Maven profile to have the Spring Cloud Zipkin dependencies + base-url: http://localhost:9411 + enabled: false + locator: + discovery: + enabled: true + +# =================================================================== +# To enable TLS in production, generate a certificate using: +# keytool -genkey -alias quotes -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650 +# +# You can also use Let's Encrypt: +# https://maximilian-boehm.com/hp2121/Create-a-Java-Keystore-JKS-from-Let-s-Encrypt-Certificates.htm +# +# Then, modify the server.ssl properties so your "server" configuration looks like: +# +# server: +# port: 443 +# ssl: +# key-store: classpath:config/tls/keystore.p12 +# key-store-password: password +# key-store-type: PKCS12 +# key-alias: quotes +# # The ciphers suite enforce the security by deactivating some old and deprecated SSL cipher, this list was tested against SSL Labs (https://www.ssllabs.com/ssltest/) +# ciphers: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 ,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 ,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,TLS_RSA_WITH_CAMELLIA_128_CBC_SHA +# =================================================================== +server: + port: 8081 + compression: + enabled: true + mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json + min-response-size: 1024 + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + http: + version: V_1_1 # To use HTTP/2 you will need SSL support (see above the "server.ssl" configuration) + cache: # Used by the CachingHttpHeadersFilter + timeToLiveInDays: 1461 + cache: # Cache configuration + hazelcast: # Hazelcast distributed cache + time-to-live-seconds: 3600 + backup-count: 1 + management-center: # Full reference is available at: http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html + enabled: false + update-interval: 3 + url: + security: + client-authorization: + access-token-uri: http://uaa/oauth/token + token-service-id: uaa + client-id: internal + client-secret: internal + mail: # specific JHipster mail property, for standard properties see MailProperties + from: quotes@localhost + base-url: http://my-server-url-to-change # Modify according to your server's URL + metrics: # DropWizard Metrics configuration, used by MetricsConfiguration + jmx: + enabled: true + logs: # Reports Dropwizard metrics in the logs + enabled: false + report-frequency: 60 # in seconds + logging: + logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration + enabled: false + host: localhost + port: 5000 + queue-size: 512 +oauth2: + signature-verification: + public-key-endpoint-uri: http://uaa/oauth/token_key + #ttl for public keys to verify JWT tokens (in ms) + ttl: 3600000 + #max. rate at which public keys will be fetched (in ms) + public-key-refresh-rate-limit: 10000 + web-client-configuration: + #change client secret in production, keep in sync with UAA configuration + client-id: web_app + secret: changeit + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/config/application-tls.yml b/jhipster/jhipster-uaa/quotes/src/main/resources/config/application-tls.yml new file mode 100644 index 0000000000..e082c8f455 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/config/application-tls.yml @@ -0,0 +1,18 @@ +# =================================================================== +# Activate this profile to enable TLS and HTTP/2. +# +# JHipster has generated a self-signed certificate, which will be used to encrypt traffic. +# As your browser will not understand this certificate, you will need to import it. +# +# Another (easiest) solution with Chrome is to enable the "allow-insecure-localhost" flag +# at chrome://flags/#allow-insecure-localhost +# =================================================================== +server: + ssl: + key-store: classpath:config/tls/keystore.p12 + key-store-password: password + key-store-type: PKCS12 + key-alias: selfsigned +jhipster: + http: + version: V_2_0 diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/config/application.yml b/jhipster/jhipster-uaa/quotes/src/main/resources/config/application.yml new file mode 100644 index 0000000000..66c52a622a --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/config/application.yml @@ -0,0 +1,160 @@ +# =================================================================== +# Spring Boot configuration. +# +# This configuration will be overridden by the Spring profile you use, +# for example application-dev.yml if you use the "dev" profile. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +eureka: + client: + enabled: true + healthcheck: + enabled: true + fetch-registry: true + register-with-eureka: true + instance-info-replication-interval-seconds: 10 + registry-fetch-interval-seconds: 10 + instance: + appname: quotes + instanceId: quotes:${spring.application.instance-id:${random.value}} + lease-renewal-interval-in-seconds: 5 + lease-expiration-duration-in-seconds: 10 + status-page-url-path: ${management.endpoints.web.base-path}/info + health-check-url-path: ${management.endpoints.web.base-path}/health + metadata-map: + zone: primary # This is needed for the load balancer + profile: ${spring.profiles.active} + version: ${info.project.version:} + git-version: ${git.commit.id.describe:} + git-commit: ${git.commit.id.abbrev:} + git-branch: ${git.branch:} +ribbon: + eureka: + enabled: true +feign: + hystrix: + enabled: true +# client: +# config: +# default: +# connectTimeout: 5000 +# readTimeout: 5000 + +# See https://github.com/Netflix/Hystrix/wiki/Configuration +hystrix: + command: + default: + execution: + isolation: + strategy: SEMAPHORE +# See https://github.com/spring-cloud/spring-cloud-netflix/issues/1330 +# thread: +# timeoutInMilliseconds: 10000 + shareSecurityContext: true + +management: + endpoints: + web: + base-path: /management + exposure: + include: ["configprops", "env", "health", "info", "threaddump", "logfile" ] + endpoint: + health: + show-details: when_authorized + info: + git: + mode: full + health: + mail: + enabled: false # When using the MailService, configure an SMTP server and set this to true + metrics: + enabled: false # http://micrometer.io/ is disabled by default, as we use http://metrics.dropwizard.io/ instead + +spring: + application: + name: quotes + jpa: + open-in-view: false + hibernate: + ddl-auto: none + naming: + physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy + implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy + messages: + basename: i18n/messages + mvc: + favicon: + enabled: false + thymeleaf: + mode: HTML +security: + oauth2: + resource: + filter-order: 3 + +server: + servlet: + session: + cookie: + http-only: true + +# Properties to be exposed on the /info management endpoint +info: + # Comma separated list of profiles that will trigger the ribbon to show + display-ribbon-on-profiles: "dev" + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + async: + core-pool-size: 2 + max-pool-size: 50 + queue-capacity: 10000 + # By default CORS is disabled. Uncomment to enable. + #cors: + #allowed-origins: "*" + #allowed-methods: "*" + #allowed-headers: "*" + #exposed-headers: "Authorization,Link,X-Total-Count" + #allow-credentials: true + #max-age: 1800 + mail: + from: quotes@localhost + swagger: + default-include-pattern: /api/.* + title: quotes API + description: quotes API documentation + version: 0.0.1 + terms-of-service-url: + contact-name: + contact-url: + contact-email: + license: + license-url: + +logging: + file: target/quotes.log + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/config/bootstrap-prod.yml b/jhipster/jhipster-uaa/quotes/src/main/resources/config/bootstrap-prod.yml new file mode 100644 index 0000000000..3a262f4f66 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/config/bootstrap-prod.yml @@ -0,0 +1,22 @@ +# =================================================================== +# Spring Cloud Config bootstrap configuration for the "prod" profile +# =================================================================== + +spring: + cloud: + config: + fail-fast: true + retry: + initial-interval: 1000 + max-interval: 2000 + max-attempts: 100 + uri: http://admin:${jhipster.registry.password}@localhost:8761/config + # name of the config server's property source (file.yml) that we want to use + name: quotes + profile: prod # profile(s) of the property source + label: master # toggle to switch to a different version of the configuration as stored in git + # it can be set to any label, branch or commit of the configuration source Git repository + +jhipster: + registry: + password: admin diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/config/bootstrap.yml b/jhipster/jhipster-uaa/quotes/src/main/resources/config/bootstrap.yml new file mode 100644 index 0000000000..e981125e34 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/config/bootstrap.yml @@ -0,0 +1,26 @@ +# =================================================================== +# Spring Cloud Config bootstrap configuration for the "dev" profile +# In prod profile, properties will be overwriten by the ones defined in bootstrap-prod.yml +# =================================================================== + +jhipster: + registry: + password: admin + +spring: + application: + name: quotes + profiles: + # The commented value for `active` can be replaced with valid Spring profiles to load. + # Otherwise, it will be filled in by maven when building the WAR file + # Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS` + active: #spring.profiles.active# + cloud: + config: + fail-fast: false # if not in "prod" profile, do not force to use Spring Cloud Config + uri: http://admin:${jhipster.registry.password}@localhost:8761/config + # name of the config server's property source (file.yml) that we want to use + name: quotes + profile: dev # profile(s) of the property source + label: master # toggle to switch to a different version of the configuration as stored in git + # it can be set to any label, branch or commit of the configuration source Git repository diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml b/jhipster/jhipster-uaa/quotes/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml new file mode 100644 index 0000000000..d75921613c --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/config/liquibase/changelog/20181019033648_added_entity_Quote.xml b/jhipster/jhipster-uaa/quotes/src/main/resources/config/liquibase/changelog/20181019033648_added_entity_Quote.xml new file mode 100644 index 0000000000..d5b8fecc0d --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/config/liquibase/changelog/20181019033648_added_entity_Quote.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/config/liquibase/master.xml b/jhipster/jhipster-uaa/quotes/src/main/resources/config/liquibase/master.xml new file mode 100644 index 0000000000..e260e927a4 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/config/liquibase/master.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/config/tls/keystore.p12 b/jhipster/jhipster-uaa/quotes/src/main/resources/config/tls/keystore.p12 new file mode 100644 index 0000000000..92ec1f93f0 Binary files /dev/null and b/jhipster/jhipster-uaa/quotes/src/main/resources/config/tls/keystore.p12 differ diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/i18n/messages.properties b/jhipster/jhipster-uaa/quotes/src/main/resources/i18n/messages.properties new file mode 100644 index 0000000000..eb71dfa8e3 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/i18n/messages.properties @@ -0,0 +1,21 @@ +# Error page +error.title=Your request cannot be processed +error.subtitle=Sorry, an error has occurred. +error.status=Status: +error.message=Message: + +# Activation email +email.activation.title=quotes account activation +email.activation.greeting=Dear {0} +email.activation.text1=Your quotes account has been created, please click on the URL below to activate it: +email.activation.text2=Regards, +email.signature=quotes Team. + +# Creation email +email.creation.text1=Your quotes account has been created, please click on the URL below to access it: + +# Reset email +email.reset.title=quotes password reset +email.reset.greeting=Dear {0} +email.reset.text1=For your quotes account a password reset was requested, please click on the URL below to reset it: +email.reset.text2=Regards, diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/i18n/messages_en.properties b/jhipster/jhipster-uaa/quotes/src/main/resources/i18n/messages_en.properties new file mode 100644 index 0000000000..eb71dfa8e3 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/i18n/messages_en.properties @@ -0,0 +1,21 @@ +# Error page +error.title=Your request cannot be processed +error.subtitle=Sorry, an error has occurred. +error.status=Status: +error.message=Message: + +# Activation email +email.activation.title=quotes account activation +email.activation.greeting=Dear {0} +email.activation.text1=Your quotes account has been created, please click on the URL below to activate it: +email.activation.text2=Regards, +email.signature=quotes Team. + +# Creation email +email.creation.text1=Your quotes account has been created, please click on the URL below to access it: + +# Reset email +email.reset.title=quotes password reset +email.reset.greeting=Dear {0} +email.reset.text1=For your quotes account a password reset was requested, please click on the URL below to reset it: +email.reset.text2=Regards, diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/logback-spring.xml b/jhipster/jhipster-uaa/quotes/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..a30ab8c1d2 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/logback-spring.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/static/index.html b/jhipster/jhipster-uaa/quotes/src/main/resources/static/index.html new file mode 100644 index 0000000000..46c264463c --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/static/index.html @@ -0,0 +1,103 @@ + + + + + JHipster microservice homepage + + + +

+

Welcome, Java Hipster!

+ +

This application is a microservice, which has been generated using JHipster.

+ +
    +
  • It does not have a front-end. The front-end should be generated on a JHipster gateway
  • +
  • It is serving REST APIs, under the '/api' URLs.
  • +
  • Swagger documentation endpoint for those APIs is at /v2/api-docs, but if you want access to the full Swagger UI, you should use a JHipster gateway, which will serve as an API developer portal
  • +
+ +

+ If you have any question on JHipster: +

+ + + +

+ If you like JHipster, don't forget to give us a star on GitHub! +

+ +
+ + diff --git a/jhipster/jhipster-uaa/quotes/src/main/resources/templates/error.html b/jhipster/jhipster-uaa/quotes/src/main/resources/templates/error.html new file mode 100644 index 0000000000..08616bcf1e --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/main/resources/templates/error.html @@ -0,0 +1,163 @@ + + + + + + Your request cannot be processed + + + +
+

Your request cannot be processed :(

+ +

Sorry, an error has occurred.

+ + Status:  ()
+ + Message: 
+
+ + + +
+ + diff --git a/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/config/SecurityBeanOverrideConfiguration.java b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/config/SecurityBeanOverrideConfiguration.java new file mode 100644 index 0000000000..f82b7fafe6 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/config/SecurityBeanOverrideConfiguration.java @@ -0,0 +1,35 @@ +package com.baeldung.jhipster.quotes.config; + +import org.springframework.cloud.client.loadbalancer.RestTemplateCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; +import org.springframework.web.client.RestTemplate; + +/** + * Overrides UAA specific beans, so they do not interfere the testing + * This configuration must be included in @SpringBootTest in order to take effect. + */ +@Configuration +public class SecurityBeanOverrideConfiguration { + + @Bean + @Primary + public TokenStore tokenStore() { + return null; + } + + @Bean + @Primary + public JwtAccessTokenConverter jwtAccessTokenConverter() { + return null; + } + + @Bean + @Primary + public RestTemplate loadBalancedRestTemplate(RestTemplateCustomizer customizer) { + return null; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/config/WebConfigurerTest.java b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/config/WebConfigurerTest.java new file mode 100644 index 0000000000..5a80d9befb --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/config/WebConfigurerTest.java @@ -0,0 +1,197 @@ +package com.baeldung.jhipster.quotes.config; + +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.servlet.InstrumentedFilter; +import com.codahale.metrics.servlets.MetricsServlet; +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.JHipsterProperties; +import io.undertow.Undertow; +import io.undertow.Undertow.Builder; +import io.undertow.UndertowOptions; + +import org.h2.server.web.WebServlet; +import org.junit.Before; +import org.junit.Test; +import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; +import org.springframework.http.HttpHeaders; +import org.springframework.mock.env.MockEnvironment; +import org.springframework.mock.web.MockServletContext; +import org.springframework.test.util.ReflectionTestUtils; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.xnio.OptionMap; + +import javax.servlet.*; +import java.util.*; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.*; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.options; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * Unit tests for the WebConfigurer class. + * + * @see WebConfigurer + */ +public class WebConfigurerTest { + + private WebConfigurer webConfigurer; + + private MockServletContext servletContext; + + private MockEnvironment env; + + private JHipsterProperties props; + + private MetricRegistry metricRegistry; + + @Before + public void setup() { + servletContext = spy(new MockServletContext()); + doReturn(mock(FilterRegistration.Dynamic.class)) + .when(servletContext).addFilter(anyString(), any(Filter.class)); + doReturn(mock(ServletRegistration.Dynamic.class)) + .when(servletContext).addServlet(anyString(), any(Servlet.class)); + + env = new MockEnvironment(); + props = new JHipsterProperties(); + + webConfigurer = new WebConfigurer(env, props); + metricRegistry = new MetricRegistry(); + webConfigurer.setMetricRegistry(metricRegistry); + } + + @Test + public void testStartUpProdServletContext() throws ServletException { + env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); + webConfigurer.onStartup(servletContext); + + assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry); + assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry); + verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class)); + verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class)); + verify(servletContext, never()).addServlet(eq("H2Console"), any(WebServlet.class)); + } + + @Test + public void testStartUpDevServletContext() throws ServletException { + env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); + webConfigurer.onStartup(servletContext); + + assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry); + assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry); + verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class)); + verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class)); + verify(servletContext).addServlet(eq("H2Console"), any(WebServlet.class)); + } + + @Test + public void testCustomizeServletContainer() { + env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); + UndertowServletWebServerFactory container = new UndertowServletWebServerFactory(); + webConfigurer.customize(container); + assertThat(container.getMimeMappings().get("abs")).isEqualTo("audio/x-mpeg"); + assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html;charset=utf-8"); + assertThat(container.getMimeMappings().get("json")).isEqualTo("text/html;charset=utf-8"); + + Builder builder = Undertow.builder(); + container.getBuilderCustomizers().forEach(c -> c.customize(builder)); + OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); + assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isNull(); + } + + @Test + public void testUndertowHttp2Enabled() { + props.getHttp().setVersion(JHipsterProperties.Http.Version.V_2_0); + UndertowServletWebServerFactory container = new UndertowServletWebServerFactory(); + webConfigurer.customize(container); + Builder builder = Undertow.builder(); + container.getBuilderCustomizers().forEach(c -> c.customize(builder)); + OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); + assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isTrue(); + } + + @Test + public void testCorsFilterOnApiPath() throws Exception { + props.getCors().setAllowedOrigins(Collections.singletonList("*")); + props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); + props.getCors().setAllowedHeaders(Collections.singletonList("*")); + props.getCors().setMaxAge(1800L); + props.getCors().setAllowCredentials(true); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + options("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com") + .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "POST")) + .andExpect(status().isOk()) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")) + .andExpect(header().string(HttpHeaders.VARY, "Origin")) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,POST,PUT,DELETE")) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true")) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "1800")); + + mockMvc.perform( + get("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")); + } + + @Test + public void testCorsFilterOnOtherPath() throws Exception { + props.getCors().setAllowedOrigins(Collections.singletonList("*")); + props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); + props.getCors().setAllowedHeaders(Collections.singletonList("*")); + props.getCors().setMaxAge(1800L); + props.getCors().setAllowCredentials(true); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + get("/test/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + } + + @Test + public void testCorsFilterDeactivated() throws Exception { + props.getCors().setAllowedOrigins(null); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + get("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + } + + @Test + public void testCorsFilterDeactivated2() throws Exception { + props.getCors().setAllowedOrigins(new ArrayList<>()); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + get("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/config/WebConfigurerTestController.java b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/config/WebConfigurerTestController.java new file mode 100644 index 0000000000..957a616048 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/config/WebConfigurerTestController.java @@ -0,0 +1,16 @@ +package com.baeldung.jhipster.quotes.config; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class WebConfigurerTestController { + + @GetMapping("/api/test-cors") + public void testCorsOnApiPath() { + } + + @GetMapping("/test/test-cors") + public void testCorsOnOtherPath() { + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/security/OAuth2TokenMockUtil.java b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/security/OAuth2TokenMockUtil.java new file mode 100644 index 0000000000..0c8e043678 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/security/OAuth2TokenMockUtil.java @@ -0,0 +1,83 @@ +package com.baeldung.jhipster.quotes.security; + +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; +import org.springframework.security.oauth2.provider.OAuth2Authentication; +import org.springframework.security.oauth2.provider.OAuth2Request; +import org.springframework.security.oauth2.provider.token.ResourceServerTokenServices; +import org.springframework.stereotype.Component; +import org.springframework.test.web.servlet.request.RequestPostProcessor; + +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import java.util.stream.Collectors; + +import static org.mockito.BDDMockito.given; + +/** + * A bean providing simple mocking of OAuth2 access tokens for security integration tests. + */ +@Component +public class OAuth2TokenMockUtil { + + @MockBean + private ResourceServerTokenServices tokenServices; + + private OAuth2Authentication createAuthentication(String username, Set scopes, Set roles) { + List authorities = roles.stream() + .map(SimpleGrantedAuthority::new) + .collect(Collectors.toList()); + + User principal = new User(username, "test", true, true, true, true, authorities); + Authentication authentication = new UsernamePasswordAuthenticationToken(principal, principal.getPassword(), + principal.getAuthorities()); + + // Create the authorization request and OAuth2Authentication object + OAuth2Request authRequest = new OAuth2Request(null, "testClient", null, true, scopes, null, null, null, + null); + return new OAuth2Authentication(authRequest, authentication); + } + + public RequestPostProcessor oauth2Authentication(String username, Set scopes, Set roles) { + String uuid = String.valueOf(UUID.randomUUID()); + + given(tokenServices.loadAuthentication(uuid)) + .willReturn(createAuthentication(username, scopes, roles)); + + given(tokenServices.readAccessToken(uuid)).willReturn(new DefaultOAuth2AccessToken(uuid)); + + return new OAuth2PostProcessor(uuid); + } + + public RequestPostProcessor oauth2Authentication(String username, Set scopes) { + return oauth2Authentication(username, scopes, Collections.emptySet()); + } + + public RequestPostProcessor oauth2Authentication(String username) { + return oauth2Authentication(username, Collections.emptySet()); + } + + public static class OAuth2PostProcessor implements RequestPostProcessor { + + private String token; + + public OAuth2PostProcessor(String token) { + this.token = token; + } + + @Override + public MockHttpServletRequest postProcessRequest(MockHttpServletRequest mockHttpServletRequest) { + mockHttpServletRequest.addHeader("Authorization", "Bearer " + token); + + return mockHttpServletRequest; + } + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/LogsResourceIntTest.java b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/LogsResourceIntTest.java new file mode 100644 index 0000000000..56cda7d3d5 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/LogsResourceIntTest.java @@ -0,0 +1,67 @@ +package com.baeldung.jhipster.quotes.web.rest; + +import com.baeldung.jhipster.quotes.QuotesApp; +import com.baeldung.jhipster.quotes.config.SecurityBeanOverrideConfiguration; +import com.baeldung.jhipster.quotes.web.rest.vm.LoggerVM; +import ch.qos.logback.classic.AsyncAppender; +import ch.qos.logback.classic.LoggerContext; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.slf4j.LoggerFactory; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.http.MediaType; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * Test class for the LogsResource REST controller. + * + * @see LogsResource + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, QuotesApp.class}) +public class LogsResourceIntTest { + + private MockMvc restLogsMockMvc; + + @Before + public void setup() { + LogsResource logsResource = new LogsResource(); + this.restLogsMockMvc = MockMvcBuilders + .standaloneSetup(logsResource) + .build(); + } + + @Test + public void getAllLogs() throws Exception { + restLogsMockMvc.perform(get("/management/logs")) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)); + } + + @Test + public void changeLogs() throws Exception { + LoggerVM logger = new LoggerVM(); + logger.setLevel("INFO"); + logger.setName("ROOT"); + + restLogsMockMvc.perform(put("/management/logs") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(logger))) + .andExpect(status().isNoContent()); + } + + @Test + public void testLogstashAppender() { + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + assertThat(context.getLogger("ROOT").getAppender("ASYNC_LOGSTASH")).isInstanceOf(AsyncAppender.class); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/QuoteResourceIntTest.java b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/QuoteResourceIntTest.java new file mode 100644 index 0000000000..587a273183 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/QuoteResourceIntTest.java @@ -0,0 +1,546 @@ +package com.baeldung.jhipster.quotes.web.rest; + +import com.baeldung.jhipster.quotes.QuotesApp; + +import com.baeldung.jhipster.quotes.config.SecurityBeanOverrideConfiguration; + +import com.baeldung.jhipster.quotes.domain.Quote; +import com.baeldung.jhipster.quotes.repository.QuoteRepository; +import com.baeldung.jhipster.quotes.service.QuoteService; +import com.baeldung.jhipster.quotes.service.dto.QuoteDTO; +import com.baeldung.jhipster.quotes.service.mapper.QuoteMapper; +import com.baeldung.jhipster.quotes.web.rest.errors.ExceptionTranslator; +import com.baeldung.jhipster.quotes.service.dto.QuoteCriteria; +import com.baeldung.jhipster.quotes.service.QuoteQueryService; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.MockitoAnnotations; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.data.web.PageableHandlerMethodArgumentResolver; +import org.springframework.http.MediaType; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.springframework.transaction.annotation.Transactional; + +import javax.persistence.EntityManager; +import java.math.BigDecimal; +import java.time.Instant; +import java.time.ZonedDateTime; +import java.time.ZoneOffset; +import java.time.ZoneId; +import java.util.List; + + +import static com.baeldung.jhipster.quotes.web.rest.TestUtil.sameInstant; +import static com.baeldung.jhipster.quotes.web.rest.TestUtil.createFormattingConversionService; +import static org.assertj.core.api.Assertions.assertThat; +import static org.hamcrest.Matchers.hasItem; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; + +/** + * Test class for the QuoteResource REST controller. + * + * @see QuoteResource + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, QuotesApp.class}) +public class QuoteResourceIntTest { + + private static final String DEFAULT_SYMBOL = "AAAAAAAAAA"; + private static final String UPDATED_SYMBOL = "BBBBBBBBBB"; + + private static final BigDecimal DEFAULT_PRICE = new BigDecimal(1); + private static final BigDecimal UPDATED_PRICE = new BigDecimal(2); + + private static final ZonedDateTime DEFAULT_LAST_TRADE = ZonedDateTime.ofInstant(Instant.ofEpochMilli(0L), ZoneOffset.UTC); + private static final ZonedDateTime UPDATED_LAST_TRADE = ZonedDateTime.now(ZoneId.systemDefault()).withNano(0); + + @Autowired + private QuoteRepository quoteRepository; + + @Autowired + private QuoteMapper quoteMapper; + + @Autowired + private QuoteService quoteService; + + @Autowired + private QuoteQueryService quoteQueryService; + + @Autowired + private MappingJackson2HttpMessageConverter jacksonMessageConverter; + + @Autowired + private PageableHandlerMethodArgumentResolver pageableArgumentResolver; + + @Autowired + private ExceptionTranslator exceptionTranslator; + + @Autowired + private EntityManager em; + + private MockMvc restQuoteMockMvc; + + private Quote quote; + + @Before + public void setup() { + MockitoAnnotations.initMocks(this); + final QuoteResource quoteResource = new QuoteResource(quoteService, quoteQueryService); + this.restQuoteMockMvc = MockMvcBuilders.standaloneSetup(quoteResource) + .setCustomArgumentResolvers(pageableArgumentResolver) + .setControllerAdvice(exceptionTranslator) + .setConversionService(createFormattingConversionService()) + .setMessageConverters(jacksonMessageConverter).build(); + } + + /** + * Create an entity for this test. + * + * This is a static method, as tests for other entities might also need it, + * if they test an entity which requires the current entity. + */ + public static Quote createEntity(EntityManager em) { + Quote quote = new Quote() + .symbol(DEFAULT_SYMBOL) + .price(DEFAULT_PRICE) + .lastTrade(DEFAULT_LAST_TRADE); + return quote; + } + + @Before + public void initTest() { + quote = createEntity(em); + } + + @Test + @Transactional + public void createQuote() throws Exception { + int databaseSizeBeforeCreate = quoteRepository.findAll().size(); + + // Create the Quote + QuoteDTO quoteDTO = quoteMapper.toDto(quote); + restQuoteMockMvc.perform(post("/api/quotes") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(quoteDTO))) + .andExpect(status().isCreated()); + + // Validate the Quote in the database + List quoteList = quoteRepository.findAll(); + assertThat(quoteList).hasSize(databaseSizeBeforeCreate + 1); + Quote testQuote = quoteList.get(quoteList.size() - 1); + assertThat(testQuote.getSymbol()).isEqualTo(DEFAULT_SYMBOL); + assertThat(testQuote.getPrice()).isEqualTo(DEFAULT_PRICE); + assertThat(testQuote.getLastTrade()).isEqualTo(DEFAULT_LAST_TRADE); + } + + @Test + @Transactional + public void createQuoteWithExistingId() throws Exception { + int databaseSizeBeforeCreate = quoteRepository.findAll().size(); + + // Create the Quote with an existing ID + quote.setId(1L); + QuoteDTO quoteDTO = quoteMapper.toDto(quote); + + // An entity with an existing ID cannot be created, so this API call must fail + restQuoteMockMvc.perform(post("/api/quotes") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(quoteDTO))) + .andExpect(status().isBadRequest()); + + // Validate the Quote in the database + List quoteList = quoteRepository.findAll(); + assertThat(quoteList).hasSize(databaseSizeBeforeCreate); + } + + @Test + @Transactional + public void checkSymbolIsRequired() throws Exception { + int databaseSizeBeforeTest = quoteRepository.findAll().size(); + // set the field null + quote.setSymbol(null); + + // Create the Quote, which fails. + QuoteDTO quoteDTO = quoteMapper.toDto(quote); + + restQuoteMockMvc.perform(post("/api/quotes") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(quoteDTO))) + .andExpect(status().isBadRequest()); + + List quoteList = quoteRepository.findAll(); + assertThat(quoteList).hasSize(databaseSizeBeforeTest); + } + + @Test + @Transactional + public void checkPriceIsRequired() throws Exception { + int databaseSizeBeforeTest = quoteRepository.findAll().size(); + // set the field null + quote.setPrice(null); + + // Create the Quote, which fails. + QuoteDTO quoteDTO = quoteMapper.toDto(quote); + + restQuoteMockMvc.perform(post("/api/quotes") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(quoteDTO))) + .andExpect(status().isBadRequest()); + + List quoteList = quoteRepository.findAll(); + assertThat(quoteList).hasSize(databaseSizeBeforeTest); + } + + @Test + @Transactional + public void checkLastTradeIsRequired() throws Exception { + int databaseSizeBeforeTest = quoteRepository.findAll().size(); + // set the field null + quote.setLastTrade(null); + + // Create the Quote, which fails. + QuoteDTO quoteDTO = quoteMapper.toDto(quote); + + restQuoteMockMvc.perform(post("/api/quotes") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(quoteDTO))) + .andExpect(status().isBadRequest()); + + List quoteList = quoteRepository.findAll(); + assertThat(quoteList).hasSize(databaseSizeBeforeTest); + } + + @Test + @Transactional + public void getAllQuotes() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList + restQuoteMockMvc.perform(get("/api/quotes?sort=id,desc")) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$.[*].id").value(hasItem(quote.getId().intValue()))) + .andExpect(jsonPath("$.[*].symbol").value(hasItem(DEFAULT_SYMBOL.toString()))) + .andExpect(jsonPath("$.[*].price").value(hasItem(DEFAULT_PRICE.intValue()))) + .andExpect(jsonPath("$.[*].lastTrade").value(hasItem(sameInstant(DEFAULT_LAST_TRADE)))); + } + + @Test + @Transactional + public void getQuote() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get the quote + restQuoteMockMvc.perform(get("/api/quotes/{id}", quote.getId())) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$.id").value(quote.getId().intValue())) + .andExpect(jsonPath("$.symbol").value(DEFAULT_SYMBOL.toString())) + .andExpect(jsonPath("$.price").value(DEFAULT_PRICE.intValue())) + .andExpect(jsonPath("$.lastTrade").value(sameInstant(DEFAULT_LAST_TRADE))); + } + + @Test + @Transactional + public void getAllQuotesBySymbolIsEqualToSomething() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where symbol equals to DEFAULT_SYMBOL + defaultQuoteShouldBeFound("symbol.equals=" + DEFAULT_SYMBOL); + + // Get all the quoteList where symbol equals to UPDATED_SYMBOL + defaultQuoteShouldNotBeFound("symbol.equals=" + UPDATED_SYMBOL); + } + + @Test + @Transactional + public void getAllQuotesBySymbolIsInShouldWork() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where symbol in DEFAULT_SYMBOL or UPDATED_SYMBOL + defaultQuoteShouldBeFound("symbol.in=" + DEFAULT_SYMBOL + "," + UPDATED_SYMBOL); + + // Get all the quoteList where symbol equals to UPDATED_SYMBOL + defaultQuoteShouldNotBeFound("symbol.in=" + UPDATED_SYMBOL); + } + + @Test + @Transactional + public void getAllQuotesBySymbolIsNullOrNotNull() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where symbol is not null + defaultQuoteShouldBeFound("symbol.specified=true"); + + // Get all the quoteList where symbol is null + defaultQuoteShouldNotBeFound("symbol.specified=false"); + } + + @Test + @Transactional + public void getAllQuotesByPriceIsEqualToSomething() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where price equals to DEFAULT_PRICE + defaultQuoteShouldBeFound("price.equals=" + DEFAULT_PRICE); + + // Get all the quoteList where price equals to UPDATED_PRICE + defaultQuoteShouldNotBeFound("price.equals=" + UPDATED_PRICE); + } + + @Test + @Transactional + public void getAllQuotesByPriceIsInShouldWork() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where price in DEFAULT_PRICE or UPDATED_PRICE + defaultQuoteShouldBeFound("price.in=" + DEFAULT_PRICE + "," + UPDATED_PRICE); + + // Get all the quoteList where price equals to UPDATED_PRICE + defaultQuoteShouldNotBeFound("price.in=" + UPDATED_PRICE); + } + + @Test + @Transactional + public void getAllQuotesByPriceIsNullOrNotNull() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where price is not null + defaultQuoteShouldBeFound("price.specified=true"); + + // Get all the quoteList where price is null + defaultQuoteShouldNotBeFound("price.specified=false"); + } + + @Test + @Transactional + public void getAllQuotesByLastTradeIsEqualToSomething() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where lastTrade equals to DEFAULT_LAST_TRADE + defaultQuoteShouldBeFound("lastTrade.equals=" + DEFAULT_LAST_TRADE); + + // Get all the quoteList where lastTrade equals to UPDATED_LAST_TRADE + defaultQuoteShouldNotBeFound("lastTrade.equals=" + UPDATED_LAST_TRADE); + } + + @Test + @Transactional + public void getAllQuotesByLastTradeIsInShouldWork() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where lastTrade in DEFAULT_LAST_TRADE or UPDATED_LAST_TRADE + defaultQuoteShouldBeFound("lastTrade.in=" + DEFAULT_LAST_TRADE + "," + UPDATED_LAST_TRADE); + + // Get all the quoteList where lastTrade equals to UPDATED_LAST_TRADE + defaultQuoteShouldNotBeFound("lastTrade.in=" + UPDATED_LAST_TRADE); + } + + @Test + @Transactional + public void getAllQuotesByLastTradeIsNullOrNotNull() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where lastTrade is not null + defaultQuoteShouldBeFound("lastTrade.specified=true"); + + // Get all the quoteList where lastTrade is null + defaultQuoteShouldNotBeFound("lastTrade.specified=false"); + } + + @Test + @Transactional + public void getAllQuotesByLastTradeIsGreaterThanOrEqualToSomething() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where lastTrade greater than or equals to DEFAULT_LAST_TRADE + defaultQuoteShouldBeFound("lastTrade.greaterOrEqualThan=" + DEFAULT_LAST_TRADE); + + // Get all the quoteList where lastTrade greater than or equals to UPDATED_LAST_TRADE + defaultQuoteShouldNotBeFound("lastTrade.greaterOrEqualThan=" + UPDATED_LAST_TRADE); + } + + @Test + @Transactional + public void getAllQuotesByLastTradeIsLessThanSomething() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + // Get all the quoteList where lastTrade less than or equals to DEFAULT_LAST_TRADE + defaultQuoteShouldNotBeFound("lastTrade.lessThan=" + DEFAULT_LAST_TRADE); + + // Get all the quoteList where lastTrade less than or equals to UPDATED_LAST_TRADE + defaultQuoteShouldBeFound("lastTrade.lessThan=" + UPDATED_LAST_TRADE); + } + + /** + * Executes the search, and checks that the default entity is returned + */ + private void defaultQuoteShouldBeFound(String filter) throws Exception { + restQuoteMockMvc.perform(get("/api/quotes?sort=id,desc&" + filter)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$.[*].id").value(hasItem(quote.getId().intValue()))) + .andExpect(jsonPath("$.[*].symbol").value(hasItem(DEFAULT_SYMBOL.toString()))) + .andExpect(jsonPath("$.[*].price").value(hasItem(DEFAULT_PRICE.intValue()))) + .andExpect(jsonPath("$.[*].lastTrade").value(hasItem(sameInstant(DEFAULT_LAST_TRADE)))); + + // Check, that the count call also returns 1 + restQuoteMockMvc.perform(get("/api/quotes/count?sort=id,desc&" + filter)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(content().string("1")); + } + + /** + * Executes the search, and checks that the default entity is not returned + */ + private void defaultQuoteShouldNotBeFound(String filter) throws Exception { + restQuoteMockMvc.perform(get("/api/quotes?sort=id,desc&" + filter)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$").isArray()) + .andExpect(jsonPath("$").isEmpty()); + + // Check, that the count call also returns 0 + restQuoteMockMvc.perform(get("/api/quotes/count?sort=id,desc&" + filter)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(content().string("0")); + } + + + @Test + @Transactional + public void getNonExistingQuote() throws Exception { + // Get the quote + restQuoteMockMvc.perform(get("/api/quotes/{id}", Long.MAX_VALUE)) + .andExpect(status().isNotFound()); + } + + @Test + @Transactional + public void updateQuote() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + int databaseSizeBeforeUpdate = quoteRepository.findAll().size(); + + // Update the quote + Quote updatedQuote = quoteRepository.findById(quote.getId()).get(); + // Disconnect from session so that the updates on updatedQuote are not directly saved in db + em.detach(updatedQuote); + updatedQuote + .symbol(UPDATED_SYMBOL) + .price(UPDATED_PRICE) + .lastTrade(UPDATED_LAST_TRADE); + QuoteDTO quoteDTO = quoteMapper.toDto(updatedQuote); + + restQuoteMockMvc.perform(put("/api/quotes") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(quoteDTO))) + .andExpect(status().isOk()); + + // Validate the Quote in the database + List quoteList = quoteRepository.findAll(); + assertThat(quoteList).hasSize(databaseSizeBeforeUpdate); + Quote testQuote = quoteList.get(quoteList.size() - 1); + assertThat(testQuote.getSymbol()).isEqualTo(UPDATED_SYMBOL); + assertThat(testQuote.getPrice()).isEqualTo(UPDATED_PRICE); + assertThat(testQuote.getLastTrade()).isEqualTo(UPDATED_LAST_TRADE); + } + + @Test + @Transactional + public void updateNonExistingQuote() throws Exception { + int databaseSizeBeforeUpdate = quoteRepository.findAll().size(); + + // Create the Quote + QuoteDTO quoteDTO = quoteMapper.toDto(quote); + + // If the entity doesn't have an ID, it will throw BadRequestAlertException + restQuoteMockMvc.perform(put("/api/quotes") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(quoteDTO))) + .andExpect(status().isBadRequest()); + + // Validate the Quote in the database + List quoteList = quoteRepository.findAll(); + assertThat(quoteList).hasSize(databaseSizeBeforeUpdate); + } + + @Test + @Transactional + public void deleteQuote() throws Exception { + // Initialize the database + quoteRepository.saveAndFlush(quote); + + int databaseSizeBeforeDelete = quoteRepository.findAll().size(); + + // Get the quote + restQuoteMockMvc.perform(delete("/api/quotes/{id}", quote.getId()) + .accept(TestUtil.APPLICATION_JSON_UTF8)) + .andExpect(status().isOk()); + + // Validate the database is empty + List quoteList = quoteRepository.findAll(); + assertThat(quoteList).hasSize(databaseSizeBeforeDelete - 1); + } + + @Test + @Transactional + public void equalsVerifier() throws Exception { + TestUtil.equalsVerifier(Quote.class); + Quote quote1 = new Quote(); + quote1.setId(1L); + Quote quote2 = new Quote(); + quote2.setId(quote1.getId()); + assertThat(quote1).isEqualTo(quote2); + quote2.setId(2L); + assertThat(quote1).isNotEqualTo(quote2); + quote1.setId(null); + assertThat(quote1).isNotEqualTo(quote2); + } + + @Test + @Transactional + public void dtoEqualsVerifier() throws Exception { + TestUtil.equalsVerifier(QuoteDTO.class); + QuoteDTO quoteDTO1 = new QuoteDTO(); + quoteDTO1.setId(1L); + QuoteDTO quoteDTO2 = new QuoteDTO(); + assertThat(quoteDTO1).isNotEqualTo(quoteDTO2); + quoteDTO2.setId(quoteDTO1.getId()); + assertThat(quoteDTO1).isEqualTo(quoteDTO2); + quoteDTO2.setId(2L); + assertThat(quoteDTO1).isNotEqualTo(quoteDTO2); + quoteDTO1.setId(null); + assertThat(quoteDTO1).isNotEqualTo(quoteDTO2); + } + + @Test + @Transactional + public void testEntityFromId() { + assertThat(quoteMapper.fromId(42L).getId()).isEqualTo(42); + assertThat(quoteMapper.fromId(null)).isNull(); + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/TestUtil.java b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/TestUtil.java new file mode 100644 index 0000000000..1fd2b1bd40 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/TestUtil.java @@ -0,0 +1,135 @@ +package com.baeldung.jhipster.quotes.web.rest; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import org.hamcrest.Description; +import org.hamcrest.TypeSafeDiagnosingMatcher; +import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; +import org.springframework.format.support.DefaultFormattingConversionService; +import org.springframework.format.support.FormattingConversionService; +import org.springframework.http.MediaType; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.time.ZonedDateTime; +import java.time.format.DateTimeParseException; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Utility class for testing REST controllers. + */ +public class TestUtil { + + /** MediaType for JSON UTF8 */ + public static final MediaType APPLICATION_JSON_UTF8 = new MediaType( + MediaType.APPLICATION_JSON.getType(), + MediaType.APPLICATION_JSON.getSubtype(), StandardCharsets.UTF_8); + + /** + * Convert an object to JSON byte array. + * + * @param object + * the object to convert + * @return the JSON byte array + * @throws IOException + */ + public static byte[] convertObjectToJsonBytes(Object object) + throws IOException { + ObjectMapper mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); + + JavaTimeModule module = new JavaTimeModule(); + mapper.registerModule(module); + + return mapper.writeValueAsBytes(object); + } + + /** + * Create a byte array with a specific size filled with specified data. + * + * @param size the size of the byte array + * @param data the data to put in the byte array + * @return the JSON byte array + */ + public static byte[] createByteArray(int size, String data) { + byte[] byteArray = new byte[size]; + for (int i = 0; i < size; i++) { + byteArray[i] = Byte.parseByte(data, 2); + } + return byteArray; + } + + /** + * A matcher that tests that the examined string represents the same instant as the reference datetime. + */ + public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher { + + private final ZonedDateTime date; + + public ZonedDateTimeMatcher(ZonedDateTime date) { + this.date = date; + } + + @Override + protected boolean matchesSafely(String item, Description mismatchDescription) { + try { + if (!date.isEqual(ZonedDateTime.parse(item))) { + mismatchDescription.appendText("was ").appendValue(item); + return false; + } + return true; + } catch (DateTimeParseException e) { + mismatchDescription.appendText("was ").appendValue(item) + .appendText(", which could not be parsed as a ZonedDateTime"); + return false; + } + + } + + @Override + public void describeTo(Description description) { + description.appendText("a String representing the same Instant as ").appendValue(date); + } + } + + /** + * Creates a matcher that matches when the examined string reprensents the same instant as the reference datetime + * @param date the reference datetime against which the examined string is checked + */ + public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) { + return new ZonedDateTimeMatcher(date); + } + + /** + * Verifies the equals/hashcode contract on the domain object. + */ + public static void equalsVerifier(Class clazz) throws Exception { + T domainObject1 = clazz.getConstructor().newInstance(); + assertThat(domainObject1.toString()).isNotNull(); + assertThat(domainObject1).isEqualTo(domainObject1); + assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode()); + // Test with an instance of another class + Object testOtherObject = new Object(); + assertThat(domainObject1).isNotEqualTo(testOtherObject); + assertThat(domainObject1).isNotEqualTo(null); + // Test with an instance of the same class + T domainObject2 = clazz.getConstructor().newInstance(); + assertThat(domainObject1).isNotEqualTo(domainObject2); + // HashCodes are equals because the objects are not persisted yet + assertThat(domainObject1.hashCode()).isEqualTo(domainObject2.hashCode()); + } + + /** + * Create a FormattingConversionService which use ISO date format, instead of the localized one. + * @return the FormattingConversionService + */ + public static FormattingConversionService createFormattingConversionService() { + DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService (); + DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); + registrar.setUseIsoFormat(true); + registrar.registerFormatters(dfcs); + return dfcs; + } +} diff --git a/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/errors/ExceptionTranslatorIntTest.java b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/errors/ExceptionTranslatorIntTest.java new file mode 100644 index 0000000000..f233293e35 --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/errors/ExceptionTranslatorIntTest.java @@ -0,0 +1,151 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +import com.baeldung.jhipster.quotes.QuotesApp; +import com.baeldung.jhipster.quotes.config.SecurityBeanOverrideConfiguration; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.http.MediaType; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * Test class for the ExceptionTranslator controller advice. + * + * @see ExceptionTranslator + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, QuotesApp.class}) +public class ExceptionTranslatorIntTest { + + @Autowired + private ExceptionTranslatorTestController controller; + + @Autowired + private ExceptionTranslator exceptionTranslator; + + @Autowired + private MappingJackson2HttpMessageConverter jacksonMessageConverter; + + private MockMvc mockMvc; + + @Before + public void setup() { + mockMvc = MockMvcBuilders.standaloneSetup(controller) + .setControllerAdvice(exceptionTranslator) + .setMessageConverters(jacksonMessageConverter) + .build(); + } + + @Test + public void testConcurrencyFailure() throws Exception { + mockMvc.perform(get("/test/concurrency-failure")) + .andExpect(status().isConflict()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_CONCURRENCY_FAILURE)); + } + + @Test + public void testMethodArgumentNotValid() throws Exception { + mockMvc.perform(post("/test/method-argument").content("{}").contentType(MediaType.APPLICATION_JSON)) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_VALIDATION)) + .andExpect(jsonPath("$.fieldErrors.[0].objectName").value("testDTO")) + .andExpect(jsonPath("$.fieldErrors.[0].field").value("test")) + .andExpect(jsonPath("$.fieldErrors.[0].message").value("NotNull")); + } + + @Test + public void testParameterizedError() throws Exception { + mockMvc.perform(get("/test/parameterized-error")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("test parameterized error")) + .andExpect(jsonPath("$.params.param0").value("param0_value")) + .andExpect(jsonPath("$.params.param1").value("param1_value")); + } + + @Test + public void testParameterizedError2() throws Exception { + mockMvc.perform(get("/test/parameterized-error2")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("test parameterized error")) + .andExpect(jsonPath("$.params.foo").value("foo_value")) + .andExpect(jsonPath("$.params.bar").value("bar_value")); + } + + @Test + public void testMissingServletRequestPartException() throws Exception { + mockMvc.perform(get("/test/missing-servlet-request-part")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.400")); + } + + @Test + public void testMissingServletRequestParameterException() throws Exception { + mockMvc.perform(get("/test/missing-servlet-request-parameter")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.400")); + } + + @Test + public void testAccessDenied() throws Exception { + mockMvc.perform(get("/test/access-denied")) + .andExpect(status().isForbidden()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.403")) + .andExpect(jsonPath("$.detail").value("test access denied!")); + } + + @Test + public void testUnauthorized() throws Exception { + mockMvc.perform(get("/test/unauthorized")) + .andExpect(status().isUnauthorized()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.401")) + .andExpect(jsonPath("$.path").value("/test/unauthorized")) + .andExpect(jsonPath("$.detail").value("test authentication failed!")); + } + + @Test + public void testMethodNotSupported() throws Exception { + mockMvc.perform(post("/test/access-denied")) + .andExpect(status().isMethodNotAllowed()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.405")) + .andExpect(jsonPath("$.detail").value("Request method 'POST' not supported")); + } + + @Test + public void testExceptionWithResponseStatus() throws Exception { + mockMvc.perform(get("/test/response-status")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.400")) + .andExpect(jsonPath("$.title").value("test response status")); + } + + @Test + public void testInternalServerError() throws Exception { + mockMvc.perform(get("/test/internal-server-error")) + .andExpect(status().isInternalServerError()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.500")) + .andExpect(jsonPath("$.title").value("Internal Server Error")); + } + +} diff --git a/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/errors/ExceptionTranslatorTestController.java b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/errors/ExceptionTranslatorTestController.java new file mode 100644 index 0000000000..b1937e5bec --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/errors/ExceptionTranslatorTestController.java @@ -0,0 +1,86 @@ +package com.baeldung.jhipster.quotes.web.rest.errors; + +import org.springframework.dao.ConcurrencyFailureException; +import org.springframework.http.HttpStatus; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import java.util.HashMap; +import java.util.Map; + +@RestController +public class ExceptionTranslatorTestController { + + @GetMapping("/test/concurrency-failure") + public void concurrencyFailure() { + throw new ConcurrencyFailureException("test concurrency failure"); + } + + @PostMapping("/test/method-argument") + public void methodArgument(@Valid @RequestBody TestDTO testDTO) { + } + + @GetMapping("/test/parameterized-error") + public void parameterizedError() { + throw new CustomParameterizedException("test parameterized error", "param0_value", "param1_value"); + } + + @GetMapping("/test/parameterized-error2") + public void parameterizedError2() { + Map params = new HashMap<>(); + params.put("foo", "foo_value"); + params.put("bar", "bar_value"); + throw new CustomParameterizedException("test parameterized error", params); + } + + @GetMapping("/test/missing-servlet-request-part") + public void missingServletRequestPartException(@RequestPart String part) { + } + + @GetMapping("/test/missing-servlet-request-parameter") + public void missingServletRequestParameterException(@RequestParam String param) { + } + + @GetMapping("/test/access-denied") + public void accessdenied() { + throw new AccessDeniedException("test access denied!"); + } + + @GetMapping("/test/unauthorized") + public void unauthorized() { + throw new BadCredentialsException("test authentication failed!"); + } + + @GetMapping("/test/response-status") + public void exceptionWithReponseStatus() { + throw new TestResponseStatusException(); + } + + @GetMapping("/test/internal-server-error") + public void internalServerError() { + throw new RuntimeException(); + } + + public static class TestDTO { + + @NotNull + private String test; + + public String getTest() { + return test; + } + + public void setTest(String test) { + this.test = test; + } + } + + @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status") + @SuppressWarnings("serial") + public static class TestResponseStatusException extends RuntimeException { + } + +} diff --git a/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/util/PaginationUtilUnitTest.java b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/util/PaginationUtilUnitTest.java new file mode 100644 index 0000000000..a21851044d --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/java/com/baeldung/jhipster/quotes/web/rest/util/PaginationUtilUnitTest.java @@ -0,0 +1,44 @@ +package com.baeldung.jhipster.quotes.web.rest.util; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.HttpHeaders; + +/** + * Tests based on parsing algorithm in app/components/util/pagination-util.service.js + * + * @see PaginationUtil + */ +public class PaginationUtilUnitTest { + + @Test + public void generatePaginationHttpHeadersTest() { + String baseUrl = "/api/_search/example"; + List content = new ArrayList<>(); + Page page = new PageImpl<>(content, PageRequest.of(6, 50), 400L); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, baseUrl); + List strHeaders = headers.get(HttpHeaders.LINK); + assertNotNull(strHeaders); + assertTrue(strHeaders.size() == 1); + String headerData = strHeaders.get(0); + assertTrue(headerData.split(",").length == 4); + String expectedData = "; rel=\"next\"," + + "; rel=\"prev\"," + + "; rel=\"last\"," + + "; rel=\"first\""; + assertEquals(expectedData, headerData); + List xTotalCountHeaders = headers.get("X-Total-Count"); + assertTrue(xTotalCountHeaders.size() == 1); + assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L)); + } + +} diff --git a/jhipster/jhipster-uaa/quotes/src/test/resources/config/application.yml b/jhipster/jhipster-uaa/quotes/src/test/resources/config/application.yml new file mode 100644 index 0000000000..337bdbde1c --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/resources/config/application.yml @@ -0,0 +1,119 @@ +# =================================================================== +# Spring Boot configuration. +# +# This configuration is used for unit/integration tests. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +eureka: + client: + enabled: false + instance: + appname: quotes + instanceId: quotes:${spring.application.instance-id:${random.value}} + +spring: + application: + name: quotes + cache: + type: simple + datasource: + type: com.zaxxer.hikari.HikariDataSource + url: jdbc:h2:mem:quotes;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE + name: + username: + password: + hikari: + auto-commit: false + jpa: + database-platform: io.github.jhipster.domain.util.FixedH2Dialect + database: H2 + open-in-view: false + show-sql: false + hibernate: + ddl-auto: none + naming: + physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy + implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy + properties: + hibernate.id.new_generator_mappings: true + hibernate.connection.provider_disables_autocommit: true + hibernate.cache.use_second_level_cache: false + hibernate.cache.use_query_cache: false + hibernate.generate_statistics: true + hibernate.hbm2ddl.auto: validate + liquibase: + contexts: test + mail: + host: localhost + messages: + basename: i18n/messages + mvc: + favicon: + enabled: false + thymeleaf: + mode: HTML + + +server: + port: 10344 + address: localhost + +info: + project: + version: #project.version# + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + async: + core-pool-size: 1 + max-pool-size: 50 + queue-capacity: 10000 + # To test logstash appender + logging: + logstash: + enabled: true + host: localhost + port: 5000 + queue-size: 512 + security: + authentication: + jwt: + # This token must be encoded using Base64 (you can type `echo 'secret-key'|base64` on your command line) + base64-secret: YTQzODg4YTM4NDU3YTJjMDZiZDczYTI5NThmNGU5Y2Y4ZDcxMjUxMzI1MmI4MmQwM2RmMzYxMzVjYzljN2MzNjcyYjhiNzk3NTVhN2M2NjY1YjVhZjk1YTkyMTI0MGJlODczZDZkNzA5YjAxZThhMDMyMDFkMTgyZjBhYjJkM2Y= + # Token is valid 24 hours + token-validity-in-seconds: 86400 + client-authorization: + access-token-uri: http://uaa/oauth/token + token-service-id: uaa + client-id: internal + client-secret: internal + metrics: # DropWizard Metrics configuration, used by MetricsConfiguration + jmx.enabled: true + logs: # Reports Dropwizard metrics in the logs + enabled: true + report-frequency: 60 # in seconds + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/quotes/src/test/resources/config/bootstrap.yml b/jhipster/jhipster-uaa/quotes/src/test/resources/config/bootstrap.yml new file mode 100644 index 0000000000..11cd6af21c --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/resources/config/bootstrap.yml @@ -0,0 +1,4 @@ +spring: + cloud: + config: + enabled: false diff --git a/jhipster/jhipster-uaa/quotes/src/test/resources/logback.xml b/jhipster/jhipster-uaa/quotes/src/test/resources/logback.xml new file mode 100644 index 0000000000..2083a085ad --- /dev/null +++ b/jhipster/jhipster-uaa/quotes/src/test/resources/logback.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jhipster/jhipster-uaa/uaa/.editorconfig b/jhipster/jhipster-uaa/uaa/.editorconfig new file mode 100644 index 0000000000..a03599dd04 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/.editorconfig @@ -0,0 +1,24 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] + +# Change these settings to your own preference +indent_style = space +indent_size = 4 + +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[{package,bower}.json] +indent_style = space +indent_size = 2 diff --git a/jhipster/jhipster-uaa/uaa/.gitattributes b/jhipster/jhipster-uaa/uaa/.gitattributes new file mode 100644 index 0000000000..8ab72fe637 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/.gitattributes @@ -0,0 +1,149 @@ +# This file is inspired by https://github.com/alexkaratarakis/gitattributes +# +# Auto detect text files and perform LF normalization +# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +* text=auto + +# The above will handle all files NOT found below +# These files are text and should be normalized (Convert crlf => lf) + +*.bat text eol=crlf +*.coffee text +*.css text +*.cql text +*.df text +*.ejs text +*.html text +*.java text +*.js text +*.json text +*.less text +*.properties text +*.sass text +*.scss text +*.sh text eol=lf +*.sql text +*.txt text +*.ts text +*.xml text +*.yaml text +*.yml text + +# Documents +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.markdown text +*.md text +*.adoc text +*.textile text +*.mustache text +*.csv text +*.tab text +*.tsv text +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +copyright text +*COPYRIGHT* text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as an asset (binary) by default. If you want to treat it as text, +# comment-out the following line and uncomment the line after. +*.svg binary +#*.svg text +*.eps binary + +# These files are binary and should be left untouched +# (binary is a macro for -text -diff) +*.class binary +*.jar binary +*.war binary + +## LINTERS +.csslintrc text +.eslintrc text +.jscsrc text +.jshintrc text +.jshintignore text +.stylelintrc text + +## CONFIGS +*.bowerrc text +*.conf text +*.config text +.editorconfig text +.gitattributes text +.gitconfig text +.gitignore text +.htaccess text +*.npmignore text + +## HEROKU +Procfile text +.slugignore text + +## AUDIO +*.kar binary +*.m4a binary +*.mid binary +*.midi binary +*.mp3 binary +*.ogg binary +*.ra binary + +## VIDEO +*.3gpp binary +*.3gp binary +*.as binary +*.asf binary +*.asx binary +*.fla binary +*.flv binary +*.m4v binary +*.mng binary +*.mov binary +*.mp4 binary +*.mpeg binary +*.mpg binary +*.swc binary +*.swf binary +*.webm binary + +## ARCHIVES +*.7z binary +*.gz binary +*.rar binary +*.tar binary +*.zip binary + +## FONTS +*.ttf binary +*.eot binary +*.otf binary +*.woff binary +*.woff2 binary diff --git a/jhipster/jhipster-uaa/uaa/.gitignore b/jhipster/jhipster-uaa/uaa/.gitignore new file mode 100644 index 0000000000..e746b25ae6 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/.gitignore @@ -0,0 +1,144 @@ +###################### +# Project Specific +###################### +/target/www/** +/src/test/javascript/coverage/ + +###################### +# Node +###################### +/node/ +node_tmp/ +node_modules/ +npm-debug.log.* +/.awcache/* +/.cache-loader/* + +###################### +# SASS +###################### +.sass-cache/ + +###################### +# Eclipse +###################### +*.pydevproject +.project +.metadata +tmp/ +tmp/**/* +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath +.factorypath +/src/main/resources/rebel.xml + +# External tool builders +.externalToolBuilders/** + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + +###################### +# Intellij +###################### +.idea/ +*.iml +*.iws +*.ipr +*.ids +*.orig +classes/ +out/ + +###################### +# Visual Studio Code +###################### +.vscode/ + +###################### +# Maven +###################### +/log/ +/target/ + +###################### +# Gradle +###################### +.gradle/ +/build/ + +###################### +# Package Files +###################### +*.jar +*.war +*.ear +*.db + +###################### +# Windows +###################### +# Windows image file caches +Thumbs.db + +# Folder config file +Desktop.ini + +###################### +# Mac OSX +###################### +.DS_Store +.svn + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +###################### +# Directories +###################### +/bin/ +/deploy/ + +###################### +# Logs +###################### +*.log* + +###################### +# Others +###################### +*.class +*.*~ +*~ +.merge_file* + +###################### +# Gradle Wrapper +###################### +!gradle/wrapper/gradle-wrapper.jar + +###################### +# Maven Wrapper +###################### +!.mvn/wrapper/maven-wrapper.jar + +###################### +# ESLint +###################### +.eslintcache diff --git a/jhipster/jhipster-uaa/uaa/.mvn/wrapper/MavenWrapperDownloader.java b/jhipster/jhipster-uaa/uaa/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 0000000000..fa4f7b499f --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,110 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/jhipster/jhipster-uaa/uaa/.mvn/wrapper/maven-wrapper.jar b/jhipster/jhipster-uaa/uaa/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000000..01e6799737 Binary files /dev/null and b/jhipster/jhipster-uaa/uaa/.mvn/wrapper/maven-wrapper.jar differ diff --git a/jhipster/jhipster-uaa/uaa/.mvn/wrapper/maven-wrapper.properties b/jhipster/jhipster-uaa/uaa/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000000..00d32aab1d --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip \ No newline at end of file diff --git a/jhipster/jhipster-uaa/uaa/.yo-rc.json b/jhipster/jhipster-uaa/uaa/.yo-rc.json new file mode 100644 index 0000000000..3408ea052d --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/.yo-rc.json @@ -0,0 +1,36 @@ +{ + "generator-jhipster": { + "promptValues": { + "packageName": "com.baeldung.jhipster.uaa", + "nativeLanguage": "en" + }, + "jhipsterVersion": "5.4.2", + "applicationType": "uaa", + "baseName": "uaa", + "packageName": "com.baeldung.jhipster.uaa", + "packageFolder": "com/baeldung/jhipster/uaa", + "serverPort": "9999", + "authenticationType": "uaa", + "cacheProvider": "hazelcast", + "enableHibernateCache": true, + "websocket": false, + "databaseType": "sql", + "devDatabaseType": "h2Disk", + "prodDatabaseType": "mysql", + "searchEngine": false, + "messageBroker": false, + "serviceDiscoveryType": "eureka", + "buildTool": "maven", + "enableSwaggerCodegen": false, + "jwtSecretKey": "ZTljMjA0NzA0OWE0MTVhM2Y2MjJkNzg2MzU4NDFhYTZhM2JlOGY4MmM0Y2M4ZTQ3NzdkNjVjZmJkMTFhOGU2MmY3MWMzNDg4OGY2OWI2Zjc4NTFhNDVkOTZlMDVhNzFkNDUyZjMzNDYxNGY5NWNmYTI4NzA2NzRkYzQ4Y2ZiZjU=", + "enableTranslation": true, + "languages": [ + "en" + ], + "testFrameworks": [], + "jhiPrefix": "jhi", + "clientPackageManager": "npm", + "nativeLanguage": "en", + "skipClient": true + } +} \ No newline at end of file diff --git a/jhipster/jhipster-uaa/uaa/README.md b/jhipster/jhipster-uaa/uaa/README.md new file mode 100644 index 0000000000..014c8ac5ad --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/README.md @@ -0,0 +1,95 @@ +# uaa +This application was generated using JHipster 5.4.2, you can find documentation and help at [https://www.jhipster.tech/documentation-archive/v5.4.2](https://www.jhipster.tech/documentation-archive/v5.4.2). + +This is a "uaa" application intended to be part of a microservice architecture, please refer to the [Doing microservices with JHipster][] page of the documentation for more information. + +This is also a JHipster User Account and Authentication (UAA) Server, refer to [Using UAA for Microservice Security][] for details on how to secure JHipster microservices with OAuth2. +This application is configured for Service Discovery and Configuration with the JHipster-Registry. On launch, it will refuse to start if it is not able to connect to the JHipster-Registry at [http://localhost:8761](http://localhost:8761). For more information, read our documentation on [Service Discovery and Configuration with the JHipster-Registry][]. + +## Development + +To start your application in the dev profile, simply run: + + ./mvnw + + +For further instructions on how to develop with JHipster, have a look at [Using JHipster in development][]. + + + +## Building for production + +To optimize the uaa application for production, run: + + ./mvnw -Pprod clean package + +To ensure everything worked, run: + + java -jar target/*.war + + +Refer to [Using JHipster in production][] for more details. + +## Testing + +To launch your application's tests, run: + + ./mvnw clean test + +For more information, refer to the [Running tests page][]. + +### Code quality + +Sonar is used to analyse code quality. You can start a local Sonar server (accessible on http://localhost:9001) with: + +``` +docker-compose -f src/main/docker/sonar.yml up -d +``` + +Then, run a Sonar analysis: + +``` +./mvnw -Pprod clean test sonar:sonar +``` + +For more information, refer to the [Code quality page][]. + +## Using Docker to simplify development (optional) + +You can use Docker to improve your JHipster development experience. A number of docker-compose configuration are available in the [src/main/docker](src/main/docker) folder to launch required third party services. + +For example, to start a mysql database in a docker container, run: + + docker-compose -f src/main/docker/mysql.yml up -d + +To stop it and remove the container, run: + + docker-compose -f src/main/docker/mysql.yml down + +You can also fully dockerize your application and all the services that it depends on. +To achieve this, first build a docker image of your app by running: + + ./mvnw package -Pprod jib:dockerBuild + +Then run: + + docker-compose -f src/main/docker/app.yml up -d + +For more information refer to [Using Docker and Docker-Compose][], this page also contains information on the docker-compose sub-generator (`jhipster docker-compose`), which is able to generate docker configurations for one or several JHipster applications. + +## Continuous Integration (optional) + +To configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information. + +[JHipster Homepage and latest documentation]: https://www.jhipster.tech +[JHipster 5.4.2 archive]: https://www.jhipster.tech/documentation-archive/v5.4.2 +[Doing microservices with JHipster]: https://www.jhipster.tech/documentation-archive/v5.4.2/microservices-architecture/ +[Using UAA for Microservice Security]: https://www.jhipster.tech/documentation-archive/v5.4.2/using-uaa/[Using JHipster in development]: https://www.jhipster.tech/documentation-archive/v5.4.2/development/ +[Service Discovery and Configuration with the JHipster-Registry]: https://www.jhipster.tech/documentation-archive/v5.4.2/microservices-architecture/#jhipster-registry +[Using Docker and Docker-Compose]: https://www.jhipster.tech/documentation-archive/v5.4.2/docker-compose +[Using JHipster in production]: https://www.jhipster.tech/documentation-archive/v5.4.2/production/ +[Running tests page]: https://www.jhipster.tech/documentation-archive/v5.4.2/running-tests/ +[Code quality page]: https://www.jhipster.tech/documentation-archive/v5.4.2/code-quality/ +[Setting up Continuous Integration]: https://www.jhipster.tech/documentation-archive/v5.4.2/setting-up-ci/ + + diff --git a/jhipster/jhipster-uaa/uaa/mvnw b/jhipster/jhipster-uaa/uaa/mvnw new file mode 100644 index 0000000000..5551fde8e7 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/jhipster/jhipster-uaa/uaa/mvnw.cmd b/jhipster/jhipster-uaa/uaa/mvnw.cmd new file mode 100644 index 0000000000..e5cfb0ae9e --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/jhipster/jhipster-uaa/uaa/package-lock.json b/jhipster/jhipster-uaa/uaa/package-lock.json new file mode 100644 index 0000000000..4ef0a226b9 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/package-lock.json @@ -0,0 +1,4409 @@ +{ + "name": "uaa", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/@nodelib/fs.stat/-/fs.stat-1.1.2.tgz", + "integrity": "sha512-yprFYuno9FtNsSHVlSWd+nRlmGoAbqbeCwOryP6sC/zoCjhpArcRMYp19EvpSUSizJAlsXEwJv+wcWS9XaXdMw==", + "dev": true + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ansi": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi/-/ansi-0.3.1.tgz", + "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=", + "dev": true + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, + "axios": { + "version": "0.18.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", + "dev": true, + "requires": { + "follow-redirects": "^1.3.0", + "is-buffer": "^1.1.5" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binaryextensions": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/binaryextensions/-/binaryextensions-2.1.1.tgz", + "integrity": "sha512-XBaoWE9RW8pPdPQNibZsW2zh8TW6gcarXp1FZPwT8Uop8ScSNldJEWf2k9l3HeTqdrEwsOsFcq74RiJECW34yA==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "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" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "chevrotain": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chevrotain/-/chevrotain-4.1.0.tgz", + "integrity": "sha512-iwuK4FOV+vZlvKonoXVw6G+rXJm4jWk17aJFkm6FloVYcVSrAaJLdCdQo+IIyX98jm0WJVcdK9cllRZQpNBnBg==", + "dev": true, + "requires": { + "regexp-to-ast": "0.3.5" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "arr-union": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-table": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-table/-/cli-table-0.3.1.tgz", + "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "dev": true, + "requires": { + "colors": "1.0.3" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + } + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "clone": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cloneable-readable/-/cloneable-readable-1.1.2.tgz", + "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-string": { + "version": "1.5.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/color-string/-/color-string-1.5.3.tgz", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "colornames": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colornames/-/colornames-1.1.1.tgz", + "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=", + "dev": true + }, + "colors": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colors/-/colors-1.3.2.tgz", + "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==", + "dev": true + }, + "colorspace": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/colorspace/-/colorspace-1.1.1.tgz", + "integrity": "sha512-pI3btWyiuz7Ken0BWh9Elzsmv2bM9AhA7psXib4anUXy/orfZ/E0MbQwhSOG/9L8hLlalqrU0UhOuqxW1YjmVw==", + "dev": true, + "requires": { + "color": "3.0.x", + "text-hex": "1.0.x" + } + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.16.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commander/-/commander-2.16.0.tgz", + "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "conf": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/conf/-/conf-2.0.0.tgz", + "integrity": "sha512-iCLzBsGFi8S73EANsEJZz0JnJ/e5VZef/kSaxydYZLAvw0rFNAUx5R7K5leC/CXXR2mZfXWhUvcZOO/dM2D5xg==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "env-paths": "^1.0.0", + "make-dir": "^1.0.0", + "pkg-up": "^2.0.0", + "write-file-atomic": "^2.3.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "dargs": { + "version": "6.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dargs/-/dargs-6.0.0.tgz", + "integrity": "sha512-6lJauzNaI7MiM8EHQWmGj+s3rP5/i1nYs8GAvKrLAx/9dpc9xS/4seFb1ioR39A+kcfu4v3jnEa/EE5qWYnitQ==", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "detect-conflict": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/detect-conflict/-/detect-conflict-1.0.1.tgz", + "integrity": "sha1-CIZXpmqWHAUBnbfEIwiDsca0F24=", + "dev": true + }, + "diagnostics": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/diagnostics/-/diagnostics-1.1.1.tgz", + "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", + "dev": true, + "requires": { + "colorspace": "1.1.x", + "enabled": "1.0.x", + "kuler": "1.0.x" + } + }, + "didyoumean": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/didyoumean/-/didyoumean-1.2.1.tgz", + "integrity": "sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "drange": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", + "dev": true + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "editions": { + "version": "1.3.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/editions/-/editions-1.3.4.tgz", + "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==", + "dev": true + }, + "ejs": { + "version": "2.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ejs/-/ejs-2.6.1.tgz", + "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", + "dev": true + }, + "enabled": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/enabled/-/enabled-1.0.2.tgz", + "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", + "dev": true, + "requires": { + "env-variable": "0.0.x" + } + }, + "env-paths": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/env-paths/-/env-paths-1.0.0.tgz", + "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=", + "dev": true + }, + "env-variable": { + "version": "0.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/env-variable/-/env-variable-0.0.5.tgz", + "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==", + "dev": true + }, + "error": { + "version": "7.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/error/-/error-7.0.2.tgz", + "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=", + "dev": true, + "requires": { + "string-template": "~0.2.1", + "xtend": "~4.0.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "execa": { + "version": "0.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-glob": { + "version": "2.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-glob/-/fast-glob-2.2.3.tgz", + "integrity": "sha512-NiX+JXjnx43RzvVFwRWfPKo4U+1BrK5pJPsHQdKMlLoFHrrGktXglQhHliSihWAq+m1z6fHk3uwGHrtRbS9vLA==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.0.1", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.1", + "micromatch": "^3.1.10" + } + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-safe-stringify": { + "version": "2.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", + "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==", + "dev": true + }, + "fecha": { + "version": "2.3.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fecha/-/fecha-2.3.3.tgz", + "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "first-chunk-stream": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", + "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "follow-redirects": { + "version": "1.5.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/follow-redirects/-/follow-redirects-1.5.9.tgz", + "integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==", + "dev": true, + "requires": { + "debug": "=3.1.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + }, + "dependencies": { + "combined-stream": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + } + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-extra": { + "version": "7.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fs-extra/-/fs-extra-7.0.0.tgz", + "integrity": "sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "gauge": { + "version": "1.2.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/gauge/-/gauge-1.2.7.tgz", + "integrity": "sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=", + "dev": true, + "requires": { + "ansi": "^0.3.0", + "has-unicode": "^2.0.0", + "lodash.pad": "^4.1.0", + "lodash.padend": "^4.1.0", + "lodash.padstart": "^4.1.0" + } + }, + "generator-jhipster": { + "version": "5.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/generator-jhipster/-/generator-jhipster-5.4.2.tgz", + "integrity": "sha512-iuTZGPonlMFWrabTC7x27UnCa8sckWFKD7HiwMp2JOYLlLU+BPt0WJWlQ9hJv5JHHx+pe0pUxwEHbi0fSu0Ljw==", + "dev": true, + "requires": { + "axios": "0.18.0", + "chalk": "2.4.1", + "commander": "2.16.0", + "conf": "2.0.0", + "didyoumean": "1.2.1", + "ejs": "2.6.1", + "glob": "7.1.2", + "gulp-filter": "5.1.0", + "insight": "0.10.1", + "jhipster-core": "3.4.0", + "js-object-pretty-print": "0.3.0", + "js-yaml": "3.12.0", + "lodash": "4.17.10", + "meow": "5.0.0", + "mkdirp": "0.5.1", + "os-locale": "2.1.0", + "parse-gitignore": "1.0.1", + "pluralize": "7.0.0", + "prettier": "1.13.7", + "randexp": "0.4.9", + "semver": "5.5.0", + "shelljs": "0.8.2", + "tabtab": "2.2.2", + "through2": "2.0.3", + "uuid": "3.3.2", + "yeoman-environment": "2.3.0", + "yeoman-generator": "3.0.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "gh-got": { + "version": "6.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/gh-got/-/gh-got-6.0.0.tgz", + "integrity": "sha512-F/mS+fsWQMo1zfgG9MD8KWvTWPPzzhuVwY++fhQ5Ggd+0P+CAMHtzMZhNxG+TqGfHDChJKsbh6otfMGqO2AKBw==", + "dev": true, + "requires": { + "got": "^7.0.0", + "is-plain-obj": "^1.1.0" + } + }, + "github-username": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/github-username/-/github-username-4.1.0.tgz", + "integrity": "sha1-y+KABBiDIG2kISrp5LXxacML9Bc=", + "dev": true, + "requires": { + "gh-got": "^6.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "globby": { + "version": "8.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/globby/-/globby-8.0.1.tgz", + "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "got": { + "version": "7.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "grouped-queue": { + "version": "0.3.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/grouped-queue/-/grouped-queue-0.3.3.tgz", + "integrity": "sha1-wWfSpTGcWg4JZO9qJbfC34mWyFw=", + "dev": true, + "requires": { + "lodash": "^4.17.2" + } + }, + "gulp-filter": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/gulp-filter/-/gulp-filter-5.1.0.tgz", + "integrity": "sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM=", + "dev": true, + "requires": { + "multimatch": "^2.0.0", + "plugin-error": "^0.1.2", + "streamfilter": "^1.0.5" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "dev": true, + "requires": { + "ajv": "^5.3.0", + "har-schema": "^2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + } + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inquirer": { + "version": "5.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "insight": { + "version": "0.10.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/insight/-/insight-0.10.1.tgz", + "integrity": "sha512-kLGeYQkh18f8KuC68QKdi0iwUcIaayJVB/STpX7x452/7pAUm1yfG4giJwcxbrTh0zNYtc8kBR+6maLMOzglOQ==", + "dev": true, + "requires": { + "async": "^2.1.4", + "chalk": "^2.3.0", + "conf": "^1.3.1", + "inquirer": "^5.0.0", + "lodash.debounce": "^4.0.8", + "os-name": "^2.0.1", + "request": "^2.74.0", + "tough-cookie": "^2.0.0", + "uuid": "^3.0.0" + }, + "dependencies": { + "conf": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/conf/-/conf-1.4.0.tgz", + "integrity": "sha512-bzlVWS2THbMetHqXKB8ypsXN4DQ/1qopGwNJi1eYbpwesJcd86FBjFciCQX/YwAhp9bM7NVnPFqZ5LpV7gP0Dg==", + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "env-paths": "^1.0.0", + "make-dir": "^1.0.0", + "pkg-up": "^2.0.0", + "write-file-atomic": "^2.3.0" + } + } + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-scoped": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-scoped/-/is-scoped-1.0.0.tgz", + "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", + "dev": true, + "requires": { + "scoped-regex": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isbinaryfile": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isbinaryfile/-/isbinaryfile-3.0.3.tgz", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "dev": true, + "requires": { + "buffer-alloc": "^1.2.0" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istextorbinary": { + "version": "2.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/istextorbinary/-/istextorbinary-2.2.1.tgz", + "integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==", + "dev": true, + "requires": { + "binaryextensions": "2", + "editions": "^1.3.3", + "textextensions": "2" + } + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "jhipster-core": { + "version": "3.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jhipster-core/-/jhipster-core-3.4.0.tgz", + "integrity": "sha512-iVJ6MF4jlpvtVL5gbn9t4Jw27RodjY04SXYSGfTLAzHyQRMmehHLvNq/3DBjVwHgBrDn1u2k17oLGouJus9MhA==", + "dev": true, + "requires": { + "chevrotain": "4.1.0", + "fs-extra": "7.0.0", + "lodash": "4.17.11", + "winston": "3.1.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, + "js-object-pretty-print": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-object-pretty-print/-/js-object-pretty-print-0.3.0.tgz", + "integrity": "sha1-RnDkUAZu4ezPNRdMfRl/WqOLz3Q=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "kuler": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kuler/-/kuler-1.0.1.tgz", + "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", + "dev": true, + "requires": { + "colornames": "^1.1.1" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "lodash.pad": { + "version": "4.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.pad/-/lodash.pad-4.5.1.tgz", + "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=", + "dev": true + }, + "lodash.padend": { + "version": "4.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.padend/-/lodash.padend-4.6.1.tgz", + "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", + "dev": true + }, + "lodash.padstart": { + "version": "4.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.padstart/-/lodash.padstart-4.6.1.tgz", + "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "logform": { + "version": "1.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/logform/-/logform-1.10.0.tgz", + "integrity": "sha512-em5ojIhU18fIMOw/333mD+ZLE2fis0EzXl1ZwHx4iQzmpQi6odNiY/t+ITNr33JZhT9/KEaH+UPIipr6a9EjWg==", + "dev": true, + "requires": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^2.3.3", + "ms": "^2.1.1", + "triple-beam": "^1.2.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "macos-release": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/macos-release/-/macos-release-1.1.0.tgz", + "integrity": "sha512-mmLbumEYMi5nXReB9js3WGsB8UE6cDBWyIO62Z4DNx6GbRhDxHNjA1MlzSpJ2S2KM1wyiPRA0d19uHWYYvMHjA==", + "dev": true + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "mem-fs": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mem-fs/-/mem-fs-1.1.3.tgz", + "integrity": "sha1-uK6NLj/Lb10/kWXBLUVRoGXZicw=", + "dev": true, + "requires": { + "through2": "^2.0.0", + "vinyl": "^1.1.0", + "vinyl-file": "^2.0.0" + } + }, + "mem-fs-editor": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mem-fs-editor/-/mem-fs-editor-5.1.0.tgz", + "integrity": "sha512-2Yt2GCYEbcotYbIJagmow4gEtHDqzpq5XN94+yAx/NT5+bGqIjkXnm3KCUQfE6kRfScGp9IZknScoGRKu8L78w==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "deep-extend": "^0.6.0", + "ejs": "^2.5.9", + "glob": "^7.0.3", + "globby": "^8.0.1", + "isbinaryfile": "^3.0.2", + "mkdirp": "^0.5.0", + "multimatch": "^2.0.0", + "rimraf": "^2.2.8", + "through2": "^2.0.0", + "vinyl": "^2.0.1" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "meow": { + "version": "5.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" + } + }, + "merge2": { + "version": "1.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/merge2/-/merge2-1.2.3.tgz", + "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "mime-db": { + "version": "1.36.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", + "dev": true + }, + "mime-types": { + "version": "2.1.20", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mime-types/-/mime-types-2.1.20.tgz", + "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "dev": true, + "requires": { + "mime-db": "~1.36.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/npmlog/-/npmlog-2.0.4.tgz", + "integrity": "sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI=", + "dev": true, + "requires": { + "ansi": "~0.3.1", + "are-we-there-yet": "~1.1.2", + "gauge": "~1.2.5" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "one-time": { + "version": "0.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/one-time/-/one-time-0.0.4.tgz", + "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "os-name": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-name/-/os-name-2.0.1.tgz", + "integrity": "sha1-uaOGNhwXrjohc27wWZQFyajF3F4=", + "dev": true, + "requires": { + "macos-release": "^1.0.0", + "win-release": "^1.0.0" + } + }, + "os-shim": { + "version": "0.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-shim/-/os-shim-0.1.3.tgz", + "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-gitignore": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-gitignore/-/parse-gitignore-1.0.1.tgz", + "integrity": "sha512-UGyowyjtx26n65kdAMWhm6/3uy5uSrpcuH7tt+QEVudiBoVS+eqHxD5kbi9oWVRwj7sCzXqwuM+rUGw7earl6A==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "prettier": { + "version": "1.13.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/prettier/-/prettier-1.13.7.tgz", + "integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==", + "dev": true + }, + "pretty-bytes": { + "version": "5.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pretty-bytes/-/pretty-bytes-5.1.0.tgz", + "integrity": "sha512-wa5+qGVg9Yt7PB6rYm3kXlKzgzgivYTLRandezh43jjRqgyDyP+9YxfJpJiLs9yKD1WeU8/OvtToWpW7255FtA==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.1.29", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "randexp": { + "version": "0.4.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/randexp/-/randexp-0.4.9.tgz", + "integrity": "sha512-maAX1cnBkzIZ89O4tSQUOF098xjGMC8N+9vuY/WfHwg87THw6odD2Br35donlj5e6KnB1SB0QBHhTQhhDHuTPQ==", + "dev": true, + "requires": { + "drange": "^1.0.0", + "ret": "^0.2.0" + } + }, + "read-chunk": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-chunk/-/read-chunk-2.1.0.tgz", + "integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=", + "dev": true, + "requires": { + "pify": "^3.0.0", + "safe-buffer": "^5.1.1" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "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" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "regexp-to-ast": { + "version": "0.3.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/regexp-to-ast/-/regexp-to-ast-0.3.5.tgz", + "integrity": "sha512-1CJygtdvsfNFwiyjaMLBWtg2tfEqx/jSZ8S6TV+GlNL8kiH8rb4cm5Pb7A/C2BpyM/fA8ZJEudlCwi/jvAY+Ow==", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "request": { + "version": "2.88.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rx": { + "version": "4.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rx/-/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", + "dev": true + }, + "rxjs": { + "version": "5.5.12", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + }, + "dependencies": { + "ret": { + "version": "0.1.15", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + } + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "scoped-regex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/scoped-regex/-/scoped-regex-1.0.0.tgz", + "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=", + "dev": true + }, + "semver": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shelljs": { + "version": "0.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/shelljs/-/shelljs-0.8.2.tgz", + "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spawn-sync": { + "version": "1.0.15", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spawn-sync/-/spawn-sync-1.0.15.tgz", + "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", + "dev": true, + "requires": { + "concat-stream": "^1.4.7", + "os-shim": "^0.1.2" + } + }, + "spdx-correct": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", + "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.15.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/sshpk/-/sshpk-1.15.1.tgz", + "integrity": "sha512-mSdgNUaidk+dRU5MhYtN9zebdzF2iG0cNPWy8HG+W8y+fT1JnSkh0fzzpjOa0L7P8i1Rscz38t0h4gPcKz43xA==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "streamfilter": { + "version": "1.0.7", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/streamfilter/-/streamfilter-1.0.7.tgz", + "integrity": "sha512-Gk6KZM+yNA1JpW0KzlZIhjo3EaBJDkYfXtYSbOwNIQ7Zd6006E6+sCFlW1NDvFG/vnXhKmw6TJJgiEQg/8lXfQ==", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "string-template": { + "version": "0.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-bom-stream": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", + "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", + "dev": true, + "requires": { + "first-chunk-stream": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, + "tabtab": { + "version": "2.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tabtab/-/tabtab-2.2.2.tgz", + "integrity": "sha1-egR/FDsBC0y9MfhX6ClhUSy/ThQ=", + "dev": true, + "requires": { + "debug": "^2.2.0", + "inquirer": "^1.0.2", + "lodash.difference": "^4.5.0", + "lodash.uniq": "^4.5.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "npmlog": "^2.0.3", + "object-assign": "^4.1.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "external-editor": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/external-editor/-/external-editor-1.1.1.tgz", + "integrity": "sha1-Etew24UPf/fnCBuvQAVwAGDEYAs=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "spawn-sync": "^1.0.15", + "tmp": "^0.0.29" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "inquirer": { + "version": "1.2.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/inquirer/-/inquirer-1.2.3.tgz", + "integrity": "sha1-TexvMvN+97sLLtPx0aXD9UUHSRg=", + "dev": true, + "requires": { + "ansi-escapes": "^1.1.0", + "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", + "cli-width": "^2.0.0", + "external-editor": "^1.1.0", + "figures": "^1.3.5", + "lodash": "^4.3.0", + "mute-stream": "0.0.6", + "pinkie-promise": "^2.0.0", + "run-async": "^2.2.0", + "rx": "^4.1.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mute-stream": { + "version": "0.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/mute-stream/-/mute-stream-0.0.6.tgz", + "integrity": "sha1-SJYrGeFp/R38JAs/HnMXYnu8R9s=", + "dev": true + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "tmp": { + "version": "0.0.29", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tmp/-/tmp-0.0.29.tgz", + "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.1" + } + } + } + }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "textextensions": { + "version": "2.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/textextensions/-/textextensions-2.2.0.tgz", + "integrity": "sha512-j5EMxnryTvKxwH2Cq+Pb43tsf6sdEgw6Pdwxk83mPaq0ToeFJt6WE4J3s5BqY7vmjlLgkgXvhtXUxo80FyBhCA==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + }, + "triple-beam": { + "version": "1.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "arr-union": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "untildify": { + "version": "3.0.3", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-file": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/vinyl-file/-/vinyl-file-2.0.0.tgz", + "integrity": "sha1-p+v1/779obfRjRQPyweyI++2dRo=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.3.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0", + "strip-bom-stream": "^2.0.0", + "vinyl": "^1.1.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "win-release": { + "version": "1.1.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/win-release/-/win-release-1.1.1.tgz", + "integrity": "sha1-X6VeAr58qTTt/BJmVjLoSbcuUgk=", + "dev": true, + "requires": { + "semver": "^5.0.1" + } + }, + "winston": { + "version": "3.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/winston/-/winston-3.1.0.tgz", + "integrity": "sha512-FsQfEE+8YIEeuZEYhHDk5cILo1HOcWkGwvoidLrDgPog0r4bser1lEIOco2dN9zpDJ1M88hfDgZvxe5z4xNcwg==", + "dev": true, + "requires": { + "async": "^2.6.0", + "diagnostics": "^1.1.1", + "is-stream": "^1.1.0", + "logform": "^1.9.1", + "one-time": "0.0.4", + "readable-stream": "^2.3.6", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.2.0" + } + }, + "winston-transport": { + "version": "4.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/winston-transport/-/winston-transport-4.2.0.tgz", + "integrity": "sha512-0R1bvFqxSlK/ZKTH86nymOuKv/cT1PQBMuDdA7k7f0S9fM44dNH6bXnuxwXPrN8lefJgtZq08BKdyZ0DZIy/rg==", + "dev": true, + "requires": { + "readable-stream": "^2.3.6", + "triple-beam": "^1.2.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + }, + "yeoman-environment": { + "version": "2.3.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yeoman-environment/-/yeoman-environment-2.3.0.tgz", + "integrity": "sha512-PHSAkVOqYdcR+C+Uht1SGC4eVD/9OhygYFkYaI66xF8vKIeS1RNYay+umj2ZrQeJ50tF5Q/RSO6qGDz9y3Ifug==", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "diff": "^3.3.1", + "escape-string-regexp": "^1.0.2", + "globby": "^8.0.1", + "grouped-queue": "^0.3.3", + "inquirer": "^5.2.0", + "is-scoped": "^1.0.0", + "lodash": "^4.17.10", + "log-symbols": "^2.1.0", + "mem-fs": "^1.1.0", + "strip-ansi": "^4.0.0", + "text-table": "^0.2.0", + "untildify": "^3.0.2" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } + } + }, + "yeoman-generator": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/yeoman-generator/-/yeoman-generator-3.0.0.tgz", + "integrity": "sha512-aHsNXzkdgAoakZTZsDX7T56wYWYd1O5E/GBIFAVMJLH7TKRr+1MiEJszZQbbCSA+J+lpT743/8L88j35yNdTLQ==", + "dev": true, + "requires": { + "async": "^2.6.0", + "chalk": "^2.3.0", + "cli-table": "^0.3.1", + "cross-spawn": "^6.0.5", + "dargs": "^6.0.0", + "dateformat": "^3.0.3", + "debug": "^3.1.0", + "detect-conflict": "^1.0.0", + "error": "^7.0.2", + "find-up": "^3.0.0", + "github-username": "^4.0.0", + "istextorbinary": "^2.2.1", + "lodash": "^4.17.10", + "make-dir": "^1.1.0", + "mem-fs-editor": "^5.0.0", + "minimist": "^1.2.0", + "pretty-bytes": "^5.1.0", + "read-chunk": "^2.1.0", + "read-pkg-up": "^4.0.0", + "rimraf": "^2.6.2", + "run-async": "^2.0.0", + "shelljs": "^0.8.0", + "text-table": "^0.2.0", + "through2": "^2.0.0", + "yeoman-environment": "^2.0.5" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "p-limit": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-limit/-/p-limit-2.0.0.tgz", + "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://ssh.lighthouse.com.br/nexus/repository/npm-all/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + } + } + } + } +} diff --git a/jhipster/jhipster-uaa/uaa/package.json b/jhipster/jhipster-uaa/uaa/package.json new file mode 100644 index 0000000000..7565e8783c --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/package.json @@ -0,0 +1,16 @@ +{ + "name": "uaa", + "version": "0.0.0", + "description": "Description for uaa", + "private": true, + "license": "UNLICENSED", + "cacheDirectories": [ + "node_modules" + ], + "devDependencies": { + "generator-jhipster": "5.4.2" + }, + "engines": { + "node": ">=8.9.0" + } +} diff --git a/jhipster/jhipster-uaa/uaa/pom.xml b/jhipster/jhipster-uaa/uaa/pom.xml new file mode 100644 index 0000000000..9c4783747a --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/pom.xml @@ -0,0 +1,915 @@ + + + 4.0.0 + + com.baeldung.jhipster.uaa + uaa + 0.0.1-SNAPSHOT + war + Uaa + + + + + + + + + + 3.0.0 + 1.8 + 2.12.6 + v8.12.0 + 6.4.1 + UTF-8 + UTF-8 + ${project.build.directory}/test-results + yyyyMMddHHmmss + ${java.version} + ${java.version} + -Djava.security.egd=file:/dev/./urandom -Xmx256m + jdt_apt + false + + + + + + + 2.0.25 + + 2.0.5.RELEASE + + 5.2.17.Final + + 3.22.0-GA + + 3.5.5 + 3.6 + 2.0.1.Final + 1.2.0.Final + + + 3.1.0 + 3.8.0 + 2.10 + 3.0.0-M2 + 3.1.0 + 2.22.0 + 3.2.2 + 0.9.11 + 0.8.2 + 3.4.2 + 3.5.0.1254 + 2.2.5 + + + http://localhost:9001 + src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* + S3437,S4684,UndocumentedApi,BoldAndItalicTagsCheck + + src/main/webapp/app/**/*.* + Web:BoldAndItalicTagsCheck + + src/main/java/**/* + squid:S3437 + + src/main/java/**/* + squid:UndocumentedApi + + src/main/java/**/* + squid:S4684 + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + jacoco + ${project.testresult.directory}/lcov.info + ${project.basedir}/src/main/ + ${project.testresult.directory}/surefire-reports + ${project.basedir}/src/test/ + + + + + + + + io.github.jhipster + jhipster-dependencies + ${jhipster-dependencies.version} + pom + import + + + + + + + + io.github.jhipster + jhipster-framework + + + + org.springframework.boot + spring-boot-starter-cache + + + io.dropwizard.metrics + metrics-core + + + io.dropwizard.metrics + metrics-annotation + + + io.dropwizard.metrics + metrics-json + + + io.dropwizard.metrics + metrics-jvm + + + io.dropwizard.metrics + metrics-servlet + + + io.dropwizard.metrics + metrics-servlets + + + com.fasterxml.jackson.datatype + jackson-datatype-hibernate5 + + + com.fasterxml.jackson.datatype + jackson-datatype-hppc + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + com.fasterxml.jackson.module + jackson-module-afterburner + + + com.h2database + h2 + test + + + com.hazelcast + hazelcast + + + com.hazelcast + hazelcast-hibernate52 + + + com.hazelcast + hazelcast-spring + + + com.jayway.jsonpath + json-path + test + + + + io.springfox + springfox-swagger2 + + + io.springfox + springfox-bean-validators + + + com.mattbertolini + liquibase-slf4j + + + com.ryantenney.metrics + metrics-spring + + + com.zaxxer + HikariCP + + + commons-io + commons-io + + + org.apache.commons + commons-lang3 + + + javax.cache + cache-api + + + mysql + mysql-connector-java + + + org.assertj + assertj-core + test + + + org.hibernate + hibernate-jpamodelgen + ${hibernate.version} + provided + + + org.hibernate + hibernate-envers + + + org.hibernate.validator + hibernate-validator + + + org.liquibase + liquibase-core + + + net.logstash.logback + logstash-logback-encoder + + + org.mapstruct + mapstruct-jdk8 + ${mapstruct.version} + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + provided + + + org.springframework.boot + spring-boot-configuration-processor + provided + + + org.springframework.boot + spring-boot-loader-tools + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-logging + + + org.springframework.boot + spring-boot-starter-mail + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-test + test + + + org.springframework.security + spring-security-test + test + + + org.zalando + problem-spring-web + 0.24.0-RC.0 + + + org.springframework.security.oauth + spring-security-oauth2 + + + org.springframework.security + spring-security-jwt + + + + org.springframework.cloud + spring-cloud-starter + + + org.springframework.cloud + spring-cloud-starter-netflix-ribbon + + + org.springframework.cloud + spring-cloud-starter-netflix-hystrix + + + org.springframework.retry + spring-retry + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + org.springframework.cloud + spring-cloud-starter-config + + + org.springframework.cloud + spring-cloud-security + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.cloud + spring-cloud-spring-service-connector + + + + org.springframework.security + spring-security-data + + + + + + spring-boot:run + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + + org.hibernate + hibernate-jpamodelgen + ${hibernate.version} + + + + + + + org.apache.maven.plugins + maven-eclipse-plugin + ${maven-eclipse-plugin.version} + + true + true + + + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-plugin.version} + + + enforce-versions + + enforce + + + + + + + You are running an older version of Maven. JHipster requires at least Maven ${maven.version} + [${maven.version},) + + + + You are running an incompatible version of Java. JHipster requires JDK ${java.version} + [1.8,1.9) + + + + + + org.apache.maven.plugins + maven-resources-plugin + ${maven-resources-plugin.version} + + + default-resources + validate + + copy-resources + + + target/classes + false + + # + + + + src/main/resources/ + true + + config/*.yml + + + + src/main/resources/ + false + + config/*.yml + + + + + + + docker-resources + verify + + copy-resources + + + target/classes/static/ + + + target/www + false + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + alphabetical + + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + pre-unit-tests + + prepare-agent + + + + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + + + + + post-unit-test + test + + report + + + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + ${project.testresult.directory}/coverage/jacoco + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + org.liquibase + liquibase-maven-plugin + ${liquibase.version} + + src/main/resources/config/liquibase/master.xml + src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml + org.h2.Driver + jdbc:h2:file:./target/h2db/db/uaa + + uaa + + hibernate:spring:com.baeldung.jhipster.uaa.domain?dialect=org.hibernate.dialect.H2Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy + true + debug + + + + org.javassist + javassist + ${javassist.version} + + + org.liquibase.ext + liquibase-hibernate5 + ${liquibase-hibernate5.version} + + + org.springframework.boot + spring-boot-starter-data-jpa + ${spring-boot.version} + + + javax.validation + validation-api + ${validation-api.version} + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + + + repackage + + + + + ${start-class} + true + true + + + + + com.google.cloud.tools + jib-maven-plugin + ${jib-maven-plugin.version} + + + openjdk:8-jre-alpine + + + uaa:latest + + + + sh + + chmod +x /entrypoint.sh && sync && /entrypoint.sh + + + 9999 + 5701/udp + + + ALWAYS + 0 + + true + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.jacoco + + jacoco-maven-plugin + + + ${jacoco-maven-plugin.version} + + + prepare-agent + + + + + + + + + + + + + + + + no-liquibase + + ,no-liquibase + + + + swagger + + ,swagger + + + + tls + + ,tls + + + + dev + + true + + + + org.springframework.boot + spring-boot-starter-undertow + + + org.springframework.boot + spring-boot-devtools + true + + + com.h2database + h2 + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + false + + + + + + + dev${profile.tls}${profile.no-liquibase} + + + + prod + + + org.springframework.boot + spring-boot-starter-undertow + + + + + + maven-clean-plugin + ${maven-clean-plugin.version} + + + + target/www/ + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + false + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + ${start-class} + true + + + + + build-info + + + + + + pl.project13.maven + git-commit-id-plugin + ${git-commit-id-plugin.version} + + + + revision + + + + + false + true + + ^git.commit.id.abbrev$ + ^git.commit.id.describe$ + ^git.branch$ + + + + + + + + prod${profile.swagger}${profile.no-liquibase} + + + + + cc + + + org.springframework.boot + spring-boot-starter-undertow + + + org.springframework.boot + spring-boot-devtools + true + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + false + src/main/webapp/ + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + ${start-class} + true + true + true + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + default-compile + none + + + default-testCompile + none + + + + + net.alchim31.maven + scala-maven-plugin + ${scala-maven-plugin.version} + + + compile + compile + + add-source + compile + + + + test-compile + test-compile + + add-source + testCompile + + + + + incremental + true + ${scala.version} + + + + + + + dev,swagger + + + + + zipkin + + + org.springframework.cloud + spring-cloud-starter-zipkin + + + + + + IDE + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + org.hibernate + hibernate-jpamodelgen + ${hibernate.version} + + + + + + diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/.dockerignore b/jhipster/jhipster-uaa/uaa/src/main/docker/.dockerignore new file mode 100644 index 0000000000..b03bdc71ee --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/.dockerignore @@ -0,0 +1,14 @@ +# https://docs.docker.com/engine/reference/builder/#dockerignore-file +classes/ +generated-sources/ +generated-test-sources/ +h2db/ +maven-archiver/ +maven-status/ +reports/ +surefire-reports/ +test-classes/ +test-results/ +www/ +!*.jar +!*.war diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/Dockerfile b/jhipster/jhipster-uaa/uaa/src/main/docker/Dockerfile new file mode 100644 index 0000000000..f2bfb4d66a --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/Dockerfile @@ -0,0 +1,20 @@ +FROM openjdk:8-jre-alpine + +ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ + JHIPSTER_SLEEP=0 \ + JAVA_OPTS="" + +# Add a jhipster user to run our application so that it doesn't need to run as root +RUN adduser -D -s /bin/sh jhipster +WORKDIR /home/jhipster + +ADD entrypoint.sh entrypoint.sh +RUN chmod 755 entrypoint.sh && chown jhipster:jhipster entrypoint.sh +USER jhipster + +ENTRYPOINT ["./entrypoint.sh"] + +EXPOSE 9999 5701/udp + +ADD *.war app.war + diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/app.yml b/jhipster/jhipster-uaa/uaa/src/main/docker/app.yml new file mode 100644 index 0000000000..6efdf61cf7 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/app.yml @@ -0,0 +1,22 @@ +version: '2' +services: + uaa-app: + image: uaa + environment: + # - _JAVA_OPTIONS=-Xmx512m -Xms256m + - SPRING_PROFILES_ACTIVE=prod,swagger + - EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka + - SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config + - SPRING_DATASOURCE_URL=jdbc:mysql://uaa-mysql:3306/uaa?useUnicode=true&characterEncoding=utf8&useSSL=false + - JHIPSTER_SLEEP=30 # gives time for the JHipster Registry to boot before the application + uaa-mysql: + extends: + file: mysql.yml + service: uaa-mysql + jhipster-registry: + extends: + file: jhipster-registry.yml + service: jhipster-registry + environment: + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_TYPE=native + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_SEARCH_LOCATIONS=file:./central-config/docker-config/ diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/central-server-config/README.md b/jhipster/jhipster-uaa/uaa/src/main/docker/central-server-config/README.md new file mode 100644 index 0000000000..6aab9ffdd5 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/central-server-config/README.md @@ -0,0 +1,7 @@ +# Central configuration sources details + +The JHipster-Registry will use the following directories as its configuration source : +- localhost-config : when running the registry in docker with the jhipster-registry.yml docker-compose file +- docker-config : when running the registry and the app both in docker with the app.yml docker-compose file + +For more info, refer to https://www.jhipster.tech/microservices-architecture/#registry_app_configuration diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/central-server-config/docker-config/application.yml b/jhipster/jhipster-uaa/uaa/src/main/docker/central-server-config/docker-config/application.yml new file mode 100644 index 0000000000..8a973c0a35 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/central-server-config/docker-config/application.yml @@ -0,0 +1,15 @@ +# Common configuration shared between all applications +configserver: + name: Docker JHipster Registry + status: Connected to the JHipster Registry running in Docker + +jhipster: + security: + authentication: + jwt: + secret: my-secret-key-which-should-be-changed-in-production-and-be-base64-encoded + +eureka: + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@jhipster-registry:8761/eureka/ diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/central-server-config/localhost-config/application.yml b/jhipster/jhipster-uaa/uaa/src/main/docker/central-server-config/localhost-config/application.yml new file mode 100644 index 0000000000..db4602e419 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/central-server-config/localhost-config/application.yml @@ -0,0 +1,15 @@ +# Common configuration shared between all applications +configserver: + name: Docker JHipster Registry + status: Connected to the JHipster Registry running in Docker + +jhipster: + security: + authentication: + jwt: + secret: my-secret-key-which-should-be-changed-in-production-and-be-base64-encoded + +eureka: + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@localhost:8761/eureka/ diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/entrypoint.sh b/jhipster/jhipster-uaa/uaa/src/main/docker/entrypoint.sh new file mode 100644 index 0000000000..ccffafb5a4 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} +exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar "${HOME}/app.war" "$@" diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/hazelcast-management-center.yml b/jhipster/jhipster-uaa/uaa/src/main/docker/hazelcast-management-center.yml new file mode 100644 index 0000000000..dc6739d543 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/hazelcast-management-center.yml @@ -0,0 +1,6 @@ +version: '2' +services: + uaa-hazelcast-management-center: + image: hazelcast/management-center:3.9.3 + ports: + - 8180:8080 diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/jhipster-registry.yml b/jhipster/jhipster-uaa/uaa/src/main/docker/jhipster-registry.yml new file mode 100644 index 0000000000..512bc54be6 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/jhipster-registry.yml @@ -0,0 +1,22 @@ +version: '2' +services: + jhipster-registry: + image: jhipster/jhipster-registry:v4.0.4 + volumes: + - ./central-server-config:/central-config + # When run with the "dev" Spring profile, the JHipster Registry will + # read the config from the local filesystem (central-server-config directory) + # When run with the "prod" Spring profile, it will read the configuration from a Git repository + # See https://www.jhipster.tech/microservices-architecture/#registry_app_configuration + environment: + # - _JAVA_OPTIONS=-Xmx512m -Xms256m + - SPRING_PROFILES_ACTIVE=dev,swagger,uaa + - SPRING_SECURITY_USER_PASSWORD=admin + - JHIPSTER_REGISTRY_PASSWORD=admin + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_TYPE=native + - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_SEARCH_LOCATIONS=file:./central-config/localhost-config/ + # - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_TYPE=git + # - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_URI=https://github.com/jhipster/jhipster-registry/ + # - SPRING_CLOUD_CONFIG_SERVER_COMPOSITE_0_SEARCH_PATHS=central-config + ports: + - 8761:8761 diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/mysql.yml b/jhipster/jhipster-uaa/uaa/src/main/docker/mysql.yml new file mode 100644 index 0000000000..52b44ac6d2 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/mysql.yml @@ -0,0 +1,13 @@ +version: '2' +services: + uaa-mysql: + image: mysql:5.7.20 + # volumes: + # - ~/volumes/jhipster/uaa/mysql/:/var/lib/mysql/ + environment: + - MYSQL_USER=root + - MYSQL_ALLOW_EMPTY_PASSWORD=yes + - MYSQL_DATABASE=uaa + ports: + - 3306:3306 + command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp diff --git a/jhipster/jhipster-uaa/uaa/src/main/docker/sonar.yml b/jhipster/jhipster-uaa/uaa/src/main/docker/sonar.yml new file mode 100644 index 0000000000..2e4ab78826 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/docker/sonar.yml @@ -0,0 +1,7 @@ +version: '2' +services: + uaa-sonar: + image: sonarqube:7.1-alpine + ports: + - 9001:9000 + - 9092:9092 diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/ApplicationWebXml.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/ApplicationWebXml.java new file mode 100644 index 0000000000..2bb237cdb7 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/ApplicationWebXml.java @@ -0,0 +1,21 @@ +package com.baeldung.jhipster.uaa; + +import com.baeldung.jhipster.uaa.config.DefaultProfileUtil; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +/** + * This is a helper Java class that provides an alternative to creating a web.xml. + * This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc. + */ +public class ApplicationWebXml extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + /** + * set a default to use when no profile is configured. + */ + DefaultProfileUtil.addDefaultProfile(application.application()); + return application.sources(UaaApp.class); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/UaaApp.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/UaaApp.java new file mode 100644 index 0000000000..5ec5ee708d --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/UaaApp.java @@ -0,0 +1,107 @@ +package com.baeldung.jhipster.uaa; + +import com.baeldung.jhipster.uaa.config.ApplicationProperties; +import com.baeldung.jhipster.uaa.config.DefaultProfileUtil; + +import io.github.jhipster.config.JHipsterConstants; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.core.env.Environment; + +import javax.annotation.PostConstruct; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Arrays; +import java.util.Collection; + +@SpringBootApplication +@EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class}) +@EnableDiscoveryClient +public class UaaApp { + + private static final Logger log = LoggerFactory.getLogger(UaaApp.class); + + private final Environment env; + + public UaaApp(Environment env) { + this.env = env; + } + + /** + * Initializes uaa. + *

+ * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile + *

+ * You can find more information on how profiles work with JHipster on https://www.jhipster.tech/profiles/. + */ + @PostConstruct + public void initApplication() { + Collection activeProfiles = Arrays.asList(env.getActiveProfiles()); + if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { + log.error("You have misconfigured your application! It should not run " + + "with both the 'dev' and 'prod' profiles at the same time."); + } + if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) { + log.error("You have misconfigured your application! It should not " + + "run with both the 'dev' and 'cloud' profiles at the same time."); + } + } + + /** + * Main method, used to run the application. + * + * @param args the command line arguments + */ + public static void main(String[] args) { + SpringApplication app = new SpringApplication(UaaApp.class); + DefaultProfileUtil.addDefaultProfile(app); + Environment env = app.run(args).getEnvironment(); + logApplicationStartup(env); + } + + private static void logApplicationStartup(Environment env) { + String protocol = "http"; + if (env.getProperty("server.ssl.key-store") != null) { + protocol = "https"; + } + String serverPort = env.getProperty("server.port"); + String contextPath = env.getProperty("server.servlet.context-path"); + if (StringUtils.isBlank(contextPath)) { + contextPath = "/"; + } + String hostAddress = "localhost"; + try { + hostAddress = InetAddress.getLocalHost().getHostAddress(); + } catch (UnknownHostException e) { + log.warn("The host name could not be determined, using `localhost` as fallback"); + } + log.info("\n----------------------------------------------------------\n\t" + + "Application '{}' is running! Access URLs:\n\t" + + "Local: \t\t{}://localhost:{}{}\n\t" + + "External: \t{}://{}:{}{}\n\t" + + "Profile(s): \t{}\n----------------------------------------------------------", + env.getProperty("spring.application.name"), + protocol, + serverPort, + contextPath, + protocol, + hostAddress, + serverPort, + contextPath, + env.getActiveProfiles()); + + String configServerStatus = env.getProperty("configserver.status"); + if (configServerStatus == null) { + configServerStatus = "Not found or not setup for this application"; + } + log.info("\n----------------------------------------------------------\n\t" + + "Config Server: \t{}\n----------------------------------------------------------", configServerStatus); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/aop/logging/LoggingAspect.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/aop/logging/LoggingAspect.java new file mode 100644 index 0000000000..c5eacb7b43 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/aop/logging/LoggingAspect.java @@ -0,0 +1,98 @@ +package com.baeldung.jhipster.uaa.aop.logging; + +import io.github.jhipster.config.JHipsterConstants; + +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.env.Environment; + +import java.util.Arrays; + +/** + * Aspect for logging execution of service and repository Spring components. + * + * By default, it only runs with the "dev" profile. + */ +@Aspect +public class LoggingAspect { + + private final Logger log = LoggerFactory.getLogger(this.getClass()); + + private final Environment env; + + public LoggingAspect(Environment env) { + this.env = env; + } + + /** + * Pointcut that matches all repositories, services and Web REST endpoints. + */ + @Pointcut("within(@org.springframework.stereotype.Repository *)" + + " || within(@org.springframework.stereotype.Service *)" + + " || within(@org.springframework.web.bind.annotation.RestController *)") + public void springBeanPointcut() { + // Method is empty as this is just a Pointcut, the implementations are in the advices. + } + + /** + * Pointcut that matches all Spring beans in the application's main packages. + */ + @Pointcut("within(com.baeldung.jhipster.uaa.repository..*)"+ + " || within(com.baeldung.jhipster.uaa.service..*)"+ + " || within(com.baeldung.jhipster.uaa.web.rest..*)") + public void applicationPackagePointcut() { + // Method is empty as this is just a Pointcut, the implementations are in the advices. + } + + /** + * Advice that logs methods throwing exceptions. + * + * @param joinPoint join point for advice + * @param e exception + */ + @AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e") + public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { + log.error("Exception in {}.{}() with cause = \'{}\' and exception = \'{}\'", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL", e.getMessage(), e); + + } else { + log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL"); + } + } + + /** + * Advice that logs when a method is entered and exited. + * + * @param joinPoint join point for advice + * @return result + * @throws Throwable throws IllegalArgumentException + */ + @Around("applicationPackagePointcut() && springBeanPointcut()") + public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { + if (log.isDebugEnabled()) { + log.debug("Enter: {}.{}() with argument[s] = {}", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs())); + } + try { + Object result = joinPoint.proceed(); + if (log.isDebugEnabled()) { + log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), result); + } + return result; + } catch (IllegalArgumentException e) { + log.error("Illegal argument: {} in {}.{}()", Arrays.toString(joinPoint.getArgs()), + joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName()); + + throw e; + } + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/ApplicationProperties.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/ApplicationProperties.java new file mode 100644 index 0000000000..040bb68b03 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/ApplicationProperties.java @@ -0,0 +1,14 @@ +package com.baeldung.jhipster.uaa.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Properties specific to Uaa. + *

+ * Properties are configured in the application.yml file. + * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. + */ +@ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) +public class ApplicationProperties { + +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/AsyncConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/AsyncConfiguration.java new file mode 100644 index 0000000000..ae7982ad84 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/AsyncConfiguration.java @@ -0,0 +1,59 @@ +package com.baeldung.jhipster.uaa.config; + +import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor; +import io.github.jhipster.config.JHipsterProperties; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; +import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.*; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; + +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; + +@Configuration +@EnableAsync +@EnableScheduling +public class AsyncConfiguration implements AsyncConfigurer, SchedulingConfigurer { + + private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); + + private final JHipsterProperties jHipsterProperties; + + public AsyncConfiguration(JHipsterProperties jHipsterProperties) { + this.jHipsterProperties = jHipsterProperties; + } + + @Override + @Bean(name = "taskExecutor") + public Executor getAsyncExecutor() { + log.debug("Creating Async Task Executor"); + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize()); + executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize()); + executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity()); + executor.setThreadNamePrefix("uaa-Executor-"); + return new ExceptionHandlingAsyncTaskExecutor(executor); + } + + @Override + public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { + return new SimpleAsyncUncaughtExceptionHandler(); + } + + @Override + public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { + taskRegistrar.setScheduler(scheduledTaskExecutor()); + } + + @Bean + public Executor scheduledTaskExecutor() { + return Executors.newScheduledThreadPool(jHipsterProperties.getAsync().getCorePoolSize()); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/CacheConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/CacheConfiguration.java new file mode 100644 index 0000000000..c2113b7248 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/CacheConfiguration.java @@ -0,0 +1,155 @@ +package com.baeldung.jhipster.uaa.config; + +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.JHipsterProperties; + +import com.hazelcast.config.*; +import com.hazelcast.core.HazelcastInstance; +import com.hazelcast.core.Hazelcast; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.web.ServerProperties; + +import org.springframework.cache.CacheManager; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.cloud.client.ServiceInstance; +import org.springframework.cloud.client.discovery.DiscoveryClient; +import org.springframework.cloud.client.serviceregistry.Registration; +import org.springframework.context.annotation.*; +import org.springframework.core.env.Environment; + +import javax.annotation.PreDestroy; + +@Configuration +@EnableCaching +public class CacheConfiguration { + + private final Logger log = LoggerFactory.getLogger(CacheConfiguration.class); + + private final Environment env; + + private final ServerProperties serverProperties; + + private final DiscoveryClient discoveryClient; + + private Registration registration; + + public CacheConfiguration(Environment env, ServerProperties serverProperties, DiscoveryClient discoveryClient) { + this.env = env; + this.serverProperties = serverProperties; + this.discoveryClient = discoveryClient; + } + + @Autowired(required = false) + public void setRegistration(Registration registration) { + this.registration = registration; + } + + @PreDestroy + public void destroy() { + log.info("Closing Cache Manager"); + Hazelcast.shutdownAll(); + } + + @Bean + public CacheManager cacheManager(HazelcastInstance hazelcastInstance) { + log.debug("Starting HazelcastCacheManager"); + CacheManager cacheManager = new com.hazelcast.spring.cache.HazelcastCacheManager(hazelcastInstance); + return cacheManager; + } + + @Bean + public HazelcastInstance hazelcastInstance(JHipsterProperties jHipsterProperties) { + log.debug("Configuring Hazelcast"); + HazelcastInstance hazelCastInstance = Hazelcast.getHazelcastInstanceByName("uaa"); + if (hazelCastInstance != null) { + log.debug("Hazelcast already initialized"); + return hazelCastInstance; + } + Config config = new Config(); + config.setInstanceName("uaa"); + config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); + if (this.registration == null) { + log.warn("No discovery service is set up, Hazelcast cannot create a cluster."); + } else { + // The serviceId is by default the application's name, + // see the "spring.application.name" standard Spring property + String serviceId = registration.getServiceId(); + log.debug("Configuring Hazelcast clustering for instanceId: {}", serviceId); + // In development, everything goes through 127.0.0.1, with a different port + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { + log.debug("Application is running with the \"dev\" profile, Hazelcast " + + "cluster will only work with localhost instances"); + + System.setProperty("hazelcast.local.localAddress", "127.0.0.1"); + config.getNetworkConfig().setPort(serverProperties.getPort() + 5701); + config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true); + for (ServiceInstance instance : discoveryClient.getInstances(serviceId)) { + String clusterMember = "127.0.0.1:" + (instance.getPort() + 5701); + log.debug("Adding Hazelcast (dev) cluster member " + clusterMember); + config.getNetworkConfig().getJoin().getTcpIpConfig().addMember(clusterMember); + } + } else { // Production configuration, one host per instance all using port 5701 + config.getNetworkConfig().setPort(5701); + config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true); + for (ServiceInstance instance : discoveryClient.getInstances(serviceId)) { + String clusterMember = instance.getHost() + ":5701"; + log.debug("Adding Hazelcast (prod) cluster member " + clusterMember); + config.getNetworkConfig().getJoin().getTcpIpConfig().addMember(clusterMember); + } + } + } + config.getMapConfigs().put("default", initializeDefaultMapConfig(jHipsterProperties)); + + // Full reference is available at: http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html + config.setManagementCenterConfig(initializeDefaultManagementCenterConfig(jHipsterProperties)); + config.getMapConfigs().put("com.baeldung.jhipster.uaa.domain.*", initializeDomainMapConfig(jHipsterProperties)); + return Hazelcast.newHazelcastInstance(config); + } + + private ManagementCenterConfig initializeDefaultManagementCenterConfig(JHipsterProperties jHipsterProperties) { + ManagementCenterConfig managementCenterConfig = new ManagementCenterConfig(); + managementCenterConfig.setEnabled(jHipsterProperties.getCache().getHazelcast().getManagementCenter().isEnabled()); + managementCenterConfig.setUrl(jHipsterProperties.getCache().getHazelcast().getManagementCenter().getUrl()); + managementCenterConfig.setUpdateInterval(jHipsterProperties.getCache().getHazelcast().getManagementCenter().getUpdateInterval()); + return managementCenterConfig; + } + + private MapConfig initializeDefaultMapConfig(JHipsterProperties jHipsterProperties) { + MapConfig mapConfig = new MapConfig(); + + /* + Number of backups. If 1 is set as the backup-count for example, + then all entries of the map will be copied to another JVM for + fail-safety. Valid numbers are 0 (no backup), 1, 2, 3. + */ + mapConfig.setBackupCount(jHipsterProperties.getCache().getHazelcast().getBackupCount()); + + /* + Valid values are: + NONE (no eviction), + LRU (Least Recently Used), + LFU (Least Frequently Used). + NONE is the default. + */ + mapConfig.setEvictionPolicy(EvictionPolicy.LRU); + + /* + Maximum size of the map. When max size is reached, + map is evicted based on the policy defined. + Any integer between 0 and Integer.MAX_VALUE. 0 means + Integer.MAX_VALUE. Default is 0. + */ + mapConfig.setMaxSizeConfig(new MaxSizeConfig(0, MaxSizeConfig.MaxSizePolicy.USED_HEAP_SIZE)); + + return mapConfig; + } + + private MapConfig initializeDomainMapConfig(JHipsterProperties jHipsterProperties) { + MapConfig mapConfig = new MapConfig(); + mapConfig.setTimeToLiveSeconds(jHipsterProperties.getCache().getHazelcast().getTimeToLiveSeconds()); + return mapConfig; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/CloudDatabaseConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/CloudDatabaseConfiguration.java new file mode 100644 index 0000000000..397e571b64 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/CloudDatabaseConfiguration.java @@ -0,0 +1,24 @@ +package com.baeldung.jhipster.uaa.config; + +import io.github.jhipster.config.JHipsterConstants; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cache.CacheManager; +import org.springframework.cloud.config.java.AbstractCloudConfig; +import org.springframework.context.annotation.*; + +import javax.sql.DataSource; + +@Configuration +@Profile(JHipsterConstants.SPRING_PROFILE_CLOUD) +public class CloudDatabaseConfiguration extends AbstractCloudConfig { + + private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class); + + @Bean + public DataSource dataSource(CacheManager cacheManager) { + log.info("Configuring JDBC datasource from a cloud provider"); + return connectionFactory().dataSource(); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/Constants.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/Constants.java new file mode 100644 index 0000000000..b9e3af4abf --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/Constants.java @@ -0,0 +1,17 @@ +package com.baeldung.jhipster.uaa.config; + +/** + * Application constants. + */ +public final class Constants { + + // Regex for acceptable logins + public static final String LOGIN_REGEX = "^[_.@A-Za-z0-9-]*$"; + + public static final String SYSTEM_ACCOUNT = "system"; + public static final String ANONYMOUS_USER = "anonymoususer"; + public static final String DEFAULT_LANGUAGE = "en"; + + private Constants() { + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/DatabaseConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/DatabaseConfiguration.java new file mode 100644 index 0000000000..7cd6c3c635 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/DatabaseConfiguration.java @@ -0,0 +1,39 @@ +package com.baeldung.jhipster.uaa.config; + +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.h2.H2ConfigurationHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; + +import org.springframework.data.jpa.repository.config.EnableJpaAuditing; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +import java.sql.SQLException; + +@Configuration +@EnableJpaRepositories("com.baeldung.jhipster.uaa.repository") +@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware") +@EnableTransactionManagement +public class DatabaseConfiguration { + + private final Logger log = LoggerFactory.getLogger(DatabaseConfiguration.class); + + + /** + * Open the TCP port for the H2 database, so it is available remotely. + * + * @return the H2 database TCP server + * @throws SQLException if the server failed to start + */ + @Bean(initMethod = "start", destroyMethod = "stop") + @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) + public Object h2TCPServer() throws SQLException { + log.debug("Starting H2 database"); + return H2ConfigurationHelper.createServer(); + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/DateTimeFormatConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/DateTimeFormatConfiguration.java new file mode 100644 index 0000000000..67449284e1 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/DateTimeFormatConfiguration.java @@ -0,0 +1,20 @@ +package com.baeldung.jhipster.uaa.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.format.FormatterRegistry; +import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * Configure the converters to use the ISO format for dates by default. + */ +@Configuration +public class DateTimeFormatConfiguration implements WebMvcConfigurer { + + @Override + public void addFormatters(FormatterRegistry registry) { + DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); + registrar.setUseIsoFormat(true); + registrar.registerFormatters(registry); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/DefaultProfileUtil.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/DefaultProfileUtil.java new file mode 100644 index 0000000000..6b4345c832 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/DefaultProfileUtil.java @@ -0,0 +1,51 @@ +package com.baeldung.jhipster.uaa.config; + +import io.github.jhipster.config.JHipsterConstants; + +import org.springframework.boot.SpringApplication; +import org.springframework.core.env.Environment; + +import java.util.*; + +/** + * Utility class to load a Spring profile to be used as default + * when there is no spring.profiles.active set in the environment or as command line argument. + * If the value is not available in application.yml then dev profile will be used as default. + */ +public final class DefaultProfileUtil { + + private static final String SPRING_PROFILE_DEFAULT = "spring.profiles.default"; + + private DefaultProfileUtil() { + } + + /** + * Set a default to use when no profile is configured. + * + * @param app the Spring application + */ + public static void addDefaultProfile(SpringApplication app) { + Map defProperties = new HashMap<>(); + /* + * The default profile to use when no other profiles are defined + * This cannot be set in the application.yml file. + * See https://github.com/spring-projects/spring-boot/issues/1219 + */ + defProperties.put(SPRING_PROFILE_DEFAULT, JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); + app.setDefaultProperties(defProperties); + } + + /** + * Get the profiles that are applied else get default profiles. + * + * @param env spring environment + * @return profiles + */ + public static String[] getActiveProfiles(Environment env) { + String[] profiles = env.getActiveProfiles(); + if (profiles.length == 0) { + return env.getDefaultProfiles(); + } + return profiles; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/JacksonConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/JacksonConfiguration.java new file mode 100644 index 0000000000..1e596c1728 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/JacksonConfiguration.java @@ -0,0 +1,63 @@ +package com.baeldung.jhipster.uaa.config; + +import com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.module.afterburner.AfterburnerModule; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.zalando.problem.ProblemModule; +import org.zalando.problem.violations.ConstraintViolationProblemModule; + +@Configuration +public class JacksonConfiguration { + + /** + * Support for Java date and time API. + * @return the corresponding Jackson module. + */ + @Bean + public JavaTimeModule javaTimeModule() { + return new JavaTimeModule(); + } + + @Bean + public Jdk8Module jdk8TimeModule() { + return new Jdk8Module(); + } + + + /* + * Support for Hibernate types in Jackson. + */ + @Bean + public Hibernate5Module hibernate5Module() { + return new Hibernate5Module(); + } + + /* + * Jackson Afterburner module to speed up serialization/deserialization. + */ + @Bean + public AfterburnerModule afterburnerModule() { + return new AfterburnerModule(); + } + + /* + * Module for serialization/deserialization of RFC7807 Problem. + */ + @Bean + ProblemModule problemModule() { + return new ProblemModule(); + } + + /* + * Module for serialization/deserialization of ConstraintViolationProblem. + */ + @Bean + ConstraintViolationProblemModule constraintViolationProblemModule() { + return new ConstraintViolationProblemModule(); + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LiquibaseConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LiquibaseConfiguration.java new file mode 100644 index 0000000000..393f377062 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LiquibaseConfiguration.java @@ -0,0 +1,53 @@ +package com.baeldung.jhipster.uaa.config; + +import javax.sql.DataSource; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; +import org.springframework.cache.CacheManager; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.core.task.TaskExecutor; + +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.liquibase.AsyncSpringLiquibase; +import liquibase.integration.spring.SpringLiquibase; + +@Configuration +public class LiquibaseConfiguration { + + private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); + + private final Environment env; + + private final CacheManager cacheManager; + + public LiquibaseConfiguration(Environment env, CacheManager cacheManager) { + this.env = env; + this.cacheManager = cacheManager; + } + + @Bean + public SpringLiquibase liquibase(@Qualifier("taskExecutor") TaskExecutor taskExecutor, + DataSource dataSource, LiquibaseProperties liquibaseProperties) { + + // Use liquibase.integration.spring.SpringLiquibase if you don't want Liquibase to start asynchronously + SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env); + liquibase.setDataSource(dataSource); + liquibase.setChangeLog("classpath:config/liquibase/master.xml"); + liquibase.setContexts(liquibaseProperties.getContexts()); + liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); + liquibase.setDropFirst(liquibaseProperties.isDropFirst()); + liquibase.setChangeLogParameters(liquibaseProperties.getParameters()); + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) { + liquibase.setShouldRun(false); + } else { + liquibase.setShouldRun(liquibaseProperties.isEnabled()); + log.debug("Configuring Liquibase"); + } + return liquibase; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LocaleConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LocaleConfiguration.java new file mode 100644 index 0000000000..0ae32aaf1d --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LocaleConfiguration.java @@ -0,0 +1,27 @@ +package com.baeldung.jhipster.uaa.config; + +import io.github.jhipster.config.locale.AngularCookieLocaleResolver; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.LocaleResolver; +import org.springframework.web.servlet.config.annotation.*; +import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; + +@Configuration +public class LocaleConfiguration implements WebMvcConfigurer { + + @Bean(name = "localeResolver") + public LocaleResolver localeResolver() { + AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver(); + cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY"); + return cookieLocaleResolver; + } + + @Override + public void addInterceptors(InterceptorRegistry registry) { + LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); + localeChangeInterceptor.setParamName("language"); + registry.addInterceptor(localeChangeInterceptor); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LoggingAspectConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LoggingAspectConfiguration.java new file mode 100644 index 0000000000..b0206bfea2 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LoggingAspectConfiguration.java @@ -0,0 +1,19 @@ +package com.baeldung.jhipster.uaa.config; + +import com.baeldung.jhipster.uaa.aop.logging.LoggingAspect; + +import io.github.jhipster.config.JHipsterConstants; + +import org.springframework.context.annotation.*; +import org.springframework.core.env.Environment; + +@Configuration +@EnableAspectJAutoProxy +public class LoggingAspectConfiguration { + + @Bean + @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) + public LoggingAspect loggingAspect(Environment env) { + return new LoggingAspect(env); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LoggingConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LoggingConfiguration.java new file mode 100644 index 0000000000..dfef38f67d --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/LoggingConfiguration.java @@ -0,0 +1,163 @@ +package com.baeldung.jhipster.uaa.config; + +import java.net.InetSocketAddress; +import java.util.Iterator; + +import io.github.jhipster.config.JHipsterProperties; + +import ch.qos.logback.classic.AsyncAppender; +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.LoggerContext; +import ch.qos.logback.classic.boolex.OnMarkerEvaluator; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.classic.spi.LoggerContextListener; +import ch.qos.logback.core.Appender; +import ch.qos.logback.core.filter.EvaluatorFilter; +import ch.qos.logback.core.spi.ContextAwareBase; +import ch.qos.logback.core.spi.FilterReply; +import net.logstash.logback.appender.LogstashTcpSocketAppender; +import net.logstash.logback.encoder.LogstashEncoder; +import net.logstash.logback.stacktrace.ShortenedThrowableConverter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cloud.context.config.annotation.RefreshScope; +import org.springframework.context.annotation.Configuration; + +@Configuration +@RefreshScope +public class LoggingConfiguration { + + private static final String LOGSTASH_APPENDER_NAME = "LOGSTASH"; + + private static final String ASYNC_LOGSTASH_APPENDER_NAME = "ASYNC_LOGSTASH"; + + private final Logger log = LoggerFactory.getLogger(LoggingConfiguration.class); + + private LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + + private final String appName; + + private final String serverPort; + + private final String version; + + private final JHipsterProperties jHipsterProperties; + + public LoggingConfiguration(@Value("${spring.application.name}") String appName, @Value("${server.port}") String serverPort, + @Value("${info.project.version:}") String version, JHipsterProperties jHipsterProperties) { + this.appName = appName; + this.serverPort = serverPort; + this.version = version; + this.jHipsterProperties = jHipsterProperties; + if (jHipsterProperties.getLogging().getLogstash().isEnabled()) { + addLogstashAppender(context); + addContextListener(context); + } + if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { + setMetricsMarkerLogbackFilter(context); + } + } + + private void addContextListener(LoggerContext context) { + LogbackLoggerContextListener loggerContextListener = new LogbackLoggerContextListener(); + loggerContextListener.setContext(context); + context.addListener(loggerContextListener); + } + + private void addLogstashAppender(LoggerContext context) { + log.info("Initializing Logstash logging"); + + LogstashTcpSocketAppender logstashAppender = new LogstashTcpSocketAppender(); + logstashAppender.setName(LOGSTASH_APPENDER_NAME); + logstashAppender.setContext(context); + String optionalFields = ""; + String customFields = "{\"app_name\":\"" + appName + "\",\"app_port\":\"" + serverPort + "\"," + + optionalFields + "\"version\":\"" + version + "\"}"; + + // More documentation is available at: https://github.com/logstash/logstash-logback-encoder + LogstashEncoder logstashEncoder = new LogstashEncoder(); + // Set the Logstash appender config from JHipster properties + logstashEncoder.setCustomFields(customFields); + // Set the Logstash appender config from JHipster properties + logstashAppender.addDestinations(new InetSocketAddress(jHipsterProperties.getLogging().getLogstash().getHost(), jHipsterProperties.getLogging().getLogstash().getPort())); + + ShortenedThrowableConverter throwableConverter = new ShortenedThrowableConverter(); + throwableConverter.setRootCauseFirst(true); + logstashEncoder.setThrowableConverter(throwableConverter); + logstashEncoder.setCustomFields(customFields); + + logstashAppender.setEncoder(logstashEncoder); + logstashAppender.start(); + + // Wrap the appender in an Async appender for performance + AsyncAppender asyncLogstashAppender = new AsyncAppender(); + asyncLogstashAppender.setContext(context); + asyncLogstashAppender.setName(ASYNC_LOGSTASH_APPENDER_NAME); + asyncLogstashAppender.setQueueSize(jHipsterProperties.getLogging().getLogstash().getQueueSize()); + asyncLogstashAppender.addAppender(logstashAppender); + asyncLogstashAppender.start(); + + context.getLogger("ROOT").addAppender(asyncLogstashAppender); + } + + // Configure a log filter to remove "metrics" logs from all appenders except the "LOGSTASH" appender + private void setMetricsMarkerLogbackFilter(LoggerContext context) { + log.info("Filtering metrics logs from all appenders except the {} appender", LOGSTASH_APPENDER_NAME); + OnMarkerEvaluator onMarkerMetricsEvaluator = new OnMarkerEvaluator(); + onMarkerMetricsEvaluator.setContext(context); + onMarkerMetricsEvaluator.addMarker("metrics"); + onMarkerMetricsEvaluator.start(); + EvaluatorFilter metricsFilter = new EvaluatorFilter<>(); + metricsFilter.setContext(context); + metricsFilter.setEvaluator(onMarkerMetricsEvaluator); + metricsFilter.setOnMatch(FilterReply.DENY); + metricsFilter.start(); + + for (ch.qos.logback.classic.Logger logger : context.getLoggerList()) { + for (Iterator> it = logger.iteratorForAppenders(); it.hasNext();) { + Appender appender = it.next(); + if (!appender.getName().equals(ASYNC_LOGSTASH_APPENDER_NAME)) { + log.debug("Filter metrics logs from the {} appender", appender.getName()); + appender.setContext(context); + appender.addFilter(metricsFilter); + appender.start(); + } + } + } + } + + /** + * Logback configuration is achieved by configuration file and API. + * When configuration file change is detected, the configuration is reset. + * This listener ensures that the programmatic configuration is also re-applied after reset. + */ + class LogbackLoggerContextListener extends ContextAwareBase implements LoggerContextListener { + + @Override + public boolean isResetResistant() { + return true; + } + + @Override + public void onStart(LoggerContext context) { + addLogstashAppender(context); + } + + @Override + public void onReset(LoggerContext context) { + addLogstashAppender(context); + } + + @Override + public void onStop(LoggerContext context) { + // Nothing to do. + } + + @Override + public void onLevelChange(ch.qos.logback.classic.Logger logger, Level level) { + // Nothing to do. + } + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/MetricsConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/MetricsConfiguration.java new file mode 100644 index 0000000000..4f98d0a3f1 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/MetricsConfiguration.java @@ -0,0 +1,99 @@ +package com.baeldung.jhipster.uaa.config; + +import io.github.jhipster.config.JHipsterProperties; + +import com.codahale.metrics.JmxReporter; +import com.codahale.metrics.JvmAttributeGaugeSet; +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.Slf4jReporter; +import com.codahale.metrics.health.HealthCheckRegistry; +import com.codahale.metrics.jvm.*; +import com.ryantenney.metrics.spring.config.annotation.EnableMetrics; +import com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerAdapter; +import com.zaxxer.hikari.HikariDataSource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.*; + +import javax.annotation.PostConstruct; +import java.lang.management.ManagementFactory; +import java.util.concurrent.TimeUnit; + +@Configuration +@EnableMetrics(proxyTargetClass = true) +public class MetricsConfiguration extends MetricsConfigurerAdapter { + + private static final String PROP_METRIC_REG_JVM_MEMORY = "jvm.memory"; + private static final String PROP_METRIC_REG_JVM_GARBAGE = "jvm.garbage"; + private static final String PROP_METRIC_REG_JVM_THREADS = "jvm.threads"; + private static final String PROP_METRIC_REG_JVM_FILES = "jvm.files"; + private static final String PROP_METRIC_REG_JVM_BUFFERS = "jvm.buffers"; + private static final String PROP_METRIC_REG_JVM_ATTRIBUTE_SET = "jvm.attributes"; + + private final Logger log = LoggerFactory.getLogger(MetricsConfiguration.class); + + private MetricRegistry metricRegistry = new MetricRegistry(); + + private HealthCheckRegistry healthCheckRegistry = new HealthCheckRegistry(); + + private final JHipsterProperties jHipsterProperties; + + private HikariDataSource hikariDataSource; + + public MetricsConfiguration(JHipsterProperties jHipsterProperties) { + this.jHipsterProperties = jHipsterProperties; + } + + @Autowired(required = false) + public void setHikariDataSource(HikariDataSource hikariDataSource) { + this.hikariDataSource = hikariDataSource; + } + + @Override + @Bean + public MetricRegistry getMetricRegistry() { + return metricRegistry; + } + + @Override + @Bean + public HealthCheckRegistry getHealthCheckRegistry() { + return healthCheckRegistry; + } + + @PostConstruct + public void init() { + log.debug("Registering JVM gauges"); + metricRegistry.register(PROP_METRIC_REG_JVM_MEMORY, new MemoryUsageGaugeSet()); + metricRegistry.register(PROP_METRIC_REG_JVM_GARBAGE, new GarbageCollectorMetricSet()); + metricRegistry.register(PROP_METRIC_REG_JVM_THREADS, new ThreadStatesGaugeSet()); + metricRegistry.register(PROP_METRIC_REG_JVM_FILES, new FileDescriptorRatioGauge()); + metricRegistry.register(PROP_METRIC_REG_JVM_BUFFERS, new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer())); + metricRegistry.register(PROP_METRIC_REG_JVM_ATTRIBUTE_SET, new JvmAttributeGaugeSet()); + if (hikariDataSource != null) { + log.debug("Monitoring the datasource"); + // remove the factory created by HikariDataSourceMetricsPostProcessor until JHipster migrate to Micrometer + hikariDataSource.setMetricsTrackerFactory(null); + hikariDataSource.setMetricRegistry(metricRegistry); + } + if (jHipsterProperties.getMetrics().getJmx().isEnabled()) { + log.debug("Initializing Metrics JMX reporting"); + JmxReporter jmxReporter = JmxReporter.forRegistry(metricRegistry).build(); + jmxReporter.start(); + } + if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { + log.info("Initializing Metrics Log reporting"); + Marker metricsMarker = MarkerFactory.getMarker("metrics"); + final Slf4jReporter reporter = Slf4jReporter.forRegistry(metricRegistry) + .outputTo(LoggerFactory.getLogger("metrics")) + .markWith(metricsMarker) + .convertRatesTo(TimeUnit.SECONDS) + .convertDurationsTo(TimeUnit.MILLISECONDS) + .build(); + reporter.start(jHipsterProperties.getMetrics().getLogs().getReportFrequency(), TimeUnit.SECONDS); + } + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/UaaConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/UaaConfiguration.java new file mode 100644 index 0000000000..ce1ab5326c --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/UaaConfiguration.java @@ -0,0 +1,193 @@ +package com.baeldung.jhipster.uaa.config; + +import com.baeldung.jhipster.uaa.security.AuthoritiesConstants; +import io.github.jhipster.config.JHipsterProperties; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.ClassPathResource; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer; +import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter; +import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer; +import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer; +import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter; +import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer; +import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer; +import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer; +import org.springframework.security.oauth2.provider.token.TokenEnhancer; +import org.springframework.security.oauth2.provider.token.TokenEnhancerChain; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; +import org.springframework.security.oauth2.provider.token.store.JwtTokenStore; +import org.springframework.security.oauth2.provider.token.store.KeyStoreKeyFactory; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.web.filter.CorsFilter; + +import javax.servlet.http.HttpServletResponse; +import java.security.KeyPair; +import java.util.ArrayList; +import java.util.Collection; + +@Configuration +@EnableAuthorizationServer +public class UaaConfiguration extends AuthorizationServerConfigurerAdapter implements ApplicationContextAware { + /** + * Access tokens will not expire any earlier than this. + */ + private static final int MIN_ACCESS_TOKEN_VALIDITY_SECS = 60; + + private ApplicationContext applicationContext; + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext = applicationContext; + } + + @EnableResourceServer + public static class ResourceServerConfiguration extends ResourceServerConfigurerAdapter { + + private final TokenStore tokenStore; + + private final JHipsterProperties jHipsterProperties; + + private final CorsFilter corsFilter; + + public ResourceServerConfiguration(TokenStore tokenStore, JHipsterProperties jHipsterProperties, CorsFilter corsFilter) { + this.tokenStore = tokenStore; + this.jHipsterProperties = jHipsterProperties; + this.corsFilter = corsFilter; + } + + @Override + public void configure(HttpSecurity http) throws Exception { + http + .exceptionHandling() + .authenticationEntryPoint((request, response, authException) -> response.sendError(HttpServletResponse.SC_UNAUTHORIZED)) + .and() + .csrf() + .disable() + .addFilterBefore(corsFilter, UsernamePasswordAuthenticationFilter.class) + .headers() + .frameOptions() + .disable() + .and() + .sessionManagement() + .sessionCreationPolicy(SessionCreationPolicy.STATELESS) + .and() + .authorizeRequests() + .antMatchers("/api/register").permitAll() + .antMatchers("/api/activate").permitAll() + .antMatchers("/api/authenticate").permitAll() + .antMatchers("/api/account/reset-password/init").permitAll() + .antMatchers("/api/account/reset-password/finish").permitAll() + .antMatchers("/api/**").authenticated() + .antMatchers("/management/health").permitAll() + .antMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN) + .antMatchers("/v2/api-docs/**").permitAll() + .antMatchers("/swagger-resources/configuration/ui").permitAll() + .antMatchers("/swagger-ui/index.html").hasAuthority(AuthoritiesConstants.ADMIN); + } + + @Override + public void configure(ResourceServerSecurityConfigurer resources) throws Exception { + resources.resourceId("jhipster-uaa").tokenStore(tokenStore); + } + } + + private final JHipsterProperties jHipsterProperties; + + private final UaaProperties uaaProperties; + + private final PasswordEncoder passwordEncoder; + + public UaaConfiguration(JHipsterProperties jHipsterProperties, UaaProperties uaaProperties, PasswordEncoder passwordEncoder) { + this.jHipsterProperties = jHipsterProperties; + this.uaaProperties = uaaProperties; + this.passwordEncoder = passwordEncoder; + } + + @Override + public void configure(ClientDetailsServiceConfigurer clients) throws Exception { + int accessTokenValidity = uaaProperties.getWebClientConfiguration().getAccessTokenValidityInSeconds(); + accessTokenValidity = Math.max(accessTokenValidity, MIN_ACCESS_TOKEN_VALIDITY_SECS); + int refreshTokenValidity = uaaProperties.getWebClientConfiguration().getRefreshTokenValidityInSecondsForRememberMe(); + refreshTokenValidity = Math.max(refreshTokenValidity, accessTokenValidity); + /* + For a better client design, this should be done by a ClientDetailsService (similar to UserDetailsService). + */ + clients.inMemory() + .withClient(uaaProperties.getWebClientConfiguration().getClientId()) + .secret(passwordEncoder.encode(uaaProperties.getWebClientConfiguration().getSecret())) + .scopes("openid") + .autoApprove(true) + .authorizedGrantTypes("implicit","refresh_token", "password", "authorization_code") + .accessTokenValiditySeconds(accessTokenValidity) + .refreshTokenValiditySeconds(refreshTokenValidity) + .and() + .withClient(jHipsterProperties.getSecurity().getClientAuthorization().getClientId()) + .secret(passwordEncoder.encode(jHipsterProperties.getSecurity().getClientAuthorization().getClientSecret())) + .scopes("web-app") + .authorities("ROLE_ADMIN") + .autoApprove(true) + .authorizedGrantTypes("client_credentials") + .accessTokenValiditySeconds((int) jHipsterProperties.getSecurity().getAuthentication().getJwt().getTokenValidityInSeconds()) + .refreshTokenValiditySeconds((int) jHipsterProperties.getSecurity().getAuthentication().getJwt().getTokenValidityInSecondsForRememberMe()); + } + + @Override + public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception { + //pick up all TokenEnhancers incl. those defined in the application + //this avoids changes to this class if an application wants to add its own to the chain + Collection tokenEnhancers = applicationContext.getBeansOfType(TokenEnhancer.class).values(); + TokenEnhancerChain tokenEnhancerChain = new TokenEnhancerChain(); + tokenEnhancerChain.setTokenEnhancers(new ArrayList<>(tokenEnhancers)); + endpoints + .authenticationManager(authenticationManager) + .tokenStore(tokenStore()) + .tokenEnhancer(tokenEnhancerChain) + .reuseRefreshTokens(false); //don't reuse or we will run into session inactivity timeouts + } + + @Autowired + @Qualifier("authenticationManagerBean") + private AuthenticationManager authenticationManager; + + /** + * Apply the token converter (and enhancer) for token store. + * @return the JwtTokenStore managing the tokens. + */ + @Bean + public JwtTokenStore tokenStore() { + return new JwtTokenStore(jwtAccessTokenConverter()); + } + + /** + * This bean generates an token enhancer, which manages the exchange between JWT acces tokens and Authentication + * in both directions. + * + * @return an access token converter configured with the authorization server's public/private keys + */ + @Bean + public JwtAccessTokenConverter jwtAccessTokenConverter() { + JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); + KeyPair keyPair = new KeyStoreKeyFactory( + new ClassPathResource(uaaProperties.getKeyStore().getName()), uaaProperties.getKeyStore().getPassword().toCharArray()) + .getKeyPair(uaaProperties.getKeyStore().getAlias()); + converter.setKeyPair(keyPair); + return converter; + } + + @Override + public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception { + oauthServer.tokenKeyAccess("permitAll()").checkTokenAccess( + "isAuthenticated()"); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/UaaProperties.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/UaaProperties.java new file mode 100644 index 0000000000..00fb4d28f9 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/UaaProperties.java @@ -0,0 +1,100 @@ +package com.baeldung.jhipster.uaa.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * Properties for UAA-based OAuth2 security. + */ +@Component +@ConfigurationProperties(prefix = "uaa", ignoreUnknownFields = false) +public class UaaProperties { + private KeyStore keyStore = new KeyStore(); + + public KeyStore getKeyStore() { + return keyStore; + } + + private WebClientConfiguration webClientConfiguration = new WebClientConfiguration(); + + public WebClientConfiguration getWebClientConfiguration() { + return webClientConfiguration; + } + + /** + * Keystore configuration for signing and verifying JWT tokens. + */ + public static class KeyStore { + //name of the keystore in the classpath + private String name = "config/tls/keystore.p12"; + //password used to access the key + private String password = "password"; + //name of the alias to fetch + private String alias = "selfsigned"; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + } + + public static class WebClientConfiguration { + //validity of the short-lived access token in secs (min: 60), don't make it too long + private int accessTokenValidityInSeconds = 5 * 60; + //validity of the refresh token in secs (defines the duration of "remember me") + private int refreshTokenValidityInSecondsForRememberMe = 7 * 24 * 60 * 60; + private String clientId = "web_app"; + private String secret = "changeit"; + + public int getAccessTokenValidityInSeconds() { + return accessTokenValidityInSeconds; + } + + public void setAccessTokenValidityInSeconds(int accessTokenValidityInSeconds) { + this.accessTokenValidityInSeconds = accessTokenValidityInSeconds; + } + + public int getRefreshTokenValidityInSecondsForRememberMe() { + return refreshTokenValidityInSecondsForRememberMe; + } + + public void setRefreshTokenValidityInSecondsForRememberMe(int refreshTokenValidityInSecondsForRememberMe) { + this.refreshTokenValidityInSecondsForRememberMe = refreshTokenValidityInSecondsForRememberMe; + } + + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public String getSecret() { + return secret; + } + + public void setSecret(String secret) { + this.secret = secret; + } + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/UaaWebSecurityConfiguration.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/UaaWebSecurityConfiguration.java new file mode 100644 index 0000000000..865eef9107 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/UaaWebSecurityConfiguration.java @@ -0,0 +1,72 @@ +package com.baeldung.jhipster.uaa.config; + +import org.springframework.beans.factory.BeanInitializationException; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.HttpMethod; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.data.repository.query.SecurityEvaluationContextExtension; + +import javax.annotation.PostConstruct; + +@Configuration +@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) +public class UaaWebSecurityConfiguration extends WebSecurityConfigurerAdapter { + + private final UserDetailsService userDetailsService; + + private final AuthenticationManagerBuilder authenticationManagerBuilder; + + public UaaWebSecurityConfiguration(UserDetailsService userDetailsService, AuthenticationManagerBuilder authenticationManagerBuilder) { + this.userDetailsService = userDetailsService; + this.authenticationManagerBuilder = authenticationManagerBuilder; + } + + @PostConstruct + public void init() throws Exception { + try { + authenticationManagerBuilder + .userDetailsService(userDetailsService) + .passwordEncoder(passwordEncoder()); + } catch (Exception e) { + throw new BeanInitializationException("Security configuration failed", e); + } + } + + + @Bean + public PasswordEncoder passwordEncoder() { + return new BCryptPasswordEncoder(); + } + + @Override + @Bean + public AuthenticationManager authenticationManagerBean() throws Exception { + return super.authenticationManagerBean(); + } + + @Override + public void configure(WebSecurity web) throws Exception { + web.ignoring() + .antMatchers(HttpMethod.OPTIONS, "/**") + .antMatchers("/app/**/*.{js,html}") + .antMatchers("/bower_components/**") + .antMatchers("/i18n/**") + .antMatchers("/content/**") + .antMatchers("/swagger-ui/index.html") + .antMatchers("/test/**") + .antMatchers("/h2-console/**"); + } + + @Bean + public SecurityEvaluationContextExtension securityEvaluationContextExtension() { + return new SecurityEvaluationContextExtension(); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/WebConfigurer.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/WebConfigurer.java new file mode 100644 index 0000000000..5ff65e9da8 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/WebConfigurer.java @@ -0,0 +1,148 @@ +package com.baeldung.jhipster.uaa.config; + +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.servlet.InstrumentedFilter; +import com.codahale.metrics.servlets.MetricsServlet; +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.JHipsterProperties; +import io.github.jhipster.config.h2.H2ConfigurationHelper; +import io.undertow.UndertowOptions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; +import org.springframework.boot.web.server.*; +import org.springframework.boot.web.servlet.ServletContextInitializer; +import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.http.MediaType; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +import javax.servlet.*; +import java.nio.charset.StandardCharsets; +import java.util.*; + + +/** + * Configuration of web application with Servlet 3.0 APIs. + */ +@Configuration +public class WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer { + + private final Logger log = LoggerFactory.getLogger(WebConfigurer.class); + + private final Environment env; + + private final JHipsterProperties jHipsterProperties; + + private MetricRegistry metricRegistry; + + public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) { + + this.env = env; + this.jHipsterProperties = jHipsterProperties; + } + + @Override + public void onStartup(ServletContext servletContext) throws ServletException { + if (env.getActiveProfiles().length != 0) { + log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles()); + } + EnumSet disps = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.ASYNC); + initMetrics(servletContext, disps); + if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { + initH2Console(servletContext); + } + log.info("Web application fully configured"); + } + + /** + * Customize the Servlet engine: Mime types, the document root, the cache. + */ + @Override + public void customize(WebServerFactory server) { + setMimeMappings(server); + + /* + * Enable HTTP/2 for Undertow - https://twitter.com/ankinson/status/829256167700492288 + * HTTP/2 requires HTTPS, so HTTP requests will fallback to HTTP/1.1. + * See the JHipsterProperties class and your application-*.yml configuration files + * for more information. + */ + if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && + server instanceof UndertowServletWebServerFactory) { + + ((UndertowServletWebServerFactory) server) + .addBuilderCustomizers(builder -> + builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true)); + } + } + + private void setMimeMappings(WebServerFactory server) { + if (server instanceof ConfigurableServletWebServerFactory) { + MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT); + // IE issue, see https://github.com/jhipster/generator-jhipster/pull/711 + mappings.add("html", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase()); + // CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64 + mappings.add("json", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase()); + ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server; + servletWebServer.setMimeMappings(mappings); + } + } + + /** + * Initializes Metrics. + */ + private void initMetrics(ServletContext servletContext, EnumSet disps) { + log.debug("Initializing Metrics registries"); + servletContext.setAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE, + metricRegistry); + servletContext.setAttribute(MetricsServlet.METRICS_REGISTRY, + metricRegistry); + + log.debug("Registering Metrics Filter"); + FilterRegistration.Dynamic metricsFilter = servletContext.addFilter("webappMetricsFilter", + new InstrumentedFilter()); + + metricsFilter.addMappingForUrlPatterns(disps, true, "/*"); + metricsFilter.setAsyncSupported(true); + + log.debug("Registering Metrics Servlet"); + ServletRegistration.Dynamic metricsAdminServlet = + servletContext.addServlet("metricsServlet", new MetricsServlet()); + + metricsAdminServlet.addMapping("/management/metrics/*"); + metricsAdminServlet.setAsyncSupported(true); + metricsAdminServlet.setLoadOnStartup(2); + } + + @Bean + public CorsFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + CorsConfiguration config = jHipsterProperties.getCors(); + if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) { + log.debug("Registering CORS filter"); + source.registerCorsConfiguration("/api/**", config); + source.registerCorsConfiguration("/management/**", config); + source.registerCorsConfiguration("/v2/api-docs", config); + } + return new CorsFilter(source); + } + + /** + * Initializes H2 console. + */ + private void initH2Console(ServletContext servletContext) { + log.debug("Initialize H2 console"); + H2ConfigurationHelper.initH2Console(servletContext); + } + + @Autowired(required = false) + public void setMetricRegistry(MetricRegistry metricRegistry) { + this.metricRegistry = metricRegistry; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/audit/AuditEventConverter.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/audit/AuditEventConverter.java new file mode 100644 index 0000000000..e5e6971bfc --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/audit/AuditEventConverter.java @@ -0,0 +1,86 @@ +package com.baeldung.jhipster.uaa.config.audit; + +import com.baeldung.jhipster.uaa.domain.PersistentAuditEvent; + +import org.springframework.boot.actuate.audit.AuditEvent; +import org.springframework.security.web.authentication.WebAuthenticationDetails; +import org.springframework.stereotype.Component; + +import java.util.*; + +@Component +public class AuditEventConverter { + + /** + * Convert a list of PersistentAuditEvent to a list of AuditEvent + * + * @param persistentAuditEvents the list to convert + * @return the converted list. + */ + public List convertToAuditEvent(Iterable persistentAuditEvents) { + if (persistentAuditEvents == null) { + return Collections.emptyList(); + } + List auditEvents = new ArrayList<>(); + for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) { + auditEvents.add(convertToAuditEvent(persistentAuditEvent)); + } + return auditEvents; + } + + /** + * Convert a PersistentAuditEvent to an AuditEvent + * + * @param persistentAuditEvent the event to convert + * @return the converted list. + */ + public AuditEvent convertToAuditEvent(PersistentAuditEvent persistentAuditEvent) { + if (persistentAuditEvent == null) { + return null; + } + return new AuditEvent(persistentAuditEvent.getAuditEventDate(), persistentAuditEvent.getPrincipal(), + persistentAuditEvent.getAuditEventType(), convertDataToObjects(persistentAuditEvent.getData())); + } + + /** + * Internal conversion. This is needed to support the current SpringBoot actuator AuditEventRepository interface + * + * @param data the data to convert + * @return a map of String, Object + */ + public Map convertDataToObjects(Map data) { + Map results = new HashMap<>(); + + if (data != null) { + for (Map.Entry entry : data.entrySet()) { + results.put(entry.getKey(), entry.getValue()); + } + } + return results; + } + + /** + * Internal conversion. This method will allow to save additional data. + * By default, it will save the object as string + * + * @param data the data to convert + * @return a map of String, String + */ + public Map convertDataToStrings(Map data) { + Map results = new HashMap<>(); + + if (data != null) { + for (Map.Entry entry : data.entrySet()) { + // Extract the data that will be saved. + if (entry.getValue() instanceof WebAuthenticationDetails) { + WebAuthenticationDetails authenticationDetails = (WebAuthenticationDetails) entry.getValue(); + results.put("remoteAddress", authenticationDetails.getRemoteAddress()); + results.put("sessionId", authenticationDetails.getSessionId()); + } else { + results.put(entry.getKey(), Objects.toString(entry.getValue())); + } + } + } + return results; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/audit/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/audit/package-info.java new file mode 100644 index 0000000000..c39bf76a2c --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/audit/package-info.java @@ -0,0 +1,4 @@ +/** + * Audit specific code. + */ +package com.baeldung.jhipster.uaa.config.audit; diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/package-info.java new file mode 100644 index 0000000000..bf6af99d80 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/config/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring Framework configuration files. + */ +package com.baeldung.jhipster.uaa.config; diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/AbstractAuditingEntity.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/AbstractAuditingEntity.java new file mode 100644 index 0000000000..919af9be23 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/AbstractAuditingEntity.java @@ -0,0 +1,79 @@ +package com.baeldung.jhipster.uaa.domain; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.hibernate.envers.Audited; +import org.springframework.data.annotation.CreatedBy; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedBy; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import java.io.Serializable; +import java.time.Instant; +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; + +/** + * Base abstract class for entities which will hold definitions for created, last modified by and created, + * last modified by date. + */ +@MappedSuperclass +@Audited +@EntityListeners(AuditingEntityListener.class) +public abstract class AbstractAuditingEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + @CreatedBy + @Column(name = "created_by", nullable = false, length = 50, updatable = false) + @JsonIgnore + private String createdBy; + + @CreatedDate + @Column(name = "created_date", nullable = false, updatable = false) + @JsonIgnore + private Instant createdDate = Instant.now(); + + @LastModifiedBy + @Column(name = "last_modified_by", length = 50) + @JsonIgnore + private String lastModifiedBy; + + @LastModifiedDate + @Column(name = "last_modified_date") + @JsonIgnore + private Instant lastModifiedDate = Instant.now(); + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Instant getCreatedDate() { + return createdDate; + } + + public void setCreatedDate(Instant createdDate) { + this.createdDate = createdDate; + } + + public String getLastModifiedBy() { + return lastModifiedBy; + } + + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public Instant getLastModifiedDate() { + return lastModifiedDate; + } + + public void setLastModifiedDate(Instant lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/Authority.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/Authority.java new file mode 100644 index 0000000000..ea7159a57f --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/Authority.java @@ -0,0 +1,62 @@ +package com.baeldung.jhipster.uaa.domain; + +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Column; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.io.Serializable; + +/** + * An authority (a security role) used by Spring Security. + */ +@Entity +@Table(name = "jhi_authority") +@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) +public class Authority implements Serializable { + + private static final long serialVersionUID = 1L; + + @NotNull + @Size(max = 50) + @Id + @Column(length = 50) + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + Authority authority = (Authority) o; + + return !(name != null ? !name.equals(authority.name) : authority.name != null); + } + + @Override + public int hashCode() { + return name != null ? name.hashCode() : 0; + } + + @Override + public String toString() { + return "Authority{" + + "name='" + name + '\'' + + "}"; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/PersistentAuditEvent.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/PersistentAuditEvent.java new file mode 100644 index 0000000000..af232b1a40 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/PersistentAuditEvent.java @@ -0,0 +1,81 @@ +package com.baeldung.jhipster.uaa.domain; + +import javax.persistence.*; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; + +/** + * Persist AuditEvent managed by the Spring Boot actuator. + * + * @see org.springframework.boot.actuate.audit.AuditEvent + */ +@Entity +@Table(name = "jhi_persistent_audit_event") +public class PersistentAuditEvent implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "event_id") + private Long id; + + @NotNull + @Column(nullable = false) + private String principal; + + @Column(name = "event_date") + private Instant auditEventDate; + + @Column(name = "event_type") + private String auditEventType; + + @ElementCollection + @MapKeyColumn(name = "name") + @Column(name = "value") + @CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns=@JoinColumn(name="event_id")) + private Map data = new HashMap<>(); + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getPrincipal() { + return principal; + } + + public void setPrincipal(String principal) { + this.principal = principal; + } + + public Instant getAuditEventDate() { + return auditEventDate; + } + + public void setAuditEventDate(Instant auditEventDate) { + this.auditEventDate = auditEventDate; + } + + public String getAuditEventType() { + return auditEventType; + } + + public void setAuditEventType(String auditEventType) { + this.auditEventType = auditEventType; + } + + public Map getData() { + return data; + } + + public void setData(Map data) { + this.data = data; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/User.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/User.java new file mode 100644 index 0000000000..3c5e7ffd2b --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/User.java @@ -0,0 +1,233 @@ +package com.baeldung.jhipster.uaa.domain; + +import com.baeldung.jhipster.uaa.config.Constants; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.apache.commons.lang3.StringUtils; +import org.hibernate.annotations.BatchSize; +import org.hibernate.annotations.Cache; +import org.hibernate.annotations.CacheConcurrencyStrategy; +import javax.validation.constraints.Email; + +import javax.persistence.*; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; +import javax.validation.constraints.Size; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Locale; +import java.util.Objects; +import java.util.Set; +import java.time.Instant; + +/** + * A user. + */ +@Entity +@Table(name = "jhi_user") +@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) +public class User extends AbstractAuditingEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + @NotNull + @Pattern(regexp = Constants.LOGIN_REGEX) + @Size(min = 1, max = 50) + @Column(length = 50, unique = true, nullable = false) + private String login; + + @JsonIgnore + @NotNull + @Size(min = 60, max = 60) + @Column(name = "password_hash", length = 60, nullable = false) + private String password; + + @Size(max = 50) + @Column(name = "first_name", length = 50) + private String firstName; + + @Size(max = 50) + @Column(name = "last_name", length = 50) + private String lastName; + + @Email + @Size(min = 5, max = 254) + @Column(length = 254, unique = true) + private String email; + + @NotNull + @Column(nullable = false) + private boolean activated = false; + + @Size(min = 2, max = 6) + @Column(name = "lang_key", length = 6) + private String langKey; + + @Size(max = 256) + @Column(name = "image_url", length = 256) + private String imageUrl; + + @Size(max = 20) + @Column(name = "activation_key", length = 20) + @JsonIgnore + private String activationKey; + + @Size(max = 20) + @Column(name = "reset_key", length = 20) + @JsonIgnore + private String resetKey; + + @Column(name = "reset_date") + private Instant resetDate = null; + + @JsonIgnore + @ManyToMany + @JoinTable( + name = "jhi_user_authority", + joinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "id")}, + inverseJoinColumns = {@JoinColumn(name = "authority_name", referencedColumnName = "name")}) + @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) + @BatchSize(size = 20) + private Set authorities = new HashSet<>(); + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getLogin() { + return login; + } + + // Lowercase the login before saving it in database + public void setLogin(String login) { + this.login = StringUtils.lowerCase(login, Locale.ENGLISH); + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public boolean getActivated() { + return activated; + } + + public void setActivated(boolean activated) { + this.activated = activated; + } + + public String getActivationKey() { + return activationKey; + } + + public void setActivationKey(String activationKey) { + this.activationKey = activationKey; + } + + public String getResetKey() { + return resetKey; + } + + public void setResetKey(String resetKey) { + this.resetKey = resetKey; + } + + public Instant getResetDate() { + return resetDate; + } + + public void setResetDate(Instant resetDate) { + this.resetDate = resetDate; + } + + public String getLangKey() { + return langKey; + } + + public void setLangKey(String langKey) { + this.langKey = langKey; + } + + public Set getAuthorities() { + return authorities; + } + + public void setAuthorities(Set authorities) { + this.authorities = authorities; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + User user = (User) o; + return !(user.getId() == null || getId() == null) && Objects.equals(getId(), user.getId()); + } + + @Override + public int hashCode() { + return Objects.hashCode(getId()); + } + + @Override + public String toString() { + return "User{" + + "login='" + login + '\'' + + ", firstName='" + firstName + '\'' + + ", lastName='" + lastName + '\'' + + ", email='" + email + '\'' + + ", imageUrl='" + imageUrl + '\'' + + ", activated='" + activated + '\'' + + ", langKey='" + langKey + '\'' + + ", activationKey='" + activationKey + '\'' + + "}"; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/package-info.java new file mode 100644 index 0000000000..c79cfa9aa2 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/domain/package-info.java @@ -0,0 +1,4 @@ +/** + * JPA domain objects. + */ +package com.baeldung.jhipster.uaa.domain; diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/AuthorityRepository.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/AuthorityRepository.java new file mode 100644 index 0000000000..b60e601315 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/AuthorityRepository.java @@ -0,0 +1,11 @@ +package com.baeldung.jhipster.uaa.repository; + +import com.baeldung.jhipster.uaa.domain.Authority; + +import org.springframework.data.jpa.repository.JpaRepository; + +/** + * Spring Data JPA repository for the Authority entity. + */ +public interface AuthorityRepository extends JpaRepository { +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/CustomAuditEventRepository.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/CustomAuditEventRepository.java new file mode 100644 index 0000000000..6f63984c52 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/CustomAuditEventRepository.java @@ -0,0 +1,89 @@ +package com.baeldung.jhipster.uaa.repository; + +import com.baeldung.jhipster.uaa.config.Constants; +import com.baeldung.jhipster.uaa.config.audit.AuditEventConverter; +import com.baeldung.jhipster.uaa.domain.PersistentAuditEvent; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.actuate.audit.AuditEvent; +import org.springframework.boot.actuate.audit.AuditEventRepository; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.time.Instant; +import java.util.*; + +/** + * An implementation of Spring Boot's AuditEventRepository. + */ +@Repository +public class CustomAuditEventRepository implements AuditEventRepository { + + private static final String AUTHORIZATION_FAILURE = "AUTHORIZATION_FAILURE"; + + /** + * Should be the same as in Liquibase migration. + */ + protected static final int EVENT_DATA_COLUMN_MAX_LENGTH = 255; + + private final PersistenceAuditEventRepository persistenceAuditEventRepository; + + private final AuditEventConverter auditEventConverter; + + private final Logger log = LoggerFactory.getLogger(getClass()); + + public CustomAuditEventRepository(PersistenceAuditEventRepository persistenceAuditEventRepository, + AuditEventConverter auditEventConverter) { + + this.persistenceAuditEventRepository = persistenceAuditEventRepository; + this.auditEventConverter = auditEventConverter; + } + + @Override + public List find(String principal, Instant after, String type) { + Iterable persistentAuditEvents = + persistenceAuditEventRepository.findByPrincipalAndAuditEventDateAfterAndAuditEventType(principal, after, type); + return auditEventConverter.convertToAuditEvent(persistentAuditEvents); + } + + @Override + @Transactional(propagation = Propagation.REQUIRES_NEW) + public void add(AuditEvent event) { + if (!AUTHORIZATION_FAILURE.equals(event.getType()) && + !Constants.ANONYMOUS_USER.equals(event.getPrincipal())) { + + PersistentAuditEvent persistentAuditEvent = new PersistentAuditEvent(); + persistentAuditEvent.setPrincipal(event.getPrincipal()); + persistentAuditEvent.setAuditEventType(event.getType()); + persistentAuditEvent.setAuditEventDate(event.getTimestamp()); + Map eventData = auditEventConverter.convertDataToStrings(event.getData()); + persistentAuditEvent.setData(truncate(eventData)); + persistenceAuditEventRepository.save(persistentAuditEvent); + } + } + + /** + * Truncate event data that might exceed column length. + */ + private Map truncate(Map data) { + Map results = new HashMap<>(); + + if (data != null) { + for (Map.Entry entry : data.entrySet()) { + String value = entry.getValue(); + if (value != null) { + int length = value.length(); + if (length > EVENT_DATA_COLUMN_MAX_LENGTH) { + value = value.substring(0, EVENT_DATA_COLUMN_MAX_LENGTH); + log.warn("Event data for {} too long ({}) has been truncated to {}. Consider increasing column width.", + entry.getKey(), length, EVENT_DATA_COLUMN_MAX_LENGTH); + } + } + results.put(entry.getKey(), value); + } + } + return results; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/PersistenceAuditEventRepository.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/PersistenceAuditEventRepository.java new file mode 100644 index 0000000000..259887fcc4 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/PersistenceAuditEventRepository.java @@ -0,0 +1,25 @@ +package com.baeldung.jhipster.uaa.repository; + +import com.baeldung.jhipster.uaa.domain.PersistentAuditEvent; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.time.Instant; +import java.util.List; + +/** + * Spring Data JPA repository for the PersistentAuditEvent entity. + */ +public interface PersistenceAuditEventRepository extends JpaRepository { + + List findByPrincipal(String principal); + + List findByAuditEventDateAfter(Instant after); + + List findByPrincipalAndAuditEventDateAfter(String principal, Instant after); + + List findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principal, Instant after, String type); + + Page findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable); +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/UserRepository.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/UserRepository.java new file mode 100644 index 0000000000..dda52a5ef5 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/UserRepository.java @@ -0,0 +1,47 @@ +package com.baeldung.jhipster.uaa.repository; + +import com.baeldung.jhipster.uaa.domain.User; + +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.EntityGraph; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; +import java.util.List; +import java.util.Optional; +import java.time.Instant; + +/** + * Spring Data JPA repository for the User entity. + */ +@Repository +public interface UserRepository extends JpaRepository { + + String USERS_BY_LOGIN_CACHE = "usersByLogin"; + + String USERS_BY_EMAIL_CACHE = "usersByEmail"; + + Optional findOneByActivationKey(String activationKey); + + List findAllByActivatedIsFalseAndCreatedDateBefore(Instant dateTime); + + Optional findOneByResetKey(String resetKey); + + Optional findOneByEmailIgnoreCase(String email); + + Optional findOneByLogin(String login); + + @EntityGraph(attributePaths = "authorities") + Optional findOneWithAuthoritiesById(Long id); + + @EntityGraph(attributePaths = "authorities") + @Cacheable(cacheNames = USERS_BY_LOGIN_CACHE) + Optional findOneWithAuthoritiesByLogin(String login); + + @EntityGraph(attributePaths = "authorities") + @Cacheable(cacheNames = USERS_BY_EMAIL_CACHE) + Optional findOneWithAuthoritiesByEmail(String email); + + Page findAllByLoginNot(Pageable pageable, String login); +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/package-info.java new file mode 100644 index 0000000000..135fad8759 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/repository/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring Data JPA repositories. + */ +package com.baeldung.jhipster.uaa.repository; diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/AuthoritiesConstants.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/AuthoritiesConstants.java new file mode 100644 index 0000000000..d6f18015c5 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/AuthoritiesConstants.java @@ -0,0 +1,16 @@ +package com.baeldung.jhipster.uaa.security; + +/** + * Constants for Spring Security authorities. + */ +public final class AuthoritiesConstants { + + public static final String ADMIN = "ROLE_ADMIN"; + + public static final String USER = "ROLE_USER"; + + public static final String ANONYMOUS = "ROLE_ANONYMOUS"; + + private AuthoritiesConstants() { + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/DomainUserDetailsService.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/DomainUserDetailsService.java new file mode 100644 index 0000000000..5f0d249070 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/DomainUserDetailsService.java @@ -0,0 +1,62 @@ +package com.baeldung.jhipster.uaa.security; + +import com.baeldung.jhipster.uaa.domain.User; +import com.baeldung.jhipster.uaa.repository.UserRepository; +import org.hibernate.validator.internal.constraintvalidators.hv.EmailValidator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * Authenticate a user from the database. + */ +@Component("userDetailsService") +public class DomainUserDetailsService implements UserDetailsService { + + private final Logger log = LoggerFactory.getLogger(DomainUserDetailsService.class); + + private final UserRepository userRepository; + + public DomainUserDetailsService(UserRepository userRepository) { + this.userRepository = userRepository; + } + + @Override + @Transactional + public UserDetails loadUserByUsername(final String login) { + log.debug("Authenticating {}", login); + + if (new EmailValidator().isValid(login, null)) { + return userRepository.findOneWithAuthoritiesByEmail(login) + .map(user -> createSpringSecurityUser(login, user)) + .orElseThrow(() -> new UsernameNotFoundException("User with email " + login + " was not found in the database")); + } + + String lowercaseLogin = login.toLowerCase(Locale.ENGLISH); + return userRepository.findOneWithAuthoritiesByLogin(lowercaseLogin) + .map(user -> createSpringSecurityUser(lowercaseLogin, user)) + .orElseThrow(() -> new UsernameNotFoundException("User " + lowercaseLogin + " was not found in the database")); + + } + + private org.springframework.security.core.userdetails.User createSpringSecurityUser(String lowercaseLogin, User user) { + if (!user.getActivated()) { + throw new UserNotActivatedException("User " + lowercaseLogin + " was not activated"); + } + List grantedAuthorities = user.getAuthorities().stream() + .map(authority -> new SimpleGrantedAuthority(authority.getName())) + .collect(Collectors.toList()); + return new org.springframework.security.core.userdetails.User(user.getLogin(), + user.getPassword(), + grantedAuthorities); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/IatTokenEnhancer.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/IatTokenEnhancer.java new file mode 100644 index 0000000000..d9c2e2b05a --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/IatTokenEnhancer.java @@ -0,0 +1,36 @@ +package com.baeldung.jhipster.uaa.security; + +import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; +import org.springframework.security.oauth2.common.OAuth2AccessToken; +import org.springframework.security.oauth2.provider.OAuth2Authentication; +import org.springframework.security.oauth2.provider.token.TokenEnhancer; +import org.springframework.stereotype.Component; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * Adds the standard "iat" claim to tokens so we know when they have been created. + * This is needed for a session timeout due to inactivity (ignored in case of "remember-me"). + */ +@Component +public class IatTokenEnhancer implements TokenEnhancer { + + @Override + public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) { + addClaims((DefaultOAuth2AccessToken) accessToken); + return accessToken; + } + + private void addClaims(DefaultOAuth2AccessToken accessToken) { + DefaultOAuth2AccessToken token = accessToken; + Map additionalInformation = token.getAdditionalInformation(); + if (additionalInformation.isEmpty()) { + additionalInformation = new LinkedHashMap(); + } + //add "iat" claim with current time in secs + //this is used for an inactive session timeout + additionalInformation.put("iat", new Integer((int)(System.currentTimeMillis()/1000L))); + token.setAdditionalInformation(additionalInformation); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/SecurityUtils.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/SecurityUtils.java new file mode 100644 index 0000000000..b6ce7546df --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/SecurityUtils.java @@ -0,0 +1,64 @@ +package com.baeldung.jhipster.uaa.security; + +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; + +import java.util.Optional; + +/** + * Utility class for Spring Security. + */ +public final class SecurityUtils { + + private SecurityUtils() { + } + + /** + * Get the login of the current user. + * + * @return the login of the current user + */ + public static Optional getCurrentUserLogin() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional.ofNullable(securityContext.getAuthentication()) + .map(authentication -> { + if (authentication.getPrincipal() instanceof UserDetails) { + UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal(); + return springSecurityUser.getUsername(); + } else if (authentication.getPrincipal() instanceof String) { + return (String) authentication.getPrincipal(); + } + return null; + }); + } + + /** + * Check if a user is authenticated. + * + * @return true if the user is authenticated, false otherwise + */ + public static boolean isAuthenticated() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional.ofNullable(securityContext.getAuthentication()) + .map(authentication -> authentication.getAuthorities().stream() + .noneMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(AuthoritiesConstants.ANONYMOUS))) + .orElse(false); + } + + /** + * If the current user has a specific authority (security role). + *

+ * The name of this method comes from the isUserInRole() method in the Servlet API + * + * @param authority the authority to check + * @return true if the current user has the authority, false otherwise + */ + public static boolean isCurrentUserInRole(String authority) { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional.ofNullable(securityContext.getAuthentication()) + .map(authentication -> authentication.getAuthorities().stream() + .anyMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(authority))) + .orElse(false); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/SpringSecurityAuditorAware.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/SpringSecurityAuditorAware.java new file mode 100644 index 0000000000..7b71ceab9d --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/SpringSecurityAuditorAware.java @@ -0,0 +1,20 @@ +package com.baeldung.jhipster.uaa.security; + +import com.baeldung.jhipster.uaa.config.Constants; + +import java.util.Optional; + +import org.springframework.data.domain.AuditorAware; +import org.springframework.stereotype.Component; + +/** + * Implementation of AuditorAware based on Spring Security. + */ +@Component +public class SpringSecurityAuditorAware implements AuditorAware { + + @Override + public Optional getCurrentAuditor() { + return Optional.of(SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT)); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/UserNotActivatedException.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/UserNotActivatedException.java new file mode 100644 index 0000000000..0a1300e466 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/UserNotActivatedException.java @@ -0,0 +1,19 @@ +package com.baeldung.jhipster.uaa.security; + +import org.springframework.security.core.AuthenticationException; + +/** + * This exception is thrown in case of a not activated user trying to authenticate. + */ +public class UserNotActivatedException extends AuthenticationException { + + private static final long serialVersionUID = 1L; + + public UserNotActivatedException(String message) { + super(message); + } + + public UserNotActivatedException(String message, Throwable t) { + super(message, t); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/package-info.java new file mode 100644 index 0000000000..b812840289 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/security/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring Security configuration. + */ +package com.baeldung.jhipster.uaa.security; diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/AuditEventService.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/AuditEventService.java new file mode 100644 index 0000000000..ace539f553 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/AuditEventService.java @@ -0,0 +1,51 @@ +package com.baeldung.jhipster.uaa.service; + +import com.baeldung.jhipster.uaa.config.audit.AuditEventConverter; +import com.baeldung.jhipster.uaa.repository.PersistenceAuditEventRepository; +import org.springframework.boot.actuate.audit.AuditEvent; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.Instant; +import java.util.Optional; + +/** + * Service for managing audit events. + *

+ * This is the default implementation to support SpringBoot Actuator AuditEventRepository + */ +@Service +@Transactional +public class AuditEventService { + + private final PersistenceAuditEventRepository persistenceAuditEventRepository; + + private final AuditEventConverter auditEventConverter; + + public AuditEventService( + PersistenceAuditEventRepository persistenceAuditEventRepository, + AuditEventConverter auditEventConverter) { + + this.persistenceAuditEventRepository = persistenceAuditEventRepository; + this.auditEventConverter = auditEventConverter; + } + + public Page findAll(Pageable pageable) { + return persistenceAuditEventRepository.findAll(pageable) + .map(auditEventConverter::convertToAuditEvent); + } + + public Page findByDates(Instant fromDate, Instant toDate, Pageable pageable) { + return persistenceAuditEventRepository.findAllByAuditEventDateBetween(fromDate, toDate, pageable) + .map(auditEventConverter::convertToAuditEvent); + } + + public Optional find(Long id) { + return Optional.ofNullable(persistenceAuditEventRepository.findById(id)) + .filter(Optional::isPresent) + .map(Optional::get) + .map(auditEventConverter::convertToAuditEvent); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/MailService.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/MailService.java new file mode 100644 index 0000000000..1535fcdac6 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/MailService.java @@ -0,0 +1,105 @@ +package com.baeldung.jhipster.uaa.service; + +import com.baeldung.jhipster.uaa.domain.User; + +import io.github.jhipster.config.JHipsterProperties; + +import java.nio.charset.StandardCharsets; +import java.util.Locale; +import javax.mail.internet.MimeMessage; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.MessageSource; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.mail.javamail.MimeMessageHelper; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; +import org.thymeleaf.context.Context; +import org.thymeleaf.spring5.SpringTemplateEngine; + +/** + * Service for sending emails. + *

+ * We use the @Async annotation to send emails asynchronously. + */ +@Service +public class MailService { + + private final Logger log = LoggerFactory.getLogger(MailService.class); + + private static final String USER = "user"; + + private static final String BASE_URL = "baseUrl"; + + private final JHipsterProperties jHipsterProperties; + + private final JavaMailSender javaMailSender; + + private final MessageSource messageSource; + + private final SpringTemplateEngine templateEngine; + + public MailService(JHipsterProperties jHipsterProperties, JavaMailSender javaMailSender, + MessageSource messageSource, SpringTemplateEngine templateEngine) { + + this.jHipsterProperties = jHipsterProperties; + this.javaMailSender = javaMailSender; + this.messageSource = messageSource; + this.templateEngine = templateEngine; + } + + @Async + public void sendEmail(String to, String subject, String content, boolean isMultipart, boolean isHtml) { + log.debug("Send email[multipart '{}' and html '{}'] to '{}' with subject '{}' and content={}", + isMultipart, isHtml, to, subject, content); + + // Prepare message using a Spring helper + MimeMessage mimeMessage = javaMailSender.createMimeMessage(); + try { + MimeMessageHelper message = new MimeMessageHelper(mimeMessage, isMultipart, StandardCharsets.UTF_8.name()); + message.setTo(to); + message.setFrom(jHipsterProperties.getMail().getFrom()); + message.setSubject(subject); + message.setText(content, isHtml); + javaMailSender.send(mimeMessage); + log.debug("Sent email to User '{}'", to); + } catch (Exception e) { + if (log.isDebugEnabled()) { + log.warn("Email could not be sent to user '{}'", to, e); + } else { + log.warn("Email could not be sent to user '{}': {}", to, e.getMessage()); + } + } + } + + @Async + public void sendEmailFromTemplate(User user, String templateName, String titleKey) { + Locale locale = Locale.forLanguageTag(user.getLangKey()); + Context context = new Context(locale); + context.setVariable(USER, user); + context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl()); + String content = templateEngine.process(templateName, context); + String subject = messageSource.getMessage(titleKey, null, locale); + sendEmail(user.getEmail(), subject, content, false, true); + + } + + @Async + public void sendActivationEmail(User user) { + log.debug("Sending activation email to '{}'", user.getEmail()); + sendEmailFromTemplate(user, "mail/activationEmail", "email.activation.title"); + } + + @Async + public void sendCreationEmail(User user) { + log.debug("Sending creation email to '{}'", user.getEmail()); + sendEmailFromTemplate(user, "mail/creationEmail", "email.activation.title"); + } + + @Async + public void sendPasswordResetMail(User user) { + log.debug("Sending password reset email to '{}'", user.getEmail()); + sendEmailFromTemplate(user, "mail/passwordResetEmail", "email.reset.title"); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/UserService.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/UserService.java new file mode 100644 index 0000000000..8f5c7bffcc --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/UserService.java @@ -0,0 +1,293 @@ +package com.baeldung.jhipster.uaa.service; + +import com.baeldung.jhipster.uaa.config.Constants; +import com.baeldung.jhipster.uaa.domain.Authority; +import com.baeldung.jhipster.uaa.domain.User; +import com.baeldung.jhipster.uaa.repository.AuthorityRepository; +import com.baeldung.jhipster.uaa.repository.UserRepository; +import com.baeldung.jhipster.uaa.security.AuthoritiesConstants; +import com.baeldung.jhipster.uaa.security.SecurityUtils; +import com.baeldung.jhipster.uaa.service.dto.UserDTO; +import com.baeldung.jhipster.uaa.service.util.RandomUtil; +import com.baeldung.jhipster.uaa.web.rest.errors.*; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cache.CacheManager; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import java.util.*; +import java.util.stream.Collectors; + +/** + * Service class for managing users. + */ +@Service +@Transactional +public class UserService { + + private final Logger log = LoggerFactory.getLogger(UserService.class); + + private final UserRepository userRepository; + + private final PasswordEncoder passwordEncoder; + + private final AuthorityRepository authorityRepository; + + private final CacheManager cacheManager; + + public UserService(UserRepository userRepository, PasswordEncoder passwordEncoder, AuthorityRepository authorityRepository, CacheManager cacheManager) { + this.userRepository = userRepository; + this.passwordEncoder = passwordEncoder; + this.authorityRepository = authorityRepository; + this.cacheManager = cacheManager; + } + + public Optional activateRegistration(String key) { + log.debug("Activating user for activation key {}", key); + return userRepository.findOneByActivationKey(key) + .map(user -> { + // activate given user for the registration key. + user.setActivated(true); + user.setActivationKey(null); + this.clearUserCaches(user); + log.debug("Activated user: {}", user); + return user; + }); + } + + public Optional completePasswordReset(String newPassword, String key) { + log.debug("Reset user password for reset key {}", key); + return userRepository.findOneByResetKey(key) + .filter(user -> user.getResetDate().isAfter(Instant.now().minusSeconds(86400))) + .map(user -> { + user.setPassword(passwordEncoder.encode(newPassword)); + user.setResetKey(null); + user.setResetDate(null); + this.clearUserCaches(user); + return user; + }); + } + + public Optional requestPasswordReset(String mail) { + return userRepository.findOneByEmailIgnoreCase(mail) + .filter(User::getActivated) + .map(user -> { + user.setResetKey(RandomUtil.generateResetKey()); + user.setResetDate(Instant.now()); + this.clearUserCaches(user); + return user; + }); + } + + public User registerUser(UserDTO userDTO, String password) { + userRepository.findOneByLogin(userDTO.getLogin().toLowerCase()).ifPresent(existingUser -> { + boolean removed = removeNonActivatedUser(existingUser); + if (!removed) { + throw new LoginAlreadyUsedException(); + } + }); + userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()).ifPresent(existingUser -> { + boolean removed = removeNonActivatedUser(existingUser); + if (!removed) { + throw new EmailAlreadyUsedException(); + } + }); + User newUser = new User(); + String encryptedPassword = passwordEncoder.encode(password); + newUser.setLogin(userDTO.getLogin().toLowerCase()); + // new user gets initially a generated password + newUser.setPassword(encryptedPassword); + newUser.setFirstName(userDTO.getFirstName()); + newUser.setLastName(userDTO.getLastName()); + newUser.setEmail(userDTO.getEmail().toLowerCase()); + newUser.setImageUrl(userDTO.getImageUrl()); + newUser.setLangKey(userDTO.getLangKey()); + // new user is not active + newUser.setActivated(false); + // new user gets registration key + newUser.setActivationKey(RandomUtil.generateActivationKey()); + Set authorities = new HashSet<>(); + authorityRepository.findById(AuthoritiesConstants.USER).ifPresent(authorities::add); + newUser.setAuthorities(authorities); + userRepository.save(newUser); + this.clearUserCaches(newUser); + log.debug("Created Information for User: {}", newUser); + return newUser; + } + private boolean removeNonActivatedUser(User existingUser){ + if(existingUser.getActivated()) { + return false; + } + userRepository.delete(existingUser); + userRepository.flush(); + this.clearUserCaches(existingUser); + return true; + } + + public User createUser(UserDTO userDTO) { + User user = new User(); + user.setLogin(userDTO.getLogin().toLowerCase()); + user.setFirstName(userDTO.getFirstName()); + user.setLastName(userDTO.getLastName()); + user.setEmail(userDTO.getEmail().toLowerCase()); + user.setImageUrl(userDTO.getImageUrl()); + if (userDTO.getLangKey() == null) { + user.setLangKey(Constants.DEFAULT_LANGUAGE); // default language + } else { + user.setLangKey(userDTO.getLangKey()); + } + String encryptedPassword = passwordEncoder.encode(RandomUtil.generatePassword()); + user.setPassword(encryptedPassword); + user.setResetKey(RandomUtil.generateResetKey()); + user.setResetDate(Instant.now()); + user.setActivated(true); + if (userDTO.getAuthorities() != null) { + Set authorities = userDTO.getAuthorities().stream() + .map(authorityRepository::findById) + .filter(Optional::isPresent) + .map(Optional::get) + .collect(Collectors.toSet()); + user.setAuthorities(authorities); + } + userRepository.save(user); + this.clearUserCaches(user); + log.debug("Created Information for User: {}", user); + return user; + } + + /** + * Update basic information (first name, last name, email, language) for the current user. + * + * @param firstName first name of user + * @param lastName last name of user + * @param email email id of user + * @param langKey language key + * @param imageUrl image URL of user + */ + public void updateUser(String firstName, String lastName, String email, String langKey, String imageUrl) { + SecurityUtils.getCurrentUserLogin() + .flatMap(userRepository::findOneByLogin) + .ifPresent(user -> { + user.setFirstName(firstName); + user.setLastName(lastName); + user.setEmail(email.toLowerCase()); + user.setLangKey(langKey); + user.setImageUrl(imageUrl); + this.clearUserCaches(user); + log.debug("Changed Information for User: {}", user); + }); + } + + /** + * Update all information for a specific user, and return the modified user. + * + * @param userDTO user to update + * @return updated user + */ + public Optional updateUser(UserDTO userDTO) { + return Optional.of(userRepository + .findById(userDTO.getId())) + .filter(Optional::isPresent) + .map(Optional::get) + .map(user -> { + this.clearUserCaches(user); + user.setLogin(userDTO.getLogin().toLowerCase()); + user.setFirstName(userDTO.getFirstName()); + user.setLastName(userDTO.getLastName()); + user.setEmail(userDTO.getEmail().toLowerCase()); + user.setImageUrl(userDTO.getImageUrl()); + user.setActivated(userDTO.isActivated()); + user.setLangKey(userDTO.getLangKey()); + Set managedAuthorities = user.getAuthorities(); + managedAuthorities.clear(); + userDTO.getAuthorities().stream() + .map(authorityRepository::findById) + .filter(Optional::isPresent) + .map(Optional::get) + .forEach(managedAuthorities::add); + this.clearUserCaches(user); + log.debug("Changed Information for User: {}", user); + return user; + }) + .map(UserDTO::new); + } + + public void deleteUser(String login) { + userRepository.findOneByLogin(login).ifPresent(user -> { + userRepository.delete(user); + this.clearUserCaches(user); + log.debug("Deleted User: {}", user); + }); + } + + public void changePassword(String currentClearTextPassword, String newPassword) { + SecurityUtils.getCurrentUserLogin() + .flatMap(userRepository::findOneByLogin) + .ifPresent(user -> { + String currentEncryptedPassword = user.getPassword(); + if (!passwordEncoder.matches(currentClearTextPassword, currentEncryptedPassword)) { + throw new InvalidPasswordException(); + } + String encryptedPassword = passwordEncoder.encode(newPassword); + user.setPassword(encryptedPassword); + this.clearUserCaches(user); + log.debug("Changed password for User: {}", user); + }); + } + + @Transactional(readOnly = true) + public Page getAllManagedUsers(Pageable pageable) { + return userRepository.findAllByLoginNot(pageable, Constants.ANONYMOUS_USER).map(UserDTO::new); + } + + @Transactional(readOnly = true) + public Optional getUserWithAuthoritiesByLogin(String login) { + return userRepository.findOneWithAuthoritiesByLogin(login); + } + + @Transactional(readOnly = true) + public Optional getUserWithAuthorities(Long id) { + return userRepository.findOneWithAuthoritiesById(id); + } + + @Transactional(readOnly = true) + public Optional getUserWithAuthorities() { + return SecurityUtils.getCurrentUserLogin().flatMap(userRepository::findOneWithAuthoritiesByLogin); + } + + /** + * Not activated users should be automatically deleted after 3 days. + *

+ * This is scheduled to get fired everyday, at 01:00 (am). + */ + @Scheduled(cron = "0 0 1 * * ?") + public void removeNotActivatedUsers() { + userRepository + .findAllByActivatedIsFalseAndCreatedDateBefore(Instant.now().minus(3, ChronoUnit.DAYS)) + .forEach(user -> { + log.debug("Deleting not activated user {}", user.getLogin()); + userRepository.delete(user); + this.clearUserCaches(user); + }); + } + + /** + * @return a list of all the authorities + */ + public List getAuthorities() { + return authorityRepository.findAll().stream().map(Authority::getName).collect(Collectors.toList()); + } + + private void clearUserCaches(User user) { + Objects.requireNonNull(cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE)).evict(user.getLogin()); + Objects.requireNonNull(cacheManager.getCache(UserRepository.USERS_BY_EMAIL_CACHE)).evict(user.getEmail()); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/dto/PasswordChangeDTO.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/dto/PasswordChangeDTO.java new file mode 100644 index 0000000000..47a8720d4a --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/dto/PasswordChangeDTO.java @@ -0,0 +1,35 @@ +package com.baeldung.jhipster.uaa.service.dto; + +/** + * A DTO representing a password change required data - current and new password. + */ +public class PasswordChangeDTO { + private String currentPassword; + private String newPassword; + + public PasswordChangeDTO() { + // Empty constructor needed for Jackson. + } + + public PasswordChangeDTO(String currentPassword, String newPassword) { + this.currentPassword = currentPassword; + this.newPassword = newPassword; + } + + public String getCurrentPassword() { + + return currentPassword; + } + + public void setCurrentPassword(String currentPassword) { + this.currentPassword = currentPassword; + } + + public String getNewPassword() { + return newPassword; + } + + public void setNewPassword(String newPassword) { + this.newPassword = newPassword; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/dto/UserDTO.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/dto/UserDTO.java new file mode 100644 index 0000000000..e8a2e3300c --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/dto/UserDTO.java @@ -0,0 +1,199 @@ +package com.baeldung.jhipster.uaa.service.dto; + +import com.baeldung.jhipster.uaa.config.Constants; + +import com.baeldung.jhipster.uaa.domain.Authority; +import com.baeldung.jhipster.uaa.domain.User; + +import javax.validation.constraints.Email; +import javax.validation.constraints.NotBlank; + +import javax.validation.constraints.*; +import java.time.Instant; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * A DTO representing a user, with his authorities. + */ +public class UserDTO { + + private Long id; + + @NotBlank + @Pattern(regexp = Constants.LOGIN_REGEX) + @Size(min = 1, max = 50) + private String login; + + @Size(max = 50) + private String firstName; + + @Size(max = 50) + private String lastName; + + @Email + @Size(min = 5, max = 254) + private String email; + + @Size(max = 256) + private String imageUrl; + + private boolean activated = false; + + @Size(min = 2, max = 6) + private String langKey; + + private String createdBy; + + private Instant createdDate; + + private String lastModifiedBy; + + private Instant lastModifiedDate; + + private Set authorities; + + public UserDTO() { + // Empty constructor needed for Jackson. + } + + public UserDTO(User user) { + this.id = user.getId(); + this.login = user.getLogin(); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.email = user.getEmail(); + this.activated = user.getActivated(); + this.imageUrl = user.getImageUrl(); + this.langKey = user.getLangKey(); + this.createdBy = user.getCreatedBy(); + this.createdDate = user.getCreatedDate(); + this.lastModifiedBy = user.getLastModifiedBy(); + this.lastModifiedDate = user.getLastModifiedDate(); + this.authorities = user.getAuthorities().stream() + .map(Authority::getName) + .collect(Collectors.toSet()); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getLogin() { + return login; + } + + public void setLogin(String login) { + this.login = login; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public boolean isActivated() { + return activated; + } + + public void setActivated(boolean activated) { + this.activated = activated; + } + + public String getLangKey() { + return langKey; + } + + public void setLangKey(String langKey) { + this.langKey = langKey; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Instant getCreatedDate() { + return createdDate; + } + + public void setCreatedDate(Instant createdDate) { + this.createdDate = createdDate; + } + + public String getLastModifiedBy() { + return lastModifiedBy; + } + + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public Instant getLastModifiedDate() { + return lastModifiedDate; + } + + public void setLastModifiedDate(Instant lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } + + public Set getAuthorities() { + return authorities; + } + + public void setAuthorities(Set authorities) { + this.authorities = authorities; + } + + @Override + public String toString() { + return "UserDTO{" + + "login='" + login + '\'' + + ", firstName='" + firstName + '\'' + + ", lastName='" + lastName + '\'' + + ", email='" + email + '\'' + + ", imageUrl='" + imageUrl + '\'' + + ", activated=" + activated + + ", langKey='" + langKey + '\'' + + ", createdBy=" + createdBy + + ", createdDate=" + createdDate + + ", lastModifiedBy='" + lastModifiedBy + '\'' + + ", lastModifiedDate=" + lastModifiedDate + + ", authorities=" + authorities + + "}"; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/dto/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/dto/package-info.java new file mode 100644 index 0000000000..9fcb17ad7e --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/dto/package-info.java @@ -0,0 +1,4 @@ +/** + * Data Transfer Objects. + */ +package com.baeldung.jhipster.uaa.service.dto; diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/mapper/UserMapper.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/mapper/UserMapper.java new file mode 100644 index 0000000000..11948b3dce --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/mapper/UserMapper.java @@ -0,0 +1,76 @@ +package com.baeldung.jhipster.uaa.service.mapper; + +import com.baeldung.jhipster.uaa.domain.Authority; +import com.baeldung.jhipster.uaa.domain.User; +import com.baeldung.jhipster.uaa.service.dto.UserDTO; + +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * Mapper for the entity User and its DTO called UserDTO. + * + * Normal mappers are generated using MapStruct, this one is hand-coded as MapStruct + * support is still in beta, and requires a manual step with an IDE. + */ +@Service +public class UserMapper { + + public UserDTO userToUserDTO(User user) { + return new UserDTO(user); + } + + public List usersToUserDTOs(List users) { + return users.stream() + .filter(Objects::nonNull) + .map(this::userToUserDTO) + .collect(Collectors.toList()); + } + + public User userDTOToUser(UserDTO userDTO) { + if (userDTO == null) { + return null; + } else { + User user = new User(); + user.setId(userDTO.getId()); + user.setLogin(userDTO.getLogin()); + user.setFirstName(userDTO.getFirstName()); + user.setLastName(userDTO.getLastName()); + user.setEmail(userDTO.getEmail()); + user.setImageUrl(userDTO.getImageUrl()); + user.setActivated(userDTO.isActivated()); + user.setLangKey(userDTO.getLangKey()); + Set authorities = this.authoritiesFromStrings(userDTO.getAuthorities()); + if (authorities != null) { + user.setAuthorities(authorities); + } + return user; + } + } + + public List userDTOsToUsers(List userDTOs) { + return userDTOs.stream() + .filter(Objects::nonNull) + .map(this::userDTOToUser) + .collect(Collectors.toList()); + } + + public User userFromId(Long id) { + if (id == null) { + return null; + } + User user = new User(); + user.setId(id); + return user; + } + + public Set authoritiesFromStrings(Set strings) { + return strings.stream().map(string -> { + Authority auth = new Authority(); + auth.setName(string); + return auth; + }).collect(Collectors.toSet()); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/mapper/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/mapper/package-info.java new file mode 100644 index 0000000000..053d4a8e4c --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/mapper/package-info.java @@ -0,0 +1,4 @@ +/** + * MapStruct mappers for mapping domain objects and Data Transfer Objects. + */ +package com.baeldung.jhipster.uaa.service.mapper; diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/package-info.java new file mode 100644 index 0000000000..ca7bcd8f09 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/package-info.java @@ -0,0 +1,4 @@ +/** + * Service layer beans. + */ +package com.baeldung.jhipster.uaa.service; diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/util/RandomUtil.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/util/RandomUtil.java new file mode 100644 index 0000000000..8eab3ac101 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/service/util/RandomUtil.java @@ -0,0 +1,41 @@ +package com.baeldung.jhipster.uaa.service.util; + +import org.apache.commons.lang3.RandomStringUtils; + +/** + * Utility class for generating random Strings. + */ +public final class RandomUtil { + + private static final int DEF_COUNT = 20; + + private RandomUtil() { + } + + /** + * Generate a password. + * + * @return the generated password + */ + public static String generatePassword() { + return RandomStringUtils.randomAlphanumeric(DEF_COUNT); + } + + /** + * Generate an activation key. + * + * @return the generated activation key + */ + public static String generateActivationKey() { + return RandomStringUtils.randomNumeric(DEF_COUNT); + } + + /** + * Generate a reset key. + * + * @return the generated reset key + */ + public static String generateResetKey() { + return RandomStringUtils.randomNumeric(DEF_COUNT); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/AccountResource.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/AccountResource.java new file mode 100644 index 0000000000..144ce0f9d9 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/AccountResource.java @@ -0,0 +1,189 @@ +package com.baeldung.jhipster.uaa.web.rest; + +import com.codahale.metrics.annotation.Timed; + +import com.baeldung.jhipster.uaa.domain.User; +import com.baeldung.jhipster.uaa.repository.UserRepository; +import com.baeldung.jhipster.uaa.security.SecurityUtils; +import com.baeldung.jhipster.uaa.service.MailService; +import com.baeldung.jhipster.uaa.service.UserService; +import com.baeldung.jhipster.uaa.service.dto.PasswordChangeDTO; +import com.baeldung.jhipster.uaa.service.dto.UserDTO; +import com.baeldung.jhipster.uaa.web.rest.errors.*; +import com.baeldung.jhipster.uaa.web.rest.vm.KeyAndPasswordVM; +import com.baeldung.jhipster.uaa.web.rest.vm.ManagedUserVM; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; +import java.util.*; + + +/** + * REST controller for managing the current user's account. + */ +@RestController +@RequestMapping("/api") +public class AccountResource { + + private final Logger log = LoggerFactory.getLogger(AccountResource.class); + + private final UserRepository userRepository; + + private final UserService userService; + + private final MailService mailService; + + public AccountResource(UserRepository userRepository, UserService userService, MailService mailService) { + + this.userRepository = userRepository; + this.userService = userService; + this.mailService = mailService; + } + + /** + * POST /register : register the user. + * + * @param managedUserVM the managed user View Model + * @throws InvalidPasswordException 400 (Bad Request) if the password is incorrect + * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already used + * @throws LoginAlreadyUsedException 400 (Bad Request) if the login is already used + */ + @PostMapping("/register") + @Timed + @ResponseStatus(HttpStatus.CREATED) + public void registerAccount(@Valid @RequestBody ManagedUserVM managedUserVM) { + if (!checkPasswordLength(managedUserVM.getPassword())) { + throw new InvalidPasswordException(); + } + User user = userService.registerUser(managedUserVM, managedUserVM.getPassword()); + mailService.sendActivationEmail(user); + } + + /** + * GET /activate : activate the registered user. + * + * @param key the activation key + * @throws RuntimeException 500 (Internal Server Error) if the user couldn't be activated + */ + @GetMapping("/activate") + @Timed + public void activateAccount(@RequestParam(value = "key") String key) { + Optional user = userService.activateRegistration(key); + if (!user.isPresent()) { + throw new InternalServerErrorException("No user was found for this activation key"); + } + } + + /** + * GET /authenticate : check if the user is authenticated, and return its login. + * + * @param request the HTTP request + * @return the login if the user is authenticated + */ + @GetMapping("/authenticate") + @Timed + public String isAuthenticated(HttpServletRequest request) { + log.debug("REST request to check if the current user is authenticated"); + return request.getRemoteUser(); + } + + /** + * GET /account : get the current user. + * + * @return the current user + * @throws RuntimeException 500 (Internal Server Error) if the user couldn't be returned + */ + @GetMapping("/account") + @Timed + public UserDTO getAccount() { + return userService.getUserWithAuthorities() + .map(UserDTO::new) + .orElseThrow(() -> new InternalServerErrorException("User could not be found")); + } + + /** + * POST /account : update the current user information. + * + * @param userDTO the current user information + * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already used + * @throws RuntimeException 500 (Internal Server Error) if the user login wasn't found + */ + @PostMapping("/account") + @Timed + public void saveAccount(@Valid @RequestBody UserDTO userDTO) { + final String userLogin = SecurityUtils.getCurrentUserLogin().orElseThrow(() -> new InternalServerErrorException("Current user login not found")); + Optional existingUser = userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()); + if (existingUser.isPresent() && (!existingUser.get().getLogin().equalsIgnoreCase(userLogin))) { + throw new EmailAlreadyUsedException(); + } + Optional user = userRepository.findOneByLogin(userLogin); + if (!user.isPresent()) { + throw new InternalServerErrorException("User could not be found"); + } + userService.updateUser(userDTO.getFirstName(), userDTO.getLastName(), userDTO.getEmail(), + userDTO.getLangKey(), userDTO.getImageUrl()); + } + + /** + * POST /account/change-password : changes the current user's password + * + * @param passwordChangeDto current and new password + * @throws InvalidPasswordException 400 (Bad Request) if the new password is incorrect + */ + @PostMapping(path = "/account/change-password") + @Timed + public void changePassword(@RequestBody PasswordChangeDTO passwordChangeDto) { + if (!checkPasswordLength(passwordChangeDto.getNewPassword())) { + throw new InvalidPasswordException(); + } + userService.changePassword(passwordChangeDto.getCurrentPassword(), passwordChangeDto.getNewPassword()); + } + + /** + * POST /account/reset-password/init : Send an email to reset the password of the user + * + * @param mail the mail of the user + * @throws EmailNotFoundException 400 (Bad Request) if the email address is not registered + */ + @PostMapping(path = "/account/reset-password/init") + @Timed + public void requestPasswordReset(@RequestBody String mail) { + mailService.sendPasswordResetMail( + userService.requestPasswordReset(mail) + .orElseThrow(EmailNotFoundException::new) + ); + } + + /** + * POST /account/reset-password/finish : Finish to reset the password of the user + * + * @param keyAndPassword the generated key and the new password + * @throws InvalidPasswordException 400 (Bad Request) if the password is incorrect + * @throws RuntimeException 500 (Internal Server Error) if the password could not be reset + */ + @PostMapping(path = "/account/reset-password/finish") + @Timed + public void finishPasswordReset(@RequestBody KeyAndPasswordVM keyAndPassword) { + if (!checkPasswordLength(keyAndPassword.getNewPassword())) { + throw new InvalidPasswordException(); + } + Optional user = + userService.completePasswordReset(keyAndPassword.getNewPassword(), keyAndPassword.getKey()); + + if (!user.isPresent()) { + throw new InternalServerErrorException("No user was found for this reset key"); + } + } + + private static boolean checkPasswordLength(String password) { + return !StringUtils.isEmpty(password) && + password.length() >= ManagedUserVM.PASSWORD_MIN_LENGTH && + password.length() <= ManagedUserVM.PASSWORD_MAX_LENGTH; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/AuditResource.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/AuditResource.java new file mode 100644 index 0000000000..5f69a78cb0 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/AuditResource.java @@ -0,0 +1,77 @@ +package com.baeldung.jhipster.uaa.web.rest; + +import com.baeldung.jhipster.uaa.service.AuditEventService; +import com.baeldung.jhipster.uaa.web.rest.util.PaginationUtil; + +import io.github.jhipster.web.util.ResponseUtil; +import org.springframework.boot.actuate.audit.AuditEvent; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDate; +import java.time.ZoneId; +import java.util.List; + +/** + * REST controller for getting the audit events. + */ +@RestController +@RequestMapping("/management/audits") +public class AuditResource { + + private final AuditEventService auditEventService; + + public AuditResource(AuditEventService auditEventService) { + this.auditEventService = auditEventService; + } + + /** + * GET /audits : get a page of AuditEvents. + * + * @param pageable the pagination information + * @return the ResponseEntity with status 200 (OK) and the list of AuditEvents in body + */ + @GetMapping + public ResponseEntity> getAll(Pageable pageable) { + Page page = auditEventService.findAll(pageable); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/management/audits"); + return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); + } + + /** + * GET /audits : get a page of AuditEvents between the fromDate and toDate. + * + * @param fromDate the start of the time period of AuditEvents to get + * @param toDate the end of the time period of AuditEvents to get + * @param pageable the pagination information + * @return the ResponseEntity with status 200 (OK) and the list of AuditEvents in body + */ + @GetMapping(params = {"fromDate", "toDate"}) + public ResponseEntity> getByDates( + @RequestParam(value = "fromDate") LocalDate fromDate, + @RequestParam(value = "toDate") LocalDate toDate, + Pageable pageable) { + + Page page = auditEventService.findByDates( + fromDate.atStartOfDay(ZoneId.systemDefault()).toInstant(), + toDate.atStartOfDay(ZoneId.systemDefault()).plusDays(1).toInstant(), + pageable); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/management/audits"); + return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); + } + + /** + * GET /audits/:id : get an AuditEvent by id. + * + * @param id the id of the entity to get + * @return the ResponseEntity with status 200 (OK) and the AuditEvent in body, or status 404 (Not Found) + */ + @GetMapping("/{id:.+}") + public ResponseEntity get(@PathVariable Long id) { + return ResponseUtil.wrapOrNotFound(auditEventService.find(id)); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/LogsResource.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/LogsResource.java new file mode 100644 index 0000000000..2bfe432452 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/LogsResource.java @@ -0,0 +1,39 @@ +package com.baeldung.jhipster.uaa.web.rest; + +import com.baeldung.jhipster.uaa.web.rest.vm.LoggerVM; + +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.LoggerContext; +import com.codahale.metrics.annotation.Timed; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * Controller for view and managing Log Level at runtime. + */ +@RestController +@RequestMapping("/management") +public class LogsResource { + + @GetMapping("/logs") + @Timed + public List getList() { + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + return context.getLoggerList() + .stream() + .map(LoggerVM::new) + .collect(Collectors.toList()); + } + + @PutMapping("/logs") + @ResponseStatus(HttpStatus.NO_CONTENT) + @Timed + public void changeLevel(@RequestBody LoggerVM jsonLogger) { + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel())); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/UserResource.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/UserResource.java new file mode 100644 index 0000000000..9df27661db --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/UserResource.java @@ -0,0 +1,190 @@ +package com.baeldung.jhipster.uaa.web.rest; + +import com.baeldung.jhipster.uaa.config.Constants; +import com.baeldung.jhipster.uaa.domain.User; +import com.baeldung.jhipster.uaa.repository.UserRepository; +import com.baeldung.jhipster.uaa.security.AuthoritiesConstants; +import com.baeldung.jhipster.uaa.service.MailService; +import com.baeldung.jhipster.uaa.service.UserService; +import com.baeldung.jhipster.uaa.service.dto.UserDTO; +import com.baeldung.jhipster.uaa.web.rest.errors.BadRequestAlertException; +import com.baeldung.jhipster.uaa.web.rest.errors.EmailAlreadyUsedException; +import com.baeldung.jhipster.uaa.web.rest.errors.LoginAlreadyUsedException; +import com.baeldung.jhipster.uaa.web.rest.util.HeaderUtil; +import com.baeldung.jhipster.uaa.web.rest.util.PaginationUtil; +import com.codahale.metrics.annotation.Timed; +import io.github.jhipster.web.util.ResponseUtil; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.*; + +/** + * REST controller for managing users. + *

+ * This class accesses the User entity, and needs to fetch its collection of authorities. + *

+ * For a normal use-case, it would be better to have an eager relationship between User and Authority, + * and send everything to the client side: there would be no View Model and DTO, a lot less code, and an outer-join + * which would be good for performance. + *

+ * We use a View Model and a DTO for 3 reasons: + *

    + *
  • We want to keep a lazy association between the user and the authorities, because people will + * quite often do relationships with the user, and we don't want them to get the authorities all + * the time for nothing (for performance reasons). This is the #1 goal: we should not impact our users' + * application because of this use-case.
  • + *
  • Not having an outer join causes n+1 requests to the database. This is not a real issue as + * we have by default a second-level cache. This means on the first HTTP call we do the n+1 requests, + * but then all authorities come from the cache, so in fact it's much better than doing an outer join + * (which will get lots of data from the database, for each HTTP call).
  • + *
  • As this manages users, for security reasons, we'd rather have a DTO layer.
  • + *
+ *

+ * Another option would be to have a specific JPA entity graph to handle this case. + */ +@RestController +@RequestMapping("/api") +public class UserResource { + + private final Logger log = LoggerFactory.getLogger(UserResource.class); + + private final UserService userService; + + private final UserRepository userRepository; + + private final MailService mailService; + + public UserResource(UserService userService, UserRepository userRepository, MailService mailService) { + + this.userService = userService; + this.userRepository = userRepository; + this.mailService = mailService; + } + + /** + * POST /users : Creates a new user. + *

+ * Creates a new user if the login and email are not already used, and sends an + * mail with an activation link. + * The user needs to be activated on creation. + * + * @param userDTO the user to create + * @return the ResponseEntity with status 201 (Created) and with body the new user, or with status 400 (Bad Request) if the login or email is already in use + * @throws URISyntaxException if the Location URI syntax is incorrect + * @throws BadRequestAlertException 400 (Bad Request) if the login or email is already in use + */ + @PostMapping("/users") + @Timed + @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")") + public ResponseEntity createUser(@Valid @RequestBody UserDTO userDTO) throws URISyntaxException { + log.debug("REST request to save User : {}", userDTO); + + if (userDTO.getId() != null) { + throw new BadRequestAlertException("A new user cannot already have an ID", "userManagement", "idexists"); + // Lowercase the user login before comparing with database + } else if (userRepository.findOneByLogin(userDTO.getLogin().toLowerCase()).isPresent()) { + throw new LoginAlreadyUsedException(); + } else if (userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()).isPresent()) { + throw new EmailAlreadyUsedException(); + } else { + User newUser = userService.createUser(userDTO); + mailService.sendCreationEmail(newUser); + return ResponseEntity.created(new URI("/api/users/" + newUser.getLogin())) + .headers(HeaderUtil.createAlert( "userManagement.created", newUser.getLogin())) + .body(newUser); + } + } + + /** + * PUT /users : Updates an existing User. + * + * @param userDTO the user to update + * @return the ResponseEntity with status 200 (OK) and with body the updated user + * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already in use + * @throws LoginAlreadyUsedException 400 (Bad Request) if the login is already in use + */ + @PutMapping("/users") + @Timed + @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")") + public ResponseEntity updateUser(@Valid @RequestBody UserDTO userDTO) { + log.debug("REST request to update User : {}", userDTO); + Optional existingUser = userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()); + if (existingUser.isPresent() && (!existingUser.get().getId().equals(userDTO.getId()))) { + throw new EmailAlreadyUsedException(); + } + existingUser = userRepository.findOneByLogin(userDTO.getLogin().toLowerCase()); + if (existingUser.isPresent() && (!existingUser.get().getId().equals(userDTO.getId()))) { + throw new LoginAlreadyUsedException(); + } + Optional updatedUser = userService.updateUser(userDTO); + + return ResponseUtil.wrapOrNotFound(updatedUser, + HeaderUtil.createAlert("userManagement.updated", userDTO.getLogin())); + } + + /** + * GET /users : get all users. + * + * @param pageable the pagination information + * @return the ResponseEntity with status 200 (OK) and with body all users + */ + @GetMapping("/users") + @Timed + public ResponseEntity> getAllUsers(Pageable pageable) { + final Page page = userService.getAllManagedUsers(pageable); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/users"); + return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); + } + + /** + * @return a string list of the all of the roles + */ + @GetMapping("/users/authorities") + @Timed + @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")") + public List getAuthorities() { + return userService.getAuthorities(); + } + + /** + * GET /users/:login : get the "login" user. + * + * @param login the login of the user to find + * @return the ResponseEntity with status 200 (OK) and with body the "login" user, or with status 404 (Not Found) + */ + @GetMapping("/users/{login:" + Constants.LOGIN_REGEX + "}") + @Timed + public ResponseEntity getUser(@PathVariable String login) { + log.debug("REST request to get User : {}", login); + return ResponseUtil.wrapOrNotFound( + userService.getUserWithAuthoritiesByLogin(login) + .map(UserDTO::new)); + } + + /** + * DELETE /users/:login : delete the "login" User. + * + * @param login the login of the user to delete + * @return the ResponseEntity with status 200 (OK) + */ + @DeleteMapping("/users/{login:" + Constants.LOGIN_REGEX + "}") + @Timed + @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")") + public ResponseEntity deleteUser(@PathVariable String login) { + log.debug("REST request to delete User: {}", login); + userService.deleteUser(login); + return ResponseEntity.ok().headers(HeaderUtil.createAlert( "userManagement.deleted", login)).build(); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/BadRequestAlertException.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/BadRequestAlertException.java new file mode 100644 index 0000000000..f406afe24f --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/BadRequestAlertException.java @@ -0,0 +1,42 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +import java.net.URI; +import java.util.HashMap; +import java.util.Map; + +public class BadRequestAlertException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + private final String entityName; + + private final String errorKey; + + public BadRequestAlertException(String defaultMessage, String entityName, String errorKey) { + this(ErrorConstants.DEFAULT_TYPE, defaultMessage, entityName, errorKey); + } + + public BadRequestAlertException(URI type, String defaultMessage, String entityName, String errorKey) { + super(type, defaultMessage, Status.BAD_REQUEST, null, null, null, getAlertParameters(entityName, errorKey)); + this.entityName = entityName; + this.errorKey = errorKey; + } + + public String getEntityName() { + return entityName; + } + + public String getErrorKey() { + return errorKey; + } + + private static Map getAlertParameters(String entityName, String errorKey) { + Map parameters = new HashMap<>(); + parameters.put("message", "error." + errorKey); + parameters.put("params", entityName); + return parameters; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/CustomParameterizedException.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/CustomParameterizedException.java new file mode 100644 index 0000000000..ab0c08a12a --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/CustomParameterizedException.java @@ -0,0 +1,54 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; + +import java.util.HashMap; +import java.util.Map; + +import static org.zalando.problem.Status.BAD_REQUEST; + +/** + * Custom, parameterized exception, which can be translated on the client side. + * For example: + * + *

+ * throw new CustomParameterizedException("myCustomError", "hello", "world");
+ * 
+ * + * Can be translated with: + * + *
+ * "error.myCustomError" :  "The server says {{param0}} to {{param1}}"
+ * 
+ */ +public class CustomParameterizedException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + private static final String PARAM = "param"; + + public CustomParameterizedException(String message, String... params) { + this(message, toParamMap(params)); + } + + public CustomParameterizedException(String message, Map paramMap) { + super(ErrorConstants.PARAMETERIZED_TYPE, "Parameterized Exception", BAD_REQUEST, null, null, null, toProblemParameters(message, paramMap)); + } + + public static Map toParamMap(String... params) { + Map paramMap = new HashMap<>(); + if (params != null && params.length > 0) { + for (int i = 0; i < params.length; i++) { + paramMap.put(PARAM + i, params[i]); + } + } + return paramMap; + } + + public static Map toProblemParameters(String message, Map paramMap) { + Map parameters = new HashMap<>(); + parameters.put("message", message); + parameters.put("params", paramMap); + return parameters; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/EmailAlreadyUsedException.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/EmailAlreadyUsedException.java new file mode 100644 index 0000000000..e1780ab42a --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/EmailAlreadyUsedException.java @@ -0,0 +1,10 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +public class EmailAlreadyUsedException extends BadRequestAlertException { + + private static final long serialVersionUID = 1L; + + public EmailAlreadyUsedException() { + super(ErrorConstants.EMAIL_ALREADY_USED_TYPE, "Email is already in use!", "userManagement", "emailexists"); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/EmailNotFoundException.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/EmailNotFoundException.java new file mode 100644 index 0000000000..40487d117f --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/EmailNotFoundException.java @@ -0,0 +1,13 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +public class EmailNotFoundException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + public EmailNotFoundException() { + super(ErrorConstants.EMAIL_NOT_FOUND_TYPE, "Email address not registered", Status.BAD_REQUEST); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/ErrorConstants.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/ErrorConstants.java new file mode 100644 index 0000000000..9cf7cfdde4 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/ErrorConstants.java @@ -0,0 +1,21 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +import java.net.URI; + +public final class ErrorConstants { + + public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure"; + public static final String ERR_VALIDATION = "error.validation"; + public static final String PROBLEM_BASE_URL = "https://www.jhipster.tech/problem"; + public static final URI DEFAULT_TYPE = URI.create(PROBLEM_BASE_URL + "/problem-with-message"); + public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create(PROBLEM_BASE_URL + "/constraint-violation"); + public static final URI PARAMETERIZED_TYPE = URI.create(PROBLEM_BASE_URL + "/parameterized"); + public static final URI ENTITY_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/entity-not-found"); + public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password"); + public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used"); + public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used"); + public static final URI EMAIL_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-found"); + + private ErrorConstants() { + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/ExceptionTranslator.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/ExceptionTranslator.java new file mode 100644 index 0000000000..320636c51d --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/ExceptionTranslator.java @@ -0,0 +1,107 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +import com.baeldung.jhipster.uaa.web.rest.util.HeaderUtil; + +import org.springframework.dao.ConcurrencyFailureException; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.context.request.NativeWebRequest; +import org.zalando.problem.DefaultProblem; +import org.zalando.problem.Problem; +import org.zalando.problem.ProblemBuilder; +import org.zalando.problem.Status; +import org.zalando.problem.spring.web.advice.ProblemHandling; +import org.zalando.problem.violations.ConstraintViolationProblem; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.stream.Collectors; + +/** + * Controller advice to translate the server side exceptions to client-friendly json structures. + * The error response follows RFC7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807) + */ +@ControllerAdvice +public class ExceptionTranslator implements ProblemHandling { + + /** + * Post-process the Problem payload to add the message key for the front-end if needed + */ + @Override + public ResponseEntity process(@Nullable ResponseEntity entity, NativeWebRequest request) { + if (entity == null) { + return entity; + } + Problem problem = entity.getBody(); + if (!(problem instanceof ConstraintViolationProblem || problem instanceof DefaultProblem)) { + return entity; + } + ProblemBuilder builder = Problem.builder() + .withType(Problem.DEFAULT_TYPE.equals(problem.getType()) ? ErrorConstants.DEFAULT_TYPE : problem.getType()) + .withStatus(problem.getStatus()) + .withTitle(problem.getTitle()) + .with("path", request.getNativeRequest(HttpServletRequest.class).getRequestURI()); + + if (problem instanceof ConstraintViolationProblem) { + builder + .with("violations", ((ConstraintViolationProblem) problem).getViolations()) + .with("message", ErrorConstants.ERR_VALIDATION); + } else { + builder + .withCause(((DefaultProblem) problem).getCause()) + .withDetail(problem.getDetail()) + .withInstance(problem.getInstance()); + problem.getParameters().forEach(builder::with); + if (!problem.getParameters().containsKey("message") && problem.getStatus() != null) { + builder.with("message", "error.http." + problem.getStatus().getStatusCode()); + } + } + return new ResponseEntity<>(builder.build(), entity.getHeaders(), entity.getStatusCode()); + } + + @Override + public ResponseEntity handleMethodArgumentNotValid(MethodArgumentNotValidException ex, @Nonnull NativeWebRequest request) { + BindingResult result = ex.getBindingResult(); + List fieldErrors = result.getFieldErrors().stream() + .map(f -> new FieldErrorVM(f.getObjectName(), f.getField(), f.getCode())) + .collect(Collectors.toList()); + + Problem problem = Problem.builder() + .withType(ErrorConstants.CONSTRAINT_VIOLATION_TYPE) + .withTitle("Method argument not valid") + .withStatus(defaultConstraintViolationStatus()) + .with("message", ErrorConstants.ERR_VALIDATION) + .with("fieldErrors", fieldErrors) + .build(); + return create(ex, problem, request); + } + + @ExceptionHandler + public ResponseEntity handleNoSuchElementException(NoSuchElementException ex, NativeWebRequest request) { + Problem problem = Problem.builder() + .withStatus(Status.NOT_FOUND) + .with("message", ErrorConstants.ENTITY_NOT_FOUND_TYPE) + .build(); + return create(ex, problem, request); + } + + @ExceptionHandler + public ResponseEntity handleBadRequestAlertException(BadRequestAlertException ex, NativeWebRequest request) { + return create(ex, request, HeaderUtil.createFailureAlert(ex.getEntityName(), ex.getErrorKey(), ex.getMessage())); + } + + @ExceptionHandler + public ResponseEntity handleConcurrencyFailure(ConcurrencyFailureException ex, NativeWebRequest request) { + Problem problem = Problem.builder() + .withStatus(Status.CONFLICT) + .with("message", ErrorConstants.ERR_CONCURRENCY_FAILURE) + .build(); + return create(ex, problem, request); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/FieldErrorVM.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/FieldErrorVM.java new file mode 100644 index 0000000000..9f7c857374 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/FieldErrorVM.java @@ -0,0 +1,33 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +import java.io.Serializable; + +public class FieldErrorVM implements Serializable { + + private static final long serialVersionUID = 1L; + + private final String objectName; + + private final String field; + + private final String message; + + public FieldErrorVM(String dto, String field, String message) { + this.objectName = dto; + this.field = field; + this.message = message; + } + + public String getObjectName() { + return objectName; + } + + public String getField() { + return field; + } + + public String getMessage() { + return message; + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/InternalServerErrorException.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/InternalServerErrorException.java new file mode 100644 index 0000000000..43b50b86d5 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/InternalServerErrorException.java @@ -0,0 +1,16 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +/** + * Simple exception with a message, that returns an Internal Server Error code. + */ +public class InternalServerErrorException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + public InternalServerErrorException(String message) { + super(ErrorConstants.DEFAULT_TYPE, message, Status.INTERNAL_SERVER_ERROR); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/InvalidPasswordException.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/InvalidPasswordException.java new file mode 100644 index 0000000000..f4662f5a94 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/InvalidPasswordException.java @@ -0,0 +1,13 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +import org.zalando.problem.AbstractThrowableProblem; +import org.zalando.problem.Status; + +public class InvalidPasswordException extends AbstractThrowableProblem { + + private static final long serialVersionUID = 1L; + + public InvalidPasswordException() { + super(ErrorConstants.INVALID_PASSWORD_TYPE, "Incorrect password", Status.BAD_REQUEST); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/LoginAlreadyUsedException.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/LoginAlreadyUsedException.java new file mode 100644 index 0000000000..35bc827501 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/LoginAlreadyUsedException.java @@ -0,0 +1,10 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +public class LoginAlreadyUsedException extends BadRequestAlertException { + + private static final long serialVersionUID = 1L; + + public LoginAlreadyUsedException() { + super(ErrorConstants.LOGIN_ALREADY_USED_TYPE, "Login name already used!", "userManagement", "userexists"); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/package-info.java new file mode 100644 index 0000000000..8fe243f8c0 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/errors/package-info.java @@ -0,0 +1,6 @@ +/** + * Specific errors used with Zalando's "problem-spring-web" library. + * + * More information on https://github.com/zalando/problem-spring-web + */ +package com.baeldung.jhipster.uaa.web.rest.errors; diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/package-info.java new file mode 100644 index 0000000000..28eb2dda3e --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/package-info.java @@ -0,0 +1,4 @@ +/** + * Spring MVC REST controllers. + */ +package com.baeldung.jhipster.uaa.web.rest; diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/util/HeaderUtil.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/util/HeaderUtil.java new file mode 100644 index 0000000000..1ce4ab7664 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/util/HeaderUtil.java @@ -0,0 +1,45 @@ +package com.baeldung.jhipster.uaa.web.rest.util; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpHeaders; + +/** + * Utility class for HTTP headers creation. + */ +public final class HeaderUtil { + + private static final Logger log = LoggerFactory.getLogger(HeaderUtil.class); + + private static final String APPLICATION_NAME = "uaaApp"; + + private HeaderUtil() { + } + + public static HttpHeaders createAlert(String message, String param) { + HttpHeaders headers = new HttpHeaders(); + headers.add("X-" + APPLICATION_NAME + "-alert", message); + headers.add("X-" + APPLICATION_NAME + "-params", param); + return headers; + } + + public static HttpHeaders createEntityCreationAlert(String entityName, String param) { + return createAlert(APPLICATION_NAME + "." + entityName + ".created", param); + } + + public static HttpHeaders createEntityUpdateAlert(String entityName, String param) { + return createAlert(APPLICATION_NAME + "." + entityName + ".updated", param); + } + + public static HttpHeaders createEntityDeletionAlert(String entityName, String param) { + return createAlert(APPLICATION_NAME + "." + entityName + ".deleted", param); + } + + public static HttpHeaders createFailureAlert(String entityName, String errorKey, String defaultMessage) { + log.error("Entity processing failed, {}", defaultMessage); + HttpHeaders headers = new HttpHeaders(); + headers.add("X-" + APPLICATION_NAME + "-error", "error." + errorKey); + headers.add("X-" + APPLICATION_NAME + "-params", entityName); + return headers; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/util/PaginationUtil.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/util/PaginationUtil.java new file mode 100644 index 0000000000..d8596539ed --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/util/PaginationUtil.java @@ -0,0 +1,45 @@ +package com.baeldung.jhipster.uaa.web.rest.util; + +import org.springframework.data.domain.Page; +import org.springframework.http.HttpHeaders; +import org.springframework.web.util.UriComponentsBuilder; + +/** + * Utility class for handling pagination. + * + *

+ * Pagination uses the same principles as the GitHub API, + * and follow RFC 5988 (Link header). + */ +public final class PaginationUtil { + + private PaginationUtil() { + } + + public static HttpHeaders generatePaginationHttpHeaders(Page page, String baseUrl) { + + HttpHeaders headers = new HttpHeaders(); + headers.add("X-Total-Count", Long.toString(page.getTotalElements())); + String link = ""; + if ((page.getNumber() + 1) < page.getTotalPages()) { + link = "<" + generateUri(baseUrl, page.getNumber() + 1, page.getSize()) + ">; rel=\"next\","; + } + // prev link + if ((page.getNumber()) > 0) { + link += "<" + generateUri(baseUrl, page.getNumber() - 1, page.getSize()) + ">; rel=\"prev\","; + } + // last and first link + int lastPage = 0; + if (page.getTotalPages() > 0) { + lastPage = page.getTotalPages() - 1; + } + link += "<" + generateUri(baseUrl, lastPage, page.getSize()) + ">; rel=\"last\","; + link += "<" + generateUri(baseUrl, 0, page.getSize()) + ">; rel=\"first\""; + headers.add(HttpHeaders.LINK, link); + return headers; + } + + private static String generateUri(String baseUrl, int page, int size) { + return UriComponentsBuilder.fromUriString(baseUrl).queryParam("page", page).queryParam("size", size).toUriString(); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/KeyAndPasswordVM.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/KeyAndPasswordVM.java new file mode 100644 index 0000000000..8e9c3843bb --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/KeyAndPasswordVM.java @@ -0,0 +1,27 @@ +package com.baeldung.jhipster.uaa.web.rest.vm; + +/** + * View Model object for storing the user's key and password. + */ +public class KeyAndPasswordVM { + + private String key; + + private String newPassword; + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getNewPassword() { + return newPassword; + } + + public void setNewPassword(String newPassword) { + this.newPassword = newPassword; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/LoggerVM.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/LoggerVM.java new file mode 100644 index 0000000000..45357b14c2 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/LoggerVM.java @@ -0,0 +1,46 @@ +package com.baeldung.jhipster.uaa.web.rest.vm; + +import ch.qos.logback.classic.Logger; + +/** + * View Model object for storing a Logback logger. + */ +public class LoggerVM { + + private String name; + + private String level; + + public LoggerVM(Logger logger) { + this.name = logger.getName(); + this.level = logger.getEffectiveLevel().toString(); + } + + public LoggerVM() { + // Empty public constructor used by Jackson. + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLevel() { + return level; + } + + public void setLevel(String level) { + this.level = level; + } + + @Override + public String toString() { + return "LoggerVM{" + + "name='" + name + '\'' + + ", level='" + level + '\'' + + '}'; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/ManagedUserVM.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/ManagedUserVM.java new file mode 100644 index 0000000000..ad6b11eb5f --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/ManagedUserVM.java @@ -0,0 +1,35 @@ +package com.baeldung.jhipster.uaa.web.rest.vm; + +import com.baeldung.jhipster.uaa.service.dto.UserDTO; +import javax.validation.constraints.Size; + +/** + * View Model extending the UserDTO, which is meant to be used in the user management UI. + */ +public class ManagedUserVM extends UserDTO { + + public static final int PASSWORD_MIN_LENGTH = 4; + + public static final int PASSWORD_MAX_LENGTH = 100; + + @Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH) + private String password; + + public ManagedUserVM() { + // Empty constructor needed for Jackson. + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public String toString() { + return "ManagedUserVM{" + + "} " + super.toString(); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/package-info.java b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/package-info.java new file mode 100644 index 0000000000..0574701dbc --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/java/com/baeldung/jhipster/uaa/web/rest/vm/package-info.java @@ -0,0 +1,4 @@ +/** + * View Models used by Spring MVC REST controllers. + */ +package com.baeldung.jhipster.uaa.web.rest.vm; diff --git a/jhipster/jhipster-uaa/uaa/src/main/jib/entrypoint.sh b/jhipster/jhipster-uaa/uaa/src/main/jib/entrypoint.sh new file mode 100644 index 0000000000..44808a8fde --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/jib/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} +exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -cp /app/resources/:/app/classes/:/app/libs/* "com.baeldung.jhipster.uaa.UaaApp" "$@" diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/.h2.server.properties b/jhipster/jhipster-uaa/uaa/src/main/resources/.h2.server.properties new file mode 100644 index 0000000000..e36bc911c7 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/.h2.server.properties @@ -0,0 +1,5 @@ +#H2 Server Properties +0=JHipster H2 (Disk)|org.h2.Driver|jdbc\:h2\:file\:./target/h2db/db/uaa|uaa +webAllowOthers=true +webPort=8082 +webSSL=false diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/banner.txt b/jhipster/jhipster-uaa/uaa/src/main/resources/banner.txt new file mode 100644 index 0000000000..e0bc55aaff --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + + ${AnsiColor.GREEN} ██╗${AnsiColor.RED} ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗ + ${AnsiColor.GREEN} ██║${AnsiColor.RED} ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗ + ${AnsiColor.GREEN} ██║${AnsiColor.RED} ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝ + ${AnsiColor.GREEN}██╗ ██║${AnsiColor.RED} ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ + ${AnsiColor.GREEN}╚██████╔╝${AnsiColor.RED} ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ + ${AnsiColor.GREEN} ╚═════╝ ${AnsiColor.RED} ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ + +${AnsiColor.BRIGHT_BLUE}:: JHipster 🤓 :: Running Spring Boot ${spring-boot.version} :: +:: https://www.jhipster.tech ::${AnsiColor.DEFAULT} diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/application-dev.yml b/jhipster/jhipster-uaa/uaa/src/main/resources/config/application-dev.yml new file mode 100644 index 0000000000..874b2cd533 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/application-dev.yml @@ -0,0 +1,157 @@ +# =================================================================== +# Spring Boot configuration for the "dev" profile. +# +# This configuration overrides the application.yml file. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +logging: + level: + ROOT: DEBUG + io.github.jhipster: DEBUG + com.baeldung.jhipster.uaa: DEBUG + +eureka: + instance: + prefer-ip-address: true + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@localhost:8761/eureka/ + +spring: + profiles: + active: dev + include: + - swagger + # Uncomment to activate TLS for the dev profile + #- tls + devtools: + restart: + enabled: true + livereload: + enabled: false # we use Webpack dev server + BrowserSync for livereload + jackson: + serialization.indent_output: true + datasource: + type: com.zaxxer.hikari.HikariDataSource + url: jdbc:h2:file:./target/h2db/db/uaa;DB_CLOSE_DELAY=-1 + username: uaa + password: + hikari: + auto-commit: false + h2: + console: + enabled: false + jpa: + database-platform: io.github.jhipster.domain.util.FixedH2Dialect + database: H2 + show-sql: true + properties: + hibernate.id.new_generator_mappings: true + hibernate.connection.provider_disables_autocommit: true + hibernate.cache.use_second_level_cache: true + hibernate.cache.use_query_cache: false + hibernate.generate_statistics: true + hibernate.cache.region.factory_class: com.hazelcast.hibernate.HazelcastCacheRegionFactory + hibernate.cache.hazelcast.instance_name: uaa + hibernate.cache.use_minimal_puts: true + hibernate.cache.hazelcast.use_lite_member: true + liquibase: + contexts: dev + mail: + host: localhost + port: 25 + username: + password: + messages: + cache-duration: PT1S # 1 second, see the ISO 8601 standard + thymeleaf: + cache: false + sleuth: + sampler: + percentage: 1 # report 100% of traces + zipkin: # Use the "zipkin" Maven profile to have the Spring Cloud Zipkin dependencies + base-url: http://localhost:9411 + enabled: false + locator: + discovery: + enabled: true + +server: + port: 9999 + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + http: + version: V_1_1 # To use HTTP/2 you will need to activate TLS (see application-tls.yml) + cache: # Cache configuration + hazelcast: # Hazelcast distributed cache + time-to-live-seconds: 3600 + backup-count: 1 + management-center: # Full reference is available at: http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html + enabled: false + update-interval: 3 + url: http://localhost:8180/mancenter + # CORS is only enabled by default with the "dev" profile, so BrowserSync can access the API + cors: + allowed-origins: "*" + allowed-methods: "*" + allowed-headers: "*" + exposed-headers: "Authorization,Link,X-Total-Count" + allow-credentials: true + max-age: 1800 + security: + client-authorization: + client-id: internal + client-secret: internal + mail: # specific JHipster mail property, for standard properties see MailProperties + from: uaa@localhost + base-url: http://127.0.0.1:8080 + metrics: # DropWizard Metrics configuration, used by MetricsConfiguration + jmx: + enabled: true + logs: # Reports Dropwizard metrics in the logs + enabled: false + report-frequency: 60 # in seconds + logging: + logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration + enabled: false + host: localhost + port: 5000 + queue-size: 512 +uaa: + key-store: + name: config/tls/keystore.p12 + password: password + alias: selfsigned + web-client-configuration: + # Access Token is valid for 5 mins + access-token-validity-in-seconds: 3000 + # Refresh Token is valid for 7 days + refresh-token-validity-in-seconds-for-remember-me: 604800 + client-id: web_app + secret: changeit + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/application-prod.yml b/jhipster/jhipster-uaa/uaa/src/main/resources/config/application-prod.yml new file mode 100644 index 0000000000..0d4c3c55a7 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/application-prod.yml @@ -0,0 +1,175 @@ +# =================================================================== +# Spring Boot configuration for the "prod" profile. +# +# This configuration overrides the application.yml file. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +logging: + level: + ROOT: INFO + com.baeldung.jhipster.uaa: INFO + io.github.jhipster: INFO + +eureka: + instance: + prefer-ip-address: true + client: + service-url: + defaultZone: http://admin:${jhipster.registry.password}@localhost:8761/eureka/ + +spring: + devtools: + restart: + enabled: false + livereload: + enabled: false + datasource: + type: com.zaxxer.hikari.HikariDataSource + url: jdbc:mysql://localhost:3306/uaa?useUnicode=true&characterEncoding=utf8&useSSL=false + username: root + password: + hikari: + auto-commit: false + data-source-properties: + cachePrepStmts: true + prepStmtCacheSize: 250 + prepStmtCacheSqlLimit: 2048 + useServerPrepStmts: true + jpa: + database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + database: MYSQL + show-sql: false + properties: + hibernate.id.new_generator_mappings: true + hibernate.connection.provider_disables_autocommit: true + hibernate.cache.use_second_level_cache: true + hibernate.cache.use_query_cache: false + hibernate.generate_statistics: false + hibernate.cache.region.factory_class: com.hazelcast.hibernate.HazelcastCacheRegionFactory + hibernate.cache.hazelcast.instance_name: uaa + hibernate.cache.use_minimal_puts: true + hibernate.cache.hazelcast.use_lite_member: true + liquibase: + contexts: prod + mail: + host: localhost + port: 25 + username: + password: + thymeleaf: + cache: true + sleuth: + sampler: + percentage: 1 # report 100% of traces + zipkin: # Use the "zipkin" Maven profile to have the Spring Cloud Zipkin dependencies + base-url: http://localhost:9411 + enabled: false + locator: + discovery: + enabled: true + +# =================================================================== +# To enable TLS in production, generate a certificate using: +# keytool -genkey -alias uaa -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650 +# +# You can also use Let's Encrypt: +# https://maximilian-boehm.com/hp2121/Create-a-Java-Keystore-JKS-from-Let-s-Encrypt-Certificates.htm +# +# Then, modify the server.ssl properties so your "server" configuration looks like: +# +# server: +# port: 443 +# ssl: +# key-store: classpath:config/tls/keystore.p12 +# key-store-password: password +# key-store-type: PKCS12 +# key-alias: uaa +# # The ciphers suite enforce the security by deactivating some old and deprecated SSL cipher, this list was tested against SSL Labs (https://www.ssllabs.com/ssltest/) +# ciphers: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 ,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 ,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,TLS_RSA_WITH_CAMELLIA_128_CBC_SHA +# =================================================================== +server: + port: 9999 + compression: + enabled: true + mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json + min-response-size: 1024 + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + http: + version: V_1_1 # To use HTTP/2 you will need SSL support (see above the "server.ssl" configuration) + cache: # Used by the CachingHttpHeadersFilter + timeToLiveInDays: 1461 + cache: # Cache configuration + hazelcast: # Hazelcast distributed cache + time-to-live-seconds: 3600 + backup-count: 1 + management-center: # Full reference is available at: http://docs.hazelcast.org/docs/management-center/3.9/manual/html/Deploying_and_Starting.html + enabled: false + update-interval: 3 + url: + security: + client-authorization: + client-id: internal + client-secret: internal + authentication: + jwt: + # Access Token is valid for 5 mins + token-validity-in-seconds: 300 + # Refresh Token is valid for 7 days + token-validity-in-seconds-for-remember-me: 252000 + mail: # specific JHipster mail property, for standard properties see MailProperties + from: uaa@localhost + base-url: http://my-server-url-to-change # Modify according to your server's URL + metrics: # DropWizard Metrics configuration, used by MetricsConfiguration + jmx: + enabled: true + logs: # Reports Dropwizard metrics in the logs + enabled: false + report-frequency: 60 # in seconds + logging: + logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration + enabled: false + host: localhost + port: 5000 + queue-size: 512 +uaa: + #be sure to to change to a different keystore in production! + #create one using: keytool -genkey -alias uaa -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650 + key-store: + name: config/tls/keystore.p12 + password: password + alias: selfsigned + web-client-configuration: + # Access Token is valid for 5 mins + access-token-validity-in-seconds: 300 + # Refresh Token is valid for 7 days + refresh-token-validity-in-seconds-for-remember-me: 604800 + #change client secret in production, keep in sync with gateway configuration + client-id: web_app + secret: changeit + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/application-tls.yml b/jhipster/jhipster-uaa/uaa/src/main/resources/config/application-tls.yml new file mode 100644 index 0000000000..e082c8f455 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/application-tls.yml @@ -0,0 +1,18 @@ +# =================================================================== +# Activate this profile to enable TLS and HTTP/2. +# +# JHipster has generated a self-signed certificate, which will be used to encrypt traffic. +# As your browser will not understand this certificate, you will need to import it. +# +# Another (easiest) solution with Chrome is to enable the "allow-insecure-localhost" flag +# at chrome://flags/#allow-insecure-localhost +# =================================================================== +server: + ssl: + key-store: classpath:config/tls/keystore.p12 + key-store-password: password + key-store-type: PKCS12 + key-alias: selfsigned +jhipster: + http: + version: V_2_0 diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/application.yml b/jhipster/jhipster-uaa/uaa/src/main/resources/config/application.yml new file mode 100644 index 0000000000..0dfe1a15ce --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/application.yml @@ -0,0 +1,139 @@ +# =================================================================== +# Spring Boot configuration. +# +# This configuration will be overridden by the Spring profile you use, +# for example application-dev.yml if you use the "dev" profile. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +eureka: + client: + enabled: true + healthcheck: + enabled: true + fetch-registry: true + register-with-eureka: true + instance-info-replication-interval-seconds: 10 + registry-fetch-interval-seconds: 10 + instance: + appname: uaa + instanceId: uaa:${spring.application.instance-id:${random.value}} + lease-renewal-interval-in-seconds: 5 + lease-expiration-duration-in-seconds: 10 + status-page-url-path: ${management.endpoints.web.base-path}/info + health-check-url-path: ${management.endpoints.web.base-path}/health + metadata-map: + zone: primary # This is needed for the load balancer + profile: ${spring.profiles.active} + version: ${info.project.version:} + git-version: ${git.commit.id.describe:} + git-commit: ${git.commit.id.abbrev:} + git-branch: ${git.branch:} +ribbon: + eureka: + enabled: true +management: + endpoints: + web: + base-path: /management + exposure: + include: ["configprops", "env", "health", "info", "threaddump", "logfile" ] + endpoint: + health: + show-details: when_authorized + info: + git: + mode: full + health: + mail: + enabled: false # When using the MailService, configure an SMTP server and set this to true + metrics: + enabled: false # http://micrometer.io/ is disabled by default, as we use http://metrics.dropwizard.io/ instead + +spring: + application: + name: uaa + jpa: + open-in-view: false + hibernate: + ddl-auto: none + naming: + physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy + implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy + messages: + basename: i18n/messages + mvc: + favicon: + enabled: false + thymeleaf: + mode: HTML +security: + oauth2: + resource: + filter-order: 3 + +server: + servlet: + session: + cookie: + http-only: true + +# Properties to be exposed on the /info management endpoint +info: + # Comma separated list of profiles that will trigger the ribbon to show + display-ribbon-on-profiles: "dev" + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + async: + core-pool-size: 2 + max-pool-size: 50 + queue-capacity: 10000 + # By default CORS is disabled. Uncomment to enable. + #cors: + #allowed-origins: "*" + #allowed-methods: "*" + #allowed-headers: "*" + #exposed-headers: "Authorization,Link,X-Total-Count" + #allow-credentials: true + #max-age: 1800 + mail: + from: uaa@localhost + swagger: + default-include-pattern: /api/.* + title: uaa API + description: uaa API documentation + version: 0.0.1 + terms-of-service-url: + contact-name: + contact-url: + contact-email: + license: + license-url: + +logging: + file: target/uaa.log + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/bootstrap-prod.yml b/jhipster/jhipster-uaa/uaa/src/main/resources/config/bootstrap-prod.yml new file mode 100644 index 0000000000..078fafda5c --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/bootstrap-prod.yml @@ -0,0 +1,22 @@ +# =================================================================== +# Spring Cloud Config bootstrap configuration for the "prod" profile +# =================================================================== + +spring: + cloud: + config: + fail-fast: true + retry: + initial-interval: 1000 + max-interval: 2000 + max-attempts: 100 + uri: http://admin:${jhipster.registry.password}@localhost:8761/config + # name of the config server's property source (file.yml) that we want to use + name: uaa + profile: prod # profile(s) of the property source + label: master # toggle to switch to a different version of the configuration as stored in git + # it can be set to any label, branch or commit of the configuration source Git repository + +jhipster: + registry: + password: admin diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/bootstrap.yml b/jhipster/jhipster-uaa/uaa/src/main/resources/config/bootstrap.yml new file mode 100644 index 0000000000..2edc350d9e --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/bootstrap.yml @@ -0,0 +1,26 @@ +# =================================================================== +# Spring Cloud Config bootstrap configuration for the "dev" profile +# In prod profile, properties will be overwriten by the ones defined in bootstrap-prod.yml +# =================================================================== + +jhipster: + registry: + password: admin + +spring: + application: + name: uaa + profiles: + # The commented value for `active` can be replaced with valid Spring profiles to load. + # Otherwise, it will be filled in by maven when building the WAR file + # Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS` + active: #spring.profiles.active# + cloud: + config: + fail-fast: false # if not in "prod" profile, do not force to use Spring Cloud Config + uri: http://admin:${jhipster.registry.password}@localhost:8761/config + # name of the config server's property source (file.yml) that we want to use + name: uaa + profile: dev # profile(s) of the property source + label: master # toggle to switch to a different version of the configuration as stored in git + # it can be set to any label, branch or commit of the configuration source Git repository diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/authorities.csv b/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/authorities.csv new file mode 100644 index 0000000000..af5c6dfa18 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/authorities.csv @@ -0,0 +1,3 @@ +name +ROLE_ADMIN +ROLE_USER diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml b/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml new file mode 100644 index 0000000000..3e3d8cd134 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/master.xml b/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/master.xml new file mode 100644 index 0000000000..f2b0b1f7e6 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/master.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/users.csv b/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/users.csv new file mode 100644 index 0000000000..b25922b699 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/users.csv @@ -0,0 +1,5 @@ +id;login;password_hash;first_name;last_name;email;image_url;activated;lang_key;created_by;last_modified_by +1;system;$2a$10$mE.qmcV0mFU5NcKh73TZx.z4ueI/.bDWbj0T1BYyqP481kGGarKLG;System;System;system@localhost;;true;en;system;system +2;anonymoususer;$2a$10$j8S5d7Sr7.8VTOYNviDPOeWX8KcYILUVJBsYV83Y5NtECayypx9lO;Anonymous;User;anonymous@localhost;;true;en;system;system +3;admin;$2a$10$gSAhZrxMllrbgj/kkK9UceBPpChGWJA7SYIb1Mqo.n5aNLq1/oRrC;Administrator;Administrator;admin@localhost;;true;en;system;system +4;user;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;User;User;user@localhost;;true;en;system;system diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/users_authorities.csv b/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/users_authorities.csv new file mode 100644 index 0000000000..06c5feeeea --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/config/liquibase/users_authorities.csv @@ -0,0 +1,6 @@ +user_id;authority_name +1;ROLE_ADMIN +1;ROLE_USER +3;ROLE_ADMIN +3;ROLE_USER +4;ROLE_USER diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/config/tls/keystore.p12 b/jhipster/jhipster-uaa/uaa/src/main/resources/config/tls/keystore.p12 new file mode 100644 index 0000000000..dee8bf3320 Binary files /dev/null and b/jhipster/jhipster-uaa/uaa/src/main/resources/config/tls/keystore.p12 differ diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/i18n/messages.properties b/jhipster/jhipster-uaa/uaa/src/main/resources/i18n/messages.properties new file mode 100644 index 0000000000..c1822828a1 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/i18n/messages.properties @@ -0,0 +1,21 @@ +# Error page +error.title=Your request cannot be processed +error.subtitle=Sorry, an error has occurred. +error.status=Status: +error.message=Message: + +# Activation email +email.activation.title=uaa account activation +email.activation.greeting=Dear {0} +email.activation.text1=Your uaa account has been created, please click on the URL below to activate it: +email.activation.text2=Regards, +email.signature=uaa Team. + +# Creation email +email.creation.text1=Your uaa account has been created, please click on the URL below to access it: + +# Reset email +email.reset.title=uaa password reset +email.reset.greeting=Dear {0} +email.reset.text1=For your uaa account a password reset was requested, please click on the URL below to reset it: +email.reset.text2=Regards, diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/i18n/messages_en.properties b/jhipster/jhipster-uaa/uaa/src/main/resources/i18n/messages_en.properties new file mode 100644 index 0000000000..c1822828a1 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/i18n/messages_en.properties @@ -0,0 +1,21 @@ +# Error page +error.title=Your request cannot be processed +error.subtitle=Sorry, an error has occurred. +error.status=Status: +error.message=Message: + +# Activation email +email.activation.title=uaa account activation +email.activation.greeting=Dear {0} +email.activation.text1=Your uaa account has been created, please click on the URL below to activate it: +email.activation.text2=Regards, +email.signature=uaa Team. + +# Creation email +email.creation.text1=Your uaa account has been created, please click on the URL below to access it: + +# Reset email +email.reset.title=uaa password reset +email.reset.greeting=Dear {0} +email.reset.text1=For your uaa account a password reset was requested, please click on the URL below to reset it: +email.reset.text2=Regards, diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/logback-spring.xml b/jhipster/jhipster-uaa/uaa/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..a30ab8c1d2 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/logback-spring.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/templates/error.html b/jhipster/jhipster-uaa/uaa/src/main/resources/templates/error.html new file mode 100644 index 0000000000..08616bcf1e --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/templates/error.html @@ -0,0 +1,163 @@ + + + + + + Your request cannot be processed + + + +

+

Your request cannot be processed :(

+ +

Sorry, an error has occurred.

+ + Status:  ()
+ + Message: 
+
+ + + +
+ + diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/templates/mail/activationEmail.html b/jhipster/jhipster-uaa/uaa/src/main/resources/templates/mail/activationEmail.html new file mode 100644 index 0000000000..aa3822981e --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/templates/mail/activationEmail.html @@ -0,0 +1,25 @@ + + + + JHipster activation + + + + +

+ Dear +

+

+ Your JHipster account has been created, please click on the URL below to activate it: +

+

+ Activation Link +

+

+ Regards, +
+ JHipster. +

+ + diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/templates/mail/creationEmail.html b/jhipster/jhipster-uaa/uaa/src/main/resources/templates/mail/creationEmail.html new file mode 100644 index 0000000000..95e73d149e --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/templates/mail/creationEmail.html @@ -0,0 +1,27 @@ + + + + JHipster creation + + + + +

+ Dear +

+

+ Your JHipster account has been created, please click on the URL below to access it: +

+

+ + Login link + +

+

+ Regards, +
+ JHipster. +

+ + diff --git a/jhipster/jhipster-uaa/uaa/src/main/resources/templates/mail/passwordResetEmail.html b/jhipster/jhipster-uaa/uaa/src/main/resources/templates/mail/passwordResetEmail.html new file mode 100644 index 0000000000..5a90f208b5 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/main/resources/templates/mail/passwordResetEmail.html @@ -0,0 +1,25 @@ + + + + JHipster password reset + + + + +

+ Dear +

+

+ For your JHipster account a password reset was requested, please click on the URL below to reset it: +

+

+ Login link +

+

+ Regards, +
+ JHipster. +

+ + diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/config/SecurityBeanOverrideConfiguration.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/config/SecurityBeanOverrideConfiguration.java new file mode 100644 index 0000000000..2c2e27e151 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/config/SecurityBeanOverrideConfiguration.java @@ -0,0 +1,35 @@ +package com.baeldung.jhipster.uaa.config; + +import org.springframework.cloud.client.loadbalancer.RestTemplateCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; +import org.springframework.web.client.RestTemplate; + +/** + * Overrides UAA specific beans, so they do not interfere the testing + * This configuration must be included in @SpringBootTest in order to take effect. + */ +@Configuration +public class SecurityBeanOverrideConfiguration { + + @Bean + @Primary + public TokenStore tokenStore() { + return null; + } + + @Bean + @Primary + public JwtAccessTokenConverter jwtAccessTokenConverter() { + return null; + } + + @Bean + @Primary + public RestTemplate loadBalancedRestTemplate(RestTemplateCustomizer customizer) { + return null; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/config/WebConfigurerTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/config/WebConfigurerTest.java new file mode 100644 index 0000000000..0d5b60c163 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/config/WebConfigurerTest.java @@ -0,0 +1,197 @@ +package com.baeldung.jhipster.uaa.config; + +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.servlet.InstrumentedFilter; +import com.codahale.metrics.servlets.MetricsServlet; +import io.github.jhipster.config.JHipsterConstants; +import io.github.jhipster.config.JHipsterProperties; +import io.undertow.Undertow; +import io.undertow.Undertow.Builder; +import io.undertow.UndertowOptions; + +import org.h2.server.web.WebServlet; +import org.junit.Before; +import org.junit.Test; +import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; +import org.springframework.http.HttpHeaders; +import org.springframework.mock.env.MockEnvironment; +import org.springframework.mock.web.MockServletContext; +import org.springframework.test.util.ReflectionTestUtils; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.xnio.OptionMap; + +import javax.servlet.*; +import java.util.*; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.*; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.options; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * Unit tests for the WebConfigurer class. + * + * @see WebConfigurer + */ +public class WebConfigurerTest { + + private WebConfigurer webConfigurer; + + private MockServletContext servletContext; + + private MockEnvironment env; + + private JHipsterProperties props; + + private MetricRegistry metricRegistry; + + @Before + public void setup() { + servletContext = spy(new MockServletContext()); + doReturn(mock(FilterRegistration.Dynamic.class)) + .when(servletContext).addFilter(anyString(), any(Filter.class)); + doReturn(mock(ServletRegistration.Dynamic.class)) + .when(servletContext).addServlet(anyString(), any(Servlet.class)); + + env = new MockEnvironment(); + props = new JHipsterProperties(); + + webConfigurer = new WebConfigurer(env, props); + metricRegistry = new MetricRegistry(); + webConfigurer.setMetricRegistry(metricRegistry); + } + + @Test + public void testStartUpProdServletContext() throws ServletException { + env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); + webConfigurer.onStartup(servletContext); + + assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry); + assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry); + verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class)); + verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class)); + verify(servletContext, never()).addServlet(eq("H2Console"), any(WebServlet.class)); + } + + @Test + public void testStartUpDevServletContext() throws ServletException { + env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); + webConfigurer.onStartup(servletContext); + + assertThat(servletContext.getAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE)).isEqualTo(metricRegistry); + assertThat(servletContext.getAttribute(MetricsServlet.METRICS_REGISTRY)).isEqualTo(metricRegistry); + verify(servletContext).addFilter(eq("webappMetricsFilter"), any(InstrumentedFilter.class)); + verify(servletContext).addServlet(eq("metricsServlet"), any(MetricsServlet.class)); + verify(servletContext).addServlet(eq("H2Console"), any(WebServlet.class)); + } + + @Test + public void testCustomizeServletContainer() { + env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); + UndertowServletWebServerFactory container = new UndertowServletWebServerFactory(); + webConfigurer.customize(container); + assertThat(container.getMimeMappings().get("abs")).isEqualTo("audio/x-mpeg"); + assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html;charset=utf-8"); + assertThat(container.getMimeMappings().get("json")).isEqualTo("text/html;charset=utf-8"); + + Builder builder = Undertow.builder(); + container.getBuilderCustomizers().forEach(c -> c.customize(builder)); + OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); + assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isNull(); + } + + @Test + public void testUndertowHttp2Enabled() { + props.getHttp().setVersion(JHipsterProperties.Http.Version.V_2_0); + UndertowServletWebServerFactory container = new UndertowServletWebServerFactory(); + webConfigurer.customize(container); + Builder builder = Undertow.builder(); + container.getBuilderCustomizers().forEach(c -> c.customize(builder)); + OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); + assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isTrue(); + } + + @Test + public void testCorsFilterOnApiPath() throws Exception { + props.getCors().setAllowedOrigins(Collections.singletonList("*")); + props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); + props.getCors().setAllowedHeaders(Collections.singletonList("*")); + props.getCors().setMaxAge(1800L); + props.getCors().setAllowCredentials(true); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + options("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com") + .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "POST")) + .andExpect(status().isOk()) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")) + .andExpect(header().string(HttpHeaders.VARY, "Origin")) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,POST,PUT,DELETE")) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true")) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "1800")); + + mockMvc.perform( + get("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")); + } + + @Test + public void testCorsFilterOnOtherPath() throws Exception { + props.getCors().setAllowedOrigins(Collections.singletonList("*")); + props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); + props.getCors().setAllowedHeaders(Collections.singletonList("*")); + props.getCors().setMaxAge(1800L); + props.getCors().setAllowCredentials(true); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + get("/test/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + } + + @Test + public void testCorsFilterDeactivated() throws Exception { + props.getCors().setAllowedOrigins(null); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + get("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + } + + @Test + public void testCorsFilterDeactivated2() throws Exception { + props.getCors().setAllowedOrigins(new ArrayList<>()); + + MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) + .addFilters(webConfigurer.corsFilter()) + .build(); + + mockMvc.perform( + get("/api/test-cors") + .header(HttpHeaders.ORIGIN, "other.domain.com")) + .andExpect(status().isOk()) + .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/config/WebConfigurerTestController.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/config/WebConfigurerTestController.java new file mode 100644 index 0000000000..89e29d7541 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/config/WebConfigurerTestController.java @@ -0,0 +1,16 @@ +package com.baeldung.jhipster.uaa.config; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class WebConfigurerTestController { + + @GetMapping("/api/test-cors") + public void testCorsOnApiPath() { + } + + @GetMapping("/test/test-cors") + public void testCorsOnOtherPath() { + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/repository/CustomAuditEventRepositoryIntTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/repository/CustomAuditEventRepositoryIntTest.java new file mode 100644 index 0000000000..fbfcf8b607 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/repository/CustomAuditEventRepositoryIntTest.java @@ -0,0 +1,165 @@ +package com.baeldung.jhipster.uaa.repository; + +import com.baeldung.jhipster.uaa.UaaApp; +import com.baeldung.jhipster.uaa.config.Constants; +import com.baeldung.jhipster.uaa.config.audit.AuditEventConverter; +import com.baeldung.jhipster.uaa.domain.PersistentAuditEvent; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.actuate.audit.AuditEvent; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.mock.web.MockHttpSession; +import org.springframework.security.web.authentication.WebAuthenticationDetails; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.transaction.annotation.Transactional; + +import javax.servlet.http.HttpSession; +import java.time.Instant; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.assertj.core.api.Assertions.assertThat; +import static com.baeldung.jhipster.uaa.repository.CustomAuditEventRepository.EVENT_DATA_COLUMN_MAX_LENGTH; + +/** + * Test class for the CustomAuditEventRepository class. + * + * @see CustomAuditEventRepository + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = UaaApp.class) +@Transactional +public class CustomAuditEventRepositoryIntTest { + + @Autowired + private PersistenceAuditEventRepository persistenceAuditEventRepository; + + @Autowired + private AuditEventConverter auditEventConverter; + + private CustomAuditEventRepository customAuditEventRepository; + + private PersistentAuditEvent testUserEvent; + + private PersistentAuditEvent testOtherUserEvent; + + private PersistentAuditEvent testOldUserEvent; + + @Before + public void setup() { + customAuditEventRepository = new CustomAuditEventRepository(persistenceAuditEventRepository, auditEventConverter); + persistenceAuditEventRepository.deleteAll(); + Instant oneHourAgo = Instant.now().minusSeconds(3600); + + testUserEvent = new PersistentAuditEvent(); + testUserEvent.setPrincipal("test-user"); + testUserEvent.setAuditEventType("test-type"); + testUserEvent.setAuditEventDate(oneHourAgo); + Map data = new HashMap<>(); + data.put("test-key", "test-value"); + testUserEvent.setData(data); + + testOldUserEvent = new PersistentAuditEvent(); + testOldUserEvent.setPrincipal("test-user"); + testOldUserEvent.setAuditEventType("test-type"); + testOldUserEvent.setAuditEventDate(oneHourAgo.minusSeconds(10000)); + + testOtherUserEvent = new PersistentAuditEvent(); + testOtherUserEvent.setPrincipal("other-test-user"); + testOtherUserEvent.setAuditEventType("test-type"); + testOtherUserEvent.setAuditEventDate(oneHourAgo); + } + + @Test + public void addAuditEvent() { + Map data = new HashMap<>(); + data.put("test-key", "test-value"); + AuditEvent event = new AuditEvent("test-user", "test-type", data); + customAuditEventRepository.add(event); + List persistentAuditEvents = persistenceAuditEventRepository.findAll(); + assertThat(persistentAuditEvents).hasSize(1); + PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); + assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); + assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); + assertThat(persistentAuditEvent.getData()).containsKey("test-key"); + assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("test-value"); + assertThat(persistentAuditEvent.getAuditEventDate()).isEqualTo(event.getTimestamp()); + } + + @Test + public void addAuditEventTruncateLargeData() { + Map data = new HashMap<>(); + StringBuilder largeData = new StringBuilder(); + for (int i = 0; i < EVENT_DATA_COLUMN_MAX_LENGTH + 10; i++) { + largeData.append("a"); + } + data.put("test-key", largeData); + AuditEvent event = new AuditEvent("test-user", "test-type", data); + customAuditEventRepository.add(event); + List persistentAuditEvents = persistenceAuditEventRepository.findAll(); + assertThat(persistentAuditEvents).hasSize(1); + PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); + assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); + assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); + assertThat(persistentAuditEvent.getData()).containsKey("test-key"); + String actualData = persistentAuditEvent.getData().get("test-key"); + assertThat(actualData.length()).isEqualTo(EVENT_DATA_COLUMN_MAX_LENGTH); + assertThat(actualData).isSubstringOf(largeData); + assertThat(persistentAuditEvent.getAuditEventDate()).isEqualTo(event.getTimestamp()); + } + + @Test + public void testAddEventWithWebAuthenticationDetails() { + HttpSession session = new MockHttpSession(null, "test-session-id"); + MockHttpServletRequest request = new MockHttpServletRequest(); + request.setSession(session); + request.setRemoteAddr("1.2.3.4"); + WebAuthenticationDetails details = new WebAuthenticationDetails(request); + Map data = new HashMap<>(); + data.put("test-key", details); + AuditEvent event = new AuditEvent("test-user", "test-type", data); + customAuditEventRepository.add(event); + List persistentAuditEvents = persistenceAuditEventRepository.findAll(); + assertThat(persistentAuditEvents).hasSize(1); + PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); + assertThat(persistentAuditEvent.getData().get("remoteAddress")).isEqualTo("1.2.3.4"); + assertThat(persistentAuditEvent.getData().get("sessionId")).isEqualTo("test-session-id"); + } + + @Test + public void testAddEventWithNullData() { + Map data = new HashMap<>(); + data.put("test-key", null); + AuditEvent event = new AuditEvent("test-user", "test-type", data); + customAuditEventRepository.add(event); + List persistentAuditEvents = persistenceAuditEventRepository.findAll(); + assertThat(persistentAuditEvents).hasSize(1); + PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); + assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("null"); + } + + @Test + public void addAuditEventWithAnonymousUser() { + Map data = new HashMap<>(); + data.put("test-key", "test-value"); + AuditEvent event = new AuditEvent(Constants.ANONYMOUS_USER, "test-type", data); + customAuditEventRepository.add(event); + List persistentAuditEvents = persistenceAuditEventRepository.findAll(); + assertThat(persistentAuditEvents).hasSize(0); + } + + @Test + public void addAuditEventWithAuthorizationFailureType() { + Map data = new HashMap<>(); + data.put("test-key", "test-value"); + AuditEvent event = new AuditEvent("test-user", "AUTHORIZATION_FAILURE", data); + customAuditEventRepository.add(event); + List persistentAuditEvents = persistenceAuditEventRepository.findAll(); + assertThat(persistentAuditEvents).hasSize(0); + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/security/DomainUserDetailsServiceIntTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/security/DomainUserDetailsServiceIntTest.java new file mode 100644 index 0000000000..6c15e47cb9 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/security/DomainUserDetailsServiceIntTest.java @@ -0,0 +1,127 @@ +package com.baeldung.jhipster.uaa.security; + +import com.baeldung.jhipster.uaa.UaaApp; +import com.baeldung.jhipster.uaa.domain.User; +import com.baeldung.jhipster.uaa.repository.UserRepository; + +import org.apache.commons.lang3.RandomStringUtils; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Locale; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Test class for DomainUserDetailsService. + * + * @see DomainUserDetailsService + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = UaaApp.class) +@Transactional +public class DomainUserDetailsServiceIntTest { + + private static final String USER_ONE_LOGIN = "test-user-one"; + private static final String USER_ONE_EMAIL = "test-user-one@localhost"; + private static final String USER_TWO_LOGIN = "test-user-two"; + private static final String USER_TWO_EMAIL = "test-user-two@localhost"; + private static final String USER_THREE_LOGIN = "test-user-three"; + private static final String USER_THREE_EMAIL = "test-user-three@localhost"; + + @Autowired + private UserRepository userRepository; + + @Autowired + private UserDetailsService domainUserDetailsService; + + private User userOne; + private User userTwo; + private User userThree; + + @Before + public void init() { + userOne = new User(); + userOne.setLogin(USER_ONE_LOGIN); + userOne.setPassword(RandomStringUtils.random(60)); + userOne.setActivated(true); + userOne.setEmail(USER_ONE_EMAIL); + userOne.setFirstName("userOne"); + userOne.setLastName("doe"); + userOne.setLangKey("en"); + userRepository.save(userOne); + + userTwo = new User(); + userTwo.setLogin(USER_TWO_LOGIN); + userTwo.setPassword(RandomStringUtils.random(60)); + userTwo.setActivated(true); + userTwo.setEmail(USER_TWO_EMAIL); + userTwo.setFirstName("userTwo"); + userTwo.setLastName("doe"); + userTwo.setLangKey("en"); + userRepository.save(userTwo); + + userThree = new User(); + userThree.setLogin(USER_THREE_LOGIN); + userThree.setPassword(RandomStringUtils.random(60)); + userThree.setActivated(false); + userThree.setEmail(USER_THREE_EMAIL); + userThree.setFirstName("userThree"); + userThree.setLastName("doe"); + userThree.setLangKey("en"); + userRepository.save(userThree); + } + + @Test + @Transactional + public void assertThatUserCanBeFoundByLogin() { + UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_LOGIN); + assertThat(userDetails).isNotNull(); + assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); + } + + @Test + @Transactional + public void assertThatUserCanBeFoundByLoginIgnoreCase() { + UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_LOGIN.toUpperCase(Locale.ENGLISH)); + assertThat(userDetails).isNotNull(); + assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); + } + + @Test + @Transactional + public void assertThatUserCanBeFoundByEmail() { + UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_TWO_EMAIL); + assertThat(userDetails).isNotNull(); + assertThat(userDetails.getUsername()).isEqualTo(USER_TWO_LOGIN); + } + + @Test(expected = UsernameNotFoundException.class) + @Transactional + public void assertThatUserCanNotBeFoundByEmailIgnoreCase() { + domainUserDetailsService.loadUserByUsername(USER_TWO_EMAIL.toUpperCase(Locale.ENGLISH)); + } + + @Test + @Transactional + public void assertThatEmailIsPrioritizedOverLogin() { + UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_EMAIL); + assertThat(userDetails).isNotNull(); + assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); + } + + @Test(expected = UserNotActivatedException.class) + @Transactional + public void assertThatUserNotActivatedExceptionIsThrownForNotActivatedUsers() { + domainUserDetailsService.loadUserByUsername(USER_THREE_LOGIN); + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/security/OAuth2TokenMockUtil.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/security/OAuth2TokenMockUtil.java new file mode 100644 index 0000000000..85a572234f --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/security/OAuth2TokenMockUtil.java @@ -0,0 +1,83 @@ +package com.baeldung.jhipster.uaa.security; + +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.mock.web.MockHttpServletRequest; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; +import org.springframework.security.oauth2.provider.OAuth2Authentication; +import org.springframework.security.oauth2.provider.OAuth2Request; +import org.springframework.security.oauth2.provider.token.ResourceServerTokenServices; +import org.springframework.stereotype.Component; +import org.springframework.test.web.servlet.request.RequestPostProcessor; + +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import java.util.stream.Collectors; + +import static org.mockito.BDDMockito.given; + +/** + * A bean providing simple mocking of OAuth2 access tokens for security integration tests. + */ +@Component +public class OAuth2TokenMockUtil { + + @MockBean + private ResourceServerTokenServices tokenServices; + + private OAuth2Authentication createAuthentication(String username, Set scopes, Set roles) { + List authorities = roles.stream() + .map(SimpleGrantedAuthority::new) + .collect(Collectors.toList()); + + User principal = new User(username, "test", true, true, true, true, authorities); + Authentication authentication = new UsernamePasswordAuthenticationToken(principal, principal.getPassword(), + principal.getAuthorities()); + + // Create the authorization request and OAuth2Authentication object + OAuth2Request authRequest = new OAuth2Request(null, "testClient", null, true, scopes, null, null, null, + null); + return new OAuth2Authentication(authRequest, authentication); + } + + public RequestPostProcessor oauth2Authentication(String username, Set scopes, Set roles) { + String uuid = String.valueOf(UUID.randomUUID()); + + given(tokenServices.loadAuthentication(uuid)) + .willReturn(createAuthentication(username, scopes, roles)); + + given(tokenServices.readAccessToken(uuid)).willReturn(new DefaultOAuth2AccessToken(uuid)); + + return new OAuth2PostProcessor(uuid); + } + + public RequestPostProcessor oauth2Authentication(String username, Set scopes) { + return oauth2Authentication(username, scopes, Collections.emptySet()); + } + + public RequestPostProcessor oauth2Authentication(String username) { + return oauth2Authentication(username, Collections.emptySet()); + } + + public static class OAuth2PostProcessor implements RequestPostProcessor { + + private String token; + + public OAuth2PostProcessor(String token) { + this.token = token; + } + + @Override + public MockHttpServletRequest postProcessRequest(MockHttpServletRequest mockHttpServletRequest) { + mockHttpServletRequest.addHeader("Authorization", "Bearer " + token); + + return mockHttpServletRequest; + } + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/security/SecurityUtilsUnitTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/security/SecurityUtilsUnitTest.java new file mode 100644 index 0000000000..8da41864c8 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/security/SecurityUtilsUnitTest.java @@ -0,0 +1,64 @@ +package com.baeldung.jhipster.uaa.security; + +import org.junit.Test; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Optional; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Test class for the SecurityUtils utility class. + * + * @see SecurityUtils + */ +public class SecurityUtilsUnitTest { + + @Test + public void testgetCurrentUserLogin() { + SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); + securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin")); + SecurityContextHolder.setContext(securityContext); + Optional login = SecurityUtils.getCurrentUserLogin(); + assertThat(login).contains("admin"); + } + + @Test + public void testIsAuthenticated() { + SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); + securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin")); + SecurityContextHolder.setContext(securityContext); + boolean isAuthenticated = SecurityUtils.isAuthenticated(); + assertThat(isAuthenticated).isTrue(); + } + + @Test + public void testAnonymousIsNotAuthenticated() { + SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); + Collection authorities = new ArrayList<>(); + authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS)); + securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("anonymous", "anonymous", authorities)); + SecurityContextHolder.setContext(securityContext); + boolean isAuthenticated = SecurityUtils.isAuthenticated(); + assertThat(isAuthenticated).isFalse(); + } + + @Test + public void testIsCurrentUserInRole() { + SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); + Collection authorities = new ArrayList<>(); + authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.USER)); + securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("user", "user", authorities)); + SecurityContextHolder.setContext(securityContext); + + assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.USER)).isTrue(); + assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.ADMIN)).isFalse(); + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/service/MailServiceIntTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/service/MailServiceIntTest.java new file mode 100644 index 0000000000..5be48eea5c --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/service/MailServiceIntTest.java @@ -0,0 +1,187 @@ +package com.baeldung.jhipster.uaa.service; +import com.baeldung.jhipster.uaa.config.Constants; + +import com.baeldung.jhipster.uaa.UaaApp; +import com.baeldung.jhipster.uaa.domain.User; +import io.github.jhipster.config.JHipsterProperties; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.MockitoAnnotations; +import org.mockito.Spy; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.context.MessageSource; +import org.springframework.mail.MailSendException; +import org.springframework.mail.javamail.JavaMailSenderImpl; +import org.springframework.test.context.junit4.SpringRunner; +import org.thymeleaf.spring5.SpringTemplateEngine; + +import javax.mail.Multipart; +import javax.mail.internet.MimeBodyPart; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart; +import java.io.ByteArrayOutputStream; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.*; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = UaaApp.class) +public class MailServiceIntTest { + + @Autowired + private JHipsterProperties jHipsterProperties; + + @Autowired + private MessageSource messageSource; + + @Autowired + private SpringTemplateEngine templateEngine; + + @Spy + private JavaMailSenderImpl javaMailSender; + + @Captor + private ArgumentCaptor messageCaptor; + + private MailService mailService; + + @Before + public void setup() { + MockitoAnnotations.initMocks(this); + doNothing().when(javaMailSender).send(any(MimeMessage.class)); + mailService = new MailService(jHipsterProperties, javaMailSender, messageSource, templateEngine); + } + + @Test + public void testSendEmail() throws Exception { + mailService.sendEmail("john.doe@example.com", "testSubject", "testContent", false, false); + verify(javaMailSender).send(messageCaptor.capture()); + MimeMessage message = messageCaptor.getValue(); + assertThat(message.getSubject()).isEqualTo("testSubject"); + assertThat(message.getAllRecipients()[0].toString()).isEqualTo("john.doe@example.com"); + assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); + assertThat(message.getContent()).isInstanceOf(String.class); + assertThat(message.getContent().toString()).isEqualTo("testContent"); + assertThat(message.getDataHandler().getContentType()).isEqualTo("text/plain; charset=UTF-8"); + } + + @Test + public void testSendHtmlEmail() throws Exception { + mailService.sendEmail("john.doe@example.com", "testSubject", "testContent", false, true); + verify(javaMailSender).send(messageCaptor.capture()); + MimeMessage message = messageCaptor.getValue(); + assertThat(message.getSubject()).isEqualTo("testSubject"); + assertThat(message.getAllRecipients()[0].toString()).isEqualTo("john.doe@example.com"); + assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); + assertThat(message.getContent()).isInstanceOf(String.class); + assertThat(message.getContent().toString()).isEqualTo("testContent"); + assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); + } + + @Test + public void testSendMultipartEmail() throws Exception { + mailService.sendEmail("john.doe@example.com", "testSubject", "testContent", true, false); + verify(javaMailSender).send(messageCaptor.capture()); + MimeMessage message = messageCaptor.getValue(); + MimeMultipart mp = (MimeMultipart) message.getContent(); + MimeBodyPart part = (MimeBodyPart) ((MimeMultipart) mp.getBodyPart(0).getContent()).getBodyPart(0); + ByteArrayOutputStream aos = new ByteArrayOutputStream(); + part.writeTo(aos); + assertThat(message.getSubject()).isEqualTo("testSubject"); + assertThat(message.getAllRecipients()[0].toString()).isEqualTo("john.doe@example.com"); + assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); + assertThat(message.getContent()).isInstanceOf(Multipart.class); + assertThat(aos.toString()).isEqualTo("\r\ntestContent"); + assertThat(part.getDataHandler().getContentType()).isEqualTo("text/plain; charset=UTF-8"); + } + + @Test + public void testSendMultipartHtmlEmail() throws Exception { + mailService.sendEmail("john.doe@example.com", "testSubject", "testContent", true, true); + verify(javaMailSender).send(messageCaptor.capture()); + MimeMessage message = messageCaptor.getValue(); + MimeMultipart mp = (MimeMultipart) message.getContent(); + MimeBodyPart part = (MimeBodyPart) ((MimeMultipart) mp.getBodyPart(0).getContent()).getBodyPart(0); + ByteArrayOutputStream aos = new ByteArrayOutputStream(); + part.writeTo(aos); + assertThat(message.getSubject()).isEqualTo("testSubject"); + assertThat(message.getAllRecipients()[0].toString()).isEqualTo("john.doe@example.com"); + assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); + assertThat(message.getContent()).isInstanceOf(Multipart.class); + assertThat(aos.toString()).isEqualTo("\r\ntestContent"); + assertThat(part.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); + } + + @Test + public void testSendEmailFromTemplate() throws Exception { + User user = new User(); + user.setLogin("john"); + user.setEmail("john.doe@example.com"); + user.setLangKey("en"); + mailService.sendEmailFromTemplate(user, "mail/testEmail", "email.test.title"); + verify(javaMailSender).send(messageCaptor.capture()); + MimeMessage message = messageCaptor.getValue(); + assertThat(message.getSubject()).isEqualTo("test title"); + assertThat(message.getAllRecipients()[0].toString()).isEqualTo(user.getEmail()); + assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); + assertThat(message.getContent().toString()).isEqualToNormalizingNewlines("test title, http://127.0.0.1:8080, john\n"); + assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); + } + + @Test + public void testSendActivationEmail() throws Exception { + User user = new User(); + user.setLangKey(Constants.DEFAULT_LANGUAGE); + user.setLogin("john"); + user.setEmail("john.doe@example.com"); + mailService.sendActivationEmail(user); + verify(javaMailSender).send(messageCaptor.capture()); + MimeMessage message = messageCaptor.getValue(); + assertThat(message.getAllRecipients()[0].toString()).isEqualTo(user.getEmail()); + assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); + assertThat(message.getContent().toString()).isNotEmpty(); + assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); + } + + @Test + public void testCreationEmail() throws Exception { + User user = new User(); + user.setLangKey(Constants.DEFAULT_LANGUAGE); + user.setLogin("john"); + user.setEmail("john.doe@example.com"); + mailService.sendCreationEmail(user); + verify(javaMailSender).send(messageCaptor.capture()); + MimeMessage message = messageCaptor.getValue(); + assertThat(message.getAllRecipients()[0].toString()).isEqualTo(user.getEmail()); + assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); + assertThat(message.getContent().toString()).isNotEmpty(); + assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); + } + + @Test + public void testSendPasswordResetMail() throws Exception { + User user = new User(); + user.setLangKey(Constants.DEFAULT_LANGUAGE); + user.setLogin("john"); + user.setEmail("john.doe@example.com"); + mailService.sendPasswordResetMail(user); + verify(javaMailSender).send(messageCaptor.capture()); + MimeMessage message = messageCaptor.getValue(); + assertThat(message.getAllRecipients()[0].toString()).isEqualTo(user.getEmail()); + assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); + assertThat(message.getContent().toString()).isNotEmpty(); + assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); + } + + @Test + public void testSendEmailWithException() throws Exception { + doThrow(MailSendException.class).when(javaMailSender).send(any(MimeMessage.class)); + mailService.sendEmail("john.doe@example.com", "testSubject", "testContent", false, false); + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/service/UserServiceIntTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/service/UserServiceIntTest.java new file mode 100644 index 0000000000..d544cb2d73 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/service/UserServiceIntTest.java @@ -0,0 +1,194 @@ +package com.baeldung.jhipster.uaa.service; + +import com.baeldung.jhipster.uaa.UaaApp; +import com.baeldung.jhipster.uaa.config.Constants; +import com.baeldung.jhipster.uaa.domain.User; +import com.baeldung.jhipster.uaa.repository.UserRepository; +import com.baeldung.jhipster.uaa.service.dto.UserDTO; +import com.baeldung.jhipster.uaa.service.util.RandomUtil; + +import org.apache.commons.lang3.RandomStringUtils; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.data.auditing.AuditingHandler; +import org.springframework.data.auditing.DateTimeProvider; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.transaction.annotation.Transactional; + +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import java.time.LocalDateTime; +import java.util.Optional; +import java.util.List; +import java.util.Optional; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.when; + +/** + * Test class for the UserResource REST controller. + * + * @see UserService + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = UaaApp.class) +@Transactional +public class UserServiceIntTest { + + @Autowired + private UserRepository userRepository; + + @Autowired + private UserService userService; + + @Autowired + private AuditingHandler auditingHandler; + + @Mock + DateTimeProvider dateTimeProvider; + + private User user; + + @Before + public void init() { + user = new User(); + user.setLogin("johndoe"); + user.setPassword(RandomStringUtils.random(60)); + user.setActivated(true); + user.setEmail("johndoe@localhost"); + user.setFirstName("john"); + user.setLastName("doe"); + user.setImageUrl("http://placehold.it/50x50"); + user.setLangKey("en"); + + when(dateTimeProvider.getNow()).thenReturn(Optional.of(LocalDateTime.now())); + auditingHandler.setDateTimeProvider(dateTimeProvider); + } + + @Test + @Transactional + public void assertThatUserMustExistToResetPassword() { + userRepository.saveAndFlush(user); + Optional maybeUser = userService.requestPasswordReset("invalid.login@localhost"); + assertThat(maybeUser).isNotPresent(); + + maybeUser = userService.requestPasswordReset(user.getEmail()); + assertThat(maybeUser).isPresent(); + assertThat(maybeUser.orElse(null).getEmail()).isEqualTo(user.getEmail()); + assertThat(maybeUser.orElse(null).getResetDate()).isNotNull(); + assertThat(maybeUser.orElse(null).getResetKey()).isNotNull(); + } + + @Test + @Transactional + public void assertThatOnlyActivatedUserCanRequestPasswordReset() { + user.setActivated(false); + userRepository.saveAndFlush(user); + + Optional maybeUser = userService.requestPasswordReset(user.getLogin()); + assertThat(maybeUser).isNotPresent(); + userRepository.delete(user); + } + + @Test + @Transactional + public void assertThatResetKeyMustNotBeOlderThan24Hours() { + Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); + String resetKey = RandomUtil.generateResetKey(); + user.setActivated(true); + user.setResetDate(daysAgo); + user.setResetKey(resetKey); + userRepository.saveAndFlush(user); + + Optional maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); + assertThat(maybeUser).isNotPresent(); + userRepository.delete(user); + } + + @Test + @Transactional + public void assertThatResetKeyMustBeValid() { + Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); + user.setActivated(true); + user.setResetDate(daysAgo); + user.setResetKey("1234"); + userRepository.saveAndFlush(user); + + Optional maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); + assertThat(maybeUser).isNotPresent(); + userRepository.delete(user); + } + + @Test + @Transactional + public void assertThatUserCanResetPassword() { + String oldPassword = user.getPassword(); + Instant daysAgo = Instant.now().minus(2, ChronoUnit.HOURS); + String resetKey = RandomUtil.generateResetKey(); + user.setActivated(true); + user.setResetDate(daysAgo); + user.setResetKey(resetKey); + userRepository.saveAndFlush(user); + + Optional maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); + assertThat(maybeUser).isPresent(); + assertThat(maybeUser.orElse(null).getResetDate()).isNull(); + assertThat(maybeUser.orElse(null).getResetKey()).isNull(); + assertThat(maybeUser.orElse(null).getPassword()).isNotEqualTo(oldPassword); + + userRepository.delete(user); + } + + @Test + @Transactional + public void testFindNotActivatedUsersByCreationDateBefore() { + Instant now = Instant.now(); + when(dateTimeProvider.getNow()).thenReturn(Optional.of(now.minus(4, ChronoUnit.DAYS))); + user.setActivated(false); + User dbUser = userRepository.saveAndFlush(user); + dbUser.setCreatedDate(now.minus(4, ChronoUnit.DAYS)); + userRepository.saveAndFlush(user); + List users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minus(3, ChronoUnit.DAYS)); + assertThat(users).isNotEmpty(); + userService.removeNotActivatedUsers(); + users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minus(3, ChronoUnit.DAYS)); + assertThat(users).isEmpty(); + } + + @Test + @Transactional + public void assertThatAnonymousUserIsNotGet() { + user.setLogin(Constants.ANONYMOUS_USER); + if (!userRepository.findOneByLogin(Constants.ANONYMOUS_USER).isPresent()) { + userRepository.saveAndFlush(user); + } + final PageRequest pageable = PageRequest.of(0, (int) userRepository.count()); + final Page allManagedUsers = userService.getAllManagedUsers(pageable); + assertThat(allManagedUsers.getContent().stream() + .noneMatch(user -> Constants.ANONYMOUS_USER.equals(user.getLogin()))) + .isTrue(); + } + + + @Test + @Transactional + public void testRemoveNotActivatedUsers() { + // custom "now" for audit to use as creation date + when(dateTimeProvider.getNow()).thenReturn(Optional.of(Instant.now().minus(30, ChronoUnit.DAYS))); + + user.setActivated(false); + userRepository.saveAndFlush(user); + + assertThat(userRepository.findOneByLogin("johndoe")).isPresent(); + userService.removeNotActivatedUsers(); + assertThat(userRepository.findOneByLogin("johndoe")).isNotPresent(); + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/AccountResourceIntTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/AccountResourceIntTest.java new file mode 100644 index 0000000000..559385da2e --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/AccountResourceIntTest.java @@ -0,0 +1,811 @@ +package com.baeldung.jhipster.uaa.web.rest; + +import com.baeldung.jhipster.uaa.UaaApp; +import com.baeldung.jhipster.uaa.config.Constants; +import com.baeldung.jhipster.uaa.domain.Authority; +import com.baeldung.jhipster.uaa.domain.User; +import com.baeldung.jhipster.uaa.repository.AuthorityRepository; +import com.baeldung.jhipster.uaa.repository.UserRepository; +import com.baeldung.jhipster.uaa.security.AuthoritiesConstants; +import com.baeldung.jhipster.uaa.service.MailService; +import com.baeldung.jhipster.uaa.service.UserService; +import com.baeldung.jhipster.uaa.service.dto.PasswordChangeDTO; +import com.baeldung.jhipster.uaa.service.dto.UserDTO; +import com.baeldung.jhipster.uaa.web.rest.errors.ExceptionTranslator; +import com.baeldung.jhipster.uaa.web.rest.vm.KeyAndPasswordVM; +import com.baeldung.jhipster.uaa.web.rest.vm.ManagedUserVM; +import org.apache.commons.lang3.RandomStringUtils; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.http.MediaType; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.test.context.support.WithMockUser; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.springframework.transaction.annotation.Transactional; + +import java.time.Instant; +import java.util.*; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.when; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; + +/** + * Test class for the AccountResource REST controller. + * + * @see AccountResource + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = UaaApp.class) +public class AccountResourceIntTest { + + @Autowired + private UserRepository userRepository; + + @Autowired + private AuthorityRepository authorityRepository; + + @Autowired + private UserService userService; + + @Autowired + private PasswordEncoder passwordEncoder; + + @Autowired + private HttpMessageConverter[] httpMessageConverters; + + @Autowired + private ExceptionTranslator exceptionTranslator; + + @Mock + private UserService mockUserService; + + @Mock + private MailService mockMailService; + + private MockMvc restMvc; + + private MockMvc restUserMockMvc; + + @Before + public void setup() { + MockitoAnnotations.initMocks(this); + doNothing().when(mockMailService).sendActivationEmail(any()); + AccountResource accountResource = + new AccountResource(userRepository, userService, mockMailService); + + AccountResource accountUserMockResource = + new AccountResource(userRepository, mockUserService, mockMailService); + this.restMvc = MockMvcBuilders.standaloneSetup(accountResource) + .setMessageConverters(httpMessageConverters) + .setControllerAdvice(exceptionTranslator) + .build(); + this.restUserMockMvc = MockMvcBuilders.standaloneSetup(accountUserMockResource) + .setControllerAdvice(exceptionTranslator) + .build(); + } + + @Test + public void testNonAuthenticatedUser() throws Exception { + restUserMockMvc.perform(get("/api/authenticate") + .accept(MediaType.APPLICATION_JSON)) + .andExpect(status().isOk()) + .andExpect(content().string("")); + } + + @Test + public void testAuthenticatedUser() throws Exception { + restUserMockMvc.perform(get("/api/authenticate") + .with(request -> { + request.setRemoteUser("test"); + return request; + }) + .accept(MediaType.APPLICATION_JSON)) + .andExpect(status().isOk()) + .andExpect(content().string("test")); + } + + @Test + public void testGetExistingAccount() throws Exception { + Set authorities = new HashSet<>(); + Authority authority = new Authority(); + authority.setName(AuthoritiesConstants.ADMIN); + authorities.add(authority); + + User user = new User(); + user.setLogin("test"); + user.setFirstName("john"); + user.setLastName("doe"); + user.setEmail("john.doe@jhipster.com"); + user.setImageUrl("http://placehold.it/50x50"); + user.setLangKey("en"); + user.setAuthorities(authorities); + when(mockUserService.getUserWithAuthorities()).thenReturn(Optional.of(user)); + + restUserMockMvc.perform(get("/api/account") + .accept(MediaType.APPLICATION_JSON)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$.login").value("test")) + .andExpect(jsonPath("$.firstName").value("john")) + .andExpect(jsonPath("$.lastName").value("doe")) + .andExpect(jsonPath("$.email").value("john.doe@jhipster.com")) + .andExpect(jsonPath("$.imageUrl").value("http://placehold.it/50x50")) + .andExpect(jsonPath("$.langKey").value("en")) + .andExpect(jsonPath("$.authorities").value(AuthoritiesConstants.ADMIN)); + } + + @Test + public void testGetUnknownAccount() throws Exception { + when(mockUserService.getUserWithAuthorities()).thenReturn(Optional.empty()); + + restUserMockMvc.perform(get("/api/account") + .accept(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(status().isInternalServerError()); + } + + @Test + @Transactional + public void testRegisterValid() throws Exception { + ManagedUserVM validUser = new ManagedUserVM(); + validUser.setLogin("test-register-valid"); + validUser.setPassword("password"); + validUser.setFirstName("Alice"); + validUser.setLastName("Test"); + validUser.setEmail("test-register-valid@example.com"); + validUser.setImageUrl("http://placehold.it/50x50"); + validUser.setLangKey(Constants.DEFAULT_LANGUAGE); + validUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + assertThat(userRepository.findOneByLogin("test-register-valid").isPresent()).isFalse(); + + restMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(validUser))) + .andExpect(status().isCreated()); + + assertThat(userRepository.findOneByLogin("test-register-valid").isPresent()).isTrue(); + } + + @Test + @Transactional + public void testRegisterInvalidLogin() throws Exception { + ManagedUserVM invalidUser = new ManagedUserVM(); + invalidUser.setLogin("funky-log!n");// <-- invalid + invalidUser.setPassword("password"); + invalidUser.setFirstName("Funky"); + invalidUser.setLastName("One"); + invalidUser.setEmail("funky@example.com"); + invalidUser.setActivated(true); + invalidUser.setImageUrl("http://placehold.it/50x50"); + invalidUser.setLangKey(Constants.DEFAULT_LANGUAGE); + invalidUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + restUserMockMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(invalidUser))) + .andExpect(status().isBadRequest()); + + Optional user = userRepository.findOneByEmailIgnoreCase("funky@example.com"); + assertThat(user.isPresent()).isFalse(); + } + + @Test + @Transactional + public void testRegisterInvalidEmail() throws Exception { + ManagedUserVM invalidUser = new ManagedUserVM(); + invalidUser.setLogin("bob"); + invalidUser.setPassword("password"); + invalidUser.setFirstName("Bob"); + invalidUser.setLastName("Green"); + invalidUser.setEmail("invalid");// <-- invalid + invalidUser.setActivated(true); + invalidUser.setImageUrl("http://placehold.it/50x50"); + invalidUser.setLangKey(Constants.DEFAULT_LANGUAGE); + invalidUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + restUserMockMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(invalidUser))) + .andExpect(status().isBadRequest()); + + Optional user = userRepository.findOneByLogin("bob"); + assertThat(user.isPresent()).isFalse(); + } + + @Test + @Transactional + public void testRegisterInvalidPassword() throws Exception { + ManagedUserVM invalidUser = new ManagedUserVM(); + invalidUser.setLogin("bob"); + invalidUser.setPassword("123");// password with only 3 digits + invalidUser.setFirstName("Bob"); + invalidUser.setLastName("Green"); + invalidUser.setEmail("bob@example.com"); + invalidUser.setActivated(true); + invalidUser.setImageUrl("http://placehold.it/50x50"); + invalidUser.setLangKey(Constants.DEFAULT_LANGUAGE); + invalidUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + restUserMockMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(invalidUser))) + .andExpect(status().isBadRequest()); + + Optional user = userRepository.findOneByLogin("bob"); + assertThat(user.isPresent()).isFalse(); + } + + @Test + @Transactional + public void testRegisterNullPassword() throws Exception { + ManagedUserVM invalidUser = new ManagedUserVM(); + invalidUser.setLogin("bob"); + invalidUser.setPassword(null);// invalid null password + invalidUser.setFirstName("Bob"); + invalidUser.setLastName("Green"); + invalidUser.setEmail("bob@example.com"); + invalidUser.setActivated(true); + invalidUser.setImageUrl("http://placehold.it/50x50"); + invalidUser.setLangKey(Constants.DEFAULT_LANGUAGE); + invalidUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + restUserMockMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(invalidUser))) + .andExpect(status().isBadRequest()); + + Optional user = userRepository.findOneByLogin("bob"); + assertThat(user.isPresent()).isFalse(); + } + + @Test + @Transactional + public void testRegisterDuplicateLogin() throws Exception { + // First registration + ManagedUserVM firstUser = new ManagedUserVM(); + firstUser.setLogin("alice"); + firstUser.setPassword("password"); + firstUser.setFirstName("Alice"); + firstUser.setLastName("Something"); + firstUser.setEmail("alice@example.com"); + firstUser.setImageUrl("http://placehold.it/50x50"); + firstUser.setLangKey(Constants.DEFAULT_LANGUAGE); + firstUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + // Duplicate login, different email + ManagedUserVM secondUser = new ManagedUserVM(); + secondUser.setLogin(firstUser.getLogin()); + secondUser.setPassword(firstUser.getPassword()); + secondUser.setFirstName(firstUser.getFirstName()); + secondUser.setLastName(firstUser.getLastName()); + secondUser.setEmail("alice2@example.com"); + secondUser.setImageUrl(firstUser.getImageUrl()); + secondUser.setLangKey(firstUser.getLangKey()); + secondUser.setCreatedBy(firstUser.getCreatedBy()); + secondUser.setCreatedDate(firstUser.getCreatedDate()); + secondUser.setLastModifiedBy(firstUser.getLastModifiedBy()); + secondUser.setLastModifiedDate(firstUser.getLastModifiedDate()); + secondUser.setAuthorities(new HashSet<>(firstUser.getAuthorities())); + + // First user + restMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(firstUser))) + .andExpect(status().isCreated()); + + // Second (non activated) user + restMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(secondUser))) + .andExpect(status().isCreated()); + + Optional testUser = userRepository.findOneByEmailIgnoreCase("alice2@example.com"); + assertThat(testUser.isPresent()).isTrue(); + testUser.get().setActivated(true); + userRepository.save(testUser.get()); + + // Second (already activated) user + restMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(secondUser))) + .andExpect(status().is4xxClientError()); + } + + @Test + @Transactional + public void testRegisterDuplicateEmail() throws Exception { + // First user + ManagedUserVM firstUser = new ManagedUserVM(); + firstUser.setLogin("test-register-duplicate-email"); + firstUser.setPassword("password"); + firstUser.setFirstName("Alice"); + firstUser.setLastName("Test"); + firstUser.setEmail("test-register-duplicate-email@example.com"); + firstUser.setImageUrl("http://placehold.it/50x50"); + firstUser.setLangKey(Constants.DEFAULT_LANGUAGE); + firstUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + // Register first user + restMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(firstUser))) + .andExpect(status().isCreated()); + + Optional testUser1 = userRepository.findOneByLogin("test-register-duplicate-email"); + assertThat(testUser1.isPresent()).isTrue(); + + // Duplicate email, different login + ManagedUserVM secondUser = new ManagedUserVM(); + secondUser.setLogin("test-register-duplicate-email-2"); + secondUser.setPassword(firstUser.getPassword()); + secondUser.setFirstName(firstUser.getFirstName()); + secondUser.setLastName(firstUser.getLastName()); + secondUser.setEmail(firstUser.getEmail()); + secondUser.setImageUrl(firstUser.getImageUrl()); + secondUser.setLangKey(firstUser.getLangKey()); + secondUser.setAuthorities(new HashSet<>(firstUser.getAuthorities())); + + // Register second (non activated) user + restMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(secondUser))) + .andExpect(status().isCreated()); + + Optional testUser2 = userRepository.findOneByLogin("test-register-duplicate-email"); + assertThat(testUser2.isPresent()).isFalse(); + + Optional testUser3 = userRepository.findOneByLogin("test-register-duplicate-email-2"); + assertThat(testUser3.isPresent()).isTrue(); + + // Duplicate email - with uppercase email address + ManagedUserVM userWithUpperCaseEmail = new ManagedUserVM(); + userWithUpperCaseEmail.setId(firstUser.getId()); + userWithUpperCaseEmail.setLogin("test-register-duplicate-email-3"); + userWithUpperCaseEmail.setPassword(firstUser.getPassword()); + userWithUpperCaseEmail.setFirstName(firstUser.getFirstName()); + userWithUpperCaseEmail.setLastName(firstUser.getLastName()); + userWithUpperCaseEmail.setEmail("TEST-register-duplicate-email@example.com"); + userWithUpperCaseEmail.setImageUrl(firstUser.getImageUrl()); + userWithUpperCaseEmail.setLangKey(firstUser.getLangKey()); + userWithUpperCaseEmail.setAuthorities(new HashSet<>(firstUser.getAuthorities())); + + // Register third (not activated) user + restMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(userWithUpperCaseEmail))) + .andExpect(status().isCreated()); + + Optional testUser4 = userRepository.findOneByLogin("test-register-duplicate-email-3"); + assertThat(testUser4.isPresent()).isTrue(); + assertThat(testUser4.get().getEmail()).isEqualTo("test-register-duplicate-email@example.com"); + + testUser4.get().setActivated(true); + userService.updateUser((new UserDTO(testUser4.get()))); + + // Register 4th (already activated) user + restMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(secondUser))) + .andExpect(status().is4xxClientError()); + } + + @Test + @Transactional + public void testRegisterAdminIsIgnored() throws Exception { + ManagedUserVM validUser = new ManagedUserVM(); + validUser.setLogin("badguy"); + validUser.setPassword("password"); + validUser.setFirstName("Bad"); + validUser.setLastName("Guy"); + validUser.setEmail("badguy@example.com"); + validUser.setActivated(true); + validUser.setImageUrl("http://placehold.it/50x50"); + validUser.setLangKey(Constants.DEFAULT_LANGUAGE); + validUser.setAuthorities(Collections.singleton(AuthoritiesConstants.ADMIN)); + + restMvc.perform( + post("/api/register") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(validUser))) + .andExpect(status().isCreated()); + + Optional userDup = userRepository.findOneByLogin("badguy"); + assertThat(userDup.isPresent()).isTrue(); + assertThat(userDup.get().getAuthorities()).hasSize(1) + .containsExactly(authorityRepository.findById(AuthoritiesConstants.USER).get()); + } + + @Test + @Transactional + public void testActivateAccount() throws Exception { + final String activationKey = "some activation key"; + User user = new User(); + user.setLogin("activate-account"); + user.setEmail("activate-account@example.com"); + user.setPassword(RandomStringUtils.random(60)); + user.setActivated(false); + user.setActivationKey(activationKey); + + userRepository.saveAndFlush(user); + + restMvc.perform(get("/api/activate?key={activationKey}", activationKey)) + .andExpect(status().isOk()); + + user = userRepository.findOneByLogin(user.getLogin()).orElse(null); + assertThat(user.getActivated()).isTrue(); + } + + @Test + @Transactional + public void testActivateAccountWithWrongKey() throws Exception { + restMvc.perform(get("/api/activate?key=wrongActivationKey")) + .andExpect(status().isInternalServerError()); + } + + @Test + @Transactional + @WithMockUser("save-account") + public void testSaveAccount() throws Exception { + User user = new User(); + user.setLogin("save-account"); + user.setEmail("save-account@example.com"); + user.setPassword(RandomStringUtils.random(60)); + user.setActivated(true); + + userRepository.saveAndFlush(user); + + UserDTO userDTO = new UserDTO(); + userDTO.setLogin("not-used"); + userDTO.setFirstName("firstname"); + userDTO.setLastName("lastname"); + userDTO.setEmail("save-account@example.com"); + userDTO.setActivated(false); + userDTO.setImageUrl("http://placehold.it/50x50"); + userDTO.setLangKey(Constants.DEFAULT_LANGUAGE); + userDTO.setAuthorities(Collections.singleton(AuthoritiesConstants.ADMIN)); + + restMvc.perform( + post("/api/account") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(userDTO))) + .andExpect(status().isOk()); + + User updatedUser = userRepository.findOneByLogin(user.getLogin()).orElse(null); + assertThat(updatedUser.getFirstName()).isEqualTo(userDTO.getFirstName()); + assertThat(updatedUser.getLastName()).isEqualTo(userDTO.getLastName()); + assertThat(updatedUser.getEmail()).isEqualTo(userDTO.getEmail()); + assertThat(updatedUser.getLangKey()).isEqualTo(userDTO.getLangKey()); + assertThat(updatedUser.getPassword()).isEqualTo(user.getPassword()); + assertThat(updatedUser.getImageUrl()).isEqualTo(userDTO.getImageUrl()); + assertThat(updatedUser.getActivated()).isEqualTo(true); + assertThat(updatedUser.getAuthorities()).isEmpty(); + } + + @Test + @Transactional + @WithMockUser("save-invalid-email") + public void testSaveInvalidEmail() throws Exception { + User user = new User(); + user.setLogin("save-invalid-email"); + user.setEmail("save-invalid-email@example.com"); + user.setPassword(RandomStringUtils.random(60)); + user.setActivated(true); + + userRepository.saveAndFlush(user); + + UserDTO userDTO = new UserDTO(); + userDTO.setLogin("not-used"); + userDTO.setFirstName("firstname"); + userDTO.setLastName("lastname"); + userDTO.setEmail("invalid email"); + userDTO.setActivated(false); + userDTO.setImageUrl("http://placehold.it/50x50"); + userDTO.setLangKey(Constants.DEFAULT_LANGUAGE); + userDTO.setAuthorities(Collections.singleton(AuthoritiesConstants.ADMIN)); + + restMvc.perform( + post("/api/account") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(userDTO))) + .andExpect(status().isBadRequest()); + + assertThat(userRepository.findOneByEmailIgnoreCase("invalid email")).isNotPresent(); + } + + @Test + @Transactional + @WithMockUser("save-existing-email") + public void testSaveExistingEmail() throws Exception { + User user = new User(); + user.setLogin("save-existing-email"); + user.setEmail("save-existing-email@example.com"); + user.setPassword(RandomStringUtils.random(60)); + user.setActivated(true); + + userRepository.saveAndFlush(user); + + User anotherUser = new User(); + anotherUser.setLogin("save-existing-email2"); + anotherUser.setEmail("save-existing-email2@example.com"); + anotherUser.setPassword(RandomStringUtils.random(60)); + anotherUser.setActivated(true); + + userRepository.saveAndFlush(anotherUser); + + UserDTO userDTO = new UserDTO(); + userDTO.setLogin("not-used"); + userDTO.setFirstName("firstname"); + userDTO.setLastName("lastname"); + userDTO.setEmail("save-existing-email2@example.com"); + userDTO.setActivated(false); + userDTO.setImageUrl("http://placehold.it/50x50"); + userDTO.setLangKey(Constants.DEFAULT_LANGUAGE); + userDTO.setAuthorities(Collections.singleton(AuthoritiesConstants.ADMIN)); + + restMvc.perform( + post("/api/account") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(userDTO))) + .andExpect(status().isBadRequest()); + + User updatedUser = userRepository.findOneByLogin("save-existing-email").orElse(null); + assertThat(updatedUser.getEmail()).isEqualTo("save-existing-email@example.com"); + } + + @Test + @Transactional + @WithMockUser("save-existing-email-and-login") + public void testSaveExistingEmailAndLogin() throws Exception { + User user = new User(); + user.setLogin("save-existing-email-and-login"); + user.setEmail("save-existing-email-and-login@example.com"); + user.setPassword(RandomStringUtils.random(60)); + user.setActivated(true); + + userRepository.saveAndFlush(user); + + UserDTO userDTO = new UserDTO(); + userDTO.setLogin("not-used"); + userDTO.setFirstName("firstname"); + userDTO.setLastName("lastname"); + userDTO.setEmail("save-existing-email-and-login@example.com"); + userDTO.setActivated(false); + userDTO.setImageUrl("http://placehold.it/50x50"); + userDTO.setLangKey(Constants.DEFAULT_LANGUAGE); + userDTO.setAuthorities(Collections.singleton(AuthoritiesConstants.ADMIN)); + + restMvc.perform( + post("/api/account") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(userDTO))) + .andExpect(status().isOk()); + + User updatedUser = userRepository.findOneByLogin("save-existing-email-and-login").orElse(null); + assertThat(updatedUser.getEmail()).isEqualTo("save-existing-email-and-login@example.com"); + } + + @Test + @Transactional + @WithMockUser("change-password-wrong-existing-password") + public void testChangePasswordWrongExistingPassword() throws Exception { + User user = new User(); + String currentPassword = RandomStringUtils.random(60); + user.setPassword(passwordEncoder.encode(currentPassword)); + user.setLogin("change-password-wrong-existing-password"); + user.setEmail("change-password-wrong-existing-password@example.com"); + userRepository.saveAndFlush(user); + + restMvc.perform(post("/api/account/change-password") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(new PasswordChangeDTO("1"+currentPassword, "new password")))) + .andExpect(status().isBadRequest()); + + User updatedUser = userRepository.findOneByLogin("change-password-wrong-existing-password").orElse(null); + assertThat(passwordEncoder.matches("new password", updatedUser.getPassword())).isFalse(); + assertThat(passwordEncoder.matches(currentPassword, updatedUser.getPassword())).isTrue(); + } + + @Test + @Transactional + @WithMockUser("change-password") + public void testChangePassword() throws Exception { + User user = new User(); + String currentPassword = RandomStringUtils.random(60); + user.setPassword(passwordEncoder.encode(currentPassword)); + user.setLogin("change-password"); + user.setEmail("change-password@example.com"); + userRepository.saveAndFlush(user); + + restMvc.perform(post("/api/account/change-password") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(new PasswordChangeDTO(currentPassword, "new password")))) + .andExpect(status().isOk()); + + User updatedUser = userRepository.findOneByLogin("change-password").orElse(null); + assertThat(passwordEncoder.matches("new password", updatedUser.getPassword())).isTrue(); + } + + @Test + @Transactional + @WithMockUser("change-password-too-small") + public void testChangePasswordTooSmall() throws Exception { + User user = new User(); + String currentPassword = RandomStringUtils.random(60); + user.setPassword(passwordEncoder.encode(currentPassword)); + user.setLogin("change-password-too-small"); + user.setEmail("change-password-too-small@example.com"); + userRepository.saveAndFlush(user); + + restMvc.perform(post("/api/account/change-password") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(new PasswordChangeDTO(currentPassword, "new")))) + .andExpect(status().isBadRequest()); + + User updatedUser = userRepository.findOneByLogin("change-password-too-small").orElse(null); + assertThat(updatedUser.getPassword()).isEqualTo(user.getPassword()); + } + + @Test + @Transactional + @WithMockUser("change-password-too-long") + public void testChangePasswordTooLong() throws Exception { + User user = new User(); + String currentPassword = RandomStringUtils.random(60); + user.setPassword(passwordEncoder.encode(currentPassword)); + user.setLogin("change-password-too-long"); + user.setEmail("change-password-too-long@example.com"); + userRepository.saveAndFlush(user); + + restMvc.perform(post("/api/account/change-password") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(new PasswordChangeDTO(currentPassword, RandomStringUtils.random(101))))) + .andExpect(status().isBadRequest()); + + User updatedUser = userRepository.findOneByLogin("change-password-too-long").orElse(null); + assertThat(updatedUser.getPassword()).isEqualTo(user.getPassword()); + } + + @Test + @Transactional + @WithMockUser("change-password-empty") + public void testChangePasswordEmpty() throws Exception { + User user = new User(); + user.setPassword(RandomStringUtils.random(60)); + user.setLogin("change-password-empty"); + user.setEmail("change-password-empty@example.com"); + userRepository.saveAndFlush(user); + + restMvc.perform(post("/api/account/change-password").content(RandomStringUtils.random(0))) + .andExpect(status().isBadRequest()); + + User updatedUser = userRepository.findOneByLogin("change-password-empty").orElse(null); + assertThat(updatedUser.getPassword()).isEqualTo(user.getPassword()); + } + + @Test + @Transactional + public void testRequestPasswordReset() throws Exception { + User user = new User(); + user.setPassword(RandomStringUtils.random(60)); + user.setActivated(true); + user.setLogin("password-reset"); + user.setEmail("password-reset@example.com"); + userRepository.saveAndFlush(user); + + restMvc.perform(post("/api/account/reset-password/init") + .content("password-reset@example.com")) + .andExpect(status().isOk()); + } + + @Test + @Transactional + public void testRequestPasswordResetUpperCaseEmail() throws Exception { + User user = new User(); + user.setPassword(RandomStringUtils.random(60)); + user.setActivated(true); + user.setLogin("password-reset"); + user.setEmail("password-reset@example.com"); + userRepository.saveAndFlush(user); + + restMvc.perform(post("/api/account/reset-password/init") + .content("password-reset@EXAMPLE.COM")) + .andExpect(status().isOk()); + } + + @Test + public void testRequestPasswordResetWrongEmail() throws Exception { + restMvc.perform( + post("/api/account/reset-password/init") + .content("password-reset-wrong-email@example.com")) + .andExpect(status().isBadRequest()); + } + + @Test + @Transactional + public void testFinishPasswordReset() throws Exception { + User user = new User(); + user.setPassword(RandomStringUtils.random(60)); + user.setLogin("finish-password-reset"); + user.setEmail("finish-password-reset@example.com"); + user.setResetDate(Instant.now().plusSeconds(60)); + user.setResetKey("reset key"); + userRepository.saveAndFlush(user); + + KeyAndPasswordVM keyAndPassword = new KeyAndPasswordVM(); + keyAndPassword.setKey(user.getResetKey()); + keyAndPassword.setNewPassword("new password"); + + restMvc.perform( + post("/api/account/reset-password/finish") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(keyAndPassword))) + .andExpect(status().isOk()); + + User updatedUser = userRepository.findOneByLogin(user.getLogin()).orElse(null); + assertThat(passwordEncoder.matches(keyAndPassword.getNewPassword(), updatedUser.getPassword())).isTrue(); + } + + @Test + @Transactional + public void testFinishPasswordResetTooSmall() throws Exception { + User user = new User(); + user.setPassword(RandomStringUtils.random(60)); + user.setLogin("finish-password-reset-too-small"); + user.setEmail("finish-password-reset-too-small@example.com"); + user.setResetDate(Instant.now().plusSeconds(60)); + user.setResetKey("reset key too small"); + userRepository.saveAndFlush(user); + + KeyAndPasswordVM keyAndPassword = new KeyAndPasswordVM(); + keyAndPassword.setKey(user.getResetKey()); + keyAndPassword.setNewPassword("foo"); + + restMvc.perform( + post("/api/account/reset-password/finish") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(keyAndPassword))) + .andExpect(status().isBadRequest()); + + User updatedUser = userRepository.findOneByLogin(user.getLogin()).orElse(null); + assertThat(passwordEncoder.matches(keyAndPassword.getNewPassword(), updatedUser.getPassword())).isFalse(); + } + + + @Test + @Transactional + public void testFinishPasswordResetWrongKey() throws Exception { + KeyAndPasswordVM keyAndPassword = new KeyAndPasswordVM(); + keyAndPassword.setKey("wrong reset key"); + keyAndPassword.setNewPassword("new password"); + + restMvc.perform( + post("/api/account/reset-password/finish") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(keyAndPassword))) + .andExpect(status().isInternalServerError()); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/AuditResourceIntTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/AuditResourceIntTest.java new file mode 100644 index 0000000000..24bbaf4b0c --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/AuditResourceIntTest.java @@ -0,0 +1,146 @@ +package com.baeldung.jhipster.uaa.web.rest; + +import com.baeldung.jhipster.uaa.UaaApp; +import com.baeldung.jhipster.uaa.config.audit.AuditEventConverter; +import com.baeldung.jhipster.uaa.domain.PersistentAuditEvent; +import com.baeldung.jhipster.uaa.repository.PersistenceAuditEventRepository; +import com.baeldung.jhipster.uaa.service.AuditEventService; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.MockitoAnnotations; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.data.web.PageableHandlerMethodArgumentResolver; +import org.springframework.format.support.FormattingConversionService; +import org.springframework.http.MediaType; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.springframework.transaction.annotation.Transactional; + +import java.time.Instant; + +import static org.hamcrest.Matchers.hasItem; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; + +/** + * Test class for the AuditResource REST controller. + * + * @see AuditResource + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = UaaApp.class) +@Transactional +public class AuditResourceIntTest { + + private static final String SAMPLE_PRINCIPAL = "SAMPLE_PRINCIPAL"; + private static final String SAMPLE_TYPE = "SAMPLE_TYPE"; + private static final Instant SAMPLE_TIMESTAMP = Instant.parse("2015-08-04T10:11:30Z"); + private static final long SECONDS_PER_DAY = 60 * 60 * 24; + + @Autowired + private PersistenceAuditEventRepository auditEventRepository; + + @Autowired + private AuditEventConverter auditEventConverter; + + @Autowired + private MappingJackson2HttpMessageConverter jacksonMessageConverter; + + @Autowired + private FormattingConversionService formattingConversionService; + + @Autowired + private PageableHandlerMethodArgumentResolver pageableArgumentResolver; + + private PersistentAuditEvent auditEvent; + + private MockMvc restAuditMockMvc; + + @Before + public void setup() { + MockitoAnnotations.initMocks(this); + AuditEventService auditEventService = + new AuditEventService(auditEventRepository, auditEventConverter); + AuditResource auditResource = new AuditResource(auditEventService); + this.restAuditMockMvc = MockMvcBuilders.standaloneSetup(auditResource) + .setCustomArgumentResolvers(pageableArgumentResolver) + .setConversionService(formattingConversionService) + .setMessageConverters(jacksonMessageConverter).build(); + } + + @Before + public void initTest() { + auditEventRepository.deleteAll(); + auditEvent = new PersistentAuditEvent(); + auditEvent.setAuditEventType(SAMPLE_TYPE); + auditEvent.setPrincipal(SAMPLE_PRINCIPAL); + auditEvent.setAuditEventDate(SAMPLE_TIMESTAMP); + } + + @Test + public void getAllAudits() throws Exception { + // Initialize the database + auditEventRepository.save(auditEvent); + + // Get all the audits + restAuditMockMvc.perform(get("/management/audits")) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL))); + } + + @Test + public void getAudit() throws Exception { + // Initialize the database + auditEventRepository.save(auditEvent); + + // Get the audit + restAuditMockMvc.perform(get("/management/audits/{id}", auditEvent.getId())) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$.principal").value(SAMPLE_PRINCIPAL)); + } + + @Test + public void getAuditsByDate() throws Exception { + // Initialize the database + auditEventRepository.save(auditEvent); + + // Generate dates for selecting audits by date, making sure the period will contain the audit + String fromDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); + String toDate = SAMPLE_TIMESTAMP.plusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); + + // Get the audit + restAuditMockMvc.perform(get("/management/audits?fromDate="+fromDate+"&toDate="+toDate)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL))); + } + + @Test + public void getNonExistingAuditsByDate() throws Exception { + // Initialize the database + auditEventRepository.save(auditEvent); + + // Generate dates for selecting audits by date, making sure the period will not contain the sample audit + String fromDate = SAMPLE_TIMESTAMP.minusSeconds(2*SECONDS_PER_DAY).toString().substring(0, 10); + String toDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); + + // Query audits but expect no results + restAuditMockMvc.perform(get("/management/audits?fromDate=" + fromDate + "&toDate=" + toDate)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(header().string("X-Total-Count", "0")); + } + + @Test + public void getNonExistingAudit() throws Exception { + // Get the audit + restAuditMockMvc.perform(get("/management/audits/{id}", Long.MAX_VALUE)) + .andExpect(status().isNotFound()); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/LogsResourceIntTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/LogsResourceIntTest.java new file mode 100644 index 0000000000..18ab835be7 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/LogsResourceIntTest.java @@ -0,0 +1,67 @@ +package com.baeldung.jhipster.uaa.web.rest; + +import com.baeldung.jhipster.uaa.UaaApp; +import com.baeldung.jhipster.uaa.config.SecurityBeanOverrideConfiguration; +import com.baeldung.jhipster.uaa.web.rest.vm.LoggerVM; +import ch.qos.logback.classic.AsyncAppender; +import ch.qos.logback.classic.LoggerContext; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.slf4j.LoggerFactory; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.http.MediaType; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * Test class for the LogsResource REST controller. + * + * @see LogsResource + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = UaaApp.class) +public class LogsResourceIntTest { + + private MockMvc restLogsMockMvc; + + @Before + public void setup() { + LogsResource logsResource = new LogsResource(); + this.restLogsMockMvc = MockMvcBuilders + .standaloneSetup(logsResource) + .build(); + } + + @Test + public void getAllLogs() throws Exception { + restLogsMockMvc.perform(get("/management/logs")) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)); + } + + @Test + public void changeLogs() throws Exception { + LoggerVM logger = new LoggerVM(); + logger.setLevel("INFO"); + logger.setName("ROOT"); + + restLogsMockMvc.perform(put("/management/logs") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(logger))) + .andExpect(status().isNoContent()); + } + + @Test + public void testLogstashAppender() { + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + assertThat(context.getLogger("ROOT").getAppender("ASYNC_LOGSTASH")).isInstanceOf(AsyncAppender.class); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/TestUtil.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/TestUtil.java new file mode 100644 index 0000000000..ebacd1e593 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/TestUtil.java @@ -0,0 +1,135 @@ +package com.baeldung.jhipster.uaa.web.rest; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import org.hamcrest.Description; +import org.hamcrest.TypeSafeDiagnosingMatcher; +import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; +import org.springframework.format.support.DefaultFormattingConversionService; +import org.springframework.format.support.FormattingConversionService; +import org.springframework.http.MediaType; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.time.ZonedDateTime; +import java.time.format.DateTimeParseException; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Utility class for testing REST controllers. + */ +public class TestUtil { + + /** MediaType for JSON UTF8 */ + public static final MediaType APPLICATION_JSON_UTF8 = new MediaType( + MediaType.APPLICATION_JSON.getType(), + MediaType.APPLICATION_JSON.getSubtype(), StandardCharsets.UTF_8); + + /** + * Convert an object to JSON byte array. + * + * @param object + * the object to convert + * @return the JSON byte array + * @throws IOException + */ + public static byte[] convertObjectToJsonBytes(Object object) + throws IOException { + ObjectMapper mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); + + JavaTimeModule module = new JavaTimeModule(); + mapper.registerModule(module); + + return mapper.writeValueAsBytes(object); + } + + /** + * Create a byte array with a specific size filled with specified data. + * + * @param size the size of the byte array + * @param data the data to put in the byte array + * @return the JSON byte array + */ + public static byte[] createByteArray(int size, String data) { + byte[] byteArray = new byte[size]; + for (int i = 0; i < size; i++) { + byteArray[i] = Byte.parseByte(data, 2); + } + return byteArray; + } + + /** + * A matcher that tests that the examined string represents the same instant as the reference datetime. + */ + public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher { + + private final ZonedDateTime date; + + public ZonedDateTimeMatcher(ZonedDateTime date) { + this.date = date; + } + + @Override + protected boolean matchesSafely(String item, Description mismatchDescription) { + try { + if (!date.isEqual(ZonedDateTime.parse(item))) { + mismatchDescription.appendText("was ").appendValue(item); + return false; + } + return true; + } catch (DateTimeParseException e) { + mismatchDescription.appendText("was ").appendValue(item) + .appendText(", which could not be parsed as a ZonedDateTime"); + return false; + } + + } + + @Override + public void describeTo(Description description) { + description.appendText("a String representing the same Instant as ").appendValue(date); + } + } + + /** + * Creates a matcher that matches when the examined string reprensents the same instant as the reference datetime + * @param date the reference datetime against which the examined string is checked + */ + public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) { + return new ZonedDateTimeMatcher(date); + } + + /** + * Verifies the equals/hashcode contract on the domain object. + */ + public static void equalsVerifier(Class clazz) throws Exception { + T domainObject1 = clazz.getConstructor().newInstance(); + assertThat(domainObject1.toString()).isNotNull(); + assertThat(domainObject1).isEqualTo(domainObject1); + assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode()); + // Test with an instance of another class + Object testOtherObject = new Object(); + assertThat(domainObject1).isNotEqualTo(testOtherObject); + assertThat(domainObject1).isNotEqualTo(null); + // Test with an instance of the same class + T domainObject2 = clazz.getConstructor().newInstance(); + assertThat(domainObject1).isNotEqualTo(domainObject2); + // HashCodes are equals because the objects are not persisted yet + assertThat(domainObject1.hashCode()).isEqualTo(domainObject2.hashCode()); + } + + /** + * Create a FormattingConversionService which use ISO date format, instead of the localized one. + * @return the FormattingConversionService + */ + public static FormattingConversionService createFormattingConversionService() { + DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService (); + DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); + registrar.setUseIsoFormat(true); + registrar.registerFormatters(dfcs); + return dfcs; + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/UserResourceIntTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/UserResourceIntTest.java new file mode 100644 index 0000000000..0cbed67a04 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/UserResourceIntTest.java @@ -0,0 +1,614 @@ +package com.baeldung.jhipster.uaa.web.rest; + +import com.baeldung.jhipster.uaa.UaaApp; +import com.baeldung.jhipster.uaa.domain.Authority; +import com.baeldung.jhipster.uaa.domain.User; +import com.baeldung.jhipster.uaa.repository.UserRepository; +import com.baeldung.jhipster.uaa.security.AuthoritiesConstants; +import com.baeldung.jhipster.uaa.service.MailService; +import com.baeldung.jhipster.uaa.service.UserService; +import com.baeldung.jhipster.uaa.service.dto.UserDTO; +import com.baeldung.jhipster.uaa.service.mapper.UserMapper; +import com.baeldung.jhipster.uaa.web.rest.errors.ExceptionTranslator; +import com.baeldung.jhipster.uaa.web.rest.vm.ManagedUserVM; +import org.apache.commons.lang3.RandomStringUtils; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.cache.CacheManager; +import org.springframework.data.web.PageableHandlerMethodArgumentResolver; +import org.springframework.http.MediaType; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.springframework.transaction.annotation.Transactional; + +import javax.persistence.EntityManager; +import java.time.Instant; +import java.util.*; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.hamcrest.Matchers.hasItems; +import static org.hamcrest.Matchers.hasItem; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; + +/** + * Test class for the UserResource REST controller. + * + * @see UserResource + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = UaaApp.class) +public class UserResourceIntTest { + + private static final String DEFAULT_LOGIN = "johndoe"; + private static final String UPDATED_LOGIN = "jhipster"; + + private static final Long DEFAULT_ID = 1L; + + private static final String DEFAULT_PASSWORD = "passjohndoe"; + private static final String UPDATED_PASSWORD = "passjhipster"; + + private static final String DEFAULT_EMAIL = "johndoe@localhost"; + private static final String UPDATED_EMAIL = "jhipster@localhost"; + + private static final String DEFAULT_FIRSTNAME = "john"; + private static final String UPDATED_FIRSTNAME = "jhipsterFirstName"; + + private static final String DEFAULT_LASTNAME = "doe"; + private static final String UPDATED_LASTNAME = "jhipsterLastName"; + + private static final String DEFAULT_IMAGEURL = "http://placehold.it/50x50"; + private static final String UPDATED_IMAGEURL = "http://placehold.it/40x40"; + + private static final String DEFAULT_LANGKEY = "en"; + private static final String UPDATED_LANGKEY = "fr"; + + @Autowired + private UserRepository userRepository; + + @Autowired + private MailService mailService; + + @Autowired + private UserService userService; + + @Autowired + private UserMapper userMapper; + + @Autowired + private MappingJackson2HttpMessageConverter jacksonMessageConverter; + + @Autowired + private PageableHandlerMethodArgumentResolver pageableArgumentResolver; + + @Autowired + private ExceptionTranslator exceptionTranslator; + + @Autowired + private EntityManager em; + + @Autowired + private CacheManager cacheManager; + + private MockMvc restUserMockMvc; + + private User user; + + @Before + public void setup() { + cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).clear(); + cacheManager.getCache(UserRepository.USERS_BY_EMAIL_CACHE).clear(); + UserResource userResource = new UserResource(userService, userRepository, mailService); + + this.restUserMockMvc = MockMvcBuilders.standaloneSetup(userResource) + .setCustomArgumentResolvers(pageableArgumentResolver) + .setControllerAdvice(exceptionTranslator) + .setMessageConverters(jacksonMessageConverter) + .build(); + } + + /** + * Create a User. + * + * This is a static method, as tests for other entities might also need it, + * if they test an entity which has a required relationship to the User entity. + */ + public static User createEntity(EntityManager em) { + User user = new User(); + user.setLogin(DEFAULT_LOGIN + RandomStringUtils.randomAlphabetic(5)); + user.setPassword(RandomStringUtils.random(60)); + user.setActivated(true); + user.setEmail(RandomStringUtils.randomAlphabetic(5) + DEFAULT_EMAIL); + user.setFirstName(DEFAULT_FIRSTNAME); + user.setLastName(DEFAULT_LASTNAME); + user.setImageUrl(DEFAULT_IMAGEURL); + user.setLangKey(DEFAULT_LANGKEY); + return user; + } + + @Before + public void initTest() { + user = createEntity(em); + user.setLogin(DEFAULT_LOGIN); + user.setEmail(DEFAULT_EMAIL); + } + + @Test + @Transactional + public void createUser() throws Exception { + int databaseSizeBeforeCreate = userRepository.findAll().size(); + + // Create the User + ManagedUserVM managedUserVM = new ManagedUserVM(); + managedUserVM.setLogin(DEFAULT_LOGIN); + managedUserVM.setPassword(DEFAULT_PASSWORD); + managedUserVM.setFirstName(DEFAULT_FIRSTNAME); + managedUserVM.setLastName(DEFAULT_LASTNAME); + managedUserVM.setEmail(DEFAULT_EMAIL); + managedUserVM.setActivated(true); + managedUserVM.setImageUrl(DEFAULT_IMAGEURL); + managedUserVM.setLangKey(DEFAULT_LANGKEY); + managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + restUserMockMvc.perform(post("/api/users") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) + .andExpect(status().isCreated()); + + // Validate the User in the database + List userList = userRepository.findAll(); + assertThat(userList).hasSize(databaseSizeBeforeCreate + 1); + User testUser = userList.get(userList.size() - 1); + assertThat(testUser.getLogin()).isEqualTo(DEFAULT_LOGIN); + assertThat(testUser.getFirstName()).isEqualTo(DEFAULT_FIRSTNAME); + assertThat(testUser.getLastName()).isEqualTo(DEFAULT_LASTNAME); + assertThat(testUser.getEmail()).isEqualTo(DEFAULT_EMAIL); + assertThat(testUser.getImageUrl()).isEqualTo(DEFAULT_IMAGEURL); + assertThat(testUser.getLangKey()).isEqualTo(DEFAULT_LANGKEY); + } + + @Test + @Transactional + public void createUserWithExistingId() throws Exception { + int databaseSizeBeforeCreate = userRepository.findAll().size(); + + ManagedUserVM managedUserVM = new ManagedUserVM(); + managedUserVM.setId(1L); + managedUserVM.setLogin(DEFAULT_LOGIN); + managedUserVM.setPassword(DEFAULT_PASSWORD); + managedUserVM.setFirstName(DEFAULT_FIRSTNAME); + managedUserVM.setLastName(DEFAULT_LASTNAME); + managedUserVM.setEmail(DEFAULT_EMAIL); + managedUserVM.setActivated(true); + managedUserVM.setImageUrl(DEFAULT_IMAGEURL); + managedUserVM.setLangKey(DEFAULT_LANGKEY); + managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + // An entity with an existing ID cannot be created, so this API call must fail + restUserMockMvc.perform(post("/api/users") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) + .andExpect(status().isBadRequest()); + + // Validate the User in the database + List userList = userRepository.findAll(); + assertThat(userList).hasSize(databaseSizeBeforeCreate); + } + + @Test + @Transactional + public void createUserWithExistingLogin() throws Exception { + // Initialize the database + userRepository.saveAndFlush(user); + int databaseSizeBeforeCreate = userRepository.findAll().size(); + + ManagedUserVM managedUserVM = new ManagedUserVM(); + managedUserVM.setLogin(DEFAULT_LOGIN);// this login should already be used + managedUserVM.setPassword(DEFAULT_PASSWORD); + managedUserVM.setFirstName(DEFAULT_FIRSTNAME); + managedUserVM.setLastName(DEFAULT_LASTNAME); + managedUserVM.setEmail("anothermail@localhost"); + managedUserVM.setActivated(true); + managedUserVM.setImageUrl(DEFAULT_IMAGEURL); + managedUserVM.setLangKey(DEFAULT_LANGKEY); + managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + // Create the User + restUserMockMvc.perform(post("/api/users") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) + .andExpect(status().isBadRequest()); + + // Validate the User in the database + List userList = userRepository.findAll(); + assertThat(userList).hasSize(databaseSizeBeforeCreate); + } + + @Test + @Transactional + public void createUserWithExistingEmail() throws Exception { + // Initialize the database + userRepository.saveAndFlush(user); + int databaseSizeBeforeCreate = userRepository.findAll().size(); + + ManagedUserVM managedUserVM = new ManagedUserVM(); + managedUserVM.setLogin("anotherlogin"); + managedUserVM.setPassword(DEFAULT_PASSWORD); + managedUserVM.setFirstName(DEFAULT_FIRSTNAME); + managedUserVM.setLastName(DEFAULT_LASTNAME); + managedUserVM.setEmail(DEFAULT_EMAIL);// this email should already be used + managedUserVM.setActivated(true); + managedUserVM.setImageUrl(DEFAULT_IMAGEURL); + managedUserVM.setLangKey(DEFAULT_LANGKEY); + managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + // Create the User + restUserMockMvc.perform(post("/api/users") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) + .andExpect(status().isBadRequest()); + + // Validate the User in the database + List userList = userRepository.findAll(); + assertThat(userList).hasSize(databaseSizeBeforeCreate); + } + + @Test + @Transactional + public void getAllUsers() throws Exception { + // Initialize the database + userRepository.saveAndFlush(user); + + // Get all the users + restUserMockMvc.perform(get("/api/users?sort=id,desc") + .accept(MediaType.APPLICATION_JSON)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$.[*].login").value(hasItem(DEFAULT_LOGIN))) + .andExpect(jsonPath("$.[*].firstName").value(hasItem(DEFAULT_FIRSTNAME))) + .andExpect(jsonPath("$.[*].lastName").value(hasItem(DEFAULT_LASTNAME))) + .andExpect(jsonPath("$.[*].email").value(hasItem(DEFAULT_EMAIL))) + .andExpect(jsonPath("$.[*].imageUrl").value(hasItem(DEFAULT_IMAGEURL))) + .andExpect(jsonPath("$.[*].langKey").value(hasItem(DEFAULT_LANGKEY))); + } + + @Test + @Transactional + public void getUser() throws Exception { + // Initialize the database + userRepository.saveAndFlush(user); + + assertThat(cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).get(user.getLogin())).isNull(); + + // Get the user + restUserMockMvc.perform(get("/api/users/{login}", user.getLogin())) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$.login").value(user.getLogin())) + .andExpect(jsonPath("$.firstName").value(DEFAULT_FIRSTNAME)) + .andExpect(jsonPath("$.lastName").value(DEFAULT_LASTNAME)) + .andExpect(jsonPath("$.email").value(DEFAULT_EMAIL)) + .andExpect(jsonPath("$.imageUrl").value(DEFAULT_IMAGEURL)) + .andExpect(jsonPath("$.langKey").value(DEFAULT_LANGKEY)); + + assertThat(cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).get(user.getLogin())).isNotNull(); + } + + @Test + @Transactional + public void getNonExistingUser() throws Exception { + restUserMockMvc.perform(get("/api/users/unknown")) + .andExpect(status().isNotFound()); + } + + @Test + @Transactional + public void updateUser() throws Exception { + // Initialize the database + userRepository.saveAndFlush(user); + int databaseSizeBeforeUpdate = userRepository.findAll().size(); + + // Update the user + User updatedUser = userRepository.findById(user.getId()).get(); + + ManagedUserVM managedUserVM = new ManagedUserVM(); + managedUserVM.setId(updatedUser.getId()); + managedUserVM.setLogin(updatedUser.getLogin()); + managedUserVM.setPassword(UPDATED_PASSWORD); + managedUserVM.setFirstName(UPDATED_FIRSTNAME); + managedUserVM.setLastName(UPDATED_LASTNAME); + managedUserVM.setEmail(UPDATED_EMAIL); + managedUserVM.setActivated(updatedUser.getActivated()); + managedUserVM.setImageUrl(UPDATED_IMAGEURL); + managedUserVM.setLangKey(UPDATED_LANGKEY); + managedUserVM.setCreatedBy(updatedUser.getCreatedBy()); + managedUserVM.setCreatedDate(updatedUser.getCreatedDate()); + managedUserVM.setLastModifiedBy(updatedUser.getLastModifiedBy()); + managedUserVM.setLastModifiedDate(updatedUser.getLastModifiedDate()); + managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + restUserMockMvc.perform(put("/api/users") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) + .andExpect(status().isOk()); + + // Validate the User in the database + List userList = userRepository.findAll(); + assertThat(userList).hasSize(databaseSizeBeforeUpdate); + User testUser = userList.get(userList.size() - 1); + assertThat(testUser.getFirstName()).isEqualTo(UPDATED_FIRSTNAME); + assertThat(testUser.getLastName()).isEqualTo(UPDATED_LASTNAME); + assertThat(testUser.getEmail()).isEqualTo(UPDATED_EMAIL); + assertThat(testUser.getImageUrl()).isEqualTo(UPDATED_IMAGEURL); + assertThat(testUser.getLangKey()).isEqualTo(UPDATED_LANGKEY); + } + + @Test + @Transactional + public void updateUserLogin() throws Exception { + // Initialize the database + userRepository.saveAndFlush(user); + int databaseSizeBeforeUpdate = userRepository.findAll().size(); + + // Update the user + User updatedUser = userRepository.findById(user.getId()).get(); + + ManagedUserVM managedUserVM = new ManagedUserVM(); + managedUserVM.setId(updatedUser.getId()); + managedUserVM.setLogin(UPDATED_LOGIN); + managedUserVM.setPassword(UPDATED_PASSWORD); + managedUserVM.setFirstName(UPDATED_FIRSTNAME); + managedUserVM.setLastName(UPDATED_LASTNAME); + managedUserVM.setEmail(UPDATED_EMAIL); + managedUserVM.setActivated(updatedUser.getActivated()); + managedUserVM.setImageUrl(UPDATED_IMAGEURL); + managedUserVM.setLangKey(UPDATED_LANGKEY); + managedUserVM.setCreatedBy(updatedUser.getCreatedBy()); + managedUserVM.setCreatedDate(updatedUser.getCreatedDate()); + managedUserVM.setLastModifiedBy(updatedUser.getLastModifiedBy()); + managedUserVM.setLastModifiedDate(updatedUser.getLastModifiedDate()); + managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + restUserMockMvc.perform(put("/api/users") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) + .andExpect(status().isOk()); + + // Validate the User in the database + List userList = userRepository.findAll(); + assertThat(userList).hasSize(databaseSizeBeforeUpdate); + User testUser = userList.get(userList.size() - 1); + assertThat(testUser.getLogin()).isEqualTo(UPDATED_LOGIN); + assertThat(testUser.getFirstName()).isEqualTo(UPDATED_FIRSTNAME); + assertThat(testUser.getLastName()).isEqualTo(UPDATED_LASTNAME); + assertThat(testUser.getEmail()).isEqualTo(UPDATED_EMAIL); + assertThat(testUser.getImageUrl()).isEqualTo(UPDATED_IMAGEURL); + assertThat(testUser.getLangKey()).isEqualTo(UPDATED_LANGKEY); + } + + @Test + @Transactional + public void updateUserExistingEmail() throws Exception { + // Initialize the database with 2 users + userRepository.saveAndFlush(user); + + User anotherUser = new User(); + anotherUser.setLogin("jhipster"); + anotherUser.setPassword(RandomStringUtils.random(60)); + anotherUser.setActivated(true); + anotherUser.setEmail("jhipster@localhost"); + anotherUser.setFirstName("java"); + anotherUser.setLastName("hipster"); + anotherUser.setImageUrl(""); + anotherUser.setLangKey("en"); + userRepository.saveAndFlush(anotherUser); + + // Update the user + User updatedUser = userRepository.findById(user.getId()).get(); + + ManagedUserVM managedUserVM = new ManagedUserVM(); + managedUserVM.setId(updatedUser.getId()); + managedUserVM.setLogin(updatedUser.getLogin()); + managedUserVM.setPassword(updatedUser.getPassword()); + managedUserVM.setFirstName(updatedUser.getFirstName()); + managedUserVM.setLastName(updatedUser.getLastName()); + managedUserVM.setEmail("jhipster@localhost");// this email should already be used by anotherUser + managedUserVM.setActivated(updatedUser.getActivated()); + managedUserVM.setImageUrl(updatedUser.getImageUrl()); + managedUserVM.setLangKey(updatedUser.getLangKey()); + managedUserVM.setCreatedBy(updatedUser.getCreatedBy()); + managedUserVM.setCreatedDate(updatedUser.getCreatedDate()); + managedUserVM.setLastModifiedBy(updatedUser.getLastModifiedBy()); + managedUserVM.setLastModifiedDate(updatedUser.getLastModifiedDate()); + managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + restUserMockMvc.perform(put("/api/users") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) + .andExpect(status().isBadRequest()); + } + + @Test + @Transactional + public void updateUserExistingLogin() throws Exception { + // Initialize the database + userRepository.saveAndFlush(user); + + User anotherUser = new User(); + anotherUser.setLogin("jhipster"); + anotherUser.setPassword(RandomStringUtils.random(60)); + anotherUser.setActivated(true); + anotherUser.setEmail("jhipster@localhost"); + anotherUser.setFirstName("java"); + anotherUser.setLastName("hipster"); + anotherUser.setImageUrl(""); + anotherUser.setLangKey("en"); + userRepository.saveAndFlush(anotherUser); + + // Update the user + User updatedUser = userRepository.findById(user.getId()).get(); + + ManagedUserVM managedUserVM = new ManagedUserVM(); + managedUserVM.setId(updatedUser.getId()); + managedUserVM.setLogin("jhipster");// this login should already be used by anotherUser + managedUserVM.setPassword(updatedUser.getPassword()); + managedUserVM.setFirstName(updatedUser.getFirstName()); + managedUserVM.setLastName(updatedUser.getLastName()); + managedUserVM.setEmail(updatedUser.getEmail()); + managedUserVM.setActivated(updatedUser.getActivated()); + managedUserVM.setImageUrl(updatedUser.getImageUrl()); + managedUserVM.setLangKey(updatedUser.getLangKey()); + managedUserVM.setCreatedBy(updatedUser.getCreatedBy()); + managedUserVM.setCreatedDate(updatedUser.getCreatedDate()); + managedUserVM.setLastModifiedBy(updatedUser.getLastModifiedBy()); + managedUserVM.setLastModifiedDate(updatedUser.getLastModifiedDate()); + managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + restUserMockMvc.perform(put("/api/users") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) + .andExpect(status().isBadRequest()); + } + + @Test + @Transactional + public void deleteUser() throws Exception { + // Initialize the database + userRepository.saveAndFlush(user); + int databaseSizeBeforeDelete = userRepository.findAll().size(); + + // Delete the user + restUserMockMvc.perform(delete("/api/users/{login}", user.getLogin()) + .accept(TestUtil.APPLICATION_JSON_UTF8)) + .andExpect(status().isOk()); + + assertThat(cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).get(user.getLogin())).isNull(); + + // Validate the database is empty + List userList = userRepository.findAll(); + assertThat(userList).hasSize(databaseSizeBeforeDelete - 1); + } + + @Test + @Transactional + public void getAllAuthorities() throws Exception { + restUserMockMvc.perform(get("/api/users/authorities") + .accept(TestUtil.APPLICATION_JSON_UTF8) + .contentType(TestUtil.APPLICATION_JSON_UTF8)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) + .andExpect(jsonPath("$").isArray()) + .andExpect(jsonPath("$").value(hasItems(AuthoritiesConstants.USER, AuthoritiesConstants.ADMIN))); + } + + @Test + @Transactional + public void testUserEquals() throws Exception { + TestUtil.equalsVerifier(User.class); + User user1 = new User(); + user1.setId(1L); + User user2 = new User(); + user2.setId(user1.getId()); + assertThat(user1).isEqualTo(user2); + user2.setId(2L); + assertThat(user1).isNotEqualTo(user2); + user1.setId(null); + assertThat(user1).isNotEqualTo(user2); + } + + @Test + public void testUserFromId() { + assertThat(userMapper.userFromId(DEFAULT_ID).getId()).isEqualTo(DEFAULT_ID); + assertThat(userMapper.userFromId(null)).isNull(); + } + + @Test + public void testUserDTOtoUser() { + UserDTO userDTO = new UserDTO(); + userDTO.setId(DEFAULT_ID); + userDTO.setLogin(DEFAULT_LOGIN); + userDTO.setFirstName(DEFAULT_FIRSTNAME); + userDTO.setLastName(DEFAULT_LASTNAME); + userDTO.setEmail(DEFAULT_EMAIL); + userDTO.setActivated(true); + userDTO.setImageUrl(DEFAULT_IMAGEURL); + userDTO.setLangKey(DEFAULT_LANGKEY); + userDTO.setCreatedBy(DEFAULT_LOGIN); + userDTO.setLastModifiedBy(DEFAULT_LOGIN); + userDTO.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); + + User user = userMapper.userDTOToUser(userDTO); + assertThat(user.getId()).isEqualTo(DEFAULT_ID); + assertThat(user.getLogin()).isEqualTo(DEFAULT_LOGIN); + assertThat(user.getFirstName()).isEqualTo(DEFAULT_FIRSTNAME); + assertThat(user.getLastName()).isEqualTo(DEFAULT_LASTNAME); + assertThat(user.getEmail()).isEqualTo(DEFAULT_EMAIL); + assertThat(user.getActivated()).isEqualTo(true); + assertThat(user.getImageUrl()).isEqualTo(DEFAULT_IMAGEURL); + assertThat(user.getLangKey()).isEqualTo(DEFAULT_LANGKEY); + assertThat(user.getCreatedBy()).isNull(); + assertThat(user.getCreatedDate()).isNotNull(); + assertThat(user.getLastModifiedBy()).isNull(); + assertThat(user.getLastModifiedDate()).isNotNull(); + assertThat(user.getAuthorities()).extracting("name").containsExactly(AuthoritiesConstants.USER); + } + + @Test + public void testUserToUserDTO() { + user.setId(DEFAULT_ID); + user.setCreatedBy(DEFAULT_LOGIN); + user.setCreatedDate(Instant.now()); + user.setLastModifiedBy(DEFAULT_LOGIN); + user.setLastModifiedDate(Instant.now()); + Set authorities = new HashSet<>(); + Authority authority = new Authority(); + authority.setName(AuthoritiesConstants.USER); + authorities.add(authority); + user.setAuthorities(authorities); + + UserDTO userDTO = userMapper.userToUserDTO(user); + + assertThat(userDTO.getId()).isEqualTo(DEFAULT_ID); + assertThat(userDTO.getLogin()).isEqualTo(DEFAULT_LOGIN); + assertThat(userDTO.getFirstName()).isEqualTo(DEFAULT_FIRSTNAME); + assertThat(userDTO.getLastName()).isEqualTo(DEFAULT_LASTNAME); + assertThat(userDTO.getEmail()).isEqualTo(DEFAULT_EMAIL); + assertThat(userDTO.isActivated()).isEqualTo(true); + assertThat(userDTO.getImageUrl()).isEqualTo(DEFAULT_IMAGEURL); + assertThat(userDTO.getLangKey()).isEqualTo(DEFAULT_LANGKEY); + assertThat(userDTO.getCreatedBy()).isEqualTo(DEFAULT_LOGIN); + assertThat(userDTO.getCreatedDate()).isEqualTo(user.getCreatedDate()); + assertThat(userDTO.getLastModifiedBy()).isEqualTo(DEFAULT_LOGIN); + assertThat(userDTO.getLastModifiedDate()).isEqualTo(user.getLastModifiedDate()); + assertThat(userDTO.getAuthorities()).containsExactly(AuthoritiesConstants.USER); + assertThat(userDTO.toString()).isNotNull(); + } + + @Test + public void testAuthorityEquals() { + Authority authorityA = new Authority(); + assertThat(authorityA).isEqualTo(authorityA); + assertThat(authorityA).isNotEqualTo(null); + assertThat(authorityA).isNotEqualTo(new Object()); + assertThat(authorityA.hashCode()).isEqualTo(0); + assertThat(authorityA.toString()).isNotNull(); + + Authority authorityB = new Authority(); + assertThat(authorityA).isEqualTo(authorityB); + + authorityB.setName(AuthoritiesConstants.ADMIN); + assertThat(authorityA).isNotEqualTo(authorityB); + + authorityA.setName(AuthoritiesConstants.USER); + assertThat(authorityA).isNotEqualTo(authorityB); + + authorityB.setName(AuthoritiesConstants.USER); + assertThat(authorityA).isEqualTo(authorityB); + assertThat(authorityA.hashCode()).isEqualTo(authorityB.hashCode()); + } +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/errors/ExceptionTranslatorIntTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/errors/ExceptionTranslatorIntTest.java new file mode 100644 index 0000000000..25c5b865b7 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/errors/ExceptionTranslatorIntTest.java @@ -0,0 +1,151 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +import com.baeldung.jhipster.uaa.UaaApp; +import com.baeldung.jhipster.uaa.config.SecurityBeanOverrideConfiguration; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.http.MediaType; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +/** + * Test class for the ExceptionTranslator controller advice. + * + * @see ExceptionTranslator + */ +@RunWith(SpringRunner.class) +@SpringBootTest(classes = UaaApp.class) +public class ExceptionTranslatorIntTest { + + @Autowired + private ExceptionTranslatorTestController controller; + + @Autowired + private ExceptionTranslator exceptionTranslator; + + @Autowired + private MappingJackson2HttpMessageConverter jacksonMessageConverter; + + private MockMvc mockMvc; + + @Before + public void setup() { + mockMvc = MockMvcBuilders.standaloneSetup(controller) + .setControllerAdvice(exceptionTranslator) + .setMessageConverters(jacksonMessageConverter) + .build(); + } + + @Test + public void testConcurrencyFailure() throws Exception { + mockMvc.perform(get("/test/concurrency-failure")) + .andExpect(status().isConflict()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_CONCURRENCY_FAILURE)); + } + + @Test + public void testMethodArgumentNotValid() throws Exception { + mockMvc.perform(post("/test/method-argument").content("{}").contentType(MediaType.APPLICATION_JSON)) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_VALIDATION)) + .andExpect(jsonPath("$.fieldErrors.[0].objectName").value("testDTO")) + .andExpect(jsonPath("$.fieldErrors.[0].field").value("test")) + .andExpect(jsonPath("$.fieldErrors.[0].message").value("NotNull")); + } + + @Test + public void testParameterizedError() throws Exception { + mockMvc.perform(get("/test/parameterized-error")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("test parameterized error")) + .andExpect(jsonPath("$.params.param0").value("param0_value")) + .andExpect(jsonPath("$.params.param1").value("param1_value")); + } + + @Test + public void testParameterizedError2() throws Exception { + mockMvc.perform(get("/test/parameterized-error2")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("test parameterized error")) + .andExpect(jsonPath("$.params.foo").value("foo_value")) + .andExpect(jsonPath("$.params.bar").value("bar_value")); + } + + @Test + public void testMissingServletRequestPartException() throws Exception { + mockMvc.perform(get("/test/missing-servlet-request-part")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.400")); + } + + @Test + public void testMissingServletRequestParameterException() throws Exception { + mockMvc.perform(get("/test/missing-servlet-request-parameter")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.400")); + } + + @Test + public void testAccessDenied() throws Exception { + mockMvc.perform(get("/test/access-denied")) + .andExpect(status().isForbidden()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.403")) + .andExpect(jsonPath("$.detail").value("test access denied!")); + } + + @Test + public void testUnauthorized() throws Exception { + mockMvc.perform(get("/test/unauthorized")) + .andExpect(status().isUnauthorized()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.401")) + .andExpect(jsonPath("$.path").value("/test/unauthorized")) + .andExpect(jsonPath("$.detail").value("test authentication failed!")); + } + + @Test + public void testMethodNotSupported() throws Exception { + mockMvc.perform(post("/test/access-denied")) + .andExpect(status().isMethodNotAllowed()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.405")) + .andExpect(jsonPath("$.detail").value("Request method 'POST' not supported")); + } + + @Test + public void testExceptionWithResponseStatus() throws Exception { + mockMvc.perform(get("/test/response-status")) + .andExpect(status().isBadRequest()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.400")) + .andExpect(jsonPath("$.title").value("test response status")); + } + + @Test + public void testInternalServerError() throws Exception { + mockMvc.perform(get("/test/internal-server-error")) + .andExpect(status().isInternalServerError()) + .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) + .andExpect(jsonPath("$.message").value("error.http.500")) + .andExpect(jsonPath("$.title").value("Internal Server Error")); + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/errors/ExceptionTranslatorTestController.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/errors/ExceptionTranslatorTestController.java new file mode 100644 index 0000000000..0ea0445563 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/errors/ExceptionTranslatorTestController.java @@ -0,0 +1,86 @@ +package com.baeldung.jhipster.uaa.web.rest.errors; + +import org.springframework.dao.ConcurrencyFailureException; +import org.springframework.http.HttpStatus; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import java.util.HashMap; +import java.util.Map; + +@RestController +public class ExceptionTranslatorTestController { + + @GetMapping("/test/concurrency-failure") + public void concurrencyFailure() { + throw new ConcurrencyFailureException("test concurrency failure"); + } + + @PostMapping("/test/method-argument") + public void methodArgument(@Valid @RequestBody TestDTO testDTO) { + } + + @GetMapping("/test/parameterized-error") + public void parameterizedError() { + throw new CustomParameterizedException("test parameterized error", "param0_value", "param1_value"); + } + + @GetMapping("/test/parameterized-error2") + public void parameterizedError2() { + Map params = new HashMap<>(); + params.put("foo", "foo_value"); + params.put("bar", "bar_value"); + throw new CustomParameterizedException("test parameterized error", params); + } + + @GetMapping("/test/missing-servlet-request-part") + public void missingServletRequestPartException(@RequestPart String part) { + } + + @GetMapping("/test/missing-servlet-request-parameter") + public void missingServletRequestParameterException(@RequestParam String param) { + } + + @GetMapping("/test/access-denied") + public void accessdenied() { + throw new AccessDeniedException("test access denied!"); + } + + @GetMapping("/test/unauthorized") + public void unauthorized() { + throw new BadCredentialsException("test authentication failed!"); + } + + @GetMapping("/test/response-status") + public void exceptionWithReponseStatus() { + throw new TestResponseStatusException(); + } + + @GetMapping("/test/internal-server-error") + public void internalServerError() { + throw new RuntimeException(); + } + + public static class TestDTO { + + @NotNull + private String test; + + public String getTest() { + return test; + } + + public void setTest(String test) { + this.test = test; + } + } + + @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status") + @SuppressWarnings("serial") + public static class TestResponseStatusException extends RuntimeException { + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/util/PaginationUtilUnitTest.java b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/util/PaginationUtilUnitTest.java new file mode 100644 index 0000000000..998a1da0cf --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/java/com/baeldung/jhipster/uaa/web/rest/util/PaginationUtilUnitTest.java @@ -0,0 +1,44 @@ +package com.baeldung.jhipster.uaa.web.rest.util; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.HttpHeaders; + +/** + * Tests based on parsing algorithm in app/components/util/pagination-util.service.js + * + * @see PaginationUtil + */ +public class PaginationUtilUnitTest { + + @Test + public void generatePaginationHttpHeadersTest() { + String baseUrl = "/api/_search/example"; + List content = new ArrayList<>(); + Page page = new PageImpl<>(content, PageRequest.of(6, 50), 400L); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, baseUrl); + List strHeaders = headers.get(HttpHeaders.LINK); + assertNotNull(strHeaders); + assertTrue(strHeaders.size() == 1); + String headerData = strHeaders.get(0); + assertTrue(headerData.split(",").length == 4); + String expectedData = "; rel=\"next\"," + + "; rel=\"prev\"," + + "; rel=\"last\"," + + "; rel=\"first\""; + assertEquals(expectedData, headerData); + List xTotalCountHeaders = headers.get("X-Total-Count"); + assertTrue(xTotalCountHeaders.size() == 1); + assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L)); + } + +} diff --git a/jhipster/jhipster-uaa/uaa/src/test/resources/config/application.yml b/jhipster/jhipster-uaa/uaa/src/test/resources/config/application.yml new file mode 100644 index 0000000000..d5389ee223 --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/resources/config/application.yml @@ -0,0 +1,120 @@ +# =================================================================== +# Spring Boot configuration. +# +# This configuration is used for unit/integration tests. +# +# More information on profiles: https://www.jhipster.tech/profiles/ +# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# =================================================================== +# Standard Spring Boot properties. +# Full reference is available at: +# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html +# =================================================================== + +eureka: + client: + enabled: false + instance: + appname: uaa + instanceId: uaa:${spring.application.instance-id:${random.value}} + +spring: + application: + name: uaa + cache: + type: simple + datasource: + type: com.zaxxer.hikari.HikariDataSource + url: jdbc:h2:mem:uaa;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE + name: + username: + password: + hikari: + auto-commit: false + jpa: + database-platform: io.github.jhipster.domain.util.FixedH2Dialect + database: H2 + open-in-view: false + show-sql: false + hibernate: + ddl-auto: none + naming: + physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy + implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy + properties: + hibernate.id.new_generator_mappings: true + hibernate.connection.provider_disables_autocommit: true + hibernate.cache.use_second_level_cache: false + hibernate.cache.use_query_cache: false + hibernate.generate_statistics: true + hibernate.hbm2ddl.auto: validate + liquibase: + contexts: test + mail: + host: localhost + messages: + basename: i18n/messages + mvc: + favicon: + enabled: false + thymeleaf: + mode: HTML + + +server: + port: 10344 + address: localhost + +info: + project: + version: #project.version# + +# =================================================================== +# JHipster specific properties +# +# Full reference is available at: https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +jhipster: + async: + core-pool-size: 1 + max-pool-size: 50 + queue-capacity: 10000 + # To test logstash appender + logging: + logstash: + enabled: true + host: localhost + port: 5000 + queue-size: 512 + mail: + from: test@localhost + base-url: http://127.0.0.1:8080 + security: + authentication: + jwt: + # This token must be encoded using Base64 (you can type `echo 'secret-key'|base64` on your command line) + base64-secret: ZTljMjA0NzA0OWE0MTVhM2Y2MjJkNzg2MzU4NDFhYTZhM2JlOGY4MmM0Y2M4ZTQ3NzdkNjVjZmJkMTFhOGU2MmY3MWMzNDg4OGY2OWI2Zjc4NTFhNDVkOTZlMDVhNzFkNDUyZjMzNDYxNGY5NWNmYTI4NzA2NzRkYzQ4Y2ZiZjU= + # Token is valid 24 hours + token-validity-in-seconds: 86400 + client-authorization: + client-id: internal + client-secret: internal + metrics: # DropWizard Metrics configuration, used by MetricsConfiguration + jmx.enabled: true + logs: # Reports Dropwizard metrics in the logs + enabled: true + report-frequency: 60 # in seconds + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the ApplicationProperties class +# to have type-safe configuration, like in the JHipsterProperties above +# +# More documentation is available at: +# https://www.jhipster.tech/common-application-properties/ +# =================================================================== + +# application: diff --git a/jhipster/jhipster-uaa/uaa/src/test/resources/config/bootstrap.yml b/jhipster/jhipster-uaa/uaa/src/test/resources/config/bootstrap.yml new file mode 100644 index 0000000000..11cd6af21c --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/resources/config/bootstrap.yml @@ -0,0 +1,4 @@ +spring: + cloud: + config: + enabled: false diff --git a/jhipster/jhipster-uaa/uaa/src/test/resources/i18n/messages_en.properties b/jhipster/jhipster-uaa/uaa/src/test/resources/i18n/messages_en.properties new file mode 100644 index 0000000000..f19db8692f --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/resources/i18n/messages_en.properties @@ -0,0 +1 @@ +email.test.title=test title diff --git a/jhipster/jhipster-uaa/uaa/src/test/resources/logback.xml b/jhipster/jhipster-uaa/uaa/src/test/resources/logback.xml new file mode 100644 index 0000000000..4d3a18bcba --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/resources/logback.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jhipster/jhipster-uaa/uaa/src/test/resources/templates/mail/testEmail.html b/jhipster/jhipster-uaa/uaa/src/test/resources/templates/mail/testEmail.html new file mode 100644 index 0000000000..a4ca16a79f --- /dev/null +++ b/jhipster/jhipster-uaa/uaa/src/test/resources/templates/mail/testEmail.html @@ -0,0 +1 @@ + diff --git a/jib/README.md b/jib/README.md new file mode 100644 index 0000000000..82bd2fed42 --- /dev/null +++ b/jib/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Dockerizing Java Apps using Jib](https://www.baeldung.com/jib-dockerizing) diff --git a/json/README.md b/json/README.md index e0679bc60b..2e253a4ae9 100644 --- a/json/README.md +++ b/json/README.md @@ -9,4 +9,5 @@ - [Introduction to JsonPath](http://www.baeldung.com/guide-to-jayway-jsonpath) - [Introduction to JSON-Java (org.json)](http://www.baeldung.com/java-org-json) - [Overview of JSON Pointer](https://www.baeldung.com/json-pointer) -- [Introduction to the JSON Binding API (JSR 367) in Java](http://www.baeldung.com/java-json-binding-api) \ No newline at end of file +- [Introduction to the JSON Binding API (JSR 367) in Java](http://www.baeldung.com/java-json-binding-api) +- [Get a Value by Key in a JSONArray](https://www.baeldung.com/java-jsonarray-get-value-by-key) diff --git a/jta/src/main/java/com/baeldung/jtademo/services/TellerService.java b/jta/src/main/java/com/baeldung/jtademo/services/TellerService.java index d3bd80a2ee..f79238e66a 100644 --- a/jta/src/main/java/com/baeldung/jtademo/services/TellerService.java +++ b/jta/src/main/java/com/baeldung/jtademo/services/TellerService.java @@ -25,7 +25,7 @@ public class TellerService { bankAccountService.transfer(fromAccontId, toAccountId, amount); auditService.log(fromAccontId, toAccountId, amount); BigDecimal balance = bankAccountService.balanceOf(fromAccontId); - if (balance.compareTo(BigDecimal.ZERO) <= 0) { + if (balance.compareTo(BigDecimal.ZERO) < 0) { throw new RuntimeException("Insufficient fund."); } } @@ -35,7 +35,7 @@ public class TellerService { bankAccountService.transfer(fromAccontId, toAccountId, amount); auditService.log(fromAccontId, toAccountId, amount); BigDecimal balance = bankAccountService.balanceOf(fromAccontId); - if (balance.compareTo(BigDecimal.ZERO) <= 0) { + if (balance.compareTo(BigDecimal.ZERO) < 0) { userTransaction.rollback(); throw new RuntimeException("Insufficient fund."); } else { diff --git a/kotlin-libraries/README.md b/kotlin-libraries/README.md index 30c4d03ded..b9611043c8 100644 --- a/kotlin-libraries/README.md +++ b/kotlin-libraries/README.md @@ -7,3 +7,4 @@ - [Processing JSON with Kotlin and Klaxson](http://www.baeldung.com/kotlin-json-klaxson) - [Kotlin with Ktor](http://www.baeldung.com/kotlin-ktor) - [Guide to the Kotlin Exposed Framework](https://www.baeldung.com/kotlin-exposed-persistence) +- [Working with Dates in Kotlin](https://www.baeldung.com/kotlin-dates) diff --git a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/CreateDateUnitTest.kt b/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/CreateDateUnitTest.kt new file mode 100644 index 0000000000..d52a2f0f19 --- /dev/null +++ b/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/CreateDateUnitTest.kt @@ -0,0 +1,34 @@ +package com.baeldung.kotlin.dates + +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class CreateDateUnitTest { + + @Test + fun givenString_whenDefaultFormat_thenCreated() { + + var date = LocalDate.parse("2018-12-31") + + assertThat(date).isEqualTo("2018-12-31") + } + + @Test + fun givenString_whenCustomFormat_thenCreated() { + + var formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy") + var date = LocalDate.parse("31-12-2018", formatter) + + assertThat(date).isEqualTo("2018-12-31") + } + + @Test + fun givenYMD_whenUsingOf_thenCreated() { + var date = LocalDate.of(2018, 12, 31) + + assertThat(date).isEqualTo("2018-12-31") + } + +} \ No newline at end of file diff --git a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/ExtractDateUnitTest.kt b/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/ExtractDateUnitTest.kt new file mode 100644 index 0000000000..ef3841752b --- /dev/null +++ b/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/ExtractDateUnitTest.kt @@ -0,0 +1,29 @@ +package com.baeldung.kotlin.dates + +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import java.time.DayOfWeek +import java.time.LocalDate +import java.time.Month + +class ExtractDateUnitTest { + + @Test + fun givenDate_thenExtractedYMD() { + var date = LocalDate.parse("2018-12-31") + + assertThat(date.year).isEqualTo(2018) + assertThat(date.month).isEqualTo(Month.DECEMBER) + assertThat(date.dayOfMonth).isEqualTo(31) + } + + @Test + fun givenDate_thenExtractedEraDowDoy() { + var date = LocalDate.parse("2018-12-31") + + assertThat(date.era.toString()).isEqualTo("CE") + assertThat(date.dayOfWeek).isEqualTo(DayOfWeek.MONDAY) + assertThat(date.dayOfYear).isEqualTo(365) + } + +} \ No newline at end of file diff --git a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/FormatDateUnitTest.kt b/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/FormatDateUnitTest.kt new file mode 100644 index 0000000000..11ff6ec9f0 --- /dev/null +++ b/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/FormatDateUnitTest.kt @@ -0,0 +1,29 @@ +package com.baeldung.kotlin.dates + +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class FormatDateUnitTest { + + @Test + fun givenDate_whenDefaultFormat_thenFormattedString() { + + var date = LocalDate.parse("2018-12-31") + + assertThat(date.toString()).isEqualTo("2018-12-31") + } + + @Test + fun givenDate_whenCustomFormat_thenFormattedString() { + + var date = LocalDate.parse("2018-12-31") + + var formatter = DateTimeFormatter.ofPattern("dd-MMMM-yyyy") + var formattedDate = date.format(formatter) + + assertThat(formattedDate).isEqualTo("31-December-2018") + } + +} \ No newline at end of file diff --git a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/PeriodDateUnitTest.kt b/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/PeriodDateUnitTest.kt new file mode 100644 index 0000000000..e6b66634d3 --- /dev/null +++ b/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/PeriodDateUnitTest.kt @@ -0,0 +1,48 @@ +package com.baeldung.kotlin.dates + +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import java.time.LocalDate +import java.time.Period + +class PeriodDateUnitTest { + + @Test + fun givenYMD_thenCreatePeriod() { + var period = Period.of(1, 2, 3) + + assertThat(period.toString()).isEqualTo("P1Y2M3D") + } + + @Test + fun givenPeriod_whenAdd_thenModifiedDate() { + var period = Period.of(1, 2, 3) + + var date = LocalDate.of(2018, 6, 25) + var modifiedDate = date.plus(period) + + assertThat(modifiedDate).isEqualTo("2019-08-28") + } + + @Test + fun givenPeriod_whenSubtracted_thenModifiedDate() { + var period = Period.of(1, 2, 3) + + var date = LocalDate.of(2018, 6, 25) + var modifiedDate = date.minus(period) + + assertThat(modifiedDate).isEqualTo("2017-04-22") + } + + @Test + fun givenTwoDate_whenUsingBetween_thenDiffOfDates() { + + var date1 = LocalDate.parse("2018-06-25") + var date2 = LocalDate.parse("2018-12-25") + + var period = Period.between(date1, date2) + + assertThat(period.toString()).isEqualTo("P6M") + } + +} \ No newline at end of file diff --git a/libraries-data/README.md b/libraries-data/README.md index 63ee5f9947..7e40a4a2e2 100644 --- a/libraries-data/README.md +++ b/libraries-data/README.md @@ -12,3 +12,5 @@ - [Guide to JMapper](https://www.baeldung.com/jmapper) - [A Guide to Apache Crunch](https://www.baeldung.com/apache-crunch) - [Building a Data Pipeline with Flink and Kafka](https://www.baeldung.com/kafka-flink-data-pipeline) +- [Intro to Apache Storm](https://www.baeldung.com/apache-storm) +- [Guide to Ebean ORM](https://www.baeldung.com/ebean-orm) diff --git a/libraries/README.md b/libraries/README.md index fcf687d806..851e3a3d17 100644 --- a/libraries/README.md +++ b/libraries/README.md @@ -83,6 +83,7 @@ - [Guide to JMapper](http://www.baeldung.com/jmapper) - [An Introduction to Apache Commons Lang 3](https://www.baeldung.com/java-commons-lang-3) - [Exactly Once Processing in Kafka](https://www.baeldung.com/kafka-exactly-once) +- [An Introduction to SuanShu](https://www.baeldung.com/suanshu) The libraries module contains examples related to small libraries that are relatively easy to use and does not require any separate module of its own. diff --git a/lombok/README.md b/lombok/README.md index 34ec569e89..bd6282fd18 100644 --- a/lombok/README.md +++ b/lombok/README.md @@ -4,4 +4,4 @@ - [Using Lombok’s @Getter for Boolean Fields](https://www.baeldung.com/lombok-getter-boolean) - [Lombok @Builder with Inheritance](https://www.baeldung.com/lombok-builder-inheritance) - [Lombok Builder with Default Value](https://www.baeldung.com/lombok-builder-default-value) -- [Lombok Builder with Custom Setter](https://www.baeldung.com/lombok-builder-with-custom-setter) +- [Lombok Builder with Custom Setter](https://www.baeldung.com/lombok-builder-custom-setter) diff --git a/maven/README.md b/maven/README.md index 970250d142..1c0e50f95a 100644 --- a/maven/README.md +++ b/maven/README.md @@ -13,3 +13,4 @@ - [Apache Maven Standard Directory Layout](https://www.baeldung.com/maven-directory-structure) - [Apache Maven Tutorial](https://www.baeldung.com/maven) - [Use the Latest Version of a Dependency in Maven](https://www.baeldung.com/maven-dependency-latest-version) +- [Multi-Module Project with Maven](https://www.baeldung.com/maven-multi-module) diff --git a/parent-boot-2/pom.xml b/parent-boot-2/pom.xml index 47d382f58d..bb89cb2729 100644 --- a/parent-boot-2/pom.xml +++ b/parent-boot-2/pom.xml @@ -77,6 +77,7 @@ 3.1.0 1.0.11.RELEASE - 2.0.5.RELEASE + 2.1.0.RELEASE + 2.1.0.RELEASE
diff --git a/parent-kotlin/pom.xml b/parent-kotlin/pom.xml index 0a04da7dc2..f8283bd920 100644 --- a/parent-kotlin/pom.xml +++ b/parent-kotlin/pom.xml @@ -13,29 +13,29 @@ 1.0.0-SNAPSHOT - - - jcenter - http://jcenter.bintray.com - - - kotlin-ktor - https://dl.bintray.com/kotlin/ktor/ - - - kotlin-eap - http://dl.bintray.com/kotlin/kotlin-eap - - - - + + + jcenter + http://jcenter.bintray.com + + + kotlin-ktor + https://dl.bintray.com/kotlin/ktor/ + + + kotlin-eap + http://dl.bintray.com/kotlin/kotlin-eap + + + + kotlin-eap - http://dl.bintray.com/kotlin/kotlin-eap + http://dl.bintray.com/kotlin/kotlin-eap - - + + org.springframework.boot @@ -202,9 +202,9 @@ - 1.3.0-rc-146 - 0.26.1-eap13 - 0.9.3 + 1.3.0 + 1.0.0 + 0.9.5 3.11.0 1.2.0 diff --git a/performance-tests/src/test/java/com/baeldung/performancetests/benchmark/MappingFrameworksPerformance.java b/performance-tests/src/test/java/com/baeldung/performancetests/benchmark/MappingFrameworksPerformance.java index e781f1fca1..1c9e4c5dc4 100644 --- a/performance-tests/src/test/java/com/baeldung/performancetests/benchmark/MappingFrameworksPerformance.java +++ b/performance-tests/src/test/java/com/baeldung/performancetests/benchmark/MappingFrameworksPerformance.java @@ -97,7 +97,7 @@ public class MappingFrameworksPerformance { sourceCode = new SourceCode("This is source code!"); } - public void main(String[] args) throws IOException, RunnerException { + public static void main(String[] args) throws IOException, RunnerException { org.openjdk.jmh.Main.main(args); } diff --git a/persistence-modules/hibernate5/README.md b/persistence-modules/hibernate5/README.md index 7f52531076..a94379b5cb 100644 --- a/persistence-modules/hibernate5/README.md +++ b/persistence-modules/hibernate5/README.md @@ -18,3 +18,4 @@ - [@JoinColumn Annotation Explained](https://www.baeldung.com/jpa-join-column) - [Hibernate 5 Naming Strategy Configuration](https://www.baeldung.com/hibernate-naming-strategy) - [Proxy in Hibernate load() Method](https://www.baeldung.com/hibernate-proxy-load-method) +- [Custom Types in Hibernate](https://www.baeldung.com/hibernate-custom-types) diff --git a/persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/entities/DeptEmployee.java b/persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/entities/DeptEmployee.java index 7a51009b62..27fff147b6 100644 --- a/persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/entities/DeptEmployee.java +++ b/persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/entities/DeptEmployee.java @@ -22,6 +22,14 @@ public class DeptEmployee { this.employeeNumber = employeeNumber; this.department = department; } + + public DeptEmployee(String name, String employeeNumber, String designation, Department department) { + super(); + this.name = name; + this.employeeNumber = employeeNumber; + this.designation = designation; + this.department = department; + } public long getId() { return id; diff --git a/persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/jpacriteriabuilder/service/EmployeeSearchService.java b/persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/jpacriteriabuilder/service/EmployeeSearchService.java new file mode 100644 index 0000000000..85cdffd54d --- /dev/null +++ b/persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/jpacriteriabuilder/service/EmployeeSearchService.java @@ -0,0 +1,15 @@ +package com.baeldung.hibernate.jpacriteriabuilder.service; + +import java.util.List; + +import com.baeldung.hibernate.entities.DeptEmployee; + +public interface EmployeeSearchService { + + List filterbyDesignationUsingCriteriaBuilder(List designaitons); + + List filterbyDesignationUsingExpression(List aurhors); + + List searchByDepartmentQuery(String query); + +} diff --git a/persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/jpacriteriabuilder/service/EmployeeSearchServiceImpl.java b/persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/jpacriteriabuilder/service/EmployeeSearchServiceImpl.java new file mode 100644 index 0000000000..a9981b8066 --- /dev/null +++ b/persistence-modules/hibernate5/src/main/java/com/baeldung/hibernate/jpacriteriabuilder/service/EmployeeSearchServiceImpl.java @@ -0,0 +1,77 @@ +package com.baeldung.hibernate.jpacriteriabuilder.service; + +import java.util.List; + +import javax.persistence.EntityManager; +import javax.persistence.TypedQuery; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaBuilder.In; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Root; +import javax.persistence.criteria.Subquery; + +import com.baeldung.hibernate.entities.Department; +import com.baeldung.hibernate.entities.DeptEmployee; + +public class EmployeeSearchServiceImpl implements EmployeeSearchService { + + private EntityManager entityManager; + private CriteriaBuilder criteriaBuilder; + + public EmployeeSearchServiceImpl(EntityManager entityManager) { + this.entityManager = entityManager; + this.criteriaBuilder = entityManager.getCriteriaBuilder(); + + } + + @Override + public List filterbyDesignationUsingCriteriaBuilder(List designations) { + CriteriaQuery criteriaQuery = createCriteriaQuery(DeptEmployee.class); + Root root = criteriaQuery.from(DeptEmployee.class); + In inClause = criteriaBuilder.in(root.get("designation")); + for (String designaiton : designations) { + inClause.value(designaiton); + } + criteriaQuery.select(root) + .where(inClause); + TypedQuery query = entityManager.createQuery(criteriaQuery); + return query.getResultList(); + } + + @Override + public List filterbyDesignationUsingExpression(List designations) { + CriteriaQuery criteriaQuery = createCriteriaQuery(DeptEmployee.class); + Root root = criteriaQuery.from(DeptEmployee.class); + criteriaQuery.select(root) + .where(root.get("designation") + .in(designations)); + TypedQuery query = entityManager.createQuery(criteriaQuery); + return query.getResultList(); + } + + @Override + public List searchByDepartmentQuery(String searchKey) { + CriteriaQuery criteriaQuery = createCriteriaQuery(DeptEmployee.class); + Root emp = criteriaQuery.from(DeptEmployee.class); + + Subquery subquery = criteriaQuery.subquery(Department.class); + Root dept = subquery.from(Department.class); + subquery.select(dept) + .distinct(true) + .where(criteriaBuilder.like(dept.get("name"), new StringBuffer("%").append(searchKey) + .append("%") + .toString())); + + criteriaQuery.select(emp) + .where(criteriaBuilder.in(emp.get("department")) + .value(subquery)); + + TypedQuery query = entityManager.createQuery(criteriaQuery); + return query.getResultList(); + } + + private CriteriaQuery createCriteriaQuery(Class klass) { + return criteriaBuilder.createQuery(klass); + } + +} diff --git a/persistence-modules/hibernate5/src/test/java/com/baeldung/hibernate/jpacriteriabuilder/EmployeeSearchServiceIntegrationTest.java b/persistence-modules/hibernate5/src/test/java/com/baeldung/hibernate/jpacriteriabuilder/EmployeeSearchServiceIntegrationTest.java new file mode 100644 index 0000000000..c7a1bc7b2a --- /dev/null +++ b/persistence-modules/hibernate5/src/test/java/com/baeldung/hibernate/jpacriteriabuilder/EmployeeSearchServiceIntegrationTest.java @@ -0,0 +1,122 @@ +package com.baeldung.hibernate.jpacriteriabuilder; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder; +import static org.junit.Assert.assertEquals; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import javax.persistence.EntityManager; + +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import com.baeldung.hibernate.HibernateUtil; +import com.baeldung.hibernate.entities.Department; +import com.baeldung.hibernate.entities.DeptEmployee; +import com.baeldung.hibernate.jpacriteriabuilder.service.EmployeeSearchService; +import com.baeldung.hibernate.jpacriteriabuilder.service.EmployeeSearchServiceImpl; + +public class EmployeeSearchServiceIntegrationTest { + + private EntityManager entityManager; + private EmployeeSearchService searchService; + private Session session; + + @Before + public final void setup() throws HibernateException, IOException { + session = HibernateUtil.getSessionFactory() + .openSession(); + entityManager = session.getEntityManagerFactory() + .createEntityManager(); + searchService = new EmployeeSearchServiceImpl(entityManager); + + entityManager.getTransaction() + .begin(); + Department department = new Department("Pre Sales"); + DeptEmployee employee = new DeptEmployee("John Smith", "001", "Manager", department); + entityManager.persist(department); + entityManager.persist(employee); + employee = new DeptEmployee("Ian Evans", "002", "Associate", department); + entityManager.persist(department); + entityManager.persist(employee); + department = new Department("Copporate Sales"); + employee = new DeptEmployee("Robert Carter", "003", "Manager", department); + entityManager.persist(department); + entityManager.persist(employee); + employee = new DeptEmployee("John Carter", "004", "Senior Manager", department); + entityManager.persist(employee); + employee = new DeptEmployee("David Guetta", "009", "Associate", department); + entityManager.persist(department); + entityManager.persist(employee); + department = new Department("Post Sales"); + employee = new DeptEmployee("Robert Jonas", "005", "Director", department); + entityManager.persist(department); + entityManager.persist(employee); + employee = new DeptEmployee("John Ferros", "006", "Junior Associate", department); + entityManager.persist(department); + entityManager.persist(employee); + department = new Department("Client Support"); + employee = new DeptEmployee("Robert Mcclements", "007", "Director", department); + entityManager.persist(department); + entityManager.persist(employee); + employee = new DeptEmployee("Peter Parker", "008", "Manager", department); + entityManager.persist(department); + entityManager.persist(employee); + + } + + @After + public final void teardown() { + entityManager.getTransaction() + .rollback(); + entityManager.close(); + } + + @Test + public final void givenCriteriaQuery_whenSearchedUsingCriteriaBuilderWithListofAuthors_thenResultIsFilteredByAuthorNames() { + List designations = new ArrayList() { + { + add("Manager"); + add("Senior Manager"); + add("Director"); + } + }; + List result = searchService.filterbyDesignationUsingCriteriaBuilder(designations); + assertEquals("Number of Employees does not match with expected.", 6, result.size()); + assertThat(result.stream() + .map(DeptEmployee::getDesignation) + .distinct() + .collect(Collectors.toList()), containsInAnyOrder(designations.toArray())); + } + + @Test + public final void givenCriteriaQuery_whenSearchedUsingExpressionWithListofAuthors_thenResultIsFilteredByAuthorNames() { + List designations = new ArrayList() { + { + add("Manager"); + add("Senior Manager"); + add("Director"); + } + }; + List result = searchService.filterbyDesignationUsingExpression(designations); + assertEquals("Number of Employees does not match with expected.", 6, result.size()); + assertThat(result.stream() + .map(DeptEmployee::getDesignation) + .distinct() + .collect(Collectors.toList()), containsInAnyOrder(designations.toArray())); + } + + @Test + public final void givenCriteriaQuery_whenSearchedDepartmentLike_thenResultIsFilteredByDepartment() { + List result = searchService.searchByDepartmentQuery("Sales"); + assertEquals("Number of Employees does not match with expected.", 7, result.size()); + // assertThat(result.stream().map(DeptEmployee::getDesignation).distinct().collect(Collectors.toList()), containsInAnyOrder(designations.toArray())); + } +} diff --git a/persistence-modules/java-jpa/src/main/java/com/baeldung/jpa/stringcast/DummyEntity.java b/persistence-modules/java-jpa/src/main/java/com/baeldung/jpa/stringcast/DummyEntity.java new file mode 100644 index 0000000000..12b57ff112 --- /dev/null +++ b/persistence-modules/java-jpa/src/main/java/com/baeldung/jpa/stringcast/DummyEntity.java @@ -0,0 +1,44 @@ +package com.baeldung.jpa.stringcast; + +import javax.persistence.*; + +@SqlResultSetMapping(name = "textQueryMapping", classes = { + @ConstructorResult(targetClass = DummyEntity.class, columns = { + @ColumnResult(name = "text") + }) +}) +@Entity +@Table(name = "dummy") +public class DummyEntity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String text; + + public DummyEntity() { + + } + + public DummyEntity(String text) { + this.text = text; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + +} diff --git a/persistence-modules/java-jpa/src/main/java/com/baeldung/jpa/stringcast/QueryExecutor.java b/persistence-modules/java-jpa/src/main/java/com/baeldung/jpa/stringcast/QueryExecutor.java new file mode 100644 index 0000000000..6f1e2ee5ca --- /dev/null +++ b/persistence-modules/java-jpa/src/main/java/com/baeldung/jpa/stringcast/QueryExecutor.java @@ -0,0 +1,41 @@ +package com.baeldung.jpa.stringcast; + +import com.sun.istack.internal.Nullable; + +import javax.persistence.EntityManager; +import javax.persistence.Query; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +public class QueryExecutor { + + public static List executeNativeQueryNoCastCheck(String statement, EntityManager em) { + Query query = em.createNativeQuery(statement); + return query.getResultList(); + } + + public static List executeNativeQueryWithCastCheck(String statement, EntityManager em) { + Query query = em.createNativeQuery(statement); + List results = query.getResultList(); + + if (results.isEmpty()) { + return new ArrayList<>(); + } + + if (results.get(0) instanceof String) { + return ((List) results) + .stream() + .map(s -> new String[] { s }) + .collect(Collectors.toList()); + } else { + return (List) results; + } + } + + public static List executeNativeQueryGeneric(String statement, String mapping, EntityManager em) { + Query query = em.createNativeQuery(statement, mapping); + return query.getResultList(); + } + +} diff --git a/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml b/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml index 3d881673b2..6345e7f364 100644 --- a/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml +++ b/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml @@ -20,6 +20,21 @@ + + + org.hibernate.jpa.HibernatePersistenceProvider + com.baeldung.jpa.stringcast.DummyEntity + + + + + + + + + + + org.hibernate.jpa.HibernatePersistenceProvider diff --git a/persistence-modules/java-jpa/src/test/java/com/baeldung/jpa/stringcast/SpringCastUnitTest.java b/persistence-modules/java-jpa/src/test/java/com/baeldung/jpa/stringcast/SpringCastUnitTest.java new file mode 100644 index 0000000000..d9c3adef26 --- /dev/null +++ b/persistence-modules/java-jpa/src/test/java/com/baeldung/jpa/stringcast/SpringCastUnitTest.java @@ -0,0 +1,56 @@ +package com.baeldung.jpa.stringcast; + +import org.junit.BeforeClass; +import org.junit.Test; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.EntityTransaction; +import javax.persistence.Persistence; +import java.util.List; + +import static org.junit.Assert.assertEquals; + +public class SpringCastUnitTest { + + private static EntityManager em; + private static EntityManagerFactory emFactory; + + @BeforeClass + public static void setup() { + emFactory = Persistence.createEntityManagerFactory("jpa-h2"); + em = emFactory.createEntityManager(); + + // insert an object into the db + DummyEntity dummyEntity = new DummyEntity(); + dummyEntity.setText("text"); + + EntityTransaction tr = em.getTransaction(); + tr.begin(); + em.persist(dummyEntity); + tr.commit(); + } + + @Test(expected = ClassCastException.class) + public void givenExecutorNoCastCheck_whenQueryReturnsOneColumn_thenClassCastThrown() { + List results = QueryExecutor.executeNativeQueryNoCastCheck("select text from dummy", em); + + // fails + for (String[] row : results) { + // do nothing + } + } + + @Test + public void givenExecutorWithCastCheck_whenQueryReturnsOneColumn_thenNoClassCastThrown() { + List results = QueryExecutor.executeNativeQueryWithCastCheck("select text from dummy", em); + assertEquals("text", results.get(0)[0]); + } + + @Test + public void givenExecutorGeneric_whenQueryReturnsOneColumn_thenNoClassCastThrown() { + List results = QueryExecutor.executeNativeQueryGeneric("select text from dummy", "textQueryMapping", em); + assertEquals("text", results.get(0).getText()); + } + +} diff --git a/persistence-modules/java-jpa/src/test/resources/persistence.xml b/persistence-modules/java-jpa/src/test/resources/persistence.xml index d94221b54f..b6cc51c3b3 100644 --- a/persistence-modules/java-jpa/src/test/resources/persistence.xml +++ b/persistence-modules/java-jpa/src/test/resources/persistence.xml @@ -17,5 +17,21 @@ + + + org.hibernate.jpa.HibernatePersistenceProvider + com.baeldung.jpa.stringcast.DummyEntity + + + + + + + + + + + + diff --git a/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/CustomPassengerRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/CustomPassengerRepository.java new file mode 100644 index 0000000000..e9b5ba272f --- /dev/null +++ b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/CustomPassengerRepository.java @@ -0,0 +1,8 @@ +package com.baeldung.limit; + +import java.util.List; + +interface CustomPassengerRepository { + + List findOrderedBySeatNumberLimitedTo(int limit); +} diff --git a/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/Passenger.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/Passenger.java new file mode 100644 index 0000000000..e7eb3af10b --- /dev/null +++ b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/Passenger.java @@ -0,0 +1,82 @@ +package com.baeldung.limit; + +import javax.persistence.Basic; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import java.util.Objects; + +@Entity +class Passenger { + + @Id + @GeneratedValue + @Column(nullable = false) + private Long id; + + @Basic(optional = false) + @Column(nullable = false) + private String fistName; + + @Basic(optional = false) + @Column(nullable = false) + private String lastName; + + @Basic(optional = false) + @Column(nullable = false) + private int seatNumber; + + private Passenger(String fistName, String lastName, int seatNumber) { + this.fistName = fistName; + this.lastName = lastName; + this.seatNumber = seatNumber; + } + + static Passenger from(String firstName, String lastName, int seatNumber) { + return new Passenger(firstName, lastName, seatNumber); + } + + @Override + public boolean equals(Object object) { + if (this == object) + return true; + if (object == null || getClass() != object.getClass()) + return false; + Passenger passenger = (Passenger) object; + return getSeatNumber() == passenger.getSeatNumber() && Objects.equals(getFistName(), passenger.getFistName()) + && Objects.equals(getLastName(), passenger.getLastName()); + } + + @Override + public int hashCode() { + return Objects.hash(getFistName(), getLastName(), getSeatNumber()); + } + + @Override + public String toString() { + final StringBuilder toStringBuilder = new StringBuilder(getClass().getSimpleName()); + toStringBuilder.append("{ id=").append(id); + toStringBuilder.append(", fistName='").append(fistName).append('\''); + toStringBuilder.append(", lastName='").append(lastName).append('\''); + toStringBuilder.append(", seatNumber=").append(seatNumber); + toStringBuilder.append('}'); + return toStringBuilder.toString(); + } + + Long getId() { + return id; + } + + String getFistName() { + return fistName; + } + + String getLastName() { + return lastName; + } + + int getSeatNumber() { + return seatNumber; + } +} diff --git a/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/PassengerRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/PassengerRepository.java new file mode 100644 index 0000000000..6301f6e307 --- /dev/null +++ b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/PassengerRepository.java @@ -0,0 +1,8 @@ +package com.baeldung.limit; + +import org.springframework.data.jpa.repository.JpaRepository; + +interface PassengerRepository extends JpaRepository, CustomPassengerRepository { + + Passenger findFirstByOrderBySeatNumberAsc(); +} diff --git a/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/PassengerRepositoryImpl.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/PassengerRepositoryImpl.java new file mode 100644 index 0000000000..2d13eb7cad --- /dev/null +++ b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/limit/PassengerRepositoryImpl.java @@ -0,0 +1,20 @@ +package com.baeldung.limit; + +import org.springframework.stereotype.Repository; + +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import java.util.List; + +@Repository +class PassengerRepositoryImpl implements CustomPassengerRepository { + + @PersistenceContext + private EntityManager entityManager; + + @Override + public List findOrderedBySeatNumberLimitedTo(int limit) { + return entityManager.createQuery("SELECT p FROM Passenger p ORDER BY p.seatNumber", + Passenger.class).setMaxResults(limit).getResultList(); + } +} diff --git a/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/limit/LimitIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/limit/LimitIntegrationTest.java new file mode 100644 index 0000000000..27e0ebdd9f --- /dev/null +++ b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/limit/LimitIntegrationTest.java @@ -0,0 +1,69 @@ +package com.baeldung.limit; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Sort; +import org.springframework.test.context.junit4.SpringRunner; + +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import java.util.List; + +import static org.junit.Assert.assertEquals; + +@DataJpaTest +@RunWith(SpringRunner.class) +public class LimitIntegrationTest { + + @PersistenceContext + private EntityManager entityManager; + @Autowired + private PassengerRepository repository; + + @Before + public void before() { + entityManager.persist(Passenger.from("Jill", "Smith", 50)); + entityManager.persist(Passenger.from("Eve", "Jackson", 95)); + entityManager.persist(Passenger.from("Fred", "Bloggs", 22)); + entityManager.persist(Passenger.from("Ricki", "Bobbie", 36)); + entityManager.persist(Passenger.from("Siya", "Kolisi", 85)); + } + + @Test + public void givenSeveralPassengersWhenOrderedBySeatNumberLimitedToThenThePassengerInTheFirstFilledSeatIsReturned() { + Passenger expected = Passenger.from("Fred", "Bloggs", 22); + + List passengers = repository.findOrderedBySeatNumberLimitedTo(1); + + assertEquals(1, passengers.size()); + + Passenger actual = passengers.get(0); + assertEquals(actual, expected); + } + + @Test + public void givenSeveralPassengersWhenFindFirstByOrderBySeatNumberAscThenThePassengerInTheFirstFilledSeatIsReturned() { + Passenger expected = Passenger.from("Fred", "Bloggs", 22); + + Passenger actual = repository.findFirstByOrderBySeatNumberAsc(); + + assertEquals(actual, expected); + } + + @Test + public void givenSeveralPassengersWhenFindPageSortedByThenThePassengerInTheFirstFilledSeatIsReturned() { + Passenger expected = Passenger.from("Fred", "Bloggs", 22); + + Page page = repository.findAll(PageRequest.of(0, 1, Sort.by(Sort.Direction.ASC, "seatNumber"))); + + assertEquals(page.getContent().size(), 1); + + Passenger actual = page.getContent().get(0); + assertEquals(expected, actual); + } +} diff --git a/persistence-modules/spring-data-mongodb/pom.xml b/persistence-modules/spring-data-mongodb/pom.xml index 466acf5a43..76ec5a96a6 100644 --- a/persistence-modules/spring-data-mongodb/pom.xml +++ b/persistence-modules/spring-data-mongodb/pom.xml @@ -109,7 +109,7 @@ - 2.1.0.RELEASE + 2.1.2.RELEASE 4.1.4 1.1.3 5.1.0.RELEASE diff --git a/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/config/MongoConfig.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/config/MongoConfig.java index f1048fa145..9fa90acf86 100644 --- a/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/config/MongoConfig.java +++ b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/config/MongoConfig.java @@ -3,6 +3,8 @@ package com.baeldung.config; import java.util.ArrayList; import java.util.List; +import converter.ZonedDateTimeReadConverter; +import converter.ZonedDateTimeWriteConverter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; @@ -52,6 +54,8 @@ public class MongoConfig extends AbstractMongoConfiguration { @Override public MongoCustomConversions customConversions() { converters.add(new UserWriterConverter()); + converters.add(new ZonedDateTimeReadConverter()); + converters.add(new ZonedDateTimeWriteConverter()); return new MongoCustomConversions(converters); } @@ -64,5 +68,5 @@ public class MongoConfig extends AbstractMongoConfiguration { MongoTransactionManager transactionManager(MongoDbFactory dbFactory) { return new MongoTransactionManager(dbFactory); } - + } diff --git a/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/model/Action.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/model/Action.java new file mode 100644 index 0000000000..aa480dbdf7 --- /dev/null +++ b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/model/Action.java @@ -0,0 +1,51 @@ +package com.baeldung.model; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import java.time.ZonedDateTime; + +@Document +public class Action { + + @Id + private String id; + + private String description; + private ZonedDateTime time; + + public Action(String id, String description, ZonedDateTime time) { + this.id = id; + this.description = description; + this.time = time; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ZonedDateTime getTime() { + return time; + } + + public void setTime(ZonedDateTime time) { + this.time = time; + } + + @Override + public String toString() { + return "Action{id='" + id + "', description='" + description + "', time=" + time + '}'; + } +} diff --git a/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/repository/ActionRepository.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/repository/ActionRepository.java new file mode 100644 index 0000000000..bdca490fe6 --- /dev/null +++ b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/repository/ActionRepository.java @@ -0,0 +1,6 @@ +package com.baeldung.repository; + +import com.baeldung.model.Action; +import org.springframework.data.mongodb.repository.MongoRepository; + +public interface ActionRepository extends MongoRepository { } \ No newline at end of file diff --git a/persistence-modules/spring-data-mongodb/src/main/java/converter/ZonedDateTimeReadConverter.java b/persistence-modules/spring-data-mongodb/src/main/java/converter/ZonedDateTimeReadConverter.java new file mode 100644 index 0000000000..a2d847957b --- /dev/null +++ b/persistence-modules/spring-data-mongodb/src/main/java/converter/ZonedDateTimeReadConverter.java @@ -0,0 +1,14 @@ +package converter; + +import org.springframework.core.convert.converter.Converter; + +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.util.Date; + +public class ZonedDateTimeReadConverter implements Converter { + @Override + public ZonedDateTime convert(Date date) { + return date.toInstant().atZone(ZoneOffset.UTC); + } +} \ No newline at end of file diff --git a/persistence-modules/spring-data-mongodb/src/main/java/converter/ZonedDateTimeWriteConverter.java b/persistence-modules/spring-data-mongodb/src/main/java/converter/ZonedDateTimeWriteConverter.java new file mode 100644 index 0000000000..e13ac2d130 --- /dev/null +++ b/persistence-modules/spring-data-mongodb/src/main/java/converter/ZonedDateTimeWriteConverter.java @@ -0,0 +1,13 @@ +package converter; + +import org.springframework.core.convert.converter.Converter; + +import java.time.ZonedDateTime; +import java.util.Date; + +public class ZonedDateTimeWriteConverter implements Converter { + @Override + public Date convert(ZonedDateTime zonedDateTime) { + return Date.from(zonedDateTime.toInstant()); + } +} \ No newline at end of file diff --git a/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/ActionRepositoryLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/ActionRepositoryLiveTest.java new file mode 100644 index 0000000000..096015ca0a --- /dev/null +++ b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/ActionRepositoryLiveTest.java @@ -0,0 +1,50 @@ +package com.baeldung.repository; + +import com.baeldung.config.MongoConfig; +import com.baeldung.model.Action; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.mongodb.core.MongoOperations; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import java.time.ZoneOffset; +import java.time.ZonedDateTime; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = MongoConfig.class) +public class ActionRepositoryLiveTest { + + @Autowired + private MongoOperations mongoOps; + + @Autowired + private ActionRepository actionRepository; + + @Before + public void setup() { + if (!mongoOps.collectionExists(Action.class)) { + mongoOps.createCollection(Action.class); + } + } + + @Test + public void givenSavedAction_TimeIsRetrievedCorrectly() { + String id = "testId"; + ZonedDateTime now = ZonedDateTime.now(ZoneOffset.UTC); + + actionRepository.save(new Action(id, "click-action", now)); + Action savedAction = actionRepository.findById(id).get(); + + Assert.assertEquals(now.withNano(0), savedAction.getTime().withNano(0)); + } + + @After + public void tearDown() { + mongoOps.dropCollection(Action.class); + } +} \ No newline at end of file diff --git a/persistence-modules/spring-data-redis/README.md b/persistence-modules/spring-data-redis/README.md index da44920e16..a20f5052f0 100644 --- a/persistence-modules/spring-data-redis/README.md +++ b/persistence-modules/spring-data-redis/README.md @@ -3,6 +3,7 @@ ### Relevant Articles: - [Introduction to Spring Data Redis](http://www.baeldung.com/spring-data-redis-tutorial) - [PubSub Messaging with Spring Data Redis](http://www.baeldung.com/spring-data-redis-pub-sub) +- [An Introduction to Spring Data Redis Reactive](https://www.baeldung.com/spring-data-redis-reactive) ### Build the Project with Tests Running ``` diff --git a/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/Course.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/Course.java new file mode 100644 index 0000000000..bdfb8e890f --- /dev/null +++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/Course.java @@ -0,0 +1,71 @@ +package com.baeldung.manytomany.model; + +import java.util.Set; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.ManyToMany; +import javax.persistence.OneToMany; +import javax.persistence.Table; + +@Entity +@Table(name = "course") +public class Course { + + @Id + @Column(name = "id") + private Long id; + + @ManyToMany(mappedBy = "likedCourses") + private Set likes; + + @OneToMany(mappedBy = "course") + private Set ratings; + + @OneToMany(mappedBy = "course") + private Set registrations; + + // additional properties + + public Course() { + } + + public Long getId() { + return id; + } + + public Set getRatings() { + return ratings; + } + + public Set getRegistrations() { + return registrations; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Course other = (Course) obj; + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) + return false; + return true; + } + +} diff --git a/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/CourseRating.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/CourseRating.java new file mode 100644 index 0000000000..4951f766bc --- /dev/null +++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/CourseRating.java @@ -0,0 +1,79 @@ +package com.baeldung.manytomany.model; + +import javax.persistence.Column; +import javax.persistence.EmbeddedId; +import javax.persistence.Entity; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.MapsId; +import javax.persistence.Table; + +@Entity +@Table(name = "course_rating") +public class CourseRating { + + @EmbeddedId + private CourseRatingKey id; + + @ManyToOne + @MapsId("student_id") + @JoinColumn(name = "student_id") + private Student student; + + @ManyToOne + @MapsId("course_id") + @JoinColumn(name = "course_id") + private Course course; + + @Column(name = "rating") + private int rating; + + public CourseRating() { + } + + public int getRating() { + return rating; + } + + public void setRating(int rating) { + this.rating = rating; + } + + public CourseRatingKey getId() { + return id; + } + + public Student getStudent() { + return student; + } + + public Course getCourse() { + return course; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + CourseRating other = (CourseRating) obj; + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) + return false; + return true; + } + +} diff --git a/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/CourseRatingKey.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/CourseRatingKey.java new file mode 100644 index 0000000000..4e7430ed92 --- /dev/null +++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/CourseRatingKey.java @@ -0,0 +1,59 @@ +package com.baeldung.manytomany.model; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Embeddable; + +@Embeddable +public class CourseRatingKey implements Serializable { + + @Column(name = "student_id") + private Long studentId; + + @Column(name = "course_id") + private Long courseId; + + public CourseRatingKey() { + } + + public Long getStudentId() { + return studentId; + } + + public Long getCourseId() { + return courseId; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((courseId == null) ? 0 : courseId.hashCode()); + result = prime * result + ((studentId == null) ? 0 : studentId.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + CourseRatingKey other = (CourseRatingKey) obj; + if (courseId == null) { + if (other.courseId != null) + return false; + } else if (!courseId.equals(other.courseId)) + return false; + if (studentId == null) { + if (other.studentId != null) + return false; + } else if (!studentId.equals(other.studentId)) + return false; + return true; + } + +} diff --git a/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/CourseRegistration.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/CourseRegistration.java new file mode 100644 index 0000000000..e1f30af883 --- /dev/null +++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/CourseRegistration.java @@ -0,0 +1,100 @@ +package com.baeldung.manytomany.model; + +import java.time.LocalDateTime; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +@Entity +@Table(name = "course_registration") +public class CourseRegistration { + + @Id + @Column(name = "id") + private Long id; + + @ManyToOne + @JoinColumn(name = "student_id") + private Student student; + + @ManyToOne + @JoinColumn(name = "course_id") + private Course course; + + @Column(name = "registered_at") + private LocalDateTime registeredAt; + + @Column(name = "grade") + private int grade; + + // additional properties + + public CourseRegistration() { + } + + public Student getStudent() { + return student; + } + + public void setStudent(Student student) { + this.student = student; + } + + public Course getCourse() { + return course; + } + + public void setCourse(Course course) { + this.course = course; + } + + public LocalDateTime getRegisteredAt() { + return registeredAt; + } + + public void setRegisteredAt(LocalDateTime registeredAt) { + this.registeredAt = registeredAt; + } + + public int getGrade() { + return grade; + } + + public void setGrade(int grade) { + this.grade = grade; + } + + public Long getId() { + return id; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + CourseRegistration other = (CourseRegistration) obj; + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) + return false; + return true; + } + +} diff --git a/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/Student.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/Student.java new file mode 100644 index 0000000000..00561593a6 --- /dev/null +++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/manytomany/model/Student.java @@ -0,0 +1,78 @@ +package com.baeldung.manytomany.model; + +import java.util.Set; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.JoinTable; +import javax.persistence.ManyToMany; +import javax.persistence.OneToMany; +import javax.persistence.Table; + +@Entity +@Table(name = "student") +public class Student { + + @Id + @Column(name = "id") + private Long id; + + @ManyToMany + @JoinTable(name = "course_like", joinColumns = @JoinColumn(name = "student_id"), inverseJoinColumns = @JoinColumn(name = "course_id")) + private Set likedCourses; + + @OneToMany(mappedBy = "student") + private Set ratings; + + @OneToMany(mappedBy = "student") + private Set registrations; + + // additional properties + + public Student() { + } + + public Long getId() { + return id; + } + + public Set getLikedCourses() { + return likedCourses; + } + + public Set getRatings() { + return ratings; + } + + public Set getRegistrations() { + return registrations; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Student other = (Student) obj; + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) + return false; + return true; + } + +} diff --git a/persistence-modules/spring-jpa/src/test/java/com/baeldung/manytomany/ManyToManyIntegrationTest.java b/persistence-modules/spring-jpa/src/test/java/com/baeldung/manytomany/ManyToManyIntegrationTest.java new file mode 100644 index 0000000000..5e4334f5d4 --- /dev/null +++ b/persistence-modules/spring-jpa/src/test/java/com/baeldung/manytomany/ManyToManyIntegrationTest.java @@ -0,0 +1,24 @@ +package com.baeldung.manytomany; + +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@ContextConfiguration(classes = ManyToManyTestConfiguration.class) +@DirtiesContext +public class ManyToManyIntegrationTest { + + @PersistenceContext + EntityManager entityManager; + + @Test + public void contextStarted() { + } + +} diff --git a/persistence-modules/spring-jpa/src/test/java/com/baeldung/manytomany/ManyToManyTestConfiguration.java b/persistence-modules/spring-jpa/src/test/java/com/baeldung/manytomany/ManyToManyTestConfiguration.java new file mode 100644 index 0000000000..f4635b563a --- /dev/null +++ b/persistence-modules/spring-jpa/src/test/java/com/baeldung/manytomany/ManyToManyTestConfiguration.java @@ -0,0 +1,51 @@ +package com.baeldung.manytomany; + +import java.util.HashMap; +import java.util.Map; + +import javax.sql.DataSource; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; +import org.springframework.orm.jpa.JpaVendorAdapter; +import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; + +@Configuration +@PropertySource("classpath:/manytomany/test.properties") +public class ManyToManyTestConfiguration { + + @Bean + public DataSource dataSource() { + EmbeddedDatabaseBuilder dbBuilder = new EmbeddedDatabaseBuilder(); + return dbBuilder.setType(EmbeddedDatabaseType.H2) + .addScript("classpath:/manytomany/db.sql") + .build(); + } + + @Bean + public LocalContainerEntityManagerFactoryBean entityManagerFactory(@Value("${hibernate.hbm2ddl.auto}") String hbm2ddlType, @Value("${hibernate.dialect}") String dialect, @Value("${hibernate.show_sql}") boolean showSql) { + LocalContainerEntityManagerFactoryBean result = new LocalContainerEntityManagerFactoryBean(); + + result.setDataSource(dataSource()); + result.setPackagesToScan("com.baeldung.manytomany.model"); + result.setJpaVendorAdapter(jpaVendorAdapter()); + + Map jpaProperties = new HashMap<>(); + jpaProperties.put("hibernate.hbm2ddl.auto", hbm2ddlType); + jpaProperties.put("hibernate.dialect", dialect); + jpaProperties.put("hibernate.show_sql", showSql); + result.setJpaPropertyMap(jpaProperties); + + return result; + } + + public JpaVendorAdapter jpaVendorAdapter() { + return new HibernateJpaVendorAdapter(); + } + +} diff --git a/persistence-modules/spring-jpa/src/test/resources/manytomany/db.sql b/persistence-modules/spring-jpa/src/test/resources/manytomany/db.sql new file mode 100644 index 0000000000..02905e41ee --- /dev/null +++ b/persistence-modules/spring-jpa/src/test/resources/manytomany/db.sql @@ -0,0 +1,44 @@ +CREATE TABLE course ( + id bigint(20) NOT NULL, + PRIMARY KEY (id) +); + + +CREATE TABLE student ( + id bigint(20) NOT NULL, + PRIMARY KEY (id) +); + + +CREATE TABLE course_like ( + student_id bigint(20) NOT NULL, + course_id bigint(20) NOT NULL, + PRIMARY KEY (student_id, course_id), + CONSTRAINT fk_course_like__student FOREIGN KEY (student_id) REFERENCES student (id), + CONSTRAINT fk_course_like__course FOREIGN KEY (course_id) REFERENCES course (id) +); + + + +CREATE TABLE course_rating ( + course_id bigint(20) NOT NULL, + student_id bigint(20) NOT NULL, + rating int(11) NOT NULL, + PRIMARY KEY (course_id, student_id), + CONSTRAINT fk_course_rating__student FOREIGN KEY (student_id) REFERENCES student (id), + CONSTRAINT fk_course_rating__course FOREIGN KEY (course_id) REFERENCES course (id) +); + + + +CREATE TABLE course_registration ( + id bigint(20) NOT NULL, + grade int(11), + registered_at datetime NOT NULL, + course_id bigint(20) NOT NULL, + student_id bigint(20) NOT NULL, + PRIMARY KEY (id), + CONSTRAINT fk_course_registration__student FOREIGN KEY (student_id) REFERENCES student (id), + CONSTRAINT fk_course_registration__course FOREIGN KEY (course_id) REFERENCES course (id) +); + diff --git a/persistence-modules/spring-jpa/src/test/resources/manytomany/test.properties b/persistence-modules/spring-jpa/src/test/resources/manytomany/test.properties new file mode 100644 index 0000000000..9e4236a6c2 --- /dev/null +++ b/persistence-modules/spring-jpa/src/test/resources/manytomany/test.properties @@ -0,0 +1,6 @@ +jdbc.driverClassName=org.h2.Driver +jdbc.url=jdbc:h2:mem:myDb;DB_CLOSE_DELAY=-1 + +hibernate.dialect=org.hibernate.dialect.H2Dialect +hibernate.show_sql=true +hibernate.hbm2ddl.auto=validate diff --git a/pom.xml b/pom.xml index fa8a1108b5..109a49d985 100644 --- a/pom.xml +++ b/pom.xml @@ -356,6 +356,8 @@ java-strings core-java + core-java-lang + core-java-arrays core-java-collections java-collections-conversions java-collections-maps @@ -372,8 +374,6 @@ persistence-modules/deltaspike dozer ethereum - ejb - ejb/ejb-client feign flips testing-modules/gatling @@ -468,6 +468,7 @@ spring-5-reactive-client spring-5-mvc spring-5-security + spring-5-reactive-oauth spring-activiti spring-akka spring-amqp @@ -521,6 +522,7 @@ spring-jms spring-jooq persistence-modules/spring-jpa + ddd @@ -543,7 +545,7 @@ **/*IntTest.java **/*LongRunningUnitTest.java **/*ManualTest.java - **/JdbcTest.java + **/*JdbcTest.java **/*LiveTest.java @@ -615,7 +617,6 @@ spring-reactive-kotlin persistence-modules/jnosql spring-boot-angular-ecommerce - cdi-portable-extension jta java-websocket @@ -897,37 +898,25 @@ integration - - - - org.apache.maven.plugins - maven-surefire-plugin - - - integration-test - - test - - - - **/*ManualTest.java - **/*LiveTest.java - - - **/*IntegrationTest.java - **/*IntTest.java - - - - - - - json - - - - - + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*ManualTest.java + **/*LiveTest.java + + + **/*IntegrationTest.java + **/*IntTest.java + + + + + @@ -1212,39 +1201,26 @@ - integration-lite + integration-lite-test - - - - org.apache.maven.plugins - maven-surefire-plugin - - - integration-test - - test - - - - **/*ManualTest.java - **/*LiveTest.java - - - **/*IntegrationTest.java - **/*IntTest.java - - - - - - - json - - - - - + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*ManualTest.java + **/*LiveTest.java + + + **/*IntegrationTest.java + **/*IntTest.java + + + + + parent-boot-1 @@ -1253,270 +1229,305 @@ parent-spring-5 parent-java parent-kotlin - asm - atomix - persistence-modules/apache-cayenne - aws - aws-lambda - akka-streams - algorithms-genetic - algorithms-miscellaneous-1 - algorithms-miscellaneous-2 - algorithms-sorting - annotations - apache-cxf - apache-fop - apache-poi - apache-tika - apache-thrift - apache-curator - apache-zookeeper - apache-opennlp - autovalue - axon - azure - bootique - cdi - java-strings - - core-java-collections - java-collections-conversions - java-collections-maps - core-java-io - core-java-8 - java-streams - core-groovy - - couchbase - persistence-modules/deltaspike - dozer - ethereum - feign - flips - testing-modules/groovy-spock - google-cloud - gson - guava - guava-collections - guava-modules/guava-18 - guava-modules/guava-19 - guava-modules/guava-21 - guice - disruptor - spring-static-resources - hazelcast - persistence-modules/hbase - - hystrix - image-processing - immutables - persistence-modules/influxdb - jackson - vavr - java-lite - java-numbers - java-rmi - java-vavr-stream - javax-servlets - javaxval - jaxb - javafx - jgroups - jee-7 - jee-7-security - jjwt - jsf - json-path - json - jsoup - jta - testing-modules/junit-5 - testing-modules/junit5-migration - jws - libraries-data - linkrest - logging-modules/log-mdc - logging-modules/log4j - - logging-modules/logback - lombok - mapstruct - - maven - mesos-marathon - msf4j - testing-modules/mockito - testing-modules/mockito-2 - testing-modules/mocks - mustache - mvn-wrapper - noexception - persistence-modules/orientdb - osgi - orika - patterns - pdf - protobuffer - persistence-modules/querydsl - reactor-core - persistence-modules/redis - testing-modules/rest-assured - testing-modules/rest-testing - resteasy - rxjava - rxjava-2 - spring-swagger-codegen - testing-modules/selenium-junit-testng - persistence-modules/solr - spark-java + spring-4 - spring-5-data-reactive - spring-5-reactive - spring-5-reactive-security - spring-5-reactive-client - spring-5-mvc - spring-5-security - spring-activiti - spring-akka - spring-amqp - spring-all - spring-amqp-simple - spring-apache-camel - spring-batch - spring-bom - spring-boot-keycloak - spring-boot-bootstrap - spring-boot-admin - spring-boot-camel - persistence-modules/spring-boot-persistence - spring-boot-security - spring-boot-mvc - spring-boot-logging-log4j2 - spring-boot-disable-console-logging - spring-cloud-data-flow - spring-cloud - spring-cloud-bus - spring-core - spring-cucumber - spring-ejb - spring-aop + - persistence-modules/spring-data-dynamodb - persistence-modules/spring-data-keyvalue - persistence-modules/spring-data-mongodb - persistence-modules/spring-data-neo4j + - spring-data-rest - persistence-modules/spring-data-solr - spring-dispatcher-servlet - spring-exceptions - spring-freemarker - persistence-modules/spring-hibernate-3 + + integration-lite - persistence-modules/spring-hibernate-5 - persistence-modules/spring-data-eclipselink - spring-integration - spring-jenkins-pipeline - spring-jersey + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*ManualTest.java + **/*LiveTest.java + + + **/*IntegrationTest.java + **/*IntTest.java + + + + + - spring-jms - spring-jooq - persistence-modules/spring-jpa - spring-kafka - spring-katharsis - spring-ldap - spring-mockito - spring-mvc-forms-jsp - spring-mvc-forms-thymeleaf - spring-mvc-java - spring-mvc-velocity - spring-mvc-webflow - spring-mvc-xml - spring-mvc-kotlin - spring-protobuf - spring-quartz - spring-rest-angular - spring-rest-full - spring-rest-query-language - spring-rest - spring-resttemplate - spring-rest-simple - spring-security-acl - spring-security-cache-control - spring-security-client/spring-security-jsp-authentication - spring-security-client/spring-security-jsp-authorize - spring-security-client/spring-security-jsp-config - spring-security-client/spring-security-mvc - spring-security-client/spring-security-thymeleaf-authentication - spring-security-client/spring-security-thymeleaf-authorize - spring-security-client/spring-security-thymeleaf-config - spring-security-core - spring-security-mvc-boot - spring-security-mvc-digest-auth - spring-security-mvc-ldap - spring-security-mvc-login - spring-security-mvc-persisted-remember-me - spring-security-mvc-session - spring-security-mvc-socket - spring-security-openid - - spring-security-rest-basic-auth - spring-security-rest-custom - spring-security-rest - spring-security-sso - spring-security-x509 - spring-session - spring-sleuth - spring-social-login - spring-spel - spring-state-machine - spring-thymeleaf - spring-userservice - spring-zuul - spring-remoting - spring-reactor - spring-vertx - spring-vault - spring-jinq - spring-rest-embedded-tomcat - testing-modules/testing - testing-modules/testng - video-tutorials + + parent-boot-1 + parent-boot-2 + parent-spring-4 + parent-spring-5 + parent-java + parent-kotlin + asm + atomix + persistence-modules/apache-cayenne + aws + aws-lambda + akka-streams + algorithms-genetic + algorithms-miscellaneous-1 + algorithms-miscellaneous-2 + algorithms-sorting + annotations + apache-cxf + apache-fop + apache-poi + apache-tika + apache-thrift + apache-curator + apache-zookeeper + apache-opennlp + autovalue + axon + azure + bootique + cdi + java-strings + + core-java-collections + java-collections-conversions + java-collections-maps + core-java-io + core-java-8 + java-streams + core-groovy - xmlunit-2 - struts-2 - apache-velocity - apache-solrj - rabbitmq + couchbase + persistence-modules/deltaspike + dozer + ethereum + feign + flips + testing-modules/groovy-spock + google-cloud + gson + guava + guava-collections + guava-modules/guava-18 + guava-modules/guava-19 + guava-modules/guava-21 + guice + disruptor + spring-static-resources + hazelcast + persistence-modules/hbase - persistence-modules/spring-data-gemfire - mybatis - spring-drools - drools - persistence-modules/liquibase - spring-boot-property-exp - testing-modules/mockserver - testing-modules/test-containers - undertow - vaadin - vertx-and-rxjava - saas - deeplearning4j - lucene - vraptor - persistence-modules/java-cockroachdb - spring-security-thymeleaf - persistence-modules/java-jdbi - jersey - java-spi - performance-tests - twilio - spring-boot-ctx-fluent - java-ee-8-security-api - spring-webflux-amqp - antlr - maven-archetype - apache-meecrowave + hystrix + image-processing + immutables + persistence-modules/influxdb + jackson + vavr + java-lite + java-numbers + java-rmi + java-vavr-stream + javax-servlets + javaxval + jaxb + javafx + jgroups + jee-7 + jee-7-security + jjwt + jsf + json-path + json + jsoup + jta + testing-modules/junit-5 + testing-modules/junit5-migration + jws + libraries-data + linkrest + logging-modules/log-mdc + logging-modules/log4j + + logging-modules/logback + lombok + mapstruct + + maven + mesos-marathon + msf4j + testing-modules/mockito + testing-modules/mockito-2 + testing-modules/mocks + mustache + mvn-wrapper + noexception + persistence-modules/orientdb + osgi + orika + patterns + pdf + protobuffer + persistence-modules/querydsl + reactor-core + persistence-modules/redis + testing-modules/rest-assured + testing-modules/rest-testing + resteasy + rxjava + rxjava-2 + spring-swagger-codegen + testing-modules/selenium-junit-testng + persistence-modules/solr + spark-java + spring-4 + spring-5-data-reactive + spring-5-reactive + spring-5-reactive-security + spring-5-reactive-client + spring-5-mvc + spring-5-security + spring-activiti + spring-akka + spring-amqp + spring-all + spring-amqp-simple + spring-apache-camel + spring-batch + spring-bom + spring-boot-keycloak + spring-boot-bootstrap + spring-boot-admin + spring-boot-camel + persistence-modules/spring-boot-persistence + spring-boot-security + spring-boot-mvc + spring-boot-logging-log4j2 + spring-boot-disable-console-logging + spring-cloud-data-flow + spring-cloud + spring-cloud-bus + spring-core + spring-cucumber + spring-ejb + spring-aop + + persistence-modules/spring-data-dynamodb + persistence-modules/spring-data-keyvalue + persistence-modules/spring-data-mongodb + persistence-modules/spring-data-neo4j + + spring-data-rest + persistence-modules/spring-data-solr + spring-dispatcher-servlet + spring-exceptions + spring-freemarker + persistence-modules/spring-hibernate-3 + + persistence-modules/spring-hibernate-5 + persistence-modules/spring-data-eclipselink + spring-integration + spring-jenkins-pipeline + spring-jersey + + spring-jms + spring-jooq + persistence-modules/spring-jpa + spring-kafka + spring-katharsis + spring-ldap + spring-mockito + spring-mvc-forms-jsp + spring-mvc-forms-thymeleaf + spring-mvc-java + spring-mvc-velocity + spring-mvc-webflow + spring-mvc-xml + spring-mvc-kotlin + spring-protobuf + spring-quartz + spring-rest-angular + spring-rest-full + spring-rest-query-language + spring-rest + spring-resttemplate + spring-rest-simple + spring-security-acl + spring-security-cache-control + spring-security-client/spring-security-jsp-authentication + spring-security-client/spring-security-jsp-authorize + spring-security-client/spring-security-jsp-config + spring-security-client/spring-security-mvc + spring-security-client/spring-security-thymeleaf-authentication + spring-security-client/spring-security-thymeleaf-authorize + spring-security-client/spring-security-thymeleaf-config + spring-security-core + spring-security-mvc-boot + spring-security-mvc-digest-auth + spring-security-mvc-ldap + spring-security-mvc-login + spring-security-mvc-persisted-remember-me + spring-security-mvc-session + spring-security-mvc-socket + spring-security-openid + + spring-security-rest-basic-auth + spring-security-rest-custom + spring-security-rest + spring-security-sso + spring-security-x509 + spring-session + spring-sleuth + spring-social-login + spring-spel + spring-state-machine + spring-thymeleaf + spring-userservice + spring-zuul + spring-remoting + spring-reactor + spring-vertx + spring-vault + spring-jinq + spring-rest-embedded-tomcat + testing-modules/testing + testing-modules/testng + video-tutorials + + xmlunit-2 + struts-2 + apache-velocity + apache-solrj + rabbitmq + + persistence-modules/spring-data-gemfire + mybatis + spring-drools + drools + persistence-modules/liquibase + spring-boot-property-exp + testing-modules/mockserver + testing-modules/test-containers + undertow + vaadin + vertx-and-rxjava + saas + deeplearning4j + lucene + vraptor + persistence-modules/java-cockroachdb + spring-security-thymeleaf + persistence-modules/java-jdbi + jersey + java-spi + performance-tests + twilio + spring-boot-ctx-fluent + java-ee-8-security-api + spring-webflux-amqp + antlr + maven-archetype + apache-meecrowave persistence-modules/spring-hibernate4 xml @@ -1534,28 +1545,28 @@ persistence-modules/spring-data-redis jmeter - --> + --> - - + + --> - + - + integration-heavy @@ -1565,28 +1576,15 @@ org.apache.maven.plugins maven-surefire-plugin - - - integration-test - - test - - - - **/*ManualTest.java - **/*LiveTest.java - - - **/*IntegrationTest.java - **/*IntTest.java - - - - - - json - + + **/*ManualTest.java + **/*LiveTest.java + + + **/*IntegrationTest.java + **/*IntTest.java + @@ -1640,12 +1638,15 @@ false false + 4.12 1.3 2.21.0 + 1.7.21 1.1.7 + 2.21.0 3.7.0 diff --git a/rxjava-2/README.md b/rxjava-2/README.md index 78eb6e6428..f9528bb1d5 100644 --- a/rxjava-2/README.md +++ b/rxjava-2/README.md @@ -5,3 +5,4 @@ - [RxJava 2 - Completable](http://www.baeldung.com/rxjava-completable) - [RxJava Maybe](http://www.baeldung.com/rxjava-maybe) - [Introduction to RxRelay for RxJava](http://www.baeldung.com/rx-relay) +- [Combining RxJava Completables](https://www.baeldung.com/rxjava-completable) diff --git a/spring-5-reactive-oauth/pom.xml b/spring-5-reactive-oauth/pom.xml new file mode 100644 index 0000000000..73809681f2 --- /dev/null +++ b/spring-5-reactive-oauth/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + + com.baeldung.reactive.oauth + spring-5-reactive-oauth + 1.0.0-SNAPSHOT + jar + + spring-5-reactive-oauth + WebFluc and Spring Security OAuth + + + org.springframework.boot + spring-boot-starter-parent + 2.1.0.RELEASE + + + + + UTF-8 + UTF-8 + 1.8 + + + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-webflux + + + + org.springframework.security + spring-security-oauth2-client + + + + org.springframework.boot + spring-boot-starter-test + test + + + io.projectreactor + reactor-test + test + + + org.springframework.security + spring-security-test + test + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.20.1 + + true + + **/*IntegrationTest.java + + + + + + + + diff --git a/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/SecurityConfig.java b/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/SecurityConfig.java new file mode 100644 index 0000000000..2fa1dd9380 --- /dev/null +++ b/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/SecurityConfig.java @@ -0,0 +1,19 @@ +package com.baeldung.reactive.oauth; + +import org.springframework.context.annotation.Bean; +import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; +import org.springframework.security.config.web.server.ServerHttpSecurity; +import org.springframework.security.web.server.SecurityWebFilterChain; + +@EnableWebFluxSecurity +public class SecurityConfig { + + @Bean + public SecurityWebFilterChain configure(ServerHttpSecurity http) throws Exception { + return http.authorizeExchange() + .pathMatchers("/about").permitAll() + .anyExchange().authenticated() + .and().oauth2Login() + .and().build(); + } +} diff --git a/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/Spring5ReactiveOauthApplication.java b/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/Spring5ReactiveOauthApplication.java new file mode 100644 index 0000000000..602ded6b9e --- /dev/null +++ b/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/Spring5ReactiveOauthApplication.java @@ -0,0 +1,25 @@ +package com.baeldung.reactive.oauth; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository; +import org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction; +import org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizedClientRepository; +import org.springframework.web.reactive.function.client.WebClient; + +@SpringBootApplication +public class Spring5ReactiveOauthApplication { + + public static void main(String[] args) { + SpringApplication.run(Spring5ReactiveOauthApplication.class, args); + } + + @Bean + public WebClient webClient(ReactiveClientRegistrationRepository clientRegistrationRepo, ServerOAuth2AuthorizedClientRepository authorizedClientRepo) { + ServerOAuth2AuthorizedClientExchangeFilterFunction filter = new ServerOAuth2AuthorizedClientExchangeFilterFunction(clientRegistrationRepo, authorizedClientRepo); + return WebClient.builder() + .filter(filter) + .build(); + } +} diff --git a/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/web/MainController.java b/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/web/MainController.java new file mode 100644 index 0000000000..b3ce24b0ea --- /dev/null +++ b/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/web/MainController.java @@ -0,0 +1,46 @@ +package com.baeldung.reactive.oauth.web; + +import static org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction.oauth2AuthorizedClient; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.annotation.AuthenticationPrincipal; +import org.springframework.security.oauth2.client.OAuth2AuthorizedClient; +import org.springframework.security.oauth2.client.annotation.RegisteredOAuth2AuthorizedClient; +import org.springframework.security.oauth2.core.user.OAuth2User; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.reactive.function.client.WebClient; + +import reactor.core.publisher.Mono; + +import com.baeldung.reactive.oauth.web.dto.Foo; + +@RestController +public class MainController { + + @Autowired + private WebClient webClient; + + @GetMapping("/") + public Mono index(@AuthenticationPrincipal Mono oauth2User) { + return oauth2User + .map(OAuth2User::getName) + .map(name -> String.format("Hi, %s", name)); + } + + @GetMapping("/foos/{id}") + public Mono getFooResource(@RegisteredOAuth2AuthorizedClient("custom") OAuth2AuthorizedClient client, @PathVariable final long id){ + return webClient + .get() + .uri("http://localhost:8088/spring-security-oauth-resource/foos/{id}", id) + .attributes(oauth2AuthorizedClient(client)) + .retrieve() + .bodyToMono(Foo.class); + } + + @GetMapping("/about") + public String getAboutPage() { + return "WebFlux OAuth example"; + } +} diff --git a/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/web/dto/Foo.java b/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/web/dto/Foo.java new file mode 100644 index 0000000000..15b4addbcd --- /dev/null +++ b/spring-5-reactive-oauth/src/main/java/com/baeldung/reactive/oauth/web/dto/Foo.java @@ -0,0 +1,35 @@ +package com.baeldung.reactive.oauth.web.dto; + +public class Foo { + private long id; + private String name; + + public Foo() { + super(); + } + + public Foo(final long id, final String name) { + super(); + + this.id = id; + this.name = name; + } + + // + + public long getId() { + return id; + } + + public void setId(final long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } +} diff --git a/spring-5-reactive-oauth/src/main/resources/application.yml b/spring-5-reactive-oauth/src/main/resources/application.yml new file mode 100644 index 0000000000..e35e19b344 --- /dev/null +++ b/spring-5-reactive-oauth/src/main/resources/application.yml @@ -0,0 +1,20 @@ +spring: + security: + oauth2: + client: + registration: + google: + client-id: YOUR_APP_CLIENT_ID + client-secret: YOUR_APP_CLIENT_SECRET + custom: + client-id: fooClientIdPassword + client-secret: secret + scopes: read,foo + authorization-grant-type: authorization_code + redirect-uri-template: http://localhost:8080/login/oauth2/code/custom + provider: + custom: + authorization-uri: http://localhost:8081/spring-security-oauth-server/oauth/authorize + token-uri: http://localhost:8081/spring-security-oauth-server/oauth/token + user-info-uri: http://localhost:8088/spring-security-oauth-resource/users/extra + user-name-attribute: user_name \ No newline at end of file diff --git a/spring-5-reactive-oauth/src/test/java/com/baeldung/reactive/oauth/Spring5ReactiveOauthIntegrationTest.java b/spring-5-reactive-oauth/src/test/java/com/baeldung/reactive/oauth/Spring5ReactiveOauthIntegrationTest.java new file mode 100644 index 0000000000..db545d63de --- /dev/null +++ b/spring-5-reactive-oauth/src/test/java/com/baeldung/reactive/oauth/Spring5ReactiveOauthIntegrationTest.java @@ -0,0 +1,16 @@ +package com.baeldung.reactive.oauth; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class Spring5ReactiveOauthIntegrationTest { + + @Test + public void contextLoads() { + } + +} diff --git a/spring-5-reactive-security/src/main/java/com/baeldung/reactive/security/SpringSecurity5Application.java b/spring-5-reactive-security/src/main/java/com/baeldung/reactive/security/SpringSecurity5Application.java index f2963c4fa5..ba913bc2d7 100644 --- a/spring-5-reactive-security/src/main/java/com/baeldung/reactive/security/SpringSecurity5Application.java +++ b/spring-5-reactive-security/src/main/java/com/baeldung/reactive/security/SpringSecurity5Application.java @@ -8,8 +8,8 @@ import org.springframework.http.server.reactive.HttpHandler; import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter; import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; -import reactor.ipc.netty.NettyContext; -import reactor.ipc.netty.http.server.HttpServer; +import reactor.netty.DisposableServer; +import reactor.netty.http.server.HttpServer; @ComponentScan(basePackages = {"com.baeldung.reactive.security"}) @EnableWebFlux @@ -18,17 +18,16 @@ public class SpringSecurity5Application { public static void main(String[] args) { try (AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(SpringSecurity5Application.class)) { - context.getBean(NettyContext.class).onClose().block(); + context.getBean(DisposableServer.class).onDispose().block(); } } @Bean - public NettyContext nettyContext(ApplicationContext context) { + public DisposableServer nettyContext(ApplicationContext context) { HttpHandler handler = WebHttpHandlerBuilder.applicationContext(context) .build(); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); - HttpServer httpServer = HttpServer.create("localhost", 8080); - return httpServer.newHandler(adapter).block(); + return HttpServer.create().host("localhost").port(8080).handle(adapter).bind().block(); } } diff --git a/spring-5-reactive/README.md b/spring-5-reactive/README.md index 1431554882..267925b798 100644 --- a/spring-5-reactive/README.md +++ b/spring-5-reactive/README.md @@ -14,4 +14,5 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Spring Webflux and CORS](http://www.baeldung.com/spring-webflux-cors) - [Handling Errors in Spring WebFlux](http://www.baeldung.com/spring-webflux-errors) - [Server-Sent Events in Spring](https://www.baeldung.com/spring-server-sent-events) -- [A Guide to Spring Session Reactive Support: WebSession](https://www.baeldung.com/a-guide-to-spring-session-reactive-support-websession/) \ No newline at end of file +- [A Guide to Spring Session Reactive Support: WebSession](https://www.baeldung.com/spring-session-reactive) +- [Validation for Functional Endpoints in Spring 5](https://www.baeldung.com/spring-functional-endpoints-validation) diff --git a/spring-5-reactive/src/test/java/com/baeldung/reactive/Spring5ReactiveServerClientIntegrationTest.java b/spring-5-reactive/src/test/java/com/baeldung/reactive/Spring5ReactiveServerClientIntegrationTest.java index 8707c27fb3..384600994e 100644 --- a/spring-5-reactive/src/test/java/com/baeldung/reactive/Spring5ReactiveServerClientIntegrationTest.java +++ b/spring-5-reactive/src/test/java/com/baeldung/reactive/Spring5ReactiveServerClientIntegrationTest.java @@ -1,5 +1,6 @@ package com.baeldung.reactive; +import com.baeldung.web.reactive.Task; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.springframework.http.server.reactive.HttpHandler; @@ -7,13 +8,10 @@ import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter; import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.RouterFunctions; import org.springframework.web.reactive.function.server.ServerResponse; - -import com.baeldung.web.reactive.Task; - import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import reactor.ipc.netty.NettyContext; -import reactor.ipc.netty.http.server.HttpServer; +import reactor.netty.DisposableServer; +import reactor.netty.http.server.HttpServer; import java.time.Duration; @@ -21,12 +19,11 @@ import static org.springframework.web.reactive.function.server.RequestPredicates import static org.springframework.web.reactive.function.server.RequestPredicates.POST; public class Spring5ReactiveServerClientIntegrationTest { - - private static NettyContext nettyContext; + private static DisposableServer nettyServer; @BeforeAll public static void setUp() throws Exception { - HttpServer server = HttpServer.create("localhost", 8080); + HttpServer server = HttpServer.create().host("localhost").port(8080); RouterFunction route = RouterFunctions.route(POST("/task/process"), request -> ServerResponse.ok() .body(request.bodyToFlux(Task.class) .map(ll -> new Task("TaskName", 1)), Task.class)) @@ -34,13 +31,12 @@ public class Spring5ReactiveServerClientIntegrationTest { .body(Mono.just("server is alive"), String.class))); HttpHandler httpHandler = RouterFunctions.toHttpHandler(route); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(httpHandler); - nettyContext = server.newHandler(adapter) - .block(); + nettyServer = server.handle(adapter).bind().block(); } @AfterAll public static void shutDown() { - nettyContext.dispose(); + nettyServer.dispose(); } // @Test diff --git a/spring-5-security/pom.xml b/spring-5-security/pom.xml index 1435019c24..da62f39fa9 100644 --- a/spring-5-security/pom.xml +++ b/spring-5-security/pom.xml @@ -31,10 +31,15 @@ org.thymeleaf.extras - thymeleaf-extras-springsecurity4 + thymeleaf-extras-springsecurity5 + + org.springframework.security.oauth.boot + spring-security-oauth2-autoconfigure + ${oauth-auto.version} + org.springframework.security spring-security-oauth2-client @@ -58,12 +63,6 @@ spring-security-test test - - - org.springframework.security.oauth.boot - spring-security-oauth2-autoconfigure - 2.0.1.RELEASE - @@ -79,4 +78,4 @@ - \ No newline at end of file + diff --git a/spring-all/README.md b/spring-all/README.md index ded5e26285..34e5c3435e 100644 --- a/spring-all/README.md +++ b/spring-all/README.md @@ -4,10 +4,12 @@ This project is used to replicate Spring Exceptions only. -###The Course +### The Course + The "REST With Spring" Classes: http://bit.ly/restwithspring - -### Relevant articles: + +### Relevant articles: + - [Guide to Spring @Autowired](http://www.baeldung.com/spring-autowire) - [Properties with Spring](http://www.baeldung.com/properties-with-spring) - checkout the `org.baeldung.properties` package for all scenarios of properties injection and usage - [Spring Profiles](http://www.baeldung.com/spring-profiles) @@ -30,3 +32,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Spring Web Contexts](http://www.baeldung.com/spring-web-contexts) - [Spring Cache – Creating a Custom KeyGenerator](http://www.baeldung.com/spring-cache-custom-keygenerator) - [Spring @Primary Annotation](http://www.baeldung.com/spring-primary) +- [Spring Events](https://www.baeldung.com/spring-events) diff --git a/spring-all/src/main/java/org/baeldung/springevents/synchronous/AnnotationDrivenEventListener.java b/spring-all/src/main/java/org/baeldung/springevents/synchronous/AnnotationDrivenEventListener.java new file mode 100644 index 0000000000..f750c40a6e --- /dev/null +++ b/spring-all/src/main/java/org/baeldung/springevents/synchronous/AnnotationDrivenEventListener.java @@ -0,0 +1,46 @@ +package org.baeldung.springevents.synchronous; + +import org.springframework.context.event.ContextStartedEvent; +import org.springframework.context.event.EventListener; +import org.springframework.stereotype.Component; +import org.springframework.transaction.event.TransactionPhase; +import org.springframework.transaction.event.TransactionalEventListener; + +@Component +public class AnnotationDrivenEventListener { + + // for tests + private boolean hitContextStartedHandler = false; + private boolean hitSuccessfulEventHandler = false; + private boolean hitCustomEventHandler = false; + + @EventListener + public void handleContextStart(final ContextStartedEvent cse) { + System.out.println("Handling context started event."); + hitContextStartedHandler = true; + } + + @EventListener(condition = "#event.success") + public void handleSuccessful(final GenericSpringEvent event) { + System.out.println("Handling generic event (conditional): " + event.getWhat()); + hitSuccessfulEventHandler = true; + } + + @TransactionalEventListener(phase = TransactionPhase.BEFORE_COMMIT) + public void handleCustom(final CustomSpringEvent event) { + System.out.println("Handling event inside a transaction BEFORE COMMIT."); + hitCustomEventHandler = true; + } + + boolean isHitContextStartedHandler() { + return hitContextStartedHandler; + } + + boolean isHitSuccessfulEventHandler() { + return hitSuccessfulEventHandler; + } + + boolean isHitCustomEventHandler() { + return hitCustomEventHandler; + } +} diff --git a/spring-all/src/main/java/org/baeldung/springevents/synchronous/ContextRefreshedListener.java b/spring-all/src/main/java/org/baeldung/springevents/synchronous/ContextRefreshedListener.java index 052437e555..9f8b2e6e83 100644 --- a/spring-all/src/main/java/org/baeldung/springevents/synchronous/ContextRefreshedListener.java +++ b/spring-all/src/main/java/org/baeldung/springevents/synchronous/ContextRefreshedListener.java @@ -7,9 +7,16 @@ import org.springframework.stereotype.Component; @Component public class ContextRefreshedListener implements ApplicationListener { + // for tests + private boolean hitContextRefreshedHandler = false; + @Override public void onApplicationEvent(final ContextRefreshedEvent cse) { System.out.println("Handling context re-freshed event. "); + hitContextRefreshedHandler = true; } + boolean isHitContextRefreshedHandler() { + return hitContextRefreshedHandler; + } } \ No newline at end of file diff --git a/spring-all/src/main/java/org/baeldung/springevents/synchronous/CustomSpringEventPublisher.java b/spring-all/src/main/java/org/baeldung/springevents/synchronous/CustomSpringEventPublisher.java index 4569de1d5e..3182090d5d 100644 --- a/spring-all/src/main/java/org/baeldung/springevents/synchronous/CustomSpringEventPublisher.java +++ b/spring-all/src/main/java/org/baeldung/springevents/synchronous/CustomSpringEventPublisher.java @@ -16,4 +16,16 @@ public class CustomSpringEventPublisher { applicationEventPublisher.publishEvent(customSpringEvent); } + public void publishGenericEvent(final String message, boolean success) { + System.out.println("Publishing generic event."); + final GenericSpringEvent genericSpringEvent = new GenericStringSpringEvent(message, success); + applicationEventPublisher.publishEvent(genericSpringEvent); + } + + public void publishGenericAppEvent(final String message) { + System.out.println("Publishing generic event."); + final GenericSpringAppEvent genericSpringEvent = new GenericStringSpringAppEvent(this, message); + applicationEventPublisher.publishEvent(genericSpringEvent); + } + } diff --git a/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericSpringAppEvent.java b/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericSpringAppEvent.java new file mode 100644 index 0000000000..6804312189 --- /dev/null +++ b/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericSpringAppEvent.java @@ -0,0 +1,18 @@ +package org.baeldung.springevents.synchronous; + +import org.springframework.context.ApplicationEvent; + +public class GenericSpringAppEvent extends ApplicationEvent { + + private final T what; + + public GenericSpringAppEvent(final Object source, final T what) { + super(source); + this.what = what; + } + + public T getWhat() { + return what; + } + +} diff --git a/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericSpringEvent.java b/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericSpringEvent.java new file mode 100644 index 0000000000..ce2c223fec --- /dev/null +++ b/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericSpringEvent.java @@ -0,0 +1,21 @@ +package org.baeldung.springevents.synchronous; + +public class GenericSpringEvent { + + private final T what; + protected final boolean success; + + public GenericSpringEvent(final T what, final boolean success) { + this.what = what; + this.success = success; + } + + public T getWhat() { + return what; + } + + public boolean isSuccess() { + return success; + } + +} diff --git a/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericSpringEventListener.java b/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericSpringEventListener.java new file mode 100644 index 0000000000..1f5e3e7068 --- /dev/null +++ b/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericSpringEventListener.java @@ -0,0 +1,22 @@ +package org.baeldung.springevents.synchronous; + +import org.springframework.context.ApplicationListener; +import org.springframework.lang.NonNull; +import org.springframework.stereotype.Component; + +@Component +public class GenericSpringEventListener implements ApplicationListener> { + + // for testing + private boolean hitEventHandler = false; + + @Override + public void onApplicationEvent(@NonNull final GenericSpringAppEvent event) { + System.out.println("Received spring generic event - " + event.getWhat()); + hitEventHandler = true; + } + + boolean isHitEventHandler() { + return hitEventHandler; + } +} \ No newline at end of file diff --git a/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericStringSpringAppEvent.java b/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericStringSpringAppEvent.java new file mode 100644 index 0000000000..fd214696e7 --- /dev/null +++ b/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericStringSpringAppEvent.java @@ -0,0 +1,9 @@ +package org.baeldung.springevents.synchronous; + +class GenericStringSpringAppEvent extends GenericSpringAppEvent { + + GenericStringSpringAppEvent(final Object source, final String what) { + super(source, what); + } + +} diff --git a/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericStringSpringEvent.java b/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericStringSpringEvent.java new file mode 100644 index 0000000000..dd4e4e3ed4 --- /dev/null +++ b/spring-all/src/main/java/org/baeldung/springevents/synchronous/GenericStringSpringEvent.java @@ -0,0 +1,9 @@ +package org.baeldung.springevents.synchronous; + +public class GenericStringSpringEvent extends GenericSpringEvent { + + GenericStringSpringEvent(final String what, final boolean success) { + super(what, success); + } + +} diff --git a/spring-all/src/test/java/org/baeldung/springevents/synchronous/ContextRefreshedListenerIntegrationTest.java b/spring-all/src/test/java/org/baeldung/springevents/synchronous/ContextRefreshedListenerIntegrationTest.java index ac8758bbf6..e8e6f91b06 100644 --- a/spring-all/src/test/java/org/baeldung/springevents/synchronous/ContextRefreshedListenerIntegrationTest.java +++ b/spring-all/src/test/java/org/baeldung/springevents/synchronous/ContextRefreshedListenerIntegrationTest.java @@ -3,16 +3,23 @@ package org.baeldung.springevents.synchronous; import org.baeldung.springevents.synchronous.SynchronousSpringEventsConfig; import org.junit.Test; import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; +import static org.springframework.util.Assert.isTrue; + @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = { SynchronousSpringEventsConfig.class }, loader = AnnotationConfigContextLoader.class) public class ContextRefreshedListenerIntegrationTest { + @Autowired + private ContextRefreshedListener listener; + @Test - public void testContextRefreshedListener() throws InterruptedException { + public void testContextRefreshedListener() { System.out.println("Test context re-freshed listener."); + isTrue(listener.isHitContextRefreshedHandler(), "Refresh should be called once"); } } \ No newline at end of file diff --git a/spring-all/src/test/java/org/baeldung/springevents/synchronous/GenericAppEventListenerIntegrationTest.java b/spring-all/src/test/java/org/baeldung/springevents/synchronous/GenericAppEventListenerIntegrationTest.java new file mode 100644 index 0000000000..f183314b6d --- /dev/null +++ b/spring-all/src/test/java/org/baeldung/springevents/synchronous/GenericAppEventListenerIntegrationTest.java @@ -0,0 +1,28 @@ +package org.baeldung.springevents.synchronous; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.support.AnnotationConfigContextLoader; + +import static org.springframework.util.Assert.isTrue; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { SynchronousSpringEventsConfig.class }, loader = AnnotationConfigContextLoader.class) +public class GenericAppEventListenerIntegrationTest { + + @Autowired + private CustomSpringEventPublisher publisher; + @Autowired + private GenericSpringEventListener listener; + + @Test + public void testGenericSpringEvent() { + isTrue(!listener.isHitEventHandler(), "The initial value should be false"); + publisher.publishGenericAppEvent("Hello world!!!"); + isTrue(listener.isHitEventHandler(), "Now the value should be changed to true"); + } + +} \ No newline at end of file diff --git a/spring-all/src/test/java/org/baeldung/springevents/synchronous/SynchronousCustomSpringEventsIntegrationTest.java b/spring-all/src/test/java/org/baeldung/springevents/synchronous/SynchronousCustomSpringEventsIntegrationTest.java index f9783f57dc..b169cfec36 100644 --- a/spring-all/src/test/java/org/baeldung/springevents/synchronous/SynchronousCustomSpringEventsIntegrationTest.java +++ b/spring-all/src/test/java/org/baeldung/springevents/synchronous/SynchronousCustomSpringEventsIntegrationTest.java @@ -1,5 +1,6 @@ package org.baeldung.springevents.synchronous; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -7,16 +8,42 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; +import static org.springframework.util.Assert.isTrue; + @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = { SynchronousSpringEventsConfig.class }, loader = AnnotationConfigContextLoader.class) public class SynchronousCustomSpringEventsIntegrationTest { @Autowired private CustomSpringEventPublisher publisher; + @Autowired + private AnnotationDrivenEventListener listener; @Test - public void testCustomSpringEvents() throws InterruptedException { + public void testCustomSpringEvents() { + isTrue(!listener.isHitCustomEventHandler(), "The value should be false"); publisher.publishEvent("Hello world!!"); System.out.println("Done publishing synchronous custom event. "); + isTrue(listener.isHitCustomEventHandler(), "Now the value should be changed to true"); + } + + @Test + public void testGenericSpringEvent() { + isTrue(!listener.isHitSuccessfulEventHandler(), "The initial value should be false"); + publisher.publishGenericEvent("Hello world!!!", true); + isTrue(listener.isHitSuccessfulEventHandler(), "Now the value should be changed to true"); + } + + @Test + public void testGenericSpringEventNotProcessed() { + isTrue(!listener.isHitSuccessfulEventHandler(), "The initial value should be false"); + publisher.publishGenericEvent("Hello world!!!", false); + isTrue(!listener.isHitSuccessfulEventHandler(), "The value should still be false"); + } + + @Ignore("fix me") + @Test + public void testContextStartedEvent() { + isTrue(listener.isHitContextStartedHandler(), "Start should be called once"); } } diff --git a/spring-boot-bootstrap/openshift/configmap.yml b/spring-boot-bootstrap/openshift/configmap.yml new file mode 100644 index 0000000000..931a614436 --- /dev/null +++ b/spring-boot-bootstrap/openshift/configmap.yml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: spring-boot-bootstrap +data: + application.properties: |- + spring.datasource.url=jdbc:mysql://baeldung-db:3306/baeldung_db \ No newline at end of file diff --git a/spring-boot-bootstrap/pom.xml b/spring-boot-bootstrap/pom.xml index b5bcc587b1..b5bf4bc7b6 100644 --- a/spring-boot-bootstrap/pom.xml +++ b/spring-boot-bootstrap/pom.xml @@ -1,231 +1,311 @@ - 4.0.0 - org.baeldung - spring-boot-bootstrap - jar - spring-boot-bootstrap - Demo project for Spring Boot + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + org.baeldung + spring-boot-bootstrap + jar + spring-boot-bootstrap + Demo project for Spring Boot + + parent-boot-2 + com.baeldung + 0.0.1-SNAPSHOT + ../parent-boot-2 + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-data-jpa + + + com.h2database + h2 + + + mysql + mysql-connector-java + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-test + test + + + io.rest-assured + rest-assured + ${rest-assured.version} + test + + + javax.servlet + javax.servlet-api + ${servlet.version} + + - - parent-boot-2 - com.baeldung - 0.0.1-SNAPSHOT - ../parent-boot-2 - - - - - org.springframework.cloud - spring-cloud-dependencies - Finchley.SR1 - pom - import - - - - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.springframework.cloud - spring-cloud-starter - - - org.springframework.boot - spring-boot-starter-cloud-connectors - - - com.h2database - h2 - - - mysql - mysql-connector-java - - - org.springframework.boot - spring-boot-starter-security - - - org.springframework.boot - spring-boot-starter-test - test - - - io.rest-assured - rest-assured - ${rest-assured.version} - test - - - javax.servlet - javax.servlet-api - ${servlet.version} - - - - - - cloud-gcp - - - org.springframework.cloud - spring-cloud-gcp-starter - 1.0.0.RELEASE - - - org.springframework.cloud - spring-cloud-gcp-starter-sql-mysql - 1.0.0.RELEASE - - - - ${project.name}-gcp - - - src/main/resources - - **/logback.xml - - - - - - com.google.cloud.tools - appengine-maven-plugin - 1.3.2 - - - org.springframework.boot - spring-boot-maven-plugin - - - - - - cloudfoundry - - - org.springframework.cloud - spring-cloud-starter - - - org.springframework.boot - spring-boot-starter-cloud-connectors - - - - ${project.name}-cf - - - src/main/resources - - **/logback.xml - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - - - **/cloud/config/*.java - - - - - - - - autoconfiguration - - - - org.apache.maven.plugins - maven-surefire-plugin - - - integration-test - - test - - - - **/*LiveTest.java - **/*IntegrationTest.java - **/*IntTest.java - - - **/AutoconfigurationTest.java - - - - - - - json - - - - - - - - thin-jar - - - - org.springframework.boot.experimental - spring-boot-thin-maven-plugin - ${thin.version} - - - - resolve - - resolve - - false - - - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - **/cloud/*.java - - - - - - - 4.0.0 - + + + openshift + + 0.3.0.RELEASE + Finchley.SR2 + 3.5.37 + + + + + org.springframework.cloud + spring-cloud-kubernetes-dependencies + ${spring-cloud-k8s.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + org.springframework.cloud + spring-cloud-starter-kubernetes-config + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-actuator + + + + + + src/main/resources + + **/logback.xml + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + **/cloud/config/*.java + + + + + org.springframework.boot + spring-boot-maven-plugin + + + io.fabric8 + fabric8-maven-plugin + ${fabric8.maven.plugin.version} + + + fmp + + resource + build + + + + + + + + + cloud-gcp + + + + org.springframework.cloud + spring-cloud-dependencies + Finchley.SR1 + pom + import + + + + + + org.springframework.cloud + spring-cloud-gcp-starter + 1.0.0.RELEASE + + + org.springframework.cloud + spring-cloud-gcp-starter-sql-mysql + 1.0.0.RELEASE + + + + ${project.name}-gcp + + + src/main/resources + + **/logback.xml + + + + + + com.google.cloud.tools + appengine-maven-plugin + 1.3.2 + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + cloudfoundry + + + + org.springframework.cloud + spring-cloud-dependencies + Finchley.SR1 + pom + import + + + + + + org.springframework.cloud + spring-cloud-starter + + + org.springframework.boot + spring-boot-starter-cloud-connectors + + + + ${project.name}-cf + + + src/main/resources + + **/logback.xml + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + + + **/cloud/config/*.java + + + + + + + + autoconfiguration + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration-test + + test + + + + **/*LiveTest.java + **/*IntegrationTest.java + **/*IntTest.java + + + **/AutoconfigurationTest.java + + + + + + + json + + + + + + + + thin-jar + + + + org.springframework.boot.experimental + spring-boot-thin-maven-plugin + ${thin.version} + + + + resolve + + resolve + + false + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + **/cloud/config/*.java + + + + + + + 4.0.0 + diff --git a/spring-boot-bootstrap/src/main/fabric8/deployment.yml b/spring-boot-bootstrap/src/main/fabric8/deployment.yml new file mode 100644 index 0000000000..1bdf1ff167 --- /dev/null +++ b/spring-boot-bootstrap/src/main/fabric8/deployment.yml @@ -0,0 +1,29 @@ +spec: + template: + spec: + containers: + - env: + - name: SPRING_PROFILES_ACTIVE + value: mysql + - name: SPRING_DATASOURCE_USER + valueFrom: + secretKeyRef: + name: baeldung-db + key: database-user + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + name: baeldung-db + key: database-password + livenessProbe: + httpGet: + path: /actuator/health + port: 8080 + scheme: HTTP + initialDelaySeconds: 180 + readinessProbe: + httpGet: + path: /actuator/health + port: 8080 + scheme: HTTP + initialDelaySeconds: 20 \ No newline at end of file diff --git a/spring-boot-security/pom.xml b/spring-boot-security/pom.xml index 6bc013d1ed..d5c7976ba2 100644 --- a/spring-boot-security/pom.xml +++ b/spring-boot-security/pom.xml @@ -3,29 +3,17 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-boot-security - 0.0.1-SNAPSHOT jar spring-boot-security Spring Boot Security Auto-Configuration + parent-boot-1 com.baeldung - parent-modules - 1.0.0-SNAPSHOT + 0.0.1-SNAPSHOT + ../parent-boot-1 - - - - org.springframework.boot - spring-boot-dependencies - ${spring-boot.version} - pom - import - - - - org.springframework.boot @@ -39,7 +27,7 @@ org.springframework.boot spring-boot-starter-web - + org.springframework.security @@ -74,14 +62,8 @@ org.springframework.boot spring-boot-maven-plugin - ${spring-boot-maven-plugin.version} - - 1.5.9.RELEASE - 2.0.4.RELEASE - - diff --git a/spring-cloud/pom.xml b/spring-cloud/pom.xml index 924ea2be36..28db4a7a3d 100644 --- a/spring-cloud/pom.xml +++ b/spring-cloud/pom.xml @@ -37,6 +37,7 @@ spring-cloud-vault spring-cloud-security spring-cloud-task + spring-cloud-zuul @@ -56,8 +57,8 @@ Brixton.SR7 1.2.2.RELEASE 1.2.2.RELEASE - 1.2.3.RELEASE - 1.2.3.RELEASE + 2.0.2.RELEASE + 1.4.6.RELEASE 1.2.3.RELEASE 1.3.0.RELEASE 1.4.2.RELEASE diff --git a/spring-cloud/spring-cloud-eureka/pom.xml b/spring-cloud/spring-cloud-eureka/pom.xml index 37571bc29a..7f7e2650d5 100644 --- a/spring-cloud/spring-cloud-eureka/pom.xml +++ b/spring-cloud/spring-cloud-eureka/pom.xml @@ -23,7 +23,8 @@ - 1.4.2.RELEASE + 2.0.1.RELEASE + Finchley.SR2 diff --git a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/pom.xml b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/pom.xml index 8bc51adcab..0bf9547aff 100644 --- a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/pom.xml +++ b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/pom.xml @@ -20,32 +20,20 @@ org.springframework.cloud - spring-cloud-starter-eureka + spring-cloud-starter-netflix-eureka-client ${spring-cloud-starter-eureka.version} org.springframework.boot spring-boot-starter-web - ${spring-boot-starter-web.version} + ${spring-boot.version} org.springframework.boot spring-boot-starter-test - 1.5.10.RELEASE + ${spring-boot.version} test - - org.springframework.boot - spring-boot-test - 1.5.10.RELEASE - test - - - org.springframework - spring-test - 4.0.5.RELEASE - test - diff --git a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/src/main/java/com/baeldung/spring/cloud/eureka/client/EurekaClientApplication.java b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/src/main/java/com/baeldung/spring/cloud/eureka/client/EurekaClientApplication.java index 48099eeaa2..82b5f6acb1 100644 --- a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/src/main/java/com/baeldung/spring/cloud/eureka/client/EurekaClientApplication.java +++ b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/src/main/java/com/baeldung/spring/cloud/eureka/client/EurekaClientApplication.java @@ -5,13 +5,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.context.annotation.Lazy; -import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @SpringBootApplication -@EnableEurekaClient @RestController public class EurekaClientApplication implements GreetingController { @Autowired diff --git a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/pom.xml b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/pom.xml index 4552c458ec..d572b10d40 100644 --- a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/pom.xml +++ b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/pom.xml @@ -16,25 +16,25 @@ - - com.baeldung.spring.cloud - spring-cloud-eureka-client - ${spring-cloud-eureka-client.version} - org.springframework.cloud spring-cloud-starter-feign ${spring-cloud-starter-feign.version} + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + ${spring-cloud-starter-eureka.version} + org.springframework.boot spring-boot-starter-web - ${spring-boot-starter-web.version} + ${spring-boot.version} org.springframework.boot spring-boot-starter-thymeleaf - ${spring-boot-starter-web.version} + ${spring-boot.version} diff --git a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/src/main/java/com/baeldung/spring/cloud/feign/client/FeignClientApplication.java b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/src/main/java/com/baeldung/spring/cloud/feign/client/FeignClientApplication.java index 7beb51d1ac..b8a6c8232d 100644 --- a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/src/main/java/com/baeldung/spring/cloud/feign/client/FeignClientApplication.java +++ b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/src/main/java/com/baeldung/spring/cloud/feign/client/FeignClientApplication.java @@ -3,14 +3,12 @@ package com.baeldung.spring.cloud.feign.client; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.netflix.eureka.EnableEurekaClient; -import org.springframework.cloud.netflix.feign.EnableFeignClients; +import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; @SpringBootApplication -@EnableEurekaClient @EnableFeignClients @Controller public class FeignClientApplication { diff --git a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/src/main/java/com/baeldung/spring/cloud/feign/client/GreetingClient.java b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/src/main/java/com/baeldung/spring/cloud/feign/client/GreetingClient.java index 6bd444b347..a9977d86d6 100644 --- a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/src/main/java/com/baeldung/spring/cloud/feign/client/GreetingClient.java +++ b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/src/main/java/com/baeldung/spring/cloud/feign/client/GreetingClient.java @@ -1,8 +1,10 @@ package com.baeldung.spring.cloud.feign.client; -import com.baeldung.spring.cloud.eureka.client.GreetingController; -import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.RequestMapping; @FeignClient("spring-cloud-eureka-client") -public interface GreetingClient extends GreetingController { +public interface GreetingClient { + @RequestMapping("/greeting") + String greeting(); } diff --git a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-server/pom.xml b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-server/pom.xml index 8082b30c33..da2c50d3c7 100644 --- a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-server/pom.xml +++ b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-server/pom.xml @@ -18,7 +18,7 @@ org.springframework.cloud - spring-cloud-starter-eureka-server + spring-cloud-starter-netflix-eureka-server ${spring-cloud-starter-eureka.version} diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml index 9c27affb8b..6a5b7ddb55 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml @@ -17,7 +17,7 @@ org.springframework.cloud - spring-cloud-starter-eureka + spring-cloud-starter-netflix-eureka-client ${spring-cloud-starter-eureka.version} diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml index d694c9058b..e3c5109a26 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml @@ -17,7 +17,7 @@ org.springframework.cloud - spring-cloud-starter-eureka-server + spring-cloud-starter-netflix-eureka-server ${spring-cloud-starter-eureka.version} diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml index f4166c7d34..4d3687134f 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml @@ -24,9 +24,11 @@ - 1.4.2.RELEASE + 2.0.1.RELEASE 1.10 1.2.10 + 2.0.1.RELEASE + Finchley.SR2 diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml index 103b8334d3..e64ceb501e 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml @@ -16,11 +16,11 @@ org.springframework.cloud - spring-cloud-starter-zuul + spring-cloud-starter-netflix-zuul org.springframework.cloud - spring-cloud-starter-eureka + spring-cloud-starter-netflix-eureka-client commons-configuration @@ -32,10 +32,6 @@ rxjava ${rxjava.version} - - org.springframework.boot - spring-boot-starter-security - diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/src/main/resources/application.properties b/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/src/main/resources/application.properties index cb1dca78c2..42b4f5eee4 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/src/main/resources/application.properties +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/src/main/resources/application.properties @@ -3,7 +3,4 @@ spring.application.name=zuul-server eureka.instance.preferIpAddress=true eureka.client.registerWithEureka=true eureka.client.fetchRegistry=true -eureka.serviceurl.defaultzone=http://localhost:8761/eureka/ -management.security.enabled=false -security.basic.enabled=false -hystrix.command.default.execution.timeout.enabled=false +eureka.client.serviceUrl.defaultZone=${EUREKA_URI:http://localhost:8761/eureka} \ No newline at end of file diff --git a/spring-cloud/spring-cloud-zuul/pom.xml b/spring-cloud/spring-cloud-zuul/pom.xml new file mode 100644 index 0000000000..e387bacb4e --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/pom.xml @@ -0,0 +1,80 @@ + + + 4.0.0 + + com.baeldung.spring.cloud + spring-cloud-zuul + 0.0.1-SNAPSHOT + jar + + spring-cloud-zuul + Demo project for Spring Boot + + + org.springframework.boot + spring-boot-starter-parent + 2.0.6.RELEASE + + + + + UTF-8 + UTF-8 + 1.8 + Finchley.SR1 + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.cloud + spring-cloud-starter-netflix-zuul + + + com.marcosbarbero.cloud + spring-cloud-zuul-ratelimit + 2.2.0.RELEASE + + + org.springframework.boot + spring-boot-starter-data-jpa + + + com.h2database + h2 + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + diff --git a/spring-cloud/spring-cloud-zuul/src/main/java/com/baeldung/spring/cloud/zuulratelimitdemo/ZuulRatelimitDemoApplication.java b/spring-cloud/spring-cloud-zuul/src/main/java/com/baeldung/spring/cloud/zuulratelimitdemo/ZuulRatelimitDemoApplication.java new file mode 100644 index 0000000000..9b53099768 --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/src/main/java/com/baeldung/spring/cloud/zuulratelimitdemo/ZuulRatelimitDemoApplication.java @@ -0,0 +1,14 @@ +package com.baeldung.spring.cloud.zuulratelimitdemo; + +import org.springframework.boot.SpringApplication; +import org.springframework.cloud.client.SpringCloudApplication; +import org.springframework.cloud.netflix.zuul.EnableZuulProxy; + +@EnableZuulProxy +@SpringCloudApplication +public class ZuulRatelimitDemoApplication { + + public static void main(String[] args) { + SpringApplication.run(ZuulRatelimitDemoApplication.class, args); + } +} diff --git a/spring-cloud/spring-cloud-zuul/src/main/java/com/baeldung/spring/cloud/zuulratelimitdemo/controller/GreetingController.java b/spring-cloud/spring-cloud-zuul/src/main/java/com/baeldung/spring/cloud/zuulratelimitdemo/controller/GreetingController.java new file mode 100644 index 0000000000..3f2ec4822f --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/src/main/java/com/baeldung/spring/cloud/zuulratelimitdemo/controller/GreetingController.java @@ -0,0 +1,21 @@ +package com.baeldung.spring.cloud.zuulratelimitdemo.controller; + +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping("/greeting") +public class GreetingController { + + @GetMapping("/simple") + public ResponseEntity getSimple() { + return ResponseEntity.ok("Hi!"); + } + + @GetMapping("/advanced") + public ResponseEntity getAdvanced() { + return ResponseEntity.ok("Hello, how you doing?"); + } +} diff --git a/spring-cloud/spring-cloud-zuul/src/main/resources/application.yml b/spring-cloud/spring-cloud-zuul/src/main/resources/application.yml new file mode 100644 index 0000000000..86a29ca06d --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/src/main/resources/application.yml @@ -0,0 +1,23 @@ +zuul: + routes: + serviceSimple: + path: /greeting/simple + url: forward:/ + serviceAdvanced: + path: /greeting/advanced + url: forward:/ + ratelimit: + enabled: true + repository: JPA + policy-list: + serviceSimple: + - limit: 5 + refresh-interval: 60 + type: + - origin + serviceAdvanced: + - limit: 1 + refresh-interval: 2 + type: + - origin + strip-prefix: true \ No newline at end of file diff --git a/spring-cloud/spring-cloud-zuul/src/test/java/com/baeldung/spring/cloud/zuulratelimitdemo/controller/GreetingControllerTest.java b/spring-cloud/spring-cloud-zuul/src/test/java/com/baeldung/spring/cloud/zuulratelimitdemo/controller/GreetingControllerTest.java new file mode 100644 index 0000000000..d51f881112 --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/src/test/java/com/baeldung/spring/cloud/zuulratelimitdemo/controller/GreetingControllerTest.java @@ -0,0 +1,112 @@ +package com.baeldung.spring.cloud.zuulratelimitdemo.controller; + +import static com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.support.RateLimitConstants.HEADER_LIMIT; +import static com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.support.RateLimitConstants.HEADER_QUOTA; +import static com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.support.RateLimitConstants.HEADER_REMAINING; +import static com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.support.RateLimitConstants.HEADER_REMAINING_QUOTA; +import static com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.support.RateLimitConstants.HEADER_RESET; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.springframework.http.HttpStatus.OK; +import static org.springframework.http.HttpStatus.TOO_MANY_REQUESTS; + +import java.util.concurrent.TimeUnit; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.http.HttpHeaders; +import org.springframework.http.ResponseEntity; +import org.springframework.test.context.junit4.SpringRunner; + +@AutoConfigureTestDatabase +@RunWith(SpringRunner.class) +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +public class GreetingControllerTest { + + private static final String SIMPLE_GREETING = "/greeting/simple"; + private static final String ADVANCED_GREETING = "/greeting/advanced"; + + @Autowired + private TestRestTemplate restTemplate; + + @Test + public void whenRequestNotExceedingCapacity_thenReturnOkResponse() { + ResponseEntity response = this.restTemplate.getForEntity(SIMPLE_GREETING, String.class); + HttpHeaders headers = response.getHeaders(); + String key = "rate-limit-application_serviceSimple_127.0.0.1"; + + String limit = headers.getFirst(HEADER_LIMIT + key); + String remaining = headers.getFirst(HEADER_REMAINING + key); + String reset = headers.getFirst(HEADER_RESET + key); + + assertEquals(limit, "5"); + assertEquals(remaining, "4"); + assertEquals(reset, "60000"); + + assertEquals(OK, response.getStatusCode()); + } + + @Test + public void whenRequestExceedingCapacity_thenReturnTooManyRequestsResponse() throws InterruptedException { + ResponseEntity response = this.restTemplate.getForEntity(ADVANCED_GREETING, String.class); + HttpHeaders headers = response.getHeaders(); + String key = "rate-limit-application_serviceAdvanced_127.0.0.1"; + assertHeaders(headers, key, false, false); + assertEquals(OK, response.getStatusCode()); + + for (int i = 0; i < 2; i++) { + response = this.restTemplate.getForEntity(ADVANCED_GREETING, String.class); + } + + headers = response.getHeaders(); + String limit = headers.getFirst(HEADER_LIMIT + key); + String remaining = headers.getFirst(HEADER_REMAINING + key); + String reset = headers.getFirst(HEADER_RESET + key); + + assertEquals(limit, "1"); + assertEquals(remaining, "0"); + assertNotEquals(reset, "2000"); + + assertEquals(TOO_MANY_REQUESTS, response.getStatusCode()); + + TimeUnit.SECONDS.sleep(2); + + response = this.restTemplate.getForEntity(ADVANCED_GREETING, String.class); + headers = response.getHeaders(); + assertHeaders(headers, key, false, false); + assertEquals(OK, response.getStatusCode()); + } + + private void assertHeaders(HttpHeaders headers, String key, boolean nullable, boolean quotaHeaders) { + String quota = headers.getFirst(HEADER_QUOTA + key); + String remainingQuota = headers.getFirst(HEADER_REMAINING_QUOTA + key); + String limit = headers.getFirst(HEADER_LIMIT + key); + String remaining = headers.getFirst(HEADER_REMAINING + key); + String reset = headers.getFirst(HEADER_RESET + key); + + if (nullable) { + if (quotaHeaders) { + assertNull(quota); + assertNull(remainingQuota); + } else { + assertNull(limit); + assertNull(remaining); + } + assertNull(reset); + } else { + if (quotaHeaders) { + assertNotNull(quota); + assertNotNull(remainingQuota); + } else { + assertNotNull(limit); + assertNotNull(remaining); + } + assertNotNull(reset); + } + } +} diff --git a/spring-data-rest/src/main/java/com/baeldung/config/RestConfig.java b/spring-data-rest/src/main/java/com/baeldung/config/RestConfig.java index 7434dde394..39f90e867b 100644 --- a/spring-data-rest/src/main/java/com/baeldung/config/RestConfig.java +++ b/spring-data-rest/src/main/java/com/baeldung/config/RestConfig.java @@ -1,17 +1,21 @@ package com.baeldung.config; +import com.baeldung.models.WebsiteUser; +import com.baeldung.projections.CustomBook; import org.springframework.context.annotation.Configuration; import org.springframework.data.rest.core.config.RepositoryRestConfiguration; -import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter; - -import com.baeldung.projections.CustomBook; - +import org.springframework.data.rest.core.mapping.ExposureConfiguration; +import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer; +import org.springframework.http.HttpMethod; @Configuration -public class RestConfig extends RepositoryRestConfigurerAdapter{ +public class RestConfig implements RepositoryRestConfigurer { @Override public void configureRepositoryRestConfiguration(RepositoryRestConfiguration repositoryRestConfiguration){ repositoryRestConfiguration.getProjectionConfiguration().addProjection(CustomBook.class); + ExposureConfiguration config = repositoryRestConfiguration.getExposureConfiguration(); + config.forDomainType(WebsiteUser.class).withItemExposure((metadata, httpMethods) -> + httpMethods.disable(HttpMethod.PATCH)); } } diff --git a/spring-data-rest/src/main/java/com/baeldung/repositories/UserRepository.java b/spring-data-rest/src/main/java/com/baeldung/repositories/UserRepository.java index 2bd9c025dd..a3fed1c318 100644 --- a/spring-data-rest/src/main/java/com/baeldung/repositories/UserRepository.java +++ b/spring-data-rest/src/main/java/com/baeldung/repositories/UserRepository.java @@ -1,12 +1,32 @@ package com.baeldung.repositories; import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import org.springframework.data.rest.core.annotation.RestResource; import org.springframework.web.bind.annotation.CrossOrigin; import com.baeldung.models.WebsiteUser; @CrossOrigin @RepositoryRestResource(collectionResourceRel = "users", path = "users") public interface UserRepository extends CrudRepository { - + + @Override + @RestResource(exported = false) + void delete(WebsiteUser entity); + + @Override + @RestResource(exported = false) + void deleteAll(); + + @Override + @RestResource(exported = false) + void deleteAll(Iterable entities); + + @Override + @RestResource(exported = false) + void deleteById(Long aLong); + + @RestResource(path = "byEmail", rel = "customFindMethod") + WebsiteUser findByEmail(@Param("email") String email); } diff --git a/spring-data-rest/src/test/java/com/baeldung/validator/SpringDataRestValidatorIntegrationTest.java b/spring-data-rest/src/test/java/com/baeldung/validator/SpringDataRestValidatorIntegrationTest.java index 4c936ffc1c..d41736e434 100644 --- a/spring-data-rest/src/test/java/com/baeldung/validator/SpringDataRestValidatorIntegrationTest.java +++ b/spring-data-rest/src/test/java/com/baeldung/validator/SpringDataRestValidatorIntegrationTest.java @@ -1,11 +1,8 @@ package com.baeldung.validator; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.redirectedUrl; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup; - +import com.baeldung.SpringDataRestApplication; +import com.baeldung.models.WebsiteUser; +import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -17,9 +14,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.web.context.WebApplicationContext; -import com.baeldung.SpringDataRestApplication; -import com.baeldung.models.WebsiteUser; -import com.fasterxml.jackson.databind.ObjectMapper; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.redirectedUrl; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup; @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = SpringDataRestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.MOCK) @@ -84,4 +82,30 @@ public class SpringDataRestValidatorIntegrationTest { mockMvc.perform(post("/users", user).contentType(MediaType.APPLICATION_JSON).content(new ObjectMapper().writeValueAsString(user))).andExpect(status().isNotAcceptable()).andExpect(redirectedUrl(null)); } + @Test + public void whenDeletingCorrectUser_thenCorrectStatusCodeAndResponse() throws Exception { + WebsiteUser user = new WebsiteUser(); + user.setEmail("john.doe@john.com"); + user.setName("John Doe"); + mockMvc.perform(post("/users", user).contentType(MediaType.APPLICATION_JSON).content(new ObjectMapper().writeValueAsString(user))).andExpect(status().is2xxSuccessful()).andExpect(redirectedUrl("http://localhost/users/1")); + mockMvc.perform(delete("/users/1").contentType(MediaType.APPLICATION_JSON).content(new ObjectMapper().writeValueAsString(user))).andExpect(status().isMethodNotAllowed()); + } + + @Test + public void whenSearchingByEmail_thenCorrectStatusCodeAndResponse() throws Exception { + WebsiteUser user = new WebsiteUser(); + user.setEmail("john.doe@john.com"); + user.setName("John Doe"); + mockMvc.perform(post("/users", user).contentType(MediaType.APPLICATION_JSON).content(new ObjectMapper().writeValueAsString(user))).andExpect(status().is2xxSuccessful()).andExpect(redirectedUrl("http://localhost/users/1")); + mockMvc.perform(get("/users/search/byEmail").param("email", user.getEmail()).contentType(MediaType.APPLICATION_JSON)).andExpect(status().is2xxSuccessful()); + } + + @Test + public void whenSearchingByEmailWithOriginalMethodName_thenErrorStatusCodeAndResponse() throws Exception { + WebsiteUser user = new WebsiteUser(); + user.setEmail("john.doe@john.com"); + user.setName("John Doe"); + mockMvc.perform(post("/users", user).contentType(MediaType.APPLICATION_JSON).content(new ObjectMapper().writeValueAsString(user))).andExpect(status().is2xxSuccessful()).andExpect(redirectedUrl("http://localhost/users/1")); + mockMvc.perform(get("/users/search/findByEmail").param("email", user.getEmail()).contentType(MediaType.APPLICATION_JSON)).andExpect(status().isNotFound()); + } } diff --git a/spring-ejb/README.md b/spring-ejb/README.md index d09b27db27..58ccb20e70 100644 --- a/spring-ejb/README.md +++ b/spring-ejb/README.md @@ -1,4 +1,9 @@ ### Relevant Articles +- [Guide to EJB Set-up](http://www.baeldung.com/ejb-intro) +- [Java EE Session Beans](http://www.baeldung.com/ejb-session-beans) +- [Introduction to EJB JNDI Lookup on WildFly Application Server](http://www.baeldung.com/wildfly-ejb-jndi) +- [A Guide to Message Driven Beans in EJB](http://www.baeldung.com/ejb-message-driven-beans) - [Integration Guide for Spring and EJB](http://www.baeldung.com/spring-ejb) - [Singleton Session Bean in Java EE](http://www.baeldung.com/java-ee-singleton-session-bean) + diff --git a/spring-ejb/ejb-beans/pom.xml b/spring-ejb/ejb-beans/pom.xml index 76c0afadee..168809ee6d 100644 --- a/spring-ejb/ejb-beans/pom.xml +++ b/spring-ejb/ejb-beans/pom.xml @@ -3,21 +3,31 @@ 4.0.0 com.baeldung.singletonsession ejb-beans - 1.0.0-SNAPSHOT - EJB Beans + spring-ejb-beans com.baeldung.spring.ejb spring-ejb - 1.0.1 + 1.0.0-SNAPSHOT + + + + org.jboss.arquillian + arquillian-bom + ${arquillian-bom.version} + import + pom + + + + javax javaee-api - ${javaee.version} provided @@ -26,10 +36,49 @@ tomee-embedded ${tomee-embedded.version} + + org.jboss.arquillian.junit + arquillian-junit-container + test + + + + arquillian-glassfish-embedded + + + org.jboss.arquillian.container + arquillian-glassfish-embedded-3.1 + ${arquillian-glassfish-embedded-3.1.version} + test + + + org.glassfish.main.extras + glassfish-embedded-all + ${glassfish-embedded-all.version} + test + + + + + + + + + maven-war-plugin + ${maven-war-plugin.version} + + false + + + + + 1.1.13.Final 1.7.5 + 3.1.2 + 1.0.0.CR4 diff --git a/ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateful/EJBClient1.java b/spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateful/EJBClient1.java similarity index 100% rename from ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateful/EJBClient1.java rename to spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateful/EJBClient1.java diff --git a/ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateful/EJBClient2.java b/spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateful/EJBClient2.java similarity index 100% rename from ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateful/EJBClient2.java rename to spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateful/EJBClient2.java diff --git a/ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateful/StatefulEJB.java b/spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateful/StatefulEJB.java similarity index 100% rename from ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateful/StatefulEJB.java rename to spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateful/StatefulEJB.java diff --git a/ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateless/EJBClient1.java b/spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateless/EJBClient1.java similarity index 100% rename from ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateless/EJBClient1.java rename to spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateless/EJBClient1.java diff --git a/ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateless/EJBClient2.java b/spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateless/EJBClient2.java similarity index 100% rename from ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateless/EJBClient2.java rename to spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateless/EJBClient2.java diff --git a/ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateless/StatelessEJB.java b/spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateless/StatelessEJB.java similarity index 100% rename from ejb/ejb-session-beans/src/main/java/com/baeldung/ejb/stateless/StatelessEJB.java rename to spring-ejb/ejb-beans/src/main/java/com/baeldung/ejb/stateless/StatelessEJB.java diff --git a/ejb/ejb-session-beans/src/test/java/com/baeldung/ejb/test/stateful/StatefulEJBIntegrationTest.java b/spring-ejb/ejb-beans/src/test/java/com/baeldung/ejb/stateful/StatefulEJBIntegrationTest.java similarity index 97% rename from ejb/ejb-session-beans/src/test/java/com/baeldung/ejb/test/stateful/StatefulEJBIntegrationTest.java rename to spring-ejb/ejb-beans/src/test/java/com/baeldung/ejb/stateful/StatefulEJBIntegrationTest.java index cc35921e45..75f7132c62 100644 --- a/ejb/ejb-session-beans/src/test/java/com/baeldung/ejb/test/stateful/StatefulEJBIntegrationTest.java +++ b/spring-ejb/ejb-beans/src/test/java/com/baeldung/ejb/stateful/StatefulEJBIntegrationTest.java @@ -1,4 +1,4 @@ -package com.baeldung.ejb.test.stateful; +package com.baeldung.ejb.stateful; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; diff --git a/ejb/ejb-session-beans/src/test/java/com/baeldung/ejb/test/stateless/StatelessEJBIntegrationTest.java b/spring-ejb/ejb-beans/src/test/java/com/baeldung/ejb/stateless/StatelessEJBIntegrationTest.java similarity index 97% rename from ejb/ejb-session-beans/src/test/java/com/baeldung/ejb/test/stateless/StatelessEJBIntegrationTest.java rename to spring-ejb/ejb-beans/src/test/java/com/baeldung/ejb/stateless/StatelessEJBIntegrationTest.java index c80ca93c0d..a970ef90ae 100644 --- a/ejb/ejb-session-beans/src/test/java/com/baeldung/ejb/test/stateless/StatelessEJBIntegrationTest.java +++ b/spring-ejb/ejb-beans/src/test/java/com/baeldung/ejb/stateless/StatelessEJBIntegrationTest.java @@ -1,4 +1,4 @@ -package com.baeldung.ejb.test.stateless; +package com.baeldung.ejb.stateless; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; diff --git a/spring-ejb/ejb-beans/src/test/java/com/baeldung/singletonbean/CountryStateCacheBeanUnitTest.java b/spring-ejb/ejb-beans/src/test/java/com/baeldung/singletonbean/CountryStateCacheBeanUnitTest.java index 4cec01a4f7..615ddd1422 100644 --- a/spring-ejb/ejb-beans/src/test/java/com/baeldung/singletonbean/CountryStateCacheBeanUnitTest.java +++ b/spring-ejb/ejb-beans/src/test/java/com/baeldung/singletonbean/CountryStateCacheBeanUnitTest.java @@ -4,7 +4,6 @@ import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertNotNull; import java.util.Arrays; -import java.util.Collections; import java.util.List; import javax.ejb.embeddable.EJBContainer; @@ -22,7 +21,6 @@ public class CountryStateCacheBeanUnitTest { @Before public void init() { - ejbContainer = EJBContainer.createEJBContainer(); context = ejbContainer.getContext(); } diff --git a/spring-ejb/ejb-remote-for-spring/pom.xml b/spring-ejb/ejb-remote-for-spring/pom.xml deleted file mode 100755 index 21256fa801..0000000000 --- a/spring-ejb/ejb-remote-for-spring/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - 4.0.0 - ejb-remote-for-spring - ejb - - - com.baeldung.spring.ejb - spring-ejb - 1.0.1 - - - - - javax - javaee-api - provided - - - org.assertj - assertj-core - ${assertj.version} - test - - - - - - - - wildfly-standalone - - false - - - - - org.codehaus.cargo - cargo-maven2-plugin - ${cargo-maven2-plugin.version} - - - - - wildfly10x - - http://download.jboss.org/wildfly/12.0.0.Final/wildfly-12.0.0.Final.zip - - - - - - 127.0.0.1 - standalone-full - 9990 - testUser:admin1234! - - - - - - - - - - - - 3.9.0 - 1.6.1 - - - - - diff --git a/spring-ejb/ejb-remote-for-spring/src/main/resources/logback.xml b/spring-ejb/ejb-remote-for-spring/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/spring-ejb/ejb-remote-for-spring/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/spring-ejb/pom.xml b/spring-ejb/pom.xml index 055df9ea04..688f692757 100755 --- a/spring-ejb/pom.xml +++ b/spring-ejb/pom.xml @@ -4,7 +4,6 @@ 4.0.0 com.baeldung.spring.ejb spring-ejb - 1.0.1 pom spring-ejb Spring EJB Tutorial @@ -36,8 +35,8 @@ com.baeldung.spring.ejb - ejb-remote-for-spring - ${ejb-remote-for-spring.version} + spring-ejb-remote + ${spring-ejb-remote.version} ejb @@ -71,13 +70,14 @@ - ejb-remote-for-spring + spring-ejb-remote ejb-beans spring-ejb-client + wildfly - 1.0.1 + 1.0.0-SNAPSHOT 8.0 12.0.0.Final 2.4 diff --git a/spring-ejb/spring-ejb-client/pom.xml b/spring-ejb/spring-ejb-client/pom.xml index 50337e8b21..3d8003cbba 100644 --- a/spring-ejb/spring-ejb-client/pom.xml +++ b/spring-ejb/spring-ejb-client/pom.xml @@ -12,7 +12,7 @@ com.baeldung.spring.ejb spring-ejb - 1.0.1 + 1.0.0-SNAPSHOT @@ -36,14 +36,12 @@ org.wildfly wildfly-ejb-client-bom - ${wildfly-ejb.version} pom com.baeldung.spring.ejb - ejb-remote-for-spring - ${ejb-remote-for-spring.version} + spring-ejb-remote ejb @@ -70,9 +68,4 @@ - - 1.0.1 - 12.0.0.Final - - diff --git a/ejb/ejb-client/src/main/java/com/baeldung/ejb/client/EJBClient.java b/spring-ejb/spring-ejb-client/src/main/java/com/baeldung/ejb/client/EJBClient.java old mode 100755 new mode 100644 similarity index 97% rename from ejb/ejb-client/src/main/java/com/baeldung/ejb/client/EJBClient.java rename to spring-ejb/spring-ejb-client/src/main/java/com/baeldung/ejb/client/EJBClient.java index ebd6ef1b97..0c87e927a6 --- a/ejb/ejb-client/src/main/java/com/baeldung/ejb/client/EJBClient.java +++ b/spring-ejb/spring-ejb-client/src/main/java/com/baeldung/ejb/client/EJBClient.java @@ -41,7 +41,7 @@ public class EJBClient { // Since we haven't deployed the application as a .ear, the app name for // us will be an empty string final String appName = ""; - final String moduleName = "remote"; + final String moduleName = "spring-ejb-remote"; final String distinctName = ""; final String beanName = "HelloWorld"; final String viewClassName = HelloWorld.class.getName(); diff --git a/ejb/ejb-client/src/main/java/com/baeldung/ejb/wildfly/TextApplication.java b/spring-ejb/spring-ejb-client/src/main/java/com/baeldung/ejb/wildfly/TextApplication.java similarity index 96% rename from ejb/ejb-client/src/main/java/com/baeldung/ejb/wildfly/TextApplication.java rename to spring-ejb/spring-ejb-client/src/main/java/com/baeldung/ejb/wildfly/TextApplication.java index 3b63761c73..40264ff5e2 100644 --- a/ejb/ejb-client/src/main/java/com/baeldung/ejb/wildfly/TextApplication.java +++ b/spring-ejb/spring-ejb-client/src/main/java/com/baeldung/ejb/wildfly/TextApplication.java @@ -21,7 +21,7 @@ public class TextApplication { private static TextProcessorRemote lookupTextProcessorBean(String namespace) throws NamingException { Context ctx = createInitialContext(); final String appName = ""; - final String moduleName = "EJBModule"; + final String moduleName = "spring-ejb-remote"; final String distinctName = ""; final String beanName = TextProcessorBean.class.getSimpleName(); final String viewClassName = TextProcessorRemote.class.getName(); diff --git a/spring-ejb/spring-ejb-client/src/main/java/com/baeldung/springejbclient/SpringEjbClientApplication.java b/spring-ejb/spring-ejb-client/src/main/java/com/baeldung/springejbclient/SpringEjbClientApplication.java index 0a1e389113..554fac3417 100644 --- a/spring-ejb/spring-ejb-client/src/main/java/com/baeldung/springejbclient/SpringEjbClientApplication.java +++ b/spring-ejb/spring-ejb-client/src/main/java/com/baeldung/springejbclient/SpringEjbClientApplication.java @@ -37,7 +37,7 @@ public class SpringEjbClientApplication { @SuppressWarnings("rawtypes") private String getFullName(Class classType) { - String moduleName = "ejb-remote-for-spring/"; + String moduleName = "spring-ejb-remote/"; String beanName = classType.getSimpleName(); String viewClassName = classType.getName(); diff --git a/ejb/ejb-client/src/main/resources/jboss-ejb-client.properties b/spring-ejb/spring-ejb-client/src/main/resources/jboss-ejb-client.properties old mode 100755 new mode 100644 similarity index 100% rename from ejb/ejb-client/src/main/resources/jboss-ejb-client.properties rename to spring-ejb/spring-ejb-client/src/main/resources/jboss-ejb-client.properties diff --git a/ejb/ejb-client/src/test/java/com/baeldung/ejb/setup/test/EJBSetupIntegrationTest.java b/spring-ejb/spring-ejb-client/src/test/java/com/baeldung/ejb/setup/test/EJBSetupIntegrationTest.java old mode 100755 new mode 100644 similarity index 100% rename from ejb/ejb-client/src/test/java/com/baeldung/ejb/setup/test/EJBSetupIntegrationTest.java rename to spring-ejb/spring-ejb-client/src/test/java/com/baeldung/ejb/setup/test/EJBSetupIntegrationTest.java diff --git a/ejb/ejb-client/src/test/java/com/baeldung/ejb/wildfly/TextApplicationIntegrationTest.java b/spring-ejb/spring-ejb-client/src/test/java/com/baeldung/ejb/wildfly/TextApplicationIntegrationTest.java similarity index 100% rename from ejb/ejb-client/src/test/java/com/baeldung/ejb/wildfly/TextApplicationIntegrationTest.java rename to spring-ejb/spring-ejb-client/src/test/java/com/baeldung/ejb/wildfly/TextApplicationIntegrationTest.java diff --git a/ejb/ejb-remote/pom.xml b/spring-ejb/spring-ejb-remote/pom.xml old mode 100755 new mode 100644 similarity index 80% rename from ejb/ejb-remote/pom.xml rename to spring-ejb/spring-ejb-remote/pom.xml index dac2fefb84..4756846cc8 --- a/ejb/ejb-remote/pom.xml +++ b/spring-ejb/spring-ejb-remote/pom.xml @@ -2,13 +2,13 @@ 4.0.0 - ejb-remote + spring-ejb-remote ejb - com.baeldung.ejb - ejb - 1.0-SNAPSHOT + com.baeldung.spring.ejb + spring-ejb + 1.0.0-SNAPSHOT @@ -17,14 +17,21 @@ javaee-api provided + + org.assertj + assertj-core + ${assertj.version} + test + + - + wildfly-standalone - true + false @@ -38,13 +45,14 @@ wildfly10x - http://download.jboss.org/wildfly/10.1.0.Final/wildfly-10.1.0.Final.zip + http://download.jboss.org/wildfly/12.0.0.Final/wildfly-12.0.0.Final.zip 127.0.0.1 + standalone-full 9990 testUser:admin1234! @@ -82,7 +90,7 @@ - 7.0 + 3.9.0 1.6.1 1.1.0.Alpha5 diff --git a/spring-ejb/ejb-remote-for-spring/src/main/java/com/baeldung/ejb/tutorial/HelloStatefulWorld.java b/spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloStatefulWorld.java similarity index 100% rename from spring-ejb/ejb-remote-for-spring/src/main/java/com/baeldung/ejb/tutorial/HelloStatefulWorld.java rename to spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloStatefulWorld.java diff --git a/spring-ejb/ejb-remote-for-spring/src/main/java/com/baeldung/ejb/tutorial/HelloStatefulWorldBean.java b/spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloStatefulWorldBean.java similarity index 100% rename from spring-ejb/ejb-remote-for-spring/src/main/java/com/baeldung/ejb/tutorial/HelloStatefulWorldBean.java rename to spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloStatefulWorldBean.java diff --git a/spring-ejb/ejb-remote-for-spring/src/main/java/com/baeldung/ejb/tutorial/HelloStatelessWorld.java b/spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloStatelessWorld.java old mode 100755 new mode 100644 similarity index 100% rename from spring-ejb/ejb-remote-for-spring/src/main/java/com/baeldung/ejb/tutorial/HelloStatelessWorld.java rename to spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloStatelessWorld.java diff --git a/spring-ejb/ejb-remote-for-spring/src/main/java/com/baeldung/ejb/tutorial/HelloStatelessWorldBean.java b/spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloStatelessWorldBean.java old mode 100755 new mode 100644 similarity index 100% rename from spring-ejb/ejb-remote-for-spring/src/main/java/com/baeldung/ejb/tutorial/HelloStatelessWorldBean.java rename to spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloStatelessWorldBean.java diff --git a/ejb/ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloWorld.java b/spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloWorld.java old mode 100755 new mode 100644 similarity index 100% rename from ejb/ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloWorld.java rename to spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloWorld.java diff --git a/ejb/ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloWorldBean.java b/spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloWorldBean.java old mode 100755 new mode 100644 similarity index 100% rename from ejb/ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloWorldBean.java rename to spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/tutorial/HelloWorldBean.java diff --git a/ejb/ejb-remote/src/main/java/com/baeldung/ejb/wildfly/TextProcessorBean.java b/spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/wildfly/TextProcessorBean.java similarity index 100% rename from ejb/ejb-remote/src/main/java/com/baeldung/ejb/wildfly/TextProcessorBean.java rename to spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/wildfly/TextProcessorBean.java diff --git a/ejb/ejb-remote/src/main/java/com/baeldung/ejb/wildfly/TextProcessorRemote.java b/spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/wildfly/TextProcessorRemote.java similarity index 100% rename from ejb/ejb-remote/src/main/java/com/baeldung/ejb/wildfly/TextProcessorRemote.java rename to spring-ejb/spring-ejb-remote/src/main/java/com/baeldung/ejb/wildfly/TextProcessorRemote.java diff --git a/spring-ejb/ejb-remote-for-spring/src/main/resources/META-INF/ejb-jar.xml b/spring-ejb/spring-ejb-remote/src/main/resources/META-INF/ejb-jar.xml old mode 100755 new mode 100644 similarity index 84% rename from spring-ejb/ejb-remote-for-spring/src/main/resources/META-INF/ejb-jar.xml rename to spring-ejb/spring-ejb-remote/src/main/resources/META-INF/ejb-jar.xml index f51523ac14..e53ed00e98 --- a/spring-ejb/ejb-remote-for-spring/src/main/resources/META-INF/ejb-jar.xml +++ b/spring-ejb/spring-ejb-remote/src/main/resources/META-INF/ejb-jar.xml @@ -2,6 +2,6 @@ - ejb-remote-for-spring + spring-ejb-remote diff --git a/ejb/ejb-client/src/main/resources/logback.xml b/spring-ejb/spring-ejb-remote/src/main/resources/logback.xml similarity index 100% rename from ejb/ejb-client/src/main/resources/logback.xml rename to spring-ejb/spring-ejb-remote/src/main/resources/logback.xml diff --git a/spring-ejb/ejb-remote-for-spring/src/test/java/com/baeldung/ejb/tutorial/HelloStatefulWorldTestUnitTest.java b/spring-ejb/spring-ejb-remote/src/test/java/com/baeldung/ejb/tutorial/HelloStatefulWorldTestUnitTest.java similarity index 100% rename from spring-ejb/ejb-remote-for-spring/src/test/java/com/baeldung/ejb/tutorial/HelloStatefulWorldTestUnitTest.java rename to spring-ejb/spring-ejb-remote/src/test/java/com/baeldung/ejb/tutorial/HelloStatefulWorldTestUnitTest.java diff --git a/spring-ejb/ejb-remote-for-spring/src/test/java/com/baeldung/ejb/tutorial/HelloStatelessWorldTestUnitTest.java b/spring-ejb/spring-ejb-remote/src/test/java/com/baeldung/ejb/tutorial/HelloStatelessWorldTestUnitTest.java similarity index 100% rename from spring-ejb/ejb-remote-for-spring/src/test/java/com/baeldung/ejb/tutorial/HelloStatelessWorldTestUnitTest.java rename to spring-ejb/spring-ejb-remote/src/test/java/com/baeldung/ejb/tutorial/HelloStatelessWorldTestUnitTest.java diff --git a/ejb/wildfly/pom.xml b/spring-ejb/wildfly/pom.xml similarity index 94% rename from ejb/wildfly/pom.xml rename to spring-ejb/wildfly/pom.xml index 53d10a90ed..8f7d4c287a 100644 --- a/ejb/wildfly/pom.xml +++ b/spring-ejb/wildfly/pom.xml @@ -2,15 +2,15 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.baeldung.wildfly - wildfly + wildfly-example 0.0.1-SNAPSHOT pom - wildfly + wildfly-example - com.baeldung.ejb - ejb - 1.0-SNAPSHOT + com.baeldung.spring.ejb + spring-ejb + 1.0.0-SNAPSHOT diff --git a/ejb/wildfly/widlfly-web/pom.xml b/spring-ejb/wildfly/widlfly-web/pom.xml similarity index 100% rename from ejb/wildfly/widlfly-web/pom.xml rename to spring-ejb/wildfly/widlfly-web/pom.xml diff --git a/ejb/wildfly/widlfly-web/src/main/java/TestEJBServlet.java b/spring-ejb/wildfly/widlfly-web/src/main/java/TestEJBServlet.java similarity index 100% rename from ejb/wildfly/widlfly-web/src/main/java/TestEJBServlet.java rename to spring-ejb/wildfly/widlfly-web/src/main/java/TestEJBServlet.java diff --git a/ejb/wildfly/widlfly-web/src/main/java/TestJPAServlet.java b/spring-ejb/wildfly/widlfly-web/src/main/java/TestJPAServlet.java similarity index 100% rename from ejb/wildfly/widlfly-web/src/main/java/TestJPAServlet.java rename to spring-ejb/wildfly/widlfly-web/src/main/java/TestJPAServlet.java diff --git a/ejb/ejb-remote/src/main/resources/logback.xml b/spring-ejb/wildfly/widlfly-web/src/main/resources/logback.xml similarity index 100% rename from ejb/ejb-remote/src/main/resources/logback.xml rename to spring-ejb/wildfly/widlfly-web/src/main/resources/logback.xml diff --git a/ejb/wildfly/widlfly-web/src/main/webapp/WEB-INF/web.xml b/spring-ejb/wildfly/widlfly-web/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from ejb/wildfly/widlfly-web/src/main/webapp/WEB-INF/web.xml rename to spring-ejb/wildfly/widlfly-web/src/main/webapp/WEB-INF/web.xml diff --git a/ejb/wildfly/wildfly-ear/pom.xml b/spring-ejb/wildfly/wildfly-ear/pom.xml similarity index 100% rename from ejb/wildfly/wildfly-ear/pom.xml rename to spring-ejb/wildfly/wildfly-ear/pom.xml diff --git a/ejb/wildfly/wildfly-ejb-interfaces/pom.xml b/spring-ejb/wildfly/wildfly-ejb-interfaces/pom.xml similarity index 100% rename from ejb/wildfly/wildfly-ejb-interfaces/pom.xml rename to spring-ejb/wildfly/wildfly-ejb-interfaces/pom.xml diff --git a/ejb/wildfly/wildfly-ejb-interfaces/src/main/java/wildfly/beans/UserBeanLocal.java b/spring-ejb/wildfly/wildfly-ejb-interfaces/src/main/java/wildfly/beans/UserBeanLocal.java similarity index 100% rename from ejb/wildfly/wildfly-ejb-interfaces/src/main/java/wildfly/beans/UserBeanLocal.java rename to spring-ejb/wildfly/wildfly-ejb-interfaces/src/main/java/wildfly/beans/UserBeanLocal.java diff --git a/ejb/wildfly/wildfly-ejb-interfaces/src/main/java/wildfly/beans/UserBeanRemote.java b/spring-ejb/wildfly/wildfly-ejb-interfaces/src/main/java/wildfly/beans/UserBeanRemote.java similarity index 100% rename from ejb/wildfly/wildfly-ejb-interfaces/src/main/java/wildfly/beans/UserBeanRemote.java rename to spring-ejb/wildfly/wildfly-ejb-interfaces/src/main/java/wildfly/beans/UserBeanRemote.java diff --git a/ejb/ejb-session-beans/src/main/resources/logback.xml b/spring-ejb/wildfly/wildfly-ejb-interfaces/src/main/resources/logback.xml similarity index 100% rename from ejb/ejb-session-beans/src/main/resources/logback.xml rename to spring-ejb/wildfly/wildfly-ejb-interfaces/src/main/resources/logback.xml diff --git a/ejb/wildfly/wildfly-ejb/pom.xml b/spring-ejb/wildfly/wildfly-ejb/pom.xml similarity index 100% rename from ejb/wildfly/wildfly-ejb/pom.xml rename to spring-ejb/wildfly/wildfly-ejb/pom.xml diff --git a/ejb/wildfly/wildfly-ejb/src/main/java/wildfly/beans/UserBean.java b/spring-ejb/wildfly/wildfly-ejb/src/main/java/wildfly/beans/UserBean.java similarity index 100% rename from ejb/wildfly/wildfly-ejb/src/main/java/wildfly/beans/UserBean.java rename to spring-ejb/wildfly/wildfly-ejb/src/main/java/wildfly/beans/UserBean.java diff --git a/ejb/wildfly/widlfly-web/src/main/resources/logback.xml b/spring-ejb/wildfly/wildfly-ejb/src/main/resources/logback.xml similarity index 100% rename from ejb/wildfly/widlfly-web/src/main/resources/logback.xml rename to spring-ejb/wildfly/wildfly-ejb/src/main/resources/logback.xml diff --git a/ejb/wildfly/wildfly-jpa/pom.xml b/spring-ejb/wildfly/wildfly-jpa/pom.xml similarity index 100% rename from ejb/wildfly/wildfly-jpa/pom.xml rename to spring-ejb/wildfly/wildfly-jpa/pom.xml diff --git a/ejb/wildfly/wildfly-jpa/src/main/java/model/User.java b/spring-ejb/wildfly/wildfly-jpa/src/main/java/model/User.java similarity index 100% rename from ejb/wildfly/wildfly-jpa/src/main/java/model/User.java rename to spring-ejb/wildfly/wildfly-jpa/src/main/java/model/User.java diff --git a/ejb/wildfly/wildfly-jpa/src/main/resources/META-INF/persistence.xml b/spring-ejb/wildfly/wildfly-jpa/src/main/resources/META-INF/persistence.xml similarity index 100% rename from ejb/wildfly/wildfly-jpa/src/main/resources/META-INF/persistence.xml rename to spring-ejb/wildfly/wildfly-jpa/src/main/resources/META-INF/persistence.xml diff --git a/ejb/wildfly/wildfly-jpa/src/main/resources/data.sql b/spring-ejb/wildfly/wildfly-jpa/src/main/resources/data.sql similarity index 100% rename from ejb/wildfly/wildfly-jpa/src/main/resources/data.sql rename to spring-ejb/wildfly/wildfly-jpa/src/main/resources/data.sql diff --git a/ejb/wildfly/wildfly-ejb-interfaces/src/main/resources/logback.xml b/spring-ejb/wildfly/wildfly-jpa/src/main/resources/logback.xml similarity index 100% rename from ejb/wildfly/wildfly-ejb-interfaces/src/main/resources/logback.xml rename to spring-ejb/wildfly/wildfly-jpa/src/main/resources/logback.xml diff --git a/ejb/wildfly/wildfly-mdb/pom.xml b/spring-ejb/wildfly/wildfly-mdb/pom.xml similarity index 100% rename from ejb/wildfly/wildfly-mdb/pom.xml rename to spring-ejb/wildfly/wildfly-mdb/pom.xml diff --git a/ejb/wildfly/wildfly-mdb/src/com/baeldung/wildfly/mdb/ReadMessageMDB.java b/spring-ejb/wildfly/wildfly-mdb/src/com/baeldung/wildfly/mdb/ReadMessageMDB.java similarity index 100% rename from ejb/wildfly/wildfly-mdb/src/com/baeldung/wildfly/mdb/ReadMessageMDB.java rename to spring-ejb/wildfly/wildfly-mdb/src/com/baeldung/wildfly/mdb/ReadMessageMDB.java diff --git a/ejb/wildfly/wildfly-mdb/src/com/baeldung/wildfly/mdb/SendMessageServlet.java b/spring-ejb/wildfly/wildfly-mdb/src/com/baeldung/wildfly/mdb/SendMessageServlet.java similarity index 100% rename from ejb/wildfly/wildfly-mdb/src/com/baeldung/wildfly/mdb/SendMessageServlet.java rename to spring-ejb/wildfly/wildfly-mdb/src/com/baeldung/wildfly/mdb/SendMessageServlet.java diff --git a/spring-integration/src/main/java/com/baeldung/subflows/publishsubscribechannel/PublishSubscibeChannelExample.java b/spring-integration/src/main/java/com/baeldung/subflows/publishsubscribechannel/PublishSubscibeChannelExample.java new file mode 100644 index 0000000000..e26f938632 --- /dev/null +++ b/spring-integration/src/main/java/com/baeldung/subflows/publishsubscribechannel/PublishSubscibeChannelExample.java @@ -0,0 +1,63 @@ +package com.baeldung.subflows.publishsubscribechannel; + +import java.util.Arrays; +import java.util.Collection; + +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.integration.annotation.Gateway; +import org.springframework.integration.annotation.IntegrationComponentScan; +import org.springframework.integration.annotation.MessagingGateway; +import org.springframework.integration.channel.DirectChannel; +import org.springframework.integration.config.EnableIntegration; +import org.springframework.integration.dsl.IntegrationFlow; + +@EnableIntegration +@IntegrationComponentScan +public class PublishSubscibeChannelExample { + @MessagingGateway + public interface NumbersClassifier { + @Gateway(requestChannel = "flow.input") + void flow(Collection numbers); + } + + @Bean + DirectChannel multipleof3Channel() { + return new DirectChannel(); + } + + @Bean + DirectChannel remainderIs1Channel() { + return new DirectChannel(); + } + + @Bean + DirectChannel remainderIs2Channel() { + return new DirectChannel(); + } + + @Bean + public IntegrationFlow flow() { + return flow -> flow.split() + .publishSubscribeChannel(s -> s.subscribe(f -> f. filter(p -> p % 3 == 0) + .channel("multipleof3Channel")) + .subscribe(f -> f. filter(p -> p % 3 == 1) + .channel("remainderIs1Channel")) + .subscribe(f -> f. filter(p -> p % 3 == 2) + .channel("remainderIs2Channel"))); + } + + public static void main(String[] args) { + final ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext(PublishSubscibeChannelExample.class); + DirectChannel multipleof3Channel = ctx.getBean("multipleof3Channel", DirectChannel.class); + multipleof3Channel.subscribe(x -> System.out.println("multipleof3Channel: " + x)); + DirectChannel remainderIs1Channel = ctx.getBean("remainderIs1Channel", DirectChannel.class); + remainderIs1Channel.subscribe(x -> System.out.println("remainderIs1Channel: " + x)); + DirectChannel remainderIs2Channel = ctx.getBean("remainderIs2Channel", DirectChannel.class); + remainderIs2Channel.subscribe(x -> System.out.println("remainderIs2Channel: " + x)); + ctx.getBean(NumbersClassifier.class) + .flow(Arrays.asList(1, 2, 3, 4, 5, 6)); + ctx.close(); + } +} diff --git a/spring-integration/src/main/java/com/baeldung/subflows/routeToRecipients/RouteToRecipientsExample.java b/spring-integration/src/main/java/com/baeldung/subflows/routeToRecipients/RouteToRecipientsExample.java new file mode 100644 index 0000000000..04fdb87dfa --- /dev/null +++ b/spring-integration/src/main/java/com/baeldung/subflows/routeToRecipients/RouteToRecipientsExample.java @@ -0,0 +1,61 @@ +package com.baeldung.subflows.routeToRecipients; + +import java.util.Arrays; +import java.util.Collection; + +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.integration.annotation.Gateway; +import org.springframework.integration.annotation.IntegrationComponentScan; +import org.springframework.integration.annotation.MessagingGateway; +import org.springframework.integration.channel.DirectChannel; +import org.springframework.integration.config.EnableIntegration; +import org.springframework.integration.dsl.IntegrationFlow; + +@EnableIntegration +@IntegrationComponentScan +public class RouteToRecipientsExample { + @MessagingGateway + public interface NumbersClassifier { + @Gateway(requestChannel = "flow.input") + void flow(Collection numbers); + } + + @Bean + DirectChannel multipleof3Channel() { + return new DirectChannel(); + } + + @Bean + DirectChannel remainderIs1Channel() { + return new DirectChannel(); + } + + @Bean + DirectChannel remainderIs2Channel() { + return new DirectChannel(); + } + + @Bean + public IntegrationFlow flow() { + return flow -> flow.split() + .routeToRecipients(r -> r. recipient("multipleof3Channel", p -> p % 3 == 0)// filter + . recipient("remainderIs1Channel", p -> p % 3 == 1) + .recipientFlow(sf -> sf. filter(p -> p % 3 == 2) + .channel("remainderIs2Channel"))); + } + + public static void main(String[] args) { + final ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext(RouteToRecipientsExample.class); + DirectChannel multipleof3Channel = ctx.getBean("multipleof3Channel", DirectChannel.class); + multipleof3Channel.subscribe(x -> System.out.println("multipleof3Channel: " + x)); + DirectChannel remainderIs1Channel = ctx.getBean("remainderIs1Channel", DirectChannel.class); + remainderIs1Channel.subscribe(x -> System.out.println("remainderIs1Channel: " + x)); + DirectChannel remainderIs2Channel = ctx.getBean("remainderIs2Channel", DirectChannel.class); + remainderIs2Channel.subscribe(x -> System.out.println("remainderIs2Channel: " + x)); + ctx.getBean(NumbersClassifier.class) + .flow(Arrays.asList(1, 2, 3, 4, 5, 6)); + ctx.close(); + } +} \ No newline at end of file diff --git a/spring-integration/src/main/java/com/baeldung/subflows/separateflows/SeparateFlowsExample.java b/spring-integration/src/main/java/com/baeldung/subflows/separateflows/SeparateFlowsExample.java new file mode 100644 index 0000000000..8ed46ead87 --- /dev/null +++ b/spring-integration/src/main/java/com/baeldung/subflows/separateflows/SeparateFlowsExample.java @@ -0,0 +1,83 @@ +package com.baeldung.subflows.separateflows; + +import java.util.Arrays; +import java.util.Collection; + +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.integration.annotation.Gateway; +import org.springframework.integration.annotation.IntegrationComponentScan; +import org.springframework.integration.annotation.MessagingGateway; +import org.springframework.integration.channel.DirectChannel; +import org.springframework.integration.config.EnableIntegration; +import org.springframework.integration.dsl.IntegrationFlow; + +@EnableIntegration +@IntegrationComponentScan +public class SeparateFlowsExample { + @MessagingGateway + public interface NumbersClassifier { + @Gateway(requestChannel = "multipleof3Flow.input") + void multipleof3(Collection is); + + @Gateway(requestChannel = "remainderIs1Flow.input") + void remainderIs1(Collection is); + + @Gateway(requestChannel = "remainderIs2Flow.input") + void remainderIs2(Collection numbers); + } + + @Bean + DirectChannel multipleof3Channel() { + return new DirectChannel(); + } + + @Bean + DirectChannel remainderIs1Channel() { + return new DirectChannel(); + } + + @Bean + DirectChannel remainderIs2Channel() { + return new DirectChannel(); + } + + @Bean + public IntegrationFlow multipleof3Flow() { + return f -> f.split() + . filter(p -> p % 3 == 0) + .channel("multipleof3Channel"); + } + + @Bean + public IntegrationFlow remainderIs1Flow() { + return f -> f.split() + . filter(p -> p % 3 == 1) + .channel("remainderIs1Channel"); + } + + @Bean + public IntegrationFlow remainderIs2Flow() { + return f -> f.split() + . filter(p -> p % 3 == 2) + .channel("remainderIs2Channel"); + } + + public static void main(String[] args) { + final ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext(SeparateFlowsExample.class); + DirectChannel multipleof3Channel = ctx.getBean("multipleof3Channel", DirectChannel.class); + multipleof3Channel.subscribe(x -> System.out.println("multipleof3Channel: " + x)); + DirectChannel remainderIs1Channel = ctx.getBean("remainderIs1Channel", DirectChannel.class); + remainderIs1Channel.subscribe(x -> System.out.println("remainderIs1Channel: " + x)); + DirectChannel remainderIs2Channel = ctx.getBean("remainderIs2Channel", DirectChannel.class); + remainderIs2Channel.subscribe(x -> System.out.println("remainderIs2Channel: " + x)); + ctx.getBean(NumbersClassifier.class) + .multipleof3(Arrays.asList(1, 2, 3, 4, 5, 6)); + ctx.getBean(NumbersClassifier.class) + .remainderIs1(Arrays.asList(1, 2, 3, 4, 5, 6)); + ctx.getBean(NumbersClassifier.class) + .remainderIs2(Arrays.asList(1, 2, 3, 4, 5, 6)); + ctx.close(); + } +} \ No newline at end of file diff --git a/spring-integration/src/main/java/com/baeldung/subflows/subflowchannel/FilterExample.java b/spring-integration/src/main/java/com/baeldung/subflows/subflowchannel/FilterExample.java new file mode 100644 index 0000000000..6db3741523 --- /dev/null +++ b/spring-integration/src/main/java/com/baeldung/subflows/subflowchannel/FilterExample.java @@ -0,0 +1,60 @@ +package com.baeldung.subflows.subflowchannel; + +import java.util.Arrays; +import java.util.Collection; + +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.integration.annotation.Gateway; +import org.springframework.integration.annotation.IntegrationComponentScan; +import org.springframework.integration.annotation.MessagingGateway; +import org.springframework.integration.channel.DirectChannel; +import org.springframework.integration.config.EnableIntegration; +import org.springframework.integration.dsl.IntegrationFlow; + +@EnableIntegration +@IntegrationComponentScan +public class FilterExample { + @MessagingGateway + public interface NumbersClassifier { + @Gateway(requestChannel = "flow.input") + void flow(Collection numbers); + } + + @Bean + DirectChannel multipleof3Channel() { + return new DirectChannel(); + } + + @Bean + DirectChannel remainderIs1Channel() { + return new DirectChannel(); + } + + @Bean + DirectChannel remainderIs2Channel() { + return new DirectChannel(); + } + + @Bean + public IntegrationFlow flow() { + return flow -> flow.split() + . filter(x -> x % 3 == 0, sf -> sf.discardFlow(subf -> subf. filter(x -> x % 3 == 1, ssf -> ssf.discardChannel("remainderIs2Channel")) + .channel("remainderIs1Channel"))) + .channel("multipleof3Channel"); + } + + public static void main(String[] args) { + final ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext(FilterExample.class); + DirectChannel multipleof3Channel = ctx.getBean("multipleof3Channel", DirectChannel.class); + multipleof3Channel.subscribe(x -> System.out.println("multipleof3Channel: " + x)); + DirectChannel remainderIs1Channel = ctx.getBean("remainderIs1Channel", DirectChannel.class); + remainderIs1Channel.subscribe(x -> System.out.println("remainderIs1Channel: " + x)); + DirectChannel remainderIs2Channel = ctx.getBean("remainderIs2Channel", DirectChannel.class); + remainderIs2Channel.subscribe(x -> System.out.println("remainderIs2Channel: " + x)); + ctx.getBean(NumbersClassifier.class) + .flow(Arrays.asList(1, 2, 3, 4, 5, 6)); + ctx.close(); + } +} \ No newline at end of file diff --git a/spring-integration/src/main/java/com/baeldung/subflows/subflowmapping/RouterExample.java b/spring-integration/src/main/java/com/baeldung/subflows/subflowmapping/RouterExample.java new file mode 100644 index 0000000000..de1f11cf70 --- /dev/null +++ b/spring-integration/src/main/java/com/baeldung/subflows/subflowmapping/RouterExample.java @@ -0,0 +1,61 @@ +package com.baeldung.subflows.subflowmapping; + +import java.util.Arrays; +import java.util.Collection; + +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.integration.annotation.Gateway; +import org.springframework.integration.annotation.IntegrationComponentScan; +import org.springframework.integration.annotation.MessagingGateway; +import org.springframework.integration.channel.DirectChannel; +import org.springframework.integration.config.EnableIntegration; +import org.springframework.integration.dsl.IntegrationFlow; + +@EnableIntegration +@IntegrationComponentScan +public class RouterExample { + @MessagingGateway + public interface NumbersClassifier { + @Gateway(requestChannel = "flow.input") + void flow(Collection numbers); + } + + @Bean + DirectChannel multipleof3Channel() { + return new DirectChannel(); + } + + @Bean + DirectChannel remainderIs1Channel() { + return new DirectChannel(); + } + + @Bean + DirectChannel remainderIs2Channel() { + return new DirectChannel(); + } + + @Bean + public IntegrationFlow flow() { + return f -> f.split() + . route(p -> p % 3, m -> m.channelMapping(0, "multipleof3Channel") + .subFlowMapping(1, sf -> sf.channel("remainderIs1Channel")) + .subFlowMapping(2, sf -> sf. handle((p, h) -> p))) + .channel("remainderIs2Channel"); + } + + public static void main(String[] args) { + final ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext(RouterExample.class); + DirectChannel multipleof3Channel = ctx.getBean("multipleof3Channel", DirectChannel.class); + multipleof3Channel.subscribe(x -> System.out.println("multipleof3Channel: " + x)); + DirectChannel remainderIs1Channel = ctx.getBean("remainderIs1Channel", DirectChannel.class); + remainderIs1Channel.subscribe(x -> System.out.println("remainderIs1Channel: " + x)); + DirectChannel remainderIs2Channel = ctx.getBean("remainderIs2Channel", DirectChannel.class); + remainderIs2Channel.subscribe(x -> System.out.println("remainderIs2Channel: " + x)); + ctx.getBean(NumbersClassifier.class) + .flow(Arrays.asList(1, 2, 3, 4, 5, 6)); + ctx.close(); + } +} \ No newline at end of file diff --git a/spring-mvc-simple/README.md b/spring-mvc-simple/README.md index 39053534fa..a9b002afd7 100644 --- a/spring-mvc-simple/README.md +++ b/spring-mvc-simple/README.md @@ -6,3 +6,4 @@ - [Servlet Redirect vs Forward](http://www.baeldung.com/servlet-redirect-forward) - [Apache Tiles Integration with Spring MVC](http://www.baeldung.com/spring-mvc-apache-tiles) - [Guide to Spring Email](http://www.baeldung.com/spring-email) +- [Request Method Not Supported (405) in Spring](https://www.baeldung.com/spring-request-method-not-supported-405) diff --git a/spring-rest-angular/README.md b/spring-rest-angular/README.md index 7ead9442fd..d2c2879649 100644 --- a/spring-rest-angular/README.md +++ b/spring-rest-angular/README.md @@ -2,5 +2,4 @@ ### Relevant Articles: -- [Spring’s RequestBody and ResponseBody Annotations](http://www.baeldung.com/spring-request-response-body) - [Pagination with Spring REST and AngularJS table](http://www.baeldung.com/pagination-with-a-spring-rest-api-and-an-angularjs-table) diff --git a/spring-rest-angular/pom.xml b/spring-rest-angular/pom.xml index 7aedfa486b..5240ae24e7 100644 --- a/spring-rest-angular/pom.xml +++ b/spring-rest-angular/pom.xml @@ -8,10 +8,10 @@ war - parent-boot-1 + parent-boot-2 com.baeldung 0.0.1-SNAPSHOT - ../parent-boot-1 + ../parent-boot-2 diff --git a/spring-rest-angular/src/main/resources/application.properties b/spring-rest-angular/src/main/resources/application.properties index e24db89c8f..2571d286a3 100644 --- a/spring-rest-angular/src/main/resources/application.properties +++ b/spring-rest-angular/src/main/resources/application.properties @@ -1,4 +1,4 @@ -server.contextPath=/ +server.servlet.contextPath=/ spring.h2.console.enabled=true logging.level.org.hibernate.SQL=info spring.jpa.hibernate.ddl-auto=none \ No newline at end of file diff --git a/spring-rest-query-language/pom.xml b/spring-rest-query-language/pom.xml index 8b24c7b8fb..70fea91f31 100644 --- a/spring-rest-query-language/pom.xml +++ b/spring-rest-query-language/pom.xml @@ -1,17 +1,16 @@ 4.0.0 - com.baeldung spring-rest-query-language 0.1-SNAPSHOT spring-rest-query-language war - parent-boot-1 + parent-boot-2 com.baeldung 0.0.1-SNAPSHOT - ../parent-boot-1 + ../parent-boot-2 @@ -149,6 +148,7 @@ org.javassist javassist + ${javassist.version} mysql @@ -349,13 +349,14 @@ 1.4.9 - + 3.21.0-GA + 19.0 3.5 - + - 1.6.1 + 1.7.0 1.1.3 diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/GenericSpecificationsBuilder.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/GenericSpecificationsBuilder.java similarity index 86% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/GenericSpecificationsBuilder.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/GenericSpecificationsBuilder.java index 64bab9a435..75fb4456c4 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/GenericSpecificationsBuilder.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/GenericSpecificationsBuilder.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.dao; +package com.baeldung.persistence.dao; import java.util.ArrayList; import java.util.Collections; @@ -8,10 +8,10 @@ import java.util.List; import java.util.function.Function; import java.util.stream.Collectors; -import org.baeldung.web.util.SearchOperation; -import org.baeldung.web.util.SpecSearchCriteria; import org.springframework.data.jpa.domain.Specification; -import org.springframework.data.jpa.domain.Specifications; + +import com.baeldung.web.util.SearchOperation; +import com.baeldung.web.util.SpecSearchCriteria; public class GenericSpecificationsBuilder { @@ -61,11 +61,12 @@ public class GenericSpecificationsBuilder { for (int idx = 1; idx < specs.size(); idx++) { result = params.get(idx) .isOrPredicate() - ? Specifications.where(result) + ? Specification.where(result) .or(specs.get(idx)) - : Specifications.where(result) + : Specification.where(result) .and(specs.get(idx)); } + return result; } @@ -84,10 +85,10 @@ public class GenericSpecificationsBuilder { Specification operand1 = specStack.pop(); Specification operand2 = specStack.pop(); if (mayBeOperand.equals(SearchOperation.AND_OPERATOR)) - specStack.push(Specifications.where(operand1) + specStack.push(Specification.where(operand1) .and(operand2)); else if (mayBeOperand.equals(SearchOperation.OR_OPERATOR)) - specStack.push(Specifications.where(operand1) + specStack.push(Specification.where(operand1) .or(operand2)); } diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/IUserDAO.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/IUserDAO.java similarity index 52% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/IUserDAO.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/IUserDAO.java index 4e74e94925..4837795792 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/IUserDAO.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/IUserDAO.java @@ -1,9 +1,9 @@ -package org.baeldung.persistence.dao; +package com.baeldung.persistence.dao; import java.util.List; -import org.baeldung.persistence.model.User; -import org.baeldung.web.util.SearchCriteria; +import com.baeldung.persistence.model.User; +import com.baeldung.web.util.SearchCriteria; public interface IUserDAO { List searchUser(List params); diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/MyUserPredicate.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/MyUserPredicate.java similarity index 92% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/MyUserPredicate.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/MyUserPredicate.java index 5dd4cdd17e..0c3a4a51f9 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/MyUserPredicate.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/MyUserPredicate.java @@ -1,8 +1,7 @@ -package org.baeldung.persistence.dao; - -import org.baeldung.persistence.model.MyUser; -import org.baeldung.web.util.SearchCriteria; +package com.baeldung.persistence.dao; +import com.baeldung.persistence.model.MyUser; +import com.baeldung.web.util.SearchCriteria; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.core.types.dsl.NumberPath; import com.querydsl.core.types.dsl.PathBuilder; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/MyUserPredicatesBuilder.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/MyUserPredicatesBuilder.java similarity index 95% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/MyUserPredicatesBuilder.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/MyUserPredicatesBuilder.java index 7be37c7155..6aad1a3bab 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/MyUserPredicatesBuilder.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/MyUserPredicatesBuilder.java @@ -1,12 +1,11 @@ -package org.baeldung.persistence.dao; +package com.baeldung.persistence.dao; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import org.baeldung.web.util.SearchCriteria; - +import com.baeldung.web.util.SearchCriteria; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.core.types.dsl.Expressions; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/MyUserRepository.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/MyUserRepository.java similarity index 74% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/MyUserRepository.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/MyUserRepository.java index 82ae1ee841..3be361e85a 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/MyUserRepository.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/MyUserRepository.java @@ -1,17 +1,17 @@ -package org.baeldung.persistence.dao; +package com.baeldung.persistence.dao; -import com.querydsl.core.types.dsl.StringExpression; -import org.baeldung.persistence.model.MyUser; -import org.baeldung.persistence.model.QMyUser; +import com.baeldung.persistence.model.QMyUser; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.querydsl.QueryDslPredicateExecutor; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.querydsl.binding.QuerydslBinderCustomizer; import org.springframework.data.querydsl.binding.QuerydslBindings; - -import com.querydsl.core.types.dsl.StringPath; import org.springframework.data.querydsl.binding.SingleValueBinding; -public interface MyUserRepository extends JpaRepository, QueryDslPredicateExecutor, QuerydslBinderCustomizer { +import com.baeldung.persistence.model.MyUser; +import com.querydsl.core.types.dsl.StringExpression; +import com.querydsl.core.types.dsl.StringPath; + +public interface MyUserRepository extends JpaRepository, QuerydslPredicateExecutor, QuerydslBinderCustomizer { @Override default public void customize(final QuerydslBindings bindings, final QMyUser root) { bindings.bind(String.class) diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserDAO.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserDAO.java similarity index 90% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserDAO.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserDAO.java index 4f2f6003e4..6bc899176a 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserDAO.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserDAO.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.dao; +package com.baeldung.persistence.dao; import java.util.List; @@ -9,10 +9,11 @@ import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; -import org.baeldung.persistence.model.User; -import org.baeldung.web.util.SearchCriteria; import org.springframework.stereotype.Repository; +import com.baeldung.persistence.model.User; +import com.baeldung.web.util.SearchCriteria; + @Repository public class UserDAO implements IUserDAO { diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserRepository.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserRepository.java similarity index 74% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserRepository.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserRepository.java index de7acf60d5..1a7eda07ed 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserRepository.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserRepository.java @@ -1,9 +1,10 @@ -package org.baeldung.persistence.dao; +package com.baeldung.persistence.dao; -import org.baeldung.persistence.model.User; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import com.baeldung.persistence.model.User; + public interface UserRepository extends JpaRepository, JpaSpecificationExecutor { } diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserSearchQueryCriteriaConsumer.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserSearchQueryCriteriaConsumer.java similarity index 94% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserSearchQueryCriteriaConsumer.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserSearchQueryCriteriaConsumer.java index 8b15ef1605..a3e619ad21 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserSearchQueryCriteriaConsumer.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserSearchQueryCriteriaConsumer.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.dao; +package com.baeldung.persistence.dao; import java.util.function.Consumer; @@ -6,7 +6,7 @@ import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; -import org.baeldung.web.util.SearchCriteria; +import com.baeldung.web.util.SearchCriteria; public class UserSearchQueryCriteriaConsumer implements Consumer{ diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserSpecification.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserSpecification.java similarity index 92% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserSpecification.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserSpecification.java index b2d9394500..928e75aea7 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserSpecification.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserSpecification.java @@ -1,9 +1,10 @@ -package org.baeldung.persistence.dao; +package com.baeldung.persistence.dao; -import org.baeldung.persistence.model.User; -import org.baeldung.web.util.SpecSearchCriteria; import org.springframework.data.jpa.domain.Specification; +import com.baeldung.persistence.model.User; +import com.baeldung.web.util.SpecSearchCriteria; + import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserSpecificationsBuilder.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserSpecificationsBuilder.java similarity index 81% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserSpecificationsBuilder.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserSpecificationsBuilder.java index 28097d500a..72d7274226 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/UserSpecificationsBuilder.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/UserSpecificationsBuilder.java @@ -1,14 +1,13 @@ -package org.baeldung.persistence.dao; +package com.baeldung.persistence.dao; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; -import org.baeldung.persistence.model.User; -import org.baeldung.web.util.SearchOperation; -import org.baeldung.web.util.SpecSearchCriteria; import org.springframework.data.jpa.domain.Specification; -import org.springframework.data.jpa.domain.Specifications; + +import com.baeldung.persistence.model.User; +import com.baeldung.web.util.SearchOperation; +import com.baeldung.web.util.SpecSearchCriteria; public final class UserSpecificationsBuilder { @@ -52,8 +51,8 @@ public final class UserSpecificationsBuilder { for (int i = 1; i < params.size(); i++) { result = params.get(i).isOrPredicate() - ? Specifications.where(result).or(new UserSpecification(params.get(i))) - : Specifications.where(result).and(new UserSpecification(params.get(i))); + ? Specification.where(result).or(new UserSpecification(params.get(i))) + : Specification.where(result).and(new UserSpecification(params.get(i))); } return result; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/CustomRsqlVisitor.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/CustomRsqlVisitor.java similarity index 95% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/CustomRsqlVisitor.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/CustomRsqlVisitor.java index 89cec89951..9c399e97ed 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/CustomRsqlVisitor.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/CustomRsqlVisitor.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.dao.rsql; +package com.baeldung.persistence.dao.rsql; import org.springframework.data.jpa.domain.Specification; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/GenericRsqlSpecBuilder.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/GenericRsqlSpecBuilder.java similarity index 59% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/GenericRsqlSpecBuilder.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/GenericRsqlSpecBuilder.java index ce5a4410b9..e81e9ab916 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/GenericRsqlSpecBuilder.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/GenericRsqlSpecBuilder.java @@ -1,10 +1,10 @@ -package org.baeldung.persistence.dao.rsql; +package com.baeldung.persistence.dao.rsql; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import org.springframework.data.jpa.domain.Specifications; +import org.springframework.data.jpa.domain.Specification; import cz.jirutka.rsql.parser.ast.ComparisonNode; import cz.jirutka.rsql.parser.ast.LogicalNode; @@ -13,7 +13,7 @@ import cz.jirutka.rsql.parser.ast.Node; public class GenericRsqlSpecBuilder { - public Specifications createSpecification(final Node node) { + public Specification createSpecification(final Node node) { if (node instanceof LogicalNode) { return createSpecification((LogicalNode) node); } @@ -23,31 +23,31 @@ public class GenericRsqlSpecBuilder { return null; } - public Specifications createSpecification(final LogicalNode logicalNode) { + public Specification createSpecification(final LogicalNode logicalNode) { - List> specs = logicalNode.getChildren() + List> specs = logicalNode.getChildren() .stream() .map(node -> createSpecification(node)) .filter(Objects::nonNull) .collect(Collectors.toList()); - Specifications result = specs.get(0); + Specification result = specs.get(0); if (logicalNode.getOperator() == LogicalOperator.AND) { for (int i = 1; i < specs.size(); i++) { - result = Specifications.where(result).and(specs.get(i)); + result = Specification.where(result).and(specs.get(i)); } } else if (logicalNode.getOperator() == LogicalOperator.OR) { for (int i = 1; i < specs.size(); i++) { - result = Specifications.where(result).or(specs.get(i)); + result = Specification.where(result).or(specs.get(i)); } } return result; } - public Specifications createSpecification(final ComparisonNode comparisonNode) { - return Specifications.where(new GenericRsqlSpecification(comparisonNode.getSelector(), comparisonNode.getOperator(), comparisonNode.getArguments())); + public Specification createSpecification(final ComparisonNode comparisonNode) { + return Specification.where(new GenericRsqlSpecification(comparisonNode.getSelector(), comparisonNode.getOperator(), comparisonNode.getArguments())); } } diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/GenericRsqlSpecification.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/GenericRsqlSpecification.java similarity index 98% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/GenericRsqlSpecification.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/GenericRsqlSpecification.java index 8055e959a6..87a46d4a85 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/GenericRsqlSpecification.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/GenericRsqlSpecification.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.dao.rsql; +package com.baeldung.persistence.dao.rsql; import java.util.List; import java.util.stream.Collectors; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/RsqlSearchOperation.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/RsqlSearchOperation.java similarity index 95% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/RsqlSearchOperation.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/RsqlSearchOperation.java index 673e78fbb4..81441fa609 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/dao/rsql/RsqlSearchOperation.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/dao/rsql/RsqlSearchOperation.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.dao.rsql; +package com.baeldung.persistence.dao.rsql; import cz.jirutka.rsql.parser.ast.ComparisonOperator; import cz.jirutka.rsql.parser.ast.RSQLOperators; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/model/MyUser.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/model/MyUser.java similarity index 98% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/model/MyUser.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/model/MyUser.java index 9a7bb4da3d..f3b9dc3810 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/model/MyUser.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/model/MyUser.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.model; +package com.baeldung.persistence.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/model/User.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/model/User.java similarity index 97% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/model/User.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/model/User.java index 670d4a2e74..dbc2b9360f 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/model/User.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/model/User.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.model; +package com.baeldung.persistence.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/persistence/model/User_.java b/spring-rest-query-language/src/main/java/com/baeldung/persistence/model/User_.java similarity index 92% rename from spring-rest-query-language/src/main/java/org/baeldung/persistence/model/User_.java rename to spring-rest-query-language/src/main/java/com/baeldung/persistence/model/User_.java index b705c51ff8..c101b1d9b3 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/persistence/model/User_.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/persistence/model/User_.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.model; +package com.baeldung.persistence.model; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.StaticMetamodel; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/spring/Application.java b/spring-rest-query-language/src/main/java/com/baeldung/spring/Application.java similarity index 90% rename from spring-rest-query-language/src/main/java/org/baeldung/spring/Application.java rename to spring-rest-query-language/src/main/java/com/baeldung/spring/Application.java index 7aa9ea5bc3..371377021a 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/spring/Application.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/spring/Application.java @@ -1,4 +1,4 @@ -package org.baeldung.spring; +package com.baeldung.spring; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -7,7 +7,7 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.support.SpringBootServletInitializer; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.annotation.ComponentScan; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.web.context.request.RequestContextListener; @@ -19,7 +19,7 @@ import org.springframework.web.context.request.RequestContextListener; */ @EnableScheduling @EnableAutoConfiguration -@ComponentScan("org.baeldung") +@ComponentScan("com.baeldung") @SpringBootApplication public class Application extends SpringBootServletInitializer { diff --git a/spring-rest-query-language/src/main/java/org/baeldung/spring/PersistenceConfig.java b/spring-rest-query-language/src/main/java/com/baeldung/spring/PersistenceConfig.java similarity index 94% rename from spring-rest-query-language/src/main/java/org/baeldung/spring/PersistenceConfig.java rename to spring-rest-query-language/src/main/java/com/baeldung/spring/PersistenceConfig.java index f3a87b189e..4a4b9eee3f 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/spring/PersistenceConfig.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/spring/PersistenceConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.spring; +package com.baeldung.spring; import java.util.Properties; @@ -24,9 +24,9 @@ import com.google.common.base.Preconditions; @Configuration @EnableTransactionManagement @PropertySource({ "classpath:persistence-${envTarget:h2}.properties" }) -@ComponentScan({ "org.baeldung.persistence" }) +@ComponentScan({ "com.baeldung.persistence" }) // @ImportResource("classpath*:springDataPersistenceConfig.xml") -@EnableJpaRepositories(basePackages = "org.baeldung.persistence.dao") +@EnableJpaRepositories(basePackages = "com.baeldung.persistence.dao") public class PersistenceConfig { @Autowired @@ -40,7 +40,7 @@ public class PersistenceConfig { public LocalContainerEntityManagerFactoryBean entityManagerFactory() { final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); em.setDataSource(dataSource()); - em.setPackagesToScan(new String[] { "org.baeldung.persistence.model" }); + em.setPackagesToScan(new String[] { "com.baeldung.persistence.model" }); final HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter(); // vendorAdapter.set diff --git a/spring-rest-query-language/src/main/java/org/baeldung/spring/WebConfig.java b/spring-rest-query-language/src/main/java/com/baeldung/spring/WebConfig.java similarity index 80% rename from spring-rest-query-language/src/main/java/org/baeldung/spring/WebConfig.java rename to spring-rest-query-language/src/main/java/com/baeldung/spring/WebConfig.java index 41711ee1ad..f5a5bc4b5e 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/spring/WebConfig.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/spring/WebConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.spring; +package com.baeldung.spring; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -6,17 +6,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.view.InternalResourceViewResolver; @Configuration -@ComponentScan("org.baeldung.web") +@ComponentScan("com.baeldung.web") @EnableWebMvc -public class WebConfig extends WebMvcConfigurerAdapter { - - public WebConfig() { - super(); - } +public class WebConfig implements WebMvcConfigurer { @Bean public ViewResolver viewResolver() { @@ -29,7 +25,6 @@ public class WebConfig extends WebMvcConfigurerAdapter { // API @Override public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); registry.addViewController("/homepage.html"); } diff --git a/spring-rest-query-language/src/main/java/org/baeldung/web/controller/HomeController.java b/spring-rest-query-language/src/main/java/com/baeldung/web/controller/HomeController.java similarity index 87% rename from spring-rest-query-language/src/main/java/org/baeldung/web/controller/HomeController.java rename to spring-rest-query-language/src/main/java/com/baeldung/web/controller/HomeController.java index 9c4d14cae3..c82911211a 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/web/controller/HomeController.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/web/controller/HomeController.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller; +package com.baeldung.web.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/web/controller/UserController.java b/spring-rest-query-language/src/main/java/com/baeldung/web/controller/UserController.java similarity index 87% rename from spring-rest-query-language/src/main/java/org/baeldung/web/controller/UserController.java rename to spring-rest-query-language/src/main/java/com/baeldung/web/controller/UserController.java index 8953a52a1b..101231c7ab 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/web/controller/UserController.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/web/controller/UserController.java @@ -1,23 +1,10 @@ -package org.baeldung.web.controller; +package com.baeldung.web.controller; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.baeldung.persistence.dao.GenericSpecificationsBuilder; -import org.baeldung.persistence.dao.IUserDAO; -import org.baeldung.persistence.dao.MyUserPredicatesBuilder; -import org.baeldung.persistence.dao.MyUserRepository; -import org.baeldung.persistence.dao.UserRepository; -import org.baeldung.persistence.dao.UserSpecification; -import org.baeldung.persistence.dao.UserSpecificationsBuilder; -import org.baeldung.persistence.dao.rsql.CustomRsqlVisitor; -import org.baeldung.persistence.model.MyUser; -import org.baeldung.persistence.model.User; -import org.baeldung.web.util.CriteriaParser; -import org.baeldung.web.util.SearchCriteria; -import org.baeldung.web.util.SearchOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.jpa.domain.Specification; import org.springframework.data.querydsl.binding.QuerydslPredicate; @@ -31,6 +18,19 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; +import com.baeldung.persistence.dao.GenericSpecificationsBuilder; +import com.baeldung.persistence.dao.IUserDAO; +import com.baeldung.persistence.dao.MyUserPredicatesBuilder; +import com.baeldung.persistence.dao.MyUserRepository; +import com.baeldung.persistence.dao.UserRepository; +import com.baeldung.persistence.dao.UserSpecification; +import com.baeldung.persistence.dao.UserSpecificationsBuilder; +import com.baeldung.persistence.dao.rsql.CustomRsqlVisitor; +import com.baeldung.persistence.model.MyUser; +import com.baeldung.persistence.model.User; +import com.baeldung.web.util.CriteriaParser; +import com.baeldung.web.util.SearchCriteria; +import com.baeldung.web.util.SearchOperation; import com.google.common.base.Joiner; import com.google.common.base.Preconditions; import com.querydsl.core.types.Predicate; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/web/error/RestResponseEntityExceptionHandler.java b/spring-rest-query-language/src/main/java/com/baeldung/web/error/RestResponseEntityExceptionHandler.java similarity index 97% rename from spring-rest-query-language/src/main/java/org/baeldung/web/error/RestResponseEntityExceptionHandler.java rename to spring-rest-query-language/src/main/java/com/baeldung/web/error/RestResponseEntityExceptionHandler.java index b593116c4a..b30f435ee4 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/web/error/RestResponseEntityExceptionHandler.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/web/error/RestResponseEntityExceptionHandler.java @@ -1,8 +1,7 @@ -package org.baeldung.web.error; +package com.baeldung.web.error; import javax.persistence.EntityNotFoundException; -import org.baeldung.web.exception.MyResourceNotFoundException; import org.hibernate.exception.ConstraintViolationException; import org.springframework.dao.DataAccessException; import org.springframework.dao.DataIntegrityViolationException; @@ -17,6 +16,8 @@ import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.context.request.WebRequest; import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; +import com.baeldung.web.exception.MyResourceNotFoundException; + @ControllerAdvice public class RestResponseEntityExceptionHandler extends ResponseEntityExceptionHandler { diff --git a/spring-rest-query-language/src/main/java/org/baeldung/web/exception/MyResourceNotFoundException.java b/spring-rest-query-language/src/main/java/com/baeldung/web/exception/MyResourceNotFoundException.java similarity index 92% rename from spring-rest-query-language/src/main/java/org/baeldung/web/exception/MyResourceNotFoundException.java rename to spring-rest-query-language/src/main/java/com/baeldung/web/exception/MyResourceNotFoundException.java index 14b61f9832..fd002efc28 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/web/exception/MyResourceNotFoundException.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/web/exception/MyResourceNotFoundException.java @@ -1,4 +1,4 @@ -package org.baeldung.web.exception; +package com.baeldung.web.exception; public final class MyResourceNotFoundException extends RuntimeException { diff --git a/spring-rest-query-language/src/main/java/org/baeldung/web/util/CriteriaParser.java b/spring-rest-query-language/src/main/java/com/baeldung/web/util/CriteriaParser.java similarity index 98% rename from spring-rest-query-language/src/main/java/org/baeldung/web/util/CriteriaParser.java rename to spring-rest-query-language/src/main/java/com/baeldung/web/util/CriteriaParser.java index a72d07f440..26bfb7a78d 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/web/util/CriteriaParser.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/web/util/CriteriaParser.java @@ -1,4 +1,4 @@ -package org.baeldung.web.util; +package com.baeldung.web.util; import java.util.Arrays; import java.util.Collections; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/web/util/SearchCriteria.java b/spring-rest-query-language/src/main/java/com/baeldung/web/util/SearchCriteria.java similarity index 96% rename from spring-rest-query-language/src/main/java/org/baeldung/web/util/SearchCriteria.java rename to spring-rest-query-language/src/main/java/com/baeldung/web/util/SearchCriteria.java index cbe1fe539e..75ecefb653 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/web/util/SearchCriteria.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/web/util/SearchCriteria.java @@ -1,4 +1,4 @@ -package org.baeldung.web.util; +package com.baeldung.web.util; public class SearchCriteria { diff --git a/spring-rest-query-language/src/main/java/org/baeldung/web/util/SearchOperation.java b/spring-rest-query-language/src/main/java/com/baeldung/web/util/SearchOperation.java similarity index 93% rename from spring-rest-query-language/src/main/java/org/baeldung/web/util/SearchOperation.java rename to spring-rest-query-language/src/main/java/com/baeldung/web/util/SearchOperation.java index db2c0133cf..acc9e0c0a8 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/web/util/SearchOperation.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/web/util/SearchOperation.java @@ -1,4 +1,4 @@ -package org.baeldung.web.util; +package com.baeldung.web.util; public enum SearchOperation { EQUALITY, NEGATION, GREATER_THAN, LESS_THAN, LIKE, STARTS_WITH, ENDS_WITH, CONTAINS; diff --git a/spring-rest-query-language/src/main/java/org/baeldung/web/util/SpecSearchCriteria.java b/spring-rest-query-language/src/main/java/com/baeldung/web/util/SpecSearchCriteria.java similarity index 95% rename from spring-rest-query-language/src/main/java/org/baeldung/web/util/SpecSearchCriteria.java rename to spring-rest-query-language/src/main/java/com/baeldung/web/util/SpecSearchCriteria.java index 3435ff3342..73b690673b 100644 --- a/spring-rest-query-language/src/main/java/org/baeldung/web/util/SpecSearchCriteria.java +++ b/spring-rest-query-language/src/main/java/com/baeldung/web/util/SpecSearchCriteria.java @@ -1,4 +1,4 @@ -package org.baeldung.web.util; +package com.baeldung.web.util; public class SpecSearchCriteria { diff --git a/spring-rest-query-language/src/main/resources/application.properties b/spring-rest-query-language/src/main/resources/application.properties index 01eaee7040..4bbf3ed4fc 100644 --- a/spring-rest-query-language/src/main/resources/application.properties +++ b/spring-rest-query-language/src/main/resources/application.properties @@ -1,2 +1,2 @@ server.port=8082 -server.context-path=/spring-rest-query-language \ No newline at end of file +server.servlet.context-path=/spring-rest-query-language \ No newline at end of file diff --git a/spring-rest-query-language/src/main/resources/springDataPersistenceConfig.xml b/spring-rest-query-language/src/main/resources/springDataPersistenceConfig.xml index d6d0ec6e47..5ea2d9c05b 100644 --- a/spring-rest-query-language/src/main/resources/springDataPersistenceConfig.xml +++ b/spring-rest-query-language/src/main/resources/springDataPersistenceConfig.xml @@ -7,6 +7,6 @@ http://www.springframework.org/schema/data/jpa/spring-jpa.xsd" > - + \ No newline at end of file diff --git a/spring-rest-query-language/src/main/webapp/WEB-INF/web.xml b/spring-rest-query-language/src/main/webapp/WEB-INF/web.xml index 4472afd112..23869f5e4e 100644 --- a/spring-rest-query-language/src/main/webapp/WEB-INF/web.xml +++ b/spring-rest-query-language/src/main/webapp/WEB-INF/web.xml @@ -16,7 +16,7 @@ contextConfigLocation - org.baeldung.spring + com.baeldung.spring diff --git a/spring-rest-query-language/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-rest-query-language/src/test/java/com/baeldung/SpringContextIntegrationTest.java similarity index 85% rename from spring-rest-query-language/src/test/java/org/baeldung/SpringContextIntegrationTest.java rename to spring-rest-query-language/src/test/java/com/baeldung/SpringContextIntegrationTest.java index 35939c992f..18fabce5ca 100644 --- a/spring-rest-query-language/src/test/java/org/baeldung/SpringContextIntegrationTest.java +++ b/spring-rest-query-language/src/test/java/com/baeldung/SpringContextIntegrationTest.java @@ -1,11 +1,12 @@ -package org.baeldung; +package com.baeldung; -import org.baeldung.spring.Application; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; +import com.baeldung.spring.Application; + @RunWith(SpringRunner.class) @SpringBootTest(classes = Application.class) public class SpringContextIntegrationTest { diff --git a/spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPACriteriaQueryIntegrationTest.java b/spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPACriteriaQueryIntegrationTest.java similarity index 93% rename from spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPACriteriaQueryIntegrationTest.java rename to spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPACriteriaQueryIntegrationTest.java index e8e98074c6..6caabef628 100644 --- a/spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPACriteriaQueryIntegrationTest.java +++ b/spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPACriteriaQueryIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.query; +package com.baeldung.persistence.query; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.collection.IsIn.isIn; @@ -7,10 +7,6 @@ import static org.hamcrest.core.IsNot.not; import java.util.ArrayList; import java.util.List; -import org.baeldung.persistence.dao.IUserDAO; -import org.baeldung.persistence.model.User; -import org.baeldung.spring.PersistenceConfig; -import org.baeldung.web.util.SearchCriteria; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -20,6 +16,11 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import com.baeldung.persistence.dao.IUserDAO; +import com.baeldung.persistence.model.User; +import com.baeldung.spring.PersistenceConfig; +import com.baeldung.web.util.SearchCriteria; + @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = { PersistenceConfig.class }) @Transactional diff --git a/spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPAQuerydslIntegrationTest.java b/spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPAQuerydslIntegrationTest.java similarity index 93% rename from spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPAQuerydslIntegrationTest.java rename to spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPAQuerydslIntegrationTest.java index d397c3aac4..c4c5d23ab5 100644 --- a/spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPAQuerydslIntegrationTest.java +++ b/spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPAQuerydslIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.query; +package com.baeldung.persistence.query; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.collection.IsEmptyIterable.emptyIterable; @@ -6,10 +6,6 @@ import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInA import static org.hamcrest.collection.IsIterableContainingInOrder.contains; import static org.hamcrest.core.IsNot.not; -import org.baeldung.persistence.dao.MyUserPredicatesBuilder; -import org.baeldung.persistence.dao.MyUserRepository; -import org.baeldung.persistence.model.MyUser; -import org.baeldung.spring.PersistenceConfig; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -19,6 +15,11 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import com.baeldung.persistence.dao.MyUserPredicatesBuilder; +import com.baeldung.persistence.dao.MyUserRepository; +import com.baeldung.persistence.model.MyUser; +import com.baeldung.spring.PersistenceConfig; + @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = { PersistenceConfig.class }) @Transactional diff --git a/spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPASpecificationIntegrationTest.java b/spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPASpecificationIntegrationTest.java similarity index 89% rename from spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPASpecificationIntegrationTest.java rename to spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPASpecificationIntegrationTest.java index d9ae95c876..707426769e 100644 --- a/spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPASpecificationIntegrationTest.java +++ b/spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPASpecificationIntegrationTest.java @@ -1,25 +1,25 @@ -package org.baeldung.persistence.query; +package com.baeldung.persistence.query; -import org.baeldung.persistence.dao.GenericSpecificationsBuilder; -import org.baeldung.persistence.dao.UserRepository; -import org.baeldung.persistence.dao.UserSpecification; -import org.baeldung.persistence.dao.UserSpecificationsBuilder; -import org.baeldung.persistence.model.User; -import org.baeldung.spring.PersistenceConfig; -import org.baeldung.web.util.CriteriaParser; -import org.baeldung.web.util.SearchOperation; -import org.baeldung.web.util.SpecSearchCriteria; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.jpa.domain.Specification; -import org.springframework.data.jpa.domain.Specifications; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import com.baeldung.persistence.dao.GenericSpecificationsBuilder; +import com.baeldung.persistence.dao.UserRepository; +import com.baeldung.persistence.dao.UserSpecification; +import com.baeldung.persistence.dao.UserSpecificationsBuilder; +import com.baeldung.persistence.model.User; +import com.baeldung.spring.PersistenceConfig; +import com.baeldung.web.util.CriteriaParser; +import com.baeldung.web.util.SearchOperation; +import com.baeldung.web.util.SpecSearchCriteria; + import java.util.List; import java.util.function.Function; @@ -71,7 +71,7 @@ public class JPASpecificationIntegrationTest { public void givenFirstAndLastName_whenGettingListOfUsers_thenCorrect() { final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("firstName", SearchOperation.EQUALITY, "john")); final UserSpecification spec1 = new UserSpecification(new SpecSearchCriteria("lastName", SearchOperation.EQUALITY, "doe")); - final List results = repository.findAll(Specifications + final List results = repository.findAll(Specification .where(spec) .and(spec1)); @@ -127,7 +127,7 @@ public class JPASpecificationIntegrationTest { @Test public void givenFirstNameInverse_whenGettingListOfUsers_thenCorrect() { final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("firstName", SearchOperation.NEGATION, "john")); - final List results = repository.findAll(Specifications.where(spec)); + final List results = repository.findAll(Specification.where(spec)); assertThat(userTom, isIn(results)); assertThat(userJohn, not(isIn(results))); @@ -136,7 +136,7 @@ public class JPASpecificationIntegrationTest { @Test public void givenMinAge_whenGettingListOfUsers_thenCorrect() { final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("age", SearchOperation.GREATER_THAN, "25")); - final List results = repository.findAll(Specifications.where(spec)); + final List results = repository.findAll(Specification.where(spec)); assertThat(userTom, isIn(results)); assertThat(userJohn, not(isIn(results))); } @@ -170,7 +170,7 @@ public class JPASpecificationIntegrationTest { public void givenAgeRange_whenGettingListOfUsers_thenCorrect() { final UserSpecification spec = new UserSpecification(new SpecSearchCriteria("age", SearchOperation.GREATER_THAN, "20")); final UserSpecification spec1 = new UserSpecification(new SpecSearchCriteria("age", SearchOperation.LESS_THAN, "25")); - final List results = repository.findAll(Specifications + final List results = repository.findAll(Specification .where(spec) .and(spec1)); diff --git a/spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPASpecificationLiveTest.java b/spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPASpecificationLiveTest.java similarity index 95% rename from spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPASpecificationLiveTest.java rename to spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPASpecificationLiveTest.java index 044029c679..ad6a4259e7 100644 --- a/spring-rest-query-language/src/test/java/org/baeldung/persistence/query/JPASpecificationLiveTest.java +++ b/spring-rest-query-language/src/test/java/com/baeldung/persistence/query/JPASpecificationLiveTest.java @@ -1,15 +1,16 @@ -package org.baeldung.persistence.query; +package com.baeldung.persistence.query; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import io.restassured.RestAssured; import io.restassured.response.Response; -import org.baeldung.persistence.model.User; import org.junit.Before; import org.junit.Test; import org.springframework.test.context.ActiveProfiles; +import com.baeldung.persistence.model.User; + //@RunWith(SpringJUnit4ClassRunner.class) //@ContextConfiguration(classes = { ConfigTest.class, // PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class) diff --git a/spring-rest-query-language/src/test/java/org/baeldung/persistence/query/RsqlIntegrationTest.java b/spring-rest-query-language/src/test/java/com/baeldung/persistence/query/RsqlIntegrationTest.java similarity index 93% rename from spring-rest-query-language/src/test/java/org/baeldung/persistence/query/RsqlIntegrationTest.java rename to spring-rest-query-language/src/test/java/com/baeldung/persistence/query/RsqlIntegrationTest.java index 16dfa8a12f..b7b454892a 100644 --- a/spring-rest-query-language/src/test/java/org/baeldung/persistence/query/RsqlIntegrationTest.java +++ b/spring-rest-query-language/src/test/java/com/baeldung/persistence/query/RsqlIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.persistence.query; +package com.baeldung.persistence.query; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.collection.IsIn.isIn; @@ -6,10 +6,6 @@ import static org.hamcrest.core.IsNot.not; import java.util.List; -import org.baeldung.persistence.dao.UserRepository; -import org.baeldung.persistence.dao.rsql.CustomRsqlVisitor; -import org.baeldung.persistence.model.User; -import org.baeldung.spring.PersistenceConfig; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -20,6 +16,11 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; +import com.baeldung.persistence.dao.UserRepository; +import com.baeldung.persistence.dao.rsql.CustomRsqlVisitor; +import com.baeldung.persistence.model.User; +import com.baeldung.spring.PersistenceConfig; + import cz.jirutka.rsql.parser.RSQLParser; import cz.jirutka.rsql.parser.ast.Node; diff --git a/spring-rest-query-language/src/test/java/org/baeldung/web/MyUserLiveTest.java b/spring-rest-query-language/src/test/java/com/baeldung/web/MyUserLiveTest.java similarity index 95% rename from spring-rest-query-language/src/test/java/org/baeldung/web/MyUserLiveTest.java rename to spring-rest-query-language/src/test/java/com/baeldung/web/MyUserLiveTest.java index a478016280..1d74ff1982 100644 --- a/spring-rest-query-language/src/test/java/org/baeldung/web/MyUserLiveTest.java +++ b/spring-rest-query-language/src/test/java/com/baeldung/web/MyUserLiveTest.java @@ -1,14 +1,15 @@ -package org.baeldung.web; +package com.baeldung.web; import static org.junit.Assert.assertEquals; import io.restassured.RestAssured; import io.restassured.response.Response; import io.restassured.specification.RequestSpecification; -import org.baeldung.persistence.model.MyUser; import org.junit.Test; import org.springframework.test.context.ActiveProfiles; +import com.baeldung.persistence.model.MyUser; + @ActiveProfiles("test") public class MyUserLiveTest { diff --git a/spring-rest-shell/pom.xml b/spring-rest-shell/pom.xml index 7a604946b6..540b3d08eb 100644 --- a/spring-rest-shell/pom.xml +++ b/spring-rest-shell/pom.xml @@ -8,10 +8,10 @@ A simple project to demonstrate Spring REST Shell features. - parent-boot-1 + parent-boot-2 com.baeldung 0.0.1-SNAPSHOT - ../parent-boot-1 + ../parent-boot-2 diff --git a/spring-rest-simple/README.md b/spring-rest-simple/README.md index 57d6f50887..179e556202 100644 --- a/spring-rest-simple/README.md +++ b/spring-rest-simple/README.md @@ -2,7 +2,6 @@ - [Guide to UriComponentsBuilder in Spring](http://www.baeldung.com/spring-uricomponentsbuilder) - [Returning Custom Status Codes from Spring Controllers](http://www.baeldung.com/spring-mvc-controller-custom-http-status-code) -- [The Guide to RestTemplate](http://www.baeldung.com/rest-template) - [Spring RequestMapping](http://www.baeldung.com/spring-requestmapping) - [ETags for REST with Spring](http://www.baeldung.com/etags-for-rest-with-spring) - [Spring and Apache FileUpload](http://www.baeldung.com/spring-apache-file-upload) diff --git a/spring-rest-simple/pom.xml b/spring-rest-simple/pom.xml index d39e3a43c1..d301957eb9 100644 --- a/spring-rest-simple/pom.xml +++ b/spring-rest-simple/pom.xml @@ -8,10 +8,10 @@ war - parent-boot-1 + parent-boot-2 com.baeldung 0.0.1-SNAPSHOT - ../parent-boot-1 + ../parent-boot-2 @@ -34,6 +34,10 @@ spring-boot-starter-test test + + org.springframework.boot + spring-boot-starter-web + diff --git a/spring-rest-simple/src/main/java/org/baeldung/config/Application.java b/spring-rest-simple/src/main/java/org/baeldung/config/Application.java index 3a98da82c9..5c9a186619 100644 --- a/spring-rest-simple/src/main/java/org/baeldung/config/Application.java +++ b/spring-rest-simple/src/main/java/org/baeldung/config/Application.java @@ -3,7 +3,7 @@ package org.baeldung.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.web.support.SpringBootServletInitializer; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.annotation.ComponentScan; @EnableAutoConfiguration diff --git a/spring-rest-simple/src/main/java/org/baeldung/config/WebConfig.java b/spring-rest-simple/src/main/java/org/baeldung/config/WebConfig.java index 309a36609a..191b87a8f2 100644 --- a/spring-rest-simple/src/main/java/org/baeldung/config/WebConfig.java +++ b/spring-rest-simple/src/main/java/org/baeldung/config/WebConfig.java @@ -14,7 +14,7 @@ import org.springframework.http.converter.xml.MarshallingHttpMessageConverter; import org.springframework.oxm.xstream.XStreamMarshaller; import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import java.text.SimpleDateFormat; import java.util.List; @@ -25,7 +25,7 @@ import java.util.List; @Configuration @EnableWebMvc @ComponentScan({ "org.baeldung.web" }) -public class WebConfig extends WebMvcConfigurerAdapter { +public class WebConfig implements WebMvcConfigurer { public WebConfig() { super(); @@ -48,7 +48,6 @@ public class WebConfig extends WebMvcConfigurerAdapter { messageConverters.add(new ProtobufHttpMessageConverter()); messageConverters.add(new KryoHttpMessageConverter()); messageConverters.add(new StringHttpMessageConverter()); - super.configureMessageConverters(messageConverters); } private HttpMessageConverter createXmlHttpMessageConverter() { diff --git a/spring-rest-simple/src/main/resources/application.properties b/spring-rest-simple/src/main/resources/application.properties index 300589f561..dd7e4e2f2d 100644 --- a/spring-rest-simple/src/main/resources/application.properties +++ b/spring-rest-simple/src/main/resources/application.properties @@ -1,2 +1,2 @@ server.port= 8082 -server.context-path=/spring-rest \ No newline at end of file +server.servlet.context-path=/spring-rest \ No newline at end of file diff --git a/spring-resttemplate/pom.xml b/spring-resttemplate/pom.xml index 481104372a..9a0978f120 100644 --- a/spring-resttemplate/pom.xml +++ b/spring-resttemplate/pom.xml @@ -8,10 +8,10 @@ war - parent-boot-1 + parent-boot-2 com.baeldung 0.0.1-SNAPSHOT - ../parent-boot-1 + ../parent-boot-2 diff --git a/spring-resttemplate/src/main/java/org/baeldung/web/model/Employee.java b/spring-resttemplate/src/main/java/org/baeldung/web/model/Employee.java new file mode 100644 index 0000000000..7cab4a0430 --- /dev/null +++ b/spring-resttemplate/src/main/java/org/baeldung/web/model/Employee.java @@ -0,0 +1,48 @@ +package org.baeldung.web.model; + +import java.util.Date; +import java.util.Objects; + +public class Employee { + + private String id; + private String name; + + public Employee(String id, String name) { + this.id = id; + this.name = name; + } + + public Employee() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + Employee employee = (Employee) o; + return Objects.equals(id, employee.id); + } + + @Override public int hashCode() { + + return Objects.hash(id); + } +} diff --git a/spring-resttemplate/src/main/java/org/baeldung/web/service/EmployeeService.java b/spring-resttemplate/src/main/java/org/baeldung/web/service/EmployeeService.java new file mode 100644 index 0000000000..91614e90ad --- /dev/null +++ b/spring-resttemplate/src/main/java/org/baeldung/web/service/EmployeeService.java @@ -0,0 +1,29 @@ +package org.baeldung.web.service; + +import org.baeldung.web.model.Employee; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; + +@Service +public class EmployeeService { + + static final String EMP_URL_PREFIX = "http://localhost:8080/employee"; + static final String URL_SEP = "/"; + + private static final Logger logger = LoggerFactory.getLogger(EmployeeService.class); + + @Autowired + private RestTemplate restTemplate; + + public Employee getEmployee(String id) { + + ResponseEntity resp = restTemplate.getForEntity("http://localhost:8080/employee/" + id, + Employee.class); + return resp.getStatusCode() == HttpStatus.OK ? resp.getBody() : null; + } +} diff --git a/spring-resttemplate/src/test/java/org/baeldung/SpringTestConfig.java b/spring-resttemplate/src/test/java/org/baeldung/SpringTestConfig.java new file mode 100644 index 0000000000..7c4bbb4e5e --- /dev/null +++ b/spring-resttemplate/src/test/java/org/baeldung/SpringTestConfig.java @@ -0,0 +1,19 @@ +package org.baeldung; + +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.client.RestTemplate; + +@Configuration +@EnableAutoConfiguration +@ComponentScan("org.baeldung") +public class SpringTestConfig { + + @Bean + public RestTemplate restTemplate() { + return new RestTemplate(); + } + +} diff --git a/spring-resttemplate/src/test/java/org/baeldung/client/TestRestTemplateBasicLiveTest.java b/spring-resttemplate/src/test/java/org/baeldung/client/TestRestTemplateBasicLiveTest.java index 012221efb7..03a76aca74 100644 --- a/spring-resttemplate/src/test/java/org/baeldung/client/TestRestTemplateBasicLiveTest.java +++ b/spring-resttemplate/src/test/java/org/baeldung/client/TestRestTemplateBasicLiveTest.java @@ -1,7 +1,9 @@ package org.baeldung.client; -import okhttp3.Request; -import okhttp3.RequestBody; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertTrue; + import org.junit.Before; import org.junit.Test; import org.springframework.boot.test.web.client.TestRestTemplate; @@ -12,9 +14,8 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.client.RestTemplate; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertTrue; +import okhttp3.Request; +import okhttp3.RequestBody; public class TestRestTemplateBasicLiveTest { @@ -39,7 +40,9 @@ public class TestRestTemplateBasicLiveTest { @Test public void givenRestTemplateWrapper_whenSendGetForEntity_thenStatusOk() { - TestRestTemplate testRestTemplate = new TestRestTemplate(restTemplate); + RestTemplateBuilder restTemplateBuilder = new RestTemplateBuilder(); + restTemplateBuilder.configure(restTemplate); + TestRestTemplate testRestTemplate = new TestRestTemplate(restTemplateBuilder); ResponseEntity response = testRestTemplate.getForEntity(FOO_RESOURCE_URL + "/1", String.class); assertThat(response.getStatusCode(), equalTo(HttpStatus.OK)); } @@ -55,7 +58,9 @@ public class TestRestTemplateBasicLiveTest { @Test public void givenRestTemplateWrapperWithCredentials_whenSendGetForEntity_thenStatusOk() { - TestRestTemplate testRestTemplate = new TestRestTemplate(restTemplate, "user", "passwd"); + RestTemplateBuilder restTemplateBuilder = new RestTemplateBuilder().basicAuthentication("user", "passwd"); + restTemplateBuilder.configure(restTemplate); + TestRestTemplate testRestTemplate = new TestRestTemplate(restTemplateBuilder); ResponseEntity response = testRestTemplate.getForEntity(URL_SECURED_BY_AUTHENTICATION, String.class); assertThat(response.getStatusCode(), equalTo(HttpStatus.OK)); diff --git a/spring-resttemplate/src/test/java/org/baeldung/web/service/EmployeeServiceMockRestServiceServerUnitTest.java b/spring-resttemplate/src/test/java/org/baeldung/web/service/EmployeeServiceMockRestServiceServerUnitTest.java new file mode 100644 index 0000000000..a45af318f1 --- /dev/null +++ b/spring-resttemplate/src/test/java/org/baeldung/web/service/EmployeeServiceMockRestServiceServerUnitTest.java @@ -0,0 +1,66 @@ +package org.baeldung.web.service; + +import static org.springframework.test.web.client.match.MockRestRequestMatchers.method; +import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo; +import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus; + +import java.net.URI; + +import org.baeldung.SpringTestConfig; +import org.baeldung.web.model.Employee; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.client.ExpectedCount; +import org.springframework.test.web.client.MockRestServiceServer; +import org.springframework.web.client.RestTemplate; + +import com.fasterxml.jackson.databind.ObjectMapper; + +@RunWith(SpringRunner.class) +@ContextConfiguration(classes = SpringTestConfig.class) +public class EmployeeServiceMockRestServiceServerUnitTest { + + private static final Logger logger = LoggerFactory.getLogger(EmployeeServiceMockRestServiceServerUnitTest.class); + + @Autowired + private EmployeeService empService; + + @Autowired + private RestTemplate restTemplate; + + private MockRestServiceServer mockServer; + + private ObjectMapper mapper = new ObjectMapper(); + + @Before + public void init() { + mockServer = MockRestServiceServer.createServer(restTemplate); + } + + @Test + public void givenMockingIsDoneByMockRestServiceServer_whenGetIsCalled_shouldReturnMockedObject() throws Exception { + Employee emp = new Employee("E001", "Eric Simmons"); + + mockServer.expect(ExpectedCount.once(), + requestTo(new URI("http://localhost:8080/employee/E001"))) + .andExpect(method(HttpMethod.GET)) + .andRespond(withStatus(HttpStatus.OK) + .contentType(MediaType.APPLICATION_JSON) + .body(mapper.writeValueAsString(emp))); + + Employee employee = empService.getEmployee("E001"); + mockServer.verify(); + Assert.assertEquals(emp, employee); + } + +} diff --git a/spring-resttemplate/src/test/java/org/baeldung/web/service/EmployeeServiceUnitTest.java b/spring-resttemplate/src/test/java/org/baeldung/web/service/EmployeeServiceUnitTest.java new file mode 100644 index 0000000000..23cd9a8fd2 --- /dev/null +++ b/spring-resttemplate/src/test/java/org/baeldung/web/service/EmployeeServiceUnitTest.java @@ -0,0 +1,41 @@ +package org.baeldung.web.service; + +import org.baeldung.web.model.Employee; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.MockitoAnnotations; +import org.mockito.runners.MockitoJUnitRunner; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.client.RestTemplate; + +@RunWith(MockitoJUnitRunner.class) +public class EmployeeServiceUnitTest { + + private static final Logger logger = LoggerFactory.getLogger(EmployeeServiceUnitTest.class); + + @Mock + private RestTemplate restTemplate; + + @InjectMocks + private EmployeeService empService = new EmployeeService(); + + @Test + public void givenMockingIsDoneByMockito_whenGetIsCalled_shouldReturnMockedObject() throws Exception { + Employee emp = new Employee("E001", "Eric Simmons"); + Mockito.when(restTemplate.getForEntity("http://localhost:8080/employee/E001", Employee.class)) + .thenReturn(new ResponseEntity(emp, HttpStatus.OK)); + + Employee employee = empService.getEmployee("E001"); + + Assert.assertEquals(emp, employee); + } + +} diff --git a/spring-resttemplate/src/test/resources/logback-test.xml b/spring-resttemplate/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..9f48d36486 --- /dev/null +++ b/spring-resttemplate/src/test/resources/logback-test.xml @@ -0,0 +1,23 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-security-mvc-boot/README.MD b/spring-security-mvc-boot/README.MD index 6f01bfdc65..20036283a3 100644 --- a/spring-security-mvc-boot/README.MD +++ b/spring-security-mvc-boot/README.MD @@ -12,3 +12,4 @@ The "REST With Spring" Classes: http://github.learnspringsecurity.com - [Spring Data with Spring Security](https://www.baeldung.com/spring-data-security) - [Spring Security – Whitelist IP Range](https://www.baeldung.com/spring-security-whitelist-ip-range) - [Find the Registered Spring Security Filters](https://www.baeldung.com/spring-security-registered-filters) +- [HTTPS using Self-Signed Certificate in Spring Boot](https://www.baeldung.com/spring-boot-https-self-signed-certificate) diff --git a/spring-security-mvc-boot/pom.xml b/spring-security-mvc-boot/pom.xml index 2427d0de1a..0a40b0b324 100644 --- a/spring-security-mvc-boot/pom.xml +++ b/spring-security-mvc-boot/pom.xml @@ -36,7 +36,7 @@ org.thymeleaf.extras - thymeleaf-extras-springsecurity4 + thymeleaf-extras-springsecurity5 org.springframework.boot diff --git a/spring-security-mvc-login/pom.xml b/spring-security-mvc-login/pom.xml index f70cf256dc..5ee216548a 100644 --- a/spring-security-mvc-login/pom.xml +++ b/spring-security-mvc-login/pom.xml @@ -10,9 +10,9 @@ com.baeldung - parent-spring-4 + parent-spring-5 0.0.1-SNAPSHOT - ../parent-spring-4 + ../parent-spring-5 @@ -138,6 +138,15 @@ org.apache.maven.plugins maven-war-plugin ${maven-war-plugin.version} + + + default-war + prepare-package + + false + + + @@ -167,7 +176,7 @@ - 4.2.6.RELEASE + 5.0.5.RELEASE 3.1.0 diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/AppInitializer.java b/spring-security-mvc-login/src/main/java/com/baeldung/AppInitializer.java new file mode 100644 index 0000000000..4f38d190eb --- /dev/null +++ b/spring-security-mvc-login/src/main/java/com/baeldung/AppInitializer.java @@ -0,0 +1,33 @@ +package com.baeldung; + +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.ServletRegistration; + +import org.springframework.web.WebApplicationInitializer; +import org.springframework.web.context.ContextLoaderListener; +import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; +import org.springframework.web.context.support.GenericWebApplicationContext; +import org.springframework.web.filter.DelegatingFilterProxy; +import org.springframework.web.servlet.DispatcherServlet; + +public class AppInitializer implements WebApplicationInitializer { + + @Override + public void onStartup(final ServletContext sc) throws ServletException { + + AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext(); + + root.scan("com.baeldung"); + sc.addListener(new ContextLoaderListener(root)); + + ServletRegistration.Dynamic appServlet = sc.addServlet("mvc", new DispatcherServlet(new GenericWebApplicationContext())); + appServlet.setLoadOnStartup(1); + appServlet.addMapping("/"); + + sc.addFilter("securityFilter", new DelegatingFilterProxy("springSecurityFilterChain")) + .addMappingForUrlPatterns(null, false, "/*"); + + } + +} diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/controller/SecuredResourceController.java b/spring-security-mvc-login/src/main/java/com/baeldung/controller/SecuredResourceController.java similarity index 93% rename from spring-security-mvc-login/src/main/java/org/baeldung/controller/SecuredResourceController.java rename to spring-security-mvc-login/src/main/java/com/baeldung/controller/SecuredResourceController.java index 4b68eee983..a458a5aeac 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/controller/SecuredResourceController.java +++ b/spring-security-mvc-login/src/main/java/com/baeldung/controller/SecuredResourceController.java @@ -1,4 +1,4 @@ -package org.baeldung.controller; +package com.baeldung.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/security/CustomAccessDeniedHandler.java b/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAccessDeniedHandler.java similarity index 97% rename from spring-security-mvc-login/src/main/java/org/baeldung/security/CustomAccessDeniedHandler.java rename to spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAccessDeniedHandler.java index 64698072bc..9d9fa81dc0 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/security/CustomAccessDeniedHandler.java +++ b/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAccessDeniedHandler.java @@ -1,4 +1,4 @@ -package org.baeldung.security; +package com.baeldung.security; import java.io.IOException; diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/security/CustomAuthenticationFailureHandler.java b/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAuthenticationFailureHandler.java similarity index 96% rename from spring-security-mvc-login/src/main/java/org/baeldung/security/CustomAuthenticationFailureHandler.java rename to spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAuthenticationFailureHandler.java index 5eddf3883e..410d3f1ce9 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/security/CustomAuthenticationFailureHandler.java +++ b/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAuthenticationFailureHandler.java @@ -1,4 +1,4 @@ -package org.baeldung.security; +package com.baeldung.security; import org.springframework.http.HttpStatus; import org.springframework.security.core.AuthenticationException; diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/security/CustomLogoutSuccessHandler.java b/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomLogoutSuccessHandler.java similarity index 96% rename from spring-security-mvc-login/src/main/java/org/baeldung/security/CustomLogoutSuccessHandler.java rename to spring-security-mvc-login/src/main/java/com/baeldung/security/CustomLogoutSuccessHandler.java index 7360b4e03f..7949eee69a 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/security/CustomLogoutSuccessHandler.java +++ b/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomLogoutSuccessHandler.java @@ -1,4 +1,4 @@ -package org.baeldung.security; +package com.baeldung.security; import java.io.IOException; diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/security/RefererAuthenticationSuccessHandler.java b/spring-security-mvc-login/src/main/java/com/baeldung/security/RefererAuthenticationSuccessHandler.java similarity index 93% rename from spring-security-mvc-login/src/main/java/org/baeldung/security/RefererAuthenticationSuccessHandler.java rename to spring-security-mvc-login/src/main/java/com/baeldung/security/RefererAuthenticationSuccessHandler.java index 5b025d9fd1..05a2463699 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/security/RefererAuthenticationSuccessHandler.java +++ b/spring-security-mvc-login/src/main/java/com/baeldung/security/RefererAuthenticationSuccessHandler.java @@ -1,4 +1,4 @@ -package org.baeldung.security; +package com.baeldung.security; import org.springframework.security.web.authentication.AuthenticationSuccessHandler; import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler; diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/spring/ChannelSecSecurityConfig.java b/spring-security-mvc-login/src/main/java/com/baeldung/spring/ChannelSecSecurityConfig.java similarity index 96% rename from spring-security-mvc-login/src/main/java/org/baeldung/spring/ChannelSecSecurityConfig.java rename to spring-security-mvc-login/src/main/java/com/baeldung/spring/ChannelSecSecurityConfig.java index 4f736360b9..e9a6a9e120 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/spring/ChannelSecSecurityConfig.java +++ b/spring-security-mvc-login/src/main/java/com/baeldung/spring/ChannelSecSecurityConfig.java @@ -1,6 +1,5 @@ -package org.baeldung.spring; +package com.baeldung.spring; -import org.baeldung.security.CustomLogoutSuccessHandler; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; @@ -10,6 +9,8 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; +import com.baeldung.security.CustomLogoutSuccessHandler; + @Configuration // @ImportResource({ "classpath:channelWebSecurityConfig.xml" }) @EnableWebSecurity diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/spring/MvcConfig.java b/spring-security-mvc-login/src/main/java/com/baeldung/spring/MvcConfig.java similarity index 89% rename from spring-security-mvc-login/src/main/java/org/baeldung/spring/MvcConfig.java rename to spring-security-mvc-login/src/main/java/com/baeldung/spring/MvcConfig.java index b59dbee0cf..a9c7e0cf15 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/spring/MvcConfig.java +++ b/spring-security-mvc-login/src/main/java/com/baeldung/spring/MvcConfig.java @@ -1,17 +1,18 @@ -package org.baeldung.spring; +package com.baeldung.spring; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.view.InternalResourceViewResolver; import org.springframework.web.servlet.view.JstlView; @EnableWebMvc @Configuration -public class MvcConfig extends WebMvcConfigurerAdapter { +public class MvcConfig implements WebMvcConfigurer { public MvcConfig() { super(); @@ -21,10 +22,8 @@ public class MvcConfig extends WebMvcConfigurerAdapter { @Override public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); registry.addViewController("/anonymous.html"); - registry.addViewController("/login.html"); registry.addViewController("/homepage.html"); registry.addViewController("/admin/adminpage.html"); diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/spring/RedirectionSecurityConfig.java b/spring-security-mvc-login/src/main/java/com/baeldung/spring/RedirectionSecurityConfig.java similarity index 97% rename from spring-security-mvc-login/src/main/java/org/baeldung/spring/RedirectionSecurityConfig.java rename to spring-security-mvc-login/src/main/java/com/baeldung/spring/RedirectionSecurityConfig.java index 1472a1f89c..3516438a6e 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/spring/RedirectionSecurityConfig.java +++ b/spring-security-mvc-login/src/main/java/com/baeldung/spring/RedirectionSecurityConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.spring; +package com.baeldung.spring; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; diff --git a/spring-security-mvc-login/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/spring-security-mvc-login/src/main/java/com/baeldung/spring/SecSecurityConfig.java similarity index 78% rename from spring-security-mvc-login/src/main/java/org/baeldung/spring/SecSecurityConfig.java rename to spring-security-mvc-login/src/main/java/com/baeldung/spring/SecSecurityConfig.java index accc7c9afd..08a83f8633 100644 --- a/spring-security-mvc-login/src/main/java/org/baeldung/spring/SecSecurityConfig.java +++ b/spring-security-mvc-login/src/main/java/com/baeldung/spring/SecSecurityConfig.java @@ -1,8 +1,5 @@ -package org.baeldung.spring; +package com.baeldung.spring; -import org.baeldung.security.CustomAccessDeniedHandler; -import org.baeldung.security.CustomAuthenticationFailureHandler; -import org.baeldung.security.CustomLogoutSuccessHandler; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; @@ -10,10 +7,16 @@ import org.springframework.security.config.annotation.authentication.builders.Au import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.web.access.AccessDeniedHandler; import org.springframework.security.web.authentication.AuthenticationFailureHandler; import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; +import com.baeldung.security.CustomAccessDeniedHandler; +import com.baeldung.security.CustomAuthenticationFailureHandler; +import com.baeldung.security.CustomLogoutSuccessHandler; + @Configuration // @ImportResource({ "classpath:webSecurityConfig.xml" }) @EnableWebSecurity @@ -28,11 +31,11 @@ public class SecSecurityConfig extends WebSecurityConfigurerAdapter { protected void configure(final AuthenticationManagerBuilder auth) throws Exception { // @formatter:off auth.inMemoryAuthentication() - .withUser("user1").password("user1Pass").roles("USER") + .withUser("user1").password(passwordEncoder().encode("user1Pass")).roles("USER") .and() - .withUser("user2").password("user2Pass").roles("USER") + .withUser("user2").password(passwordEncoder().encode("user2Pass")).roles("USER") .and() - .withUser("admin").password("adminPass").roles("ADMIN"); + .withUser("admin").password(passwordEncoder().encode("adminPass")).roles("ADMIN"); // @formatter:on } @@ -78,4 +81,9 @@ public class SecSecurityConfig extends WebSecurityConfigurerAdapter { public AuthenticationFailureHandler authenticationFailureHandler() { return new CustomAuthenticationFailureHandler(); } + + @Bean + public PasswordEncoder passwordEncoder() { + return new BCryptPasswordEncoder(); + } } diff --git a/spring-security-mvc-login/src/main/webapp/WEB-INF/web.xml b/spring-security-mvc-login/src/main/webapp/WEB-INF/web-old.xml similarity index 97% rename from spring-security-mvc-login/src/main/webapp/WEB-INF/web.xml rename to spring-security-mvc-login/src/main/webapp/WEB-INF/web-old.xml index eef48ec9b3..bc6f310147 100644 --- a/spring-security-mvc-login/src/main/webapp/WEB-INF/web.xml +++ b/spring-security-mvc-login/src/main/webapp/WEB-INF/web-old.xml @@ -15,7 +15,7 @@ contextConfigLocation - org.baeldung.spring + com.baeldung.spring diff --git a/spring-security-mvc-login/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-mvc-login/src/test/java/com/baeldung/SpringContextIntegrationTest.java similarity index 95% rename from spring-security-mvc-login/src/test/java/org/baeldung/SpringContextIntegrationTest.java rename to spring-security-mvc-login/src/test/java/com/baeldung/SpringContextIntegrationTest.java index 1d7f9ae497..20de02d5c5 100644 --- a/spring-security-mvc-login/src/test/java/org/baeldung/SpringContextIntegrationTest.java +++ b/spring-security-mvc-login/src/test/java/com/baeldung/SpringContextIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung; +package com.baeldung; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/spring-security-mvc-login/src/test/java/org/baeldung/security/FormLoginUnitTest.java b/spring-security-mvc-login/src/test/java/com/baeldung/security/FormLoginUnitTest.java similarity index 96% rename from spring-security-mvc-login/src/test/java/org/baeldung/security/FormLoginUnitTest.java rename to spring-security-mvc-login/src/test/java/com/baeldung/security/FormLoginUnitTest.java index 4b3a091e6c..b7d959bf36 100644 --- a/spring-security-mvc-login/src/test/java/org/baeldung/security/FormLoginUnitTest.java +++ b/spring-security-mvc-login/src/test/java/com/baeldung/security/FormLoginUnitTest.java @@ -1,6 +1,5 @@ -package org.baeldung.security; +package com.baeldung.security; -import org.baeldung.spring.SecSecurityConfig; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -13,6 +12,8 @@ import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import com.baeldung.spring.SecSecurityConfig; + import javax.servlet.Filter; import static org.junit.Assert.assertTrue; diff --git a/spring-security-mvc-login/src/test/java/org/baeldung/security/RedirectionSecurityIntegrationTest.java b/spring-security-mvc-login/src/test/java/com/baeldung/security/RedirectionSecurityIntegrationTest.java similarity index 99% rename from spring-security-mvc-login/src/test/java/org/baeldung/security/RedirectionSecurityIntegrationTest.java rename to spring-security-mvc-login/src/test/java/com/baeldung/security/RedirectionSecurityIntegrationTest.java index 2b7a8ce5b9..1235e2e69f 100644 --- a/spring-security-mvc-login/src/test/java/org/baeldung/security/RedirectionSecurityIntegrationTest.java +++ b/spring-security-mvc-login/src/test/java/com/baeldung/security/RedirectionSecurityIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.security; +package com.baeldung.security; import org.junit.Before; import org.junit.Test; diff --git a/spring-security-sso/pom.xml b/spring-security-sso/pom.xml index 764e899640..7761919ca7 100644 --- a/spring-security-sso/pom.xml +++ b/spring-security-sso/pom.xml @@ -23,8 +23,6 @@ 3.1.0 - 2.3.3.RELEASE - 2.0.1.RELEASE \ No newline at end of file diff --git a/spring-security-sso/spring-security-sso-auth-server/pom.xml b/spring-security-sso/spring-security-sso-auth-server/pom.xml index 1d57248b30..c0ad6dee2e 100644 --- a/spring-security-sso/spring-security-sso-auth-server/pom.xml +++ b/spring-security-sso/spring-security-sso-auth-server/pom.xml @@ -20,11 +20,10 @@ - org.springframework.security.oauth - spring-security-oauth2 - ${oauth.version} + org.springframework.security.oauth.boot + spring-security-oauth2-autoconfigure + ${oauth-auto.version} - \ No newline at end of file diff --git a/spring-security-sso/spring-security-sso-ui-2/pom.xml b/spring-security-sso/spring-security-sso-ui-2/pom.xml index afe7b59822..5881409c3a 100644 --- a/spring-security-sso/spring-security-sso-ui-2/pom.xml +++ b/spring-security-sso/spring-security-sso-ui-2/pom.xml @@ -37,7 +37,7 @@ org.thymeleaf.extras - thymeleaf-extras-springsecurity4 + thymeleaf-extras-springsecurity5 diff --git a/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiWebConfig.java b/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiWebConfig.java index 24d6c9b5d8..c17bb85173 100644 --- a/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiWebConfig.java +++ b/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiWebConfig.java @@ -3,15 +3,11 @@ package org.baeldung.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; -import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.*; @Configuration @EnableWebMvc -public class UiWebConfig extends WebMvcConfigurerAdapter { +public class UiWebConfig implements WebMvcConfigurer { @Bean public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { @@ -25,7 +21,6 @@ public class UiWebConfig extends WebMvcConfigurerAdapter { @Override public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); registry.addViewController("/") .setViewName("forward:/index"); registry.addViewController("/index"); diff --git a/spring-security-sso/spring-security-sso-ui/pom.xml b/spring-security-sso/spring-security-sso-ui/pom.xml index deb0e081be..3e85eb4737 100644 --- a/spring-security-sso/spring-security-sso-ui/pom.xml +++ b/spring-security-sso/spring-security-sso-ui/pom.xml @@ -38,7 +38,7 @@ org.thymeleaf.extras - thymeleaf-extras-springsecurity4 + thymeleaf-extras-springsecurity5 diff --git a/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiWebConfig.java b/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiWebConfig.java index 24d6c9b5d8..c17bb85173 100644 --- a/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiWebConfig.java +++ b/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiWebConfig.java @@ -3,15 +3,11 @@ package org.baeldung.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; -import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.*; @Configuration @EnableWebMvc -public class UiWebConfig extends WebMvcConfigurerAdapter { +public class UiWebConfig implements WebMvcConfigurer { @Bean public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { @@ -25,7 +21,6 @@ public class UiWebConfig extends WebMvcConfigurerAdapter { @Override public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); registry.addViewController("/") .setViewName("forward:/index"); registry.addViewController("/index"); diff --git a/spring-security-thymeleaf/pom.xml b/spring-security-thymeleaf/pom.xml index 5b7715bdeb..d8b476683a 100644 --- a/spring-security-thymeleaf/pom.xml +++ b/spring-security-thymeleaf/pom.xml @@ -43,7 +43,7 @@ org.thymeleaf.extras - thymeleaf-extras-springsecurity4 + thymeleaf-extras-springsecurity5