From 4e79fa906338f66f2d0a2d7aecc83acf718b5282 Mon Sep 17 00:00:00 2001 From: Jamie Bertram Date: Fri, 5 Nov 2021 08:26:44 -0400 Subject: [PATCH] Upgrade to PureScript 0.14.5 (#66) * Update purescript to 0.14.5 * Upgrade package set * Update materialized plan * Update PSGenerator * Update generic imports * Update BigInteger usages * Remove local web-common * Remove JsonTuple imports * Fix servant-support imports * Remove TestUtils imports * Remove other Data.Json * Add missing Cursor module * fix last import errors * Upgrade plutus-playground to PS 14 * Turn warnings into errors * Fix all warnings in playground * Update pab-client generator * Update pab-client package set * Upgrade plutus-pab-client to PS 14 * Update spago packages nix * Fix failing tests and switch to purescript-spec * Update spago packages nix and consolidate package set * run fix-stylish-haskell * Update and prune dependencies * Fix CSS build errors * Delete plutus PAB client * Delete plutus PAB client references * Update servant-purescript * Fix hydra build * remove psc-package related stuff * Fix webpack prod build * fix haskell styling * Fix CliSpec error * Fix all erroneous usages of BigInt.show --- .gitignore | 3 +- cabal.project | 6 +- ci.nix | 2 +- default.nix | 9 +- flake.lock | 25 +- flake.nix | 4 + nix/lib/purescript.nix | 15 +- nix/pkgs/default.nix | 26 +- nix/pkgs/fix-purty/default.nix | 1 - nix/pkgs/haskell/haskell.nix | 4 +- .../.plan.nix/purescript-bridge.nix | 15 +- .../.plan.nix/servant-purescript.nix | 19 +- .../haskell/materialized-darwin/default.nix | 4 - .../.plan.nix/purescript-bridge.nix | 15 +- .../.plan.nix/servant-purescript.nix | 19 +- .../haskell/materialized-linux/default.nix | 4 - .../.plan.nix/purescript-bridge.nix | 15 +- .../.plan.nix/servant-purescript.nix | 19 +- .../haskell/materialized-windows/default.nix | 4 - nix/pkgs/update-client-deps/default.nix | 2 - nix/tests/default.nix | 1 - nix/tests/purty.nix | 1 - packages.dhall | 8 + playground-common/src/PSGenerator/Common.hs | 309 +- plutus-pab-client/.gitignore | 15 - plutus-pab-client/config.nix | 61 - plutus-pab-client/default.nix | 103 - plutus-pab-client/entry.js | 4 - plutus-pab-client/pab-demo-scripts.nix | 115 - plutus-pab-client/package-lock.json | 7030 ----------------- plutus-pab-client/package.json | 41 - plutus-pab-client/packages.dhall | 186 - plutus-pab-client/spago-packages.nix | 1354 ---- plutus-pab-client/spago.dhall | 40 - plutus-pab-client/src/Main.purs | 39 - plutus-pab-client/src/MainFrame.purs | 294 - plutus-pab-client/src/MonadApp.purs | 133 - plutus-pab-client/src/Network/StreamData.purs | 205 - plutus-pab-client/src/Types.purs | 219 - plutus-pab-client/src/View.purs | 163 - plutus-pab-client/src/View/Blockchain.purs | 23 - plutus-pab-client/src/View/Contracts.purs | 169 - plutus-pab-client/src/View/Events.purs | 28 - plutus-pab-client/src/View/Pretty.purs | 325 - plutus-pab-client/src/View/Utils.purs | 89 - plutus-pab-client/static/favicon.ico | Bin 14082 -> 0 bytes plutus-pab-client/static/index.html | 9 - plutus-pab-client/static/main.scss | 140 - plutus-pab-client/static/variables.scss | 146 - plutus-pab-client/test/JsonEncodingTests.purs | 27 - plutus-pab-client/test/Main.js | 7 - plutus-pab-client/test/Main.purs | 17 - plutus-pab-client/test/MainFrameTests.purs | 116 - plutus-pab-client/web-common | 1 - plutus-pab-client/web-common-plutus | 1 - plutus-pab-client/webpack.config.js | 118 - plutus-pab/README.md | 40 - plutus-pab/examples/ContractExample.hs | 13 +- plutus-pab/src/Plutus/PAB/Run/Cli.hs | 2 +- plutus-pab/src/Plutus/PAB/Run/PSGenerator.hs | 84 +- .../test-psgenerator/TestPSGenerator.hs | 11 +- plutus-pab/test/full/Plutus/PAB/CliSpec.hs | 4 +- plutus-playground-client/default.nix | 40 +- plutus-playground-client/entry.js | 2 +- plutus-playground-client/package-lock.json | 11 +- plutus-playground-client/package.json | 18 +- plutus-playground-client/packages.dhall | 199 - plutus-playground-client/packages.json | 3626 --------- plutus-playground-client/packages.nix | 1279 --- plutus-playground-client/spago-packages.nix | 838 +- plutus-playground-client/spago.dhall | 59 +- .../src/Action/Lenses.purs | 12 +- .../src/Action/Validation.purs | 4 +- plutus-playground-client/src/Action/View.purs | 53 +- .../src/Cursor.purs | 50 +- .../src/Editor/Lenses.purs | 18 +- .../src/Editor/State.purs | 20 +- .../src/Editor/Types.purs | 1 + plutus-playground-client/src/Editor/View.purs | 50 +- plutus-playground-client/src/Main.purs | 7 +- .../src/MainFrame/Lenses.purs | 70 +- .../src/MainFrame/MonadApp.purs | 10 +- .../src/MainFrame/State.purs | 87 +- .../src/MainFrame/Types.purs | 8 +- .../src/MainFrame/View.purs | 16 +- .../src/Playground/Gists.purs | 8 +- .../src/Simulator/View.purs | 31 +- plutus-playground-client/src/StaticData.purs | 19 +- .../src/Transaction/View.purs | 24 +- .../src/Wallet/Lenses.purs | 12 +- plutus-playground-client/src/Wallet/View.purs | 16 +- .../static/bootstrap.scss | 0 .../static/chain.scss | 0 .../static/chartist.scss | 0 plutus-playground-client/static/main.scss | 2 +- .../static/transactions.scss | 4 +- plutus-playground-client/test/ChainTests.purs | 99 +- .../test/CursorTests.purs | 170 - .../test/Data/Array/ExtraTests.purs | 75 - .../test/Data/Foldable/ExtraTests.purs | 112 - .../test/Data/String/ExtraTests.purs | 62 - .../test/EditorTests.purs | 19 +- plutus-playground-client/test/GistsTests.purs | 44 +- .../test/JsonEncodingTests.purs | 193 - plutus-playground-client/test/Main.purs | 38 +- .../test/MainFrameTests.purs | 147 +- .../test/PlutusTx/AssocMapTests.purs | 194 - .../test/Schema/TypesTests.purs | 278 +- .../test/StaticDataTests.purs | 23 +- plutus-playground-client/test/gist1.json | 2 +- plutus-playground-client/web-common | 1 - plutus-playground-client/webpack.config.js | 37 +- plutus-playground-server/app/PSGenerator.hs | 84 +- shell.nix | 19 +- stack.yaml | 2 +- web-common-playground/src/Gists/View.purs | 39 +- web-common-plutus/src/Chain/Types.purs | 58 +- web-common-plutus/src/Chain/View.purs | 44 +- .../src/Data/Functor/Foldable.purs | 20 +- web-common-plutus/src/Ledger/Extra.purs | 24 +- web-common-plutus/src/NavTabs.purs | 7 +- web-common-plutus/src/Playground/Lenses.purs | 30 +- web-common-plutus/src/Schema/Types.purs | 74 +- web-common-plutus/src/Schema/View.purs | 65 +- web-common-plutus/src/Validation.purs | 15 +- web-common-plutus/src/ValueEditor.purs | 33 +- web-common/.gitignore | 14 - web-common/ARCHITECTURE.adoc | 3 - web-common/default.nix | 52 - web-common/src/AjaxUtils.purs | 83 - web-common/src/Analytics.js | 21 - web-common/src/Analytics.purs | 106 - web-common/src/Animation.purs | 89 - web-common/src/Bootstrap.purs | 552 -- web-common/src/Bootstrap/Extra.purs | 26 - web-common/src/Chartist.js | 35 - web-common/src/Chartist.purs | 113 - web-common/src/Clipboard.js | 8 - web-common/src/Clipboard.purs | 78 - web-common/src/Component/Avatar/Types.purs | 12 - web-common/src/Component/Avatar/View.purs | 45 - web-common/src/Component/Box.purs | 44 - web-common/src/Component/Button/Types.purs | 5 - web-common/src/Component/Button/View.purs | 46 - web-common/src/Component/Column.purs | 38 - web-common/src/Component/Container.purs | 22 - web-common/src/Component/Expand.purs | 75 - web-common/src/Component/Expand/State.purs | 49 - web-common/src/Component/Expand/Types.purs | 33 - .../src/Component/Expand/Types/Internal.purs | 17 - web-common/src/Component/Heading.purs | 23 - web-common/src/Component/Hint/Lenses.purs | 23 - web-common/src/Component/Hint/State.purs | 185 - web-common/src/Component/Hint/Types.purs | 43 - web-common/src/Component/Hint/View.purs | 63 - web-common/src/Component/IconButton/View.purs | 16 - web-common/src/Component/Icons.purs | 227 - web-common/src/Component/Input/Types.purs | 23 - web-common/src/Component/Input/View.purs | 97 - web-common/src/Component/Label/Types.purs | 14 - web-common/src/Component/Label/View.purs | 51 - web-common/src/Component/Layout.purs | 21 - web-common/src/Component/Link.purs | 19 - web-common/src/Component/Popper.purs | 59 - web-common/src/Component/Popper/Internal.js | 67 - web-common/src/Component/Popper/Internal.purs | 219 - web-common/src/Component/Popper/Types.purs | 143 - web-common/src/Component/Progress.purs | 40 - .../src/Component/Progress/Circular.purs | 51 - web-common/src/Component/Row.purs | 41 - web-common/src/Component/Tooltip/Lenses.purs | 20 - web-common/src/Component/Tooltip/State.purs | 132 - web-common/src/Component/Tooltip/Types.purs | 43 - web-common/src/Component/Tooltip/View.purs | 26 - web-common/src/Control/Coroutine/Extra.purs | 10 - web-common/src/Control/Monad/Error/Extra.purs | 22 - .../src/Control/Monad/Except/Extra.purs | 11 - web-common/src/Control/Monad/Maybe/Extra.purs | 9 - .../src/Control/Monad/Reader/Extra.purs | 10 - web-common/src/Control/Monad/State/Extra.purs | 13 - web-common/src/Data/Array/Extra.purs | 35 - web-common/src/Data/Default.purs | 4 - web-common/src/Data/Foldable/Extra.purs | 65 - web-common/src/Data/Json/JsonNTuple.purs | 60 - .../src/Data/Json/JsonNonEmptyList.purs | 40 - web-common/src/Data/Json/JsonTuple.purs | 56 - web-common/src/Data/Json/JsonUUID.purs | 40 - web-common/src/Data/Lens/Extra.purs | 43 - web-common/src/Data/Lens/NonEmptyList.purs | 8 - web-common/src/Data/Map/Extra.purs | 16 - web-common/src/Data/Map/Ordered/OMap.purs | 130 - web-common/src/Data/Number/Extra.js | 6 - web-common/src/Data/Number/Extra.purs | 3 - web-common/src/Data/RawJson.js | 11 - web-common/src/Data/RawJson.purs | 38 - web-common/src/Data/Set/Extra.purs | 14 - web-common/src/Data/Set/Ordered/OSet.purs | 34 - web-common/src/Data/String/Extra.purs | 62 - web-common/src/Debug/Trace/Extra.js | 13 - web-common/src/Debug/Trace/Extra.purs | 7 - web-common/src/Halogen/Analytics.purs | 15 - web-common/src/Halogen/Animation.js | 21 - web-common/src/Halogen/Animation.purs | 101 - web-common/src/Halogen/Chartist.purs | 94 - web-common/src/Halogen/Css.purs | 21 - web-common/src/Halogen/ElementResize.purs | 25 - web-common/src/Halogen/ElementVisible.purs | 28 - web-common/src/Halogen/Extra.js | 8 - web-common/src/Halogen/Extra.purs | 178 - web-common/src/Halogen/HTML/Events/Extra.purs | 21 - web-common/src/Halogen/HTML/Extra.purs | 8 - web-common/src/Halogen/LocalStorage.purs | 30 - web-common/src/Halogen/Monaco.purs | 366 - web-common/src/Halogen/SVG.purs | 320 - web-common/src/Icons.purs | 88 - web-common/src/Language/Haskell/Monaco.js | 200 - web-common/src/Language/Haskell/Monaco.purs | 42 - web-common/src/LocalStorage.js | 49 - web-common/src/LocalStorage.purs | 94 - web-common/src/Monaco.js | 195 - web-common/src/Monaco.purs | 414 - web-common/src/Plutus/V1/Ledger/Time.purs | 39 - web-common/src/PlutusTx/AssocMap.purs | 132 - web-common/src/PlutusTx/Ratio.purs | 61 - web-common/src/Prologue.purs | 12 - web-common/src/SessionStorage.js | 7 - web-common/src/SessionStorage.purs | 18 - web-common/src/Web/DOM/ElementExtra.js | 58 - web-common/src/Web/DOM/ElementExtra.purs | 55 - .../src/Web/DOM/IntersectionObserver.js | 33 - .../src/Web/DOM/IntersectionObserver.purs | 63 - web-common/src/Web/DOM/ResizeObserver.js | 36 - web-common/src/Web/DOM/ResizeObserver.purs | 63 - web-common/src/Web/Event/Extra.js | 34 - web-common/src/Web/Event/Extra.purs | 53 - web-common/src/Web/HTML/WindowExtra.js | 15 - web-common/src/Web/HTML/WindowExtra.purs | 43 - web-common/src/WebSocket/Support.purs | 227 - web-common/static/common.scss | 213 - web-common/static/icons.css | 172 - web-common/static/index.html | 31 - web-common/static/popover.css | 34 - web-common/static/progress-circular.css | 86 - .../Component/Stateful.purs.template | 43 - .../Component/Stateful/State.purs.template | 24 - .../Component/Stateful/Types.purs.template | 18 - .../Stateful/Types/Internal.purs.template | 25 - .../Component/Stateful/View.purs.template | 10 - .../Component/Stateless/Types.purs.template | 6 - .../Component/Stateless/View.purs.template | 10 - web-common/templates/Page.purs.template | 41 - web-common/templates/Page/State.purs.template | 27 - web-common/templates/Page/Types.purs.template | 19 - .../Page/Types/Internal.purs.template | 25 - web-common/templates/Page/View.purs.template | 10 - web-common/test/Test/Data/Json/JsonNTuple.js | 7 - .../test/Test/Data/Json/JsonNTuple.purs | 43 - web-common/test/TestUtils.purs | 101 - 258 files changed, 1677 insertions(+), 27011 deletions(-) create mode 100644 packages.dhall delete mode 100644 plutus-pab-client/.gitignore delete mode 100644 plutus-pab-client/config.nix delete mode 100644 plutus-pab-client/default.nix delete mode 100644 plutus-pab-client/entry.js delete mode 100644 plutus-pab-client/pab-demo-scripts.nix delete mode 100644 plutus-pab-client/package-lock.json delete mode 100644 plutus-pab-client/package.json delete mode 100644 plutus-pab-client/packages.dhall delete mode 100644 plutus-pab-client/spago-packages.nix delete mode 100644 plutus-pab-client/spago.dhall delete mode 100644 plutus-pab-client/src/Main.purs delete mode 100644 plutus-pab-client/src/MainFrame.purs delete mode 100644 plutus-pab-client/src/MonadApp.purs delete mode 100644 plutus-pab-client/src/Network/StreamData.purs delete mode 100644 plutus-pab-client/src/Types.purs delete mode 100644 plutus-pab-client/src/View.purs delete mode 100644 plutus-pab-client/src/View/Blockchain.purs delete mode 100644 plutus-pab-client/src/View/Contracts.purs delete mode 100644 plutus-pab-client/src/View/Events.purs delete mode 100644 plutus-pab-client/src/View/Pretty.purs delete mode 100644 plutus-pab-client/src/View/Utils.purs delete mode 100644 plutus-pab-client/static/favicon.ico delete mode 100644 plutus-pab-client/static/index.html delete mode 100644 plutus-pab-client/static/main.scss delete mode 100644 plutus-pab-client/static/variables.scss delete mode 100644 plutus-pab-client/test/JsonEncodingTests.purs delete mode 100644 plutus-pab-client/test/Main.js delete mode 100644 plutus-pab-client/test/Main.purs delete mode 100644 plutus-pab-client/test/MainFrameTests.purs delete mode 120000 plutus-pab-client/web-common delete mode 120000 plutus-pab-client/web-common-plutus delete mode 100644 plutus-pab-client/webpack.config.js delete mode 100644 plutus-playground-client/packages.dhall delete mode 100644 plutus-playground-client/packages.json delete mode 100644 plutus-playground-client/packages.nix rename {web-common => plutus-playground-client}/src/Cursor.purs (75%) rename {web-common => plutus-playground-client}/static/bootstrap.scss (100%) rename {web-common => plutus-playground-client}/static/chain.scss (100%) rename {web-common => plutus-playground-client}/static/chartist.scss (100%) delete mode 100644 plutus-playground-client/test/CursorTests.purs delete mode 100644 plutus-playground-client/test/Data/Array/ExtraTests.purs delete mode 100644 plutus-playground-client/test/Data/Foldable/ExtraTests.purs delete mode 100644 plutus-playground-client/test/Data/String/ExtraTests.purs delete mode 100644 plutus-playground-client/test/JsonEncodingTests.purs delete mode 100644 plutus-playground-client/test/PlutusTx/AssocMapTests.purs delete mode 120000 plutus-playground-client/web-common delete mode 100644 web-common/.gitignore delete mode 100644 web-common/ARCHITECTURE.adoc delete mode 100644 web-common/default.nix delete mode 100644 web-common/src/AjaxUtils.purs delete mode 100644 web-common/src/Analytics.js delete mode 100644 web-common/src/Analytics.purs delete mode 100644 web-common/src/Animation.purs delete mode 100644 web-common/src/Bootstrap.purs delete mode 100644 web-common/src/Bootstrap/Extra.purs delete mode 100644 web-common/src/Chartist.js delete mode 100644 web-common/src/Chartist.purs delete mode 100644 web-common/src/Clipboard.js delete mode 100644 web-common/src/Clipboard.purs delete mode 100644 web-common/src/Component/Avatar/Types.purs delete mode 100644 web-common/src/Component/Avatar/View.purs delete mode 100644 web-common/src/Component/Box.purs delete mode 100644 web-common/src/Component/Button/Types.purs delete mode 100644 web-common/src/Component/Button/View.purs delete mode 100644 web-common/src/Component/Column.purs delete mode 100644 web-common/src/Component/Container.purs delete mode 100644 web-common/src/Component/Expand.purs delete mode 100644 web-common/src/Component/Expand/State.purs delete mode 100644 web-common/src/Component/Expand/Types.purs delete mode 100644 web-common/src/Component/Expand/Types/Internal.purs delete mode 100644 web-common/src/Component/Heading.purs delete mode 100644 web-common/src/Component/Hint/Lenses.purs delete mode 100644 web-common/src/Component/Hint/State.purs delete mode 100644 web-common/src/Component/Hint/Types.purs delete mode 100644 web-common/src/Component/Hint/View.purs delete mode 100644 web-common/src/Component/IconButton/View.purs delete mode 100644 web-common/src/Component/Icons.purs delete mode 100644 web-common/src/Component/Input/Types.purs delete mode 100644 web-common/src/Component/Input/View.purs delete mode 100644 web-common/src/Component/Label/Types.purs delete mode 100644 web-common/src/Component/Label/View.purs delete mode 100644 web-common/src/Component/Layout.purs delete mode 100644 web-common/src/Component/Link.purs delete mode 100644 web-common/src/Component/Popper.purs delete mode 100644 web-common/src/Component/Popper/Internal.js delete mode 100644 web-common/src/Component/Popper/Internal.purs delete mode 100644 web-common/src/Component/Popper/Types.purs delete mode 100644 web-common/src/Component/Progress.purs delete mode 100644 web-common/src/Component/Progress/Circular.purs delete mode 100644 web-common/src/Component/Row.purs delete mode 100644 web-common/src/Component/Tooltip/Lenses.purs delete mode 100644 web-common/src/Component/Tooltip/State.purs delete mode 100644 web-common/src/Component/Tooltip/Types.purs delete mode 100644 web-common/src/Component/Tooltip/View.purs delete mode 100644 web-common/src/Control/Coroutine/Extra.purs delete mode 100644 web-common/src/Control/Monad/Error/Extra.purs delete mode 100644 web-common/src/Control/Monad/Except/Extra.purs delete mode 100644 web-common/src/Control/Monad/Maybe/Extra.purs delete mode 100644 web-common/src/Control/Monad/Reader/Extra.purs delete mode 100644 web-common/src/Control/Monad/State/Extra.purs delete mode 100644 web-common/src/Data/Array/Extra.purs delete mode 100644 web-common/src/Data/Default.purs delete mode 100644 web-common/src/Data/Foldable/Extra.purs delete mode 100644 web-common/src/Data/Json/JsonNTuple.purs delete mode 100644 web-common/src/Data/Json/JsonNonEmptyList.purs delete mode 100644 web-common/src/Data/Json/JsonTuple.purs delete mode 100644 web-common/src/Data/Json/JsonUUID.purs delete mode 100644 web-common/src/Data/Lens/Extra.purs delete mode 100644 web-common/src/Data/Lens/NonEmptyList.purs delete mode 100644 web-common/src/Data/Map/Extra.purs delete mode 100644 web-common/src/Data/Map/Ordered/OMap.purs delete mode 100644 web-common/src/Data/Number/Extra.js delete mode 100644 web-common/src/Data/Number/Extra.purs delete mode 100644 web-common/src/Data/RawJson.js delete mode 100644 web-common/src/Data/RawJson.purs delete mode 100644 web-common/src/Data/Set/Extra.purs delete mode 100644 web-common/src/Data/Set/Ordered/OSet.purs delete mode 100644 web-common/src/Data/String/Extra.purs delete mode 100644 web-common/src/Debug/Trace/Extra.js delete mode 100644 web-common/src/Debug/Trace/Extra.purs delete mode 100644 web-common/src/Halogen/Analytics.purs delete mode 100644 web-common/src/Halogen/Animation.js delete mode 100644 web-common/src/Halogen/Animation.purs delete mode 100644 web-common/src/Halogen/Chartist.purs delete mode 100644 web-common/src/Halogen/Css.purs delete mode 100644 web-common/src/Halogen/ElementResize.purs delete mode 100644 web-common/src/Halogen/ElementVisible.purs delete mode 100644 web-common/src/Halogen/Extra.js delete mode 100644 web-common/src/Halogen/Extra.purs delete mode 100644 web-common/src/Halogen/HTML/Events/Extra.purs delete mode 100644 web-common/src/Halogen/HTML/Extra.purs delete mode 100644 web-common/src/Halogen/LocalStorage.purs delete mode 100644 web-common/src/Halogen/Monaco.purs delete mode 100644 web-common/src/Halogen/SVG.purs delete mode 100644 web-common/src/Icons.purs delete mode 100644 web-common/src/Language/Haskell/Monaco.js delete mode 100644 web-common/src/Language/Haskell/Monaco.purs delete mode 100644 web-common/src/LocalStorage.js delete mode 100644 web-common/src/LocalStorage.purs delete mode 100644 web-common/src/Monaco.js delete mode 100644 web-common/src/Monaco.purs delete mode 100644 web-common/src/Plutus/V1/Ledger/Time.purs delete mode 100644 web-common/src/PlutusTx/AssocMap.purs delete mode 100644 web-common/src/PlutusTx/Ratio.purs delete mode 100644 web-common/src/Prologue.purs delete mode 100644 web-common/src/SessionStorage.js delete mode 100644 web-common/src/SessionStorage.purs delete mode 100644 web-common/src/Web/DOM/ElementExtra.js delete mode 100644 web-common/src/Web/DOM/ElementExtra.purs delete mode 100644 web-common/src/Web/DOM/IntersectionObserver.js delete mode 100644 web-common/src/Web/DOM/IntersectionObserver.purs delete mode 100644 web-common/src/Web/DOM/ResizeObserver.js delete mode 100644 web-common/src/Web/DOM/ResizeObserver.purs delete mode 100644 web-common/src/Web/Event/Extra.js delete mode 100644 web-common/src/Web/Event/Extra.purs delete mode 100644 web-common/src/Web/HTML/WindowExtra.js delete mode 100644 web-common/src/Web/HTML/WindowExtra.purs delete mode 100644 web-common/src/WebSocket/Support.purs delete mode 100644 web-common/static/common.scss delete mode 100644 web-common/static/icons.css delete mode 100644 web-common/static/index.html delete mode 100644 web-common/static/popover.css delete mode 100644 web-common/static/progress-circular.css delete mode 100644 web-common/templates/Component/Stateful.purs.template delete mode 100644 web-common/templates/Component/Stateful/State.purs.template delete mode 100644 web-common/templates/Component/Stateful/Types.purs.template delete mode 100644 web-common/templates/Component/Stateful/Types/Internal.purs.template delete mode 100644 web-common/templates/Component/Stateful/View.purs.template delete mode 100644 web-common/templates/Component/Stateless/Types.purs.template delete mode 100644 web-common/templates/Component/Stateless/View.purs.template delete mode 100644 web-common/templates/Page.purs.template delete mode 100644 web-common/templates/Page/State.purs.template delete mode 100644 web-common/templates/Page/Types.purs.template delete mode 100644 web-common/templates/Page/Types/Internal.purs.template delete mode 100644 web-common/templates/Page/View.purs.template delete mode 100644 web-common/test/Test/Data/Json/JsonNTuple.js delete mode 100644 web-common/test/Test/Data/Json/JsonNTuple.purs delete mode 100644 web-common/test/TestUtils.purs diff --git a/.gitignore b/.gitignore index f90d76c52d..4153d6ae44 100644 --- a/.gitignore +++ b/.gitignore @@ -75,10 +75,9 @@ pkgs/.stack **/yarn-error.log **/yarn.lock **/.psci_modules/ -**/.psc-package/ -**/.psc-package2nix/ **/.spago/ **/.spago2nix/ +**/.psa-stash # Backend config files marlowe-playground-server/playground.yaml diff --git a/cabal.project b/cabal.project index b6baccfdc8..f8c9a0dc98 100644 --- a/cabal.project +++ b/cabal.project @@ -64,16 +64,16 @@ source-repository-package location: https://github.com/Quid2/flat.git tag: ee59880f47ab835dbd73bea0847dab7869fc20d8 --- Needs some patches, but upstream seems to be fairly dead (no activity in > 1 year) +-- TODO replace with something more sustainable (and maintained) source-repository-package type: git location: https://github.com/input-output-hk/purescript-bridge.git - tag: 6a92d7853ea514be8b70bab5e72077bf5a510596 + tag: 366fc70b341e2633f3ad0158a577d52e1cd2b138 source-repository-package type: git location: https://github.com/input-output-hk/servant-purescript.git - tag: a0c7c7e37c95564061247461aef4be505a853538 + tag: ebea59c7bdfc0338d83fca772b9a57e28560bcde -- Copied from plutus-core source-repository-package diff --git a/ci.nix b/ci.nix index 0b413865b7..93d3a57033 100644 --- a/ci.nix +++ b/ci.nix @@ -79,7 +79,7 @@ let inherit (plutus-apps.haskell.project) roots; } // pkgs.lib.optionalAttrs (!rootsOnly) (filterCross { # build relevant top level attributes from default.nix - inherit (packages) docs tests plutus-playground plutus-pab plutus-use-cases; + inherit (packages) docs tests plutus-playground plutus-use-cases; # Build the shell expression to be sure it works on all platforms # diff --git a/default.nix b/default.nix index 674d6f1603..2b66265a8a 100644 --- a/default.nix +++ b/default.nix @@ -37,7 +37,7 @@ rec { plutus-pab-examples plutus-uniswap; - webCommon = pkgs.callPackage ./web-common { inherit (plutus-apps.lib) gitignore-nix; }; + webCommon = pkgs.callPackage sources.web-common { inherit (plutus-apps.lib) gitignore-nix; }; webCommonPlutus = pkgs.callPackage ./web-common-plutus { inherit (plutus-apps.lib) gitignore-nix; }; webCommonPlayground = pkgs.callPackage ./web-common-playground { inherit (plutus-apps.lib) gitignore-nix; }; @@ -50,11 +50,6 @@ rec { }) client server generate-purescript start-backend; }; - plutus-pab = pkgs.recurseIntoAttrs (pkgs.callPackage ./plutus-pab-client { - inherit (plutus-apps.lib) buildPursPackage buildNodeModules gitignore-nix filterNpm; - inherit haskell webCommon webCommonPlutus; - }); - plutus-use-cases = pkgs.recurseIntoAttrs (pkgs.callPackage ./plutus-use-cases { inherit haskell; }); @@ -63,7 +58,7 @@ rec { inherit pkgs docs; inherit (plutus-apps.lib) gitignore-nix; inherit (plutus-apps) fixStylishHaskell fixPurty fixPngOptimization; - inherit plutus-playground web-ghc plutus-pab; + inherit plutus-playground web-ghc; src = ./.; }; diff --git a/flake.lock b/flake.lock index 6fc5042a3f..13202e6dd1 100644 --- a/flake.lock +++ b/flake.lock @@ -19,11 +19,11 @@ "easy-purescript-nix": { "flake": false, "locked": { - "lastModified": 1614069378, - "narHash": "sha256-OGLWGzLEnBsnX/4gW15Je5Z6EGrrq1AoSfniaOsSr0s=", + "lastModified": 1634991731, + "narHash": "sha256-uAS889Rpl//h0Ne2M7NyNk6tDFOkr9O3R8yny3qHKVk=", "owner": "justinwoo", "repo": "easy-purescript-nix", - "rev": "c2e49b4a94ee55df294212c561f2ac7225a8ebbf", + "rev": "7802db65618c2ead3a55121355816b4c41d276d9", "type": "github" }, "original": { @@ -209,7 +209,8 @@ "pre-commit-hooks-nix": "pre-commit-hooks-nix", "spago2nix": "spago2nix", "sphinxcontrib-haddock": "sphinxcontrib-haddock", - "stackage-nix": "stackage-nix" + "stackage-nix": "stackage-nix", + "web-common": "web-common" } }, "spago2nix": { @@ -259,6 +260,22 @@ "repo": "stackage.nix", "type": "github" } + }, + "web-common": { + "flake": false, + "locked": { + "lastModified": 1635526611, + "narHash": "sha256-qLUmwG7hKGbc3pFWkKSKFFE0uWxgPSrIUZspUwwEFCo=", + "owner": "input-output-hk", + "repo": "purescript-web-common", + "rev": "f1241ea27fc6acc78d093574e3707165b4ef9b3e", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "purescript-web-common", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index b1f0682ff3..f4bc9b1b9b 100644 --- a/flake.nix +++ b/flake.nix @@ -73,6 +73,10 @@ url = "github:input-output-hk/stackage.nix"; flake = false; }; + web-common = { + url = "github:input-output-hk/purescript-web-common"; + flake = false; + }; }; outputs = { self, flake-utils, ... }@inputs: diff --git a/nix/lib/purescript.nix b/nix/lib/purescript.nix index a9d5449d31..ab7b5c3514 100644 --- a/nix/lib/purescript.nix +++ b/nix/lib/purescript.nix @@ -8,8 +8,6 @@ , src # name of the project , name - # packages as generated by psc-pacakge2nix -, packages # spago packages as generated by spago2nix , spagoPackages # a map of source directory name to contents that will be symlinked into the environment before building @@ -22,7 +20,9 @@ let addExtraSrc = k: v: "ln -sf ${v} ${k}"; addExtraSrcs = builtins.concatStringsSep "\n" (builtins.attrValues (pkgs.lib.mapAttrs addExtraSrc extraSrcs)); - extraPSPaths = builtins.concatStringsSep " " (map (d: "${d}/**/*.purs") (builtins.attrNames extraSrcs)); + extraPSPaths = builtins.concatStringsSep " " (map (d: "'${d}/**/*.purs'") (builtins.attrNames extraSrcs)); + getGlob = pkg: ''".spago/${pkg.name}/${pkg.version}/src/**/*.purs"''; + spagoSources = builtins.toString (builtins.map getGlob (builtins.attrValues spagoPackages.inputs)); in stdenv.mkDerivation { inherit name src checkPhase; @@ -31,9 +31,8 @@ stdenv.mkDerivation { nodeModules easyPS.purs easyPS.spago - easyPS.psc-package + easyPS.psa spagoPackages.installSpagoStyle - spagoPackages.buildSpagoStyle ]; buildPhase = '' export HOME=$NIX_BUILD_TOP @@ -43,8 +42,10 @@ stdenv.mkDerivation { ${addExtraSrcs} install-spago-style - build-spago-style src/**/*.purs test/**/*.purs ${extraPSPaths} - npm run webpack + echo building project... + psa compile --strict --censor-lib --stash --is-lib=generated --is-lib=.spago ${spagoSources} ${extraPSPaths} "src/**/*.purs" "test/**/*.purs" + echo done. + npm run build:webpack:prod ''; doCheck = true; installPhase = '' diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index 1fb11e518f..772b329335 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -57,7 +57,7 @@ let $(nix-build default.nix -A plutus-apps.haskell.extraPackages.updateAllShaFiles --argstr system x86_64-darwin) ''; updateClientDeps = pkgs.callPackage ./update-client-deps { - inherit purs psc-package spago spago2nix; + inherit purs spago spago2nix; }; # @@ -94,27 +94,7 @@ let # We pull out some packages from easyPS that are a pain to get otherwise. # In particular, we used to build purty ourselves, but now its build is a nightmare. # This does mean we can't as easily control the version we get, though. - inherit (easyPS) purty purs psc-package spago; - - # There is a spago2nix in easyPS, but it doesn't (currently) work. It doesn't - # matter because it's actually just a thin call to spago2nix's nix build - # script. So we can just go directly to the source and get the latest - # version. - # - # It's worth periodically checking to see if the easyPS version is working - # again. To check: - # - # * Replace this call with `inherit (easyPS) spago2nix;`. - # * Run `nix-shell --run 'cd plutus-playground-client ; update-client-deps' - # - # If that fails, it's not ready. Rollback. - # If it succeeds: - # - # * Merge your new `inherit (easyPS) spago2nix` with the one above. - # * Remove spago2nix from flake.nix - # * Run `nix --experimental-features 'nix-command flakes' flake lock` - # - spago2nix = pkgs.callPackage (sources.spago2nix) { }; + inherit (easyPS) purty purs spago purescript-language-server psa spago2nix; # sphinx haddock support sphinxcontrib-haddock = pkgs.callPackage (sources.sphinxcontrib-haddock) { pythonPackages = pkgs.python3Packages; }; @@ -155,7 +135,7 @@ in inherit sphinx-markdown-tables sphinxemoji sphinxcontrib-haddock; inherit nix-pre-commit-hooks; inherit haskell cabal-install cardano-repo-tool stylish-haskell hlint haskell-language-server haskell-language-server-wrapper hie-bios cardano-cli cardano-node; - inherit purty purty-pre-commit purs spago spago2nix; + inherit purty purty-pre-commit purs spago spago2nix purescript-language-server psa; inherit fixPurty fixStylishHaskell fixPngOptimization updateMaterialized updateClientDeps; inherit web-ghc; inherit easyPS plutus-haddock-combined; diff --git a/nix/pkgs/fix-purty/default.nix b/nix/pkgs/fix-purty/default.nix index 2f5b67dabd..880e9ff11b 100644 --- a/nix/pkgs/fix-purty/default.nix +++ b/nix/pkgs/fix-purty/default.nix @@ -6,7 +6,6 @@ writeShellScriptBin "fix-purty" '' # ignore the exit code, which is usually unhelpful. ${fd}/bin/fd \ --extension purs \ - --exclude '*/.psc-package/*' \ --exclude '*/.spago/*' \ --exclude '*/node_modules/*' \ --exclude '*/generated/*' \ diff --git a/nix/pkgs/haskell/haskell.nix b/nix/pkgs/haskell/haskell.nix index 7eeb23676c..a655e6333a 100644 --- a/nix/pkgs/haskell/haskell.nix +++ b/nix/pkgs/haskell/haskell.nix @@ -39,8 +39,8 @@ let inherit checkMaterialization; sha256map = { "https://github.com/Quid2/flat.git"."ee59880f47ab835dbd73bea0847dab7869fc20d8" = "1lrzknw765pz2j97nvv9ip3l1mcpf2zr4n56hwlz0rk7wq7ls4cm"; - "https://github.com/input-output-hk/purescript-bridge.git"."6a92d7853ea514be8b70bab5e72077bf5a510596" = "13j64vv116in3c204qsl1v0ajphac9fqvsjp7x3zzfr7n7g61drb"; - "https://github.com/input-output-hk/servant-purescript.git"."a0c7c7e37c95564061247461aef4be505a853538" = "177na04jf6wf18kandzsah40lw3xswmmccpr3hkb8wb4hypcffnf"; + "https://github.com/input-output-hk/purescript-bridge.git"."366fc70b341e2633f3ad0158a577d52e1cd2b138" = "18j0rysfccbmfpbw2d1rsjkpd5h84alpsn6b5rwzdxw9h5vqi9m5"; + "https://github.com/input-output-hk/servant-purescript.git"."ebea59c7bdfc0338d83fca772b9a57e28560bcde" = "0gjcq4y61kwb4w70pnswn5dp23wd13dac8d9hz84j374cm1kshsn"; "https://github.com/input-output-hk/cardano-base"."4ea7e2d927c9a7f78ddc69738409a5827ab66b98" = "0n0hxbr0l95cdc25jmmgs7apmmw17i91chhj5rzzv1k7f3iymf6d"; "https://github.com/input-output-hk/cardano-crypto.git"."07397f0e50da97eaa0575d93bee7ac4b2b2576ec" = "06sdx5ndn2g722jhpicmg96vsrys89fl81k8290b3lr6b1b0w4m3"; "https://github.com/input-output-hk/cardano-ledger-specs"."bf008ce028751cae9fb0b53c3bef20f07c06e333" = "0my3801w1vinc0kf5yh9lxl6saqxgwm6ccg0vvzi104pafcwwcqx"; diff --git a/nix/pkgs/haskell/materialized-darwin/.plan.nix/purescript-bridge.nix b/nix/pkgs/haskell/materialized-darwin/.plan.nix/purescript-bridge.nix index 90a67c6a56..779c4855dc 100644 --- a/nix/pkgs/haskell/materialized-darwin/.plan.nix/purescript-bridge.nix +++ b/nix/pkgs/haskell/materialized-darwin/.plan.nix/purescript-bridge.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "1.10"; - identifier = { name = "purescript-bridge"; version = "0.13.1.0"; }; + identifier = { name = "purescript-bridge"; version = "0.14.0.0"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "robert . klotzner A T gmx . at"; @@ -62,16 +62,23 @@ tests = { "tests" = { depends = [ + (hsPkgs."aeson" or (errorHandler.buildDepError "aeson")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) + (hsPkgs."hspec-expectations-pretty-diff" or (errorHandler.buildDepError "hspec-expectations-pretty-diff")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."purescript-bridge" or (errorHandler.buildDepError "purescript-bridge")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) (hsPkgs."wl-pprint-text" or (errorHandler.buildDepError "wl-pprint-text")) - (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) - (hsPkgs."hspec-expectations-pretty-diff" or (errorHandler.buildDepError "hspec-expectations-pretty-diff")) ]; buildable = true; - modules = [ "TestData" ]; + modules = [ "TestData" "RoundTrip/Spec" "RoundTrip/Types" ]; hsSourceDirs = [ "test" ]; mainPath = [ "Spec.hs" ]; }; diff --git a/nix/pkgs/haskell/materialized-darwin/.plan.nix/servant-purescript.nix b/nix/pkgs/haskell/materialized-darwin/.plan.nix/servant-purescript.nix index a5b310b99f..c928f543d0 100644 --- a/nix/pkgs/haskell/materialized-darwin/.plan.nix/servant-purescript.nix +++ b/nix/pkgs/haskell/materialized-darwin/.plan.nix/servant-purescript.nix @@ -10,15 +10,15 @@ { flags = {}; package = { - specVersion = "1.10"; + specVersion = "3.0"; identifier = { name = "servant-purescript"; version = "0.9.0.2"; }; license = "BSD-3-Clause"; copyright = "Copyright: (c) 2016 Robert Klotzner"; maintainer = "robert Dot klotzner A T gmx Dot at"; author = "Robert Klotzner"; - homepage = "https://github.com/eskimor/servant-purescript#readme"; + homepage = "https://github.com/input-output-hk/servant-purescript"; url = ""; - synopsis = "Generate PureScript accessor functions for you servant API"; + synopsis = "Generate a PureScript API client for you servant API"; description = "Please see README.md"; buildType = "Simple"; isLocal = true; @@ -46,15 +46,13 @@ (hsPkgs."servant" or (errorHandler.buildDepError "servant")) (hsPkgs."servant-foreign" or (errorHandler.buildDepError "servant-foreign")) (hsPkgs."servant-server" or (errorHandler.buildDepError "servant-server")) - (hsPkgs."servant-subscriber" or (errorHandler.buildDepError "servant-subscriber")) (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."wl-pprint-text" or (errorHandler.buildDepError "wl-pprint-text")) ]; buildable = true; modules = [ "Servant/PureScript/Internal" "Servant/PureScript/CodeGen" - "Servant/PureScript/Subscriber" - "Servant/PureScript/MakeRequests" "Servant/PureScript" "Servant/API/BrowserHeader" ]; @@ -66,14 +64,19 @@ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."aeson" or (errorHandler.buildDepError "aeson")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - (hsPkgs."mainland-pretty" or (errorHandler.buildDepError "mainland-pretty")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."hspec-expectations-pretty-diff" or (errorHandler.buildDepError "hspec-expectations-pretty-diff")) (hsPkgs."lens" or (errorHandler.buildDepError "lens")) + (hsPkgs."mainland-pretty" or (errorHandler.buildDepError "mainland-pretty")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."purescript-bridge" or (errorHandler.buildDepError "purescript-bridge")) (hsPkgs."servant" or (errorHandler.buildDepError "servant")) (hsPkgs."servant-foreign" or (errorHandler.buildDepError "servant-foreign")) (hsPkgs."servant-purescript" or (errorHandler.buildDepError "servant-purescript")) - (hsPkgs."servant-subscriber" or (errorHandler.buildDepError "servant-subscriber")) (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."wl-pprint-text" or (errorHandler.buildDepError "wl-pprint-text")) ]; buildable = true; hsSourceDirs = [ "test" ]; diff --git a/nix/pkgs/haskell/materialized-darwin/default.nix b/nix/pkgs/haskell/materialized-darwin/default.nix index 400dd9cbae..1da52b5187 100644 --- a/nix/pkgs/haskell/materialized-darwin/default.nix +++ b/nix/pkgs/haskell/materialized-darwin/default.nix @@ -529,8 +529,6 @@ "libyaml".revision = (((hackage."libyaml")."0.1.2").revisions).default; "libyaml".flags.system-libyaml = false; "libyaml".flags.no-unicode = false; - "servant-subscriber".revision = (((hackage."servant-subscriber")."0.7.0.0").revisions).default; - "servant-subscriber".flags.websockets_0_11 = true; "generic-lens-core".revision = (((hackage."generic-lens-core")."2.2.0.0").revisions).default; "splitmix".revision = (((hackage."splitmix")."0.1.0.3").revisions).default; "splitmix".flags.optimised-mixer = false; @@ -1592,7 +1590,6 @@ "measures".components.library.planned = lib.mkOverride 900 true; "foundation".components.library.planned = lib.mkOverride 900 true; "asn1-encoding".components.library.planned = lib.mkOverride 900 true; - "servant-subscriber".components.exes."subscriber-psGenerator".planned = lib.mkOverride 900 true; "persistent-sqlite".components.library.planned = lib.mkOverride 900 true; "finite-typelits".components.library.planned = lib.mkOverride 900 true; "plutus-chain-index-core".components.library.planned = lib.mkOverride 900 true; @@ -1608,7 +1605,6 @@ "cardano-prelude".components.library.planned = lib.mkOverride 900 true; "ouroboros-consensus".components.library.planned = lib.mkOverride 900 true; "ntp-client".components.library.planned = lib.mkOverride 900 true; - "servant-subscriber".components.library.planned = lib.mkOverride 900 true; "semigroups".components.library.planned = lib.mkOverride 900 true; "plutus-ledger-api".components.library.planned = lib.mkOverride 900 true; "cardano-binary".components.library.planned = lib.mkOverride 900 true; diff --git a/nix/pkgs/haskell/materialized-linux/.plan.nix/purescript-bridge.nix b/nix/pkgs/haskell/materialized-linux/.plan.nix/purescript-bridge.nix index 90a67c6a56..779c4855dc 100644 --- a/nix/pkgs/haskell/materialized-linux/.plan.nix/purescript-bridge.nix +++ b/nix/pkgs/haskell/materialized-linux/.plan.nix/purescript-bridge.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "1.10"; - identifier = { name = "purescript-bridge"; version = "0.13.1.0"; }; + identifier = { name = "purescript-bridge"; version = "0.14.0.0"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "robert . klotzner A T gmx . at"; @@ -62,16 +62,23 @@ tests = { "tests" = { depends = [ + (hsPkgs."aeson" or (errorHandler.buildDepError "aeson")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) + (hsPkgs."hspec-expectations-pretty-diff" or (errorHandler.buildDepError "hspec-expectations-pretty-diff")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."purescript-bridge" or (errorHandler.buildDepError "purescript-bridge")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) (hsPkgs."wl-pprint-text" or (errorHandler.buildDepError "wl-pprint-text")) - (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) - (hsPkgs."hspec-expectations-pretty-diff" or (errorHandler.buildDepError "hspec-expectations-pretty-diff")) ]; buildable = true; - modules = [ "TestData" ]; + modules = [ "TestData" "RoundTrip/Spec" "RoundTrip/Types" ]; hsSourceDirs = [ "test" ]; mainPath = [ "Spec.hs" ]; }; diff --git a/nix/pkgs/haskell/materialized-linux/.plan.nix/servant-purescript.nix b/nix/pkgs/haskell/materialized-linux/.plan.nix/servant-purescript.nix index a5b310b99f..c928f543d0 100644 --- a/nix/pkgs/haskell/materialized-linux/.plan.nix/servant-purescript.nix +++ b/nix/pkgs/haskell/materialized-linux/.plan.nix/servant-purescript.nix @@ -10,15 +10,15 @@ { flags = {}; package = { - specVersion = "1.10"; + specVersion = "3.0"; identifier = { name = "servant-purescript"; version = "0.9.0.2"; }; license = "BSD-3-Clause"; copyright = "Copyright: (c) 2016 Robert Klotzner"; maintainer = "robert Dot klotzner A T gmx Dot at"; author = "Robert Klotzner"; - homepage = "https://github.com/eskimor/servant-purescript#readme"; + homepage = "https://github.com/input-output-hk/servant-purescript"; url = ""; - synopsis = "Generate PureScript accessor functions for you servant API"; + synopsis = "Generate a PureScript API client for you servant API"; description = "Please see README.md"; buildType = "Simple"; isLocal = true; @@ -46,15 +46,13 @@ (hsPkgs."servant" or (errorHandler.buildDepError "servant")) (hsPkgs."servant-foreign" or (errorHandler.buildDepError "servant-foreign")) (hsPkgs."servant-server" or (errorHandler.buildDepError "servant-server")) - (hsPkgs."servant-subscriber" or (errorHandler.buildDepError "servant-subscriber")) (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."wl-pprint-text" or (errorHandler.buildDepError "wl-pprint-text")) ]; buildable = true; modules = [ "Servant/PureScript/Internal" "Servant/PureScript/CodeGen" - "Servant/PureScript/Subscriber" - "Servant/PureScript/MakeRequests" "Servant/PureScript" "Servant/API/BrowserHeader" ]; @@ -66,14 +64,19 @@ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."aeson" or (errorHandler.buildDepError "aeson")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - (hsPkgs."mainland-pretty" or (errorHandler.buildDepError "mainland-pretty")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."hspec-expectations-pretty-diff" or (errorHandler.buildDepError "hspec-expectations-pretty-diff")) (hsPkgs."lens" or (errorHandler.buildDepError "lens")) + (hsPkgs."mainland-pretty" or (errorHandler.buildDepError "mainland-pretty")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."purescript-bridge" or (errorHandler.buildDepError "purescript-bridge")) (hsPkgs."servant" or (errorHandler.buildDepError "servant")) (hsPkgs."servant-foreign" or (errorHandler.buildDepError "servant-foreign")) (hsPkgs."servant-purescript" or (errorHandler.buildDepError "servant-purescript")) - (hsPkgs."servant-subscriber" or (errorHandler.buildDepError "servant-subscriber")) (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."wl-pprint-text" or (errorHandler.buildDepError "wl-pprint-text")) ]; buildable = true; hsSourceDirs = [ "test" ]; diff --git a/nix/pkgs/haskell/materialized-linux/default.nix b/nix/pkgs/haskell/materialized-linux/default.nix index 6b3c04c447..2d3126e756 100644 --- a/nix/pkgs/haskell/materialized-linux/default.nix +++ b/nix/pkgs/haskell/materialized-linux/default.nix @@ -532,8 +532,6 @@ "libyaml".revision = (((hackage."libyaml")."0.1.2").revisions).default; "libyaml".flags.system-libyaml = false; "libyaml".flags.no-unicode = false; - "servant-subscriber".revision = (((hackage."servant-subscriber")."0.7.0.0").revisions).default; - "servant-subscriber".flags.websockets_0_11 = true; "generic-lens-core".revision = (((hackage."generic-lens-core")."2.2.0.0").revisions).default; "splitmix".revision = (((hackage."splitmix")."0.1.0.3").revisions).default; "splitmix".flags.optimised-mixer = false; @@ -1602,7 +1600,6 @@ "measures".components.library.planned = lib.mkOverride 900 true; "foundation".components.library.planned = lib.mkOverride 900 true; "asn1-encoding".components.library.planned = lib.mkOverride 900 true; - "servant-subscriber".components.exes."subscriber-psGenerator".planned = lib.mkOverride 900 true; "persistent-sqlite".components.library.planned = lib.mkOverride 900 true; "finite-typelits".components.library.planned = lib.mkOverride 900 true; "plutus-chain-index-core".components.library.planned = lib.mkOverride 900 true; @@ -1618,7 +1615,6 @@ "cardano-prelude".components.library.planned = lib.mkOverride 900 true; "ouroboros-consensus".components.library.planned = lib.mkOverride 900 true; "ntp-client".components.library.planned = lib.mkOverride 900 true; - "servant-subscriber".components.library.planned = lib.mkOverride 900 true; "semigroups".components.library.planned = lib.mkOverride 900 true; "plutus-ledger-api".components.library.planned = lib.mkOverride 900 true; "cardano-binary".components.library.planned = lib.mkOverride 900 true; diff --git a/nix/pkgs/haskell/materialized-windows/.plan.nix/purescript-bridge.nix b/nix/pkgs/haskell/materialized-windows/.plan.nix/purescript-bridge.nix index 90a67c6a56..779c4855dc 100644 --- a/nix/pkgs/haskell/materialized-windows/.plan.nix/purescript-bridge.nix +++ b/nix/pkgs/haskell/materialized-windows/.plan.nix/purescript-bridge.nix @@ -11,7 +11,7 @@ flags = {}; package = { specVersion = "1.10"; - identifier = { name = "purescript-bridge"; version = "0.13.1.0"; }; + identifier = { name = "purescript-bridge"; version = "0.14.0.0"; }; license = "BSD-3-Clause"; copyright = ""; maintainer = "robert . klotzner A T gmx . at"; @@ -62,16 +62,23 @@ tests = { "tests" = { depends = [ + (hsPkgs."aeson" or (errorHandler.buildDepError "aeson")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) + (hsPkgs."hspec-expectations-pretty-diff" or (errorHandler.buildDepError "hspec-expectations-pretty-diff")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."purescript-bridge" or (errorHandler.buildDepError "purescript-bridge")) + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."utf8-string" or (errorHandler.buildDepError "utf8-string")) (hsPkgs."wl-pprint-text" or (errorHandler.buildDepError "wl-pprint-text")) - (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) - (hsPkgs."hspec-expectations-pretty-diff" or (errorHandler.buildDepError "hspec-expectations-pretty-diff")) ]; buildable = true; - modules = [ "TestData" ]; + modules = [ "TestData" "RoundTrip/Spec" "RoundTrip/Types" ]; hsSourceDirs = [ "test" ]; mainPath = [ "Spec.hs" ]; }; diff --git a/nix/pkgs/haskell/materialized-windows/.plan.nix/servant-purescript.nix b/nix/pkgs/haskell/materialized-windows/.plan.nix/servant-purescript.nix index a5b310b99f..c928f543d0 100644 --- a/nix/pkgs/haskell/materialized-windows/.plan.nix/servant-purescript.nix +++ b/nix/pkgs/haskell/materialized-windows/.plan.nix/servant-purescript.nix @@ -10,15 +10,15 @@ { flags = {}; package = { - specVersion = "1.10"; + specVersion = "3.0"; identifier = { name = "servant-purescript"; version = "0.9.0.2"; }; license = "BSD-3-Clause"; copyright = "Copyright: (c) 2016 Robert Klotzner"; maintainer = "robert Dot klotzner A T gmx Dot at"; author = "Robert Klotzner"; - homepage = "https://github.com/eskimor/servant-purescript#readme"; + homepage = "https://github.com/input-output-hk/servant-purescript"; url = ""; - synopsis = "Generate PureScript accessor functions for you servant API"; + synopsis = "Generate a PureScript API client for you servant API"; description = "Please see README.md"; buildType = "Simple"; isLocal = true; @@ -46,15 +46,13 @@ (hsPkgs."servant" or (errorHandler.buildDepError "servant")) (hsPkgs."servant-foreign" or (errorHandler.buildDepError "servant-foreign")) (hsPkgs."servant-server" or (errorHandler.buildDepError "servant-server")) - (hsPkgs."servant-subscriber" or (errorHandler.buildDepError "servant-subscriber")) (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."wl-pprint-text" or (errorHandler.buildDepError "wl-pprint-text")) ]; buildable = true; modules = [ "Servant/PureScript/Internal" "Servant/PureScript/CodeGen" - "Servant/PureScript/Subscriber" - "Servant/PureScript/MakeRequests" "Servant/PureScript" "Servant/API/BrowserHeader" ]; @@ -66,14 +64,19 @@ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."aeson" or (errorHandler.buildDepError "aeson")) (hsPkgs."containers" or (errorHandler.buildDepError "containers")) - (hsPkgs."mainland-pretty" or (errorHandler.buildDepError "mainland-pretty")) + (hsPkgs."directory" or (errorHandler.buildDepError "directory")) + (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) + (hsPkgs."HUnit" or (errorHandler.buildDepError "HUnit")) + (hsPkgs."hspec-expectations-pretty-diff" or (errorHandler.buildDepError "hspec-expectations-pretty-diff")) (hsPkgs."lens" or (errorHandler.buildDepError "lens")) + (hsPkgs."mainland-pretty" or (errorHandler.buildDepError "mainland-pretty")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) (hsPkgs."purescript-bridge" or (errorHandler.buildDepError "purescript-bridge")) (hsPkgs."servant" or (errorHandler.buildDepError "servant")) (hsPkgs."servant-foreign" or (errorHandler.buildDepError "servant-foreign")) (hsPkgs."servant-purescript" or (errorHandler.buildDepError "servant-purescript")) - (hsPkgs."servant-subscriber" or (errorHandler.buildDepError "servant-subscriber")) (hsPkgs."text" or (errorHandler.buildDepError "text")) + (hsPkgs."wl-pprint-text" or (errorHandler.buildDepError "wl-pprint-text")) ]; buildable = true; hsSourceDirs = [ "test" ]; diff --git a/nix/pkgs/haskell/materialized-windows/default.nix b/nix/pkgs/haskell/materialized-windows/default.nix index a89f251e69..405e71a8c4 100644 --- a/nix/pkgs/haskell/materialized-windows/default.nix +++ b/nix/pkgs/haskell/materialized-windows/default.nix @@ -522,8 +522,6 @@ "libyaml".revision = (((hackage."libyaml")."0.1.2").revisions).default; "libyaml".flags.system-libyaml = false; "libyaml".flags.no-unicode = false; - "servant-subscriber".revision = (((hackage."servant-subscriber")."0.7.0.0").revisions).default; - "servant-subscriber".flags.websockets_0_11 = true; "generic-lens-core".revision = (((hackage."generic-lens-core")."2.2.0.0").revisions).default; "splitmix".revision = (((hackage."splitmix")."0.1.0.3").revisions).default; "splitmix".flags.optimised-mixer = false; @@ -1569,7 +1567,6 @@ "measures".components.library.planned = lib.mkOverride 900 true; "foundation".components.library.planned = lib.mkOverride 900 true; "asn1-encoding".components.library.planned = lib.mkOverride 900 true; - "servant-subscriber".components.exes."subscriber-psGenerator".planned = lib.mkOverride 900 true; "persistent-sqlite".components.library.planned = lib.mkOverride 900 true; "finite-typelits".components.library.planned = lib.mkOverride 900 true; "plutus-chain-index-core".components.library.planned = lib.mkOverride 900 true; @@ -1585,7 +1582,6 @@ "cardano-prelude".components.library.planned = lib.mkOverride 900 true; "ouroboros-consensus".components.library.planned = lib.mkOverride 900 true; "ntp-client".components.library.planned = lib.mkOverride 900 true; - "servant-subscriber".components.library.planned = lib.mkOverride 900 true; "semigroups".components.library.planned = lib.mkOverride 900 true; "plutus-ledger-api".components.library.planned = lib.mkOverride 900 true; "cardano-binary".components.library.planned = lib.mkOverride 900 true; diff --git a/nix/pkgs/update-client-deps/default.nix b/nix/pkgs/update-client-deps/default.nix index 20d2a35acf..5ab4ec70c9 100644 --- a/nix/pkgs/update-client-deps/default.nix +++ b/nix/pkgs/update-client-deps/default.nix @@ -10,7 +10,6 @@ , nodejs , nodePackages , purs -, psc-package , spago , spago2nix , clang @@ -28,7 +27,6 @@ lib.meta.addMetaAttrs { platforms = lib.platforms.linux; } (writeShellScriptBin nodejs nodePackages.node-gyp purs - psc-package spago spago2nix ] ++ lib.optionals stdenv.isDarwin [ clang ])} diff --git a/nix/tests/default.nix b/nix/tests/default.nix index a8d5d74823..981784cd86 100644 --- a/nix/tests/default.nix +++ b/nix/tests/default.nix @@ -6,7 +6,6 @@ , src , plutus-playground , web-ghc -, plutus-pab , docs , vmCompileTests ? false }: diff --git a/nix/tests/purty.nix b/nix/tests/purty.nix index 82d525aec2..7cfa84245d 100644 --- a/nix/tests/purty.nix +++ b/nix/tests/purty.nix @@ -11,7 +11,6 @@ let (type == "directory" && (baseName != "generated" && baseName != "output" && baseName != "node_modules" - && baseName != ".psc-package" && baseName != ".spago")) ); }; diff --git a/packages.dhall b/packages.dhall new file mode 100644 index 0000000000..afe237ac46 --- /dev/null +++ b/packages.dhall @@ -0,0 +1,8 @@ +let upstream = + https://github.com/input-output-hk/purescript-web-common/releases/download/v1.1.4/packages.dhall sha256:ab905184ee034c35867e73ace0475ce29d1a0b975581d355af6f35e680449749 + +let overrides = {=} + +let additions = {=} + +in upstream // overrides // additions diff --git a/playground-common/src/PSGenerator/Common.hs b/playground-common/src/PSGenerator/Common.hs index 46fb25f7f8..50fea3ca10 100644 --- a/playground-common/src/PSGenerator/Common.hs +++ b/playground-common/src/PSGenerator/Common.hs @@ -11,13 +11,12 @@ import Control.Applicative (empty, (<|>)) import Control.Monad.Freer.Extras.Beam (BeamError, BeamLog) import Control.Monad.Freer.Extras.Pagination (Page, PageQuery, PageSize) import Control.Monad.Reader (MonadReader) -import Data.Proxy (Proxy (Proxy)) import Gist (Gist, GistFile, GistId, NewGist, NewGistFile, Owner) -import Language.PureScript.Bridge (BridgePart, Language (Haskell), PSType, SumType, TypeInfo (TypeInfo), doCheck, equal, - equal1, functor, genericShow, haskType, isTuple, mkSumType, order, psTypeParameters, - typeModule, typeName, (^==)) +import Language.PureScript.Bridge (BridgePart, Language (Haskell), PSType, SumType, TypeInfo (TypeInfo), argonaut, + equal, equal1, functor, genericShow, mkSumType, order, psTypeParameters, typeModule, + typeName, (^==)) import Language.PureScript.Bridge.Builder (BridgeData) -import Language.PureScript.Bridge.PSTypes (psArray, psInt, psNumber, psString) +import Language.PureScript.Bridge.PSTypes (psInt, psNumber, psString) import Language.PureScript.Bridge.TypeParameters (A) import Ledger (Address, BlockId, ChainIndexTxOut, DatumHash, MintingPolicy, OnChainTx, PubKey, PubKeyHash, RedeemerPtr, ScriptTag, Signature, StakeValidator, Tx, TxId, TxIn, TxInType, TxOut, TxOutRef, TxOutTx, UtxoIndex, @@ -55,43 +54,23 @@ import Wallet.Rollup.Types (AnnotatedTx, BeneficialOwner, DereferencedInput, Seq import Wallet.Types (AssertionError, ContractActivityStatus, ContractError, ContractInstanceId, EndpointDescription, EndpointValue, MatchingError, Notification, NotificationError) + psJson :: PSType psJson = TypeInfo "web-common" "Data.RawJson" "RawJson" [] psNonEmpty :: MonadReader BridgeData m => m PSType psNonEmpty = - TypeInfo "web-common" "Data.Json.JsonNonEmptyList" "JsonNonEmptyList" <$> + TypeInfo "purescript-lists" "Data.List.Types" "NonEmptyList" <$> psTypeParameters -psMap :: MonadReader BridgeData m => m PSType -psMap = TypeInfo "purescript-ordered-collections" "Data.Map" "Map" <$> psTypeParameters - -psUnit :: PSType -psUnit = TypeInfo "web-common" "Data.Unit" "Unit" [] - --- Note: Haskell has multi-section Tuples, whereas PureScript just uses nested pairs. -psJsonTuple :: MonadReader BridgeData m => m PSType -psJsonTuple = expand <$> psTypeParameters - where - expand [] = psUnit - expand [x] = x - expand p@[_, _] = TypeInfo "web-common" "Data.Json.JsonTuple" "JsonTuple" p - expand (x:ys) = TypeInfo "web-common" "Data.Json.JsonTuple" "JsonTuple" [x, expand ys] - -psJsonUUID :: PSType -psJsonUUID = TypeInfo "web-common" "Data.Json.JsonUUID" "JsonUUID" [] +psUUID :: PSType +psUUID = TypeInfo "web-common" "Data.UUID.Argonaut" "UUID" [] uuidBridge :: BridgePart uuidBridge = do typeName ^== "UUID" typeModule ^== "Data.UUID" <|> typeModule ^== "Data.UUID.Types.Internal" - pure psJsonUUID - -mapBridge :: BridgePart -mapBridge = do - typeName ^== "Map" - typeModule ^== "Data.Map.Internal" - psMap + pure psUUID aesonValueBridge :: BridgePart aesonValueBridge = do @@ -99,22 +78,11 @@ aesonValueBridge = do typeModule ^== "Data.Aeson.Types.Internal" pure psJson -tupleBridge :: BridgePart -tupleBridge = do - doCheck haskType isTuple - psJsonTuple - aesonBridge :: BridgePart aesonBridge = - mapBridge <|> tupleBridge <|> aesonValueBridge <|> uuidBridge + aesonValueBridge <|> uuidBridge ------------------------------------------------------------ -setBridge :: BridgePart -setBridge = do - typeName ^== "Set" - typeModule ^== "Data.Set" <|> typeModule ^== "Data.Set.Internal" - psArray - nonEmptyBridge :: BridgePart nonEmptyBridge = do typeName ^== "NonEmpty" @@ -122,9 +90,12 @@ nonEmptyBridge = do psNonEmpty containersBridge :: BridgePart -containersBridge = nonEmptyBridge <|> setBridge +containersBridge = nonEmptyBridge ------------------------------------------------------------ +psBigInteger :: PSType +psBigInteger = TypeInfo "web-common" "Data.BigInt.Argonaut" "BigInt" [] + integerBridge :: BridgePart integerBridge = do typeName ^== "Integer" @@ -199,9 +170,6 @@ miscBridge = ------------------------------------------------------------ -psBigInteger :: PSType -psBigInteger = TypeInfo "purescript-foreign-generic" "Data.BigInteger" "BigInteger" [] - psAssocMap :: MonadReader BridgeData m => m PSType psAssocMap = TypeInfo "plutus-playground-client" "PlutusTx.AssocMap" "Map" <$> @@ -318,141 +286,134 @@ servantBridge = headersBridge <|> headerBridge ------------------------------------------------------------ ledgerTypes :: [SumType 'Haskell] ledgerTypes = - [ (equal <*> (genericShow <*> mkSumType)) (Proxy @Slot) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @Ada) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @SlotConfig) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @SlotConversionError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @Tx) - , (order <*> (genericShow <*> mkSumType)) (Proxy @TxId) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @TxIn) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @TxOut) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @TxOutTx) - , (order <*> (genericShow <*> mkSumType)) (Proxy @TxOutRef) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @OnChainTx) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @UtxoIndex) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @Value) - , (functor <*> (equal <*> (genericShow <*> mkSumType))) - (Proxy @(Extended A)) - , (functor <*> (equal <*> (genericShow <*> mkSumType))) - (Proxy @(Interval A)) - , (functor <*> (equal <*> (genericShow <*> mkSumType))) - (Proxy @(LowerBound A)) - , (functor <*> (equal <*> (genericShow <*> mkSumType))) - (Proxy @(UpperBound A)) - , (genericShow <*> (order <*> mkSumType)) (Proxy @CurrencySymbol) - , (genericShow <*> (order <*> mkSumType)) (Proxy @AssetClass) - , (genericShow <*> (order <*> mkSumType)) (Proxy @MintingPolicy) - , (genericShow <*> (order <*> mkSumType)) (Proxy @StakeValidator) - , (genericShow <*> (order <*> mkSumType)) (Proxy @RedeemerPtr) - , (genericShow <*> (order <*> mkSumType)) (Proxy @ScriptTag) - , (genericShow <*> (order <*> mkSumType)) (Proxy @Signature) - , (genericShow <*> (order <*> mkSumType)) (Proxy @TokenName) - , (genericShow <*> (order <*> mkSumType)) (Proxy @TxInType) - , (genericShow <*> (order <*> mkSumType)) (Proxy @Validator) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ScriptError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ValidationError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ValidationPhase) - , (order <*> (genericShow <*> mkSumType)) (Proxy @Address) - , (order <*> (genericShow <*> mkSumType)) (Proxy @BlockId) - , (order <*> (genericShow <*> mkSumType)) (Proxy @DatumHash) - , (order <*> (genericShow <*> mkSumType)) (Proxy @PubKey) - , (order <*> (genericShow <*> mkSumType)) (Proxy @PubKeyHash) - , (order <*> (genericShow <*> mkSumType)) (Proxy @Credential) - , (order <*> (genericShow <*> mkSumType)) (Proxy @StakingCredential) - , (order <*> (genericShow <*> mkSumType)) (Proxy @DCert) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @MkTxError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ContractError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ConnectionError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @WrongOutTypeError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @Notification) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @NotificationError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @MatchingError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @AssertionError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @CheckpointError) - , (order <*> (genericShow <*> mkSumType)) (Proxy @ContractInstanceId) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ContractActivityStatus) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ContractInstanceLog) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @UserThreadMsg) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @SchedulerLog) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @Tag) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ContractInstanceMsg) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ContractInstanceTag) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @EmulatorRuntimeError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ThreadEvent) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ThreadId) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(Request A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(Response A)) - , (order <*> (genericShow <*> mkSumType)) (Proxy @RequestID) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @Priority) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @StopReason) - , (order <*> (genericShow <*> mkSumType)) (Proxy @IterationID) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ScriptValidationEvent) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ExCPU) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ExMemory) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ScriptType) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @PABReq) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @PABResp) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ChainIndexQuery) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ChainIndexResponse) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ChainIndexTx) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ChainIndexTxOutputs) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ChainIndexTxOut) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ChainIndexLog) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ChainIndexError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @BeamError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @BeamLog) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @InsertUtxoPosition) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @InsertUtxoFailed) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @RollbackFailed) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @FromCardanoError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(Page A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(PageQuery A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @PageSize) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @Tip) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @Point) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(EndpointValue A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @BalanceTxResponse) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @WriteBalancedTxResponse) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ActiveEndpoint) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @UnbalancedTx) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @TxValidity) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @TxOutState) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(RollbackState A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @BlockNumber) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @Depth) + [ equal . genericShow . argonaut $ mkSumType @Slot + , equal . genericShow . argonaut $ mkSumType @Ada + , equal . genericShow . argonaut $ mkSumType @SlotConfig + , equal . genericShow . argonaut $ mkSumType @SlotConversionError + , equal . genericShow . argonaut $ mkSumType @Tx + , order . genericShow . argonaut $ mkSumType @TxId + , order . equal . genericShow . argonaut $ mkSumType @TxIn + , equal . genericShow . argonaut $ mkSumType @TxOut + , equal . genericShow . argonaut $ mkSumType @TxOutTx + , order . genericShow . argonaut $ mkSumType @TxOutRef + , equal . genericShow . argonaut $ mkSumType @OnChainTx + , equal . genericShow . argonaut $ mkSumType @UtxoIndex + , equal . genericShow . argonaut $ mkSumType @Value + , functor . equal . genericShow . argonaut $ mkSumType @(Extended A) + , functor . equal . genericShow . argonaut $ mkSumType @(Interval A) + , functor . equal . genericShow . argonaut $ mkSumType @(LowerBound A) + , functor . equal . genericShow . argonaut $ mkSumType @(UpperBound A) + , genericShow . order . argonaut $ mkSumType @CurrencySymbol + , genericShow . order . argonaut $ mkSumType @AssetClass + , genericShow . order . argonaut $ mkSumType @MintingPolicy + , genericShow . order . argonaut $ mkSumType @StakeValidator + , genericShow . order . argonaut $ mkSumType @RedeemerPtr + , genericShow . order . argonaut $ mkSumType @ScriptTag + , genericShow . order . argonaut $ mkSumType @Signature + , genericShow . order . argonaut $ mkSumType @TokenName + , genericShow . order . argonaut $ mkSumType @TxInType + , genericShow . order . argonaut $ mkSumType @Validator + , equal . genericShow . argonaut $ mkSumType @ScriptError + , equal . genericShow . argonaut $ mkSumType @ValidationError + , order . equal . genericShow . argonaut $ mkSumType @ValidationPhase + , order . genericShow . argonaut $ mkSumType @Address + , order . genericShow . argonaut $ mkSumType @BlockId + , order . genericShow . argonaut $ mkSumType @DatumHash + , order . genericShow . argonaut $ mkSumType @PubKey + , order . genericShow . argonaut $ mkSumType @PubKeyHash + , order . genericShow . argonaut $ mkSumType @Credential + , order . genericShow . argonaut $ mkSumType @StakingCredential + , order . genericShow . argonaut $ mkSumType @DCert + , equal . genericShow . argonaut $ mkSumType @MkTxError + , equal . genericShow . argonaut $ mkSumType @ContractError + , equal . genericShow . argonaut $ mkSumType @ConnectionError + , order . equal . genericShow . argonaut $ mkSumType @WrongOutTypeError + , equal . genericShow . argonaut $ mkSumType @Notification + , equal . genericShow . argonaut $ mkSumType @NotificationError + , equal . genericShow . argonaut $ mkSumType @MatchingError + , equal . genericShow . argonaut $ mkSumType @AssertionError + , equal . genericShow . argonaut $ mkSumType @CheckpointError + , order . genericShow . argonaut $ mkSumType @ContractInstanceId + , order . equal . genericShow . argonaut $ mkSumType @ContractActivityStatus + , equal . genericShow . argonaut $ mkSumType @ContractInstanceLog + , equal . genericShow . argonaut $ mkSumType @UserThreadMsg + , equal . genericShow . argonaut $ mkSumType @SchedulerLog + , equal . genericShow . argonaut $ mkSumType @Tag + , equal . genericShow . argonaut $ mkSumType @ContractInstanceMsg + , equal . genericShow . argonaut $ mkSumType @ContractInstanceTag + , equal . genericShow . argonaut $ mkSumType @EmulatorRuntimeError + , equal . genericShow . argonaut $ mkSumType @ThreadEvent + , equal . genericShow . argonaut $ mkSumType @ThreadId + , equal . genericShow . argonaut $ mkSumType @(Request A) + , equal . genericShow . argonaut $ mkSumType @(Response A) + , order . genericShow . argonaut $ mkSumType @RequestID + , order . equal . genericShow . argonaut $ mkSumType @Priority + , order . equal . genericShow . argonaut $ mkSumType @StopReason + , order . genericShow . argonaut $ mkSumType @IterationID + , equal . genericShow . argonaut $ mkSumType @ScriptValidationEvent + , equal . genericShow . argonaut $ mkSumType @ExCPU + , equal . genericShow . argonaut $ mkSumType @ExMemory + , equal . genericShow . argonaut $ mkSumType @ScriptType + , equal . genericShow . argonaut $ mkSumType @PABReq + , equal . genericShow . argonaut $ mkSumType @PABResp + , equal . genericShow . argonaut $ mkSumType @ChainIndexQuery + , equal . genericShow . argonaut $ mkSumType @ChainIndexResponse + , equal . genericShow . argonaut $ mkSumType @ChainIndexTx + , equal . genericShow . argonaut $ mkSumType @ChainIndexTxOutputs + , equal . genericShow . argonaut $ mkSumType @ChainIndexTxOut + , equal . genericShow . argonaut $ mkSumType @ChainIndexLog + , equal . genericShow . argonaut $ mkSumType @ChainIndexError + , equal . genericShow . argonaut $ mkSumType @BeamError + , equal . genericShow . argonaut $ mkSumType @BeamLog + , order . equal . genericShow . argonaut $ mkSumType @InsertUtxoPosition + , equal . genericShow . argonaut $ mkSumType @InsertUtxoFailed + , equal . genericShow . argonaut $ mkSumType @RollbackFailed + , order . equal . genericShow . argonaut $ mkSumType @FromCardanoError + , equal . genericShow . argonaut $ mkSumType @(Page A) + , equal . genericShow . argonaut $ mkSumType @(PageQuery A) + , equal . genericShow . argonaut $ mkSumType @PageSize + , equal . genericShow . argonaut $ mkSumType @Tip + , equal . genericShow . argonaut $ mkSumType @Point + , equal . genericShow . argonaut $ mkSumType @(EndpointValue A) + , equal . genericShow . argonaut $ mkSumType @BalanceTxResponse + , equal . genericShow . argonaut $ mkSumType @WriteBalancedTxResponse + , equal . genericShow . argonaut $ mkSumType @ActiveEndpoint + , equal . genericShow . argonaut $ mkSumType @UnbalancedTx + , order . equal . genericShow . argonaut $ mkSumType @TxValidity + , equal . genericShow . argonaut $ mkSumType @TxOutState + , equal . genericShow . argonaut $ mkSumType @(RollbackState A) + , equal . genericShow . argonaut $ mkSumType @BlockNumber + , equal . genericShow . argonaut $ mkSumType @Depth ] walletTypes :: [SumType 'Haskell] walletTypes = - [ (equal <*> (genericShow <*> mkSumType)) (Proxy @AnnotatedTx) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @DereferencedInput) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @EM.Wallet) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @EM.WalletNumber) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @WalletAPIError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ToCardanoError) - , (order <*> (genericShow <*> mkSumType)) (Proxy @BeneficialOwner) - , (order <*> (genericShow <*> mkSumType)) (Proxy @SequenceId) - , (order <*> (genericShow <*> mkSumType)) (Proxy @TxKey) + [ equal . genericShow . argonaut $ mkSumType @AnnotatedTx + , equal . genericShow . argonaut $ mkSumType @DereferencedInput + , equal . genericShow . argonaut $ mkSumType @EM.Wallet + , equal . genericShow . argonaut $ mkSumType @EM.WalletNumber + , equal . genericShow . argonaut $ mkSumType @WalletAPIError + , equal . genericShow . argonaut $ mkSumType @ToCardanoError + , order . genericShow . argonaut $ mkSumType @BeneficialOwner + , order . genericShow . argonaut $ mkSumType @SequenceId + , order . genericShow . argonaut $ mkSumType @TxKey ] ------------------------------------------------------------ playgroundTypes :: [SumType 'Haskell] playgroundTypes = - [ (genericShow <*> (equal <*> mkSumType)) (Proxy @FormSchema) - , (functor <*> (genericShow <*> (equal <*> mkSumType))) - (Proxy @(FunctionSchema A)) - , (functor <*> (equal <*> (equal1 <*> (genericShow <*> mkSumType)))) - (Proxy @(FormArgumentF A)) - , (genericShow <*> (order <*> mkSumType)) (Proxy @EndpointDescription) - , (genericShow <*> (equal <*> mkSumType)) (Proxy @KnownCurrency) - , (genericShow <*> (equal <*> mkSumType)) (Proxy @(ContractCall A)) - ] <> - [ (order <*> mkSumType) (Proxy @GistId) - , mkSumType (Proxy @Gist) - , mkSumType (Proxy @GistFile) - , mkSumType (Proxy @NewGist) - , mkSumType (Proxy @NewGistFile) - , mkSumType (Proxy @Owner) - , mkSumType (Proxy @AuthStatus) - , mkSumType (Proxy @AuthRole) + [ genericShow . equal . argonaut $ mkSumType @FormSchema + , functor . genericShow . equal . argonaut $ mkSumType @(FunctionSchema A) + , functor . equal . equal1 . genericShow . argonaut $ mkSumType @(FormArgumentF A) + , genericShow . order . argonaut $ mkSumType @EndpointDescription + , genericShow . equal . argonaut $ mkSumType @KnownCurrency + , genericShow . equal . argonaut $ mkSumType @(ContractCall A) + , order . equal . genericShow . argonaut $ mkSumType @GistId + , equal . genericShow . argonaut $ mkSumType @Gist + , equal . genericShow . argonaut $ mkSumType @GistFile + , argonaut $ mkSumType @NewGist + , argonaut $ mkSumType @NewGistFile + , equal . genericShow . argonaut $ mkSumType @Owner + , equal . genericShow . argonaut $ mkSumType @AuthStatus + , order . equal . genericShow . argonaut $ mkSumType @AuthRole ] diff --git a/plutus-pab-client/.gitignore b/plutus-pab-client/.gitignore deleted file mode 100644 index d92fdc04ea..0000000000 --- a/plutus-pab-client/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# FIXME: @michaelpj to remove this in favour of root .giignore file -# once he figures out what's going on with nix-gitignore -generated -generated/ -generated-docs/ -node_modules/ -output/ -yarn-error.log -yarn.lock -.psci_modules/ -.psc-package/ -.psc-package2nix/ -.spago/ -.spago2nix/ -plutus-pab.yaml \ No newline at end of file diff --git a/plutus-pab-client/config.nix b/plutus-pab-client/config.nix deleted file mode 100644 index 88265db9f7..0000000000 --- a/plutus-pab-client/config.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ pkgs }: -# in the future this could just be a nix attr set turned into a json file -{ name -, db-file ? "/tmp/pab-core.db" -, client -, webserver-port ? "9080" -, walletserver-port ? "9081" -, nodeserver-port ? "9082" -, chain-index-port ? "9083" -, signing-process-port ? "9084" -, metadata-server-port ? "9085" -, wallet ? "1" -}: pkgs.writeText "pab.yaml" '' - dbConfig: - dbConfigFile: ${ db-file } - dbConfigPoolSize: 20 - - pabWebserverConfig: - baseUrl: http://localhost:${ webserver-port } - staticDir: ${ client } - permissiveCorsPolicy: False - - walletServerConfig: - baseUrl: http://localhost:${ walletserver-port } - wallet: - getWallet: ${ wallet } - - nodeServerConfig: - mscBaseUrl: http://localhost:${ nodeserver-port } - mscSocketPath: /tmp/node-server.sock - mscSlotConfig: - scSlotZeroTime: 1596059091000 # POSIX time of 2020-07-29T21:44:51Z (Wednesday, July 29, 2020 21:44:51) - Shelley launch time - scSlotLength: 1000 # In milliseconds - mscFeeConfig: - fcConstantFee: - getLovelace: 10 # Constant fee per transaction in lovelace - fcScriptsFeeFactor: 1.0 # Factor by which to multiply the size-dependent scripts fee in lovelace - mscNetworkId: "" # Empty string for Mainnet. Put a network magic number in the string to use the Testnet. - mscKeptBlocks: 100000 - mscInitialTxWallets: - - getWallet: 1 - - getWallet: 2 - - getWallet: 3 - mscNodeMode: MockNode - - chainIndexConfig: - ciBaseUrl: http://localhost:${ chain-index-port } - ciWatchedAddresses: [] - - requestProcessingConfig: - requestProcessingInterval: 1 - - signingProcessConfig: - spBaseUrl: http://localhost:${ signing-process-port } - spWallet: - getWallet: ${ wallet } - - metadataServerConfig: - mdBaseUrl: http://localhost:${ metadata-server-port } - -'' diff --git a/plutus-pab-client/default.nix b/plutus-pab-client/default.nix deleted file mode 100644 index 84099c0401..0000000000 --- a/plutus-pab-client/default.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ pkgs, gitignore-nix, haskell, webCommon, webCommonPlutus, buildPursPackage, buildNodeModules, filterNpm }: -let - server-setup-invoker = haskell.packages.plutus-pab.components.exes.plutus-pab-setup; - server-examples-invoker = haskell.packages.plutus-pab.components.exes.plutus-pab-examples; - test-generator = haskell.packages.plutus-pab.components.exes.plutus-pab-test-psgenerator; - - generated-purescript = pkgs.runCommand "plutus-pab-purescript" { } '' - mkdir $out - ln -s ${haskell.packages.plutus-pab.src}/plutus-pab.yaml.sample plutus-pab.yaml - ${server-setup-invoker}/bin/plutus-pab-setup psgenerator $out - ${server-examples-invoker}/bin/plutus-pab-examples --config plutus-pab.yaml psapigenerator $out - ${test-generator}/bin/plutus-pab-test-psgenerator $out - ''; - - # For dev usage - generate-purescript = pkgs.writeShellScriptBin "plutus-pab-generate-purs" '' - generatedDir=./generated - rm -rf $generatedDir - # There might be local modifications so only copy when missing - ! test -f ./plutus-pab.yaml && cp ../plutus-pab/plutus-pab.yaml.sample plutus-pab.yaml - $(nix-build ../default.nix --quiet --no-build-output -A plutus-pab.server-setup-invoker)/bin/plutus-pab-setup psgenerator $generatedDir - $(nix-build ../default.nix --quiet --no-build-output -A plutus-pab.test-generator)/bin/plutus-pab-test-psgenerator $generatedDir - $(nix-build ../default.nix --quiet --no-build-output -A plutus-pab.server-examples-invoker)/bin/plutus-pab-examples --config plutus-pab.yaml psapigenerator $generatedDir - ''; - - # For dev usage - migrate = pkgs.writeShellScriptBin "plutus-pab-migrate" '' - # There might be local modifications so only copy when missing - ! test -f ./plutus-pab.yaml && cp ../plutus-pab/plutus-pab.yaml.sample plutus-pab.yaml - $(nix-build ../default.nix --quiet --no-build-output -A plutus-pab.server-examples-invoker)/bin/plutus-pab-examples --config=plutus-pab.yaml migrate - ''; - - # For dev usage - start-backend = pkgs.writeShellScriptBin "plutus-pab-server" '' - export FRONTEND_URL=https://localhost:8009 - export WEBGHC_URL=http://localhost:8080 - # There might be local modifications so only copy when missing - ! test -f ./plutus-pab.yaml && cp ../plutus-pab/plutus-pab.yaml.sample plutus-pab.yaml - # Only execute the migration when the database file does not exist - ! test -f ./$(yq -r '.dbConfig.dbConfigFile' plutus-pab.yaml) && plutus-pab-migrate - $(nix-build ../default.nix --quiet --no-build-output -A plutus-pab.server-examples-invoker)/bin/plutus-pab-examples --config=plutus-pab.yaml webserver - ''; - - # For dev usage - start-all-servers = pkgs.writeShellScriptBin "plutus-pab-all-servers" '' - export FRONTEND_URL=https://localhost:8009 - export WEBGHC_URL=http://localhost:8080 - # There might be local modifications so only copy when missing - ! test -f ./plutus-pab.yaml && cp ../plutus-pab/plutus-pab.yaml.sample plutus-pab.yaml - # Only execute the migration when the database file does not exist - ! test -f ./$(yq -r '.dbConfig.dbConfigFile' plutus-pab.yaml) && plutus-pab-migrate - $(nix-build ../default.nix --quiet --no-build-output -A plutus-pab.server-examples-invoker)/bin/plutus-pab-examples --config=plutus-pab.yaml all-servers - ''; - - # For dev usage - start-all-servers-m = pkgs.writeShellScriptBin "plutus-pab-all-servers-m" '' - export FRONTEND_URL=https://localhost:8009 - export WEBGHC_URL=http://localhost:8080 - # There might be local modifications so only copy when missing - ! test -f ./plutus-pab.yaml && cp ../plutus-pab/plutus-pab.yaml.sample plutus-pab.yaml - # Only execute the migration when the database file does not exist - ! test -f ./$(yq -r '.dbConfig.dbConfigFile' plutus-pab.yaml) && plutus-pab-migrate - $(nix-build ../default.nix --quiet --no-build-output -A plutus-pab.server-examples-invoker)/bin/plutus-pab-examples --config=plutus-pab.yaml -m all-servers - ''; - - cleanSrc = gitignore-nix.gitignoreSource ./.; - - nodeModules = buildNodeModules { - projectDir = filterNpm cleanSrc; - packageJson = ./package.json; - packageLockJson = ./package-lock.json; - }; - - client = - buildPursPackage { - inherit pkgs nodeModules; - src = cleanSrc; - name = "plutus-pab-client"; - extraSrcs = { - web-common = webCommon.cleanSrc; - web-common-plutus = webCommonPlutus; - generated = generated-purescript; - }; - # ideally we would just use `npm run test` but - # this executes `spago` which *always* attempts to download - # remote files (which obviously fails in sandboxed builds) - checkPhase = '' - node -e 'require("./output/Test.Main").main()' - ''; - packages = pkgs.callPackage ./packages.nix { }; - spagoPackages = pkgs.callPackage ./spago-packages.nix { }; - }; - - pab-exes = haskell.packages.plutus-pab.components.exes; - - demo-scripts = pkgs.callPackage ./pab-demo-scripts.nix { inherit client pab-exes; }; - - mkConf = pkgs.callPackage ./config.nix { }; - -in -{ - inherit client demo-scripts server-examples-invoker server-setup-invoker test-generator generated-purescript generate-purescript migrate start-backend start-all-servers start-all-servers-m mkConf pab-exes; -} diff --git a/plutus-pab-client/entry.js b/plutus-pab-client/entry.js deleted file mode 100644 index abcbb7385e..0000000000 --- a/plutus-pab-client/entry.js +++ /dev/null @@ -1,4 +0,0 @@ -import '@fortawesome/fontawesome-free/css/all.css'; -import './static/main.scss'; - -import './src/Main.purs'; diff --git a/plutus-pab-client/pab-demo-scripts.nix b/plutus-pab-client/pab-demo-scripts.nix deleted file mode 100644 index 1c2fe17812..0000000000 --- a/plutus-pab-client/pab-demo-scripts.nix +++ /dev/null @@ -1,115 +0,0 @@ -######################################################################## -# pab-demo-scripts.nix -- Build two shell scripts that start -# up a PAB demo environment. -# -# * 'start-all-servers.sh' starts the mock node and an instance of the -# PAB -# * 'start-second-pab.sh' starts another instance of the PAB, connecting -# to the same mock node. The two instances don't share any services, -# so they communicate only through the blockchain. -# -# The scripts install a number of sample contracts, so the PAB is -# ready to use right away. -# -# -######################################################################## - -{ runCommand -, writeText -, writeShellScript -, yq -, sqlite-interactive -, client -, pab-exes -, pkgs -, lib -}: -let - inherit (pab-exes) - plutus-game - plutus-currency - plutus-atomic-swap - plutus-pay-to-wallet - prism-mirror - prism-unlock-sto - prism-unlock-exchange; - - mkConf = pkgs.callPackage ./config.nix { }; - - - # mkSetup :: Conf -> Store Path - # Takes a Conf object and creates a config file and a sqlite database - mkSetup = conf: - let - cfg = mkConf conf; - in - runCommand "pab-setup" { } '' - echo "Creating PAB database" - mkdir $out - cp ${cfg} $out/plutus-pab.yaml - ${pab-exes.plutus-pab-examples}/bin/plutus-pab-examples --config=$out/plutus-pab.yaml migrate - ${sqlite-interactive}/bin/sqlite3 ${conf.db-file} '.tables' - cp ${conf.db-file}* $out/ - ''; - - # mock node, needs to be the same for all PABs - node-port = "8082"; - db-file = "/tmp/pab-core.db"; - - pab-setup = "${pab-exes.plutus-pab-setup}/bin/plutus-pab-setup"; - - primary-config = { - inherit db-file client; - name = "demo-primary"; - webserver-port = "9080"; - walletserver-port = "9081"; - nodeserver-port = "${node-port}"; - chain-index-port = "9083"; - signing-process-port = "9084"; - metadata-server-port = "9085"; - wallet = "1"; - }; - - secondary-config = { - inherit db-file client; - name = "demo-secondary"; - webserver-port = "9086"; - walletserver-port = "9087"; - nodeserver-port = "${node-port}"; - chain-index-port = "9088"; - signing-process-port = "9089"; - metadata-server-port = "9090"; - wallet = "2"; - }; - - runWithContracts = setup: cmd: writeShellScript "run-with-contracts" '' - WORKDIR=$(mktemp -d) - CFG_PATH=$WORKDIR/plutus-pab.yaml - DB_PATH=$WORKDIR/pab-core.db - - cp ${setup}/pab-core.db* $WORKDIR - chmod a+rw $WORKDIR/* - - ${sqlite-interactive}/bin/sqlite3 $DB_PATH '.tables' - cat ${setup}/plutus-pab.yaml | ${yq}/bin/yq -y --arg path $DB_PATH '.dbConfig.dbConfigFile = $path' > $CFG_PATH - - echo "-----------------------------------------------------------------------------" - echo "Starting: ${cmd}" - echo "PAB config path: $CFG_PATH" - echo "PAB database path: $DB_PATH" - cat $CFG_PATH - echo "-----------------------------------------------------------------------------" - ${pab-exes.plutus-pab-examples}/bin/plutus-pab-examples --config=$CFG_PATH ${cmd} - ''; - - start-all-servers = runWithContracts (mkSetup primary-config) "all-servers"; - - start-second-pab = runWithContracts (mkSetup secondary-config) "client-services"; - -in -# Mysteriously broken on the Hydra mac builders, disable until/unless we figure it out -lib.meta.addMetaAttrs { platforms = lib.platforms.linux; } (runCommand "pab-demo-scripts" { } '' - mkdir -p $out/bin - cp ${start-all-servers} $out/bin/pab-start-all-servers - cp ${start-second-pab} $out/bin/pab-start-second-pab -'') diff --git a/plutus-pab-client/package-lock.json b/plutus-pab-client/package-lock.json deleted file mode 100644 index 5c901375f3..0000000000 --- a/plutus-pab-client/package-lock.json +++ /dev/null @@ -1,7030 +0,0 @@ -{ - "name": "plutus-pab-client", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@fortawesome/fontawesome-free": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.1.tgz", - "integrity": "sha512-OEdH7SyC1suTdhBGW91/zBfR6qaIhThbcN8PUXtXilY4GYnSBbVqOntdHbC1vXwsDnX0Qix2m2+DSU1J51ybOQ==" - }, - "@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" - }, - "@types/node": { - "version": "14.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", - "integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==" - }, - "@webassemblyjs/ast": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", - "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", - "requires": { - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", - "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==" - }, - "@webassemblyjs/helper-api-error": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", - "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==" - }, - "@webassemblyjs/helper-buffer": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", - "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==" - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", - "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", - "requires": { - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", - "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==" - }, - "@webassemblyjs/helper-module-context": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", - "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", - "requires": { - "@webassemblyjs/ast": "1.9.0" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", - "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==" - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", - "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", - "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", - "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", - "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==" - }, - "@webassemblyjs/wasm-edit": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", - "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/helper-wasm-section": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-opt": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "@webassemblyjs/wast-printer": "1.9.0" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", - "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", - "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-buffer": "1.9.0", - "@webassemblyjs/wasm-gen": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", - "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-wasm-bytecode": "1.9.0", - "@webassemblyjs/ieee754": "1.9.0", - "@webassemblyjs/leb128": "1.9.0", - "@webassemblyjs/utf8": "1.9.0" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", - "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/floating-point-hex-parser": "1.9.0", - "@webassemblyjs/helper-api-error": "1.9.0", - "@webassemblyjs/helper-code-frame": "1.9.0", - "@webassemblyjs/helper-fsm": "1.9.0", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", - "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/wast-parser": "1.9.0", - "@xtuc/long": "4.2.2" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" - }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==" - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" - }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==" - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "optional": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" - }, - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", - "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" - }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "requires": { - "lodash": "^4.17.14" - } - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=" - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "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://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" - }, - "bignumber": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/bignumber/-/bignumber-1.1.0.tgz", - "integrity": "sha1-5qsKdD2l8+oBjlwXWX0SH3howVk=" - }, - "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", - "optional": true - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "requires": { - "inherits": "~2.0.0" - } - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" - }, - "bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", - "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==" - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "dependencies": { - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" - } - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "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://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" - }, - "bootstrap": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.3.tgz", - "integrity": "sha512-o9ppKQioXGqhw8Z7mah6KdTYpNQY//tipnkxppWhPbiSWdD+1raYsnhwEZjkTHYbGee4cVQ0Rx65EhOY/HNLcQ==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "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://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "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://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "requires": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "requires": { - "pako": "~1.0.5" - } - }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, - "cacache": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", - "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "requires": { - "yallist": "^3.0.2" - } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - } - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "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-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", - "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.0" - } - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "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" - } - }, - "chokidar": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", - "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", - "optional": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" - }, - "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "optional": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "optional": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "optional": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "optional": true, - "requires": { - "is-number": "^7.0.0" - } - } - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "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://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", - "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", - "requires": { - "source-map": "~0.6.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==" - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" - }, - "compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "requires": { - "mime-db": ">= 1.43.0 < 2" - } - }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" - }, - "console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "requires": { - "safe-buffer": "5.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "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://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "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://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "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": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "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-loader": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-1.0.1.tgz", - "integrity": "sha512-+ZHAZm/yqvJ2kDtPne3uX0C+Vr3Zn5jFn2N4HywtS5ujwvsVkyg0VArEXpl3BgczDA8anieki1FIzhchX4yrDw==", - "requires": { - "babel-code-frame": "^6.26.0", - "css-selector-tokenizer": "^0.7.0", - "icss-utils": "^2.1.0", - "loader-utils": "^1.0.2", - "lodash": "^4.17.11", - "postcss": "^6.0.23", - "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://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-selector-tokenizer": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.3.tgz", - "integrity": "sha512-jWQv3oCEL5kMErj4wRnK/OPoBi0D+P1FR2cDCKYPaMeD2eW3/mttav8HT4hT1CKopiJI/psEULjkClhvJo4Lvg==", - "requires": { - "cssesc": "^3.0.0", - "fastparse": "^1.1.2" - } - }, - "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==" - }, - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "requires": { - "array-find-index": "^1.0.1" - } - }, - "cyclist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", - "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" - }, - "dargs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-5.1.0.tgz", - "integrity": "sha1-7H6lDHhWTNNsnV7Bj2Yyn63ieCk=" - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, - "default-gateway": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", - "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", - "requires": { - "execa": "^1.0.0", - "ip-regex": "^2.1.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "del": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", - "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", - "requires": { - "@types/glob": "^7.1.1", - "globby": "^6.1.0", - "is-path-cwd": "^2.0.0", - "is-path-in-cwd": "^2.0.0", - "p-map": "^2.0.0", - "pify": "^4.0.1", - "rimraf": "^2.6.3" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "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://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" - }, - "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==" - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "dom-converter": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", - "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", - "requires": { - "utila": "~0.4" - } - }, - "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "requires": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.2.tgz", - "integrity": "sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA==" - } - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "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" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz", - "integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==", - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.5.0", - "tapable": "^1.0.0" - }, - "dependencies": { - "memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", - "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" - }, - "err-code": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", - "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", - "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" - }, - "events": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", - "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==" - }, - "eventsource": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", - "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", - "requires": { - "original": "^1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.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" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "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://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "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.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "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://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extract-text-webpack-plugin": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz", - "integrity": "sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==", - "requires": { - "async": "^2.4.1", - "loader-utils": "^1.1.0", - "schema-utils": "^0.3.0", - "webpack-sources": "^1.0.1" - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "fastparse": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", - "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==" - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "figgy-pudding": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", - "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==" - }, - "file-loader": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-2.0.0.tgz", - "integrity": "sha512-YCsBfd1ZGCyonOKLxPiKPdu+8ld9HAaMEvJewzz+b2eTF7uL5Zm/HdBF6FjCrpCMRq25Mi0U1gl4pwn2TlH7hQ==", - "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "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://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "findup-sync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", - "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "optional": true - }, - "fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "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" - } - }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "requires": { - "globule": "^1.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "get-intrinsic": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", - "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "requires": { - "pump": "^3.0.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "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": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "optional": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "requires": { - "global-prefix": "^3.0.0" - }, - "dependencies": { - "global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - } - } - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "globby": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-4.1.0.tgz", - "integrity": "sha1-CA9UVJ7BuCpsYOYx/ILhIR2+lfg=", - "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^6.0.1", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "globule": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", - "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" - }, - "handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", - "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==" - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "html-entities": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.3.1.tgz", - "integrity": "sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA==" - }, - "html-minifier": { - "version": "3.5.21", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", - "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.2.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - } - }, - "html-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "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": { - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==" - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - } - } - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" - } - } - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=" - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", - "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", - "requires": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=" - }, - "icss-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-2.1.0.tgz", - "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", - "requires": { - "postcss": "^6.0.1" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", - "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "in-publish": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", - "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==" - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "requires": { - "repeating": "^2.0.0" - } - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" - }, - "internal-ip": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", - "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", - "requires": { - "default-gateway": "^4.2.0", - "ipaddr.js": "^1.9.0" - } - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" - }, - "is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", - "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==" - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "optional": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==" - }, - "is-core-module": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.1.0.tgz", - "integrity": "sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA==", - "requires": { - "has": "^1.0.3" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "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://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-negative-zero": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", - "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=" - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==" - }, - "is-path-in-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", - "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", - "requires": { - "is-path-inside": "^2.1.0" - } - }, - "is-path-inside": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", - "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", - "requires": { - "path-is-inside": "^1.0.2" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } - }, - "is-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", - "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jquery": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", - "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==" - }, - "js-base64": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", - "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==" - }, - "js-string-escape": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", - "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=" - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "requires": { - "bignumber.js": "^9.0.0" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "json3": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", - "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==" - }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "requires": { - "minimist": "^1.2.0" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", - "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==" - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "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.4.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==" - }, - "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - } - } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" - }, - "lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" - }, - "loglevel": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.0.tgz", - "integrity": "sha512-i2sY04nal5jDcagM3FMfG++T69GEEM8CYuOfeOIvmXzOIcwE9a/CJPR0MFM97pYMj/u10lzz7/zd7+qwhrBTqQ==" - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "dependencies": { - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" - } - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "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" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "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://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "mime": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", - "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==" - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "requires": { - "mime-db": "1.44.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "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" - } - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "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://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" - }, - "nan": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", - "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "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" - } - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" - }, - "node-gyp": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", - "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "^2.87.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" - } - } - }, - "node-libs-browser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", - "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", - "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": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - }, - "dependencies": { - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "node-sass": { - "version": "4.14.1", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", - "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", - "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash": "^4.17.15", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.13.2", - "node-gyp": "^3.8.0", - "npmlog": "^4.0.0", - "request": "^2.88.0", - "sass-graph": "2.2.5", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "^2.0.0" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "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.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "requires": { - "boolbase": "~1.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "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://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" - }, - "object-is": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.3.tgz", - "integrity": "sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg==", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "requires": { - "isobject": "^3.0.1" - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "opn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", - "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", - "requires": { - "is-wsl": "^1.1.0" - } - }, - "original": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", - "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", - "requires": { - "url-parse": "^1.4.3" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==" - }, - "p-retry": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", - "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", - "requires": { - "retry": "^0.12.0" - }, - "dependencies": { - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" - } - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, - "parallel-transform": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", - "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", - "requires": { - "cyclist": "^1.0.1", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "requires": { - "no-case": "^2.2.0" - } - }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" - }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", - "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://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "optional": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "requires": { - "find-up": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - } - } - }, - "portfinder": { - "version": "1.0.28", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", - "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-modules-extract-imports": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.1.tgz", - "integrity": "sha512-6jt9XZwUhwmRUhb/CkyJY020PYaPJsCyt3UjbaWo6XEbH/94Hmv6MP7fG2C5NDU/BcHzyGYxNtHvM+LTf9HrYw==", - "requires": { - "postcss": "^6.0.1" - } - }, - "postcss-modules-local-by-default": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", - "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", - "requires": { - "css-selector-tokenizer": "^0.7.0", - "postcss": "^6.0.1" - } - }, - "postcss-modules-scope": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", - "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", - "requires": { - "css-selector-tokenizer": "^0.7.0", - "postcss": "^6.0.1" - } - }, - "postcss-modules-values": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", - "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", - "requires": { - "icss-replace-symbols": "^1.1.0", - "postcss": "^6.0.1" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "pretty-error": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz", - "integrity": "sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==", - "requires": { - "lodash": "^4.17.20", - "renderkid": "^2.0.4" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" - }, - "promise-retry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", - "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", - "requires": { - "err-code": "^1.0.0", - "retry": "^0.10.0" - } - }, - "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "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", - "safe-buffer": "^5.1.2" - }, - "dependencies": { - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - } - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "purs-loader": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/purs-loader/-/purs-loader-3.7.2.tgz", - "integrity": "sha512-Sidqk2RE1R2DTPt30I6G3p//c9pMaV9jd36NI3HXXSyf4Kf5X01FiP/2wMTJ8a5XKAXKdKCJ3WPqA8Whlxi0tg==", - "requires": { - "bluebird": "^3.3.5", - "chalk": "^1.1.3", - "cross-spawn": "^3.0.1", - "dargs": "^5.1.0", - "debug": "^2.6.0", - "globby": "^4.0.0", - "js-string-escape": "^1.0.1", - "loader-utils": "^1.0.2", - "lodash.difference": "^4.5.0", - "promise-retry": "^1.1.0" - } - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" - }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "dependencies": { - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - } - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "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://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", - "optional": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", - "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, - "renderkid": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.4.tgz", - "integrity": "sha512-K2eXrSOJdq+HuKzlcjOlGoOarUu5SDguDEhE7+Ah4zuOWL40j8A/oHvLlLob9PSTNvVnBd+/q0Er1QfpEuem5g==", - "requires": { - "css-select": "^1.1.0", - "dom-converter": "^0.2", - "htmlparser2": "^3.3.0", - "lodash": "^4.17.20", - "strip-ansi": "^3.0.0" - } - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "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.3", - "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.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - } - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" - }, - "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "requires": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, - "dependencies": { - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - } - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" - }, - "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "requires": { - "aproba": "^1.1.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "sass-graph": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz", - "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==", - "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^13.3.2" - } - }, - "sass-loader": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.3.1.tgz", - "integrity": "sha512-tuU7+zm0pTCynKYHpdqaPpe+MMTQ76I9TPZ7i4/5dZsigE350shQWe5EZNl5dBidM49TPET75tNqRbcsUZWeNA==", - "requires": { - "clone-deep": "^4.0.1", - "loader-utils": "^1.0.1", - "neo-async": "^2.5.0", - "pify": "^4.0.1", - "semver": "^6.3.0" - }, - "dependencies": { - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - } - } - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", - "requires": { - "ajv": "^5.0.0" - } - }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" - }, - "selfsigned": { - "version": "1.10.8", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.8.tgz", - "integrity": "sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==", - "requires": { - "node-forge": "^0.10.0" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "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.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - } - } - }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "requires": { - "randombytes": "^2.1.0" - } - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "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" - }, - "dependencies": { - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "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://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "requires": { - "kind-of": "^6.0.2" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "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://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "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://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sockjs": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.20.tgz", - "integrity": "sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA==", - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.4.0", - "websocket-driver": "0.6.5" - }, - "dependencies": { - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - } - } - }, - "sockjs-client": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz", - "integrity": "sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g==", - "requires": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "faye-websocket": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", - "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", - "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==" - }, - "spdy": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", - "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", - "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "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": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - }, - "stdout-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", - "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", - "requires": { - "readable-stream": "^2.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "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" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string.prototype.trimend": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz", - "integrity": "sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } - } - }, - "string.prototype.trimstart": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz", - "integrity": "sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "requires": { - "get-stdin": "^4.0.1" - } - }, - "style-loader": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz", - "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==", - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" - }, - "tar": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", - "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", - "requires": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" - } - }, - "terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - } - } - }, - "terser-webpack-plugin": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", - "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", - "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^4.0.0", - "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "thunky": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", - "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" - }, - "timers-browserify": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", - "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", - "requires": { - "setimmediate": "^1.0.4" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "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://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" - }, - "toposort": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=" - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" - }, - "true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", - "requires": { - "glob": "^7.1.2" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "uglify-js": { - "version": "3.4.10", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", - "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", - "requires": { - "commander": "~2.19.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" - } - } - }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" - } - } - }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" - }, - "uri-js": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", - "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - } - } - }, - "url-loader": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.2.tgz", - "integrity": "sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg==", - "requires": { - "loader-utils": "^1.1.0", - "mime": "^2.0.3", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", - "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" - }, - "uuid-validate": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/uuid-validate/-/uuid-validate-0.0.3.tgz", - "integrity": "sha512-Fykw5U4eZESbq739BeLvEBFRuJODfrlmjx5eJux7W817LjRaq4b7/i4t2zxQmhcX+fAj4nMfRdTzO4tmwLKn0w==" - }, - "v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==" - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" - }, - "watchpack": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", - "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", - "requires": { - "chokidar": "^3.4.1", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0", - "watchpack-chokidar2": "^2.0.1" - } - }, - "watchpack-chokidar2": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", - "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", - "optional": true, - "requires": { - "chokidar": "^2.1.8" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "optional": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "optional": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "optional": true - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "optional": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "optional": true, - "requires": { - "nan": "^2.12.1" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "optional": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "optional": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "optional": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "optional": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "optional": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webpack": { - "version": "4.44.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz", - "integrity": "sha512-6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q==", - "requires": { - "@webassemblyjs/ast": "1.9.0", - "@webassemblyjs/helper-module-context": "1.9.0", - "@webassemblyjs/wasm-edit": "1.9.0", - "@webassemblyjs/wasm-parser": "1.9.0", - "acorn": "^6.4.1", - "ajv": "^6.10.2", - "ajv-keywords": "^3.4.1", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.3.0", - "eslint-scope": "^4.0.3", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.4.0", - "loader-utils": "^1.2.3", - "memory-fs": "^0.4.1", - "micromatch": "^3.1.10", - "mkdirp": "^0.5.3", - "neo-async": "^2.6.1", - "node-libs-browser": "^2.2.1", - "schema-utils": "^1.0.0", - "tapable": "^1.1.3", - "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.7.4", - "webpack-sources": "^1.4.1" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "webpack-cli": { - "version": "3.3.12", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.12.tgz", - "integrity": "sha512-NVWBaz9k839ZH/sinurM+HcDvJOTXwSjYp1ku+5XKeOC03z8v5QitnK/x+lAxGXFyhdayoIf/GOpv85z3/xPag==", - "requires": { - "chalk": "^2.4.2", - "cross-spawn": "^6.0.5", - "enhanced-resolve": "^4.1.1", - "findup-sync": "^3.0.0", - "global-modules": "^2.0.0", - "import-local": "^2.0.0", - "interpret": "^1.4.0", - "loader-utils": "^1.4.0", - "supports-color": "^6.1.0", - "v8-compile-cache": "^2.1.1", - "yargs": "^13.3.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "webpack-dev-middleware": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz", - "integrity": "sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==", - "requires": { - "memory-fs": "^0.4.1", - "mime": "^2.4.4", - "mkdirp": "^0.5.1", - "range-parser": "^1.2.1", - "webpack-log": "^2.0.0" - } - }, - "webpack-dev-server": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz", - "integrity": "sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg==", - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.1.8", - "compression": "^1.7.4", - "connect-history-api-fallback": "^1.6.0", - "debug": "^4.1.1", - "del": "^4.1.1", - "express": "^4.17.1", - "html-entities": "^1.3.1", - "http-proxy-middleware": "0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.3.0", - "ip": "^1.1.5", - "is-absolute-url": "^3.0.3", - "killable": "^1.0.1", - "loglevel": "^1.6.8", - "opn": "^5.5.0", - "p-retry": "^3.0.1", - "portfinder": "^1.0.26", - "schema-utils": "^1.0.0", - "selfsigned": "^1.10.7", - "semver": "^6.3.0", - "serve-index": "^1.9.1", - "sockjs": "0.3.20", - "sockjs-client": "1.4.0", - "spdy": "^4.0.2", - "strip-ansi": "^3.0.1", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.7.2", - "webpack-log": "^2.0.0", - "ws": "^6.2.1", - "yargs": "^13.3.2" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "requires": { - "ms": "2.1.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "optional": true, - "requires": { - "nan": "^2.12.1" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", - "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", - "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - } - } - }, - "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - } - }, - "websocket-driver": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", - "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", - "requires": { - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==" - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "worker-farm": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", - "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", - "requires": { - "async-limiter": "~1.0.0" - } - }, - "xhr2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", - "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - } - } - } - } -} diff --git a/plutus-pab-client/package.json b/plutus-pab-client/package.json deleted file mode 100644 index bca6ed754a..0000000000 --- a/plutus-pab-client/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "plutus-pab-client", - "version": "1.0.0", - "scripts": { - "webpack": "DEBUG=purs-loader* DEBUG_DEPTH=100 webpack --progress --bail --mode=production -p", - "webpack:watch": "PATH=$PATH:../releases/psc-package DEBUG=purs-loader* DEBUG_DEPTH=100 webpack --progress --display-error-details --display verbose --watch", - "webpack:server": "webpack-dev-server --progress --inline --hot --mode=development --host 0.0.0.0", - "webpack:server:debug": "DEBUG=purs-loader* DEBUG_DEPTH=100 webpack-dev-server --progress --inline --hot", - "purs:compile": "spago build", - "purs:ide": "purs ide server --log-level=debug 'src/**/*.purs' 'generated/**/*.purs' 'test/**/*.purs' 'web-common/**/*.purs'", - "test": "spago --no-psa test", - "test:watch": "spago test --no-psa --watch", - "docs": "spago docs", - "repl": "spago repl", - "start": "npm install && plutus-pab-generate-purs && npm run purs:compile && npm run webpack:server" - }, - "dependencies": { - "@fortawesome/fontawesome-free": "^5.10.2", - "bignumber": "^1.1.0", - "bootstrap": "^4.3.1", - "css-loader": "^1.0.0", - "extract-text-webpack-plugin": "^3.0.2", - "file-loader": "^2.0.0", - "html-webpack-plugin": "^3.2.0", - "jquery": "^3.3.1", - "json-bigint": "^1.0.0", - "node-sass": "^4.12.0", - "purs-loader": "^3.6.0", - "sass-loader": "^7.1.0", - "style-loader": "^0.23.1", - "url-loader": "^1.1.2", - "uuid": "^7.0.2", - "uuid-validate": "^0.0.3", - "webpack": "^4.41.0", - "webpack-cli": "^3.1.2", - "webpack-dev-server": "^3.1.10", - "xhr2": "^0.1.4" - }, - "resolutions": {}, - "license": "Apache-2.0" -} diff --git a/plutus-pab-client/packages.dhall b/plutus-pab-client/packages.dhall deleted file mode 100644 index e97ac21d05..0000000000 --- a/plutus-pab-client/packages.dhall +++ /dev/null @@ -1,186 +0,0 @@ -{- -Welcome to your new Dhall package-set! - -Below are instructions for how to edit this file for most use -cases, so that you don't need to know Dhall to use it. - -## Warning: Don't Move This Top-Level Comment! - -Due to how `dhall format` currently works, this comment's -instructions cannot appear near corresponding sections below -because `dhall format` will delete the comment. However, -it will not delete a top-level comment like this one. - -## Use Cases - -Most will want to do one or both of these options: -1. Override/Patch a package's dependency -2. Add a package not already in the default package set - -This file will continue to work whether you use one or both options. -Instructions for each option are explained below. - -### Overriding/Patching a package - -Purpose: -- Change a package's dependency to a newer/older release than the - default package set's release -- Use your own modified version of some dependency that may - include new API, changed API, removed API by - using your custom git repo of the library rather than - the package set's repo - -Syntax: -Replace the overrides' "{=}" (an empty record) with the following idea -The "//" or "⫽" means "merge these two records and - when they have the same value, use the one on the right:" -------------------------------- -let override = - { packageName = - upstream.packageName // { updateEntity1 = "new value", updateEntity2 = "new value" } - , packageName = - upstream.packageName // { version = "v4.0.0" } - , packageName = - upstream.packageName // { repo = "https://www.example.com/path/to/new/repo.git" } - } -------------------------------- - -Example: -------------------------------- -let overrides = - { halogen = - upstream.halogen // { version = "master" } - , halogen-vdom = - upstream.halogen-vdom // { version = "v4.0.0" } - } -------------------------------- - -### Additions - -Purpose: -- Add packages that aren't already included in the default package set - -Syntax: -Replace the additions' "{=}" (an empty record) with the following idea: -------------------------------- -let additions = - { package-name = - { dependencies = - [ "dependency1" - , "dependency2" - ] - , repo = - "https://example.com/path/to/git/repo.git" - , version = - "tag ('v4.0.0') or branch ('master')" - } - , package-name = - { dependencies = - [ "dependency1" - , "dependency2" - ] - , repo = - "https://example.com/path/to/git/repo.git" - , version = - "tag ('v4.0.0') or branch ('master')" - } - , etc. - } -------------------------------- - -Example: -------------------------------- -let additions = - { benchotron = - { dependencies = - [ "arrays" - , "exists" - , "profunctor" - , "strings" - , "quickcheck" - , "lcg" - , "transformers" - , "foldable-traversable" - , "exceptions" - , "node-fs" - , "node-buffer" - , "node-readline" - , "datetime" - , "now" - ] - , repo = - "https://github.com/hdgarrood/purescript-benchotron.git" - , version = - "v7.0.0" - } - } -------------------------------- --} - - -let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.13.6-20200502/packages.dhall sha256:1e1ecbf222c709b76cc7e24cf63af3c2089ffd22bbb1e3379dfd3c07a1787694 - -let overrides = {=} - -let additions = - { servant-support = - { dependencies = - [ "console" - , "prelude" - , "either" - , "foldable-traversable" - , "generics-rep" - , "effect" - , "aff" - , "affjax" - , "exceptions" - , "web-xhr" - , "foreign-generic" - ] - , repo = - "https://github.com/shmish111/purescript-servant-support" - , version = - "1805f896560751c48a04d3e29f9c109df850d8d3" - } - , concurrent-queues = - { dependencies = - [ "aff" - , "avar" - ] - , repo = - "https://github.com/purescript-contrib/purescript-concurrent-queues.git" - , version = - "v1.1.0" - } - , foreign-generic = - upstream.foreign-generic - ⫽ { repo = - "https://github.com/shmish111/purescript-foreign-generic" - , version = - "57692ed7b1bc512bcfddd2c00c27e865e9c21b84" - } - , matryoshka = - { dependencies = - [ "prelude" - , "fixed-points" - , "free" - , "transformers" - , "profunctor" - ] - , repo = - "https://github.com/slamdata/purescript-matryoshka.git" - , version = - "v0.4.0" - } - , numerics = - { dependencies = - [ "prelude", "integers", "rationals", "uint", "bigints" ] - , repo = - "https://github.com/Proclivis/purescript-numerics" - , version = - "v0.1.2" - } - } - -in upstream ⫽ overrides ⫽ additions diff --git a/plutus-pab-client/spago-packages.nix b/plutus-pab-client/spago-packages.nix deleted file mode 100644 index eceaa58886..0000000000 --- a/plutus-pab-client/spago-packages.nix +++ /dev/null @@ -1,1354 +0,0 @@ -# This file was generated by Spago2Nix - -{ pkgs ? import {} }: - -let - inputs = { - - "aff" = pkgs.stdenv.mkDerivation { - name = "aff"; - version = "v5.1.2"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-aff.git"; - rev = "78916a9c7e6d203f1d9f441c8eaa257d6475e978"; - sha256 = "1ygjxbm2bqw82sm17szhzz4jihvbg9mszx1ii0n3sj72bnz02avz"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "aff-promise" = pkgs.stdenv.mkDerivation { - name = "aff-promise"; - version = "v2.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/nwolverson/purescript-aff-promise.git"; - rev = "033d6b90252e0390b0de7845e21de919bc4c3a0e"; - sha256 = "0khm53lvxgvc7fbsvcr2h2wlhcgay8vq45755f0w8vpk1441dvww"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "affjax" = pkgs.stdenv.mkDerivation { - name = "affjax"; - version = "v10.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-affjax.git"; - rev = "200bad76c420935550bb9ef0ea6a548caea2ba42"; - sha256 = "0n01xpc60xqd1gjxdh6jxbvc0m4i6h95j6dkayncbck5zrgnm2d7"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "ansi" = pkgs.stdenv.mkDerivation { - name = "ansi"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/hdgarrood/purescript-ansi.git"; - rev = "e060b4a7c9a0df9359871cb0c5773139e5525d2f"; - sha256 = "16kgy9zbdms9appd69gad2bka44ijkcnc9p0kf5g7x672jypx3ar"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "argonaut-codecs" = pkgs.stdenv.mkDerivation { - name = "argonaut-codecs"; - version = "v6.0.2"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-argonaut-codecs.git"; - rev = "b0317d576e10aa73600c43f835bfad45679d0aff"; - sha256 = "1i8dm95kbcl7k92jqnylhng1rjcqx5z12yhf6mwvp0z0bmsz250b"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "argonaut-core" = pkgs.stdenv.mkDerivation { - name = "argonaut-core"; - version = "v5.0.2"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-argonaut-core.git"; - rev = "a9999bc4c10272ee188768bf90a455bd1a79ccd6"; - sha256 = "1rfd1brvzp9akx6hypxql2qv9bhlcqks1xwqfqqf31dqvcl7vvhc"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "arraybuffer-types" = pkgs.stdenv.mkDerivation { - name = "arraybuffer-types"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-arraybuffer-types.git"; - rev = "505aa3de50a1400e5f2fce4a8e7b1a39abaa8fd9"; - sha256 = "059a8n49yhl46l1b1j2qj4ichzq6dzj29ajkfvw88npzj5w2rshy"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "arrays" = pkgs.stdenv.mkDerivation { - name = "arrays"; - version = "v5.3.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-arrays.git"; - rev = "463dcacb99455de5e28ac4a3312bb795f293d2d9"; - sha256 = "1z8i4mr30mjsvmw743g0m1yxfgqa9rhbgq7jq3955mg7j80j5r7w"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "avar" = pkgs.stdenv.mkDerivation { - name = "avar"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-avar.git"; - rev = "17914413130490318a475e9de6a9244aaaa097d2"; - sha256 = "14g05jm2xricy5b9vn4k4lhc9lzi5jvpvv85h10s17kn4wwi9igk"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "bifunctors" = pkgs.stdenv.mkDerivation { - name = "bifunctors"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-bifunctors.git"; - rev = "1062425892b4a1c734ec653dded22546e3063b27"; - sha256 = "1bdra5fbkraglqrrm484vw8h0wwk48kzkn586v4y7fg106q1q386"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "bigints" = pkgs.stdenv.mkDerivation { - name = "bigints"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/sharkdp/purescript-bigints.git"; - rev = "b29a2487899abc3701124701b82993a5fe129378"; - sha256 = "1m9v4an4y55rhiknr2spyllf80chl61w2xzmg90p58f8q4mzih8r"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "catenable-lists" = pkgs.stdenv.mkDerivation { - name = "catenable-lists"; - version = "v5.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-catenable-lists.git"; - rev = "d81b7df30d9879d0bb531b3102fb36f429c2f12e"; - sha256 = "0mbpb8xr9a7a4bvawhki7js5cbv7c0lv0vdwb6r8nmv6b61gzg27"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "concurrent-queues" = pkgs.stdenv.mkDerivation { - name = "concurrent-queues"; - version = "v1.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-concurrent-queues.git"; - rev = "e461aa5bbcfb99dd59c993a7c5c4f0e0751e4a8b"; - sha256 = "1a0vlxbl0vnk68v4wszgy6sz51klvnxfw8v8l4fpwkbb886mvxaj"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "console" = pkgs.stdenv.mkDerivation { - name = "console"; - version = "v4.4.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-console.git"; - rev = "9b48f83997168b94418d64d9e7b5c1763b30bdab"; - sha256 = "1w9k2g242lvyv4npb5rqfbdq1ngh7s7v12zarxn8yxgq15palh3m"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "const" = pkgs.stdenv.mkDerivation { - name = "const"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-const.git"; - rev = "bc5db27b0ed3947fa5e2074ccbab01236eec3fa4"; - sha256 = "0qbd2aisax52yw6sybdhs7na943cbsd6mylhhgsamrf7hzh6v51p"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "contravariant" = pkgs.stdenv.mkDerivation { - name = "contravariant"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-contravariant.git"; - rev = "cb69db0253c2e2ed3fef784dad58f3418a8ee834"; - sha256 = "0dd17lwlybpz4i54cxnqdgy38rjlbw9p7bw1r43is6z3kdc8983a"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "control" = pkgs.stdenv.mkDerivation { - name = "control"; - version = "v4.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-control.git"; - rev = "05d40c5855a0eda3bc396a3d815eaf213a0534e6"; - sha256 = "1nm45khn2dvlyv059nzpz1w7d3nfsvq45hnb2qllrbzyv7rlxmi8"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "coroutines" = pkgs.stdenv.mkDerivation { - name = "coroutines"; - version = "v5.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-coroutines.git"; - rev = "67a076b704f4b176f9332e8dc82d531a357e00ac"; - sha256 = "1is83blf44sflhwsaixpd1irlm33fsd1p919gbcn79mmmwi4bxdl"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "datetime" = pkgs.stdenv.mkDerivation { - name = "datetime"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-datetime.git"; - rev = "9e76abe96f45a68eb0bb23d0afd56031a8070bee"; - sha256 = "06ghfvbvd5sd0q014qi8j8glk2g2j9f8z8cwq2318kllp92gz07q"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "debug" = pkgs.stdenv.mkDerivation { - name = "debug"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/garyb/purescript-debug.git"; - rev = "b1484b8aac685dc83c1d938d71407495ae2a2259"; - sha256 = "0gwjj80akys0h111i74n429fmny992gx0r4rk1n98gqlqm5cmi21"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "distributive" = pkgs.stdenv.mkDerivation { - name = "distributive"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-distributive.git"; - rev = "3a43c0690883816e9ebeac510698423cfff5c174"; - sha256 = "0zbn0yq1vv7fbbf1lncg80irz0vg7wnw9b9wrzxhdzpbkw4jinsl"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "dom-indexed" = pkgs.stdenv.mkDerivation { - name = "dom-indexed"; - version = "v7.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-dom-indexed.git"; - rev = "c449ae115bffe1fce89e145da62b862ad16ed935"; - sha256 = "18is75gsiix9w3f3lkly15cvs7ma1qc13hhi6wkl8nsj2g9g55ld"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "effect" = pkgs.stdenv.mkDerivation { - name = "effect"; - version = "v2.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-effect.git"; - rev = "6caa8e1e162a21eed025613c2c19194b996ef779"; - sha256 = "1vqw5wrdxzh1ww6z7271xr4kg4mx0r3k3mwg18dmgmzj11wbn2wh"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "either" = pkgs.stdenv.mkDerivation { - name = "either"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-either.git"; - rev = "8b4b38a729f8e88750b03e5c7baf2b3863ce4742"; - sha256 = "12j7vvjly0bgxidxmb2pflx0zy7x425dnvxk2y1pm66n0hbsq7ns"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "enums" = pkgs.stdenv.mkDerivation { - name = "enums"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-enums.git"; - rev = "19800105b556798ea5650f8a01bfe5ea17cfc6eb"; - sha256 = "0qq0pgmq497nfml0y8xb2qdpga5xqp9sqq4ilv1rpyhg1v7nzb6v"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "exceptions" = pkgs.stdenv.mkDerivation { - name = "exceptions"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-exceptions.git"; - rev = "9012eb08749e9ccd5da45bdece5d576e5fc0b0db"; - sha256 = "17s0rg9k4phivhx9j3l2vqqfdhk61gpj1xfqy8w6zj3rnxj0b2cv"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "exists" = pkgs.stdenv.mkDerivation { - name = "exists"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-exists.git"; - rev = "ef53359aebc09bf863800ca86ad1dcd76f0b08ae"; - sha256 = "0bbdbw3jaqyi8dj2d52zvfgx4vl84d8cr6hp43vy8lfjfcbj0wlk"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "fixed-points" = pkgs.stdenv.mkDerivation { - name = "fixed-points"; - version = "v5.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-fixed-points.git"; - rev = "44ae7a7135bd17dc6d865d31f166a8cf5fa65c7e"; - sha256 = "14acfi7897z2vd8mq52h0gz8x31wyrvalb490rqjf4nyk73vhg36"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "foldable-traversable" = pkgs.stdenv.mkDerivation { - name = "foldable-traversable"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-foldable-traversable.git"; - rev = "29d5b873cc86f17e0082d777629819a96bdbc7a1"; - sha256 = "03x89xcmphckzjlp4chc7swrpw347ll5bvr2yp7x9v2jqw2jlyi1"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "foreign" = pkgs.stdenv.mkDerivation { - name = "foreign"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-foreign.git"; - rev = "3b8f3ae608db339ed5cff35d2017a07efb905b4d"; - sha256 = "15mz2s4f8crkd721z4df2aag4s0wil6fs07cpcmi7dpnkn7a4nab"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "foreign-generic" = pkgs.stdenv.mkDerivation { - name = "foreign-generic"; - version = "57692ed7b1bc512bcfddd2c00c27e865e9c21b84"; - src = pkgs.fetchgit { - url = "https://github.com/shmish111/purescript-foreign-generic"; - rev = "57692ed7b1bc512bcfddd2c00c27e865e9c21b84"; - sha256 = "09si99vlwampsis99bsidb3y0p332zbcdzv19q0hgjyfd23bi7zm"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "foreign-object" = pkgs.stdenv.mkDerivation { - name = "foreign-object"; - version = "v2.0.3"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-foreign-object.git"; - rev = "8a7dc21c48e3e6d31e253b0e58dd95a3bbd7f6e7"; - sha256 = "07wiql59zfj901nk9526b6rykn9m24jjcs8v5dgxbr1c3hiab9n3"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "fork" = pkgs.stdenv.mkDerivation { - name = "fork"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-fork.git"; - rev = "27b9f223645a08b42731531a154892eaa263b590"; - sha256 = "1jygqzyci40c28gw2ygnx8v52hilhajj1bdpn7ndvss4i7yh1lcp"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "form-urlencoded" = pkgs.stdenv.mkDerivation { - name = "form-urlencoded"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-form-urlencoded.git"; - rev = "acccb8ae3e38ffc5d2803d576bb6e409adee7195"; - sha256 = "1kl937qxnbn9m1bn0ijpnfiizgpcvcrnzqcc1scwq2kxvxh8kqap"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "free" = pkgs.stdenv.mkDerivation { - name = "free"; - version = "v5.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-free.git"; - rev = "f686f5fc07766f3ca9abc83b47b6ad3da326759a"; - sha256 = "1bwj0ay7q9lm4ir29jy549m05jvaqik1s615biv23y51ngx3fn49"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "freeap" = pkgs.stdenv.mkDerivation { - name = "freeap"; - version = "v5.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/ethul/purescript-freeap.git"; - rev = "8f7bebc36c267794c31d5af1a5737746645e59df"; - sha256 = "007840vpxa4gz0fvjbahyky2xzz625gzfaiy2wjpb50d9qacsr7y"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "freet" = pkgs.stdenv.mkDerivation { - name = "freet"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-freet.git"; - rev = "aecca5b389aecf15a37e369b76d7d0064223996d"; - sha256 = "0j8y47x672z8h809hxl1n502yj0y3yv8zsln8bk17rcz06x8frv9"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "functions" = pkgs.stdenv.mkDerivation { - name = "functions"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-functions.git"; - rev = "c63451ae74f6fba7a4eede5f87208a73c537af77"; - sha256 = "0675k5kxxwdvsjs6a3is8pwm3hmv0vbcza1b8ls10gymmfz3k3hj"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "functors" = pkgs.stdenv.mkDerivation { - name = "functors"; - version = "v3.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-functors.git"; - rev = "96bcf8a970a40115a76a20d19e50aa3b524adcf3"; - sha256 = "1cnn3zhk6qcyiwbbpvrdqgsbch4qihx2y9d6sv45bvd8kzrbd306"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "gen" = pkgs.stdenv.mkDerivation { - name = "gen"; - version = "v2.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-gen.git"; - rev = "36f36f03f082b57e402c27f1513f8935caa54101"; - sha256 = "0pk68cn1s89hql30ydks9gh34gbxg391smi2albx3qvxnfkrpxca"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "generics-rep" = pkgs.stdenv.mkDerivation { - name = "generics-rep"; - version = "v6.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-generics-rep.git"; - rev = "aae27ba1de21dda342dcdfc8b3cc5b951bd5b3ec"; - sha256 = "15vchzbcvf6byks90q14lvcwb8hnxqzm2mrlxi7v1f7has4s74kn"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "globals" = pkgs.stdenv.mkDerivation { - name = "globals"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-globals.git"; - rev = "8e6d69c36b6fd8c988a3664fc033ad11dbdd5860"; - sha256 = "03h4npdbsjr1mkjasdi071l0cl7zdf3l76a8f0x4ghx47yvpgadn"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "halogen" = pkgs.stdenv.mkDerivation { - name = "halogen"; - version = "v5.0.0-rc.9"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-halogen.git"; - rev = "4e67ad059027a9a2eb16b63b46ac9434ab931f84"; - sha256 = "094f99qa4cymqdh1zww2qsrijplqfz2n7sa5rnbm8hxg8p235fbl"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "halogen-vdom" = pkgs.stdenv.mkDerivation { - name = "halogen-vdom"; - version = "v6.1.3"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-halogen-vdom.git"; - rev = "8b91e55019060f50779dba20959f47cf4b60678d"; - sha256 = "0apcdf7hhph57bnqw7nn0wyrlas8lv4nsvf964a3phhy06x1jw8m"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "http-methods" = pkgs.stdenv.mkDerivation { - name = "http-methods"; - version = "v4.0.2"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-http-methods.git"; - rev = "f3672edd166d323849b9dfd1e01c6eeb978fd56c"; - sha256 = "1wfgrlnl33bcqw54hbc8icah2fi0rvi5zxhz07665vy9p5ppvkqs"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "identity" = pkgs.stdenv.mkDerivation { - name = "identity"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-identity.git"; - rev = "1b7938abdc8cb28c0ac5f80f63405d53e3173a8e"; - sha256 = "1scdgbfkphfmapw7p9rnsiynpmqzyvnal2glzj450q51f8g1dhld"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "integers" = pkgs.stdenv.mkDerivation { - name = "integers"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-integers.git"; - rev = "3850da9cd96b37c71685b6bc3bf0cb489baefc93"; - sha256 = "17d4bfpnrmbxlc7hhhrvnli70ydaqyr26zgvc9q52a76zgdcb4cf"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "invariant" = pkgs.stdenv.mkDerivation { - name = "invariant"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-invariant.git"; - rev = "b704c5bda262719ca5cc88a3f8554edff8f03256"; - sha256 = "1fimpbh3yb7clvqxcdf4yf9im64z0v2s9pbspfacgq5b4vshjas9"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "js-date" = pkgs.stdenv.mkDerivation { - name = "js-date"; - version = "v6.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-js-date.git"; - rev = "f332c15f14322434ddd1945ca2db8040294447bf"; - sha256 = "19qyzbr4a1ca8znbd8gcbz0a801f5p1v238ky3408gdx4ba32zjd"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "js-timers" = pkgs.stdenv.mkDerivation { - name = "js-timers"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-js-timers.git"; - rev = "8206d3d8034357b4665828e52f7ff1b8cb46611e"; - sha256 = "1a8092sli7zqw1wflibhjza1ww21dxl7x7r602iazzwh2g70v4dg"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "lazy" = pkgs.stdenv.mkDerivation { - name = "lazy"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-lazy.git"; - rev = "5bbd04f507a704f39aa756b5e12ed6665205fe2e"; - sha256 = "156q89l4nvvn14imbhp6xvvm82q7kqh1pyndmldmnkhiqyr84vqv"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "lcg" = pkgs.stdenv.mkDerivation { - name = "lcg"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-lcg.git"; - rev = "596bcb17bd550397735220f919df52bcd0038fe0"; - sha256 = "1851cq2g84jzjbvbmncbivbhaqzj9zv5ni3gs14k04nmx2brxmvj"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "lists" = pkgs.stdenv.mkDerivation { - name = "lists"; - version = "v5.4.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-lists.git"; - rev = "62900a56f6864638c952575dfd211a1cc55be7da"; - sha256 = "0l0jiqhcjzkg4nv2a6h2vdf4izr9mf7cxc86cq1hf3j4dh6spym1"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "math" = pkgs.stdenv.mkDerivation { - name = "math"; - version = "v2.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-math.git"; - rev = "8be36d24f9d2d8795adf04791446bbc458297b9b"; - sha256 = "1msmy9w7y6fij62sdc55w68gpwkhm6lhgc8qjisjk4sxx1wdg1rr"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "matryoshka" = pkgs.stdenv.mkDerivation { - name = "matryoshka"; - version = "v0.4.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-matryoshka.git"; - rev = "caaca2d836d52159ba7963333996286a00428394"; - sha256 = "1vm8papnpkmf4w51v6a2cnq408ayi75nz5b5zwiwksd35c8x2g64"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "maybe" = pkgs.stdenv.mkDerivation { - name = "maybe"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-maybe.git"; - rev = "81f0397636bcbca28642f62421aebfd9e1afa7fb"; - sha256 = "073wa0d51daxdwacfcxg5pf6ch63n4ii55xm1ih87bxrg8mp52mx"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "media-types" = pkgs.stdenv.mkDerivation { - name = "media-types"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-media-types.git"; - rev = "e304498356539547b4ed9a7f79513a847c907962"; - sha256 = "0ykwmxrhmwfy6c5mxjxa43xdf5xqakrqyvr5fn986yad50gjqj75"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "mmorph" = pkgs.stdenv.mkDerivation { - name = "mmorph"; - version = "v5.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/Thimoteus/purescript-mmorph.git"; - rev = "e067ee63c9c08e67b632a8b55930f744ddfad980"; - sha256 = "1lvdclqi9wzs4j8xj8ygnj2b87hhpbnl0c6m28zac05rz87s09mg"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "newtype" = pkgs.stdenv.mkDerivation { - name = "newtype"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-newtype.git"; - rev = "7d85fa6a040208c010b05f7c23af6a943ba08763"; - sha256 = "0qvk9p41miy806b05b4ikbr3if0fcyc35gfrwd2mflcxxp46011c"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "node-buffer" = pkgs.stdenv.mkDerivation { - name = "node-buffer"; - version = "v6.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-node/purescript-node-buffer.git"; - rev = "dac7d4734a739cea2cd379f6bae5226dbab26da2"; - sha256 = "0pgl8r1rwzmbvwgbibk24jpgf6m7xcw3y7zfn6psgzca44c4hgsv"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "node-fs" = pkgs.stdenv.mkDerivation { - name = "node-fs"; - version = "v5.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-node/purescript-node-fs.git"; - rev = "02d610f237dc130edb5ee594fd46b16c691b79eb"; - sha256 = "0i3bd7aw16vyb5sh5fzlvgg9q6cjdvmnfs57in6rxm34z8d8c0p8"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "node-path" = pkgs.stdenv.mkDerivation { - name = "node-path"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-node/purescript-node-path.git"; - rev = "e3a704d5fc7d25fa93c6cd0eb92dbce9e5ebd69a"; - sha256 = "0j1ni52m62dpcrfakl1ik131i31bkg91yv0p1c40sdw0f59fzf6x"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "node-streams" = pkgs.stdenv.mkDerivation { - name = "node-streams"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-node/purescript-node-streams.git"; - rev = "88740eeda2017d3ddcde50eea59d57c7749d8524"; - sha256 = "12dki2li0d7s54kvcr6gksb5nxf6kzs93gwxnq4bh1flri8p0i7r"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "nonempty" = pkgs.stdenv.mkDerivation { - name = "nonempty"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-nonempty.git"; - rev = "36ca3b2fa6d98b1c9d2ee05643341e496fbeab57"; - sha256 = "1vz174sg32cqrp52nwb2vz9frrzmdwzzlgl4vc2cm5wlf2anirxj"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "now" = pkgs.stdenv.mkDerivation { - name = "now"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-now.git"; - rev = "090feddf7c7dec2a812eca090cd211e87ccad606"; - sha256 = "18h5pif2dy4r7w1xg2zw4mvdqlar9xqp3rawkiavmsc946ncf3zs"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "nullable" = pkgs.stdenv.mkDerivation { - name = "nullable"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-nullable.git"; - rev = "8d413f02224b8281bfa8037e45fbbf9fe2e254fd"; - sha256 = "14qaxxga8gqlr4pijyvqycdyhjr6qpz3h4aarficw5j75b7x8nyv"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "ordered-collections" = pkgs.stdenv.mkDerivation { - name = "ordered-collections"; - version = "v1.6.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-ordered-collections.git"; - rev = "54af8b281bf01acfc14e147debec76974901e93c"; - sha256 = "0r48p94d3cyzni2z7ikzcap472k23dx8zq37c1prmjb01v03mfvc"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "orders" = pkgs.stdenv.mkDerivation { - name = "orders"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-orders.git"; - rev = "80e22c22c72c846e09ef9dfcdb40b3eee39118d6"; - sha256 = "13p1sm4dxkmxhld9x5qqg62iiajjb3qpzs66c1r24y5fs4zsfry4"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "parallel" = pkgs.stdenv.mkDerivation { - name = "parallel"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-parallel.git"; - rev = "4d6c8b05041a36c300dfca2ba8f1f3443ca26bc6"; - sha256 = "1d5bnagabw2k8yxywkygwrpblb2ggqh2fhpqfrx2sj1y53x332hg"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "partial" = pkgs.stdenv.mkDerivation { - name = "partial"; - version = "v2.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-partial.git"; - rev = "76b63a324f7eafbb859256771b5bb7404082af96"; - sha256 = "11qr80989g7xmvw1brnrclsbg2wdkbr5k3cqpngfip3nnirrypcn"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "pipes" = pkgs.stdenv.mkDerivation { - name = "pipes"; - version = "v6.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/felixSchl/purescript-pipes.git"; - rev = "a9533035f6fe8e59a65c6d11a3a7c767f3c9ae67"; - sha256 = "0vl37f42dy4w4hswiay22w0n14k7sr670x54iwn7428larzrzs8y"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "prelude" = pkgs.stdenv.mkDerivation { - name = "prelude"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-prelude.git"; - rev = "a96663b34364fdd0885a200955e35b99f4e58c43"; - sha256 = "1frvjrv0mr508r6683l1mp5rzm1y2dz76fz40zf4k2c64sy6y1xm"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "profunctor" = pkgs.stdenv.mkDerivation { - name = "profunctor"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-profunctor.git"; - rev = "9b3d014b38c69ea2dd4b1f597330b095034fe2c4"; - sha256 = "1zwbxgimpknmashmq2rb773kbwbksr4ahcdkpnvvcapasxhds0a7"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "profunctor-lenses" = pkgs.stdenv.mkDerivation { - name = "profunctor-lenses"; - version = "v6.3.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-profunctor-lenses.git"; - rev = "2be610e104ab733a4dcc9d63f03d8eaee1e1b1c2"; - sha256 = "07py52ngnhab0pc0ca42pnypbwk1lcm7mhz29kp4ap0qhi2z4n2y"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "proxy" = pkgs.stdenv.mkDerivation { - name = "proxy"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-proxy.git"; - rev = "4a529b1f874fa2f32fc4c575cafaf46e0ab69fb6"; - sha256 = "0rqf25b1n9p5sgx7gdsxwrfv9rb3sqxgqmqpp5kdm30lfk7snz24"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "psci-support" = pkgs.stdenv.mkDerivation { - name = "psci-support"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-psci-support.git"; - rev = "a66a0fa8661eb8b5fe75cc862f4e2df2835c058d"; - sha256 = "0jd773zcklr6hjddqingzmk20a0afpm2r9pczfjbj0d93pbxb4xh"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "quickcheck" = pkgs.stdenv.mkDerivation { - name = "quickcheck"; - version = "v6.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-quickcheck.git"; - rev = "6289a80570acd5aec3ea89dc673cf10cdaf5794a"; - sha256 = "0b6208067krf81kzq2hbxs68386hcicbscwxbj5nck07ivjjvqh0"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "random" = pkgs.stdenv.mkDerivation { - name = "random"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-random.git"; - rev = "75e6b21edbe0eec78c28ff3bd8265998f2ea0b45"; - sha256 = "0k37v7z529adx6ypxj0xjyfrz45qia6p0vki2wpvi8lik7c698gf"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "rationals" = pkgs.stdenv.mkDerivation { - name = "rationals"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/anttih/purescript-rationals.git"; - rev = "8c52d8cc891d1223150a31416220aa9b99404442"; - sha256 = "1idvjvvx5kwmi8kj2ps95bcvlsgij1xgin4jfw3rmcqd930wqq6q"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "record" = pkgs.stdenv.mkDerivation { - name = "record"; - version = "v2.0.2"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-record.git"; - rev = "93c235249d4f47a3c8300089596c2afe67e27577"; - sha256 = "0ap1mc7bi8a20c5g11lxif6q68s2sc31khirfabngr1jpsm3r4lw"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "refs" = pkgs.stdenv.mkDerivation { - name = "refs"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-refs.git"; - rev = "e8b175477661e433175e76548168290c40e0ce4b"; - sha256 = "08161iy1xbafzblv033v84156azpcqkiw9v9d6gliphrq5fm17gm"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "remotedata" = pkgs.stdenv.mkDerivation { - name = "remotedata"; - version = "v4.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/krisajenkins/purescript-remotedata.git"; - rev = "8dbd12110f6a338c36afd6c3208dd5fa031c0573"; - sha256 = "15ab34s3bz2kbzrhbxixzwpxmgj356px8z1s77r2pa9fjnmkn40v"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "servant-support" = pkgs.stdenv.mkDerivation { - name = "servant-support"; - version = "1805f896560751c48a04d3e29f9c109df850d8d3"; - src = pkgs.fetchgit { - url = "https://github.com/shmish111/purescript-servant-support"; - rev = "1805f896560751c48a04d3e29f9c109df850d8d3"; - sha256 = "1n8a0j5rwgkanvwp47f78gn5qacs06siii2f5x5fr4rw15q6a9ma"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "spec" = pkgs.stdenv.mkDerivation { - name = "spec"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-spec/purescript-spec.git"; - rev = "a91d77654c4a6ac314b42bae941892dd576c4916"; - sha256 = "0svz079yvykx4dj89qgaqi0zwy7d3l1yhkrcll2m81y3idhr1c2p"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "st" = pkgs.stdenv.mkDerivation { - name = "st"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-st.git"; - rev = "8133841b8b545f3a273caebb6103f7c640fc35eb"; - sha256 = "1jpz8rpk2ac6kshflri8pdw4s1hf8g4alz5bw69x23sj9sccxgs0"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "strings" = pkgs.stdenv.mkDerivation { - name = "strings"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-strings.git"; - rev = "94c843b93142d0edf1c31ec075c40b6984c3dc7b"; - sha256 = "147l3l3fzn7liparhm2y3p8j4ck1lblra5j493p2hy5yy5ndznc8"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "tailrec" = pkgs.stdenv.mkDerivation { - name = "tailrec"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-tailrec.git"; - rev = "5a32aa5a4f3651b66cc0e87bcb9861116f9913a3"; - sha256 = "0n0sxr44d1lwlrgv8b48ml6vg0r5abfvyywn50jb0i1agnm53i4n"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "test-unit" = pkgs.stdenv.mkDerivation { - name = "test-unit"; - version = "v15.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/bodil/purescript-test-unit.git"; - rev = "351c55b632e0c0ebffae05837909995a03de3406"; - sha256 = "06lb90vppa7naqqwz7wbvlkkyz86pbdd3ycw3d2iygvxbzkz8xjn"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "transformers" = pkgs.stdenv.mkDerivation { - name = "transformers"; - version = "v4.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-transformers.git"; - rev = "0e473e5ef0e294615ca0d9aab0bcffee47b2870d"; - sha256 = "03qmvl9s7lbvm73dy9ps6qp39pdcm91hb8yakgj7aq8hgpj7b6bg"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "tuples" = pkgs.stdenv.mkDerivation { - name = "tuples"; - version = "v5.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-tuples.git"; - rev = "0036bf9d99b721fd0f2e539d24e18e484b016927"; - sha256 = "045nsy0r2g51gih0wjhcvhl6gfr8947mlrqwg644ygz72rjm8wq4"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "type-equality" = pkgs.stdenv.mkDerivation { - name = "type-equality"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-type-equality.git"; - rev = "2cdae51c394401cd5fc04b03c341273b41532b7d"; - sha256 = "1b7szyca5s96gaawvgwrw7fa8r7gqsdff7xhz3vvngnylv2scl3w"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "typelevel-prelude" = pkgs.stdenv.mkDerivation { - name = "typelevel-prelude"; - version = "v5.0.2"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-typelevel-prelude.git"; - rev = "9f8788ba16ddda8f70e54e5228422348c13c817c"; - sha256 = "1kp1b35y8wzin9m5lfyp239nclq703xz2b4373x3075xfp6qdcwf"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "undefinable" = pkgs.stdenv.mkDerivation { - name = "undefinable"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/ethul/purescript-undefinable.git"; - rev = "9c5c863e638b93cf73e2cfde8dfbde91480ee011"; - sha256 = "03z91g1n6zmiqgqqxi65g99a9qxfb8dcnzg2wnb16i2rl8frsl3v"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "unfoldable" = pkgs.stdenv.mkDerivation { - name = "unfoldable"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-unfoldable.git"; - rev = "077e787108e02bd16a1b27e57847d5baede7dd61"; - sha256 = "03g2zz26ai8a44z07jhdj0yvv8q6nq6ifcrzc7qjmdkjywg2cj9v"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "unsafe-coerce" = pkgs.stdenv.mkDerivation { - name = "unsafe-coerce"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-unsafe-coerce.git"; - rev = "fa6a5ca9b4581c00ee0b8539306a49badb7bee60"; - sha256 = "0k9255mk2mz6xjb11pwkgfcblmmyvr86ig5kr92jwy95xim09zip"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "unsafe-reference" = pkgs.stdenv.mkDerivation { - name = "unsafe-reference"; - version = "v3.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-unsafe-reference.git"; - rev = "79d7de7b9351346a73e6c060d80532c95ba1c7c1"; - sha256 = "0q758dz59qz0li4s3w1qcg921xp5i5rh6i1l611iv7rr8cbj11al"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "uuid" = pkgs.stdenv.mkDerivation { - name = "uuid"; - version = "v6.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/spicydonuts/purescript-uuid.git"; - rev = "e5d74beef8b33aad9f9b0824950152c46ac2c7f1"; - sha256 = "1ldrhjavv9vngdnh9i7pbg93iwaslrs6rfcv8jh5cjywpin8n6zx"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-clipboard" = pkgs.stdenv.mkDerivation { - name = "web-clipboard"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-clipboard.git"; - rev = "5c4fe20111b9e37d74c805101b5c558928808971"; - sha256 = "17i7rpzxi7pgas32xz8vjcs54m94gnmca3my0p70gzvf3rasnxyx"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-dom" = pkgs.stdenv.mkDerivation { - name = "web-dom"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-dom.git"; - rev = "5bbf40aa543c3a3eb18adf1f86ce1c505c762108"; - sha256 = "03awc83ggbwcvklzss48yf1bvm898pyim8zri1vjnnyy9yxyx7g0"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-events" = pkgs.stdenv.mkDerivation { - name = "web-events"; - version = "v2.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-events.git"; - rev = "7f19f24d7b61066bef0813734964f2dc6b085e3d"; - sha256 = "1vd1gfh6zv50bq4v1ppl2wvc5mskcw9n1bfj29qjg0dx0ffxzv2f"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-file" = pkgs.stdenv.mkDerivation { - name = "web-file"; - version = "v2.3.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-file.git"; - rev = "32fa296ff8103a72d52fc900b195f2ee05dc5627"; - sha256 = "1pn3cp8kkvxlg0vx3m53i83n8c92agpxd7dj96ma3bnyskd17fxv"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-html" = pkgs.stdenv.mkDerivation { - name = "web-html"; - version = "v2.3.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-html.git"; - rev = "0aa27db6d393fc53454f549566f9058147cc008a"; - sha256 = "1gz2wkph49rkwd7cm6j0mx9sv6a3nzxcidv50mrxydhl3h8153gy"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-socket" = pkgs.stdenv.mkDerivation { - name = "web-socket"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-socket.git"; - rev = "00f4ab583efb6fc60e0517d782d2ba2a89d8ec66"; - sha256 = "0kp4rmrqmsjmih7nw7dl75d36pny3ikafnhnfchpc834ap9451zh"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-storage" = pkgs.stdenv.mkDerivation { - name = "web-storage"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-storage.git"; - rev = "c2dedea1ee10ca7e94af5547c90274fb63ab3bc6"; - sha256 = "1ycb2s29aw9w6lqik6hfmp9nf9i2yhn0q26hc4p3450jam5mj8bx"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-touchevents" = pkgs.stdenv.mkDerivation { - name = "web-touchevents"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-touchevents.git"; - rev = "cde8ea42d92035b1c46df4f1e1c38205aba7742a"; - sha256 = "0mhsfqlglx04q3vkjg4k33bkxcpx2cmbq4x1zxyhl48q1qqmnic8"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-uievents" = pkgs.stdenv.mkDerivation { - name = "web-uievents"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-uievents.git"; - rev = "bdbc845bf8b06649c8361411085a0c0f788c9511"; - sha256 = "04032nl0z9hjq7b799zhbn7in10dz9kgrrcs0adjbaf08rc2kcwh"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-xhr" = pkgs.stdenv.mkDerivation { - name = "web-xhr"; - version = "v3.0.2"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-xhr.git"; - rev = "ca6e7b3b8186c026809e705ec6d8c2c943828ca8"; - sha256 = "1g35z2j9i5lqfms4yi8hgbgc85x6dy9lr3ygbr2f5fgkz86x3hqj"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - }; - - cpPackage = pkg: - let - target = ".spago/${pkg.name}/${pkg.version}"; - in '' - if [ ! -e ${target} ]; then - echo "Installing ${target}." - mkdir -p ${target} - cp --no-preserve=mode,ownership,timestamp -r ${toString pkg.outPath}/* ${target} - else - echo "${target} already exists. Skipping." - fi - ''; - - getGlob = pkg: ''".spago/${pkg.name}/${pkg.version}/src/**/*.purs"''; - - getStoreGlob = pkg: ''"${pkg.outPath}/src/**/*.purs"''; - -in { - inherit inputs; - - installSpagoStyle = pkgs.writeShellScriptBin "install-spago-style" '' - set -e - echo installing dependencies... - ${builtins.toString (builtins.map cpPackage (builtins.attrValues inputs))} - echo "echo done." - ''; - - buildSpagoStyle = pkgs.writeShellScriptBin "build-spago-style" '' - set -e - echo building project... - purs compile ${builtins.toString (builtins.map getGlob (builtins.attrValues inputs))} "$@" - echo done. - ''; - - buildFromNixStore = pkgs.writeShellScriptBin "build-from-store" '' - set -e - echo building project using sources from nix store... - purs compile ${builtins.toString ( - builtins.map getStoreGlob (builtins.attrValues inputs))} "$@" - echo done. - ''; - - mkBuildProjectOutput = - { src, purs }: - - pkgs.stdenv.mkDerivation { - name = "build-project-output"; - src = src; - - buildInputs = [ purs ]; - - installPhase = '' - mkdir -p $out - purs compile "$src/**/*.purs" ${builtins.toString - (builtins.map - (x: ''"${x.outPath}/src/**/*.purs"'') - (builtins.attrValues inputs))} - mv output $out - ''; - }; -} diff --git a/plutus-pab-client/spago.dhall b/plutus-pab-client/spago.dhall deleted file mode 100644 index a9adb1bb06..0000000000 --- a/plutus-pab-client/spago.dhall +++ /dev/null @@ -1,40 +0,0 @@ -{- -Welcome to a Spago project! -You can edit this file as you like. --} -{ name = "plutus-pab-client" -, dependencies = - [ "prelude" - , "aff" - , "aff-promise" - , "avar" - , "bigints" - , "console" - , "concurrent-queues" - , "debug" - , "effect" - , "halogen" - , "matryoshka" - , "node-fs" - , "numerics" - , "argonaut-codecs" - , "foreign-generic" - , "psci-support" - , "transformers" - , "remotedata" - , "servant-support" - , "test-unit" - , "undefinable" - , "uuid" - , "newtype" - , "web-socket" - ] -, packages = ./packages.dhall -, sources = - [ "src/**/*.purs" - , "test/**/*.purs" - , "generated/**/*.purs" - , "web-common/**/*.purs" - , "web-common-plutus/**/*.purs" - ] -} diff --git a/plutus-pab-client/src/Main.purs b/plutus-pab-client/src/Main.purs deleted file mode 100644 index 4c16d34f21..0000000000 --- a/plutus-pab-client/src/Main.purs +++ /dev/null @@ -1,39 +0,0 @@ -module Main where - -import Prelude -import Control.Coroutine (consumer) -import Data.Maybe (Maybe(Nothing)) -import Effect (Effect) -import Effect.Aff (forkAff) -import Effect.Unsafe (unsafePerformEffect) -import Halogen.Aff (awaitBody, runHalogenAff) -import Halogen.VDom.Driver (runUI) -import MainFrame (initialMainFrame) -import Plutus.PAB.Webserver.Types (CombinedWSStreamToClient, CombinedWSStreamToServer) -import Types (HAction(..), Query(..), Output(..)) -import WebSocket.Support (WebSocketManager, mkWebSocketManager) -import WebSocket.Support as WS - -main :: Effect Unit -main = do - runHalogenAff do - body <- awaitBody - driver <- runUI initialMainFrame Init body - -- - wsManager :: WebSocketManager CombinedWSStreamToClient CombinedWSStreamToServer <- - mkWebSocketManager - void - $ forkAff - $ WS.runWebSocketManager - (WS.URI "/ws") - (\msg -> void $ driver.query $ ReceiveWebSocketMessage msg unit) - wsManager - driver.subscribe - $ consumer - $ case _ of - (SendWebSocketMessage msg) -> do - WS.managerWriteOutbound wsManager $ WS.SendMessage msg - pure Nothing - -onLoad :: Unit -onLoad = unsafePerformEffect main diff --git a/plutus-pab-client/src/MainFrame.purs b/plutus-pab-client/src/MainFrame.purs deleted file mode 100644 index 6d655addb5..0000000000 --- a/plutus-pab-client/src/MainFrame.purs +++ /dev/null @@ -1,294 +0,0 @@ -module MainFrame - ( initialMainFrame - , handleQuery - , handleAction - , initialState - ) where - -import Prelude hiding (div) -import Animation (class MonadAnimate, animate) -import Chain.State (handleAction) as Chain -import Chain.Types (Action(FocusTx), AnnotatedBlockchain(..), _chainFocusAppearing) -import Chain.Types (initialState) as Chain -import Clipboard (class MonadClipboard) -import Clipboard as Clipboard -import Control.Monad.Reader (runReaderT) -import Control.Monad.State (class MonadState) -import Control.Monad.State.Extra (zoomStateT) -import Data.Array (filter, find) -import Data.BigInteger as BigInteger -import Data.Either (Either(..)) -import Data.Lens (Lens', _1, _2, assign, modifying, to, use, view, preview) -import Data.Lens.At (at) -import Data.Lens.Extra (peruse, toSetOf) -import Data.Lens.Index (ix) -import Data.Map as Map -import Data.Maybe (Maybe(..), maybe) -import Data.RawJson (RawJson(..)) -import Data.Set (Set) -import Data.Set as Set -import Data.Traversable (for_, sequence, traverse_) -import Data.Tuple (Tuple(..)) -import Data.Tuple.Nested ((/\)) -import Effect.Aff.Class (class MonadAff) -import Foreign.Generic (encodeJSON) -import Halogen (Component, hoist) -import Halogen as H -import Halogen.HTML (HTML) -import Ledger.Extra (adaToValue) -import MonadApp (class MonadApp, activateContract, getFullReport, invokeEndpoint, runHalogenApp, getContractDefinitions, getContractInstances, getContractInstanceStatus) -import Network.RemoteData (RemoteData(..)) -import Network.RemoteData as RemoteData -import Network.StreamData as Stream -import Playground.Lenses (_endpointDescription, _schema) -import Playground.Types (FunctionSchema(..), _FunctionSchema) -import Plutus.Contract.Effects (ActiveEndpoint) -import Plutus.PAB.Events.ContractInstanceState (PartiallyDecodedResponse) -import Plutus.PAB.Webserver (SPParams_(..)) -import Plutus.PAB.Webserver.Types (ContractInstanceClientState(..), ContractSignatureResponse(..), CombinedWSStreamToClient, ContractActivationArgs(..)) -import Plutus.V1.Ledger.Ada (Ada(..)) -import Plutus.V1.Ledger.Value (Value) -import Prim.TypeError (class Warn, Text) -import Schema (FormSchema) -import Schema.Types (formArgumentToJson, toArgument) -import Schema.Types as Schema -import Servant.PureScript.Settings (SPSettings_, defaultSettings) -import Types (HAction(..), Output, Query(..), State(..), StreamError(..), View(..), WebSocketStatus(..), ContractSignatures(..), EndpointForm, WebStreamData, _webSocketMessage, _webSocketStatus, _annotatedBlockchain, _chainReport, _chainState, _contractActiveEndpoints, _contractSignatures, _contractStates, _currentView, _csContract, _csCurrentState, fromWebData) -import Validation (_argument) -import View as View -import Wallet.Emulator.Wallet (Wallet(..)) -import Wallet.Types (EndpointDescription) -import WebSocket.Support (FromSocket) -import WebSocket.Support as WS -import ContractExample (ExampleContracts) - --- | The PAB has been completely rewritten, and the PAB client will soon follow. The immediate --- priority is the new Marlowe dashboard, however, so in the meantime large chunks of the PAB --- client are commented out just so that it compiles. -initialValue :: Value -initialValue = adaToValue $ Lovelace { getLovelace: zero } - -initialState :: State ExampleContracts -initialState = - State - { currentView: ActiveContracts - , contractSignatures: Stream.NotAsked - , chainReport: NotAsked - , chainState: Chain.initialState - , contractStates: Map.empty - , webSocketMessage: Stream.NotAsked - , webSocketStatus: WebSocketClosed Nothing - } - ------------------------------------------------------------- -ajaxSettings :: SPSettings_ SPParams_ -ajaxSettings = defaultSettings $ SPParams_ { baseURL: "/" } - -initialMainFrame :: - forall m. - MonadAff m => - MonadClipboard m => - Component HTML Query (HAction ExampleContracts) Output m -initialMainFrame = - hoist (flip runReaderT ajaxSettings) - $ H.mkComponent - { initialState: const initialState - , render: View.render - , eval: - H.mkEval - { handleAction: runHalogenApp <<< handleAction - , handleQuery: runHalogenApp <<< handleQuery - , initialize: Just Init - , receive: const Nothing - , finalize: Nothing - } - } - -handleQuery :: - forall m a. - MonadState (State ExampleContracts) m => - MonadApp m => - Query a -> m (Maybe a) -handleQuery (ReceiveWebSocketMessage msg next) = do - handleMessageFromSocket msg - pure $ Just next - -handleMessageFromSocket :: - forall m. - MonadState (State ExampleContracts) m => - MonadApp m => - FromSocket CombinedWSStreamToClient -> m Unit -handleMessageFromSocket WS.WebSocketOpen = do - assign _webSocketStatus WebSocketOpen - -handleMessageFromSocket (WS.ReceiveMessage (Right msg)) = pure unit - ---case msg of ---NewChainReport report -> assign _chainReport (Success report) ---NewContractReport report -> do --- assign _contractSignatures (Stream.Success (view _crAvailableContracts report)) --- traverse_ updateFormsForContractInstance --- (view _crActiveContractStates report) ---NewChainEvents events -> assign _events (Success events) ---ErrorResponse err -> assign _webSocketMessage $ Stream.Failure $ ServerError err ---FetchedProperty subject property -> do --- log $ "Websocket fetch property: " <> show msg --- modifying _metadata (upsertProperty subject property) ---FetchedProperties (SubjectProperties subject properties) -> do --- log $ "Websocket fetch properties: " <> show msg --- modifying _metadata (\m -> foldr (upsertProperty subject) m properties) -handleMessageFromSocket (WS.ReceiveMessage (Left err)) = assign _webSocketMessage $ Stream.Failure $ DecodingError err - -handleMessageFromSocket (WS.WebSocketClosed closeEvent) = do - assign _webSocketStatus (WebSocketClosed (Just closeEvent)) - -handleAction :: - forall m. - MonadApp m => - MonadAnimate m (State ExampleContracts) => - MonadClipboard m => - MonadState (State ExampleContracts) m => - (HAction ExampleContracts) -> m Unit -handleAction Init = handleAction LoadFullReport - -handleAction (ChangeView view) = do - assign _currentView view - -handleAction (ActivateContract contract) = do - modifying _contractSignatures Stream.refreshing - -- activate on default wallet - contractInstanceId <- activateContract $ ContractActivationArgs { caID: contract, caWallet: Nothing } - for_ (preview RemoteData._Success contractInstanceId) - $ \cid -> do - clientState <- map fromWebData $ getContractInstanceStatus cid - contractSignatures :: WebStreamData (ContractSignatures ExampleContracts) <- use _contractSignatures - let - loadFormFromClientState cs = - let - newForms = sequence $ createNewEndpointForms <$> contractSignatures <*> pure cs - in - cs /\ maybe [] (view Stream._Refreshing) newForms - modifying _contractStates $ (<>) $ Map.singleton cid $ map loadFormFromClientState clientState - traverse_ updateFormsForContractInstance clientState - modifying _contractSignatures Stream.refreshed - -handleAction LoadFullReport = do - assignFullReportData Loading - contractdefs <- getContractDefinitions - assign _contractSignatures (map (\a -> ContractSignatures { unContractSignatures: a }) $ fromWebData contractdefs) - contractInstances <- view (RemoteData._Success) <$> getContractInstances (Just "active") - traverse_ updateFormsForContractInstance contractInstances - fullReportResult <- getFullReport - assignFullReportData fullReportResult - where - assignFullReportData value = do - assign _chainReport (view _chainReport <$> value) - --- assign _events (view _events <$> value) -handleAction (ChainAction subaction) = do - mAnnotatedBlockchain <- - peruse (_chainReport <<< RemoteData._Success <<< _annotatedBlockchain <<< to AnnotatedBlockchain) - let - wrapper :: - Warn (Text "The question, 'Should we animate this?' feels like it belongs in the Chain module. Not here.") => - m Unit -> m Unit - wrapper = case subaction of - (FocusTx _) -> animate (_chainState <<< _chainFocusAppearing :: Lens' (State ExampleContracts) Boolean) - _ -> identity - wrapper - $ zoomStateT _chainState - $ Chain.handleAction subaction mAnnotatedBlockchain - -handleAction (ClipboardAction subaction) = Clipboard.handleAction subaction - -handleAction (ChangeContractEndpointCall contractInstanceId endpointIndex subaction) = do - modifying - ( _contractStates - <<< ix contractInstanceId - <<< Stream._Success - <<< _2 - <<< ix endpointIndex - <<< _argument - ) - (Schema.handleFormEvent initialValue subaction) - -handleAction (InvokeContractEndpoint contractInstanceId endpointForm) = do - let - endpointDescription :: EndpointDescription - endpointDescription = view (_schema <<< _FunctionSchema <<< _endpointDescription) endpointForm - - mEncodedForm :: Maybe RawJson - mEncodedForm = RawJson <<< encodeJSON <$> formArgumentToJson (view _argument endpointForm) - for_ mEncodedForm - $ \encodedForm -> do - assign (_contractStates <<< at contractInstanceId) (Just Stream.Loading) - invokeEndpoint encodedForm contractInstanceId endpointDescription - -updateFormsForContractInstance :: - forall m. - MonadState (State ExampleContracts) m => - ContractInstanceClientState ExampleContracts -> m Unit -updateFormsForContractInstance newContractInstance = do - let - csContractId = view _csContract newContractInstance - oldContractInstance :: Maybe (PartiallyDecodedResponse ActiveEndpoint) <- - peruse - ( _contractStates - <<< ix csContractId - <<< Stream._Success - <<< _1 - <<< _csCurrentState - ) - when (oldContractInstance /= Just (view _csCurrentState newContractInstance)) do - contractSignatures :: WebStreamData (ContractSignatures ExampleContracts) <- use _contractSignatures - let - newForms :: Maybe (WebStreamData (Array EndpointForm)) - newForms = sequence $ createNewEndpointForms <$> contractSignatures <*> pure newContractInstance - assign (_contractStates <<< at csContractId) - (map (Tuple newContractInstance) <$> newForms) - -createNewEndpointForms :: - ContractSignatures ExampleContracts -> - ContractInstanceClientState ExampleContracts -> - Maybe (Array EndpointForm) -createNewEndpointForms contractSignatures instanceState = createEndpointForms instanceState <$> matchingSignature - where - matchingSignature :: Maybe (ContractSignatureResponse ExampleContracts) - matchingSignature = getMatchingSignature instanceState contractSignatures - -createEndpointForms :: - forall t. - ContractInstanceClientState t -> - ContractSignatureResponse t -> - Array EndpointForm -createEndpointForms contractState = signatureToForms - where - activeEndpoints :: Set EndpointDescription - activeEndpoints = - toSetOf - ( _csCurrentState - <<< _contractActiveEndpoints - ) - contractState - - isActive :: FunctionSchema FormSchema -> Boolean - isActive (FunctionSchema { endpointDescription }) = Set.member endpointDescription activeEndpoints - - signatureToForms :: ContractSignatureResponse t -> Array EndpointForm - signatureToForms (ContractSignatureResponse { csrSchemas }) = signatureToForm <$> filter isActive csrSchemas - - signatureToForm :: FunctionSchema FormSchema -> EndpointForm - signatureToForm schema = - { argument: toArgument initialValue $ view (_FunctionSchema <<< _argument) schema - , schema - } - -getMatchingSignature :: - forall a. - Eq a => - ContractInstanceClientState a -> - ContractSignatures a -> - Maybe (ContractSignatureResponse a) -getMatchingSignature (ContractInstanceClientState { cicDefinition }) (ContractSignatures { unContractSignatures }) = find isMatch unContractSignatures - where - isMatch (ContractSignatureResponse { csrDefinition }) = csrDefinition == cicDefinition diff --git a/plutus-pab-client/src/MonadApp.purs b/plutus-pab-client/src/MonadApp.purs deleted file mode 100644 index c572e47cfb..0000000000 --- a/plutus-pab-client/src/MonadApp.purs +++ /dev/null @@ -1,133 +0,0 @@ -module MonadApp where - -import Prelude -import Types (HAction, Output(..), State, WebData, _contractInstanceIdString) -import Affjax (Request, Response, defaultRequest) -import Affjax.RequestBody (string) -import Animation (class MonadAnimate, animate) -import Clipboard (class MonadClipboard, copy) -import Control.Monad.Error.Class (class MonadError) -import Control.Monad.Except (ExceptT, runExceptT) -import Control.Monad.Reader.Class (class MonadAsk) -import Control.Monad.State.Class (class MonadState) -import Control.Monad.Trans.Class (class MonadTrans) -import Data.HTTP.Method (fromString) -import Data.Lens (Lens', view) -import Data.Lens.Record (prop) -import Data.Maybe (Maybe(..)) -import Data.Newtype (class Newtype, unwrap) -import Data.RawJson (RawJson(..)) -import Data.Symbol (SProxy(..)) -import Effect.Aff.Class (class MonadAff) -import Effect.Class (class MonadEffect) -import Effect.Console as Console -import Foreign.Class (class Decode, decode) -import Halogen (HalogenM, liftEffect, raise) -import Network.RemoteData as RemoteData -import Playground.Lenses (_getEndpointDescription) -import Plutus.PAB.Webserver (SPParams_, getApiFullreport, getApiContractInstances, getApiContractDefinitions, postApiContractActivate) -import Plutus.PAB.Webserver.Types (ContractInstanceClientState, ContractSignatureResponse, FullReport, CombinedWSStreamToServer, ContractActivationArgs) -import Servant.PureScript.Ajax (AjaxError, ajax) -import Servant.PureScript.Settings (SPSettings_) -import Wallet.Types (EndpointDescription, ContractInstanceId) -import ContractExample (ExampleContracts) - -class - Monad m <= MonadApp m where - getFullReport :: m (WebData (FullReport ExampleContracts)) - getContractInstanceStatus :: ContractInstanceId -> m (WebData (ContractInstanceClientState ExampleContracts)) - getContractInstances :: Maybe String -> m (WebData (Array (ContractInstanceClientState ExampleContracts))) - getContractDefinitions :: m (WebData (Array (ContractSignatureResponse ExampleContracts))) - invokeEndpoint :: RawJson -> ContractInstanceId -> EndpointDescription -> m (WebData Unit) - activateContract :: ContractActivationArgs ExampleContracts -> m (WebData ContractInstanceId) - sendWebSocketMessage :: CombinedWSStreamToServer -> m Unit - log :: String -> m Unit - -newtype HalogenApp m a - = HalogenApp (HalogenM (State ExampleContracts) (HAction ExampleContracts) () Output m a) - -derive instance newtypeHalogenApp :: Newtype (HalogenApp m a) _ - -derive newtype instance functorHalogenApp :: Functor (HalogenApp m) - -derive newtype instance applicativeHalogenApp :: Applicative (HalogenApp m) - -derive newtype instance applyHalogenApp :: Apply (HalogenApp m) - -derive newtype instance bindHalogenApp :: Bind (HalogenApp m) - -derive newtype instance monadHalogenApp :: Monad (HalogenApp m) - -derive newtype instance monadTransHalogenApp :: MonadTrans HalogenApp - -derive newtype instance monadStateHalogenApp :: MonadState (State ExampleContracts) (HalogenApp m) - -derive newtype instance monadAskHalogenApp :: MonadAsk env m => MonadAsk env (HalogenApp m) - -derive newtype instance monadEffectHalogenApp :: MonadEffect m => MonadEffect (HalogenApp m) - -derive newtype instance monadAffHalogenApp :: MonadAff m => MonadAff (HalogenApp m) - -instance monadAnimateHalogenApp :: MonadAff m => MonadAnimate (HalogenApp m) (State ExampleContracts) where - animate toggle action = HalogenApp $ animate toggle (unwrap action) - -instance monadClipboardHalogenApp :: MonadEffect m => MonadClipboard (HalogenApp m) where - copy = liftEffect <<< copy - ------------------------------------------------------------- -runHalogenApp :: forall m a. HalogenApp m a -> HalogenM (State ExampleContracts) (HAction ExampleContracts) () Output m a -runHalogenApp = unwrap - -instance monadAppHalogenApp :: (MonadAff m, MonadAsk (SPSettings_ SPParams_) m) => MonadApp (HalogenApp m) where - getFullReport = runAjax getApiFullreport - getContractInstanceStatus contractInstanceId = - runAjax - $ getApiContractInstanceByContractinstanceidStatus - contractInstanceId - getContractInstances s = runAjax (getApiContractInstances $ Just s) - getContractDefinitions = runAjax getApiContractDefinitions - invokeEndpoint payload contractInstanceId endpointDescription = - runAjax - $ postApiContractInstanceByContractinstanceidEndpointByEndpointname - payload - (view _contractInstanceIdString contractInstanceId) - (view _getEndpointDescription endpointDescription) - activateContract contract = runAjax $ postApiContractActivate contract - sendWebSocketMessage msg = HalogenApp $ raise $ SendWebSocketMessage msg - log str = liftEffect $ Console.log str - -runAjax :: forall m a. Functor m => ExceptT AjaxError m a -> m (WebData a) -runAjax action = RemoteData.fromEither <$> runExceptT action - -getApiContractInstanceByContractinstanceidStatus :: forall m. MonadError AjaxError m => MonadAff m => ContractInstanceId -> m (ContractInstanceClientState ExampleContracts) -getApiContractInstanceByContractinstanceidStatus contractInstanceId = do - r <- - ajax decode - $ defaultRequest - { method = fromString "GET" - , url = "/api/contract/instance/" <> view _contractInstanceIdString contractInstanceId <> "/status" - , headers = defaultRequest.headers - } - pure r.body - --- Not using the generated purescript function to avoid double encoding of RawJson which results always as a JSON String -postApiContractInstanceByContractinstanceidEndpointByEndpointname :: forall m. MonadError AjaxError m => MonadAff m => RawJson -> String -> String -> m Unit -postApiContractInstanceByContractinstanceidEndpointByEndpointname (RawJson jsonString) contractInstanceId endpoint = - perform - $ defaultRequest - { method = fromString "POST" - , url = "/api/contract/instance/" <> contractInstanceId <> "/endpoint/" <> endpoint - , headers = defaultRequest.headers - , content = Just $ string jsonString - } - -perform :: - forall m d. - MonadError AjaxError m => - MonadAff m => - Decode d => - Request Unit -> m d -perform request = map (view _body) (ajax decode request) - where - _body :: forall a. Lens' (Response a) a - _body = prop (SProxy :: SProxy "body") diff --git a/plutus-pab-client/src/Network/StreamData.purs b/plutus-pab-client/src/Network/StreamData.purs deleted file mode 100644 index c5084e7eaa..0000000000 --- a/plutus-pab-client/src/Network/StreamData.purs +++ /dev/null @@ -1,205 +0,0 @@ -module Network.StreamData where - -import Prelude -import Control.Monad.Error.Class (class MonadError, class MonadThrow) -import Data.Bifunctor (class Bifunctor) -import Data.Bitraversable (class Bifoldable, class Bitraversable, bifoldlDefault, bifoldrDefault, bisequenceDefault) -import Data.Either (Either(..)) -import Data.Generic.Rep (class Generic) -import Data.Lens (Prism', prism) -import Data.Traversable (class Foldable, class Traversable, foldlDefault, foldrDefault, sequenceDefault) -import Network.RemoteData (RemoteData) -import Network.RemoteData as Remote - -data StreamData e a - = NotAsked - | Loading - | Failure e - | Success a - | Refreshing a - -derive instance genericStreamData :: Generic (StreamData e a) _ - -derive instance eqStreamData :: (Eq e, Eq a) => Eq (StreamData e a) - -derive instance functorStreamData :: Functor (StreamData e) - -instance showStreamData :: (Show e, Show a) => Show (StreamData e a) where - show NotAsked = "StreamData.NotAsked" - show Loading = "StreamData.Loading" - show (Failure err) = "StreamData.Failure " <> show err - show (Success value) = "StreamData.Success " <> show value - show (Refreshing value) = "StreamData.Refreshing " <> show value - --- | Maps functions to the `Failure` and `Success` values. -instance bifunctorStreamData :: Bifunctor StreamData where - bimap _ _ NotAsked = NotAsked - bimap _ _ Loading = Loading - bimap f _ (Failure err) = Failure (f err) - bimap _ g (Success value) = Success (g value) - bimap _ g (Refreshing value) = Refreshing (g value) - --- | If both values are `Success`, the result is `Success`. --- | If one is `Success` and the other is `Refreshing`, the result is `Refreshing`. --- | If both are `Refreshing`, the result is `Refreshing`. --- | If both are `Failure`, the first failure is returned. -instance applyStreamData :: Apply (StreamData e) where - apply (Success f) (Success value) = Success (f value) - apply (Refreshing f) (Success value) = Refreshing (f value) - apply (Success f) (Refreshing value) = Refreshing (f value) - apply (Refreshing f) (Refreshing value) = Refreshing (f value) - apply (Failure err) _ = Failure err - apply _ (Failure err) = Failure err - apply NotAsked _ = NotAsked - apply _ NotAsked = NotAsked - apply Loading _ = Loading - apply _ Loading = Loading - -instance bindStreamData :: Bind (StreamData e) where - bind NotAsked _ = NotAsked - bind Loading _ = Loading - bind (Failure err) _ = (Failure err) - bind (Success value) f = f value - bind (Refreshing value) f = f value - -instance applicativeStreamData :: Applicative (StreamData e) where - pure value = Success value - -instance monadStreamData :: Monad (StreamData e) - -instance monadThrowStreamData :: MonadThrow e (StreamData e) where - throwError = Failure - -instance monadErrorStreamData :: MonadError e (StreamData e) where - catchError (Failure e) f = f e - catchError (Success value) _ = Success value - catchError (Refreshing value) _ = Refreshing value - catchError NotAsked _ = NotAsked - catchError Loading _ = Loading - -instance foldableStreamData :: Foldable (StreamData e) where - foldMap f (Success a) = f a - foldMap f (Refreshing a) = f a - foldMap _ (Failure e) = mempty - foldMap _ NotAsked = mempty - foldMap _ Loading = mempty - foldr f = foldrDefault f - foldl f = foldlDefault f - -instance traversableStreamData :: Traversable (StreamData e) where - traverse f (Success a) = Success <$> f a - traverse f (Refreshing a) = Refreshing <$> f a - traverse f (Failure e) = pure (Failure e) - traverse _ NotAsked = pure NotAsked - traverse _ Loading = pure Loading - sequence = sequenceDefault - -instance bifoldableStreamData :: Bifoldable StreamData where - bifoldMap _ f (Success a) = f a - bifoldMap _ f (Refreshing a) = f a - bifoldMap f _ (Failure e) = f e - bifoldMap _ _ Loading = mempty - bifoldMap _ _ NotAsked = mempty - bifoldr f = bifoldrDefault f - bifoldl f = bifoldlDefault f - -instance bitraversableStreamData :: Bitraversable StreamData where - bitraverse _ f (Success a) = Success <$> f a - bitraverse _ f (Refreshing a) = Refreshing <$> f a - bitraverse f _ (Failure e) = Failure <$> f e - bitraverse _ _ NotAsked = pure NotAsked - bitraverse _ _ Loading = pure Loading - bisequence = bisequenceDefault - ------------------------------------------------------------- --- | Convert an `Either` to `StreamData` -fromEither :: forall e a. Either e a -> StreamData e a -fromEither (Left err) = Failure err - -fromEither (Right value) = Success value - --- | Modifies any `Success a` to be `Refreshing a`. -refreshing :: forall e a. StreamData e a -> StreamData e a -refreshing (Success a) = Refreshing a - -refreshing NotAsked = Loading - -refreshing other = other - --- | Modifies any `Refreshing a` to be a `Success a`. -refreshed :: forall e a. StreamData e a -> StreamData e a -refreshed (Refreshing a) = Success a - -refreshed other = other - ------------------------------------------------------------- --- Prisms & Lenses (oh my!) -_NotAsked :: forall a e. Prism' (StreamData e a) Unit -_NotAsked = prism (const NotAsked) unwrap - where - unwrap NotAsked = Right unit - - unwrap y = Left y - -_Loading :: forall a e. Prism' (StreamData e a) Unit -_Loading = prism (const Loading) unwrap - where - unwrap Loading = Right unit - - unwrap y = Left y - -_Failure :: forall a e. Prism' (StreamData e a) e -_Failure = prism Failure unwrap - where - unwrap (Failure x) = Right x - - unwrap y = Left y - -_Refreshing :: forall a e. Prism' (StreamData e a) a -_Refreshing = prism Refreshing unwrap - where - unwrap (Refreshing x) = Right x - - unwrap y = Left y - -_Success :: forall a e. Prism' (StreamData e a) a -_Success = prism Success unwrap - where - unwrap (Success x) = Right x - - unwrap y = Left y - ------------------------------------------------------------- -fromRemoteData :: forall e a. RemoteData e a -> StreamData e a -fromRemoteData (Remote.Success a) = Success a - -fromRemoteData (Remote.Failure e) = Failure e - -fromRemoteData Remote.Loading = Loading - -fromRemoteData Remote.NotAsked = NotAsked - -toRemoteData :: forall e a. StreamData e a -> RemoteData e a -toRemoteData (Success a) = Remote.Success a - -toRemoteData (Refreshing a) = Remote.Success a - -toRemoteData (Failure e) = Remote.Failure e - -toRemoteData Loading = Remote.Loading - -toRemoteData NotAsked = Remote.NotAsked - -isAvailable :: forall e a. StreamData e a -> Boolean -isAvailable (Success _) = true - -isAvailable (Refreshing _) = true - -isAvailable _ = false - -isExpected :: forall e a. StreamData e a -> Boolean -isExpected (Refreshing _) = true - -isExpected Loading = true - -isExpected _ = false diff --git a/plutus-pab-client/src/Types.purs b/plutus-pab-client/src/Types.purs deleted file mode 100644 index 46c8cab493..0000000000 --- a/plutus-pab-client/src/Types.purs +++ /dev/null @@ -1,219 +0,0 @@ -module Types where - -import Prelude -import Chain.Types as Chain -import Clipboard as Clipboard -import Control.Monad.Gen as Gen -import Data.Bifunctor (lmap) -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Json.JsonUUID (JsonUUID, _JsonUUID) -import Data.Json.JsonTuple (JsonTuple) -import Data.Lens (Getter', Iso', Traversal', Lens', to, traversed) -import Data.Lens.Iso.Newtype (_Newtype) -import Data.Lens.Record (prop) -import Data.Map (Map) -import Data.Maybe (Maybe(..)) -import Data.Newtype (class Newtype) -import Data.NonEmpty ((:|)) -import Data.Symbol (SProxy(..)) -import Data.Tuple.Nested (type (/\)) -import Data.UUID as UUID -import Foreign (MultipleErrors) -import Plutus.Contract.Resumable (Request) -import Ledger.Index (UtxoIndex) -import Plutus.V1.Ledger.Tx (Tx) -import Plutus.V1.Ledger.TxId (TxId) -import Network.RemoteData (RemoteData) -import Network.StreamData (StreamData) -import Network.StreamData as Stream -import Playground.Types (FunctionSchema) -import Plutus.Contract.Effects (PABReq, ActiveEndpoint, _ExposeEndpointReq) -import Plutus.PAB.Events.ContractInstanceState (PartiallyDecodedResponse) -import Plutus.PAB.Webserver.Types (ChainReport, ContractReport, ContractInstanceClientState, ContractSignatureResponse, _ChainReport, _ContractReport, _ContractInstanceClientState, _ContractSignatureResponse, CombinedWSStreamToClient, CombinedWSStreamToServer) -import Schema (FormSchema) -import Schema.Types (FormArgument, FormEvent) -import Servant.PureScript.Ajax (AjaxError) -import Test.QuickCheck (class Arbitrary) -import Wallet.Rollup.Types (AnnotatedTx) -import Wallet.Types (ContractInstanceId, EndpointDescription) -import Web.Socket.Event.CloseEvent (CloseEvent, reason) as WS -import WebSocket.Support (FromSocket) as WS -import ContractExample (ExampleContracts) - -data Query a - = ReceiveWebSocketMessage (WS.FromSocket CombinedWSStreamToClient) a - -data Output - = SendWebSocketMessage CombinedWSStreamToServer - -data StreamError - = DecodingError MultipleErrors - | ServerError String - | TransportError AjaxError - -type WebStreamData - = StreamData StreamError - -type WebData - = RemoteData AjaxError - -fromWebData :: forall a. WebData a -> WebStreamData a -fromWebData = Stream.fromRemoteData <<< lmap TransportError - -data HAction a - = Init - | ChangeView View - | LoadFullReport - | ActivateContract a - | ChainAction Chain.Action - | ClipboardAction Clipboard.Action - | ChangeContractEndpointCall ContractInstanceId Int FormEvent - | InvokeContractEndpoint ContractInstanceId EndpointForm - -type ContractStates - = Map ContractInstanceId (WebStreamData (ContractInstanceClientState ExampleContracts /\ Array EndpointForm)) - -newtype ContractSignatures a - = ContractSignatures - { unContractSignatures :: Array (ContractSignatureResponse a) - } - -derive instance genericContractSignatures :: Generic (ContractSignatures a) _ - -derive instance newtypeContractSignatures :: Newtype (ContractSignatures a) _ - -_ContractSignatures :: forall a. Iso' (ContractSignatures a) { unContractSignatures :: Array (ContractSignatureResponse a) } -_ContractSignatures = _Newtype - -data WebSocketStatus - = WebSocketOpen - | WebSocketClosed (Maybe WS.CloseEvent) - -derive instance genericWebSocketStatus :: Generic WebSocketStatus _ - -instance showWebSocketStatus :: Show WebSocketStatus where - show WebSocketOpen = "WebSocketOpen" - show (WebSocketClosed Nothing) = "WebSocketClosed" - show (WebSocketClosed (Just closeEvent)) = "WebSocketClosed " <> WS.reason closeEvent - -newtype State a - = State - { currentView :: View - , contractSignatures :: WebStreamData (ContractSignatures a) - , chainReport :: WebData ChainReport - , chainState :: Chain.State - , contractStates :: ContractStates - , webSocketMessage :: WebStreamData CombinedWSStreamToClient - , webSocketStatus :: WebSocketStatus - } - -type EndpointForm - = { schema :: FunctionSchema FormSchema - , argument :: FormArgument - } - -derive instance newtypeState :: Newtype (State a) _ - -derive instance genericState :: Generic (State a) _ - -_currentView :: forall a. Lens' (State a) View -_currentView = _Newtype <<< prop (SProxy :: SProxy "currentView") - -_contractSignatures :: forall s r a. Newtype s { contractSignatures :: a | r } => Lens' s a -_contractSignatures = _Newtype <<< prop (SProxy :: SProxy "contractSignatures") - -_chainReport :: forall s r a. Newtype s { chainReport :: a | r } => Lens' s a -_chainReport = _Newtype <<< prop (SProxy :: SProxy "chainReport") - -_events :: forall s r a. Newtype s { events :: a | r } => Lens' s a -_events = _Newtype <<< prop (SProxy :: SProxy "events") - -_chainState :: forall a. Lens' (State a) Chain.State -_chainState = _Newtype <<< prop (SProxy :: SProxy "chainState") - -_contractStates :: forall a. Lens' (State a) ContractStates -_contractStates = _Newtype <<< prop (SProxy :: SProxy "contractStates") - -_annotatedBlockchain :: Lens' ChainReport (Array (Array AnnotatedTx)) -_annotatedBlockchain = _ChainReport <<< prop (SProxy :: SProxy "annotatedBlockchain") - -_transactionMap :: Lens' ChainReport (Map TxId Tx) -_transactionMap = _ChainReport <<< prop (SProxy :: SProxy "transactionMap") - -_webSocketMessage :: forall s a r. Newtype s { webSocketMessage :: a | r } => Lens' s a -_webSocketMessage = _Newtype <<< prop (SProxy :: SProxy "webSocketMessage") - -_webSocketStatus :: forall s a r. Newtype s { webSocketStatus :: a | r } => Lens' s a -_webSocketStatus = _Newtype <<< prop (SProxy :: SProxy "webSocketStatus") - -_contractReport :: forall s a r. Newtype s { contractReport :: a | r } => Lens' s a -_contractReport = _Newtype <<< prop (SProxy :: SProxy "contractReport") - -_utxoIndex :: Lens' ChainReport UtxoIndex -_utxoIndex = _ChainReport <<< prop (SProxy :: SProxy "utxoIndex") - -_crAvailableContracts :: forall t. Lens' (ContractReport t) (Array (ContractSignatureResponse t)) -_crAvailableContracts = _ContractReport <<< prop (SProxy :: SProxy "crAvailableContracts") - -_crActiveContractStates :: forall t. Lens' (ContractReport t) (Array (JsonTuple ContractInstanceId (PartiallyDecodedResponse PABReq))) -_crActiveContractStates = _ContractReport <<< prop (SProxy :: SProxy "crActiveContractStates") - -_csrDefinition :: forall t. Lens' (ContractSignatureResponse t) t -_csrDefinition = _ContractSignatureResponse <<< prop (SProxy :: SProxy "csrDefinition") - -_unContractSignatures :: forall t. Lens' (ContractSignatures t) (Array (ContractSignatureResponse t)) -_unContractSignatures = _ContractSignatures <<< prop (SProxy :: SProxy "unContractSignatures") - -_csContract :: forall t. Lens' (ContractInstanceClientState t) ContractInstanceId -_csContract = _Newtype <<< prop (SProxy :: SProxy "cicContract") - -_csCurrentState :: forall t. Lens' (ContractInstanceClientState t) (PartiallyDecodedResponse ActiveEndpoint) -_csCurrentState = _Newtype <<< prop (SProxy :: SProxy "cicCurrentState") - -_csContractDefinition :: forall t. Lens' (ContractInstanceClientState t) t -_csContractDefinition = _ContractInstanceClientState <<< prop (SProxy :: SProxy "cicDefinition") - -_hooks :: forall t. Lens' (PartiallyDecodedResponse t) (Array (Request t)) -_hooks = _Newtype <<< prop (SProxy :: SProxy "hooks") - -_activeEndpoint :: Lens' ActiveEndpoint EndpointDescription -_activeEndpoint = _Newtype <<< prop (SProxy :: SProxy "aeDescription") - -_contractActiveEndpoints :: Traversal' (PartiallyDecodedResponse ActiveEndpoint) EndpointDescription -_contractActiveEndpoints = - _hooks - <<< traversed - <<< _rqRequest - <<< _activeEndpoint - -_rqRequest :: forall t. Lens' (Request t) t -_rqRequest = _Newtype <<< prop (SProxy :: SProxy "rqRequest") - -_contractInstanceId :: Lens' ContractInstanceId JsonUUID -_contractInstanceId = _Newtype <<< prop (SProxy :: SProxy "unContractInstanceId") - -_contractInstanceIdString :: Getter' ContractInstanceId String -_contractInstanceIdString = _contractInstanceId <<< _JsonUUID <<< to UUID.toString - ------------------------------------------------------------- -data View - = ActiveContracts - | Blockchain - | EventLog - -derive instance eqView :: Eq View - -derive instance genericView :: Generic View _ - -instance arbitraryView :: Arbitrary View where - arbitrary = Gen.elements (ActiveContracts :| [ Blockchain, EventLog ]) - -instance showView :: Show View where - show = genericShow - ------------------------------------------------------------- -_getPubKeyHash :: forall s r a. Newtype s { getPubKeyHash :: a | r } => Lens' s a -_getPubKeyHash = _Newtype <<< prop (SProxy :: SProxy "getPubKeyHash") - -propertyName _ = Nothing diff --git a/plutus-pab-client/src/View.purs b/plutus-pab-client/src/View.purs deleted file mode 100644 index a8b00f69b5..0000000000 --- a/plutus-pab-client/src/View.purs +++ /dev/null @@ -1,163 +0,0 @@ -module View (render) where - -import Prelude hiding (div) -import Bootstrap (col12_, col5_, container_, row_) -import Chain.Types as Chain -import Data.Lens (traversed, view) -import Data.Lens.Extra (toArrayOf) -import Effect.Aff.Class (class MonadAff) -import Halogen.HTML (ClassName(..), ComponentHTML, HTML, div, div_, h1, text) -import Halogen.HTML.Properties (class_, classes) -import Icons (Icon(..), icon) -import NavTabs (mainTabBar, viewContainer) ---import Network.RemoteData as RemoteData -import Network.StreamData as Stream -import Plutus.PAB.Webserver.Types (ChainReport) -import Types (ContractSignatures, ContractStates, HAction(..), State(..), View(..), WebSocketStatus(..), WebStreamData, _csrDefinition, _utxoIndex, _unContractSignatures) -import View.Blockchain (annotatedBlockchainPane) -import View.Contracts (contractStatusesPane, installedContractsPane) -import View.Events (utxoIndexPane) ---import View.Events (eventsPane, utxoIndexPane) -import View.Utils (streamErrorPane, webDataPane, webStreamDataPane) - -render :: - forall m slots a. - MonadAff m => - Show a => - State a -> - ComponentHTML (HAction a) slots m -render (State { currentView, chainState, contractSignatures, chainReport, contractStates, webSocketStatus, webSocketMessage }) = - div - [ class_ $ ClassName "main-frame" ] - [ container_ - [ mainHeader - , mainTabBar ChangeView tabs currentView - , webSocketStatusIcon webSocketStatus - , div_ - $ case webSocketMessage of - Stream.Failure error -> [ streamErrorPane error ] - _ -> [] - , div_ - $ webDataPane (mainPane currentView contractStates chainState contractSignatures) chainReport - -- $ webDataPane2 (mainPane currentView contractStates chainState contractSignatures) chainReport events - ] - ] - -mainHeader :: forall p a. HTML p (HAction a) -mainHeader = - div_ - [ h1 - [ class_ $ ClassName "main-title" ] - [ text "Plutus Application Platform" ] - ] - -tabs :: Array { help :: String, link :: View, title :: String } -tabs = - [ { link: ActiveContracts - , title: "Contracts" - , help: "See available and active contracts." - } - {-, { link: Blockchain - , title: "Blockchain" - , help: "See the current state of the chain." - } - , { link: EventLog - , title: "Event Log" - , help: "View the history of system events." - }-} - ] - -webSocketStatusIcon :: forall p i. WebSocketStatus -> HTML p i -webSocketStatusIcon webSocketStatus = - div - [ classes - [ webSocketStatusClass - , webSocketStatusClass - <> ClassName - ( case webSocketStatus of - WebSocketOpen -> "-open" - (WebSocketClosed _) -> "-closed" - ) - ] - ] - [ icon - $ case webSocketStatus of - WebSocketOpen -> CheckCircle - (WebSocketClosed _) -> ExclamationCircle - ] - where - webSocketStatusClass = ClassName "web-socket-status" - -mainPane :: - forall p a. - Show a => - View -> - ContractStates -> - Chain.State -> - WebStreamData (ContractSignatures a) -> - ChainReport -> - --Array (ChainEvent ContractExe) -> - HTML p (HAction a) -mainPane currentView contractStates chainState contractSignatures chainReport {-events-} = - row_ - [ activeContractPane currentView contractSignatures contractStates - , blockchainPane currentView chainState chainReport - --, eventLogPane currentView events chainReport - ] - -activeContractPane :: - forall p a. - Show a => - View -> - WebStreamData (ContractSignatures a) -> - ContractStates -> - HTML p (HAction a) -activeContractPane currentView contractSignatures contractStates = - let - buttonsDisabled = Stream.isExpected contractSignatures - in - viewContainer currentView ActiveContracts - [ row_ - [ col12_ [ contractStatusesPane contractStates ] - , col12_ - ( webStreamDataPane - ( \x -> - installedContractsPane buttonsDisabled - ( ( toArrayOf - ( traversed - <<< _csrDefinition - ) - ) - (view _unContractSignatures x) - ) - ) - contractSignatures - ) - ] - ] - -blockchainPane :: - forall p a. - View -> - Chain.State -> - ChainReport -> HTML p (HAction a) -blockchainPane currentView chainState chainReport = - viewContainer currentView Blockchain - [ row_ - [ col12_ [ ChainAction <$> annotatedBlockchainPane chainState chainReport ] - ] - ] - -eventLogPane :: - forall p a. - View -> - --Array (ChainEvent ContractExe) -> - ChainReport -> - HTML p (HAction a) -eventLogPane currentView {-events-} chainReport = - viewContainer currentView EventLog - [ row_ - --[ col7_ [ eventsPane events ] - [ col5_ [ utxoIndexPane (view _utxoIndex chainReport) ] - ] - ] diff --git a/plutus-pab-client/src/View/Blockchain.purs b/plutus-pab-client/src/View/Blockchain.purs deleted file mode 100644 index 995a4fa2ad..0000000000 --- a/plutus-pab-client/src/View/Blockchain.purs +++ /dev/null @@ -1,23 +0,0 @@ -module View.Blockchain (annotatedBlockchainPane) where - -import Bootstrap (cardBody_, cardHeader_, card_) -import Chain.Types as Chain -import Chain.View (chainView) -import Data.Maybe (Maybe(Nothing)) -import Data.Newtype (wrap) -import Halogen.HTML (HTML, h2_, text) -import Plutus.V1.Ledger.Crypto (PubKeyHash(..)) -import Plutus.PAB.Webserver.Types (ChainReport(..)) - -annotatedBlockchainPane :: forall p. Chain.State -> ChainReport -> HTML p Chain.Action -annotatedBlockchainPane chainState (ChainReport { annotatedBlockchain }) = - card_ - [ cardHeader_ - [ h2_ [ text "Blockchain" ] - ] - , cardBody_ - [ chainView namingFn chainState (wrap annotatedBlockchain) - ] - ] - where - namingFn (PubKeyHash { getPubKeyHash: hash }) = Nothing diff --git a/plutus-pab-client/src/View/Contracts.purs b/plutus-pab-client/src/View/Contracts.purs deleted file mode 100644 index 2e9a57e890..0000000000 --- a/plutus-pab-client/src/View/Contracts.purs +++ /dev/null @@ -1,169 +0,0 @@ -module View.Contracts where - -import Prelude hiding (div) -import Bootstrap (btn, btnBlock, btnPrimary, btnSmall, cardBody_, cardFooter_, cardHeader_, card_, col10_, col2_, col4_, nbsp, row_, tableBordered) -import Bootstrap as Bootstrap -import Clipboard (showShortCopyLong) -import Data.Array (mapWithIndex, null) -import Data.Foldable.Extra (interleave) -import Data.Lens (_1, view) -import Data.Map as Map -import Data.Maybe (Maybe(..)) -import Data.Tuple (Tuple(..)) -import Data.Tuple.Nested (type (/\), (/\)) -import Halogen.HTML (ClassName(..), HTML, br_, button, div, div_, h2_, h3_, table, text, th, thead_, tr_, td_, tbody_) -import Halogen.HTML.Events (onClick) -import Halogen.HTML.Properties (class_, classes, colSpan, disabled) -import Icons (Icon(..), icon) -import Plutus.Contract.Resumable (IterationID(..), Request(..), RequestID(..)) -import Network.StreamData as Stream -import Playground.Lenses (_endpointDescription, _getEndpointDescription, _schema) -import Playground.Types (_FunctionSchema) -import Plutus.PAB.Webserver.Types (ContractInstanceClientState) -import Schema.Types (FormEvent) -import Schema.View (actionArgumentForm) -import Types (ContractStates, EndpointForm, HAction(..), WebStreamData, _hooks, _csContractDefinition, _csCurrentState, _contractInstanceIdString) -import Validation (_argument) -import View.Pretty (pretty) -import View.Utils (webStreamDataPane) -import Wallet.Types (ContractInstanceId) -import ContractExample (ExampleContracts) - -installedContractsPane :: - forall p a. - Show a => - Boolean -> - Array a -> - HTML p (HAction a) -installedContractsPane buttonsDisabled installedContracts = - card_ - [ cardHeader_ - [ h2_ [ text "Installed Contracts" ] - ] - , cardBody_ - [ if null installedContracts then - text "You do not have any contracts installed." - else - div_ (interleave br_ (installedContractPane buttonsDisabled <$> installedContracts)) - ] - ] - -installedContractPane :: - forall p a. - Show a => - Boolean -> - a -> - HTML p (HAction a) -installedContractPane buttonsDisabled installedContract = - row_ - [ col2_ - [ button - [ classes [ btn, btnSmall, btnPrimary, btnBlock ] - , onClick (const $ Just $ ActivateContract installedContract) - , disabled buttonsDisabled - ] - [ if buttonsDisabled then icon Spinner else text "Activate" ] - ] - , col10_ [ text $ show installedContract ] - ] - -contractStatusesPane :: - forall p a. - ContractStates -> - HTML p (HAction a) -contractStatusesPane contractStates = - card_ - [ cardHeader_ - [ h2_ [ text "Active Contracts" ] - ] - , cardBody_ - [ if Map.isEmpty contractsWithRequests then - text "You do not have any active contracts." - else - div_ (map (\(Tuple a b) -> contractStatusPane a b) $ Map.toUnfoldable contractsWithRequests) - ] - ] - where - contractsWithRequests :: ContractStates - contractsWithRequests = Map.filter hasActiveRequests contractStates - - hasActiveRequests :: WebStreamData (ContractInstanceClientState ExampleContracts /\ Array EndpointForm) -> Boolean - hasActiveRequests contractInstance = not $ null $ view (Stream._Success <<< _1 <<< _csCurrentState <<< _hooks) contractInstance - -contractStatusPane :: - forall p a. - ContractInstanceId -> - WebStreamData (ContractInstanceClientState ExampleContracts /\ Array EndpointForm) -> - HTML p (HAction a) -contractStatusPane contractInstanceId contractState = - div [ class_ $ ClassName "contract-status" ] - $ webStreamDataPane - ( \(contractInstance /\ endpointForms) -> - div_ - [ contractRequestView contractInstanceId contractInstance - , div_ - [ row_ - ( mapWithIndex - (\index endpointForm -> actionCard contractInstanceId (ChangeContractEndpointCall contractInstanceId index) endpointForm) - endpointForms - ) - ] - ] - ) - contractState - -contractRequestView :: forall p a. ContractInstanceId -> ContractInstanceClientState ExampleContracts -> HTML p (HAction a) -contractRequestView contractInstanceId contractInstance = - table [ classes [ Bootstrap.table, tableBordered ] ] - [ thead_ - [ tr_ - [ th [ colSpan 3 ] - [ h3_ - [ ClipboardAction - <$> showShortCopyLong contractInstanceIdString - ( Just - [ pretty $ view _csContractDefinition contractInstance - , nbsp - , text "-" - , nbsp - , text contractInstanceIdString - ] - ) - ] - ] - ] - , tr_ - [ th [ class_ $ ClassName "iteration-id" ] [ text "Iteration" ] - , th [ class_ $ ClassName "request-id" ] [ text "Request", nbsp, text "ID" ] - , th [ class_ $ ClassName "request" ] [ text "Request" ] - ] - ] - , tbody_ (requestRow <$> requests) - ] - where - contractInstanceIdString = view _contractInstanceIdString contractInstanceId - - requests = view (_csCurrentState <<< _hooks) contractInstance - - requestRow (Request { itID: IterationID itID, rqID: RequestID rqID, rqRequest }) = - tr_ - [ td_ [ text $ show itID ] - , td_ [ text $ show rqID ] - , td_ [ pretty rqRequest ] - ] - -actionCard :: forall p a. ContractInstanceId -> (FormEvent -> (HAction a)) -> EndpointForm -> HTML p (HAction a) -actionCard contractInstanceId wrapper endpointForm = - col4_ - [ card_ - [ cardHeader_ [ h2_ [ text $ view (_schema <<< _FunctionSchema <<< _endpointDescription <<< _getEndpointDescription) endpointForm ] ] - , cardBody_ [ actionArgumentForm 0 wrapper (view _argument endpointForm) ] - , cardFooter_ - [ button - [ classes [ btn, btnSmall, btnPrimary ] - , onClick $ const $ Just $ InvokeContractEndpoint contractInstanceId endpointForm - ] - [ text "Submit" ] - ] - ] - ] diff --git a/plutus-pab-client/src/View/Events.purs b/plutus-pab-client/src/View/Events.purs deleted file mode 100644 index 056635fb28..0000000000 --- a/plutus-pab-client/src/View/Events.purs +++ /dev/null @@ -1,28 +0,0 @@ -module View.Events - ( utxoIndexPane - ) where - -import Prelude -import Bootstrap (cardBody_, cardHeader_, card_) -import Chain.View as Chain -import Data.Lens (view) -import Data.Map as Map -import Data.Maybe (Maybe(..)) -import Data.Tuple.Nested (type (/\), (/\)) -import Halogen.HTML (HTML, h2_, text) -import Ledger.Index (UtxoIndex) -import Plutus.V1.Ledger.Tx (TxOut, TxOutRef) -import Playground.Lenses (_utxoIndexEntries) -import Types (HAction(..)) - -utxoIndexPane :: forall p a. UtxoIndex -> HTML p (HAction a) -utxoIndexPane utxoIndex = - card_ - [ cardHeader_ - [ h2_ [ text "UtxoIndex" ] ] - , cardBody_ - (utxoEntryPane <$> Map.toUnfoldable (view _utxoIndexEntries utxoIndex)) - ] - -utxoEntryPane :: forall p a. (TxOutRef /\ TxOut) -> HTML p (HAction a) -utxoEntryPane (txOutRef /\ txOut) = ChainAction <$> Chain.txOutOfView (const Nothing) false txOut Nothing diff --git a/plutus-pab-client/src/View/Pretty.purs b/plutus-pab-client/src/View/Pretty.purs deleted file mode 100644 index 939458af4f..0000000000 --- a/plutus-pab-client/src/View/Pretty.purs +++ /dev/null @@ -1,325 +0,0 @@ -module View.Pretty where - -import Prelude -import Bootstrap (alertDanger_, nbsp) -import ContractExample (ExampleContracts) -import Data.Array (length) -import Data.Either (Either(..)) -import Data.Lens (view) -import Data.Lens.Iso.Newtype (_Newtype) -import Data.Map as Map -import Data.Newtype (unwrap) -import Halogen.HTML (HTML, b_, div_, span_, text) -import Plutus.Contract.Effects (ActiveEndpoint, BalanceTxResponse(..), WriteBalancedTxResponse(..), PABReq(..), PABResp(..)) -import Plutus.Contract.Resumable (Response(..)) -import Ledger.Constraints.OffChain (UnbalancedTx(..)) -import Plutus.V1.Ledger.Interval (Interval(..), Extended(..), LowerBound(..), UpperBound(..)) -import Plutus.V1.Ledger.Slot (Slot(..)) -import Plutus.V1.Ledger.Time (POSIXTime(..)) -import Plutus.V1.Ledger.Tx (Tx(..)) -import Playground.Lenses (_aeDescription, _endpointValue, _getEndpointDescription, _txId) -import Plutus.PAB.Events.ContractInstanceState (PartiallyDecodedResponse(..)) -import Plutus.PAB.Webserver.Types (ContractActivationArgs(..)) -import Wallet.Types (EndpointDescription) -import Types (_contractInstanceIdString) -import Data.RawJson (RawJson) - -class Pretty a where - pretty :: forall p i. a -> HTML p i - -withHeading :: forall i p. String -> HTML p i -> HTML p i -withHeading prefix content = - span_ - [ b_ - [ text prefix - , text ":" - , nbsp - ] - , content - ] - -instance prettyExampleContracts :: Pretty ExampleContracts where - pretty = text <<< show - -instance prettyResponse :: Pretty a => Pretty (Response a) where - pretty (Response { rspRqID, rspItID, rspResponse }) = - span_ - [ text "Request:" - , nbsp - , text $ show $ unwrap rspRqID - , nbsp - , text "Iteration:" - , nbsp - , text $ show $ unwrap rspItID - , div_ [ pretty rspResponse ] - ] - -instance prettyPABResp :: Pretty PABResp where - pretty (AwaitSlotResp slot) = - span_ - [ text "AwaitSlotResponse:" - , nbsp - , text $ show slot - ] - pretty (CurrentSlotResp slot) = - span_ - [ text "CurrentSlotResp:" - , nbsp - , text $ show slot - ] - pretty (AwaitTimeResp time) = - span_ - [ text "AwaitTimeResponse:" - , nbsp - , text $ show time - ] - pretty (CurrentTimeResp time) = - span_ - [ text "CurrentTimeResp:" - , nbsp - , text $ show time - ] - pretty (AwaitTxStatusChangeResp txConfirmed txStatus) = - span_ - [ text "AwaitTxStatusChangeResponse:" - , nbsp - , text $ view _txId txConfirmed - , nbsp - , text $ show txStatus - ] - pretty (AwaitTxOutStatusChangeResp txOutRef txOutStatus) = - span_ - [ text "AwaitTxOutStatusChangeResponse:" - , nbsp - , text $ show txOutRef - , nbsp - , text $ show txOutStatus - ] - pretty (ExposeEndpointResp endpointDescription endpointValue) = - span_ - [ text "UserEndpointResponse:" - , nbsp - , pretty endpointDescription - , nbsp - , text $ view (_endpointValue <<< _Newtype) endpointValue - ] - pretty (OwnPublicKeyHashResp pubKey) = - span_ - [ text "OwnPublicKeyHashResponse:" - , nbsp - , text $ show pubKey - ] - pretty (ChainIndexQueryResp chainIndexQueryResponse) = - span_ - [ text "ChainIndexQueryResponse:" - , nbsp - , text $ show chainIndexQueryResponse - ] - pretty (BalanceTxResp balanceTxResponse) = - span_ - [ text "BalanceTxResponse:" - , nbsp - , pretty balanceTxResponse - ] - pretty (WriteBalancedTxResp writeBalancedTxResponse) = - span_ - [ text "WriteBalancedTxResponse:" - , nbsp - , pretty writeBalancedTxResponse - ] - pretty (OwnContractInstanceIdResp ownInstanceResponse) = - span_ - [ text "OwnInstanceResponse:" - , nbsp - , text $ view _contractInstanceIdString ownInstanceResponse - ] - pretty (PosixTimeRangeToContainedSlotRangeResp (Left slotConversionError)) = - span_ - [ text "SlotConversionError:" - , nbsp - , text $ show slotConversionError - ] - pretty (PosixTimeRangeToContainedSlotRangeResp (Right slotRange)) = - span_ - [ text "SlotRange:" - , nbsp - , pretty slotRange - ] - pretty (AwaitUtxoSpentResp _) = - span_ - [ text "AwaitUtxoSpentResp" - ] - pretty (AwaitUtxoProducedResp _) = - span_ - [ text "AwaitUtxoProducedResp" - ] - -instance prettyContractPABRequest :: Pretty PABReq where - pretty (AwaitSlotReq slot) = - span_ - [ text "AwaitSlotRequest:" - , nbsp - , text $ show slot - ] - pretty CurrentSlotReq = - span_ - [ text "CurrentSlotRequest" - ] - pretty (AwaitTimeReq time) = - span_ - [ text "AwaitTimeRequest:" - , nbsp - , text $ show time - ] - pretty CurrentTimeReq = - span_ - [ text "CurrentTimeRequest" - ] - pretty (AwaitTxStatusChangeReq txId) = - span_ - [ text "AwaitTxStatusChangeReq:" - , nbsp - , text $ view _txId txId - ] - pretty (AwaitTxOutStatusChangeReq txOutRef) = - span_ - [ text "AwaitTxOutStatusChangeReq:" - , nbsp - , text $ show txOutRef - ] - pretty (ExposeEndpointReq activeEndpoint) = - span_ - [ text "UserEndpointRequest:" - , nbsp - , pretty activeEndpoint - ] - pretty OwnPublicKeyHashReq = - span_ - [ text "OwnPubkeyRequest" - ] - pretty (ChainIndexQueryReq chainIndexQueryRequest) = - span_ - [ text "ChainIndexQueryRequest:" - , nbsp - , text $ show chainIndexQueryRequest - ] - pretty (BalanceTxReq balanceTxRequest) = - span_ - [ text "BalanceTxRequest:" - , nbsp - , pretty balanceTxRequest - ] - pretty (WriteBalancedTxReq writeBalancedTxRequest) = - span_ - [ text "WriteBalancedTxRequest:" - , nbsp - , pretty writeBalancedTxRequest - ] - pretty OwnContractInstanceIdReq = - span_ - [ text "OwnInstanceIdRequest" - ] - pretty (PosixTimeRangeToContainedSlotRangeReq timeRange) = - span_ - [ text "PosixTimeRangeToContainedSlotRangeReq:" - , nbsp - , pretty timeRange - ] - pretty (AwaitUtxoSpentReq _) = - span_ - [ text "AwaitUtxoSpentReq" - ] - pretty (AwaitUtxoProducedReq _) = - span_ - [ text "AwaitUtxoProducedReq" - ] - -instance prettyBalanceTxResponse :: Pretty BalanceTxResponse where - pretty (BalanceTxSuccess tx) = span_ [ text "BalanceTxSuccess:", nbsp, pretty tx ] - pretty (BalanceTxFailed error) = - alertDanger_ - [ text "BalanceTxFailed:" - , nbsp - , text $ show error - ] - -instance prettyWriteBalancedTxResponse :: Pretty WriteBalancedTxResponse where - pretty (WriteBalancedTxSuccess tx) = span_ [ text "WriteBalancedTxSuccess:", nbsp, pretty tx ] - pretty (WriteBalancedTxFailed error) = - alertDanger_ - [ text "WriteBalancedTxFailed:" - , nbsp - , text $ show error - ] - -instance prettyUnbalancedTx :: Pretty UnbalancedTx where - pretty (UnbalancedTx { unBalancedTxTx: (Tx { txInputs, txOutputs, txSignatures }) }) = - span_ - [ text "UnbalancedTx:" - , nbsp - , withBasicPlural (length txInputs) "input" - , text ", " - , withBasicPlural (length txOutputs) "output" - , text ", " - , withBasicPlural (Map.size txSignatures) "signature" - , text "." - ] - -instance prettyTx :: Pretty Tx where - pretty (Tx { txInputs, txOutputs, txSignatures }) = - span_ - [ text "Tx:" - , nbsp - , withBasicPlural (length txInputs) "input" - , text ", " - , withBasicPlural (length txOutputs) "output" - , text ", " - , withBasicPlural (Map.size txSignatures) "signature" - , text "." - ] - -instance prettyCardanoTx :: Pretty (Either RawJson Tx) where - pretty (Left tx) = - span_ - [ text "SomeCardanoApiTx:" - , nbsp - , text $ show tx - ] - pretty (Right tx) = pretty tx - -instance prettyActiveEndpoint :: Pretty ActiveEndpoint where - pretty endpoint = pretty $ view _aeDescription endpoint - -instance prettyEndpointDescription :: Pretty EndpointDescription where - pretty description = text $ show $ view _getEndpointDescription description - -instance prettyLowerBound :: Pretty a => Pretty (LowerBound a) where - pretty (LowerBound PosInf _) = text "(+∞" - pretty (LowerBound NegInf _) = text "(-∞" - pretty (LowerBound (Finite a) true) = span_ [ text "[", pretty a ] - pretty (LowerBound (Finite a) false) = span_ [ text "(", pretty a ] - -instance prettyUpperBound :: Pretty a => Pretty (UpperBound a) where - pretty (UpperBound PosInf _) = text "+∞)" - pretty (UpperBound NegInf _) = text "-∞)" - pretty (UpperBound (Finite a) true) = span_ [ pretty a, text "]" ] - pretty (UpperBound (Finite a) false) = span_ [ pretty a, text ")" ] - -instance prettyInterval :: Pretty a => Pretty (Interval a) where - pretty (Interval { ivFrom, ivTo }) = span_ [ pretty ivFrom, text ", ", pretty ivTo ] - -instance prettyPOSIXTime :: Pretty POSIXTime where - pretty (POSIXTime { getPOSIXTime }) = span_ [ text "POSIXTime:", nbsp, text $ show getPOSIXTime ] - -instance prettySlot :: Pretty Slot where - pretty (Slot { getSlot }) = span_ [ text "Slot:", nbsp, text $ show getSlot ] - --- | Yes, this is dumb and only handles _most_ English words, but it's and better than saying '1 input(s)'. --- And hey, "most English words" is still a lot of words. -withBasicPlural :: forall p i. Int -> String -> HTML p i -withBasicPlural n name = - span_ - [ text $ show n - , nbsp - , text $ name <> (if n == 1 then "" else "s") - ] diff --git a/plutus-pab-client/src/View/Utils.purs b/plutus-pab-client/src/View/Utils.purs deleted file mode 100644 index 4703cd4a73..0000000000 --- a/plutus-pab-client/src/View/Utils.purs +++ /dev/null @@ -1,89 +0,0 @@ -module View.Utils - ( webDataPane - , webDataPane2 - , webStreamDataPane - , streamErrorPane - ) where - -import Prelude hiding (div) -import AjaxUtils (ajaxErrorPane) -import Bootstrap (alertDanger_) -import Data.Array as Array -import Data.Tuple.Nested (tuple2, uncurry2) -import Foreign (renderForeignError) -import Halogen.HTML (ClassName(..), HTML, br_, div, div_, text) -import Halogen.HTML.Properties (class_) -import Icons (Icon(..), icon) -import Network.RemoteData as Remote -import Network.StreamData as Stream -import Types (StreamError(..), WebData, WebStreamData) - --- | Make it easy to display successful `WebData` and render the other states in a consistent way. -webDataPane :: forall a p i. (a -> HTML p i) -> WebData a -> Array (HTML p i) -webDataPane successView (Remote.Success value) = [ successView value ] - -webDataPane _ (Remote.Failure error) = [ ajaxErrorPane error ] - -webDataPane _ (Remote.Loading) = - [ div - [ class_ $ ClassName "web-data-loading" ] - [ icon Spinner ] - ] - -webDataPane successView (Remote.NotAsked) = webDataPane successView Remote.Loading - --- | `webDataPane` with two `WebData` arguments. -webDataPane2 :: forall a b p i. (a -> b -> HTML p i) -> WebData a -> WebData b -> Array (HTML p i) -webDataPane2 successView a b = - webDataPane - (uncurry2 successView) - (tuple2 <$> a <*> b) - ------------------------------------------------------------- -streamDataRefreshing :: ClassName -streamDataRefreshing = ClassName "stream-data-refreshing" - -streamDataRefreshingContent :: ClassName -streamDataRefreshingContent = streamDataRefreshing <> ClassName "-content" - --- | Make it easy to display successful `WebStreamData` and render the other states in a consistent way. -webStreamDataPane :: forall a p i. (a -> HTML p i) -> WebStreamData a -> Array (HTML p i) -webStreamDataPane successView (Stream.Success value) = [ successView value ] - -webStreamDataPane successView (Stream.Refreshing value) = - [ div - [ class_ streamDataRefreshing ] - [ icon Spinner - , div [ class_ streamDataRefreshingContent ] - [ successView value ] - ] - ] - -webStreamDataPane _ (Stream.Failure error) = [ streamErrorPane error ] - -webStreamDataPane _ (Stream.Loading) = [ icon Spinner ] - -webStreamDataPane _ (Stream.NotAsked) = [ icon Spinner ] - -streamErrorPane :: forall p i. StreamError -> HTML p i -streamErrorPane (TransportError error) = ajaxErrorPane error - -streamErrorPane (ServerError error) = - div - [ class_ $ ClassName "ajax-error" ] - [ alertDanger_ - [ div_ [ text error ] - , br_ - , text "Please try again or contact support for assistance." - ] - ] - -streamErrorPane (DecodingError errors) = - div - [ class_ $ ClassName "ajax-error" ] - [ alertDanger_ - [ div_ (text <<< renderForeignError <$> Array.fromFoldable errors) - , br_ - , text "Please try again or contact support for assistance." - ] - ] diff --git a/plutus-pab-client/static/favicon.ico b/plutus-pab-client/static/favicon.ico deleted file mode 100644 index e8dfec8c049d5355067c9d4220b278c2627bbb51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14082 zcmb_@X*^VI{P%UvoMC2cV_#!1_BFDl%-D($WvwhzX(tqAi!);>N<`sKMY}e%lJ%fn zMJq*&6pAuMjBVyQy6^wzdGWk>o)?exd}glmJHO?+zQ1(Xi}{6$*YS;qKVwChKnLcoarHD~w!sOa0!;{2vF_-#T-T zuioI6eaq!T_5C;$Bqc18u}xL>=qYtyT{p!0xhJdP*uC@IiX0WIoo~z6od3UGct(Eseod_P<25g%k1Lwqf3yy;TK`@$ zHS$AK=>16)Kw#ZksdUE0D{iof`wTmQ&ouy!X%` z>S4KkAy}u0`BKL`IX94g9y{1tAvQ3B+);M>?GUhuW{?L+b=bkS{oQ5NAIyW--_z8z z9@}Mfuu9HNgbpYNJh_o+yJZJ+465=URGn73<3v-=1NsyD*xst6Udry;*|r8>Cv&ow%7>kY4|0+a1cGsnuGdX;hh~n4f$e$?d-dvWdRjyN-eBv2E~1 zBhdotg^kYF#XbF@EEK64ZnpU|>F%tdxGzM%+LRWs$xR!{`R`31%jUp|$t?WMcz@d7 zm?JT@#=KPPpUWd3(xMK#lP+!KTrs3c=YgHN{A0bnS`(MB4H=&-x;~Ms6f!b!HFZ3p z?eJ&GIktK!^b0Pj|8C@FUV;8FZXm>7|_P zAElu`wmEUS=FIXPHA#!|{HUu8wlCGge!1NL;dIU1!czKsj% zC?j2*Nu;A9^30mfYW*qgiz)fN4m*Y;TPnmxnDTB~xU%w}(ALUdkYnFd3EI;N%P86-(+@V;S{?mtd>4^V0g?oRbxM8 zZVVHyo*Ns!DLrPtxv%u`qyA_6yLB5!{=8m{9X)vWb65G##r&l;#1vPU`ti9RYoFpj{q#a}*8~tHvmHHjF zMC+*>)*D{);A3p?SlWvp9LWy5#HxhDETbpvikoRKK5^7L+LRbwJ)$#20;~H$^WcwD zg^!zMIg5xdSMx5g6bC*w7k=UzG{502@3c!Iwv#3o?^cWWU=|+`&HQZl$Se12yGK2B zlTUN=hIh_?W?M?#XX*vk@!i@{rA;pc4y@VDrFU}A9Gg__J}7YbGxcjX)IBBGf72Ih z)E3$&)&CAj>>EM(M`s^Sy=)YQ#w_DM7O`Kw=W|W};||)<%YFC;B8JGt=4^e~E79+t zcrjyXt61!AiRIzWq3O46?sN^JcZvrmvt%UIU&^vpvTw^SGw6C)6VSpAYH@s;u)b<& z={B?Y6;d zEh7-{rj9kWPg3gV4JL0iRqhw-+RshZvnP($B|0VV&mA9olXjq*a5lqZ{^6=5r^5w< z&ki3`aFomg3Z6ia|0$EV7pf6Y{mL{D?UNF&HkjMP+po&ekW96m$mVXy=+zxI^M_Oo zhSRCX*mr)28oP4Gx-ZLXvHBjHoDr1eBjQ{_&uZyNe!u_~RAn0J`u6_xm48Al6pH1x#{ zyi>$fT)$PuFZE8y5g7Mtn5T!W`@Lae=6!S170E`g;kz3Zn-6^81TJ|nZ+}AVdU{@! zVV-N%SY}EP%U2@2h$;P8mdt8K$|yn+FMfAizlN7w%0N70_jR+Wnb{>@8zXTLwjuUf zcR5t9r%tIaU`koOV}w6dra2{z6#EX{=SDrLn5Pkc4yW}6kjt*ZJ{e(F-?mYN0iylY zhSQr94|K0(s3rS*m(qFG5JSyb#c>#?!QR=()Pdhr(JEB*rO3vE#LqfDh+W?DmAfh| z+`uFEra1SlbDLZG3Kq}R<})ffy;bMjqDswqp@%L{)Njq2TyA^;2e-C<_Ma+R0Gyq` z4wun~tKlGLxXNfg$5L>1h-b2%|L1GUXYTCAR~Zg6d<0_Tqb_^g^a-DMn4iS5ZR;e8 zGm&pP7_no333eS+T0T6Q?VqTyaS;XE*%K90TWK_by|~bC<2Cthm7pe+v4&^jr17)A zAboB-oc~NSOFUM~cDp9L#VR@^OyYq%>);6_JC7+D-u|jqQv@-0fvcAHMOh7KkcGvQ zex?3=uYm*izvPbmc_R|0I8%eIY*`l4{|8Z%kkvj&w{X+u)a=A?ZSKuvYO}STK>Oh! zQHY!@c|PJX7C!z&Ypp|9L?)c!%QE^LwP-!mn#5`t zp6gjvb_QXsnW=t!TyRM_)tA42eR|)L50{M=WV+rgHTCmY*)I5i1=0NrZe4$Wsu73& z4t-dU-bJ(m#T81b?PRdbjVpY>?t^d~4ZVJ`X-^M+`pPHTRZ`x>GrTG_RFj>(qbT*J z&!a9pSS6`oaY){A`*v!eM3*EvLWg%@J$#P92D*E&)4*C>v0UHcJi+yTminosHFL>KPe%HebW-#?3YP4<%{~GezUHQtUhS zRl|-fY>9E6PV{z&US+Ap-Xw;gojAcI&xf0TRZy`G8AWFN=k~hyjGvs+bj8^RFZkCg zcyGM;IufbDm8ClT+Kz*SN=l3a;pQfDKT$n73pYCKYQ<8Kxp0EX-K6=|3U*cV*iEb= z!(IAE4^+#P$3cEqCURA$uI(OmR}t{SOTC^}e*ZK7ba@ERTc4vrZqVgjrItSXE2sHi z6J8T}y^5=xgY4Ty=ee9cwAnz^VuqgSV@8{RV_zeSy#coWh;q&0W- zX5-n;YD#0zn-W-q{Ok1V>^I6;vd*W(#kCH-ln#0>Q9MYzPLKX%%pU#+B9-N}UL!z9 z%oAzsbNhShD&d{$fP13w!fioJK}x1-(ydJ47B9ZPPLtZ)=FGK>9z1Y~lAW|v&MM%n z5xLaQcD16~)1Tm?qjoW{tZY zTQucg4)62_AA5ynH??xT>{eoH9>qeU_)oQ{)s`uCikaGPTrquFD~L$r$u&_Y_jjmyVu<q@t;eDlQ&ncUy21dzT7rm=GT+oio8C_P{k^ScZ?)EaEaPKgKDSqiwEnEGD=S+h7*HQ z^5+xQW5T31Rjya`&cS1ab0PI9>7BX!YwbIPf7C;NS#IMEjdAuj+kf^K%-Vk*Q|C|b zAN$anBB)zDHYS|^(J@3x4oI-?64s5owQcY{@xyfNaCdKM(d_I{@trYv)^~I$&}jC+ z!^1WuG&UnBW&0k7Mj5y0tz{M(KIzB;M10f)0e@=oZMg{#5Ahj8mD<(g1e&b&K#dyC9H;f^oWNXqt!BfJuH z9ZsjAyQrAees~xKA0MtWtM+H!AY)y#d!akd;0GP-G$8W6)6>Mb@`p!|{FkEU&}b&u zXHR7g>1)$bA9>95=(QxMt9`Bjly8y6`f=)Rtk8sg%)Nv)On7h_RKr~`6nj*m;daQ+ zYv_6zX2e)Ku>*o)^FaAUc}#Aze6daF;_X%jB!6>&E!;OlyXU9P|x=T=M`)%HE&pNA!X z*`yf;-y4U%--dC|6Lf;UGqXdORbR*#hohF>@2P8T+yO|hGk0q?>xls0L9qtaFY~<{QtlQ#5LsBzBA@T(Pdm0|vV z+LR6U;A__*(Ix$4R>n?8X@7aD5t}IwpdJ+L#(B0uFopYMH|(i-StgMhI$BUU*-FgQ zhI~8>P}yqbYglr^X~%14(Kz{qs44_3*M)4AMU2mZ*Egm_p(Bo9b1dE0Lk}&eR^9?3 zI%QPc!#?vzH$W5Na%h556$uV1NSwnr4iSpADg^6O<14THY4~vIy~d~6#F3<_!hv>^ z8{3qp)~|2x|8pQZG}KiQ4h(T7-5myp^$%<*+i^ zRuOwRd&+~;#xa^=tfVql((E)=1xt)S9qLoNh0X`_`<{)B2umsg;Hn8_!g-SlfN( z?X3Vp>19CJ28|vNEV?&deX`S54qOAhbw#2&$hq`r^n(m%t<(1Zc>1d*892y^y1>$( z=?m#hQRRCqw`Tuu2j=?*gu9a^Clj8P{>VoU42o@1eR=rDrc<)rNeaL1M|?mOLZk+5 zvE3k#5u>pT@JRU^k;)JcVnN|X!fQHc6vu95`-Z9MF_JLKULISg3HW(xF{gTcndWf3EBy zmC1RN`s%Jg)fa5jME6p$btKGst~M0+$R#ktaQvXm>r@-EqrdzUEgyeEDDiwgHcIOj z{XjHt4I+|V5Nr&~!6rIB9c>;2)#?L>k&ACV@Wu}<8 zadCM#Rl%`brRq3_llh0pdoPZ|mKg(mu+Nkk7gx3lv^#=!ljFcR6S6Wum*mcFf`{24 zQN;^PrGu^GA9*8q#LjIyD|Ilb2fjfS*UGyFCAhH)FkrDzG+J*p@r9(-W%V4R9ata#69u(ZI~G zcOwVWDkbJ}J^GA;T2kKA2`5PT9xN)puX+{Hvy?nNLYQTbHdO{ZfgZz3W;!Y&Z!ZCH zS@hR{@R0&W)C8Z3`{V@2ig~mB5~8ywbz&^?T=N28MNRbZ)NL{DTXAiD^sPU-M~NE> z=BdmuC#Wk#s;U@vTP7HShciH;swWuA0H#c!=zOs$jvv=-g9vJM43*Pe%dU!i(PXcN z@yua2F`5GNN>@e5VX?0_;&~ma3W>YH(Tk<3hG92L!I&ZAd);Cp){>j1(ciwZB~?dv zZck<9$gendQ!~GM@pjyL>|i`4q9yM`aq+?xv2XTA^1zZ-utlC~FOKg8C=IL)lcE-r zf|(FqSvU)mCIwDl;KnGNl_`Vi=%Ts*AitlvH(kJ09!8m~ROjh4eAzfOjLZ9mPgBUMgy0q7F(LoW#n5GK!L zw2Vm+@>e6@1I0pd=T-tDf}!9{VCoEt?t|kOQ@MVnuKf8>JUh1I`4;lmk`7}UDmZ(q zVQmT-IS5m+$3Ky15!m*?cyuNhoF2 z(B#j*7|Ni|`BYstd6mVi5Q)$!E0t1uuNbF5O)_u!s%f`2(f z)o{EjY)gQY4nmi7TJLlcS+?8XcHj{$d z*I`Gd30s;B=2B|Lg7DJ8D%eI|Mqi0eZD4Mv;>T4+lJE?!`5FMaX(*%$A=kiRU$zw; zCpLc7mTH zkPQYY^4y<(TqiQ^oeY-_!hpsqxa#}7)y33cert2n$oLhJ4APgKOl@f7EHelMs``L# zdDtz{uquF6wJAtLPJR>;~v%gWeUqNIm#Rl=%7}D0WM&0!x}$m4)Q30+)U>c8rCQh0f6; z{e2wTe$9>$lFd*fB;59s{4=GNIOa?8gYP-B`5PC|k;2vXfO=LZ>Y`%YheSDMMFo-< zFHe&JvY7vA;Q6)b($rLo1{Dir$v&B|)1*G?e-e#dq8yUNI`n=byb5Q?#f)sq`6!Rg zWXNDmuShHcnH7VS{h0rtBruxjEn%*Jl0T-e;zlQ|<{sT@N{fy}za3$+l(;LvSb#e) zGrIuPg2nyD;o;XLRvDWZeS*wX5zYn*{&^-3331RSgt4s7?vqzL$=&MP#u&IvDxYbY)IzLJ(oycN%OBp>U-}yn&g?EwHqR zgNIpYhAehD7~G~}5i6kQ&tU$N6eT8HrHI`#B(WsOWiN@`O><#H==n@1>4`r|fW!;% z$}b&VD$gvZhY$b8|bJlbSH1& zHoRIa0c|Jw2={_UpzA9RWo{=iVH&h#aveB{L{OoQIPfQ75jZV!y>bM64*)qSI;?zE zb_BuX3dmMufp8GMQt>(R*_}$N&GE$KS4wR zVuO@hS)X1Mxr5QIWp#x%1cM}@MxbyvrW0eC_rnra9N*1+lL)?@Au~sy8Y;RTZbIy- zy;~=^H`H%)W<|E@bT!?d-67VJswNttwDaLS`<4U|KavDSg60Mg@ zJXs>wVIrQ`c}J;y;}$M2%}KYlUEK5SY+%Bgj(=u?<(9l6IDNYhJbb~G0Fn2`l2?;- zu@H$E56-SY==FqPaAmsH;9jWk(JgMFx5)PkdISSvw9eNw$5?0RG!pAgyp=$6B9%pYga*GGdIWdajTc@vcrxCi<9m9p$oXvqLnK-Q=0BL*UUk7+wDw|xe);$N zXiP3r@@koek9>;nx2Qzs_7`O4ecJXv>Jo)tKA=BhI)S)JORHmn!=hq@Mn;#bz5V?S zyEH`jxC$H8JbTldB)MESSUKgID93N8zif4>vCY~0oRB_5B#B+ambKd?ouY(a_93lx#nugru!2^-HAlFW^E+Y^KvOP z90Uf$Z-aZ68cExa5%UJuqbuYw9Zl3D7#uTX+Q?Pqp`nPAh@s|jf^g-D(uRv<$aamK0Dv+L29&z#E)3Mh28d0d=5x3BT2OWE0|pe zMa3Hwr2|t(P-{qA4gZd&1xu8>M0@BEUAY%KRwmBV`!(KYmPU@#qK(1OK&mOKc$JR! z;^wd^g@f@znyqY^JQg%S;c6k#H?`0`@+?aYmJa0V8vTZrQF67zh*NozCw8#UXXY@k zsOr;hBzi{DSrh1eO?3rkwsK4c!WD>PFa;~ZYSXvD_wvCqC^#IhX(vX%5_2}NkgGa@ z?sTIarqR>f;(X4$l8OnDO>XMUJu+?8FEu47dN^qT1@F;EeJ#h?y?t3=cOi8S4>F#A zRYqN@%&XlTf(!~C(a@WZWU!2Nrfjj>@=$puyq=t{E7JB3bwV~OckS_#Pj;=WlxVuQ zV24-7!0H#~=iq2xfmuDs_XHyC!1xw;?S)uh0xxkRns1=^K|AOy8Qh;4E-n{@IZ7w{ zKV{6gpTwIL!Lj;iy)oGK6;GJQso1zA(!qF1qLkS`L|7%a<|-FK^kUK}!i}<<2v1;K z3BMGB(siOAu7w487@d>lQyjS_!=Y!S?ea|Q7NO`f-t9>B@LAgJzacO19Sie-htoih zH!#fvGNCf{8HkSpxCZwg1TSY{HyZniPV3p7EMvKkS>}uY>dZeehq-zZ!i#(O9$h~T z$=rR<4yPXfno4dqGfmxnmYBB_j%E|{CiA&0`Ho`P)}~DdLwJpfnXBYk+R*f|&xX>) z;jFeGk}vO_;!JT1Zj|1$pqB%_^!CYOvG0HP$uh+dfM?TDr!*0ky`cIG2zG%kge@vx zOpKm1RmAQm1p{63lfCfO!x?^B=1;N0HUAWI^`scxgO2y4EX24slr!;Ur#CF_mv{7J zX+~2z*BRJc)kg0Oq=tcAT90?+kgybWmgF7IBUxO~mrh{l=ZOe9_5Nxs0JmMx+4$UO zo_|B*0sbd3t``YAfEQn)Q8G8v9-43h%MB2gsZh}a7z{#lBT%i19~g54+cE%7$DK~C z5b@ONAU9|7lEgE%^5y%@L>Wu_6~%>ij~X2D96su$ISuU|4`>kXifKp<0ycP!#+J&g zG(&H08s(?%{rpR)MWW3vV{WE!S2}?)GBix5l`g80(}qrv@RVhv+pF$foXQ`6;`)cW zmyy&+T}${50(j*3of2F zxR*BWVEedc$~R&}V{={7DH1oQ`$!q+`6CDh?M|S*mWnBz7wtFOsv^9WB>X6gKKzC~ zlEb9NZt*Oozx-Nnv5IL$Kcwg=J<5z0T89cH>3Q&+{a9ai;LE7b^G!cvz7A9l>`!g@ z^V=9NLTJ^{V$|!+Z1<0ibgg)qG?hZAk;U9e7-MX#V#-XDk7s_!RF;Y+zi2w# zTY9sJ0uN_`Tc-rRxx!uU;Qcm&iZAF>g!v8#kDv)oAfK<|2CEUzF6(~y<6hjtt=O+` z(_OC_31edc;L~RD9AHr-JZyscwW14{=?OGq$mUS8MzfHO6)>}RG8Ler1+HtlD+Y~iT39O_PbL^*>UtP>9~bHXSbqF_uKmaDt7NLHci(zsR?8_VG$ojg24S(n`(QT3W<4l zD8mzU94_Kl%3yWDU<;Y=%yF|~Q62sM>VN%gtu(eq7ZhC-N+<}j!Q@gZbNBIMj^O6w z9XG^iYl(PUzat*zo!ObB*YtT&x-f+8Z&mic@5Zh7$^b81Se0I#u=!U5w;taF_ng3P zJ>gClaIHX+umU$=lrxw+7LYLZ&!i_jrjNsMvy_z<_pcO1AK&MIqfGEoEamg6RIjln z#ZhUv3vW7Z7(nt8e^+MWwImBFti%Q@R6M{o8fZLopf{=Pq8{5`C(??lu7FRjn5Hji z^Gf6kG42z*hRb18s!eql3cmN2igCZ~vcse24VtJ46`jR(g0MpVlZxB6ZZE`_Aq5iL zU45jTq_u{(PN^CvK=sxSxv-nX&s?+lb$kz!04B5Ivq-dce__|El^DHKcWin4&pUZ2 z-UyVCXtCfr;pW))=2gBT)^G5)pnbR0>szG^=1awVC6THv$2Af2&$V-vdXRV^(jf`m zu_*?>shB~ONnQQak`mvAqr`eRwd6la_hVW~+;>l>{RUF@j)gh#K8cmd!qH)Z&O9)B z4aJZC1}Za@gx=Vax+;3<3MBiiql-v#u@CZTbkBf}85*dk91QmGB?eO3UN>o>pQzYw zQFvHw3lnHRG@KCp(M9{Sfi=!TZ#v+w-iMJMUl zv`5ldTO*L`x5=6PbCDsIO70(myZrHz;Zf-oZs292P(>CEkvA75FE|TK^-Y9MNqu$R zMRy!Li^H)DTo~G$q2T_I>l3e{IDMkIpQn~(_bGlk@?b}^!K3HryN*(#$i3k`DRSK} z>NnmiqQ7Id*z`k2U=3~o$;=GO6bg9XjBgF>SuzIl}gL?=MVc2&+qaBgN6%^K2sL0&U?6+ zgh@G`B1LS$GBCIsxBtM=LJSLUG%kF#67#1w`Vw~ zS?a{BbwgwFX79T#m4@>P{QKZc@e@cCR@yp2n{zdr+npp-QNVVl0c$2u#a+Oh`o0yt z_Iy{RXLt=3Id+w)O)yQb#B?XW^mxKtMWZH9Lg2qj;TQm55#ra2c3a_!}?6(pu)Q%P@AC=zX@ zj}HQr-DpOl5!lw^>F&)hl0+F|oK;9nE1`kfh>U#LJ8nTn8T%^<%a(|Qc6J+i9Ps5i zH#Am!X_pZ+WVMWu%MxZ?B*PgFi{BF0KsDdyN0{K1VOb23_mN(gV>PyDE=8$DD?UV% zQzh=_WScN6)V#3k!{*xyRQFx`k7^00^kQdVXm5$dT%CV^B?&Z}Sx2RTdvR5O(mq3gR5yfXElzb+7jL?oDjl<8}->~n_Z zlz#q%(Dejw(Y~vT3jp7D|59G4ls`LHqT%Y>T%##Gp1kxW4CST$+B6OjbMrIve3y%L z5v@K_p@;oRsf);ETI_{5zyr*QD6D8yg9}KW7Cz+uu8A=13qr%&fbVRxl$Rn!*vPoV z7sr#JG{z26K3ANzL4)#=1xnzChurGoaw?`h$UNV|H-ruxUvdIj^ z`}=)of%#jaJXG^ze#8?5!+Xo({yEQjmjfipkQxWfQT1I}crBIsY%QO`4Xb*SBUuqR zjLj|+PoFRUY^m?ekncG|Z}#5syX56~_rzQ?uju3~4Rs)uwVws=9l_7mu!C^Wr!qMH zScWh_R&u6Z5p`axANuMkYn2Jk>QT>mdHztu!=8w3M)mUh?J?)g+(@TVYyQ>HKHWKQ zJ+aiXiOTd+u`)$?7#}Bza~9V`uhD_@+kilgnhJ#X+N<6Pq>v=Zq4$nC9-)So%y{tH zyRz^9ZG#A8KA-=cK3i?Ib>`Hl-`D=9lJyRE zB}2W^*42MR8N89p@Z# z!L#^!i|M9j#>Q=`YNskj7xr~Exxtl}^R=;WWJA$hwrW!TL0n^E@UY6>xa3KI&+m$H zr%Qt2c4u5wB04Qvq&AvydbwPe#k$;EmJ+zG82%q1brnLCY+?y_SKEAXXqZiJXIQVQ zMoJh6p)!vmOgLH}sEwXMcqh#ca*1SLeDDX!Wr#Mlzg!aT5Rxz)AR1pTQ5QLU_hRGO z9-Ev$UwxDDsjwuzNALOiz31&F!^7|qOuQ2#S;gzaMsn)+^B9Vw67T#SwKV78WYut4 z%%k@Tu45n7$!Koe*+8NY%lU#&w>^zI`E4kW|Mc?A9GTHHI@KEX`^=X*dAMs8UX!bl z!SJdedn7&s%mI=#63*jXvLFSDt}&QXo73KRNwfRgvkgc78ZPE+;GfA_Zpot=d}nRF z#K429&ue<^CWFit_&NLnqh`0R|8kght+|JmksTkog=%f*qujz z_~V1VJpZpLAM+Oo^rkKQ2P}2RYleYvSMKlB(v^*B;J(eBW9+L=<%jyApr?P8V;4Ve z&u!wgFAMeIB~z0FnseH#B;?P?j}~?9KRtegRmsZ51H@C8k-BEn75$b->229j>ayly zzIeY-ym=^sKo~fc(xErJX!hS1V%a^z+ei-E#D>-8qwoSKif~th*^XJp-qQ_(ZOco0 zR8_XHs7|gFDQwlgOU-zRar3lTb>rDD(=?MKL%TVurwE*FI+Grwb)o&rRe@D2c@tJI zeP!^c^TOG;eXE>#Nc^cc^@}1ldnOb5hbGb-I>Ztm*?!`f=Bdt$vG^3F8=q??DapEEDYX?p&6;UR4jByy{cYX71eJo zcT+qFz}34jor|uQ#m?;VGVyi>-eGM;-jP4n9HP+(9-7hWOvDJfxUl!i?Vx2L+jk~V z;CQ_4TnVb-xR0=OU&e6*hW$DBt{+{!i}V>dgT~i`Ms-;h7c!DPML;(&@tV4^B8_= z*BC4VMjyhp7siLn-Xm4#F`X(|IDT#Ik#{Tba~Qvt^q-Y|{xY!!*o%!?g*B$fU8Zwx ziBr}nm#0%tv=FLfe7-M8iq8oT$OgmSo?qH*Dn|2MsD+L}Btrw_ArD+fjxSw!$RuKZ zl&4rs`rZ3!r#C6qqDtDyXTgrvuiXBVAwo53XG(p?+xi1q?LYm-qt=-m#?I$?k{lN= z@apm}uOh^%h;A3(aeSt)B)09UF|PG}a_2_h^61FlAAHZ?3Rw<`GeKDbYuVVR(#FVh zoYlBSobqsum24|pfgi88=fDi!>mZe-*5C5Ua1>dk>2krRknr!#>!1loPp@ziYC= zEJ*adMa4an4cb8=R_{5M+(0_ILV?-7{mm^LhDBl4$g4jy>ESGG#Q!2TO-cTCb2+iw z^GIq|pXx=1OW2{%M@pAhp4-r&b4>MX#EC8~d`dkzi@WzDv4of_k&0hgQ>;lJGaFra zb|c8H=9AY>z4IR`@~1G!Wfe$=1Qd&-^X3zGhYutxcaa?Rh&S|&s}juK4UtjgVf<*9oK2pWY>`8r$Ru zmy1EMjv!>Sm+kQQ*R(K67Z;JmYdf+ukFt*oE48#pytsm;hW_iZONY6z@6 z4FCEprX&pTo94Ju#B<#=sHc->mEPjxu zYT2e~ay4(HrP2S_bU}Kk|DZ3=9eAt&C7S3y5}q*eqy$H)F*xaF{e#DgQ`!}LyX4u` zq=uW-m$^8@p&-{0PZUl@cMK7rytK1&oD8`L;zp02v0+aoKK-oJ#AHmf#?CJbYu&+% z5*mK|D-(p=DNb1ddo^Y0V)`+cbJ35HPfK~(9o>_YZwK&&A;9)YN#SC0gxbqCi1Y;a zp!Buo*)1|9QxUo3x+_IeQxjKjHeCH54pcMmBY5Dy2UruYkTwRHAO%VveM#C+XCtgL zLS*AZ5-N>;`EPL`mLfhvd~mk~lFIzerlu!7@KRXY;V-r${H7grwrm42G_ZHXsZynH zK?8ASf2VX;I#A(9nLcj#fVF(u3Yn}mO_zUKx;X5z<+(e1H!LT!+$lKXp2nAP{%GPD zROKkUBu(wqtyh?c^EwU5daq#vJ{{FDK<_#`B#f06rBU_po%8t%m-1=M|G;WruE7Kz zcqo8gu`dmTGek_Pbt%z$ZPhX70MDlV2U;-SVRs;5gubI<-=#imdyzEOq?>MxY%u7e zXqjBiu@T{oun^pfdyCE~^QFoj-UIVfH%-Q@ue9Y_r{3uvqz^pLDbe}rq&l)EFDK_Bly4t0}iN*O}_(y-v diff --git a/plutus-pab-client/static/index.html b/plutus-pab-client/static/index.html deleted file mode 100644 index 7e5db21666..0000000000 --- a/plutus-pab-client/static/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/plutus-pab-client/static/main.scss b/plutus-pab-client/static/main.scss deleted file mode 100644 index 5cc0a71aeb..0000000000 --- a/plutus-pab-client/static/main.scss +++ /dev/null @@ -1,140 +0,0 @@ -@import url(https://fonts.googleapis.com/css?family=Open+Sans); - -$body-bg: #121326; -$main-header: $body-bg; -@import 'variables.scss'; - -$badge: $gray-900; -$badge-background: $lightPurple; -$btn-group-separator: $gray-700; -$nav-link: $lightPurple; -$nav-link-active-border: solid 1px $nav-link; -$nav-link-hover: $white; -$nav-link-border-radius: 3px; -$clipboard-button-color: $white; - -@import '../web-common/static/common.scss'; -@import '../web-common/static/chain.scss'; -@include chain ( - $balances-table-background-color: $gray-800, - $balances-table-border-color: $gray-700, - - $entry-border-width: 2px, - $entry-border-color: $gray-800, - $entry-active-border-color: $gray-100, - $entry-inner-border-color: $gray-700, - $entry-separator-color: $transparent-white, - $entry-footer-background-color: $gray-800, - $entry-arrow-width: 15px, - $entry-arrow-color: $gray-100, - - $entry-color: $dark, - $entry-detail-color-fee: $pink, - $entry-detail-color-not-found: $red, - $entry-detail-color-forge: $cyan, - $entry-detail-color-wallet: $green, - $entry-detail-color-script: $yellow, -); - -body { - font-family: 'Open Sans', sans-serif; - background: $body-bg; -} - -p, a, button, i, em { - color: rgba(255, 255, 255, 0.7); -} - -b, strong { - color: $gray-100; -} - -.btn { - border-radius: 1.5rem; - - &:focus, - &:active { - outline: none !important; - box-shadow: none; - } -} - -.main-frame { - .container { - margin-top: 15px; - padding-top: 5px; - padding-bottom: 5px; - } -} - -.main-title { - font-size: 1.5rem; - margin-bottom: 1.5rem; -} - -.contract-status { - table { - .iteration-id , - .request-id { - width: 3rem; - } - } -} - -.web-data-loading, -.stream-data-refreshing { - .web-data-loading-content , - .stream-data-refreshing-content { - opacity: 0.5; - } - - & > .fa-spinner { - $spinner-height: 50px; - position: absolute; - top: 50%; - left: 50%; - height: $spinner-height; - width: $spinner-height; - margin-left: - ($spinner-height / 2); - margin-top: - ($spinner-height / 2); - font-size: $spinner-height; - text-align: center; - display: flex; - align-items: center; - justify-content: center; - - z-index: 10; - } -} - -.web-socket-status { - position: absolute; - top: 0; - left: 0; - font-size: 15px; - width: 30px; - height: 30px; - display: flex; - align-items: center; - justify-content: center; - border-bottom-right-radius: 3px; - transition: opacity 500ms; - - &.web-socket-status-closed { - background-color: $red; - opacity: 1.0; - } - &.web-socket-status-open { - background-color: $green; - opacity: 0.0; - } -} - -.btn-group { - .btn-info { - border-left: solid 1px $btn-group-separator; - &:first-child { - border-left: none; - } - } -} diff --git a/plutus-pab-client/static/variables.scss b/plutus-pab-client/static/variables.scss deleted file mode 100644 index ae21eca90a..0000000000 --- a/plutus-pab-client/static/variables.scss +++ /dev/null @@ -1,146 +0,0 @@ -$white: #fff; -$transparent-white: rgba(255, 255, 255, 0.65); -$gray-100: #f8f9fa; -$gray-200: #ebebeb; -$gray-300: #dee2e6; -$gray-400: #ced4da; -$gray-500: #adb5bd; -$gray-600: #999; -$gray-700: #444; -$gray-800: #232640; -$gray-900: #1e1f30; -$black: #000; -$blue: #709cf0; -$fadedblue: #5777b6; -$indigo: #6610f2; -$purple: rgba(131,45,196,1); -$lightPurple: #a380bc; -$purple05: rgba(131,45,196,0.5); -$pink: #f69ab2; -$red: #eb2256; -$orange: #fd7e14; -$yellow: #f0ad4e; -$green: #2cbb69; -$teal: #709cf0; -$cyan: #3498DB; -$primary: $blue; -$secondary: $gray-800; -$success: $green; -$sub-header: $gray-800; -$info: $gray-800; -$warning: $yellow; -$danger: $red; -$light: $gray-800; -$dark: #121326; -$body-bg: $dark; -$body-color: rgba($white, .65); -$link-color: $red; - -$card-cap-bg: $gray-900; -$card-bg: $gray-900; - -// Font, line-height, and color for body text, headings, and more. -$font-family-sans-serif: 'Montserrat','Helvetica Neue', Arial, sans-serif; -$font-family-base: $font-family-sans-serif !default; - -$font-weight-normal: normal !default; -$font-weight-bold: bold !default; - -$font-size-base: .8rem; -$font-size-lg: 1.5rem; -$font-size-sm: 0.75rem; -$font-size-xs: 0.75rem !default; - -$font-weight-light: 200; -$font-weight-normal: 300; -$font-weight-bold: 400; - -$line-height-base: 1.7; -$font-weight-base: 200; - -$h1-font-size: $font-size-base * 1.2; -$h2-font-size: $font-size-base * 1.1; -$h3-font-size: $font-size-base * 1; -$h4-font-size: $font-size-base * 0.8; -$h5-font-size: $font-size-base * 1; -$h6-font-size: $font-size-base; - -$headings-font-family: inherit !default; -$headings-font-weight: 200; -$headings-line-height: 1.2 !default; -$headings-color: #fff; - -$display1-size: 6rem !default; -$display2-size: 5.5rem !default; -$display3-size: 4.5rem !default; -$display4-size: 3.5rem !default; - -$body-color: $white !default; -$headings-font-weight: 400; -$table-accent-bg: $gray-800; -$table-border-color: $gray-700; -$table-dark-bg: $gray-500; -$table-dark-border-color: darken($gray-500, 7.5%); -$table-dark-color: $body-bg; -$input-bg : transparent; -$input-border-color: transparent; -$input-group-addon-color: $gray-500; -$input-group-addon-bg: $gray-700; -$dropdown-bg: $gray-900; -$dropdown-border-color: $gray-700; -$dropdown-divider-bg: $gray-700; -$dropdown-link-color: $white; -$dropdown-link-hover-color: $white; -$dropdown-link-hover-bg: $primary; -$nav-link-padding-x: 2rem; -$nav-link-disabled-color: $gray-200; -$nav-tabs-border-color: $gray-700; -$nav-tabs-link-hover-border-color: $nav-tabs-border-color; -$nav-tabs-link-active-border-color: $nav-tabs-border-color; -$nav-tabs-link-active-color: $red; -$navbar-padding-y: 1rem; -$navbar-dark-color: $white; -$navbar-dark-hover-color: $success; -$navbar-light-color: rgba($white,.5); -$navbar-light-hover-color: $white; -$navbar-light-active-color: $red; -$navbar-light-disabled-color: rgba($white,.3); -$navbar-light-toggler-border-color: transparent; -$navbar-light-toggler-bg: $red; -$pagination-color: $white; -$pagination-bg: $success; -$pagination-border-width: 0; -$pagination-border-color: transparent; -$pagination-hover-color: $white; -$pagination-hover-bg: lighten($success, 10%); -$pagination-hover-border-color: transparent; -$pagination-active-bg: $pagination-hover-bg; -$pagination-active-border-color: transparent; -$pagination-disabled-color: $white; -$pagination-disabled-bg: darken($success, 15%); -$pagination-disabled-border-color: transparent; -$jumbotron-bg: transparent; -$card-cap-bg: $gray-800; -$card-bg: $gray-900; -$section-border: $lightPurple; -$card-border-color: transparent; -$popover-bg: $gray-800; -$popover-header-bg: $gray-700; -$modal-content-bg: $gray-800; -$modal-content-border-color: $gray-700; -$modal-header-border-color: $gray-700; -$progress-height: 0.625rem; -$progress-font-size: 0.625rem; -$progress-bg: $gray-700; -$list-group-bg: $gray-800; -$list-group-border-color: $gray-700; -$list-group-hover-bg: $gray-700; -$breadcrumb-bg: $gray-700; -$close-color: $white; -$close-text-shadow: none; -$pre-color: inherit; -$border-radius-sm: 1px; -$border-radius-lg: 3px; -$border-radius: 2px; - -$input-btn-padding-x: 3rem; diff --git a/plutus-pab-client/test/JsonEncodingTests.purs b/plutus-pab-client/test/JsonEncodingTests.purs deleted file mode 100644 index ff4e953356..0000000000 --- a/plutus-pab-client/test/JsonEncodingTests.purs +++ /dev/null @@ -1,27 +0,0 @@ -module JsonEncodingTests - ( all - ) where - -import Prelude -import Plutus.PAB.Effects.Contract.ContractTest (TestContracts) -import Plutus.PAB.Webserver.Types (FullReport, ContractSignatureResponse) -import Test.Unit (TestSuite, suite, test) -import TestUtils (assertDecodesTo) -import Type.Proxy (Proxy(..)) - -all :: TestSuite -all = - suite "JsonEncoding" do - jsonHandlingTests - -jsonHandlingTests :: TestSuite -jsonHandlingTests = do - suite "Json handling" do - test "Decode a full report response." do - assertDecodesTo - (Proxy :: Proxy (FullReport TestContracts)) - "generated/full_report_response.json" - test "Decode a contract schema response." do - assertDecodesTo - (Proxy :: Proxy (ContractSignatureResponse TestContracts)) - "generated/contract_schema_response.json" diff --git a/plutus-pab-client/test/Main.js b/plutus-pab-client/test/Main.js deleted file mode 100644 index da2a4624e3..0000000000 --- a/plutus-pab-client/test/Main.js +++ /dev/null @@ -1,7 +0,0 @@ -/*eslint-env node*/ -/*global exports require*/ - -window = {}; -document = {}; - -exports.forDeps = function () {}; diff --git a/plutus-pab-client/test/Main.purs b/plutus-pab-client/test/Main.purs deleted file mode 100644 index f0dff26aef..0000000000 --- a/plutus-pab-client/test/Main.purs +++ /dev/null @@ -1,17 +0,0 @@ -module Test.Main where - -import Effect (Effect) -import Prelude ---import JsonEncodingTests as JsonEncodingTests ---import MainFrameTests as MainFrameTests -import Test.Unit.Main (runTest) - -foreign import forDeps :: Effect Unit - -main :: Effect Unit -main = - runTest do - pure unit - ---JsonEncodingTests.all ---MainFrameTests.all diff --git a/plutus-pab-client/test/MainFrameTests.purs b/plutus-pab-client/test/MainFrameTests.purs deleted file mode 100644 index 8576abbaaf..0000000000 --- a/plutus-pab-client/test/MainFrameTests.purs +++ /dev/null @@ -1,116 +0,0 @@ -module MainFrameTests - ( all - ) where - -import Prelude -import Types (HAction(..), Query, State, _currentView) -import Animation (class MonadAnimate) -import Clipboard (class MonadClipboard) -import Control.Monad.Except.Trans (class MonadThrow) -import Control.Monad.RWS (RWSResult(..), RWST(..), runRWST) -import Control.Monad.Reader.Class (class MonadAsk) -import Control.Monad.State.Class (class MonadState) -import Control.Monad.Trans.Class (class MonadTrans) -import Data.Either (Either(..)) -import Data.Lens (_1, appendModifying, view) -import Data.Lens.Record (prop) -import Data.Newtype (class Newtype, unwrap, wrap) -import Data.Symbol (SProxy(..)) -import Data.Traversable (traverse_) -import Data.Tuple (Tuple(..)) -import Effect.Exception (Error) -import MainFrame (handleQuery, handleAction) -import MainFrame as MainFrame -import MonadApp (class MonadApp) -import Network.RemoteData (RemoteData(..)) -import Plutus.PAB.Webserver (SPParams_(..)) -import Servant.PureScript.Settings (SPSettings_, defaultSettings) -import Test.QuickCheck (()) -import Test.Unit (TestSuite, suite, test) -import Test.Unit.QuickCheck (quickCheck) -import ContractExample (ExampleContracts) - -type World - = { console :: Array String } - -execMockApp :: forall m a. MonadThrow Error m => World -> Array (Either (Query a) (HAction ExampleContracts)) -> m (Tuple World (State ExampleContracts)) -execMockApp world queries = do - let - initialState = MainFrame.initialState - - handle (Left query) = void $ handleQuery query - - handle (Right action) = handleAction action - RWSResult state result writer <- - runRWST - (unwrap (traverse_ handle queries :: MockApp m Unit)) - (defaultSettings (SPParams_ { baseURL: "/" })) - (Tuple world initialState) - pure state - --- | A dummy implementation of `MonadApp`, for testing the main handleAction loop. -newtype MockApp m a - = MockApp (RWST (SPSettings_ SPParams_) Unit (Tuple World (State ExampleContracts)) m a) - -derive instance newtypeMockApp :: Newtype (MockApp m a) _ - -derive newtype instance functorMockApp :: Functor m => Functor (MockApp m) - -derive newtype instance applicativeMockApp :: Monad m => Applicative (MockApp m) - -derive newtype instance applyMockApp :: Bind m => Apply (MockApp m) - -derive newtype instance bindMockApp :: Bind m => Bind (MockApp m) - -derive newtype instance monadMockApp :: Monad m => Monad (MockApp m) - -derive newtype instance monadTransMockApp :: MonadTrans MockApp - -derive newtype instance monadAskMockApp :: Monad m => MonadAsk (SPSettings_ SPParams_) (MockApp m) - -instance monadStateMockApp :: Monad m => MonadState (State ExampleContracts) (MockApp m) where - state f = - MockApp - $ RWST \r (Tuple world appState) -> case f appState of - (Tuple a appState') -> pure $ RWSResult (Tuple world appState') a unit - -instance monadAppMockApp :: Monad m => MonadApp (MockApp m) where - activateContract _ = pure Loading - invokeEndpoint _ _ _ = pure Loading - getFullReport = pure Loading - getContractInstanceStatus _ = pure Loading - getContractInstances _ = pure Loading - getContractDefinitions = pure Loading - sendWebSocketMessage _ = pure unit - log msg = - wrap - $ appendModifying - (_1 <<< prop (SProxy :: SProxy "console")) - [ msg ] - --- | The mock app makes no attempt to animate anything, and just calls the embedded `action`. -instance monadAnimateMockApp :: MonadAnimate (MockApp m) (State ExampleContracts) where - animate toggle action = action - -instance monadClipboardMockApp :: Monad m => MonadClipboard (MockApp m) where - copy _ = pure unit - ------------------------------------------------------------- -mockWorld :: World -mockWorld = { console: [] } - -all :: TestSuite -all = - suite "MainFrame" do - evalTests - -evalTests :: TestSuite -evalTests = - suite "handleAction" do - test "ChangeView" do - quickCheck \aView -> do - let - result = execMockApp mockWorld [ Right $ ChangeView aView ] - case result of - Right (Tuple _ finalState) -> (aView == view _currentView finalState) "Unexpected final view." - Left err -> false show err diff --git a/plutus-pab-client/web-common b/plutus-pab-client/web-common deleted file mode 120000 index 3159f1766a..0000000000 --- a/plutus-pab-client/web-common +++ /dev/null @@ -1 +0,0 @@ -../web-common \ No newline at end of file diff --git a/plutus-pab-client/web-common-plutus b/plutus-pab-client/web-common-plutus deleted file mode 120000 index 77c7faa1cb..0000000000 --- a/plutus-pab-client/web-common-plutus +++ /dev/null @@ -1 +0,0 @@ -../web-common-plutus \ No newline at end of file diff --git a/plutus-pab-client/webpack.config.js b/plutus-pab-client/webpack.config.js deleted file mode 100644 index 4999f43d65..0000000000 --- a/plutus-pab-client/webpack.config.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -const ExtractTextPlugin = require("extract-text-webpack-plugin"); -const HtmlWebpackPlugin = require('html-webpack-plugin'); -const path = require('path'); -const webpack = require('webpack'); - -const isWebpackDevServer = process.argv.some(a => path.basename(a) === 'webpack-dev-server'); - -const isWatch = process.argv.some(a => a === '--watch'); - -const plugins = - isWebpackDevServer || !isWatch ? [] : [ - function(){ - this.plugin('done', function(stats){ - process.stderr.write(stats.toString('errors-only')); - }); - } - ] -; - -// source map adds many Mb to the output! -const devtool = isWebpackDevServer ? 'eval-source-map' : false; - -module.exports = { - devtool, - - devServer: { - contentBase: path.join(__dirname, "dist"), - compress: true, - port: 8009, - https: true, - proxy: { - "/api": { - target: 'http://localhost:9080' - }, - "/ws": { - target: 'ws://localhost:9080', - ws: true, - onError(err) { - console.log('Error with the WebSocket:', err); - } - } - } - }, - - entry: './entry.js', - - output: { - path: path.join(__dirname, 'dist'), - pathinfo: true, - filename: 'app.[hash].js' - }, - - module: { - rules: [ - { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&mimetype=application/font-woff" }, - { test: /fontawesome-.*\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" }, - { - test: /\.purs$/, - use: [ - { - loader: 'purs-loader', - options: { - src: [ - 'src/**/*.purs', - 'generated/**/*.purs', - '.spago/*/*/src/**/*.purs', - 'web-common-plutus/**/*.purs', - 'web-common/**/*.purs' - ], - psc: null, - bundle: !(isWebpackDevServer || isWatch), - warnings: true, - watch: isWebpackDevServer || isWatch, - pscPackage: false, - pscIde: false - } - } - ] - }, - { - test: /\.css$/, - use: ['style-loader', 'css-loader'] - }, - { - test: /\.scss$/, - use: ['style-loader', 'css-loader', 'sass-loader'] - }, - { - test: /\.(gif|png|jpe?g|svg)$/i, - use: 'url-loader' - } - ] - }, - - resolve: { - modules: [ - // We need the second entry for node to be able to - // locate `node_modules` from client directory when - // modules are referenced from inside `web-common`. - 'node_modules', path.resolve(__dirname, './node_modules') - ], - extensions: [ '.purs', '.js'] - }, - - plugins: [ - new webpack.LoaderOptionsPlugin({ - debug: true - }), - new HtmlWebpackPlugin({ - template: 'static/index.html', - favicon: 'static/favicon.ico', - title: 'SCB', - productName: 'plutus-pab' - }) - ].concat(plugins) -}; diff --git a/plutus-pab/README.md b/plutus-pab/README.md index ffaca39b6a..77fa15c4a4 100644 --- a/plutus-pab/README.md +++ b/plutus-pab/README.md @@ -25,46 +25,6 @@ $ cabal build $ nix-build ../default.nix -A plutus-apps.haskell.packages.plutus-pab ``` -## Running - -In order to use PAB several of its components need to be started. Furthermore the pab-client has -to be started in order to access the web frontend. The required steps are described below, assuming -nix has been installed. - -First we build the startup scripts: - -``` -$ nix-build ../default.nix -A plutus-pab.demo-scripts -``` - -Next we start all required servers and install several contracts, in one terminal: - -``` -$ ./result/bin/pab-start-all-servers -``` - -Now we start an additional PAB connecting to the same node, in another terminal: - -``` -$ ./result/bin/pab-start-second-pab -``` - -Finally we can start the pab web frontend using tool provided by nix environment, in a third terminal at root of plutus repo: - -``` -$ nix-shell -$ cd plutus-pab-client -$ npm start -``` - -The client is now running at https://localhost:8009 -- See [pab-demo-scripts.nix](https://github.com/input-output-hk/plutus-apps/blob/main/plutus-pab-client/pab-demo-scripts.nix) for details on the service invcation and contract installation. - -**Note**: In order to support local modification of the client's pab config, a copy of `plutus-pab/plutus-pab.yaml.sample` is used only in the absense of `plutus-pab-client/plutus-pab.yaml`. You will need to manually delete the client's copy if the sample config's schema is updated. - -**Note**: By default the frontend will forward requests to `localhost:9080` - the first PAB instance. Connecting to the second -instance currently requires changing the proxy config in [webpack.config.js](https://github.com/input-output-hk/plutus-apps/blob/main/plutus-pab-client/webpack.config.js#L33-L41). The second instance runs on port 9086 so the linked section in the config file would have to be -updated accordingly. - ## PAB Components PAB contains several commands and services, which are outlined below. diff --git a/plutus-pab/examples/ContractExample.hs b/plutus-pab/examples/ContractExample.hs index 60467db531..d047b645e4 100644 --- a/plutus-pab/examples/ContractExample.hs +++ b/plutus-pab/examples/ContractExample.hs @@ -25,10 +25,9 @@ import ContractExample.AtomicSwap qualified as Contracts.AtomicSwap import ContractExample.IntegrationTest qualified as Contracts.IntegrationTest import ContractExample.PayToWallet qualified as Contracts.PayToWallet import ContractExample.WaitForTx qualified as Contracts.WaitForTx -import Data.Data (Proxy (Proxy)) import Data.OpenApi.Schema qualified as OpenApi import Data.Row -import Language.PureScript.Bridge (equal, genericShow, mkSumType) +import Language.PureScript.Bridge (argonaut, equal, genericShow, mkSumType, order) import Language.PureScript.Bridge.TypeParameters (A) import Ledger (TxId) import Playground.Types (FunctionSchema) @@ -68,12 +67,12 @@ instance Pretty ExampleContracts where pretty = viaShow instance HasPSTypes ExampleContracts where - psTypes p = - [ (equal <*> (genericShow <*> mkSumType)) p + psTypes = + [ equal . genericShow . argonaut $ mkSumType @ExampleContracts -- These types come from the Uniswap contract and need to be available in PS - , (equal <*> (genericShow <*> mkSumType)) (Proxy @Uniswap) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(Coin A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @U) + , equal . genericShow . argonaut $ mkSumType @Uniswap + , equal . genericShow . argonaut $ mkSumType @(Coin A) + , order . equal . genericShow $ argonaut $ mkSumType @U ] instance HasDefinitions ExampleContracts where diff --git a/plutus-pab/src/Plutus/PAB/Run/Cli.hs b/plutus-pab/src/Plutus/PAB/Run/Cli.hs index 8f76c7438f..7a31720f0d 100644 --- a/plutus-pab/src/Plutus/PAB/Run/Cli.hs +++ b/plutus-pab/src/Plutus/PAB/Run/Cli.hs @@ -268,7 +268,7 @@ runConfigCommand _ ConfigCommandArgs{ccaTrace, ccaPABConfig=Config{dbConfig}} (R runConfigCommand _ _ PSApiGenerator {psApiGenOutputDir} = do PSGenerator.generateAPIModule (Proxy @a) psApiGenOutputDir - PSGenerator.generateWith (Proxy @a) psApiGenOutputDir + PSGenerator.generateWith @a psApiGenOutputDir toPABMsg :: Trace m (LM.AppMsg (Builtin a)) -> Trace m (LM.PABLogMsg (Builtin a)) toPABMsg = LM.convertLog LM.PABMsg diff --git a/plutus-pab/src/Plutus/PAB/Run/PSGenerator.hs b/plutus-pab/src/Plutus/PAB/Run/PSGenerator.hs index d10fe24021..347c802877 100644 --- a/plutus-pab/src/Plutus/PAB/Run/PSGenerator.hs +++ b/plutus-pab/src/Plutus/PAB/Run/PSGenerator.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleContexts #-} @@ -25,10 +26,8 @@ import Control.Monad.Freer.Extras.Log (LogLevel, LogMessage) import Data.Proxy (Proxy (Proxy)) import Data.Text qualified as Text import Data.Typeable (Typeable) -import Language.PureScript.Bridge (BridgePart, Language (Haskell), SumType, buildBridge, equal, genericShow, mkSumType, - order, writePSTypesWith) -import Language.PureScript.Bridge.CodeGenSwitches (ForeignOptions (ForeignOptions), genForeign, - unwrapSingleConstructors) +import Language.PureScript.Bridge (BridgePart, Language (Haskell), SumType, argonaut, buildBridge, equal, genericShow, + mkSumType, order, writePSTypes) import Language.PureScript.Bridge.TypeParameters (A, B) import PSGenerator.Common qualified import Plutus.Contract.Checkpoint (CheckpointKey, CheckpointStore, CheckpointStoreItem) @@ -43,14 +42,14 @@ import Plutus.PAB.Webserver.Types (ChainReport, CombinedWSStreamToClient, Combin ContractActivationArgs, ContractInstanceClientState, ContractReport, ContractSignatureResponse, FullReport, InstanceStatusToClient) import Servant ((:<|>)) -import Servant.PureScript (HasBridge, Settings, _generateSubscriberAPI, apiModuleName, defaultBridge, defaultSettings, - languageBridge, writeAPIModuleWithSettings) +import Servant.PureScript (HasBridge, Settings, apiModuleName, defaultBridge, defaultSettings, languageBridge, + writeAPIModuleWithSettings) -- | List of types linked to contract type `a` that need to be available in -- Purescript. class HasPSTypes a where - psTypes :: Proxy a -> [SumType 'Haskell] - psTypes _ = [] + psTypes :: [SumType 'Haskell] + psTypes = [] -- | PAB's main bridge that includes common bridges pabBridge :: BridgePart @@ -77,42 +76,41 @@ pabTypes = PSGenerator.Common.ledgerTypes <> PSGenerator.Common.playgroundTypes <> PSGenerator.Common.walletTypes <> - [ (equal <*> (genericShow <*> mkSumType)) (Proxy @(Builtin A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(FullReport A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ChainReport) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(ContractReport A)) - , (equal <*> (genericShow <*> mkSumType)) - (Proxy @(ContractSignatureResponse A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(PartiallyDecodedResponse A)) + -- This type has been handwritten in the frontend. See note there, or try + -- generating it yourself to see why it's problematic. + -- [ order . equal . genericShow . argonaut $ mkSumType @(Builtin A) + [ equal . genericShow . argonaut $ mkSumType @(FullReport A) + , equal . genericShow . argonaut $ mkSumType @ChainReport + , equal . genericShow . argonaut $ mkSumType @(ContractReport A) + , equal . genericShow . argonaut $ mkSumType @(ContractSignatureResponse A) + , equal . genericShow . argonaut $ mkSumType @(PartiallyDecodedResponse A) -- Contract request / response types - , (equal <*> (genericShow <*> mkSumType)) (Proxy @CheckpointStore) - , (order <*> (genericShow <*> mkSumType)) (Proxy @CheckpointKey) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(CheckpointStoreItem A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(Responses A)) + , equal . genericShow . argonaut $ mkSumType @CheckpointStore + , order . genericShow . argonaut $ mkSumType @CheckpointKey + , equal . genericShow . argonaut $ mkSumType @(CheckpointStoreItem A) + , equal . genericShow . argonaut $ mkSumType @(Responses A) -- Contract error types - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(InvalidTransition A B)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(State A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @SMContractError) + , equal . genericShow . argonaut $ mkSumType @(InvalidTransition A B) + , equal . genericShow . argonaut $ mkSumType @(State A) + , equal . genericShow . argonaut $ mkSumType @SMContractError -- Logging types - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(LogMessage A)) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @LogLevel) + , equal . genericShow . argonaut $ mkSumType @(LogMessage A) + , order . equal . genericShow . argonaut $ mkSumType @LogLevel -- Web API types - , (equal <*> (genericShow <*> mkSumType)) (Proxy @(ContractActivationArgs A)) - , (genericShow <*> mkSumType) (Proxy @(ContractInstanceClientState A)) - , (genericShow <*> mkSumType) (Proxy @InstanceStatusToClient) - , (genericShow <*> mkSumType) (Proxy @CombinedWSStreamToClient) - , (genericShow <*> mkSumType) (Proxy @CombinedWSStreamToServer) - , (genericShow <*> mkSumType) (Proxy @WalletInfo) + , equal . genericShow . argonaut $ mkSumType @(ContractActivationArgs A) + , genericShow . argonaut $ mkSumType @(ContractInstanceClientState A) + , genericShow . argonaut $ mkSumType @InstanceStatusToClient + , genericShow . argonaut $ mkSumType @CombinedWSStreamToClient + , genericShow . argonaut $ mkSumType @CombinedWSStreamToServer + , genericShow . argonaut $ mkSumType @WalletInfo ] mySettings :: Settings -mySettings = - (defaultSettings & set apiModuleName "Plutus.PAB.Webserver") - {_generateSubscriberAPI = False} +mySettings = defaultSettings & set apiModuleName "Plutus.PAB.Webserver" ------------------------------------------------------------ -- | Use the Proxy for specifying `a` when generating PS functions for the @@ -137,24 +135,16 @@ generateDefault :: FilePath -- ^ Output directory of PS files -> IO () generateDefault outputDir = do - writePSTypesWith - (genForeign (ForeignOptions {unwrapSingleConstructors = True})) - outputDir - (buildBridge pabBridge) - pabTypes + writePSTypes outputDir (buildBridge pabBridge) pabTypes putStrLn $ "Done: " <> outputDir -- | Generate PS modules in 'outputDir' for types specified with 'HasPSTypes' -- typeclass. generateWith - :: HasPSTypes a - => Proxy a -- ^ Proxy for type `a` which defines the 'HasPSTypes' typeclass. - -> FilePath -- ^ Output directory of PS files + :: forall a + . HasPSTypes a + => FilePath -- ^ Output directory of PS files -> IO () -generateWith proxy outputDir = do - writePSTypesWith - (genForeign (ForeignOptions {unwrapSingleConstructors = True})) - outputDir - (buildBridge pabBridge) - (psTypes proxy) +generateWith outputDir = do + writePSTypes outputDir (buildBridge pabBridge) (psTypes @a) putStrLn $ "Done: " <> outputDir diff --git a/plutus-pab/test-psgenerator/TestPSGenerator.hs b/plutus-pab/test-psgenerator/TestPSGenerator.hs index 0f89e70ea6..07b495c240 100644 --- a/plutus-pab/test-psgenerator/TestPSGenerator.hs +++ b/plutus-pab/test-psgenerator/TestPSGenerator.hs @@ -17,8 +17,7 @@ import Data.ByteString.Lazy qualified as BSL import Data.Proxy (Proxy (..)) import Data.Text qualified as Text import Language.PureScript.Bridge (BridgePart, Language (Haskell), SumType, buildBridge, defaultBridge, equal, - genericShow, mkSumType, writePSTypesWith, (<|>)) -import Language.PureScript.Bridge.CodeGenSwitches (ForeignOptions (..), genForeign) + genericShow, mkSumType, order, writePSTypes, (<|>)) import PSGenerator.Common qualified import Plutus.Contracts.Currency (SimpleMPS (..)) import Plutus.PAB.Effects.Contract.ContractTest (TestContracts (Currency, GameStateMachine)) @@ -52,16 +51,12 @@ instance HasBridge TestBridge where testTypes :: [SumType 'Haskell] testTypes = - [ (equal <*> (genericShow <*> mkSumType)) (Proxy @TestContracts) ] + [ order . equal . genericShow $ mkSumType @TestContracts ] main :: IO () main = getArgs >>= \case [outputDir] -> do - writePSTypesWith - (genForeign (ForeignOptions {unwrapSingleConstructors = True})) - outputDir - (buildBridge testBridge) - testTypes + writePSTypes outputDir (buildBridge testBridge) testTypes writeTestData outputDir _ -> putStrLn "Usage: plutus-pab-test-psgenerator FILEPATH" diff --git a/plutus-pab/test/full/Plutus/PAB/CliSpec.hs b/plutus-pab/test/full/Plutus/PAB/CliSpec.hs index b0e908f22e..62ee007f34 100644 --- a/plutus-pab/test/full/Plutus/PAB/CliSpec.hs +++ b/plutus-pab/test/full/Plutus/PAB/CliSpec.hs @@ -37,7 +37,6 @@ import Data.Default (def) import Data.Either (isLeft) import Data.List (delete) import Data.OpenApi.Schema qualified as OpenApi -import Data.Proxy (Proxy (Proxy)) import Data.Text qualified as Text import Data.Yaml (decodeFileThrow) import GHC.Generics (Generic) @@ -65,7 +64,6 @@ import Plutus.PAB.Webserver.API (API) import Plutus.PAB.Webserver.Client (InstanceClient (..), PabClient (..), pabClient) import Plutus.PAB.Webserver.Types (ContractActivationArgs (..)) import Prettyprinter -import Prettyprinter (Pretty) import Servant ((:<|>) (..)) import Servant qualified import Servant.Client (BaseUrl (..), ClientEnv, Scheme (Http), client, mkClientEnv, runClientM) @@ -90,7 +88,7 @@ instance HasDefinitions TestingContracts where getContract _ = SomeBuiltin PingPong.simplePingPong instance HasPSTypes TestingContracts where - psTypes _ = undefined + psTypes = undefined instance Pretty TestingContracts where pretty = viaShow diff --git a/plutus-playground-client/default.nix b/plutus-playground-client/default.nix index 0c025a6c29..f193e02f40 100644 --- a/plutus-playground-client/default.nix +++ b/plutus-playground-client/default.nix @@ -60,25 +60,27 @@ let packageLockJson = ./package-lock.json; }; - client = buildPursPackage { - inherit pkgs nodeModules; - src = cleanSrc; - name = "plutus-playground-client"; - # ideally we would just use `npm run test` but - # this executes `spago` which *always* attempts to download - # remote files (which obviously fails in sandboxed builds) - checkPhase = '' - node -e 'require("./output/Test.Main").main()' - ''; - extraSrcs = { - web-common = webCommon.cleanSrc; - web-common-plutus = webCommonPlutus; - web-common-playground = webCommonPlayground; - generated = generated-purescript; - }; - packages = pkgs.callPackage ./packages.nix { }; - spagoPackages = pkgs.callPackage ./spago-packages.nix { }; - }; + client = pkgs.lib.overrideDerivation + (buildPursPackage { + inherit pkgs nodeModules; + src = cleanSrc; + name = "plutus-playground-client"; + # ideally we would just use `npm run test` but + # this executes `spago` which *always* attempts to download + # remote files (which obviously fails in sandboxed builds) + checkPhase = '' + node -e 'require("./output/Test.Main").main()' + ''; + extraSrcs = { + web-common-plutus = webCommonPlutus; + web-common-playground = webCommonPlayground; + generated = generated-purescript; + }; + spagoPackages = pkgs.callPackage ./spago-packages.nix { }; + }) + (_: { + WEB_COMMON_SRC = webCommon; + }); in { inherit client generate-purescript start-backend; diff --git a/plutus-playground-client/entry.js b/plutus-playground-client/entry.js index 7c44f0497d..2506c0bc1f 100644 --- a/plutus-playground-client/entry.js +++ b/plutus-playground-client/entry.js @@ -17,4 +17,4 @@ global.VimMode = VimMode; global.initVimMode = initVimMode; global.monacoExtraTypeScriptLibs = []; -import './src/Main.purs'; +require('./src/Main.purs').main(); diff --git a/plutus-playground-client/package-lock.json b/plutus-playground-client/package-lock.json index c59668e7f9..ca80a8a772 100644 --- a/plutus-playground-client/package-lock.json +++ b/plutus-playground-client/package-lock.json @@ -592,6 +592,11 @@ "tweetnacl": "^0.14.3" } }, + "big-integer": { + "version": "1.6.50", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.50.tgz", + "integrity": "sha512-+O2uoQWFRo8ysZNo/rjtri2jIwjr3XfeAgRjAUADRqGG+ZITvyn8J1kvXLTaKVr3hhGXk+f23tKfdzmklVM9vQ==" + }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -4396,12 +4401,6 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, - "purescript-psa": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/purescript-psa/-/purescript-psa-0.8.2.tgz", - "integrity": "sha512-4Olf0aQQrNCfcDLXQI3gJgINEQ+3U+4QPLmQ2LHX2L/YOXSwM7fOGIUs/wMm/FQnwERUyQmHKQTJKB4LIjE2fg==", - "dev": true - }, "purs-loader": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/purs-loader/-/purs-loader-3.7.2.tgz", diff --git a/plutus-playground-client/package.json b/plutus-playground-client/package.json index 957092cda6..7c582e1e25 100644 --- a/plutus-playground-client/package.json +++ b/plutus-playground-client/package.json @@ -2,20 +2,23 @@ "name": "plutus-playground-client", "version": "1.0.0", "scripts": { - "webpack": "webpack --progress --bail --mode=production --node-env=production", - "webpack:server": "webpack-cli serve --progress --inline --hot --mode=development --node-env=development", - "purs:compile": "spago build", - "purs:ide": "purs ide server --log-level=debug 'src/**/*.purs' 'generated/**/*.purs' 'test/**/*.purs' 'web-common/**/*.purs' 'web-common-marlowe/**/*.purs'", - "test": "spago --no-psa test", - "test:watch": "spago test --no-psa --watch", + "build:spago": "spago build --purs-args \"--strict --censor-lib --stash --is-lib=generated --is-lib=.spago\"", + "build:spago:watch": "spago build --purs-args \"--strict --censor-lib --stash --is-lib=generated --is-lib=.spago\" --watch --clear-screen", + "build:webpack": "webpack-cli serve --progress --inline --hot --mode=development --node-env=development", + "build:webpack:prod": "webpack --progress --bail --mode=production --node-env=production", + "build:webpack:dev": "webpack-cli serve --progress --inline --hot --mode=development --node-env=development", + "install:spago": "spago install", "docs": "spago docs", "repl": "spago repl", - "start": "npm install && plutus-playground-generate-purs && npm run purs:compile && npm run webpack:server" + "start": "plutus-playground-generate-purs && npm install && npm run install:spago && npm run build:webpack:dev", + "test": "spago test --purs-args \"--strict --censor-lib --stash --is-lib=generated --is-lib=.spago\"", + "test:watch": "spago test --purs-args \"--strict --censor-lib --stash --is-lib=generated --is-lib=.spago\" --watch --clear-screen" }, "resolutions": {}, "license": "Apache-2.0", "dependencies": { "@fortawesome/fontawesome-free": "^5.10.2", + "big-integer": "^1.6.50", "bignumber": "^1.1.0", "chartist": "^0.11.4", "chartist-plugin-axistitle": "^0.0.7", @@ -37,7 +40,6 @@ "html-webpack-plugin": "^5.3.1", "mini-css-extract-plugin": "^1.5.1", "node-sass": "^5.0.0", - "purescript-psa": "^0.8.2", "purs-loader": "^3.7.2", "sass-loader": "^11.0.1", "style-loader": "^2.0.0", diff --git a/plutus-playground-client/packages.dhall b/plutus-playground-client/packages.dhall deleted file mode 100644 index 96a388f0a6..0000000000 --- a/plutus-playground-client/packages.dhall +++ /dev/null @@ -1,199 +0,0 @@ -{- -Welcome to your new Dhall package-set! - -Below are instructions for how to edit this file for most use -cases, so that you don't need to know Dhall to use it. - -## Warning: Don't Move This Top-Level Comment! - -Due to how `dhall format` currently works, this comment's -instructions cannot appear near corresponding sections below -because `dhall format` will delete the comment. However, -it will not delete a top-level comment like this one. - -## Use Cases - -Most will want to do one or both of these options: -1. Override/Patch a package's dependency -2. Add a package not already in the default package set - -This file will continue to work whether you use one or both options. -Instructions for each option are explained below. - -### Overriding/Patching a package - -Purpose: -- Change a package's dependency to a newer/older release than the - default package set's release -- Use your own modified version of some dependency that may - include new API, changed API, removed API by - using your custom git repo of the library rather than - the package set's repo - -Syntax: -Replace the overrides' "{=}" (an empty record) with the following idea -The "//" or "⫽" means "merge these two records and - when they have the same value, use the one on the right:" -------------------------------- -let override = - { packageName = - upstream.packageName // { updateEntity1 = "new value", updateEntity2 = "new value" } - , packageName = - upstream.packageName // { version = "v4.0.0" } - , packageName = - upstream.packageName // { repo = "https://www.example.com/path/to/new/repo.git" } - } -------------------------------- - -Example: -------------------------------- -let overrides = - { halogen = - upstream.halogen // { version = "master" } - , halogen-vdom = - upstream.halogen-vdom // { version = "v4.0.0" } - } -------------------------------- - -### Additions - -Purpose: -- Add packages that aren't already included in the default package set - -Syntax: -Replace the additions' "{=}" (an empty record) with the following idea: -------------------------------- -let additions = - { package-name = - { dependencies = - [ "dependency1" - , "dependency2" - ] - , repo = - "https://example.com/path/to/git/repo.git" - , version = - "tag ('v4.0.0') or branch ('master')" - } - , package-name = - { dependencies = - [ "dependency1" - , "dependency2" - ] - , repo = - "https://example.com/path/to/git/repo.git" - , version = - "tag ('v4.0.0') or branch ('master')" - } - , etc. - } -------------------------------- - -Example: -------------------------------- -let additions = - { benchotron = - { dependencies = - [ "arrays" - , "exists" - , "profunctor" - , "strings" - , "quickcheck" - , "lcg" - , "transformers" - , "foldable-traversable" - , "exceptions" - , "node-fs" - , "node-buffer" - , "node-readline" - , "datetime" - , "now" - ] - , repo = - "https://github.com/hdgarrood/purescript-benchotron.git" - , version = - "v7.0.0" - } - } -------------------------------- --} - - -let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.13.6-20200502/packages.dhall sha256:1e1ecbf222c709b76cc7e24cf63af3c2089ffd22bbb1e3379dfd3c07a1787694 - -let overrides = - {- The package set we're using has `purescript-uuid` v6. This depends on the `uuid-validate` node - module, which only works in node (it uses node's Buffer API). This was fine when we were using - webpack 4, which provides polyfills for node stuff automatically. But webpack 5 - rightly, in - my opinion - no longer provides these polyfills. I was going to add it back in manually when I - noticed that the newer versions of `purescript-uuid` use the `uuid` node module, which works - in the browser out of the box. :tada: - -} - { uuid = - { dependencies = [ "effect", "maybe", "foreign-generic", "console", "spec" ] - , repo = "https://github.com/spicydonuts/purescript-uuid.git" - , version = "v8.0.0" - } - } - -let additions = - { servant-support = - { dependencies = - [ "console" - , "prelude" - , "either" - , "foldable-traversable" - , "generics-rep" - , "effect" - , "aff" - , "affjax" - , "exceptions" - , "web-xhr" - , "foreign-generic" - ] - , repo = - "https://github.com/shmish111/purescript-servant-support" - , version = - "1805f896560751c48a04d3e29f9c109df850d8d3" - } - , foreign-generic = - upstream.foreign-generic - // { repo = - "https://github.com/shmish111/purescript-foreign-generic" - , version = - "57692ed7b1bc512bcfddd2c00c27e865e9c21b84" - } - , concurrent-queues = - { dependencies = - [ "aff" - , "avar" - ] - , repo = - "https://github.com/purescript-contrib/purescript-concurrent-queues.git" - , version = - "v1.1.0" - } - , matryoshka = - { dependencies = - [ "prelude" - , "fixed-points" - , "free" - , "transformers" - , "profunctor" - ] - , repo = - "https://github.com/slamdata/purescript-matryoshka.git" - , version = - "v0.4.0" - } - , numerics = - { dependencies = - [ "prelude", "integers", "rationals", "uint", "bigints" ] - , repo = - "https://github.com/Proclivis/purescript-numerics" - , version = - "v0.1.2" - } - } - -in upstream // overrides // additions diff --git a/plutus-playground-client/packages.json b/plutus-playground-client/packages.json deleted file mode 100644 index 370f332db2..0000000000 --- a/plutus-playground-client/packages.json +++ /dev/null @@ -1,3626 +0,0 @@ -{ - "ace": { - "dependencies": [ - "effect", - "web-html", - "web-uievents", - "arrays", - "foreign", - "nullable", - "prelude" - ], - "repo": "https://github.com/slamdata/purescript-ace.git", - "version": "v7.0.0" - }, - "ace-halogen": { - "dependencies": [ - "ace", - "halogen", - "now", - "random", - "refs", - "aff", - "foreign-object", - "prelude" - ], - "repo": "https://github.com/shmish111/purescript-ace-halogen", - "version": "purs-0.13" - }, - "aff": { - "dependencies": [ - "datetime", - "effect", - "exceptions", - "functions", - "parallel", - "transformers", - "unsafe-coerce" - ], - "repo": "https://github.com/slamdata/purescript-aff.git", - "version": "v5.1.2" - }, - "aff-bus": { - "dependencies": [ - "avar", - "prelude" - ], - "repo": "https://github.com/slamdata/purescript-aff-bus.git", - "version": "v4.0.0" - }, - "aff-coroutines": { - "dependencies": [ - "aff", - "avar", - "console", - "coroutines" - ], - "repo": "https://github.com/purescript-contrib/purescript-aff-coroutines.git", - "version": "v7.0.0" - }, - "aff-promise": { - "dependencies": [ - "aff", - "foreign" - ], - "repo": "https://github.com/nwolverson/purescript-aff-promise.git", - "version": "v2.1.0" - }, - "affjax": { - "dependencies": [ - "aff", - "argonaut-core", - "arraybuffer-types", - "web-xhr", - "foreign", - "form-urlencoded", - "http-methods", - "integers", - "math", - "media-types", - "nullable", - "refs", - "unsafe-coerce" - ], - "repo": "https://github.com/krisajenkins/purescript-affjax", - "version": "purs-0.13" - }, - "ansi": { - "dependencies": [ - "foldable-traversable", - "lists", - "strings" - ], - "repo": "https://github.com/hdgarrood/purescript-ansi.git", - "version": "v5.0.0" - }, - "argonaut": { - "dependencies": [ - "argonaut-codecs", - "argonaut-core", - "argonaut-traversals" - ], - "repo": "https://github.com/purescript-contrib/purescript-argonaut.git", - "version": "v6.0.0" - }, - "argonaut-codecs": { - "dependencies": [ - "argonaut-core", - "arrays", - "foreign-object", - "integers", - "maybe", - "nonempty", - "ordered-collections", - "record" - ], - "repo": "https://github.com/purescript-contrib/purescript-argonaut-codecs.git", - "version": "v6.0.2" - }, - "argonaut-core": { - "dependencies": [ - "arrays", - "control", - "either", - "foreign-object", - "functions", - "gen", - "maybe", - "nonempty", - "prelude", - "strings", - "tailrec" - ], - "repo": "https://github.com/purescript-contrib/purescript-argonaut-core.git", - "version": "v5.0.1" - }, - "argonaut-generic": { - "dependencies": [ - "argonaut-codecs", - "argonaut-core", - "generics-rep", - "record" - ], - "repo": "https://github.com/purescript-contrib/purescript-argonaut-generic.git", - "version": "v5.0.0" - }, - "argonaut-traversals": { - "dependencies": [ - "argonaut-codecs", - "argonaut-core", - "profunctor-lenses" - ], - "repo": "https://github.com/purescript-contrib/purescript-argonaut-traversals.git", - "version": "v7.0.0" - }, - "array-views": { - "dependencies": [ - "arrays", - "control", - "foldable-traversable", - "generics-rep", - "maybe", - "nonempty", - "prelude", - "profunctor", - "tuples", - "unfoldable" - ], - "repo": "https://github.com/klntsky/purescript-array-views.git", - "version": "v0.0.2" - }, - "arraybuffer": { - "dependencies": [ - "arraybuffer-types", - "effect", - "float32", - "functions", - "maybe", - "nullable", - "partial", - "sized-vectors", - "typelevel", - "uint" - ], - "repo": "https://github.com/jacereda/purescript-arraybuffer.git", - "version": "v10.0.0" - }, - "arraybuffer-types": { - "dependencies": [], - "repo": "https://github.com/purescript-contrib/purescript-arraybuffer-types.git", - "version": "v2.0.0" - }, - "arrays": { - "dependencies": [ - "bifunctors", - "control", - "foldable-traversable", - "maybe", - "nonempty", - "partial", - "prelude", - "st", - "tailrec", - "tuples", - "unfoldable", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript/purescript-arrays.git", - "version": "v5.3.0" - }, - "assert": { - "dependencies": [ - "console", - "effect", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-assert.git", - "version": "v4.1.0" - }, - "avar": { - "dependencies": [ - "aff", - "effect", - "either", - "exceptions", - "functions", - "maybe" - ], - "repo": "https://github.com/slamdata/purescript-avar.git", - "version": "v3.0.0" - }, - "b64": { - "dependencies": [ - "arraybuffer-types", - "either", - "encoding", - "enums", - "exceptions", - "functions", - "partial", - "prelude", - "strings" - ], - "repo": "https://github.com/menelaos/purescript-b64.git", - "version": "v0.0.5" - }, - "basic-auth": { - "dependencies": [ - "crypto", - "node-http" - ], - "repo": "https://github.com/oreshinya/purescript-basic-auth.git", - "version": "v1.0.3" - }, - "behaviors": { - "dependencies": [ - "effect", - "event", - "filterable", - "nullable", - "ordered-collections", - "prelude", - "web-events", - "web-html", - "web-uievents" - ], - "repo": "https://github.com/paf31/purescript-behaviors.git", - "version": "v8.0.0" - }, - "bifunctors": { - "dependencies": [ - "newtype", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-bifunctors.git", - "version": "v4.0.0" - }, - "bigints": { - "dependencies": [ - "integers", - "maybe", - "strings" - ], - "repo": "https://github.com/sharkdp/purescript-bigints.git", - "version": "v4.0.0" - }, - "biscotti-cookie": { - "dependencies": [ - "datetime", - "effect", - "either", - "foldable-traversable", - "formatters", - "gen", - "newtype", - "now", - "prelude", - "profunctor-lenses", - "psci-support", - "quickcheck", - "record", - "string-parsers", - "strings", - "test-unit" - ], - "repo": "https://github.com/drewolson/purescript-biscotti-cookie.git", - "version": "v0.2.0" - }, - "biscotti-session": { - "dependencies": [ - "aff", - "argonaut", - "biscotti-cookie", - "effect", - "newtype", - "ordered-collections", - "prelude", - "profunctor-lenses", - "psci-support", - "refs", - "test-unit", - "uuid" - ], - "repo": "https://github.com/drewolson/purescript-biscotti-session.git", - "version": "v0.1.1" - }, - "bower-json": { - "dependencies": [ - "prelude", - "generics-rep", - "maybe", - "arrays", - "either", - "newtype", - "tuples", - "foldable-traversable", - "argonaut-codecs", - "foreign-object" - ], - "repo": "https://github.com/klntsky/purescript-bower-json.git", - "version": "v1.0.0" - }, - "bucketchain": { - "dependencies": [ - "aff", - "console", - "node-http", - "node-streams", - "transformers" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain.git", - "version": "v0.3.0" - }, - "bucketchain-basic-auth": { - "dependencies": [ - "basic-auth", - "bucketchain" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-basic-auth.git", - "version": "v0.2.0" - }, - "bucketchain-conditional": { - "dependencies": [ - "bucketchain", - "js-date" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-conditional.git", - "version": "v0.2.0" - }, - "bucketchain-cors": { - "dependencies": [ - "bucketchain", - "bucketchain-header-utils", - "http-methods" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-cors.git", - "version": "v0.2.0" - }, - "bucketchain-csrf": { - "dependencies": [ - "bucketchain" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-csrf.git", - "version": "v0.1.0" - }, - "bucketchain-header-utils": { - "dependencies": [ - "bucketchain" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-header-utils.git", - "version": "v0.1.0" - }, - "bucketchain-health": { - "dependencies": [ - "bucketchain" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-health.git", - "version": "v0.2.0" - }, - "bucketchain-history-api-fallback": { - "dependencies": [ - "bucketchain" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-history-api-fallback.git", - "version": "v0.3.0" - }, - "bucketchain-logger": { - "dependencies": [ - "bucketchain", - "js-date", - "node-process" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-logger.git", - "version": "v0.3.0" - }, - "bucketchain-secure": { - "dependencies": [ - "bucketchain" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-secure.git", - "version": "v0.1.0" - }, - "bucketchain-simple-api": { - "dependencies": [ - "bucketchain", - "media-types", - "simple-json", - "freet" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-simple-api.git", - "version": "v1.0.0" - }, - "bucketchain-sslify": { - "dependencies": [ - "bucketchain" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-sslify.git", - "version": "v0.2.0" - }, - "bucketchain-static": { - "dependencies": [ - "bucketchain", - "node-fs-aff" - ], - "repo": "https://github.com/Bucketchain/purescript-bucketchain-static.git", - "version": "v0.3.0" - }, - "bytestrings": { - "dependencies": [ - "arrays", - "effect", - "exceptions", - "foldable-traversable", - "integers", - "leibniz", - "maybe", - "newtype", - "node-buffer", - "prelude", - "quickcheck", - "quotient", - "unsafe-coerce" - ], - "repo": "https://github.com/rightfold/purescript-bytestrings.git", - "version": "v7.0.0" - }, - "canvas": { - "dependencies": [ - "arraybuffer-types", - "effect", - "exceptions", - "functions", - "maybe" - ], - "repo": "https://github.com/purescript-web/purescript-canvas.git", - "version": "v4.0.0" - }, - "catenable-lists": { - "dependencies": [ - "control", - "foldable-traversable", - "lists", - "maybe", - "prelude", - "tuples", - "unfoldable" - ], - "repo": "https://github.com/purescript/purescript-catenable-lists.git", - "version": "v5.0.1" - }, - "checked-exceptions": { - "dependencies": [ - "prelude", - "transformers", - "variant" - ], - "repo": "https://github.com/natefaubion/purescript-checked-exceptions.git", - "version": "v3.1.0" - }, - "cheerio": { - "dependencies": [ - "console", - "effect", - "functions", - "prelude", - "test-unit" - ], - "repo": "https://github.com/icyrockcom/purescript-cheerio.git", - "version": "v0.2.0" - }, - "chirashi": { - "dependencies": [ - "exceptions", - "prelude", - "typelevel-prelude", - "variant" - ], - "repo": "https://github.com/justinwoo/purescript-chirashi.git", - "version": "v1.0.0" - }, - "choco-pie": { - "dependencies": [ - "event", - "prelude", - "record", - "typelevel-prelude" - ], - "repo": "https://github.com/justinwoo/purescript-chocopie.git", - "version": "v5.0.0" - }, - "colors": { - "dependencies": [ - "arrays", - "integers", - "lists", - "partial", - "strings" - ], - "repo": "https://github.com/sharkdp/purescript-colors.git", - "version": "v5.0.0" - }, - "concur-react": { - "dependencies": [ - "aff", - "arrays", - "avar", - "console", - "foldable-traversable", - "free", - "nonempty", - "react", - "react-dom", - "tailrec", - "web-dom", - "web-html" - ], - "repo": "https://github.com/ajnsit/purescript-concur.git", - "version": "v0.3.9" - }, - "console": { - "dependencies": [ - "effect", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-console.git", - "version": "v4.2.0" - }, - "const": { - "dependencies": [ - "contravariant", - "foldable-traversable", - "invariant", - "newtype", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-const.git", - "version": "v4.1.0" - }, - "contravariant": { - "dependencies": [ - "either", - "newtype", - "prelude", - "tuples" - ], - "repo": "https://github.com/purescript/purescript-contravariant.git", - "version": "v4.0.1" - }, - "control": { - "dependencies": [ - "prelude" - ], - "repo": "https://github.com/purescript/purescript-control.git", - "version": "v4.1.0" - }, - "coroutines": { - "dependencies": [ - "freet", - "parallel", - "profunctor" - ], - "repo": "https://github.com/purescript-contrib/purescript-coroutines.git", - "version": "v5.0.1" - }, - "crypto": { - "dependencies": [ - "node-buffer" - ], - "repo": "https://github.com/oreshinya/purescript-crypto.git", - "version": "v2.0.1" - }, - "css": { - "dependencies": [ - "colors", - "console", - "generics-rep", - "nonempty", - "profunctor", - "strings", - "these", - "transformers" - ], - "repo": "https://github.com/slamdata/purescript-css.git", - "version": "v4.0.0" - }, - "cssom": { - "dependencies": [ - "effect" - ], - "repo": "https://github.com/danieljharvey/purescript-cssom.git", - "version": "v0.0.2" - }, - "data-algebrae": { - "dependencies": [ - "arrays", - "foreign-object", - "generics-rep", - "maybe", - "ordered-collections", - "prelude", - "spec", - "spec-quickcheck" - ], - "repo": "https://github.com/i-am-tom/purescript-data-algebrae.git", - "version": "v4.0.0" - }, - "datetime": { - "dependencies": [ - "bifunctors", - "control", - "either", - "enums", - "foldable-traversable", - "functions", - "gen", - "integers", - "lists", - "math", - "maybe", - "newtype", - "ordered-collections", - "partial", - "prelude", - "tuples" - ], - "repo": "https://github.com/purescript/purescript-datetime.git", - "version": "v4.1.1" - }, - "debug": { - "dependencies": [ - "prelude" - ], - "repo": "https://github.com/garyb/purescript-debug.git", - "version": "v4.0.0" - }, - "decimals": { - "dependencies": [ - "maybe" - ], - "repo": "https://github.com/sharkdp/purescript-decimals.git", - "version": "v5.0.0" - }, - "distributive": { - "dependencies": [ - "identity", - "newtype", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-distributive.git", - "version": "v4.0.0" - }, - "dom-filereader": { - "dependencies": [ - "aff", - "arraybuffer-types", - "web-file", - "web-html" - ], - "repo": "https://github.com/nwolverson/purescript-dom-filereader.git", - "version": "v5.0.0" - }, - "dom-indexed": { - "dependencies": [ - "media-types", - "prelude", - "web-clipboard", - "web-touchevents" - ], - "repo": "https://github.com/slamdata/purescript-dom-indexed.git", - "version": "v7.0.0" - }, - "dotenv": { - "dependencies": [ - "console", - "node-fs-aff", - "node-process", - "parsing", - "prelude", - "psci-support", - "run", - "spec", - "sunde" - ], - "repo": "https://github.com/nsaunders/purescript-dotenv.git", - "version": "v1.0.0" - }, - "drawing": { - "dependencies": [ - "canvas", - "colors", - "integers", - "lists", - "math", - "prelude" - ], - "repo": "https://github.com/paf31/purescript-drawing.git", - "version": "v4.0.0" - }, - "effect": { - "dependencies": [ - "prelude" - ], - "repo": "https://github.com/purescript/purescript-effect.git", - "version": "v2.0.1" - }, - "either": { - "dependencies": [ - "bifunctors", - "control", - "foldable-traversable", - "invariant", - "maybe", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-either.git", - "version": "v4.1.1" - }, - "email-validate": { - "dependencies": [ - "aff", - "generics-rep", - "string-parsers", - "transformers" - ], - "repo": "https://github.com/cdepillabout/purescript-email-validate.git", - "version": "v5.0.0" - }, - "encoding": { - "dependencies": [ - "arraybuffer-types", - "either", - "exceptions", - "functions", - "prelude" - ], - "repo": "https://github.com/menelaos/purescript-encoding.git", - "version": "v0.0.5" - }, - "enums": { - "dependencies": [ - "control", - "either", - "gen", - "maybe", - "newtype", - "nonempty", - "partial", - "prelude", - "tuples", - "unfoldable" - ], - "repo": "https://github.com/purescript/purescript-enums.git", - "version": "v4.0.1" - }, - "errors": { - "dependencies": [ - "control", - "effect", - "either", - "maybe", - "transformers" - ], - "repo": "https://github.com/passy/purescript-errors.git", - "version": "v4.1.0" - }, - "event": { - "dependencies": [ - "console", - "effect", - "filterable", - "js-timers", - "now", - "nullable", - "prelude", - "unsafe-reference" - ], - "repo": "https://github.com/paf31/purescript-event.git", - "version": "v1.3.0" - }, - "exceptions": { - "dependencies": [ - "effect", - "either", - "maybe", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-exceptions.git", - "version": "v4.0.0" - }, - "exists": { - "dependencies": [ - "unsafe-coerce" - ], - "repo": "https://github.com/purescript/purescript-exists.git", - "version": "v4.0.0" - }, - "exitcodes": { - "dependencies": [ - "enums" - ], - "repo": "https://github.com/Risto-Stevcev/purescript-exitcodes.git", - "version": "v4.0.0" - }, - "expect-inferred": { - "dependencies": [ - "prelude", - "typelevel-prelude" - ], - "repo": "https://github.com/justinwoo/purescript-expect-inferred.git", - "version": "v2.0.0" - }, - "express": { - "dependencies": [ - "aff", - "foreign", - "foreign-generic", - "node-http", - "test-unit" - ], - "repo": "https://github.com/nkly/purescript-express.git", - "version": "v0.8.0" - }, - "filterable": { - "dependencies": [ - "arrays", - "either", - "foldable-traversable", - "identity", - "lists", - "ordered-collections" - ], - "repo": "https://github.com/LiamGoodacre/purescript-filterable.git", - "version": "v3.0.2" - }, - "fixed-points": { - "dependencies": [ - "exists", - "newtype", - "prelude", - "transformers" - ], - "repo": "https://github.com/slamdata/purescript-fixed-points.git", - "version": "v5.1.0" - }, - "flare": { - "dependencies": [ - "canvas", - "datetime", - "drawing", - "foldable-traversable", - "nonempty", - "prelude", - "signal", - "smolder", - "tuples", - "web-dom" - ], - "repo": "https://github.com/sharkdp/purescript-flare.git", - "version": "v6.0.0" - }, - "float32": { - "dependencies": [ - "generics-rep", - "prelude" - ], - "repo": "https://github.com/athanclark/purescript-float32.git", - "version": "v0.1.1" - }, - "foldable-traversable": { - "dependencies": [ - "bifunctors", - "control", - "maybe", - "newtype", - "orders", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-foldable-traversable.git", - "version": "v4.1.1" - }, - "folds": { - "dependencies": [ - "control", - "ordered-collections", - "profunctor" - ], - "repo": "https://github.com/paf31/purescript-folds.git", - "version": "v5.2.0" - }, - "foreign": { - "dependencies": [ - "either", - "functions", - "identity", - "integers", - "lists", - "maybe", - "prelude", - "strings", - "transformers" - ], - "repo": "https://github.com/purescript/purescript-foreign.git", - "version": "v5.0.0" - }, - "foreign-generic": { - "dependencies": [ - "effect", - "exceptions", - "foreign", - "foreign-object", - "generics-rep", - "identity", - "ordered-collections", - "proxy", - "record" - ], - "repo": "https://github.com/shmish111/purescript-foreign-generic", - "version": "purs-0.13" - }, - "foreign-object": { - "dependencies": [ - "arrays", - "foldable-traversable", - "functions", - "gen", - "lists", - "maybe", - "prelude", - "st", - "tailrec", - "tuples", - "typelevel-prelude", - "unfoldable" - ], - "repo": "https://github.com/purescript/purescript-foreign-object.git", - "version": "v2.0.3" - }, - "fork": { - "dependencies": [ - "aff" - ], - "repo": "https://github.com/slamdata/purescript-fork.git", - "version": "v4.0.0" - }, - "form-urlencoded": { - "dependencies": [ - "globals", - "maybe", - "newtype", - "prelude", - "strings", - "tuples" - ], - "repo": "https://github.com/purescript-contrib/purescript-form-urlencoded.git", - "version": "v5.0.0" - }, - "format": { - "dependencies": [ - "arrays", - "effect", - "integers", - "math", - "prelude", - "strings", - "unfoldable" - ], - "repo": "https://github.com/sharkdp/purescript-format.git", - "version": "v4.0.0" - }, - "format-nix": { - "dependencies": [ - "generics-rep", - "motsunabe", - "prelude" - ], - "repo": "https://github.com/justinwoo/format-nix.git", - "version": "v0.3.0" - }, - "formatters": { - "dependencies": [ - "datetime", - "fixed-points", - "generics-rep", - "lists", - "parsing", - "prelude", - "transformers" - ], - "repo": "https://github.com/slamdata/purescript-formatters.git", - "version": "v4.0.1" - }, - "free": { - "dependencies": [ - "catenable-lists", - "control", - "distributive", - "either", - "exists", - "foldable-traversable", - "invariant", - "lazy", - "maybe", - "prelude", - "tailrec", - "transformers", - "tuples", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript/purescript-free.git", - "version": "v5.2.0" - }, - "freeap": { - "dependencies": [ - "const", - "exists", - "gen", - "lists" - ], - "repo": "https://github.com/ethul/purescript-freeap.git", - "version": "v5.0.1" - }, - "freedom": { - "dependencies": [ - "aff", - "console", - "foreign-object", - "freet", - "safely", - "simple-emitter", - "web-html" - ], - "repo": "https://github.com/purescript-freedom/purescript-freedom.git", - "version": "v1.2.0" - }, - "freedom-now": { - "dependencies": [ - "freedom", - "js-timers" - ], - "repo": "https://github.com/purescript-freedom/purescript-freedom-now.git", - "version": "v2.0.0" - }, - "freedom-portal": { - "dependencies": [ - "freedom" - ], - "repo": "https://github.com/purescript-freedom/purescript-freedom-portal.git", - "version": "v1.0.0" - }, - "freedom-router": { - "dependencies": [ - "freedom", - "profunctor" - ], - "repo": "https://github.com/purescript-freedom/purescript-freedom-router.git", - "version": "v1.0.1" - }, - "freedom-transition": { - "dependencies": [ - "freedom", - "js-timers" - ], - "repo": "https://github.com/purescript-freedom/purescript-freedom-transition.git", - "version": "v1.0.0" - }, - "freedom-virtualized": { - "dependencies": [ - "freedom" - ], - "repo": "https://github.com/purescript-freedom/purescript-freedom-virtualized.git", - "version": "v1.0.0" - }, - "freedom-window-resize": { - "dependencies": [ - "freedom" - ], - "repo": "https://github.com/purescript-freedom/purescript-freedom-window-resize.git", - "version": "v1.0.0" - }, - "freet": { - "dependencies": [ - "bifunctors", - "effect", - "either", - "exists", - "prelude", - "tailrec", - "transformers", - "aff" - ], - "repo": "https://github.com/purescript-contrib/purescript-freet.git", - "version": "v5.0.0" - }, - "functions": { - "dependencies": [ - "prelude" - ], - "repo": "https://github.com/purescript/purescript-functions.git", - "version": "v4.0.0" - }, - "functors": { - "dependencies": [ - "bifunctors", - "const", - "control", - "either", - "foldable-traversable", - "maybe", - "newtype", - "prelude", - "tuples", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript/purescript-functors.git", - "version": "v3.1.1" - }, - "fuzzy": { - "dependencies": [ - "foldable-traversable", - "foreign-object", - "generics-rep", - "newtype", - "ordered-collections", - "prelude", - "rationals", - "strings", - "strongcheck", - "tuples" - ], - "repo": "https://github.com/citizennet/purescript-fuzzy.git", - "version": "v0.2.1" - }, - "gen": { - "dependencies": [ - "either", - "foldable-traversable", - "identity", - "maybe", - "newtype", - "nonempty", - "prelude", - "tailrec", - "tuples", - "unfoldable" - ], - "repo": "https://github.com/purescript/purescript-gen.git", - "version": "v2.1.1" - }, - "generics-rep": { - "dependencies": [ - "enums", - "foldable-traversable", - "maybe", - "newtype", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-generics-rep.git", - "version": "v6.1.1" - }, - "globals": { - "dependencies": [ - "functions", - "maybe" - ], - "repo": "https://github.com/purescript/purescript-globals.git", - "version": "v4.1.0" - }, - "gomtang-basic": { - "dependencies": [ - "console", - "effect", - "prelude", - "record", - "web-html" - ], - "repo": "https://github.com/justinwoo/purescript-gomtang-basic.git", - "version": "v0.2.0" - }, - "group": { - "dependencies": [ - "lists" - ], - "repo": "https://github.com/morganthomas/purescript-group.git", - "version": "v4.1.1" - }, - "halogen": { - "dependencies": [ - "aff", - "avar", - "console", - "const", - "coroutines", - "dom-indexed", - "foreign", - "fork", - "free", - "freeap", - "halogen-vdom", - "media-types", - "nullable", - "ordered-collections", - "parallel", - "profunctor", - "transformers", - "unsafe-coerce", - "unsafe-reference", - "web-uievents" - ], - "repo": "https://github.com/slamdata/purescript-halogen.git", - "version": "v5.0.0-rc.7" - }, - "halogen-bootstrap": { - "dependencies": [ - "halogen" - ], - "repo": "https://github.com/slamdata/purescript-halogen-bootstrap.git", - "version": "v8.0.0" - }, - "halogen-bootstrap4": { - "dependencies": [ - "halogen" - ], - "repo": "https://github.com/mschristiansen/purescript-halogen-bootstrap4.git", - "version": "v0.1.4" - }, - "halogen-css": { - "dependencies": [ - "css", - "halogen" - ], - "repo": "https://github.com/slamdata/purescript-halogen-css.git", - "version": "v8.0.0" - }, - "halogen-formless": { - "dependencies": [ - "halogen", - "variant", - "heterogeneous", - "generics-rep", - "profunctor-lenses" - ], - "repo": "https://github.com/thomashoneyman/purescript-halogen-formless.git", - "version": "v1.0.0-rc.1" - }, - "halogen-select": { - "dependencies": [ - "halogen", - "record" - ], - "repo": "https://github.com/citizennet/purescript-halogen-select.git", - "version": "v5.0.0-rc.3" - }, - "halogen-vdom": { - "dependencies": [ - "bifunctors", - "effect", - "foreign", - "foreign-object", - "maybe", - "prelude", - "refs", - "tuples", - "unsafe-coerce", - "web-html" - ], - "repo": "https://github.com/slamdata/purescript-halogen-vdom.git", - "version": "v6.1.0" - }, - "heterogeneous": { - "dependencies": [ - "either", - "functors", - "prelude", - "record", - "tuples", - "variant" - ], - "repo": "https://github.com/natefaubion/purescript-heterogeneous.git", - "version": "v0.4.1" - }, - "higher-order": { - "dependencies": [ - "catenable-lists", - "const", - "effect", - "errors", - "generics-rep", - "lists", - "ordered-collections", - "orders", - "profunctor" - ], - "repo": "https://github.com/matthew-hilty/purescript-higher-order.git", - "version": "v0.2.0" - }, - "http-methods": { - "dependencies": [ - "either", - "prelude", - "strings" - ], - "repo": "https://github.com/purescript-contrib/purescript-http-methods.git", - "version": "v4.0.2" - }, - "httpure": { - "dependencies": [ - "aff", - "arrays", - "bifunctors", - "console", - "control", - "effect", - "either", - "exceptions", - "foldable-traversable", - "foreign", - "lists", - "maybe", - "newtype", - "node-buffer", - "node-child-process", - "node-fs", - "node-fs-aff", - "node-http", - "node-streams", - "nullable", - "options", - "ordered-collections", - "prelude", - "psci-support", - "refs", - "spec", - "strings", - "tuples", - "type-equality", - "unsafe-coerce" - ], - "repo": "https://github.com/cprussin/purescript-httpure.git", - "version": "v0.8.3" - }, - "httpure-contrib-biscotti": { - "dependencies": [ - "aff", - "argonaut", - "biscotti-cookie", - "biscotti-session", - "effect", - "either", - "generics-rep", - "httpure", - "maybe", - "profunctor-lenses", - "psci-support", - "test-unit", - "tuples", - "type-equality" - ], - "repo": "https://github.com/drewolson/purescript-httpure-contrib-biscotti.git", - "version": "v0.1.1" - }, - "hyper": { - "dependencies": [ - "aff", - "avar", - "argonaut", - "arrays", - "control", - "effect", - "foldable-traversable", - "generics-rep", - "http-methods", - "indexed-monad", - "media-types", - "node-fs-aff", - "node-http", - "ordered-collections", - "proxy", - "psci-support", - "random", - "smolder", - "spec", - "spec-discovery", - "strings", - "transformers", - "record-extra", - "typelevel-prelude" - ], - "repo": "https://github.com/owickstrom/hyper.git", - "version": "v0.10.1" - }, - "hypertrout": { - "dependencies": [ - "argonaut-generic", - "console", - "hyper", - "prelude", - "psci-support", - "spec", - "spec-discovery", - "trout" - ], - "repo": "https://github.com/owickstrom/purescript-hypertrout.git", - "version": "v0.11.0" - }, - "identity": { - "dependencies": [ - "control", - "foldable-traversable", - "invariant", - "newtype", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-identity.git", - "version": "v4.1.0" - }, - "identy": { - "dependencies": [ - "simple-json" - ], - "repo": "https://github.com/oreshinya/purescript-identy.git", - "version": "v2.1.0" - }, - "indexed-monad": { - "dependencies": [ - "control", - "newtype" - ], - "repo": "https://github.com/garyb/purescript-indexed-monad.git", - "version": "v1.1.0" - }, - "integers": { - "dependencies": [ - "globals", - "math", - "maybe", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-integers.git", - "version": "v4.0.0" - }, - "invariant": { - "dependencies": [ - "prelude" - ], - "repo": "https://github.com/purescript/purescript-invariant.git", - "version": "v4.1.0" - }, - "jajanmen": { - "dependencies": [ - "node-sqlite3", - "prelude", - "typelevel-prelude" - ], - "repo": "https://github.com/justinwoo/purescript-jajanmen.git", - "version": "v1.0.0" - }, - "jquery": { - "dependencies": [ - "console", - "effect", - "foreign", - "web-dom" - ], - "repo": "https://github.com/purescript-contrib/purescript-jquery.git", - "version": "v5.0.0" - }, - "js-date": { - "dependencies": [ - "datetime", - "exceptions", - "foreign", - "integers", - "now" - ], - "repo": "https://github.com/purescript-contrib/purescript-js-date.git", - "version": "v6.0.0" - }, - "js-timers": { - "dependencies": [ - "effect" - ], - "repo": "https://github.com/purescript-contrib/purescript-js-timers.git", - "version": "v4.0.1" - }, - "json-schema": { - "dependencies": [ - "generics-rep", - "prelude", - "simple-json" - ], - "repo": "https://github.com/felixmulder/purescript-json-schema.git", - "version": "v0.0.1" - }, - "jwt": { - "dependencies": [ - "argonaut-core", - "arrays", - "b64", - "either", - "errors", - "exceptions", - "prelude", - "profunctor-lenses", - "strings" - ], - "repo": "https://github.com/menelaos/purescript-jwt.git", - "version": "v0.0.6" - }, - "kancho": { - "dependencies": [ - "foreign", - "newtype", - "strings", - "typelevel-prelude" - ], - "repo": "https://github.com/justinwoo/purescript-kancho.git", - "version": "v2.0.0" - }, - "kishimen": { - "dependencies": [ - "generics-rep", - "prelude", - "typelevel-prelude", - "variant" - ], - "repo": "https://github.com/justinwoo/purescript-kishimen.git", - "version": "v1.0.1" - }, - "lazy": { - "dependencies": [ - "control", - "foldable-traversable", - "invariant", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-lazy.git", - "version": "v4.0.0" - }, - "lcg": { - "dependencies": [ - "effect", - "integers", - "math", - "maybe", - "partial", - "prelude", - "random" - ], - "repo": "https://github.com/purescript/purescript-lcg.git", - "version": "v2.0.0" - }, - "leibniz": { - "dependencies": [ - "prelude", - "unsafe-coerce" - ], - "repo": "https://github.com/paf31/purescript-leibniz.git", - "version": "v5.0.0" - }, - "lenient-html-parser": { - "dependencies": [ - "console", - "generics-rep", - "prelude", - "string-parsers" - ], - "repo": "https://github.com/justinwoo/purescript-lenient-html-parser.git", - "version": "v4.0.0" - }, - "lists": { - "dependencies": [ - "bifunctors", - "control", - "foldable-traversable", - "lazy", - "maybe", - "newtype", - "nonempty", - "partial", - "prelude", - "tailrec", - "tuples", - "unfoldable" - ], - "repo": "https://github.com/purescript/purescript-lists.git", - "version": "v5.4.1" - }, - "machines": { - "dependencies": [ - "arrays", - "control", - "effect", - "lists", - "maybe", - "prelude", - "profunctor", - "tuples", - "unfoldable" - ], - "repo": "https://github.com/purescript-contrib/purescript-machines.git", - "version": "v5.1.0" - }, - "makkori": { - "dependencies": [ - "functions", - "node-http", - "prelude", - "record" - ], - "repo": "https://github.com/justinwoo/purescript-makkori.git", - "version": "v1.0.0" - }, - "math": { - "dependencies": [], - "repo": "https://github.com/purescript/purescript-math.git", - "version": "v2.1.1" - }, - "matrices": { - "dependencies": [ - "arrays", - "strings" - ], - "repo": "https://github.com/kritzcreek/purescript-matrices.git", - "version": "v4.0.0" - }, - "matryoshka": { - "dependencies": [ - "prelude", - "fixed-points", - "free", - "transformers", - "profunctor" - ], - "repo": "https://github.com/slamdata/purescript-matryoshka.git", - "version": "v0.4.0" - }, - "maybe": { - "dependencies": [ - "control", - "invariant", - "newtype", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-maybe.git", - "version": "v4.0.1" - }, - "media-types": { - "dependencies": [ - "newtype", - "prelude" - ], - "repo": "https://github.com/purescript-contrib/purescript-media-types.git", - "version": "v4.0.1" - }, - "memoize": { - "dependencies": [ - "either", - "generics-rep", - "integers", - "lazy", - "lists", - "maybe", - "strings", - "tuples" - ], - "repo": "https://github.com/paf31/purescript-memoize.git", - "version": "v5.0.0" - }, - "metadata": { - "dependencies": [], - "repo": "https://github.com/spacchetti/purescript-metadata.git", - "version": "v0.13.3" - }, - "milkis": { - "dependencies": [ - "aff-promise", - "arraybuffer-types", - "foreign-object", - "prelude", - "typelevel-prelude" - ], - "repo": "https://github.com/justinwoo/purescript-milkis.git", - "version": "v7.2.1" - }, - "minibench": { - "dependencies": [ - "console", - "effect", - "globals", - "integers", - "math", - "partial", - "prelude", - "refs" - ], - "repo": "https://github.com/purescript/purescript-minibench.git", - "version": "v2.0.0" - }, - "mmorph": { - "dependencies": [ - "free", - "functors", - "transformers" - ], - "repo": "https://github.com/Thimoteus/purescript-mmorph.git", - "version": "v5.1.0" - }, - "monad-logger": { - "dependencies": [ - "aff", - "ansi", - "argonaut", - "arrays", - "console", - "control", - "effect", - "foldable-traversable", - "foreign-object", - "integers", - "js-date", - "maybe", - "newtype", - "ordered-collections", - "prelude", - "strings", - "transformers", - "tuples" - ], - "repo": "https://github.com/cprussin/purescript-monad-logger.git", - "version": "v1.3.1" - }, - "monad-loops": { - "dependencies": [ - "maybe", - "tailrec", - "prelude", - "tuples", - "lists" - ], - "repo": "https://github.com/mlang/purescript-monad-loops.git", - "version": "v0.5.0" - }, - "money": { - "dependencies": [ - "foldable-traversable", - "globals", - "integers", - "lists", - "math", - "prelude", - "ring-modules", - "newtype", - "rationals" - ], - "repo": "https://github.com/i-am-tom/purescript-money.git", - "version": "v8.0.0" - }, - "motsunabe": { - "dependencies": [ - "lists", - "strings" - ], - "repo": "https://github.com/justinwoo/purescript-motsunabe.git", - "version": "v2.0.0" - }, - "mysql": { - "dependencies": [ - "aff", - "js-date", - "simple-json" - ], - "repo": "https://github.com/oreshinya/purescript-mysql.git", - "version": "v3.4.0" - }, - "naporitan": { - "dependencies": [ - "record", - "typelevel-prelude" - ], - "repo": "https://github.com/justinwoo/purescript-naporitan.git", - "version": "v1.0.0" - }, - "naturals": { - "dependencies": [ - "maybe", - "prelude", - "enums" - ], - "repo": "https://github.com/LiamGoodacre/purescript-naturals.git", - "version": "v3.0.0" - }, - "newtype": { - "dependencies": [ - "prelude" - ], - "repo": "https://github.com/purescript/purescript-newtype.git", - "version": "v3.0.0" - }, - "node-buffer": { - "dependencies": [ - "arraybuffer-types", - "effect", - "maybe" - ], - "repo": "https://github.com/purescript-node/purescript-node-buffer.git", - "version": "v5.0.0" - }, - "node-child-process": { - "dependencies": [ - "exceptions", - "foreign", - "foreign-object", - "functions", - "node-fs", - "node-streams", - "nullable", - "posix-types", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript-node/purescript-node-child-process.git", - "version": "v6.0.0" - }, - "node-electron": { - "dependencies": [ - "effect", - "foreign", - "halogen", - "maybe", - "options", - "prelude", - "transformers", - "unsafe-coerce", - "web-dom", - "web-events", - "web-html" - ], - "repo": "https://github.com/cprussin/purescript-node-electron.git", - "version": "v0.0.2" - }, - "node-fs": { - "dependencies": [ - "datetime", - "effect", - "either", - "enums", - "exceptions", - "functions", - "globals", - "integers", - "js-date", - "maybe", - "node-buffer", - "node-path", - "node-streams", - "nullable", - "partial", - "prelude", - "strings", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript-node/purescript-node-fs.git", - "version": "v5.0.1" - }, - "node-fs-aff": { - "dependencies": [ - "aff", - "either", - "node-fs", - "node-path" - ], - "repo": "https://github.com/purescript-node/purescript-node-fs-aff.git", - "version": "v6.0.0" - }, - "node-he": { - "dependencies": [], - "repo": "https://github.com/justinwoo/purescript-node-he.git", - "version": "v0.2.0" - }, - "node-http": { - "dependencies": [ - "arraybuffer-types", - "contravariant", - "effect", - "foreign", - "foreign-object", - "maybe", - "node-buffer", - "node-streams", - "node-url", - "nullable", - "options", - "prelude", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript-node/purescript-node-http.git", - "version": "v5.0.2" - }, - "node-net": { - "dependencies": [ - "effect", - "either", - "exceptions", - "foreign", - "maybe", - "node-buffer", - "node-fs", - "nullable", - "options", - "prelude", - "transformers" - ], - "repo": "https://github.com/purescript-node/purescript-node-net.git", - "version": "v1.0.0" - }, - "node-path": { - "dependencies": [ - "effect" - ], - "repo": "https://github.com/purescript-node/purescript-node-path.git", - "version": "v3.0.0" - }, - "node-postgres": { - "dependencies": [ - "aff", - "arrays", - "datetime", - "either", - "foldable-traversable", - "foreign", - "integers", - "nullable", - "prelude", - "transformers", - "unsafe-coerce" - ], - "repo": "https://github.com/epost/purescript-node-postgres.git", - "version": "v5.0.0" - }, - "node-process": { - "dependencies": [ - "effect", - "foreign-object", - "maybe", - "node-streams", - "posix-types", - "prelude", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript-node/purescript-node-process.git", - "version": "v7.0.0" - }, - "node-readline": { - "dependencies": [ - "effect", - "foreign", - "node-process", - "node-streams", - "options", - "prelude" - ], - "repo": "https://github.com/purescript-node/purescript-node-readline.git", - "version": "v4.0.1" - }, - "node-sqlite3": { - "dependencies": [ - "aff", - "foreign" - ], - "repo": "https://github.com/justinwoo/purescript-node-sqlite3.git", - "version": "v6.0.0" - }, - "node-streams": { - "dependencies": [ - "effect", - "either", - "exceptions", - "node-buffer", - "prelude" - ], - "repo": "https://github.com/purescript-node/purescript-node-streams.git", - "version": "v4.0.1" - }, - "node-telegram-bot-api": { - "dependencies": [ - "aff", - "foreign", - "simple-json", - "strings" - ], - "repo": "https://github.com/justinwoo/purescript-node-telegram-bot-api.git", - "version": "v4.0.0" - }, - "node-url": { - "dependencies": [ - "nullable" - ], - "repo": "https://github.com/purescript-node/purescript-node-url.git", - "version": "v4.0.0" - }, - "nodemailer": { - "dependencies": [ - "aff", - "node-streams", - "simple-json" - ], - "repo": "https://github.com/oreshinya/purescript-nodemailer.git", - "version": "v2.0.2" - }, - "nonempty": { - "dependencies": [ - "control", - "foldable-traversable", - "maybe", - "prelude", - "tuples", - "unfoldable" - ], - "repo": "https://github.com/purescript/purescript-nonempty.git", - "version": "v5.0.0" - }, - "now": { - "dependencies": [ - "datetime", - "effect" - ], - "repo": "https://github.com/purescript-contrib/purescript-now.git", - "version": "v4.0.0" - }, - "nullable": { - "dependencies": [ - "functions", - "maybe" - ], - "repo": "https://github.com/purescript-contrib/purescript-nullable.git", - "version": "v4.1.1" - }, - "numbers": { - "dependencies": [ - "globals", - "math", - "maybe" - ], - "repo": "https://github.com/sharkdp/purescript-numbers.git", - "version": "v7.0.0" - }, - "numerics": { - "dependencies": [ - "prelude", - "integers", - "rationals", - "uint", - "bigints" - ], - "repo": "https://github.com/Proclivis/purescript-numerics", - "version": "v0.1.2" - }, - "options": { - "dependencies": [ - "contravariant", - "foreign", - "foreign-object", - "maybe", - "tuples" - ], - "repo": "https://github.com/purescript-contrib/purescript-options.git", - "version": "v5.0.0" - }, - "optparse": { - "dependencies": [ - "arrays", - "console", - "effect", - "exists", - "exitcodes", - "free", - "memoize", - "node-process", - "ordered-collections", - "prelude", - "strings", - "transformers" - ], - "repo": "https://github.com/f-o-a-m/purescript-optparse.git", - "version": "v3.0.1" - }, - "ordered-collections": { - "dependencies": [ - "arrays", - "foldable-traversable", - "gen", - "lists", - "maybe", - "partial", - "prelude", - "st", - "tailrec", - "tuples", - "unfoldable", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript/purescript-ordered-collections.git", - "version": "v1.6.1" - }, - "orders": { - "dependencies": [ - "newtype", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-orders.git", - "version": "v4.0.0" - }, - "pairing": { - "dependencies": [ - "free", - "functors", - "transformers" - ], - "repo": "https://github.com/paf31/purescript-pairing.git", - "version": "v5.1.0" - }, - "pairs": { - "dependencies": [ - "console", - "distributive", - "foldable-traversable", - "quickcheck" - ], - "repo": "https://github.com/sharkdp/purescript-pairs.git", - "version": "v7.0.0" - }, - "parallel": { - "dependencies": [ - "control", - "effect", - "either", - "foldable-traversable", - "functors", - "maybe", - "newtype", - "prelude", - "refs", - "transformers" - ], - "repo": "https://github.com/purescript/purescript-parallel.git", - "version": "v4.0.0" - }, - "parsing": { - "dependencies": [ - "arrays", - "either", - "foldable-traversable", - "identity", - "integers", - "lists", - "maybe", - "strings", - "transformers", - "unicode" - ], - "repo": "https://github.com/purescript-contrib/purescript-parsing.git", - "version": "v5.0.3" - }, - "partial": { - "dependencies": [], - "repo": "https://github.com/purescript/purescript-partial.git", - "version": "v2.0.1" - }, - "pathy": { - "dependencies": [ - "console", - "exceptions", - "lists", - "partial", - "profunctor", - "quickcheck", - "strings", - "transformers", - "unsafe-coerce", - "typelevel-prelude" - ], - "repo": "https://github.com/slamdata/purescript-pathy.git", - "version": "v7.0.1" - }, - "phoenix": { - "dependencies": [ - "options" - ], - "repo": "https://github.com/brandonhamilton/purescript-phoenix.git", - "version": "v4.0.0" - }, - "pipes": { - "dependencies": [ - "aff", - "lists", - "mmorph", - "prelude", - "tailrec", - "transformers", - "tuples" - ], - "repo": "https://github.com/felixSchl/purescript-pipes.git", - "version": "v6.0.0" - }, - "pointed-list": { - "dependencies": [ - "lists", - "prelude" - ], - "repo": "https://github.com/paluh/purescript-pointed-list.git", - "version": "v0.4.0" - }, - "polyform": { - "dependencies": [ - "foreign", - "foreign-object", - "generics-rep", - "invariant", - "newtype", - "ordered-collections", - "profunctor", - "run", - "transformers", - "variant" - ], - "repo": "https://github.com/paluh/purescript-polyform.git", - "version": "v0.8.0" - }, - "posix-types": { - "dependencies": [ - "maybe", - "prelude" - ], - "repo": "https://github.com/purescript-node/purescript-posix-types.git", - "version": "v4.0.0" - }, - "precise-datetime": { - "dependencies": [ - "arrays", - "console", - "datetime", - "either", - "enums", - "foldable-traversable", - "formatters", - "integers", - "js-date", - "lists", - "maybe", - "newtype", - "prelude", - "strings", - "tuples", - "unicode", - "numbers", - "decimals" - ], - "repo": "https://github.com/awakesecurity/purescript-precise-datetime.git", - "version": "v5.1.1" - }, - "prelude": { - "dependencies": [], - "repo": "https://github.com/purescript/purescript-prelude.git", - "version": "v4.1.1" - }, - "prettier": { - "dependencies": [ - "maybe", - "prelude" - ], - "repo": "https://github.com/gcanti/purescript-prettier.git", - "version": "v0.2.0" - }, - "profunctor": { - "dependencies": [ - "contravariant", - "control", - "distributive", - "either", - "exists", - "invariant", - "newtype", - "prelude", - "tuples" - ], - "repo": "https://github.com/purescript/purescript-profunctor.git", - "version": "v4.1.0" - }, - "profunctor-lenses": { - "dependencies": [ - "arrays", - "bifunctors", - "const", - "control", - "distributive", - "either", - "foldable-traversable", - "foreign-object", - "functors", - "identity", - "lists", - "maybe", - "newtype", - "ordered-collections", - "partial", - "prelude", - "profunctor", - "record", - "transformers", - "tuples" - ], - "repo": "https://github.com/purescript-contrib/purescript-profunctor-lenses.git", - "version": "v6.2.0" - }, - "promises": { - "dependencies": [ - "console", - "datetime", - "exceptions", - "functions", - "prelude", - "transformers" - ], - "repo": "https://github.com/thimoteus/purescript-promises.git", - "version": "v3.1.1" - }, - "proxy": { - "dependencies": [ - "prelude" - ], - "repo": "https://github.com/purescript/purescript-proxy.git", - "version": "v3.0.0" - }, - "proxying": { - "dependencies": [ - "effect", - "generics-rep", - "prelude", - "typelevel-prelude" - ], - "repo": "https://github.com/matthew-hilty/purescript-proxying.git", - "version": "v1.1.0" - }, - "psa-utils": { - "dependencies": [ - "ansi", - "argonaut-codecs", - "argonaut-core", - "arrays", - "console", - "control", - "effect", - "either", - "foldable-traversable", - "maybe", - "node-path", - "ordered-collections", - "prelude", - "strings", - "tuples", - "unsafe-coerce" - ], - "repo": "https://github.com/natefaubion/purescript-psa-utils.git", - "version": "v6.0.0" - }, - "psc-ide": { - "dependencies": [ - "aff", - "argonaut", - "arrays", - "console", - "maybe", - "node-child-process", - "node-fs", - "parallel", - "random" - ], - "repo": "https://github.com/kRITZCREEK/purescript-psc-ide.git", - "version": "v15.0.1" - }, - "psci-support": { - "dependencies": [ - "console", - "effect", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-psci-support.git", - "version": "v4.0.0" - }, - "quickcheck": { - "dependencies": [ - "arrays", - "console", - "control", - "effect", - "either", - "enums", - "exceptions", - "foldable-traversable", - "gen", - "generics-rep", - "identity", - "integers", - "lazy", - "lcg", - "lists", - "math", - "maybe", - "newtype", - "nonempty", - "partial", - "prelude", - "record", - "st", - "strings", - "tailrec", - "transformers", - "tuples", - "unfoldable" - ], - "repo": "https://github.com/purescript/purescript-quickcheck.git", - "version": "v6.1.0" - }, - "quickcheck-laws": { - "dependencies": [ - "enums", - "proxy", - "quickcheck" - ], - "repo": "https://github.com/garyb/purescript-quickcheck-laws.git", - "version": "v5.0.1" - }, - "quotient": { - "dependencies": [ - "prelude", - "proxy", - "quickcheck" - ], - "repo": "https://github.com/rightfold/purescript-quotient.git", - "version": "v3.0.0" - }, - "radox": { - "dependencies": [ - "prelude", - "effect", - "variant", - "refs", - "aff" - ], - "repo": "https://github.com/danieljharvey/purescript-radox.git", - "version": "v1.0.0" - }, - "random": { - "dependencies": [ - "effect", - "integers", - "math" - ], - "repo": "https://github.com/purescript/purescript-random.git", - "version": "v4.0.0" - }, - "rationals": { - "dependencies": [ - "integers", - "prelude" - ], - "repo": "https://github.com/anttih/purescript-rationals.git", - "version": "v5.0.0" - }, - "rave": { - "dependencies": [ - "aff", - "checked-exceptions", - "console", - "effect", - "exceptions", - "prelude", - "record", - "variant" - ], - "repo": "https://github.com/reactormonk/purescript-rave.git", - "version": "v0.1.1" - }, - "react": { - "dependencies": [ - "effect", - "exceptions", - "maybe", - "nullable", - "prelude", - "typelevel-prelude", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript-contrib/purescript-react.git", - "version": "v8.0.0" - }, - "react-basic": { - "dependencies": [ - "aff", - "console", - "effect", - "exceptions", - "functions", - "nullable", - "record", - "unsafe-coerce", - "web-dom", - "web-events", - "web-html" - ], - "repo": "https://github.com/lumihq/purescript-react-basic.git", - "version": "v11.0.0" - }, - "react-basic-hooks": { - "dependencies": [ - "aff", - "console", - "effect", - "indexed-monad", - "prelude", - "react-basic", - "unsafe-reference" - ], - "repo": "https://github.com/spicydonuts/purescript-react-basic-hooks.git", - "version": "v2.0.1" - }, - "react-basic-native": { - "dependencies": [ - "effect", - "foreign-object", - "js-date", - "react-basic", - "undefinable" - ], - "repo": "https://github.com/dwhitney/purescript-react-basic-native.git", - "version": "v0.1.3" - }, - "react-dom": { - "dependencies": [ - "effect", - "react", - "web-dom" - ], - "repo": "https://github.com/purescript-contrib/purescript-react-dom.git", - "version": "v6.1.0" - }, - "react-radox": { - "dependencies": [ - "prelude", - "effect", - "radox", - "react" - ], - "repo": "https://github.com/danieljharvey/purescript-react-radox.git", - "version": "v0.0.5" - }, - "react-stylesheet": { - "dependencies": [ - "effect", - "react", - "cssom", - "stylesheet" - ], - "repo": "https://github.com/danieljharvey/purescript-react-stylesheet.git", - "version": "v0.0.2" - }, - "read": { - "dependencies": [ - "maybe", - "prelude", - "strings" - ], - "repo": "https://github.com/truqu/purescript-read.git", - "version": "v1.0.1" - }, - "record": { - "dependencies": [ - "functions", - "prelude", - "st", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript/purescript-record.git", - "version": "v2.0.1" - }, - "record-extra": { - "dependencies": [ - "arrays", - "functions", - "lists", - "record", - "typelevel-prelude" - ], - "repo": "https://github.com/justinwoo/purescript-record-extra.git", - "version": "v3.0.0" - }, - "record-format": { - "dependencies": [ - "record", - "strings", - "typelevel-prelude" - ], - "repo": "https://github.com/kcsongor/purescript-record-format.git", - "version": "v2.0.0" - }, - "redux-devtools": { - "dependencies": [ - "effect", - "foreign", - "nullable", - "prelude" - ], - "repo": "https://github.com/justinwoo/purescript-redux-devtools.git", - "version": "v0.1.0" - }, - "refined": { - "dependencies": [ - "argonaut", - "effect", - "generics-rep", - "prelude", - "quickcheck", - "typelevel" - ], - "repo": "https://github.com/danieljharvey/purescript-refined.git", - "version": "v0.2.0" - }, - "refs": { - "dependencies": [ - "effect", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-refs.git", - "version": "v4.1.0" - }, - "remotedata": { - "dependencies": [ - "bifunctors", - "either", - "generics-rep", - "profunctor-lenses" - ], - "repo": "https://github.com/krisajenkins/purescript-remotedata.git", - "version": "v4.2.0" - }, - "result": { - "dependencies": [ - "either", - "foldable-traversable", - "prelude" - ], - "repo": "https://github.com/ad-si/purescript-result.git", - "version": "v1.0.3" - }, - "ring-modules": { - "dependencies": [ - "prelude" - ], - "repo": "https://github.com/f-o-a-m/purescript-ring-modules.git", - "version": "v5.0.1" - }, - "routing": { - "dependencies": [ - "aff", - "console", - "control", - "effect", - "either", - "foldable-traversable", - "globals", - "integers", - "lists", - "maybe", - "prelude", - "semirings", - "tuples", - "validation", - "web-html" - ], - "repo": "https://github.com/slamdata/purescript-routing.git", - "version": "v9.0.0" - }, - "routing-duplex": { - "dependencies": [ - "arrays", - "control", - "either", - "generics-rep", - "globals", - "lazy", - "prelude", - "profunctor", - "record", - "strings", - "typelevel-prelude" - ], - "repo": "https://github.com/natefaubion/purescript-routing-duplex.git", - "version": "v0.4.0" - }, - "run": { - "dependencies": [ - "aff", - "effect", - "either", - "free", - "maybe", - "newtype", - "prelude", - "profunctor", - "tailrec", - "tuples", - "type-equality", - "unsafe-coerce", - "variant" - ], - "repo": "https://github.com/natefaubion/purescript-run.git", - "version": "v3.0.1" - }, - "run-streaming": { - "dependencies": [ - "prelude", - "run" - ], - "repo": "https://github.com/natefaubion/purescript-run-streaming.git", - "version": "v2.0.0" - }, - "safely": { - "dependencies": [ - "freet", - "lists" - ], - "repo": "https://github.com/paf31/purescript-safely.git", - "version": "v4.0.1" - }, - "search-trie": { - "dependencies": [ - "prelude", - "arrays", - "ordered-collections", - "lists", - "foldable-traversable", - "bifunctors" - ], - "repo": "https://github.com/klntsky/purescript-search-trie.git", - "version": "v1.0.0" - }, - "selection-foldable": { - "dependencies": [ - "filterable", - "foldable-traversable", - "maybe", - "prelude" - ], - "repo": "https://github.com/jamieyung/purescript-selection-foldable.git", - "version": "v0.2.0" - }, - "semirings": { - "dependencies": [ - "foldable-traversable", - "lists", - "newtype", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-semirings.git", - "version": "v5.0.0" - }, - "servant-support": { - "dependencies": [ - "console", - "prelude", - "either", - "foldable-traversable", - "generics-rep", - "effect", - "aff", - "affjax", - "exceptions", - "web-xhr", - "foreign-generic" - ], - "repo": "https://github.com/shmish111/purescript-servant-support", - "version": "purs-0.13" - }, - "server-sent-events": { - "dependencies": [ - "effect", - "functions", - "generics-rep", - "maybe", - "prelude", - "web-events" - ], - "repo": "https://github.com/MichaelXavier/purescript-server-sent-events.git", - "version": "v0.2.0" - }, - "shoronpo": { - "dependencies": [ - "prelude", - "record-format" - ], - "repo": "https://github.com/justinwoo/purescript-shoronpo.git", - "version": "v0.3.0" - }, - "signal": { - "dependencies": [ - "aff", - "foldable-traversable", - "js-timers", - "maybe", - "prelude" - ], - "repo": "https://github.com/bodil/purescript-signal.git", - "version": "v10.1.0" - }, - "sijidou": { - "dependencies": [ - "prelude", - "record", - "typelevel-prelude" - ], - "repo": "https://github.com/justinwoo/purescript-sijidou.git", - "version": "v1.0.0" - }, - "simple-emitter": { - "dependencies": [ - "ordered-collections", - "refs" - ], - "repo": "https://github.com/oreshinya/purescript-simple-emitter.git", - "version": "v1.0.0" - }, - "simple-json": { - "dependencies": [ - "arrays", - "exceptions", - "foreign", - "foreign-object", - "globals", - "nullable", - "prelude", - "record", - "typelevel-prelude", - "variant" - ], - "repo": "https://github.com/justinwoo/purescript-simple-json.git", - "version": "v7.0.0" - }, - "simple-json-generics": { - "dependencies": [ - "generics-rep", - "simple-json" - ], - "repo": "https://github.com/justinwoo/purescript-simple-json-generics.git", - "version": "v0.1.0" - }, - "simple-json-utils": { - "dependencies": [ - "motsunabe", - "simple-json" - ], - "repo": "https://github.com/justinwoo/purescript-simple-json-utils.git", - "version": "v0.1.0" - }, - "simple-jwt": { - "dependencies": [ - "crypto", - "simple-json", - "strings" - ], - "repo": "https://github.com/oreshinya/purescript-simple-jwt.git", - "version": "v1.1.1" - }, - "simple-timestamp": { - "dependencies": [ - "console", - "datetime", - "effect", - "foreign", - "formatters", - "prelude", - "psci-support", - "simple-json", - "spec" - ], - "repo": "https://github.com/reactormonk/purescript-simple-timestamp.git", - "version": "v1.3.0" - }, - "sized-vectors": { - "dependencies": [ - "arrays", - "distributive", - "foldable-traversable", - "maybe", - "prelude", - "typelevel", - "unfoldable" - ], - "repo": "https://github.com/bodil/purescript-sized-vectors.git", - "version": "v3.1.0" - }, - "slug": { - "dependencies": [ - "prelude", - "maybe", - "strings", - "unicode", - "generics-rep", - "argonaut-codecs" - ], - "repo": "https://github.com/thomashoneyman/purescript-slug.git", - "version": "v1.0.0" - }, - "smolder": { - "dependencies": [ - "bifunctors", - "catenable-lists", - "free", - "globals", - "ordered-collections", - "strings", - "transformers", - "tuples" - ], - "repo": "https://github.com/bodil/purescript-smolder.git", - "version": "v12.2.0" - }, - "snabbdom": { - "dependencies": [ - "ordered-collections", - "prelude", - "web-dom", - "web-html" - ], - "repo": "https://github.com/LukaJCB/purescript-snabbdom.git", - "version": "v1.0.1" - }, - "sodium": { - "dependencies": [ - "aff", - "nullable", - "numbers", - "quickcheck-laws", - "test-unit" - ], - "repo": "https://github.com/SodiumFRP/purescript-sodium.git", - "version": "v2.1.0" - }, - "spec": { - "dependencies": [ - "aff", - "ansi", - "avar", - "console", - "exceptions", - "foldable-traversable", - "fork", - "generics-rep", - "now", - "pipes", - "prelude", - "strings", - "transformers" - ], - "repo": "https://github.com/purescript-spec/purescript-spec.git", - "version": "v4.0.1" - }, - "spec-discovery": { - "dependencies": [ - "arrays", - "effect", - "node-fs", - "prelude", - "spec" - ], - "repo": "https://github.com/owickstrom/purescript-spec-discovery.git", - "version": "v4.0.0" - }, - "spec-quickcheck": { - "dependencies": [ - "aff", - "prelude", - "quickcheck", - "random", - "spec" - ], - "repo": "https://github.com/owickstrom/purescript-spec-quickcheck.git", - "version": "v3.1.0" - }, - "spork": { - "dependencies": [ - "prelude", - "console", - "tailrec", - "arrays", - "refs", - "foldable-traversable", - "maybe", - "aff", - "halogen-vdom", - "dom-indexed", - "unsafe-reference", - "web-dom", - "web-html", - "web-events", - "web-uievents", - "effect", - "foreign", - "ordered-collections" - ], - "repo": "https://github.com/natefaubion/purescript-spork", - "version": "v1.0.0" - }, - "st": { - "dependencies": [ - "partial", - "prelude", - "tailrec" - ], - "repo": "https://github.com/purescript/purescript-st.git", - "version": "v4.0.0" - }, - "string-parsers": { - "dependencies": [ - "arrays", - "bifunctors", - "control", - "either", - "foldable-traversable", - "lists", - "maybe", - "prelude", - "strings", - "tailrec" - ], - "repo": "https://github.com/paf31/purescript-string-parsers.git", - "version": "v5.0.0" - }, - "strings": { - "dependencies": [ - "arrays", - "control", - "either", - "enums", - "foldable-traversable", - "gen", - "integers", - "maybe", - "newtype", - "nonempty", - "partial", - "prelude", - "tailrec", - "tuples", - "unfoldable", - "unsafe-coerce" - ], - "repo": "https://github.com/purescript/purescript-strings.git", - "version": "v4.0.1" - }, - "strings-extra": { - "dependencies": [ - "arrays", - "either", - "foldable-traversable", - "maybe", - "partial", - "prelude", - "strings", - "unicode" - ], - "repo": "https://github.com/purescript-contrib/purescript-strings-extra.git", - "version": "v2.0.0" - }, - "stringutils": { - "dependencies": [ - "arrays", - "either", - "integers", - "maybe", - "partial", - "prelude", - "strings" - ], - "repo": "https://github.com/menelaos/purescript-stringutils.git", - "version": "v0.0.9" - }, - "strongcheck": { - "dependencies": [ - "arrays", - "console", - "control", - "datetime", - "effect", - "either", - "enums", - "exceptions", - "foldable-traversable", - "free", - "gen", - "identity", - "integers", - "invariant", - "lazy", - "lists", - "machines", - "math", - "newtype", - "partial", - "prelude", - "profunctor", - "random", - "strings", - "tailrec", - "transformers", - "tuples" - ], - "repo": "https://github.com/purescript-contrib/purescript-strongcheck.git", - "version": "v4.1.1" - }, - "struct": { - "dependencies": [ - "argonaut", - "argonaut-codecs", - "effect", - "proxying", - "record", - "record-extra", - "subcategory", - "variant" - ], - "repo": "https://github.com/matthew-hilty/purescript-struct.git", - "version": "v1.1.0" - }, - "stylesheet": { - "dependencies": [ - "effect", - "foreign", - "generics-rep", - "ordered-collections", - "prelude", - "refs", - "unordered-collections", - "cssom" - ], - "repo": "https://github.com/danieljharvey/purescript-stylesheet.git", - "version": "v0.0.3" - }, - "subcategory": { - "dependencies": [ - "prelude", - "profunctor", - "record", - "proxy", - "typelevel-prelude" - ], - "repo": "https://github.com/matthew-hilty/purescript-subcategory.git", - "version": "v0.2.0" - }, - "suggest": { - "dependencies": [ - "console", - "node-buffer", - "node-fs", - "node-process", - "node-streams", - "psa-utils", - "refs" - ], - "repo": "https://github.com/nwolverson/purescript-suggest.git", - "version": "v5.0.0" - }, - "sunde": { - "dependencies": [ - "aff", - "effect", - "node-child-process", - "prelude" - ], - "repo": "https://github.com/justinwoo/purescript-sunde.git", - "version": "v2.0.0" - }, - "svg-parser": { - "dependencies": [ - "generics-rep", - "prelude", - "string-parsers" - ], - "repo": "https://github.com/rnons/purescript-svg-parser.git", - "version": "v1.0.0" - }, - "svg-parser-halogen": { - "dependencies": [ - "halogen", - "prelude", - "svg-parser" - ], - "repo": "https://github.com/rnons/purescript-svg-parser-halogen.git", - "version": "v1.0.0" - }, - "tailrec": { - "dependencies": [ - "bifunctors", - "effect", - "either", - "identity", - "maybe", - "partial", - "prelude", - "refs" - ], - "repo": "https://github.com/purescript/purescript-tailrec.git", - "version": "v4.1.0" - }, - "test-unit": { - "dependencies": [ - "aff", - "avar", - "effect", - "either", - "free", - "js-timers", - "lists", - "prelude", - "quickcheck", - "strings" - ], - "repo": "https://github.com/bodil/purescript-test-unit.git", - "version": "v15.0.0" - }, - "these": { - "dependencies": [ - "gen", - "tuples" - ], - "repo": "https://github.com/purescript-contrib/purescript-these.git", - "version": "v4.0.0" - }, - "tolerant-argonaut": { - "dependencies": [ - "argonaut-codecs", - "argonaut-core", - "arrays", - "effect", - "higher-order", - "lists", - "record", - "struct", - "typelevel-prelude" - ], - "repo": "https://github.com/matthew-hilty/purescript-tolerant-argonaut.git", - "version": "v1.1.0" - }, - "toppokki": { - "dependencies": [ - "aff-promise", - "functions", - "node-buffer", - "node-http", - "prelude", - "record" - ], - "repo": "https://github.com/justinwoo/purescript-toppokki.git", - "version": "v2.0.0" - }, - "tortellini": { - "dependencies": [ - "foreign-object", - "integers", - "lists", - "motsunabe", - "numbers", - "prelude", - "record", - "string-parsers", - "strings", - "transformers", - "typelevel-prelude" - ], - "repo": "https://github.com/justinwoo/purescript-tortellini.git", - "version": "v5.1.0" - }, - "transformers": { - "dependencies": [ - "control", - "distributive", - "effect", - "either", - "exceptions", - "foldable-traversable", - "identity", - "lazy", - "maybe", - "newtype", - "prelude", - "tailrec", - "tuples", - "unfoldable" - ], - "repo": "https://github.com/purescript/purescript-transformers.git", - "version": "v4.2.0" - }, - "trout": { - "dependencies": [ - "argonaut", - "media-types", - "prelude", - "smolder", - "spec", - "spec-discovery", - "uri" - ], - "repo": "https://github.com/owickstrom/purescript-trout.git", - "version": "v0.12.0" - }, - "tuples": { - "dependencies": [ - "bifunctors", - "control", - "distributive", - "foldable-traversable", - "invariant", - "maybe", - "newtype", - "prelude", - "type-equality" - ], - "repo": "https://github.com/purescript/purescript-tuples.git", - "version": "v5.1.0" - }, - "type-equality": { - "dependencies": [], - "repo": "https://github.com/purescript/purescript-type-equality.git", - "version": "v3.0.0" - }, - "type-isequal": { - "dependencies": [ - "typelevel-prelude" - ], - "repo": "https://github.com/justinwoo/purescript-type-isequal.git", - "version": "v0.1.0" - }, - "typedenv": { - "dependencies": [ - "foreign-object", - "generics-rep", - "integers", - "numbers", - "record", - "strings", - "typelevel-prelude" - ], - "repo": "https://github.com/nsaunders/purescript-typedenv.git", - "version": "v0.0.1" - }, - "typelevel": { - "dependencies": [ - "partial", - "prelude", - "tuples", - "typelevel-prelude", - "unsafe-coerce" - ], - "repo": "https://github.com/bodil/purescript-typelevel.git", - "version": "v6.0.0" - }, - "typelevel-prelude": { - "dependencies": [ - "prelude", - "proxy", - "type-equality" - ], - "repo": "https://github.com/purescript/purescript-typelevel-prelude.git", - "version": "v5.0.0" - }, - "uint": { - "dependencies": [ - "generics-rep", - "math", - "maybe" - ], - "repo": "https://github.com/zaquest/purescript-uint.git", - "version": "v5.1.1" - }, - "undefinable": { - "dependencies": [ - "functions", - "maybe" - ], - "repo": "https://github.com/ethul/purescript-undefinable.git", - "version": "v4.0.0" - }, - "unfoldable": { - "dependencies": [ - "foldable-traversable", - "maybe", - "partial", - "prelude", - "tuples" - ], - "repo": "https://github.com/purescript/purescript-unfoldable.git", - "version": "v4.0.2" - }, - "unicode": { - "dependencies": [ - "foldable-traversable", - "maybe", - "strings" - ], - "repo": "https://github.com/purescript-contrib/purescript-unicode.git", - "version": "v4.0.1" - }, - "unordered-collections": { - "dependencies": [ - "enums", - "functions", - "integers", - "lists", - "prelude", - "record", - "tuples", - "typelevel-prelude" - ], - "repo": "https://github.com/fehrenbach/purescript-unordered-collections.git", - "version": "v1.8.2" - }, - "unsafe-coerce": { - "dependencies": [], - "repo": "https://github.com/purescript/purescript-unsafe-coerce.git", - "version": "v4.0.0" - }, - "unsafe-reference": { - "dependencies": [], - "repo": "https://github.com/purescript-contrib/purescript-unsafe-reference", - "version": "v3.0.1" - }, - "uri": { - "dependencies": [ - "arrays", - "generics-rep", - "globals", - "integers", - "parsing", - "profunctor-lenses", - "quickcheck", - "spec", - "unfoldable", - "these" - ], - "repo": "https://github.com/slamdata/purescript-uri.git", - "version": "v7.0.0" - }, - "uuid": { - "dependencies": [ - "effect", - "maybe" - ], - "repo": "https://github.com/spicydonuts/purescript-uuid.git", - "version": "v6.0.0" - }, - "validation": { - "dependencies": [ - "bifunctors", - "control", - "either", - "foldable-traversable", - "newtype", - "prelude" - ], - "repo": "https://github.com/purescript/purescript-validation.git", - "version": "v4.2.0" - }, - "variant": { - "dependencies": [ - "enums", - "lists", - "maybe", - "partial", - "prelude", - "proxy", - "record", - "tuples", - "unsafe-coerce" - ], - "repo": "https://github.com/natefaubion/purescript-variant.git", - "version": "v6.0.1" - }, - "web-clipboard": { - "dependencies": [ - "web-html" - ], - "repo": "https://github.com/purescript-web/purescript-web-clipboard.git", - "version": "v2.0.0" - }, - "web-dom": { - "dependencies": [ - "web-events" - ], - "repo": "https://github.com/purescript-web/purescript-web-dom.git", - "version": "v4.0.0" - }, - "web-events": { - "dependencies": [ - "datetime", - "enums", - "nullable" - ], - "repo": "https://github.com/purescript-web/purescript-web-events.git", - "version": "v2.0.1" - }, - "web-file": { - "dependencies": [ - "foreign", - "media-types", - "web-dom" - ], - "repo": "https://github.com/purescript-web/purescript-web-file.git", - "version": "v2.2.0" - }, - "web-html": { - "dependencies": [ - "js-date", - "web-dom", - "web-file", - "web-storage" - ], - "repo": "https://github.com/purescript-web/purescript-web-html.git", - "version": "v2.3.0" - }, - "web-socket": { - "dependencies": [ - "arraybuffer-types", - "web-file" - ], - "repo": "https://github.com/purescript-web/purescript-web-socket.git", - "version": "v2.0.0" - }, - "web-storage": { - "dependencies": [ - "nullable", - "web-events" - ], - "repo": "https://github.com/purescript-web/purescript-web-storage.git", - "version": "v3.0.0" - }, - "web-touchevents": { - "dependencies": [ - "web-uievents" - ], - "repo": "https://github.com/purescript-web/purescript-web-touchevents.git", - "version": "v2.0.0" - }, - "web-uievents": { - "dependencies": [ - "web-html" - ], - "repo": "https://github.com/purescript-web/purescript-web-uievents.git", - "version": "v2.0.0" - }, - "web-xhr": { - "dependencies": [ - "arraybuffer-types", - "datetime", - "http-methods", - "web-dom", - "web-file" - ], - "repo": "https://github.com/purescript-web/purescript-web-xhr.git", - "version": "v3.0.2" - }, - "xiaomian": { - "dependencies": [ - "naporitan" - ], - "repo": "https://github.com/justinwoo/purescript-xiaomian.git", - "version": "v0.1.0" - }, - "yargs": { - "dependencies": [ - "console", - "either", - "exceptions", - "foreign", - "unsafe-coerce" - ], - "repo": "https://github.com/paf31/purescript-yargs.git", - "version": "v4.0.0" - } -} \ No newline at end of file diff --git a/plutus-playground-client/packages.nix b/plutus-playground-client/packages.nix deleted file mode 100644 index 2e4bba8e2e..0000000000 --- a/plutus-playground-client/packages.nix +++ /dev/null @@ -1,1279 +0,0 @@ -# This file was generated by Psc-Package2Nix -# You will not want to edit this file. -# To change the contents of this file, first fork Psc-Package2Nix -# And edit the $file_template - -{ pkgs ? import { } }: - -let - inputs = { - - "ace" = pkgs.stdenv.mkDerivation { - name = "ace"; - version = "v7.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-ace.git"; - rev = "v7.0.0"; - sha256 = "1fwr4gdj4fcrrqnqf1h2553zxhcfgss3s32snma9hmz34iswjh2p"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "ace-halogen" = pkgs.stdenv.mkDerivation { - name = "ace-halogen"; - version = "purs-0.13"; - src = pkgs.fetchgit { - url = "https://github.com/shmish111/purescript-ace-halogen"; - rev = "purs-0.13"; - sha256 = "04xp1scifkmnym67lncbbwyng0b9agbghly11y94q87avjvq1819"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "aff" = pkgs.stdenv.mkDerivation { - name = "aff"; - version = "v5.1.2"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-aff.git"; - rev = "v5.1.2"; - sha256 = "1ygjxbm2bqw82sm17szhzz4jihvbg9mszx1ii0n3sj72bnz02avz"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "affjax" = pkgs.stdenv.mkDerivation { - name = "affjax"; - version = "purs-0.13"; - src = pkgs.fetchgit { - url = "https://github.com/krisajenkins/purescript-affjax"; - rev = "purs-0.13"; - sha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "argonaut-codecs" = pkgs.stdenv.mkDerivation { - name = "argonaut-codecs"; - version = "v6.0.2"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-argonaut-codecs.git"; - rev = "v6.0.2"; - sha256 = "1i8dm95kbcl7k92jqnylhng1rjcqx5z12yhf6mwvp0z0bmsz250b"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "argonaut-core" = pkgs.stdenv.mkDerivation { - name = "argonaut-core"; - version = "v5.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-argonaut-core.git"; - rev = "v5.0.1"; - sha256 = "18s6grf5xpz5kq7xdnhbiwkci9fy2gzsplp92kj9xib2bm3m6pfa"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "arraybuffer-types" = pkgs.stdenv.mkDerivation { - name = "arraybuffer-types"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-arraybuffer-types.git"; - rev = "v2.0.0"; - sha256 = "059a8n49yhl46l1b1j2qj4ichzq6dzj29ajkfvw88npzj5w2rshy"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "arrays" = pkgs.stdenv.mkDerivation { - name = "arrays"; - version = "v5.3.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-arrays.git"; - rev = "v5.3.0"; - sha256 = "0r991qcx69xj07iagjaxkm0ab9qi2pw8cs3qwyybhis7asd6bnz6"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "avar" = pkgs.stdenv.mkDerivation { - name = "avar"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-avar.git"; - rev = "v3.0.0"; - sha256 = "14g05jm2xricy5b9vn4k4lhc9lzi5jvpvv85h10s17kn4wwi9igk"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "bifunctors" = pkgs.stdenv.mkDerivation { - name = "bifunctors"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-bifunctors.git"; - rev = "v4.0.0"; - sha256 = "1bdra5fbkraglqrrm484vw8h0wwk48kzkn586v4y7fg106q1q386"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "bigints" = pkgs.stdenv.mkDerivation { - name = "bigints"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/sharkdp/purescript-bigints.git"; - rev = "v4.0.0"; - sha256 = "1m9v4an4y55rhiknr2spyllf80chl61w2xzmg90p58f8q4mzih8r"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "catenable-lists" = pkgs.stdenv.mkDerivation { - name = "catenable-lists"; - version = "v5.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-catenable-lists.git"; - rev = "v5.0.1"; - sha256 = "0mbpb8xr9a7a4bvawhki7js5cbv7c0lv0vdwb6r8nmv6b61gzg27"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "console" = pkgs.stdenv.mkDerivation { - name = "console"; - version = "v4.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-console.git"; - rev = "v4.2.0"; - sha256 = "1b2nykdq1dzaqyra5pi8cvvz4dsbbkg57a2c88yi931ynm19nnw6"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "const" = pkgs.stdenv.mkDerivation { - name = "const"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-const.git"; - rev = "v4.1.0"; - sha256 = "0qbd2aisax52yw6sybdhs7na943cbsd6mylhhgsamrf7hzh6v51p"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "contravariant" = pkgs.stdenv.mkDerivation { - name = "contravariant"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-contravariant.git"; - rev = "v4.0.1"; - sha256 = "0dd17lwlybpz4i54cxnqdgy38rjlbw9p7bw1r43is6z3kdc8983a"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "control" = pkgs.stdenv.mkDerivation { - name = "control"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-control.git"; - rev = "v4.1.0"; - sha256 = "10703zvsnjm5fc74k6wzjsvpsfyc3jci3jxhm7rxf7ymya9z1z53"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "coroutines" = pkgs.stdenv.mkDerivation { - name = "coroutines"; - version = "v5.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-coroutines.git"; - rev = "v5.0.1"; - sha256 = "1is83blf44sflhwsaixpd1irlm33fsd1p919gbcn79mmmwi4bxdl"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "datetime" = pkgs.stdenv.mkDerivation { - name = "datetime"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-datetime.git"; - rev = "v4.1.1"; - sha256 = "06ghfvbvd5sd0q014qi8j8glk2g2j9f8z8cwq2318kllp92gz07q"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "debug" = pkgs.stdenv.mkDerivation { - name = "debug"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/garyb/purescript-debug.git"; - rev = "v4.0.0"; - sha256 = "0gwjj80akys0h111i74n429fmny992gx0r4rk1n98gqlqm5cmi21"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "distributive" = pkgs.stdenv.mkDerivation { - name = "distributive"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-distributive.git"; - rev = "v4.0.0"; - sha256 = "0zbn0yq1vv7fbbf1lncg80irz0vg7wnw9b9wrzxhdzpbkw4jinsl"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "dom-indexed" = pkgs.stdenv.mkDerivation { - name = "dom-indexed"; - version = "v7.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-dom-indexed.git"; - rev = "v7.0.0"; - sha256 = "18is75gsiix9w3f3lkly15cvs7ma1qc13hhi6wkl8nsj2g9g55ld"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "effect" = pkgs.stdenv.mkDerivation { - name = "effect"; - version = "v2.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-effect.git"; - rev = "v2.0.1"; - sha256 = "1vqw5wrdxzh1ww6z7271xr4kg4mx0r3k3mwg18dmgmzj11wbn2wh"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "either" = pkgs.stdenv.mkDerivation { - name = "either"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-either.git"; - rev = "v4.1.1"; - sha256 = "12j7vvjly0bgxidxmb2pflx0zy7x425dnvxk2y1pm66n0hbsq7ns"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "enums" = pkgs.stdenv.mkDerivation { - name = "enums"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-enums.git"; - rev = "v4.0.1"; - sha256 = "0qq0pgmq497nfml0y8xb2qdpga5xqp9sqq4ilv1rpyhg1v7nzb6v"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "exceptions" = pkgs.stdenv.mkDerivation { - name = "exceptions"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-exceptions.git"; - rev = "v4.0.0"; - sha256 = "17s0rg9k4phivhx9j3l2vqqfdhk61gpj1xfqy8w6zj3rnxj0b2cv"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "exists" = pkgs.stdenv.mkDerivation { - name = "exists"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-exists.git"; - rev = "v4.0.0"; - sha256 = "0bbdbw3jaqyi8dj2d52zvfgx4vl84d8cr6hp43vy8lfjfcbj0wlk"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "fixed-points" = pkgs.stdenv.mkDerivation { - name = "fixed-points"; - version = "v5.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-fixed-points.git"; - rev = "v5.1.0"; - sha256 = "14acfi7897z2vd8mq52h0gz8x31wyrvalb490rqjf4nyk73vhg36"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "foldable-traversable" = pkgs.stdenv.mkDerivation { - name = "foldable-traversable"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-foldable-traversable.git"; - rev = "v4.1.1"; - sha256 = "03x89xcmphckzjlp4chc7swrpw347ll5bvr2yp7x9v2jqw2jlyi1"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "foreign" = pkgs.stdenv.mkDerivation { - name = "foreign"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-foreign.git"; - rev = "v5.0.0"; - sha256 = "15mz2s4f8crkd721z4df2aag4s0wil6fs07cpcmi7dpnkn7a4nab"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "foreign-generic" = pkgs.stdenv.mkDerivation { - name = "foreign-generic"; - version = "purs-0.13"; - src = pkgs.fetchgit { - url = "https://github.com/shmish111/purescript-foreign-generic"; - rev = "purs-0.13"; - sha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "foreign-object" = pkgs.stdenv.mkDerivation { - name = "foreign-object"; - version = "v2.0.3"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-foreign-object.git"; - rev = "v2.0.3"; - sha256 = "07wiql59zfj901nk9526b6rykn9m24jjcs8v5dgxbr1c3hiab9n3"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "fork" = pkgs.stdenv.mkDerivation { - name = "fork"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-fork.git"; - rev = "v4.0.0"; - sha256 = "1jygqzyci40c28gw2ygnx8v52hilhajj1bdpn7ndvss4i7yh1lcp"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "form-urlencoded" = pkgs.stdenv.mkDerivation { - name = "form-urlencoded"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-form-urlencoded.git"; - rev = "v5.0.0"; - sha256 = "1kl937qxnbn9m1bn0ijpnfiizgpcvcrnzqcc1scwq2kxvxh8kqap"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "free" = pkgs.stdenv.mkDerivation { - name = "free"; - version = "v5.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-free.git"; - rev = "v5.2.0"; - sha256 = "1bwj0ay7q9lm4ir29jy549m05jvaqik1s615biv23y51ngx3fn49"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "freeap" = pkgs.stdenv.mkDerivation { - name = "freeap"; - version = "v5.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/ethul/purescript-freeap.git"; - rev = "v5.0.1"; - sha256 = "007840vpxa4gz0fvjbahyky2xzz625gzfaiy2wjpb50d9qacsr7y"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "freet" = pkgs.stdenv.mkDerivation { - name = "freet"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-freet.git"; - rev = "v5.0.0"; - sha256 = "0j8y47x672z8h809hxl1n502yj0y3yv8zsln8bk17rcz06x8frv9"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "functions" = pkgs.stdenv.mkDerivation { - name = "functions"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-functions.git"; - rev = "v4.0.0"; - sha256 = "0675k5kxxwdvsjs6a3is8pwm3hmv0vbcza1b8ls10gymmfz3k3hj"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "functors" = pkgs.stdenv.mkDerivation { - name = "functors"; - version = "v3.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-functors.git"; - rev = "v3.1.1"; - sha256 = "1cnn3zhk6qcyiwbbpvrdqgsbch4qihx2y9d6sv45bvd8kzrbd306"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "gen" = pkgs.stdenv.mkDerivation { - name = "gen"; - version = "v2.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-gen.git"; - rev = "v2.1.1"; - sha256 = "0pk68cn1s89hql30ydks9gh34gbxg391smi2albx3qvxnfkrpxca"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "generics-rep" = pkgs.stdenv.mkDerivation { - name = "generics-rep"; - version = "v6.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-generics-rep.git"; - rev = "v6.1.1"; - sha256 = "15vchzbcvf6byks90q14lvcwb8hnxqzm2mrlxi7v1f7has4s74kn"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "globals" = pkgs.stdenv.mkDerivation { - name = "globals"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-globals.git"; - rev = "v4.1.0"; - sha256 = "03h4npdbsjr1mkjasdi071l0cl7zdf3l76a8f0x4ghx47yvpgadn"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "halogen" = pkgs.stdenv.mkDerivation { - name = "halogen"; - version = "v5.0.0-rc.7"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-halogen.git"; - rev = "v5.0.0-rc.7"; - sha256 = "025wwiqyidgs2z4zkz0vrik1gf2jh9qqvvnxzh2jvp6gxhq0ylb3"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "halogen-vdom" = pkgs.stdenv.mkDerivation { - name = "halogen-vdom"; - version = "v6.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-halogen-vdom.git"; - rev = "v6.1.0"; - sha256 = "1zsivlk74zn6wkw25mvc12yjnqfjgyfpmhs3rsrvgycnmswdavnk"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "http-methods" = pkgs.stdenv.mkDerivation { - name = "http-methods"; - version = "v4.0.2"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-http-methods.git"; - rev = "v4.0.2"; - sha256 = "1wfgrlnl33bcqw54hbc8icah2fi0rvi5zxhz07665vy9p5ppvkqs"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "identity" = pkgs.stdenv.mkDerivation { - name = "identity"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-identity.git"; - rev = "v4.1.0"; - sha256 = "1scdgbfkphfmapw7p9rnsiynpmqzyvnal2glzj450q51f8g1dhld"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "integers" = pkgs.stdenv.mkDerivation { - name = "integers"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-integers.git"; - rev = "v4.0.0"; - sha256 = "17d4bfpnrmbxlc7hhhrvnli70ydaqyr26zgvc9q52a76zgdcb4cf"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "invariant" = pkgs.stdenv.mkDerivation { - name = "invariant"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-invariant.git"; - rev = "v4.1.0"; - sha256 = "1fimpbh3yb7clvqxcdf4yf9im64z0v2s9pbspfacgq5b4vshjas9"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "js-date" = pkgs.stdenv.mkDerivation { - name = "js-date"; - version = "v6.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-js-date.git"; - rev = "v6.0.0"; - sha256 = "19qyzbr4a1ca8znbd8gcbz0a801f5p1v238ky3408gdx4ba32zjd"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "js-timers" = pkgs.stdenv.mkDerivation { - name = "js-timers"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-js-timers.git"; - rev = "v4.0.1"; - sha256 = "1a8092sli7zqw1wflibhjza1ww21dxl7x7r602iazzwh2g70v4dg"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "lazy" = pkgs.stdenv.mkDerivation { - name = "lazy"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-lazy.git"; - rev = "v4.0.0"; - sha256 = "156q89l4nvvn14imbhp6xvvm82q7kqh1pyndmldmnkhiqyr84vqv"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "lcg" = pkgs.stdenv.mkDerivation { - name = "lcg"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-lcg.git"; - rev = "v2.0.0"; - sha256 = "1851cq2g84jzjbvbmncbivbhaqzj9zv5ni3gs14k04nmx2brxmvj"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "lists" = pkgs.stdenv.mkDerivation { - name = "lists"; - version = "v5.4.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-lists.git"; - rev = "v5.4.1"; - sha256 = "0l0jiqhcjzkg4nv2a6h2vdf4izr9mf7cxc86cq1hf3j4dh6spym1"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "math" = pkgs.stdenv.mkDerivation { - name = "math"; - version = "v2.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-math.git"; - rev = "v2.1.1"; - sha256 = "1msmy9w7y6fij62sdc55w68gpwkhm6lhgc8qjisjk4sxx1wdg1rr"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "matryoshka" = pkgs.stdenv.mkDerivation { - name = "matryoshka"; - version = "v0.4.0"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-matryoshka.git"; - rev = "v0.4.0"; - sha256 = "1vm8papnpkmf4w51v6a2cnq408ayi75nz5b5zwiwksd35c8x2g64"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "maybe" = pkgs.stdenv.mkDerivation { - name = "maybe"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-maybe.git"; - rev = "v4.0.1"; - sha256 = "073wa0d51daxdwacfcxg5pf6ch63n4ii55xm1ih87bxrg8mp52mx"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "media-types" = pkgs.stdenv.mkDerivation { - name = "media-types"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-media-types.git"; - rev = "v4.0.1"; - sha256 = "0ykwmxrhmwfy6c5mxjxa43xdf5xqakrqyvr5fn986yad50gjqj75"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "newtype" = pkgs.stdenv.mkDerivation { - name = "newtype"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-newtype.git"; - rev = "v3.0.0"; - sha256 = "0qvk9p41miy806b05b4ikbr3if0fcyc35gfrwd2mflcxxp46011c"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "node-buffer" = pkgs.stdenv.mkDerivation { - name = "node-buffer"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-node/purescript-node-buffer.git"; - rev = "v5.0.0"; - sha256 = "0ih2y29srdxgn526fw2v1y95hpivjil44vkl93w6nrqsymki36y0"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "node-fs" = pkgs.stdenv.mkDerivation { - name = "node-fs"; - version = "v5.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-node/purescript-node-fs.git"; - rev = "v5.0.1"; - sha256 = "0i3bd7aw16vyb5sh5fzlvgg9q6cjdvmnfs57in6rxm34z8d8c0p8"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "node-path" = pkgs.stdenv.mkDerivation { - name = "node-path"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-node/purescript-node-path.git"; - rev = "v3.0.0"; - sha256 = "0j1ni52m62dpcrfakl1ik131i31bkg91yv0p1c40sdw0f59fzf6x"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "node-streams" = pkgs.stdenv.mkDerivation { - name = "node-streams"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-node/purescript-node-streams.git"; - rev = "v4.0.1"; - sha256 = "12dki2li0d7s54kvcr6gksb5nxf6kzs93gwxnq4bh1flri8p0i7r"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "nonempty" = pkgs.stdenv.mkDerivation { - name = "nonempty"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-nonempty.git"; - rev = "v5.0.0"; - sha256 = "1vz174sg32cqrp52nwb2vz9frrzmdwzzlgl4vc2cm5wlf2anirxj"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "now" = pkgs.stdenv.mkDerivation { - name = "now"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-now.git"; - rev = "v4.0.0"; - sha256 = "18h5pif2dy4r7w1xg2zw4mvdqlar9xqp3rawkiavmsc946ncf3zs"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "nullable" = pkgs.stdenv.mkDerivation { - name = "nullable"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-nullable.git"; - rev = "v4.1.1"; - sha256 = "14qaxxga8gqlr4pijyvqycdyhjr6qpz3h4aarficw5j75b7x8nyv"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "numerics" = pkgs.stdenv.mkDerivation { - name = "numerics"; - version = "v0.1.2"; - src = pkgs.fetchgit { - url = "https://github.com/Proclivis/purescript-numerics"; - rev = "v0.1.2"; - sha256 = "1l1kxd87mlpwyxskfcnj01zxsrva35v10vc2rapqp8yg1n0rgwcr"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "ordered-collections" = pkgs.stdenv.mkDerivation { - name = "ordered-collections"; - version = "v1.6.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-ordered-collections.git"; - rev = "v1.6.1"; - sha256 = "0r48p94d3cyzni2z7ikzcap472k23dx8zq37c1prmjb01v03mfvc"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "orders" = pkgs.stdenv.mkDerivation { - name = "orders"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-orders.git"; - rev = "v4.0.0"; - sha256 = "13p1sm4dxkmxhld9x5qqg62iiajjb3qpzs66c1r24y5fs4zsfry4"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "parallel" = pkgs.stdenv.mkDerivation { - name = "parallel"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-parallel.git"; - rev = "v4.0.0"; - sha256 = "1d5bnagabw2k8yxywkygwrpblb2ggqh2fhpqfrx2sj1y53x332hg"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "parsing" = pkgs.stdenv.mkDerivation { - name = "parsing"; - version = "v5.0.3"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-parsing.git"; - rev = "v5.0.3"; - sha256 = "0m5xvb5kis28laj3navyyakyq408vw115c2dvngf1vljzh1hk5kj"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "partial" = pkgs.stdenv.mkDerivation { - name = "partial"; - version = "v2.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-partial.git"; - rev = "v2.0.1"; - sha256 = "11qr80989g7xmvw1brnrclsbg2wdkbr5k3cqpngfip3nnirrypcn"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "prelude" = pkgs.stdenv.mkDerivation { - name = "prelude"; - version = "v4.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-prelude.git"; - rev = "v4.1.1"; - sha256 = "1frvjrv0mr508r6683l1mp5rzm1y2dz76fz40zf4k2c64sy6y1xm"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "profunctor" = pkgs.stdenv.mkDerivation { - name = "profunctor"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-profunctor.git"; - rev = "v4.1.0"; - sha256 = "1zwbxgimpknmashmq2rb773kbwbksr4ahcdkpnvvcapasxhds0a7"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "profunctor-lenses" = pkgs.stdenv.mkDerivation { - name = "profunctor-lenses"; - version = "v6.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-profunctor-lenses.git"; - rev = "v6.2.0"; - sha256 = "0bb8ib00in8d65kvympdlfncb7bp1qqsjvvpw9zfwiwf67ix4v57"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "proxy" = pkgs.stdenv.mkDerivation { - name = "proxy"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-proxy.git"; - rev = "v3.0.0"; - sha256 = "0rqf25b1n9p5sgx7gdsxwrfv9rb3sqxgqmqpp5kdm30lfk7snz24"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "psci-support" = pkgs.stdenv.mkDerivation { - name = "psci-support"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-psci-support.git"; - rev = "v4.0.0"; - sha256 = "0jd773zcklr6hjddqingzmk20a0afpm2r9pczfjbj0d93pbxb4xh"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "quickcheck" = pkgs.stdenv.mkDerivation { - name = "quickcheck"; - version = "v6.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-quickcheck.git"; - rev = "v6.1.0"; - sha256 = "0b6208067krf81kzq2hbxs68386hcicbscwxbj5nck07ivjjvqh0"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "random" = pkgs.stdenv.mkDerivation { - name = "random"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-random.git"; - rev = "v4.0.0"; - sha256 = "0k37v7z529adx6ypxj0xjyfrz45qia6p0vki2wpvi8lik7c698gf"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "rationals" = pkgs.stdenv.mkDerivation { - name = "rationals"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/anttih/purescript-rationals.git"; - rev = "v5.0.0"; - sha256 = "1idvjvvx5kwmi8kj2ps95bcvlsgij1xgin4jfw3rmcqd930wqq6q"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "record" = pkgs.stdenv.mkDerivation { - name = "record"; - version = "v2.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-record.git"; - rev = "v2.0.1"; - sha256 = "1l7ixb0gc2man36181g3hdf46sjp7xh0kv8bgrvalxfisjmd12v0"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "refs" = pkgs.stdenv.mkDerivation { - name = "refs"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-refs.git"; - rev = "v4.1.0"; - sha256 = "08161iy1xbafzblv033v84156azpcqkiw9v9d6gliphrq5fm17gm"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "remotedata" = pkgs.stdenv.mkDerivation { - name = "remotedata"; - version = "v4.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/krisajenkins/purescript-remotedata.git"; - rev = "v4.2.0"; - sha256 = "15ab34s3bz2kbzrhbxixzwpxmgj356px8z1s77r2pa9fjnmkn40v"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "servant-support" = pkgs.stdenv.mkDerivation { - name = "servant-support"; - version = "purs-0.13"; - src = pkgs.fetchgit { - url = "https://github.com/shmish111/purescript-servant-support"; - rev = "purs-0.13"; - sha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "st" = pkgs.stdenv.mkDerivation { - name = "st"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-st.git"; - rev = "v4.0.0"; - sha256 = "0m2jkb9dmpbr8s1c20l7sm2q11y5rx8gqfiyspnyhq5apzkknjr0"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "strings" = pkgs.stdenv.mkDerivation { - name = "strings"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-strings.git"; - rev = "v4.0.1"; - sha256 = "147l3l3fzn7liparhm2y3p8j4ck1lblra5j493p2hy5yy5ndznc8"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "tailrec" = pkgs.stdenv.mkDerivation { - name = "tailrec"; - version = "v4.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-tailrec.git"; - rev = "v4.1.0"; - sha256 = "1qgxjim8wmw9m2iy1cq0kx5n6lh3bs52w5mdxc7k4wb880d9h32w"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "test-unit" = pkgs.stdenv.mkDerivation { - name = "test-unit"; - version = "v15.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/bodil/purescript-test-unit.git"; - rev = "v15.0.0"; - sha256 = "06lb90vppa7naqqwz7wbvlkkyz86pbdd3ycw3d2iygvxbzkz8xjn"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "transformers" = pkgs.stdenv.mkDerivation { - name = "transformers"; - version = "v4.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-transformers.git"; - rev = "v4.2.0"; - sha256 = "03qmvl9s7lbvm73dy9ps6qp39pdcm91hb8yakgj7aq8hgpj7b6bg"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "tuples" = pkgs.stdenv.mkDerivation { - name = "tuples"; - version = "v5.1.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-tuples.git"; - rev = "v5.1.0"; - sha256 = "045nsy0r2g51gih0wjhcvhl6gfr8947mlrqwg644ygz72rjm8wq4"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "type-equality" = pkgs.stdenv.mkDerivation { - name = "type-equality"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-type-equality.git"; - rev = "v3.0.0"; - sha256 = "1b7szyca5s96gaawvgwrw7fa8r7gqsdff7xhz3vvngnylv2scl3w"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "typelevel-prelude" = pkgs.stdenv.mkDerivation { - name = "typelevel-prelude"; - version = "v5.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-typelevel-prelude.git"; - rev = "v5.0.0"; - sha256 = "01ki39xj87kwf8j8divlzwrvfyjcgxpmzhhmxzjylqx6jarcwyg6"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "uint" = pkgs.stdenv.mkDerivation { - name = "uint"; - version = "v5.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/zaquest/purescript-uint.git"; - rev = "v5.1.1"; - sha256 = "13103kqj2abiy8p7v81w1dj8jm0mll177mfjb7ar6km0bsxjigc6"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "undefinable" = pkgs.stdenv.mkDerivation { - name = "undefinable"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/ethul/purescript-undefinable.git"; - rev = "v4.0.0"; - sha256 = "03z91g1n6zmiqgqqxi65g99a9qxfb8dcnzg2wnb16i2rl8frsl3v"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "unfoldable" = pkgs.stdenv.mkDerivation { - name = "unfoldable"; - version = "v4.0.2"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-unfoldable.git"; - rev = "v4.0.2"; - sha256 = "0lzhx030c5933maxcjwk6kzlvbxky1kiwrymqf1dp5wbrar3jyv4"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "unicode" = pkgs.stdenv.mkDerivation { - name = "unicode"; - version = "v4.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-unicode.git"; - rev = "v4.0.1"; - sha256 = "1a53jv7pzyjk5v6kmwwy50d3l8d26k0id59sn8g3lzkih24nalhp"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "unsafe-coerce" = pkgs.stdenv.mkDerivation { - name = "unsafe-coerce"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-unsafe-coerce.git"; - rev = "v4.0.0"; - sha256 = "0k9255mk2mz6xjb11pwkgfcblmmyvr86ig5kr92jwy95xim09zip"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "unsafe-reference" = pkgs.stdenv.mkDerivation { - name = "unsafe-reference"; - version = "v3.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-unsafe-reference"; - rev = "v3.0.1"; - sha256 = "0q758dz59qz0li4s3w1qcg921xp5i5rh6i1l611iv7rr8cbj11al"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-clipboard" = pkgs.stdenv.mkDerivation { - name = "web-clipboard"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-clipboard.git"; - rev = "v2.0.0"; - sha256 = "17i7rpzxi7pgas32xz8vjcs54m94gnmca3my0p70gzvf3rasnxyx"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-dom" = pkgs.stdenv.mkDerivation { - name = "web-dom"; - version = "v4.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-dom.git"; - rev = "v4.0.0"; - sha256 = "04rf7i2aik7is3ga6khfmkz9vzv331jryv72awfn2dpc1gaqp74k"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-events" = pkgs.stdenv.mkDerivation { - name = "web-events"; - version = "v2.0.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-events.git"; - rev = "v2.0.1"; - sha256 = "1vd1gfh6zv50bq4v1ppl2wvc5mskcw9n1bfj29qjg0dx0ffxzv2f"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-file" = pkgs.stdenv.mkDerivation { - name = "web-file"; - version = "v2.2.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-file.git"; - rev = "v2.2.0"; - sha256 = "0kf26rpkg5jwyh7gl7bvcfs6r7h76d8yycpnay247pqx9m14490p"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-html" = pkgs.stdenv.mkDerivation { - name = "web-html"; - version = "v2.3.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-html.git"; - rev = "v2.3.0"; - sha256 = "1gz2wkph49rkwd7cm6j0mx9sv6a3nzxcidv50mrxydhl3h8153gy"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-storage" = pkgs.stdenv.mkDerivation { - name = "web-storage"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-storage.git"; - rev = "v3.0.0"; - sha256 = "1ycb2s29aw9w6lqik6hfmp9nf9i2yhn0q26hc4p3450jam5mj8bx"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-touchevents" = pkgs.stdenv.mkDerivation { - name = "web-touchevents"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-touchevents.git"; - rev = "v2.0.0"; - sha256 = "0mhsfqlglx04q3vkjg4k33bkxcpx2cmbq4x1zxyhl48q1qqmnic8"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-uievents" = pkgs.stdenv.mkDerivation { - name = "web-uievents"; - version = "v2.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-uievents.git"; - rev = "v2.0.0"; - sha256 = "04032nl0z9hjq7b799zhbn7in10dz9kgrrcs0adjbaf08rc2kcwh"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "web-xhr" = pkgs.stdenv.mkDerivation { - name = "web-xhr"; - version = "v3.0.2"; - src = pkgs.fetchgit { - url = "https://github.com/purescript-web/purescript-web-xhr.git"; - rev = "v3.0.2"; - sha256 = "1g35z2j9i5lqfms4yi8hgbgc85x6dy9lr3ygbr2f5fgkz86x3hqj"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - }; - -in -{ - inherit inputs; - - set = "local"; - source = ""; - sha256 = "local-setup-no-hash"; -} diff --git a/plutus-playground-client/spago-packages.nix b/plutus-playground-client/spago-packages.nix index f6582bca2d..5deba33666 100644 --- a/plutus-playground-client/spago-packages.nix +++ b/plutus-playground-client/spago-packages.nix @@ -7,23 +7,11 @@ let "aff" = pkgs.stdenv.mkDerivation { name = "aff"; - version = "v5.1.2"; - src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-aff.git"; - rev = "78916a9c7e6d203f1d9f441c8eaa257d6475e978"; - sha256 = "1ygjxbm2bqw82sm17szhzz4jihvbg9mszx1ii0n3sj72bnz02avz"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "aff-coroutines" = pkgs.stdenv.mkDerivation { - name = "aff-coroutines"; - version = "v7.0.0"; + version = "v6.0.0"; src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-aff-coroutines.git"; - rev = "f2f410f3cc9030487ddadf9ffdaab75ba508bde9"; - sha256 = "1cbly4m2na5kf3halj68rjy5khydb71gzz0ry323z5h1i0fna2g9"; + url = "https://github.com/purescript-contrib/purescript-aff.git"; + rev = "d0eb009f2f47cb1f5ba1d8592d90c95e8e7ff75d"; + sha256 = "1780sgqyvbdgh8ynxmxn5d44vvhaz7kn9sv3l44c2s9q8xfjkfgm"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -31,11 +19,11 @@ let "aff-promise" = pkgs.stdenv.mkDerivation { name = "aff-promise"; - version = "v2.1.0"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/nwolverson/purescript-aff-promise.git"; - rev = "033d6b90252e0390b0de7845e21de919bc4c3a0e"; - sha256 = "0khm53lvxgvc7fbsvcr2h2wlhcgay8vq45755f0w8vpk1441dvww"; + rev = "45cfba7f663fce12fe69285fe5acaa4ff025144c"; + sha256 = "12fnlwcrj5p6kc5rls7qxwg53zd83gkdpklpmp8jyav945hlgbj2"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -43,11 +31,11 @@ let "affjax" = pkgs.stdenv.mkDerivation { name = "affjax"; - version = "v10.0.0"; + version = "v12.0.0"; src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-affjax.git"; - rev = "200bad76c420935550bb9ef0ea6a548caea2ba42"; - sha256 = "0n01xpc60xqd1gjxdh6jxbvc0m4i6h95j6dkayncbck5zrgnm2d7"; + url = "https://github.com/purescript-contrib/purescript-affjax.git"; + rev = "5be197edc213fbededb8da908f77b69908eaa6f8"; + sha256 = "1f2snaimnl9ry8f3kankfcyy50wkba54vvin4wsrglahqgs1nrgb"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -55,11 +43,11 @@ let "ansi" = pkgs.stdenv.mkDerivation { name = "ansi"; - version = "v5.0.0"; + version = "v6.1.0"; src = pkgs.fetchgit { url = "https://github.com/hdgarrood/purescript-ansi.git"; - rev = "e060b4a7c9a0df9359871cb0c5773139e5525d2f"; - sha256 = "16kgy9zbdms9appd69gad2bka44ijkcnc9p0kf5g7x672jypx3ar"; + rev = "e89e6fede616bd16b001841cf30ac320c95313a6"; + sha256 = "1jsll0h7nz13zgscs036cnkkc6frnlcnk6fwjdwsyp6wbmjri2zm"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -67,11 +55,11 @@ let "argonaut-codecs" = pkgs.stdenv.mkDerivation { name = "argonaut-codecs"; - version = "v6.0.2"; + version = "v8.1.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-argonaut-codecs.git"; - rev = "b0317d576e10aa73600c43f835bfad45679d0aff"; - sha256 = "1i8dm95kbcl7k92jqnylhng1rjcqx5z12yhf6mwvp0z0bmsz250b"; + rev = "b0a041d92bfd548e2cd793cc7c02363464325a13"; + sha256 = "11vmlq98s4jmg5grvdrrlfkqj9vk3la44ky8158a440ipcpinjkq"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -79,11 +67,11 @@ let "argonaut-core" = pkgs.stdenv.mkDerivation { name = "argonaut-core"; - version = "v5.0.2"; + version = "v6.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-argonaut-core.git"; - rev = "a9999bc4c10272ee188768bf90a455bd1a79ccd6"; - sha256 = "1rfd1brvzp9akx6hypxql2qv9bhlcqks1xwqfqqf31dqvcl7vvhc"; + rev = "673971dee79667882a83f9fda7097e50530726f1"; + sha256 = "13ka4xybc8ql54xlkkhy4919nnapfigdlk51ja85f8xwhr64x9kq"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -91,11 +79,11 @@ let "arraybuffer-types" = pkgs.stdenv.mkDerivation { name = "arraybuffer-types"; - version = "v2.0.0"; + version = "v3.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-arraybuffer-types.git"; - rev = "505aa3de50a1400e5f2fce4a8e7b1a39abaa8fd9"; - sha256 = "059a8n49yhl46l1b1j2qj4ichzq6dzj29ajkfvw88npzj5w2rshy"; + rev = "48cd7f4887791db1d9c2daf5fd98b62ba00e15bd"; + sha256 = "09r6bhsiq9iqdsjf9p8m3p31qkszsipsafvy836mfdi8af6h5fv6"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -103,11 +91,23 @@ let "arrays" = pkgs.stdenv.mkDerivation { name = "arrays"; - version = "v5.3.1"; + version = "v6.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-arrays.git"; - rev = "463dcacb99455de5e28ac4a3312bb795f293d2d9"; - sha256 = "1z8i4mr30mjsvmw743g0m1yxfgqa9rhbgq7jq3955mg7j80j5r7w"; + rev = "c0aa3176b077ad7a46b11ef34487485c28142e53"; + sha256 = "0lm0m5hapimchzgfywr648pkw1hpggr6qibh8d19p2impbnc94c0"; + }; + phases = "installPhase"; + installPhase = "ln -s $src $out"; + }; + + "assert" = pkgs.stdenv.mkDerivation { + name = "assert"; + version = "v5.0.0"; + src = pkgs.fetchgit { + url = "https://github.com/purescript/purescript-assert.git"; + rev = "71a3b1f3b9917c23691fdbb1858de171be871a10"; + sha256 = "0r1l7j67an8dy1w4xdpr8nc30lsxv31xwqph9mkfh3nd49jlyyd3"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -115,11 +115,11 @@ let "avar" = pkgs.stdenv.mkDerivation { name = "avar"; - version = "v3.0.0"; + version = "v4.0.0"; src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-avar.git"; - rev = "17914413130490318a475e9de6a9244aaaa097d2"; - sha256 = "14g05jm2xricy5b9vn4k4lhc9lzi5jvpvv85h10s17kn4wwi9igk"; + url = "https://github.com/purescript-contrib/purescript-avar.git"; + rev = "ac3cbbb8d4b71ff19a78a3178355c089e44d3b4d"; + sha256 = "005046wl61w6r5v3qwd16srhcx82vdz3yvp4xzad2xaasb6iq55l"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -127,11 +127,11 @@ let "bifunctors" = pkgs.stdenv.mkDerivation { name = "bifunctors"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-bifunctors.git"; - rev = "1062425892b4a1c734ec653dded22546e3063b27"; - sha256 = "1bdra5fbkraglqrrm484vw8h0wwk48kzkn586v4y7fg106q1q386"; + rev = "a31d0fc4bbebf19d5e9b21b65493c28b8d3fba62"; + sha256 = "0xc2hf8ccdgqw3m9qcmr38kmzv05fsxvakd07wyrqshvkzg3xn0d"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -139,11 +139,11 @@ let "bigints" = pkgs.stdenv.mkDerivation { name = "bigints"; - version = "v4.0.0"; + version = "v6.0.0"; src = pkgs.fetchgit { url = "https://github.com/sharkdp/purescript-bigints.git"; - rev = "b29a2487899abc3701124701b82993a5fe129378"; - sha256 = "1m9v4an4y55rhiknr2spyllf80chl61w2xzmg90p58f8q4mzih8r"; + rev = "d5151e04db7e18641fbb2b5892f4198b1cab5907"; + sha256 = "0x8s6d6q2rpfkk56bmayg57a7hl2h7sq9ljrxfc8sjnwd7mfs193"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -151,11 +151,11 @@ let "catenable-lists" = pkgs.stdenv.mkDerivation { name = "catenable-lists"; - version = "v5.0.1"; + version = "v6.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-catenable-lists.git"; - rev = "d81b7df30d9879d0bb531b3102fb36f429c2f12e"; - sha256 = "0mbpb8xr9a7a4bvawhki7js5cbv7c0lv0vdwb6r8nmv6b61gzg27"; + rev = "ee03395f2c5d59a7fd8529a0faac6ec1ebcbb682"; + sha256 = "1lz06fx0za5sl65wccn5fl37mw3x4jnvrriz1gg0aqsmm9lag7ss"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -163,11 +163,11 @@ let "concurrent-queues" = pkgs.stdenv.mkDerivation { name = "concurrent-queues"; - version = "v1.1.0"; + version = "v2.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-concurrent-queues.git"; - rev = "e461aa5bbcfb99dd59c993a7c5c4f0e0751e4a8b"; - sha256 = "1a0vlxbl0vnk68v4wszgy6sz51klvnxfw8v8l4fpwkbb886mvxaj"; + rev = "300965817e2ef8a87cc3214f0f674193596cc600"; + sha256 = "1x67azwjb1vn3dpcbzwgfvyfpx2qh0b2ns3d0jr8ckgrs4msrfmj"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -175,11 +175,11 @@ let "console" = pkgs.stdenv.mkDerivation { name = "console"; - version = "v4.4.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-console.git"; - rev = "9b48f83997168b94418d64d9e7b5c1763b30bdab"; - sha256 = "1w9k2g242lvyv4npb5rqfbdq1ngh7s7v12zarxn8yxgq15palh3m"; + rev = "d7cb69ef8fed8a51466afe1b623868bb29e8586e"; + sha256 = "0fzzzqjgrz33pb2jf7cdqpg09ilxb7bsrc7sbfq52wjg0sx9aq6g"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -187,11 +187,11 @@ let "const" = pkgs.stdenv.mkDerivation { name = "const"; - version = "v4.1.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-const.git"; - rev = "bc5db27b0ed3947fa5e2074ccbab01236eec3fa4"; - sha256 = "0qbd2aisax52yw6sybdhs7na943cbsd6mylhhgsamrf7hzh6v51p"; + rev = "3a3a4bdc44f71311cf27de9bd22039b110277540"; + sha256 = "0aq9qjbrvf8mf8hmas6imv4mg6n3zi13hkf449ns1hn12lw8qv4g"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -199,11 +199,11 @@ let "contravariant" = pkgs.stdenv.mkDerivation { name = "contravariant"; - version = "v4.0.1"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-contravariant.git"; - rev = "cb69db0253c2e2ed3fef784dad58f3418a8ee834"; - sha256 = "0dd17lwlybpz4i54cxnqdgy38rjlbw9p7bw1r43is6z3kdc8983a"; + rev = "ae1a765f7ddbfd96ae1f12e399e46d554d8e3b38"; + sha256 = "029hb8i3n4759x4gc06wkfgr7wim5x1w5jy2bsiy42n0g731h5qc"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -211,11 +211,11 @@ let "control" = pkgs.stdenv.mkDerivation { name = "control"; - version = "v4.2.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-control.git"; - rev = "05d40c5855a0eda3bc396a3d815eaf213a0534e6"; - sha256 = "1nm45khn2dvlyv059nzpz1w7d3nfsvq45hnb2qllrbzyv7rlxmi8"; + rev = "18d582e311f1f8523f9eb55fb93c91bd21e22837"; + sha256 = "06dc06yli4g5yr8fb9sdpqbhiaff37g977qcsbds9q2mlhnjgfx9"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -223,11 +223,11 @@ let "coroutines" = pkgs.stdenv.mkDerivation { name = "coroutines"; - version = "v5.0.1"; + version = "v6.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-coroutines.git"; - rev = "67a076b704f4b176f9332e8dc82d531a357e00ac"; - sha256 = "1is83blf44sflhwsaixpd1irlm33fsd1p919gbcn79mmmwi4bxdl"; + rev = "c9788b76cee058f7d3df49f4a662ed1fa1cd8f8f"; + sha256 = "1s65mv8gw4f2n0f75dld16mq9m1qmj6cp4yzy80v67nrg5mfw9xa"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -235,11 +235,11 @@ let "datetime" = pkgs.stdenv.mkDerivation { name = "datetime"; - version = "v4.1.1"; + version = "v5.0.2"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-datetime.git"; - rev = "9e76abe96f45a68eb0bb23d0afd56031a8070bee"; - sha256 = "06ghfvbvd5sd0q014qi8j8glk2g2j9f8z8cwq2318kllp92gz07q"; + rev = "e110462829ea656d2bc0924266d4edff222108d4"; + sha256 = "1mhzn2ymdkzki7wjlr9xrdbngm0886wmfbh2c46flnf9lmfyw54y"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -247,11 +247,11 @@ let "debug" = pkgs.stdenv.mkDerivation { name = "debug"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/garyb/purescript-debug.git"; - rev = "b1484b8aac685dc83c1d938d71407495ae2a2259"; - sha256 = "0gwjj80akys0h111i74n429fmny992gx0r4rk1n98gqlqm5cmi21"; + rev = "144305842dba81169a93b3a3cc75429d5c8389e9"; + sha256 = "09j69bgrq8nzw1l3aj1hka3y5ycmcsn9dlgf22k5ifrd74iic60y"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -259,11 +259,11 @@ let "distributive" = pkgs.stdenv.mkDerivation { name = "distributive"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-distributive.git"; - rev = "3a43c0690883816e9ebeac510698423cfff5c174"; - sha256 = "0zbn0yq1vv7fbbf1lncg80irz0vg7wnw9b9wrzxhdzpbkw4jinsl"; + rev = "11f3f87ca5720899e1739cedb58dd6227cae6ad5"; + sha256 = "0788znmdyh6b1c9pln624ah397l88xmd3fxlxiy3z1qy8bzr4r54"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -271,11 +271,11 @@ let "dom-indexed" = pkgs.stdenv.mkDerivation { name = "dom-indexed"; - version = "v7.0.0"; + version = "v8.0.0"; src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-dom-indexed.git"; - rev = "c449ae115bffe1fce89e145da62b862ad16ed935"; - sha256 = "18is75gsiix9w3f3lkly15cvs7ma1qc13hhi6wkl8nsj2g9g55ld"; + url = "https://github.com/purescript-halogen/purescript-dom-indexed.git"; + rev = "d1e365cfc6d1b05d175061146a4a423d61ecf500"; + sha256 = "092z5y96bw88dywd2qnjv668lnf62anb5kgjz0x9a6cbilq62rz2"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -283,11 +283,11 @@ let "effect" = pkgs.stdenv.mkDerivation { name = "effect"; - version = "v2.0.1"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-effect.git"; - rev = "6caa8e1e162a21eed025613c2c19194b996ef779"; - sha256 = "1vqw5wrdxzh1ww6z7271xr4kg4mx0r3k3mwg18dmgmzj11wbn2wh"; + rev = "985d97bd5721ddcc41304c55a7ca2bb0c0bfdc2a"; + sha256 = "1n9qr85knvpm4i0qhm8xbgfk46v9y843p76j278phfs9l6aywzsn"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -295,11 +295,11 @@ let "either" = pkgs.stdenv.mkDerivation { name = "either"; - version = "v4.1.1"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-either.git"; - rev = "8b4b38a729f8e88750b03e5c7baf2b3863ce4742"; - sha256 = "12j7vvjly0bgxidxmb2pflx0zy7x425dnvxk2y1pm66n0hbsq7ns"; + rev = "c1a1af35684f10eecaf6ac7d38dbf6bd48af2ced"; + sha256 = "18dk159yyv7vs0xsnh9m5fajd7zy6zw5b2mpyd6nqdh3c6bb9wh6"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -307,11 +307,11 @@ let "enums" = pkgs.stdenv.mkDerivation { name = "enums"; - version = "v4.0.1"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-enums.git"; - rev = "19800105b556798ea5650f8a01bfe5ea17cfc6eb"; - sha256 = "0qq0pgmq497nfml0y8xb2qdpga5xqp9sqq4ilv1rpyhg1v7nzb6v"; + rev = "170d959644eb99e0025f4ab2e38f5f132fd85fa4"; + sha256 = "1lci5iy6s6cmh93bpkfcmp0j4n5dnij7dswb0075bk0kzd9xp7rs"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -319,11 +319,11 @@ let "exceptions" = pkgs.stdenv.mkDerivation { name = "exceptions"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-exceptions.git"; - rev = "9012eb08749e9ccd5da45bdece5d576e5fc0b0db"; - sha256 = "17s0rg9k4phivhx9j3l2vqqfdhk61gpj1xfqy8w6zj3rnxj0b2cv"; + rev = "410d0b8813592bda3c25028540eeb2cda312ddc9"; + sha256 = "1yjbrx34a0rnxgpvywb63n9jzhkdgb2q2acyzbwh290mrrggc95x"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -331,11 +331,23 @@ let "exists" = pkgs.stdenv.mkDerivation { name = "exists"; - version = "v4.0.0"; + version = "v5.1.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-exists.git"; - rev = "ef53359aebc09bf863800ca86ad1dcd76f0b08ae"; - sha256 = "0bbdbw3jaqyi8dj2d52zvfgx4vl84d8cr6hp43vy8lfjfcbj0wlk"; + rev = "c34820f8b2d15be29abdd5097c3d636f5df8f28c"; + sha256 = "15qp52cpp2yvxihkzfmn6gabyvx5s6iz5lafvqhyfgp4wfnz0bds"; + }; + phases = "installPhase"; + installPhase = "ln -s $src $out"; + }; + + "filterable" = pkgs.stdenv.mkDerivation { + name = "filterable"; + version = "v4.0.1"; + src = pkgs.fetchgit { + url = "https://github.com/purescript/purescript-filterable.git"; + rev = "e549b35d4147a3b7f0f81d554ce118e07c78e3d0"; + sha256 = "1n1j1h21fabialc5bv4zk723sjb23cc867vf11326zib9y10aq6m"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -343,11 +355,11 @@ let "fixed-points" = pkgs.stdenv.mkDerivation { name = "fixed-points"; - version = "v5.1.0"; + version = "v6.0.0"; src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-fixed-points.git"; - rev = "44ae7a7135bd17dc6d865d31f166a8cf5fa65c7e"; - sha256 = "14acfi7897z2vd8mq52h0gz8x31wyrvalb490rqjf4nyk73vhg36"; + url = "https://github.com/purescript-contrib/purescript-fixed-points.git"; + rev = "3b643d948479aee7cd3e36c95258f1f84df0c35f"; + sha256 = "0w2j0sarylzsmg8b228pmn3qndif0bzw2vmxrx30ar15qy7jdb5d"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -355,11 +367,11 @@ let "foldable-traversable" = pkgs.stdenv.mkDerivation { name = "foldable-traversable"; - version = "v4.1.1"; + version = "v5.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-foldable-traversable.git"; - rev = "29d5b873cc86f17e0082d777629819a96bdbc7a1"; - sha256 = "03x89xcmphckzjlp4chc7swrpw347ll5bvr2yp7x9v2jqw2jlyi1"; + rev = "d581caf260772b1b446c11ac3c8be807b290b220"; + sha256 = "182na4np7hk2dqyxywy4jij2csrzx4bz02m6bq8yx1j27hlgjvsd"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -367,11 +379,11 @@ let "foreign" = pkgs.stdenv.mkDerivation { name = "foreign"; - version = "v5.0.0"; + version = "v6.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-foreign.git"; - rev = "3b8f3ae608db339ed5cff35d2017a07efb905b4d"; - sha256 = "15mz2s4f8crkd721z4df2aag4s0wil6fs07cpcmi7dpnkn7a4nab"; + rev = "7ee18c6689c56c89755172ea53326f948da10bd3"; + sha256 = "16j7712cck79p8q53xbhn4hs886bm0ls5wvmchrhqnaghj48m85g"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -379,11 +391,11 @@ let "foreign-generic" = pkgs.stdenv.mkDerivation { name = "foreign-generic"; - version = "57692ed7b1bc512bcfddd2c00c27e865e9c21b84"; + version = "v11.0.0"; src = pkgs.fetchgit { - url = "https://github.com/shmish111/purescript-foreign-generic"; - rev = "57692ed7b1bc512bcfddd2c00c27e865e9c21b84"; - sha256 = "09si99vlwampsis99bsidb3y0p332zbcdzv19q0hgjyfd23bi7zm"; + url = "https://github.com/paf31/purescript-foreign-generic.git"; + rev = "3cddc5fe3e87e426e0f719465ba60b9df4c0c72d"; + sha256 = "129bgngch2zi65838v2hcywx59gd3x56fq8zaasnwj5kwm34dxcw"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -391,11 +403,11 @@ let "foreign-object" = pkgs.stdenv.mkDerivation { name = "foreign-object"; - version = "v2.0.3"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-foreign-object.git"; - rev = "8a7dc21c48e3e6d31e253b0e58dd95a3bbd7f6e7"; - sha256 = "07wiql59zfj901nk9526b6rykn9m24jjcs8v5dgxbr1c3hiab9n3"; + rev = "c9a7b7bb8bed1b87c5545c4ebe85a70f86c0e6b1"; + sha256 = "0accw6qd93qqry19rskjgl7y54xi2wd70rglbqyjx6c5ybcjnavr"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -403,11 +415,11 @@ let "fork" = pkgs.stdenv.mkDerivation { name = "fork"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-fork.git"; - rev = "27b9f223645a08b42731531a154892eaa263b590"; - sha256 = "1jygqzyci40c28gw2ygnx8v52hilhajj1bdpn7ndvss4i7yh1lcp"; + url = "https://github.com/purescript-contrib/purescript-fork.git"; + rev = "153cc29e6e51fb1108368efc622d41d9f80bd707"; + sha256 = "1hyvaixza8151zbylk2kv859x48yyhla536lcjghcwd62vzfwmdn"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -415,11 +427,11 @@ let "form-urlencoded" = pkgs.stdenv.mkDerivation { name = "form-urlencoded"; - version = "v5.0.0"; + version = "v6.0.2"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-form-urlencoded.git"; - rev = "acccb8ae3e38ffc5d2803d576bb6e409adee7195"; - sha256 = "1kl937qxnbn9m1bn0ijpnfiizgpcvcrnzqcc1scwq2kxvxh8kqap"; + rev = "860b2c4bf0a848322d2077faaefbeb98762cb8d6"; + sha256 = "1pi3vxix10crisisnd94li1vmmgiawlh5lgl51z7ssd9azygg0b0"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -427,11 +439,11 @@ let "free" = pkgs.stdenv.mkDerivation { name = "free"; - version = "v5.2.0"; + version = "v6.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-free.git"; - rev = "f686f5fc07766f3ca9abc83b47b6ad3da326759a"; - sha256 = "1bwj0ay7q9lm4ir29jy549m05jvaqik1s615biv23y51ngx3fn49"; + rev = "06e76495397eafe15c9c1273f2ef05e55f1a3ca3"; + sha256 = "0kpq83qjfjzf1l2f1cnnx36kjwnm5czgjyh2imwp3bna8js6sk39"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -439,11 +451,11 @@ let "freeap" = pkgs.stdenv.mkDerivation { name = "freeap"; - version = "v5.0.1"; + version = "v6.0.0"; src = pkgs.fetchgit { url = "https://github.com/ethul/purescript-freeap.git"; - rev = "8f7bebc36c267794c31d5af1a5737746645e59df"; - sha256 = "007840vpxa4gz0fvjbahyky2xzz625gzfaiy2wjpb50d9qacsr7y"; + rev = "2756c0abaa78362694ad4abca19d2a08dc06df8d"; + sha256 = "1kslihgbpmznmalxwz9i4czrwbwkdf5xq3mswaixmcfmgzc0r63g"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -451,11 +463,11 @@ let "freet" = pkgs.stdenv.mkDerivation { name = "freet"; - version = "v5.0.0"; + version = "v6.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-freet.git"; - rev = "aecca5b389aecf15a37e369b76d7d0064223996d"; - sha256 = "0j8y47x672z8h809hxl1n502yj0y3yv8zsln8bk17rcz06x8frv9"; + rev = "507c2edd9173cda5ad44dd0638133edd69fd9acd"; + sha256 = "0f5bibw604sd9ffmp51b3jppka88r54mh7sdz91zy5b92wgsy5yr"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -463,11 +475,11 @@ let "functions" = pkgs.stdenv.mkDerivation { name = "functions"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-functions.git"; - rev = "c63451ae74f6fba7a4eede5f87208a73c537af77"; - sha256 = "0675k5kxxwdvsjs6a3is8pwm3hmv0vbcza1b8ls10gymmfz3k3hj"; + rev = "691b3345bc2feaf914e5299796c606b6a6bf9ca9"; + sha256 = "1gnk6xh5x04zcahn82gwp49qpglxd5jkfqn0i58m27jfihvblaxd"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -475,11 +487,11 @@ let "functors" = pkgs.stdenv.mkDerivation { name = "functors"; - version = "v3.1.1"; + version = "v4.1.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-functors.git"; - rev = "96bcf8a970a40115a76a20d19e50aa3b524adcf3"; - sha256 = "1cnn3zhk6qcyiwbbpvrdqgsbch4qihx2y9d6sv45bvd8kzrbd306"; + rev = "e936f7a8d2ec53a344c478ccada5add93273848c"; + sha256 = "0i1x14r54758s5jx5d7zy4l07mg6gabljadgybldnbpmdqk6b966"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -487,47 +499,35 @@ let "gen" = pkgs.stdenv.mkDerivation { name = "gen"; - version = "v2.1.1"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-gen.git"; - rev = "36f36f03f082b57e402c27f1513f8935caa54101"; - sha256 = "0pk68cn1s89hql30ydks9gh34gbxg391smi2albx3qvxnfkrpxca"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "generics-rep" = pkgs.stdenv.mkDerivation { - name = "generics-rep"; - version = "v6.1.1"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-generics-rep.git"; - rev = "aae27ba1de21dda342dcdfc8b3cc5b951bd5b3ec"; - sha256 = "15vchzbcvf6byks90q14lvcwb8hnxqzm2mrlxi7v1f7has4s74kn"; + rev = "85c369f56545a3de834b7e7475a56bc9193bb4b4"; + sha256 = "1h396rqn1fc2c155i58vnaksqjrpajly128ah6wq1w426vwr1vrf"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; }; - "globals" = pkgs.stdenv.mkDerivation { - name = "globals"; - version = "v4.1.0"; + "halogen" = pkgs.stdenv.mkDerivation { + name = "halogen"; + version = "v6.1.3"; src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-globals.git"; - rev = "8e6d69c36b6fd8c988a3664fc033ad11dbdd5860"; - sha256 = "03h4npdbsjr1mkjasdi071l0cl7zdf3l76a8f0x4ghx47yvpgadn"; + url = "https://github.com/purescript-halogen/purescript-halogen.git"; + rev = "79b86b70ab0848a3551e1dac1d854036ad23d833"; + sha256 = "08m639pfh85w52w1kk3qdk9cxvxi0f2fcfvyk23k7j5y4pi43z8f"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; }; - "halogen" = pkgs.stdenv.mkDerivation { - name = "halogen"; - version = "v5.0.0-rc.9"; + "halogen-subscriptions" = pkgs.stdenv.mkDerivation { + name = "halogen-subscriptions"; + version = "v1.0.0"; src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-halogen.git"; - rev = "4e67ad059027a9a2eb16b63b46ac9434ab931f84"; - sha256 = "094f99qa4cymqdh1zww2qsrijplqfz2n7sa5rnbm8hxg8p235fbl"; + url = "https://github.com/purescript-halogen/purescript-halogen-subscriptions.git"; + rev = "95dfd40ec490ac847b9fe458e5821acba3e30ff5"; + sha256 = "00yjxxzwvqc0mvf6z3qml3br9f611h10v07gcbnc723xd2qvbgrb"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -535,11 +535,11 @@ let "halogen-vdom" = pkgs.stdenv.mkDerivation { name = "halogen-vdom"; - version = "v6.1.3"; + version = "v7.0.1"; src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-halogen-vdom.git"; - rev = "8b91e55019060f50779dba20959f47cf4b60678d"; - sha256 = "0apcdf7hhph57bnqw7nn0wyrlas8lv4nsvf964a3phhy06x1jw8m"; + url = "https://github.com/purescript-halogen/purescript-halogen-vdom.git"; + rev = "ebab8125a513de17dec3b9e69804fc2ac9c517aa"; + sha256 = "14jcmca3crwc9phx1hfnr5gpdb4sw4amf5ssdfvjrs9fky06gfqy"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -547,11 +547,11 @@ let "http-methods" = pkgs.stdenv.mkDerivation { name = "http-methods"; - version = "v4.0.2"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-http-methods.git"; - rev = "f3672edd166d323849b9dfd1e01c6eeb978fd56c"; - sha256 = "1wfgrlnl33bcqw54hbc8icah2fi0rvi5zxhz07665vy9p5ppvkqs"; + rev = "d373066a45017e886d1580cd359372368231de47"; + sha256 = "1g0ywd5zpckmhq28mr14yr4k28hiii1px8r8xbdx8nv45ryw69l3"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -559,11 +559,11 @@ let "identity" = pkgs.stdenv.mkDerivation { name = "identity"; - version = "v4.1.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-identity.git"; - rev = "1b7938abdc8cb28c0ac5f80f63405d53e3173a8e"; - sha256 = "1scdgbfkphfmapw7p9rnsiynpmqzyvnal2glzj450q51f8g1dhld"; + rev = "5c150ac5ee4fa6f145932f6322a1020463dae8e9"; + sha256 = "0a58y71ihvb5b7plnn2sxsbphqzd9nzfafak4d5a576agn76q0ql"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -571,11 +571,11 @@ let "integers" = pkgs.stdenv.mkDerivation { name = "integers"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-integers.git"; - rev = "3850da9cd96b37c71685b6bc3bf0cb489baefc93"; - sha256 = "17d4bfpnrmbxlc7hhhrvnli70ydaqyr26zgvc9q52a76zgdcb4cf"; + rev = "8a783f2d92596c43afca53066ac18eb389d15981"; + sha256 = "1rrygw0ai61brnvgap7dfhdzacyhg5439pz6yrmmyg32cvf0znhv"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -583,11 +583,11 @@ let "invariant" = pkgs.stdenv.mkDerivation { name = "invariant"; - version = "v4.1.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-invariant.git"; - rev = "b704c5bda262719ca5cc88a3f8554edff8f03256"; - sha256 = "1fimpbh3yb7clvqxcdf4yf9im64z0v2s9pbspfacgq5b4vshjas9"; + rev = "c421b49dec7a1511073bb408a08bdd8c9d17d7b1"; + sha256 = "0vwkbh7kv00g50xjgvxc0mv5b99mrj6q0sxznxwk32hb9hkbhy5l"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -595,23 +595,35 @@ let "js-date" = pkgs.stdenv.mkDerivation { name = "js-date"; - version = "v6.0.0"; + version = "v7.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-js-date.git"; - rev = "f332c15f14322434ddd1945ca2db8040294447bf"; - sha256 = "19qyzbr4a1ca8znbd8gcbz0a801f5p1v238ky3408gdx4ba32zjd"; + rev = "a6834eef986e3af0490cb672dc4a8b4b089dcb15"; + sha256 = "1dpiwn65qww862ilpfbd06gwfazpxvz3jwvsjsdrcxqqfcbjp8n8"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; }; - "js-timers" = pkgs.stdenv.mkDerivation { - name = "js-timers"; - version = "v4.0.1"; + "js-uri" = pkgs.stdenv.mkDerivation { + name = "js-uri"; + version = "v2.0.0"; + src = pkgs.fetchgit { + url = "https://github.com/purescript-contrib/purescript-js-uri.git"; + rev = "6145d5e631be3d57d8a4a9cf976ae140713dee35"; + sha256 = "1q34ir93cqbcl9g49vv1qfj8jxbbdj7f85a14y4mzd7yjq0a042g"; + }; + phases = "installPhase"; + installPhase = "ln -s $src $out"; + }; + + "json-helpers" = pkgs.stdenv.mkDerivation { + name = "json-helpers"; + version = "895db00f2fe97ee56b866bf1582b303d029c216a"; src = pkgs.fetchgit { - url = "https://github.com/purescript-contrib/purescript-js-timers.git"; - rev = "8206d3d8034357b4665828e52f7ff1b8cb46611e"; - sha256 = "1a8092sli7zqw1wflibhjza1ww21dxl7x7r602iazzwh2g70v4dg"; + url = "https://github.com/input-output-hk/purescript-bridge-json-helpers.git"; + rev = "895db00f2fe97ee56b866bf1582b303d029c216a"; + sha256 = "0jwhv9a4xhc65hxas8d00g6ax10q3w4xvlm8bp3dl1p6vav98988"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -619,11 +631,11 @@ let "lazy" = pkgs.stdenv.mkDerivation { name = "lazy"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-lazy.git"; - rev = "5bbd04f507a704f39aa756b5e12ed6665205fe2e"; - sha256 = "156q89l4nvvn14imbhp6xvvm82q7kqh1pyndmldmnkhiqyr84vqv"; + rev = "2f73f61e7ac1ae1cfe05564112e3313530e673ff"; + sha256 = "1wxfx019911gbkifq266hgn67zwm89pxhi83bai77mva5n9j3f6l"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -631,11 +643,11 @@ let "lcg" = pkgs.stdenv.mkDerivation { name = "lcg"; - version = "v2.0.0"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-lcg.git"; - rev = "596bcb17bd550397735220f919df52bcd0038fe0"; - sha256 = "1851cq2g84jzjbvbmncbivbhaqzj9zv5ni3gs14k04nmx2brxmvj"; + rev = "8fb2eb16bbba2cee1d115a6729659ac649da811b"; + sha256 = "04r9bmx9kc3jqx59hh9yqqkl95mf869la9as5h36jv85ynn464dx"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -643,11 +655,23 @@ let "lists" = pkgs.stdenv.mkDerivation { name = "lists"; - version = "v5.4.1"; + version = "v6.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-lists.git"; - rev = "62900a56f6864638c952575dfd211a1cc55be7da"; - sha256 = "0l0jiqhcjzkg4nv2a6h2vdf4izr9mf7cxc86cq1hf3j4dh6spym1"; + rev = "6383c4f202b3f69474f9f7da182c2d42fcc3111c"; + sha256 = "0xmg918s3mqvfvwgjfqcs1yvcz6hy2n7h3ygqz2iyvk868gz25qs"; + }; + phases = "installPhase"; + installPhase = "ln -s $src $out"; + }; + + "markdown" = pkgs.stdenv.mkDerivation { + name = "markdown"; + version = "022d8afd0d9e0ef8114da9e9ef5a67d9ffc86a29"; + src = pkgs.fetchgit { + url = "https://github.com/input-output-hk/purescript-markdown"; + rev = "022d8afd0d9e0ef8114da9e9ef5a67d9ffc86a29"; + sha256 = "008f2wvvddg436b84kgpwz8m5h912xg1wqq73p97i79zaq13w9zm"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -655,11 +679,11 @@ let "math" = pkgs.stdenv.mkDerivation { name = "math"; - version = "v2.1.1"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-math.git"; - rev = "8be36d24f9d2d8795adf04791446bbc458297b9b"; - sha256 = "1msmy9w7y6fij62sdc55w68gpwkhm6lhgc8qjisjk4sxx1wdg1rr"; + rev = "59746cc74e23fb1f04e09342884c5d1e3943a04f"; + sha256 = "0hkf0vyiga21992d9vbvdbnzdkvgljmsi497jjas1rk3vhblx8sq"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -667,11 +691,11 @@ let "matryoshka" = pkgs.stdenv.mkDerivation { name = "matryoshka"; - version = "v0.4.0"; + version = "v0.5.0"; src = pkgs.fetchgit { - url = "https://github.com/slamdata/purescript-matryoshka.git"; - rev = "caaca2d836d52159ba7963333996286a00428394"; - sha256 = "1vm8papnpkmf4w51v6a2cnq408ayi75nz5b5zwiwksd35c8x2g64"; + url = "https://github.com/purescript-contrib/purescript-matryoshka.git"; + rev = "43eb7d9c2d42e2d8bafa4303b4f6185143846b05"; + sha256 = "13n6wiwi7kbrhfvh25mk0p323l2q48cp7s0f7ad4y2jiks3lgipn"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -679,11 +703,11 @@ let "maybe" = pkgs.stdenv.mkDerivation { name = "maybe"; - version = "v4.0.1"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-maybe.git"; - rev = "81f0397636bcbca28642f62421aebfd9e1afa7fb"; - sha256 = "073wa0d51daxdwacfcxg5pf6ch63n4ii55xm1ih87bxrg8mp52mx"; + rev = "8e96ca0187208e78e8df6a464c281850e5c9400c"; + sha256 = "0vyk3r9gklvv7awzpph7ra53zxxbin1ngmqflb5vvr2365v5xyqy"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -691,11 +715,11 @@ let "media-types" = pkgs.stdenv.mkDerivation { name = "media-types"; - version = "v4.0.1"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-media-types.git"; - rev = "e304498356539547b4ed9a7f79513a847c907962"; - sha256 = "0ykwmxrhmwfy6c5mxjxa43xdf5xqakrqyvr5fn986yad50gjqj75"; + rev = "b6efa4c1e6808b31f399d8030b5938acec87cb48"; + sha256 = "0l51nd1w52756pyy3zliwmhfbin0px4pxr7d2h5vchl1wq895fja"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -703,11 +727,11 @@ let "mmorph" = pkgs.stdenv.mkDerivation { name = "mmorph"; - version = "v5.1.0"; + version = "v6.0.0"; src = pkgs.fetchgit { url = "https://github.com/Thimoteus/purescript-mmorph.git"; - rev = "e067ee63c9c08e67b632a8b55930f744ddfad980"; - sha256 = "1lvdclqi9wzs4j8xj8ygnj2b87hhpbnl0c6m28zac05rz87s09mg"; + rev = "ebe16afbfa16dd600f3379ccedc7529417402393"; + sha256 = "0ds88hray8v0519n9k546qsc4qs8bj1k5h5az7nwfp0gaq0r5wpk"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -715,11 +739,11 @@ let "newtype" = pkgs.stdenv.mkDerivation { name = "newtype"; - version = "v3.0.0"; + version = "v4.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-newtype.git"; - rev = "7d85fa6a040208c010b05f7c23af6a943ba08763"; - sha256 = "0qvk9p41miy806b05b4ikbr3if0fcyc35gfrwd2mflcxxp46011c"; + rev = "7b292fcd2ac7c4a25d7a7a8d3387d0ee7de89b13"; + sha256 = "1fgzbxslckva2psn0sia30hfakx8xchz3wx2kkh3w8rr4nn2py8v"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -727,11 +751,11 @@ let "node-buffer" = pkgs.stdenv.mkDerivation { name = "node-buffer"; - version = "v6.0.0"; + version = "v7.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript-node/purescript-node-buffer.git"; - rev = "dac7d4734a739cea2cd379f6bae5226dbab26da2"; - sha256 = "0pgl8r1rwzmbvwgbibk24jpgf6m7xcw3y7zfn6psgzca44c4hgsv"; + rev = "0721f1e8d768df48ae429547c8c60b121ca120cb"; + sha256 = "14bf3llsa20ivkwp5hlyk8v8zfzpzhhsni9pd8rfqdyzp6zrdx3b"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -739,11 +763,11 @@ let "node-fs" = pkgs.stdenv.mkDerivation { name = "node-fs"; - version = "v5.0.1"; + version = "v6.1.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-node/purescript-node-fs.git"; - rev = "02d610f237dc130edb5ee594fd46b16c691b79eb"; - sha256 = "0i3bd7aw16vyb5sh5fzlvgg9q6cjdvmnfs57in6rxm34z8d8c0p8"; + rev = "09a2b71a3a86f0cd19c46f4b6c40310cc1648909"; + sha256 = "1w97m2afn7yn757niknkbk7w6nyg4n5dabxr7gzfz368z1nkf45s"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -751,11 +775,11 @@ let "node-path" = pkgs.stdenv.mkDerivation { name = "node-path"; - version = "v3.0.0"; + version = "v4.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-node/purescript-node-path.git"; - rev = "e3a704d5fc7d25fa93c6cd0eb92dbce9e5ebd69a"; - sha256 = "0j1ni52m62dpcrfakl1ik131i31bkg91yv0p1c40sdw0f59fzf6x"; + rev = "a2d7cf05e40b607ef7d048a3684cda788cd42890"; + sha256 = "1384qyf4v84wbahafzvqdxjllqy8qkd5dpkhsl3js444vsm2aplr"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -763,11 +787,11 @@ let "node-streams" = pkgs.stdenv.mkDerivation { name = "node-streams"; - version = "v4.0.1"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-node/purescript-node-streams.git"; - rev = "88740eeda2017d3ddcde50eea59d57c7749d8524"; - sha256 = "12dki2li0d7s54kvcr6gksb5nxf6kzs93gwxnq4bh1flri8p0i7r"; + rev = "886bb2045685e3b9031687d69ccfed29972147bb"; + sha256 = "1jc3d4x0v77h8qcwq7hpwprsdr3gqmdfiyr1ph0kiy7r9bbrqwfx"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -775,11 +799,11 @@ let "nonempty" = pkgs.stdenv.mkDerivation { name = "nonempty"; - version = "v5.0.0"; + version = "v6.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-nonempty.git"; - rev = "36ca3b2fa6d98b1c9d2ee05643341e496fbeab57"; - sha256 = "1vz174sg32cqrp52nwb2vz9frrzmdwzzlgl4vc2cm5wlf2anirxj"; + rev = "d3e91e3d6e06e5bdcc5b2c21c8e5d0f9b946bb9e"; + sha256 = "0azk1jrpqnjf2i97lcp63wcm31c4hddklp1mfmdan27zap3zqyjm"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -787,11 +811,11 @@ let "now" = pkgs.stdenv.mkDerivation { name = "now"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-now.git"; - rev = "090feddf7c7dec2a812eca090cd211e87ccad606"; - sha256 = "18h5pif2dy4r7w1xg2zw4mvdqlar9xqp3rawkiavmsc946ncf3zs"; + rev = "4c994dae8bb650787de1e4d9e709f2565fb354fb"; + sha256 = "1wa4j2h5rlw1lgfpm7rif3v6ksm8lplxl1x69zpk8hdf0cfyz4qm"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -799,23 +823,23 @@ let "nullable" = pkgs.stdenv.mkDerivation { name = "nullable"; - version = "v4.1.1"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-nullable.git"; - rev = "8d413f02224b8281bfa8037e45fbbf9fe2e254fd"; - sha256 = "14qaxxga8gqlr4pijyvqycdyhjr6qpz3h4aarficw5j75b7x8nyv"; + rev = "8b19c16b16593102ae5d5d9f5b42eea0e213e2f5"; + sha256 = "0jbmks8kwhpb5fr2b9nb70fjwh6zdnwirycvzr77jafcny24yrnl"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; }; - "numerics" = pkgs.stdenv.mkDerivation { - name = "numerics"; - version = "v0.1.2"; + "numbers" = pkgs.stdenv.mkDerivation { + name = "numbers"; + version = "v8.0.0"; src = pkgs.fetchgit { - url = "https://github.com/Proclivis/purescript-numerics"; - rev = "2c0e4db343aad4faf9470cd0cb5fd7681b0a37b0"; - sha256 = "1l1kxd87mlpwyxskfcnj01zxsrva35v10vc2rapqp8yg1n0rgwcr"; + url = "https://github.com/purescript/purescript-numbers.git"; + rev = "f5bbd96cbed58403c4445bd4c73df50fc8d86f46"; + sha256 = "00pm2x4kh4fm91r7nmik1v5jclkgh7gpxz13ambyqxbxbiqjq0vg"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -823,11 +847,11 @@ let "ordered-collections" = pkgs.stdenv.mkDerivation { name = "ordered-collections"; - version = "v1.6.1"; + version = "v2.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-ordered-collections.git"; - rev = "54af8b281bf01acfc14e147debec76974901e93c"; - sha256 = "0r48p94d3cyzni2z7ikzcap472k23dx8zq37c1prmjb01v03mfvc"; + rev = "f226bdf904a153746bda6b928fb32fb25bb2a319"; + sha256 = "1p592g0s07c56639y71782af0zz5cndpjxd5w9n41hdszsz1b86h"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -835,11 +859,11 @@ let "orders" = pkgs.stdenv.mkDerivation { name = "orders"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-orders.git"; - rev = "80e22c22c72c846e09ef9dfcdb40b3eee39118d6"; - sha256 = "13p1sm4dxkmxhld9x5qqg62iiajjb3qpzs66c1r24y5fs4zsfry4"; + rev = "c25b7075426cf82bcb960495f28d2541c9a75510"; + sha256 = "0wwy3ycjll0s590ra35zf5gjvs86w97rln09bj428axhg7cvfl0a"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -847,11 +871,11 @@ let "parallel" = pkgs.stdenv.mkDerivation { name = "parallel"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-parallel.git"; - rev = "4d6c8b05041a36c300dfca2ba8f1f3443ca26bc6"; - sha256 = "1d5bnagabw2k8yxywkygwrpblb2ggqh2fhpqfrx2sj1y53x332hg"; + rev = "16b38a2e148639b04ae67e0ce63cc220da8857f7"; + sha256 = "0x8mvhgs8ygqj34xgyhk6gixqm32p2ymm00zg0zdw13g3lil9p4x"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -859,11 +883,11 @@ let "parsing" = pkgs.stdenv.mkDerivation { name = "parsing"; - version = "v5.0.3"; + version = "v6.0.2"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-parsing.git"; - rev = "e801a0ef42f3211b1602a94a269eef7ce551423f"; - sha256 = "0m5xvb5kis28laj3navyyakyq408vw115c2dvngf1vljzh1hk5kj"; + rev = "d085e3740560d4dcdd710775e4181129be378b89"; + sha256 = "0lhri5bfk4j6dgzi4d5gvmd628hjs9jgyky910ylj6qzalw9fj56"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -871,11 +895,11 @@ let "partial" = pkgs.stdenv.mkDerivation { name = "partial"; - version = "v2.0.1"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-partial.git"; - rev = "76b63a324f7eafbb859256771b5bb7404082af96"; - sha256 = "11qr80989g7xmvw1brnrclsbg2wdkbr5k3cqpngfip3nnirrypcn"; + rev = "2f0a5239efab68179a684603263bcec8f1489b08"; + sha256 = "0acxf686hvaj793hyb7kfn9lf96kv3nk0lls2p9j095ylp55sldb"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -883,11 +907,23 @@ let "pipes" = pkgs.stdenv.mkDerivation { name = "pipes"; - version = "v6.0.0"; + version = "v7.0.1"; + src = pkgs.fetchgit { + url = "https://github.com/felixschl/purescript-pipes.git"; + rev = "42e43f0961ad0fc3f1cef6986fe23ca9f48f6dda"; + sha256 = "0jzgzi34wqqdcfgznbpfv4b8al2prd36yshnndlvkqfv70smx3kh"; + }; + phases = "installPhase"; + installPhase = "ln -s $src $out"; + }; + + "precise" = pkgs.stdenv.mkDerivation { + name = "precise"; + version = "v5.1.0"; src = pkgs.fetchgit { - url = "https://github.com/felixSchl/purescript-pipes.git"; - rev = "a9533035f6fe8e59a65c6d11a3a7c767f3c9ae67"; - sha256 = "0vl37f42dy4w4hswiay22w0n14k7sr670x54iwn7428larzrzs8y"; + url = "https://github.com/purescript-contrib/purescript-precise.git"; + rev = "5bedbf520022ce15b03a70474d9cf1a8dc3e6b2d"; + sha256 = "1zashxhy100r0pgmnjxbqjf9q9bml9rwm0hqqcxzkd2l0llxaggc"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -895,11 +931,11 @@ let "prelude" = pkgs.stdenv.mkDerivation { name = "prelude"; - version = "v4.1.1"; + version = "v5.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-prelude.git"; - rev = "a96663b34364fdd0885a200955e35b99f4e58c43"; - sha256 = "1frvjrv0mr508r6683l1mp5rzm1y2dz76fz40zf4k2c64sy6y1xm"; + rev = "68f8012bc2309d9bf5832cdf7316ad052d586905"; + sha256 = "1x0cacvv9mmw80vy6f40y0p959q1dz28fwjswhyd7ws6npbklcy0"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -907,11 +943,11 @@ let "profunctor" = pkgs.stdenv.mkDerivation { name = "profunctor"; - version = "v4.1.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-profunctor.git"; - rev = "9b3d014b38c69ea2dd4b1f597330b095034fe2c4"; - sha256 = "1zwbxgimpknmashmq2rb773kbwbksr4ahcdkpnvvcapasxhds0a7"; + rev = "4551b8e437a00268cc9b687cbe691d75e812e82b"; + sha256 = "0fvd2xiv77sp4jd4spgdp4i9812p6pdzzbg4pa96mbr0h19jf39c"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -919,23 +955,11 @@ let "profunctor-lenses" = pkgs.stdenv.mkDerivation { name = "profunctor-lenses"; - version = "v6.3.0"; + version = "v7.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-profunctor-lenses.git"; - rev = "2be610e104ab733a4dcc9d63f03d8eaee1e1b1c2"; - sha256 = "07py52ngnhab0pc0ca42pnypbwk1lcm7mhz29kp4ap0qhi2z4n2y"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "proxy" = pkgs.stdenv.mkDerivation { - name = "proxy"; - version = "v3.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/purescript/purescript-proxy.git"; - rev = "4a529b1f874fa2f32fc4c575cafaf46e0ab69fb6"; - sha256 = "0rqf25b1n9p5sgx7gdsxwrfv9rb3sqxgqmqpp5kdm30lfk7snz24"; + rev = "9c3d87a6dab8eb785a93bff11aa183796dc93183"; + sha256 = "1wknj7g6vwk2ga1rq57l470h322308ddjn5bd3x2hhfkiy039kc3"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -943,11 +967,11 @@ let "psci-support" = pkgs.stdenv.mkDerivation { name = "psci-support"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-psci-support.git"; - rev = "a66a0fa8661eb8b5fe75cc862f4e2df2835c058d"; - sha256 = "0jd773zcklr6hjddqingzmk20a0afpm2r9pczfjbj0d93pbxb4xh"; + rev = "f26fe8266a63494080476333e22f971404ea8846"; + sha256 = "16vhf8hapd7rcgmafmjpiq7smhzdh3300f2idk1q4kk01yxn8ddj"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -955,11 +979,11 @@ let "quickcheck" = pkgs.stdenv.mkDerivation { name = "quickcheck"; - version = "v6.1.0"; + version = "v7.1.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-quickcheck.git"; - rev = "6289a80570acd5aec3ea89dc673cf10cdaf5794a"; - sha256 = "0b6208067krf81kzq2hbxs68386hcicbscwxbj5nck07ivjjvqh0"; + rev = "990fa1cf14b48b827d9b2d115b1c6977c4b0a76d"; + sha256 = "1dxchng3r2mad0505a0c7cc35vs1f7y2xb5i13p59jpdz6ijqa9k"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -967,11 +991,11 @@ let "random" = pkgs.stdenv.mkDerivation { name = "random"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-random.git"; - rev = "75e6b21edbe0eec78c28ff3bd8265998f2ea0b45"; - sha256 = "0k37v7z529adx6ypxj0xjyfrz45qia6p0vki2wpvi8lik7c698gf"; + rev = "3e02da113c7afbac37ea4e16188c39d3057314d5"; + sha256 = "1v6ykgp8jmx488hq8mgb0l0sf1nyhjs6wq0w279iyibk9jxc6nib"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -991,11 +1015,11 @@ let "record" = pkgs.stdenv.mkDerivation { name = "record"; - version = "v2.0.2"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-record.git"; - rev = "93c235249d4f47a3c8300089596c2afe67e27577"; - sha256 = "0ap1mc7bi8a20c5g11lxif6q68s2sc31khirfabngr1jpsm3r4lw"; + rev = "091495d61fcaa9d8d8232e7b800f403a3165a38f"; + sha256 = "0yidfvwiajiv8xflfsi2p8dqnp0qmmcz9jry58jyn9ga82z2pqn6"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1003,11 +1027,11 @@ let "refs" = pkgs.stdenv.mkDerivation { name = "refs"; - version = "v4.1.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-refs.git"; - rev = "e8b175477661e433175e76548168290c40e0ce4b"; - sha256 = "08161iy1xbafzblv033v84156azpcqkiw9v9d6gliphrq5fm17gm"; + rev = "f66d3cdf6a6bf4510e5181b3fac215054d8f1e2e"; + sha256 = "1jhc2v784jy8bvkqy4zsh2z7pnqrhwa8n5kx98xhxx73n1bf38sg"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1015,11 +1039,23 @@ let "remotedata" = pkgs.stdenv.mkDerivation { name = "remotedata"; - version = "v4.2.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/krisajenkins/purescript-remotedata.git"; - rev = "8dbd12110f6a338c36afd6c3208dd5fa031c0573"; - sha256 = "15ab34s3bz2kbzrhbxixzwpxmgj356px8z1s77r2pa9fjnmkn40v"; + rev = "cc9932a6c19262d8e4217c534c658a127562c14c"; + sha256 = "1kr4wbsqd3kaf8c4w13m988602qvcm3262v0aij01jrms4p1x92q"; + }; + phases = "installPhase"; + installPhase = "ln -s $src $out"; + }; + + "safe-coerce" = pkgs.stdenv.mkDerivation { + name = "safe-coerce"; + version = "v1.0.0"; + src = pkgs.fetchgit { + url = "https://github.com/purescript/purescript-safe-coerce.git"; + rev = "e719defd227d932da067a1f0d62a60b3d3ff3637"; + sha256 = "0m942lc23317izspz1sxw957mwl9yb9bgk8dh23f7b3a8w9hh8ff"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1027,11 +1063,11 @@ let "servant-support" = pkgs.stdenv.mkDerivation { name = "servant-support"; - version = "1805f896560751c48a04d3e29f9c109df850d8d3"; + version = "78a0693a9409bce31bf538a8f2aa54adb8200733"; src = pkgs.fetchgit { - url = "https://github.com/shmish111/purescript-servant-support"; - rev = "1805f896560751c48a04d3e29f9c109df850d8d3"; - sha256 = "1n8a0j5rwgkanvwp47f78gn5qacs06siii2f5x5fr4rw15q6a9ma"; + url = "https://github.com/input-output-hk/purescript-servant-support"; + rev = "78a0693a9409bce31bf538a8f2aa54adb8200733"; + sha256 = "11x6lzv6a9yp5ccdi6fay931brm8cfacg3kmi4rphgdg01037cn6"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1039,11 +1075,23 @@ let "spec" = pkgs.stdenv.mkDerivation { name = "spec"; - version = "v4.0.1"; + version = "v5.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript-spec/purescript-spec.git"; - rev = "a91d77654c4a6ac314b42bae941892dd576c4916"; - sha256 = "0svz079yvykx4dj89qgaqi0zwy7d3l1yhkrcll2m81y3idhr1c2p"; + rev = "2cfa11573dbb695c117efce0a8f76a3daba12e87"; + sha256 = "0hpca1sa738029ww74zpw31br5x339q35kzb10iqd55lp6611k80"; + }; + phases = "installPhase"; + installPhase = "ln -s $src $out"; + }; + + "spec-quickcheck" = pkgs.stdenv.mkDerivation { + name = "spec-quickcheck"; + version = "v4.0.0"; + src = pkgs.fetchgit { + url = "https://github.com/purescript-spec/purescript-spec-quickcheck.git"; + rev = "c2991f475b8fa11de8b68bcb5895b36be04d1e82"; + sha256 = "01xcbfyqzax9c5najbfy12q0nvfklfm37llj2vkmi3wgkskg4prz"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1051,11 +1099,11 @@ let "st" = pkgs.stdenv.mkDerivation { name = "st"; - version = "v4.1.1"; + version = "v5.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-st.git"; - rev = "8133841b8b545f3a273caebb6103f7c640fc35eb"; - sha256 = "1jpz8rpk2ac6kshflri8pdw4s1hf8g4alz5bw69x23sj9sccxgs0"; + rev = "994eb5e650f3caedac385dcc61694f691df57983"; + sha256 = "14hz254f1y0k3v83z719np0ddrgbca0hdsd9dvv244i07vlvm2zj"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1063,11 +1111,11 @@ let "strings" = pkgs.stdenv.mkDerivation { name = "strings"; - version = "v4.0.1"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-strings.git"; - rev = "94c843b93142d0edf1c31ec075c40b6984c3dc7b"; - sha256 = "147l3l3fzn7liparhm2y3p8j4ck1lblra5j493p2hy5yy5ndznc8"; + rev = "157e372a23e4becd594d7e7bff6f372a6f63dd82"; + sha256 = "0hyaa4d8gyyvac2nxnwqkn2rvi5vax4bi4yv10mpk7rgb8rv7mb8"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1075,23 +1123,11 @@ let "tailrec" = pkgs.stdenv.mkDerivation { name = "tailrec"; - version = "v4.1.1"; + version = "v5.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-tailrec.git"; - rev = "5a32aa5a4f3651b66cc0e87bcb9861116f9913a3"; - sha256 = "0n0sxr44d1lwlrgv8b48ml6vg0r5abfvyywn50jb0i1agnm53i4n"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "test-unit" = pkgs.stdenv.mkDerivation { - name = "test-unit"; - version = "v15.0.0"; - src = pkgs.fetchgit { - url = "https://github.com/bodil/purescript-test-unit.git"; - rev = "351c55b632e0c0ebffae05837909995a03de3406"; - sha256 = "06lb90vppa7naqqwz7wbvlkkyz86pbdd3ycw3d2iygvxbzkz8xjn"; + rev = "5fbf0ac05dc6ab1a228b2897630195eb7483b962"; + sha256 = "1jjl2q2hyhjcdxpamzr1cdlxhmq2bl170x5p3jajb9zgwkqx0x22"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1099,11 +1135,11 @@ let "transformers" = pkgs.stdenv.mkDerivation { name = "transformers"; - version = "v4.2.0"; + version = "v5.2.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-transformers.git"; - rev = "0e473e5ef0e294615ca0d9aab0bcffee47b2870d"; - sha256 = "03qmvl9s7lbvm73dy9ps6qp39pdcm91hb8yakgj7aq8hgpj7b6bg"; + rev = "1e5d4193b38c613c97ea1ebdb721c6b94cd8c50a"; + sha256 = "0lggimnq016v98ib6h68gnciraambxrfqm2s033wm34srcy8xs06"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1111,11 +1147,11 @@ let "tuples" = pkgs.stdenv.mkDerivation { name = "tuples"; - version = "v5.1.0"; + version = "v6.0.1"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-tuples.git"; - rev = "0036bf9d99b721fd0f2e539d24e18e484b016927"; - sha256 = "045nsy0r2g51gih0wjhcvhl6gfr8947mlrqwg644ygz72rjm8wq4"; + rev = "d4fe8ffe9e8c512111ee0bc18a6ba0fd056a6773"; + sha256 = "0s2ar2gih4r34km8r8dqngh21s8899yb93mb7mips08ndy3ajq3a"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1123,11 +1159,11 @@ let "type-equality" = pkgs.stdenv.mkDerivation { name = "type-equality"; - version = "v3.0.0"; + version = "v4.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-type-equality.git"; - rev = "2cdae51c394401cd5fc04b03c341273b41532b7d"; - sha256 = "1b7szyca5s96gaawvgwrw7fa8r7gqsdff7xhz3vvngnylv2scl3w"; + rev = "f7644468f22ed267a15d398173d234fa6f45e2e0"; + sha256 = "126pg4zg3bsrn8dzvv75xp586nznxyswzgjlr7cag3ij3j1z0kl0"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1135,23 +1171,11 @@ let "typelevel-prelude" = pkgs.stdenv.mkDerivation { name = "typelevel-prelude"; - version = "v5.0.2"; + version = "v6.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-typelevel-prelude.git"; - rev = "9f8788ba16ddda8f70e54e5228422348c13c817c"; - sha256 = "1kp1b35y8wzin9m5lfyp239nclq703xz2b4373x3075xfp6qdcwf"; - }; - phases = "installPhase"; - installPhase = "ln -s $src $out"; - }; - - "uint" = pkgs.stdenv.mkDerivation { - name = "uint"; - version = "v5.1.4"; - src = pkgs.fetchgit { - url = "https://github.com/zaquest/purescript-uint.git"; - rev = "c5435539d88d5be79576e0c829f6468207ff03e9"; - sha256 = "1hgjwh7m9km8ywnc7k4blgycmj2sx4vr9i5rd5cr47cdl71h0sh7"; + rev = "83ddcdb23d06c8d5ea6196596a70438f42cd4afd"; + sha256 = "1vwf3yhn8mir5y41wvlyszkgd5fxvrcyfd0l8cn20c8vfq36yzgk"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1171,11 +1195,11 @@ let "unfoldable" = pkgs.stdenv.mkDerivation { name = "unfoldable"; - version = "v4.1.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-unfoldable.git"; - rev = "077e787108e02bd16a1b27e57847d5baede7dd61"; - sha256 = "03g2zz26ai8a44z07jhdj0yvv8q6nq6ifcrzc7qjmdkjywg2cj9v"; + rev = "bbcc2b062b9b7d3d61f123cfb32cc8c7fb811aa6"; + sha256 = "1v3bz04wj6hj7s6mcf49hajylg6w58n78q54sqi2ra2zq8h99kpw"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1183,11 +1207,11 @@ let "unicode" = pkgs.stdenv.mkDerivation { name = "unicode"; - version = "v4.0.1"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-unicode.git"; - rev = "bb70f5a17aa9bcad05104c5a3f191fd75bb3d2ce"; - sha256 = "1a53jv7pzyjk5v6kmwwy50d3l8d26k0id59sn8g3lzkih24nalhp"; + rev = "8e360802e31d080dec7f3ddf4d3329c56773490f"; + sha256 = "0sqvgl3il2rl3zxkbzsqb19wib108zvyw73jxiavpfdm6hdmnxvc"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1195,11 +1219,11 @@ let "unsafe-coerce" = pkgs.stdenv.mkDerivation { name = "unsafe-coerce"; - version = "v4.0.0"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript/purescript-unsafe-coerce.git"; - rev = "fa6a5ca9b4581c00ee0b8539306a49badb7bee60"; - sha256 = "0k9255mk2mz6xjb11pwkgfcblmmyvr86ig5kr92jwy95xim09zip"; + rev = "ee24f0d3b94bf925d9c50fcc2b449579580178c0"; + sha256 = "0l2agnm1k910v4yp1hz19wrsrywsr5scb397762y7pigm3frzs8r"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1207,11 +1231,11 @@ let "unsafe-reference" = pkgs.stdenv.mkDerivation { name = "unsafe-reference"; - version = "v3.0.1"; + version = "v4.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-contrib/purescript-unsafe-reference.git"; - rev = "79d7de7b9351346a73e6c060d80532c95ba1c7c1"; - sha256 = "0q758dz59qz0li4s3w1qcg921xp5i5rh6i1l611iv7rr8cbj11al"; + rev = "d4e11a0f291fe8db9855c8bec89fd50b4e48d043"; + sha256 = "103bax2g6g97k868j66rm6658qv6ix1kk3736c0lq1p47raqf3fb"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1229,13 +1253,37 @@ let installPhase = "ln -s $src $out"; }; + "validation" = pkgs.stdenv.mkDerivation { + name = "validation"; + version = "v5.0.0"; + src = pkgs.fetchgit { + url = "https://github.com/purescript/purescript-validation.git"; + rev = "2d50284b192e71c9ca6aff87747b0d980c1ca657"; + sha256 = "0yfb97nk7179hp0r2iylj74wl7rnl1y2x6dh5hlipxg1kpq9yydk"; + }; + phases = "installPhase"; + installPhase = "ln -s $src $out"; + }; + "web-clipboard" = pkgs.stdenv.mkDerivation { name = "web-clipboard"; - version = "v2.0.0"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-web/purescript-web-clipboard.git"; - rev = "5c4fe20111b9e37d74c805101b5c558928808971"; - sha256 = "17i7rpzxi7pgas32xz8vjcs54m94gnmca3my0p70gzvf3rasnxyx"; + rev = "24f845a888d980d9de78c18f6a67353704429d0d"; + sha256 = "11yrwg8y91aa3r5d375vc9mg5wi5646wl5qhvdcrk839d3nl3xpf"; + }; + phases = "installPhase"; + installPhase = "ln -s $src $out"; + }; + + "web-common" = pkgs.stdenv.mkDerivation { + name = "web-common"; + version = "v1.0.0"; + src = pkgs.fetchgit { + url = "https://github.com/input-output-hk/purescript-web-common"; + rev = "91d74fcb5eafd13237f07320a3f7e142b5a9dc2b"; + sha256 = "1xxr2q95w42l1d1fqindn16flxfx53bwaga538sh7a0ajs2ff69m"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1243,11 +1291,11 @@ let "web-dom" = pkgs.stdenv.mkDerivation { name = "web-dom"; - version = "v4.0.1"; + version = "v5.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-web/purescript-web-dom.git"; - rev = "5bbf40aa543c3a3eb18adf1f86ce1c505c762108"; - sha256 = "03awc83ggbwcvklzss48yf1bvm898pyim8zri1vjnnyy9yxyx7g0"; + rev = "03dfc2f512e124615ab183ade357e3d54007c79d"; + sha256 = "06g9cp9fkzyfwbz5cs0wxjxgdydm9hy7756p2w4vx94myki20hgx"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1255,11 +1303,11 @@ let "web-events" = pkgs.stdenv.mkDerivation { name = "web-events"; - version = "v2.0.1"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-web/purescript-web-events.git"; - rev = "7f19f24d7b61066bef0813734964f2dc6b085e3d"; - sha256 = "1vd1gfh6zv50bq4v1ppl2wvc5mskcw9n1bfj29qjg0dx0ffxzv2f"; + rev = "c8a50893f04f54e2a59be7f885d25caef3589c57"; + sha256 = "1dxwrl2r39vazb3g1ka4dkpy6idyi17aq4hf9vvdsmcwf2jjwbn9"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1267,11 +1315,11 @@ let "web-file" = pkgs.stdenv.mkDerivation { name = "web-file"; - version = "v2.3.0"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-web/purescript-web-file.git"; - rev = "32fa296ff8103a72d52fc900b195f2ee05dc5627"; - sha256 = "1pn3cp8kkvxlg0vx3m53i83n8c92agpxd7dj96ma3bnyskd17fxv"; + rev = "3e42263b4392d82c0e379b7a481bbee9b38b1308"; + sha256 = "11x1inhr5pvs2iyg818cywwdskb33q777592sd3b4g4jyczcb1li"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1279,11 +1327,11 @@ let "web-html" = pkgs.stdenv.mkDerivation { name = "web-html"; - version = "v2.3.0"; + version = "v3.1.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-web/purescript-web-html.git"; - rev = "0aa27db6d393fc53454f549566f9058147cc008a"; - sha256 = "1gz2wkph49rkwd7cm6j0mx9sv6a3nzxcidv50mrxydhl3h8153gy"; + rev = "9e657a0632f7f6514c3d5d2eb4b7dbbfe0d97185"; + sha256 = "007anmqqifrjnpfa4xf7qa8xnpbhvcxqdraj9lnhizwq65vx53sn"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1291,11 +1339,11 @@ let "web-socket" = pkgs.stdenv.mkDerivation { name = "web-socket"; - version = "v2.0.0"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-web/purescript-web-socket.git"; - rev = "00f4ab583efb6fc60e0517d782d2ba2a89d8ec66"; - sha256 = "0kp4rmrqmsjmih7nw7dl75d36pny3ikafnhnfchpc834ap9451zh"; + rev = "28c09f4c8db6bbf4c25f98db7381e42e4e73e349"; + sha256 = "1c5dajc12rfrrskg3q57hxx6cqxz19nigdx4xpjzydq6n2smmmq7"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1303,11 +1351,11 @@ let "web-storage" = pkgs.stdenv.mkDerivation { name = "web-storage"; - version = "v3.0.0"; + version = "v4.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-web/purescript-web-storage.git"; - rev = "c2dedea1ee10ca7e94af5547c90274fb63ab3bc6"; - sha256 = "1ycb2s29aw9w6lqik6hfmp9nf9i2yhn0q26hc4p3450jam5mj8bx"; + rev = "22fa56bac204c708e521e746ad4ca2b5810f62c5"; + sha256 = "1viy027k9qyr7mckqkvizwbwkfskc6frppsa1v9a0hq6gc08mpjx"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1315,11 +1363,11 @@ let "web-touchevents" = pkgs.stdenv.mkDerivation { name = "web-touchevents"; - version = "v2.0.0"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-web/purescript-web-touchevents.git"; - rev = "cde8ea42d92035b1c46df4f1e1c38205aba7742a"; - sha256 = "0mhsfqlglx04q3vkjg4k33bkxcpx2cmbq4x1zxyhl48q1qqmnic8"; + rev = "c4a4c41c51bca587c22ed00980ddeca3403c08cd"; + sha256 = "0s5zalrb9i06p8dma9rnci97q10spz3r9fh727sw02r1zzpkdgrk"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1327,11 +1375,11 @@ let "web-uievents" = pkgs.stdenv.mkDerivation { name = "web-uievents"; - version = "v2.0.0"; + version = "v3.0.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-web/purescript-web-uievents.git"; - rev = "bdbc845bf8b06649c8361411085a0c0f788c9511"; - sha256 = "04032nl0z9hjq7b799zhbn7in10dz9kgrrcs0adjbaf08rc2kcwh"; + rev = "cc0fe9095d58a2b5011982e25b31beb4b3626ad6"; + sha256 = "1cb353pcsf8h0sjhk5ljc47xcwgqhwyyfygk5sbr6xgs16y53la2"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; @@ -1339,11 +1387,11 @@ let "web-xhr" = pkgs.stdenv.mkDerivation { name = "web-xhr"; - version = "v3.0.2"; + version = "v4.1.0"; src = pkgs.fetchgit { url = "https://github.com/purescript-web/purescript-web-xhr.git"; - rev = "ca6e7b3b8186c026809e705ec6d8c2c943828ca8"; - sha256 = "1g35z2j9i5lqfms4yi8hgbgc85x6dy9lr3ygbr2f5fgkz86x3hqj"; + rev = "997b87caa6dcdf66b6db22f29f522d722559956b"; + sha256 = "0hzmqga8l24l20kyd98bcpd8bmz7by14vl311m9yfdg5mjkjg42g"; }; phases = "installPhase"; installPhase = "ln -s $src $out"; diff --git a/plutus-playground-client/spago.dhall b/plutus-playground-client/spago.dhall index 305ab814ee..3fec10f3b4 100644 --- a/plutus-playground-client/spago.dhall +++ b/plutus-playground-client/spago.dhall @@ -4,38 +4,59 @@ You can edit this file as you like. -} { name = "plutus-playground-client" , dependencies = - [ "prelude" - , "aff" - , "aff-promise" - , "bigints" - , "concurrent-queues" + [ "aff" + , "affjax" + , "argonaut-codecs" + , "argonaut-core" + , "arrays" + , "bifunctors" , "console" + , "control" , "coroutines" - , "aff-coroutines" - , "debug" + , "dom-indexed" , "effect" + , "either" + , "enums" + , "exceptions" + , "foldable-traversable" + , "foreign-object" + , "gen" , "halogen" + , "http-methods" + , "integers" + , "json-helpers" + , "lists" , "matryoshka" + , "maybe" + , "media-types" + , "newtype" + , "node-buffer" , "node-fs" - , "numerics" - , "parsing" - , "argonaut-codecs" - , "foreign-generic" + , "nonempty" + , "ordered-collections" + , "prelude" + , "profunctor-lenses" , "psci-support" + , "quickcheck" , "remotedata" , "servant-support" - , "test-unit" - , "undefinable" - , "uuid" - , "web-socket" + , "spec" + , "spec-quickcheck" + , "strings" + , "tailrec" + , "transformers" + , "tuples" + , "web-common" + , "web-events" + , "web-html" + , "web-uievents" ] -, packages = ./packages.dhall +, packages = ../packages.dhall , sources = [ "src/**/*.purs" , "test/**/*.purs" , "generated/**/*.purs" - , "web-common/**/*.purs" - , "web-common-plutus/**/*.purs" - , "web-common-playground/**/*.purs" + , "../web-common-plutus/src/**/*.purs" + , "../web-common-playground/src/**/*.purs" ] } diff --git a/plutus-playground-client/src/Action/Lenses.purs b/plutus-playground-client/src/Action/Lenses.purs index 0d7cd2dac4..9447d1e11e 100644 --- a/plutus-playground-client/src/Action/Lenses.purs +++ b/plutus-playground-client/src/Action/Lenses.purs @@ -5,22 +5,22 @@ module Action.Lenses , _slot ) where -import Data.BigInteger (BigInteger) +import Data.BigInt.Argonaut (BigInt) import Data.Lens (Iso', Lens', iso) import Data.Lens.Record (prop) import Data.Newtype (unwrap, wrap) -import Data.Symbol (SProxy(..)) +import Type.Proxy (Proxy(..)) import Plutus.V1.Ledger.Slot (Slot) import Prelude ((<<<)) _caller :: forall r a. Lens' { caller :: a | r } a -_caller = prop (SProxy :: SProxy "caller") +_caller = prop (Proxy :: _ "caller") _blocks :: forall r a. Lens' { blocks :: a | r } a -_blocks = prop (SProxy :: SProxy "blocks") +_blocks = prop (Proxy :: _ "blocks") -_InSlot :: Iso' Slot BigInteger +_InSlot :: Iso' Slot BigInt _InSlot = iso (_.getSlot <<< unwrap) (wrap <<< { getSlot: _ }) _slot :: forall r a. Lens' { slot :: a | r } a -_slot = prop (SProxy :: SProxy "slot") +_slot = prop (Proxy :: _ "slot") diff --git a/plutus-playground-client/src/Action/Validation.purs b/plutus-playground-client/src/Action/Validation.purs index 52ffe0d747..529f0c9700 100644 --- a/plutus-playground-client/src/Action/Validation.purs +++ b/plutus-playground-client/src/Action/Validation.purs @@ -23,6 +23,6 @@ actionIsValid simulatorWallets simulatorAction = actionWalletsExist simulatorAct actionWalletsExist (AddBlocksUntil _) = true -- ditto - actionWalletsExist (CallEndpoint a@{ caller }) = walletExists caller + actionWalletsExist (CallEndpoint { caller }) = walletExists caller - actionWalletsExist (PayToWallet a@{ sender, recipient }) = walletExists sender && walletExists recipient + actionWalletsExist (PayToWallet { sender, recipient }) = walletExists sender && walletExists recipient diff --git a/plutus-playground-client/src/Action/View.purs b/plutus-playground-client/src/Action/View.purs index 112465b4fe..d0bf4ddb28 100644 --- a/plutus-playground-client/src/Action/View.purs +++ b/plutus-playground-client/src/Action/View.purs @@ -5,8 +5,8 @@ import Action.Lenses (_InSlot) import Bootstrap (btn, card, cardBody_, col, colFormLabel, col_, formCheck, formCheckInline, formCheckInput, formCheckLabel, formControl, formGroup_, formRow_, floatRight) import Data.Array (mapWithIndex) import Data.Array as Array -import Data.BigInteger (BigInteger) -import Data.BigInteger as BigInteger +import Data.BigInt.Argonaut (BigInt) +import Data.BigInt.Argonaut as BigInt import Data.Either (Either(..)) import Data.Lens (review, view) import Data.Maybe (Maybe(..), fromMaybe) @@ -14,7 +14,7 @@ import Data.Tuple (Tuple(..)) import Halogen.HTML (ClassName(ClassName), HTML, IProp, button, div, div_, h2_, h3_, input, label, p_, text) import Halogen.HTML.Elements.Keyed as Keyed import Halogen.HTML.Events (onChange, onClick, onDragEnd, onDragEnter, onDragLeave, onDragOver, onDragStart, onDrop, onValueInput) -import Halogen.HTML.Properties (InputType(..), checked, class_, classes, draggable, for, id_, min, name, placeholder, required, type_, value) +import Halogen.HTML.Properties (InputType(..), checked, class_, classes, draggable, for, id, min, name, placeholder, required, type_, value) import Icons (Icon(..), icon) import MainFrame.Types (DragAndDropEventType(..), HAction(..), SimulatorAction) import Playground.Lenses (_endpointDescription, _getEndpointDescription) @@ -78,7 +78,7 @@ actionPane actionDrag wallets index action = [ text $ show (index + 1) ] , button [ classes [ btn, floatRight, ClassName "close-button" ] - , onClick $ const $ Just $ ModifyActions $ RemoveAction index + , onClick $ const $ ModifyActions $ RemoveAction index ] [ icon Close ] , actionPaneBody index action @@ -104,11 +104,11 @@ actionPaneBody index (PayToWallet { sender, recipient, amount }) = , input [ type_ InputNumber , classes [ formControl ] - , value $ show $ view _walletId recipient + , value $ BigInt.toString $ view _walletId recipient , required true , min 1.0 , placeholder "Wallet ID" - , onBigIntegerInput $ ModifyActions <<< SetPayToWalletRecipient index <<< review _walletId + , onBigIntInput $ ModifyActions <<< SetPayToWalletRecipient index <<< review _walletId ] ] , formGroup_ @@ -129,11 +129,11 @@ actionPaneBody index (AddBlocks { blocks }) = [ input [ type_ InputNumber , classes [ formControl, ClassName $ "action-argument-0-blocks" ] - , value $ show blocks + , value $ BigInt.toString blocks , required true , min 1.0 , placeholder "Block Number" - , onBigIntegerInput $ ModifyActions <<< SetWaitTime index + , onBigIntInput $ ModifyActions <<< SetWaitTime index ] ] ] @@ -152,18 +152,18 @@ actionPaneBody index (AddBlocksUntil { slot }) = [ input [ type_ InputNumber , classes [ formControl, ClassName $ "action-argument-0-until-slot" ] - , value $ show $ view _InSlot slot + , value $ BigInt.toString $ view _InSlot slot , required true , min 1.0 , placeholder "Slot Number" - , onBigIntegerInput $ ModifyActions <<< SetWaitUntilTime index <<< review _InSlot + , onBigIntInput $ ModifyActions <<< SetWaitUntilTime index <<< review _InSlot ] ] ] ] ] -waitTypeRadioInputs :: forall p. Int -> Either Slot BigInteger -> HTML p SimulationAction +waitTypeRadioInputs :: forall p. Int -> Either Slot BigInt -> HTML p SimulationAction waitTypeRadioInputs index wait = div [ class_ $ ClassName "wait-type-options" ] @@ -171,8 +171,8 @@ waitTypeRadioInputs index wait = [ classes [ formCheck, formCheckInline ] ] [ input ( case wait of - Left slot -> baseInputProps <> [ id_ waitForId, onChange $ const $ Just $ ModifyActions $ SetWaitTime index $ view _InSlot slot ] - Right _ -> baseInputProps <> [ id_ waitForId, checked true ] + Left slot -> baseInputProps <> [ id waitForId, onChange $ const $ ModifyActions $ SetWaitTime index $ view _InSlot slot ] + Right _ -> baseInputProps <> [ id waitForId, checked true ] ) , label [ class_ formCheckLabel @@ -184,8 +184,8 @@ waitTypeRadioInputs index wait = [ classes [ formCheck, formCheckInline ] ] [ input ( case wait of - Right blocks -> baseInputProps <> [ id_ waitUntilId, onChange $ const $ Just $ ModifyActions $ SetWaitUntilTime index $ review _InSlot blocks ] - Left _ -> baseInputProps <> [ id_ waitForId, checked true ] + Right blocks -> baseInputProps <> [ id waitUntilId, onChange $ const $ ModifyActions $ SetWaitUntilTime index $ review _InSlot blocks ] + Left _ -> baseInputProps <> [ id waitForId, checked true ] ) , label [ class_ formCheckLabel @@ -208,7 +208,7 @@ addWaitActionPane index = [ classes [ actionClass, ClassName "add-wait-action" ] ] [ div ( [ class_ card - , onClick $ const $ Just $ ChangeSimulation $ ModifyActions $ AddWaitAction $ BigInteger.fromInt 10 + , onClick $ const $ ChangeSimulation $ ModifyActions $ AddWaitAction $ BigInt.fromInt 10 ] <> dragTargetProperties index ) @@ -234,8 +234,8 @@ dragSourceProperties :: ) dragSourceProperties index = [ draggable true - , onDragStart $ dragAndDropAction index DragStart - , onDragEnd $ dragAndDropAction index DragEnd + , onDragStart $ ActionDragAndDrop index DragStart + , onDragEnd $ ActionDragAndDrop index DragEnd ] dragTargetProperties :: @@ -252,18 +252,15 @@ dragTargetProperties :: HAction ) dragTargetProperties index = - [ onDragEnter $ dragAndDropAction index DragEnter - , onDragOver $ dragAndDropAction index DragOver - , onDragLeave $ dragAndDropAction index DragLeave - , onDrop $ dragAndDropAction index Drop + [ onDragEnter $ ActionDragAndDrop index DragEnter + , onDragOver $ ActionDragAndDrop index DragOver + , onDragLeave $ ActionDragAndDrop index DragLeave + , onDrop $ ActionDragAndDrop index Drop ] -dragAndDropAction :: Int -> DragAndDropEventType -> DragEvent -> Maybe HAction -dragAndDropAction index eventType = Just <<< ActionDragAndDrop index eventType - --- defaults to 1 because all the BigInteger fields here have a minimum value of 1 -onBigIntegerInput :: forall i r. (BigInteger -> i) -> IProp ( onInput :: Event, value :: String | r ) i -onBigIntegerInput f = onValueInput $ Just <<< f <<< fromMaybe one <<< BigInteger.fromString +-- defaults to 1 because all the BigInt fields here have a minimum value of 1 +onBigIntInput :: forall i r. (BigInt -> i) -> IProp ( onInput :: Event, value :: String | r ) i +onBigIntInput f = onValueInput $ f <<< fromMaybe one <<< BigInt.fromString actionClass :: ClassName actionClass = ClassName "action" diff --git a/web-common/src/Cursor.purs b/plutus-playground-client/src/Cursor.purs similarity index 75% rename from web-common/src/Cursor.purs rename to plutus-playground-client/src/Cursor.purs index 8a58f85e28..8d3b95ea7b 100644 --- a/web-common/src/Cursor.purs +++ b/plutus-playground-client/src/Cursor.purs @@ -23,18 +23,19 @@ module Cursor , right ) where +import Prologue hiding (clamp) import Control.Monad.Gen.Class (chooseInt) import Data.Array as Array +import Data.Argonaut.Decode (class DecodeJson, decodeJson) +import Data.Argonaut.Encode (class EncodeJson, encodeJson) import Data.Foldable (class Foldable, foldMap, foldl, foldr) -import Data.Generic.Rep (class Generic) import Data.Lens (Traversal', wander) +import Data.Lens.AffineTraversal (affineTraversal) import Data.Lens.Index (class Index) -import Data.Maybe (Maybe, fromMaybe, maybe) +import Data.Maybe (fromMaybe, maybe) import Data.Ord as Ord import Data.Traversable (class Traversable, sequenceDefault, traverse) -import Foreign (ForeignError(..), fail, readArray, readInt) -import Foreign.Class (class Decode, class Encode, decode, encode) -import Prelude (class Eq, class Functor, class Ord, class Show, bind, map, otherwise, pure, show, (#), ($), (+), (-), (<$>), (<<<), (<>), (>=), (>>>)) +import Data.Tuple (uncurry) import Test.QuickCheck.Arbitrary (class Arbitrary, arbitrary) import Test.QuickCheck.Gen (arrayOf) @@ -47,8 +48,6 @@ derive instance ordCursor :: Ord a => Ord (Cursor a) derive instance functorCursor :: Functor Cursor -derive instance genericCursor :: Generic (Cursor a) _ - instance foldableCursor :: Foldable Cursor where foldr f acc (Cursor _ xs) = foldr f acc xs foldl f acc (Cursor _ xs) = foldl f acc xs @@ -68,30 +67,17 @@ instance arbitraryCursor :: Arbitrary a => Arbitrary (Cursor a) where pure $ Cursor index xs instance indexCursor :: Index (Cursor a) Int a where - ix n = - wander \coalg (Cursor index xs) -> - Array.index xs n - # maybe - (pure xs) - ( let - f x = fromMaybe xs $ Array.updateAt n x xs - in - coalg >>> map f - ) - # map (Cursor index) - -instance encodeCursor :: Encode a => Encode (Cursor a) where - encode (Cursor n xs) = encode [ encode n, encode xs ] - -instance decodeCursor :: Decode a => Decode (Cursor a) where - decode value = do - xs <- readArray value - case xs of - [ x, y ] -> do - index <- readInt x - elements <- decode y - pure $ Cursor index elements - _ -> fail $ ForeignError "Decoding a Cursor, expected to see an array with exactly 2 elements." + ix n = affineTraversal set pre + where + set c@(Cursor index xs) a = fromMaybe c $ Cursor index <$> Array.updateAt n a xs + + pre c@(Cursor _ xs) = maybe (Left c) Right $ Array.index xs n + +instance encodeCursor :: EncodeJson a => EncodeJson (Cursor a) where + encodeJson (Cursor n xs) = encodeJson [ encodeJson n, encodeJson xs ] + +instance decodeCursor :: DecodeJson a => DecodeJson (Cursor a) where + decodeJson value = uncurry Cursor <$> decodeJson value _current :: forall a. Traversal' (Cursor a) a _current = @@ -150,7 +136,7 @@ current :: forall a. Cursor a -> Maybe a current (Cursor index xs) = Array.index xs index getIndex :: forall a. Cursor a -> Int -getIndex (Cursor index xs) = index +getIndex (Cursor index _) = index setIndex :: forall a. Int -> Cursor a -> Cursor a setIndex newIndex (Cursor _ xs) = clamp $ Cursor newIndex xs diff --git a/plutus-playground-client/src/Editor/Lenses.purs b/plutus-playground-client/src/Editor/Lenses.purs index 394b119b55..2981329b91 100644 --- a/plutus-playground-client/src/Editor/Lenses.purs +++ b/plutus-playground-client/src/Editor/Lenses.purs @@ -13,32 +13,32 @@ import Data.Lens (Lens') import Data.Lens.Iso.Newtype (_Newtype) import Data.Lens.Record (prop) import Data.Maybe (Maybe) -import Data.Symbol (SProxy(..)) +import Type.Proxy (Proxy(..)) import Editor.Types (State) import Halogen.Monaco (KeyBindings) import Language.Haskell.Interpreter (SourceCode) import Prelude ((<<<)) _warnings :: forall s a. Lens' { warnings :: a | s } a -_warnings = prop (SProxy :: SProxy "warnings") +_warnings = prop (Proxy :: _ "warnings") _keyBindings :: Lens' State KeyBindings -_keyBindings = _Newtype <<< prop (SProxy :: SProxy "keyBindings") +_keyBindings = _Newtype <<< prop (Proxy :: _ "keyBindings") _feedbackPaneMinimised :: Lens' State Boolean -_feedbackPaneMinimised = _Newtype <<< prop (SProxy :: SProxy "feedbackPaneMinimised") +_feedbackPaneMinimised = _Newtype <<< prop (Proxy :: _ "feedbackPaneMinimised") _lastCompiledCode :: Lens' State (Maybe SourceCode) -_lastCompiledCode = _Newtype <<< prop (SProxy :: SProxy "lastCompiledCode") +_lastCompiledCode = _Newtype <<< prop (Proxy :: _ "lastCompiledCode") _currentCodeIsCompiled :: Lens' State Boolean -_currentCodeIsCompiled = _Newtype <<< prop (SProxy :: SProxy "currentCodeIsCompiled") +_currentCodeIsCompiled = _Newtype <<< prop (Proxy :: _ "currentCodeIsCompiled") _feedbackPaneDragStart :: Lens' State (Maybe Int) -_feedbackPaneDragStart = _Newtype <<< prop (SProxy :: SProxy "feedbackPaneDragStart") +_feedbackPaneDragStart = _Newtype <<< prop (Proxy :: _ "feedbackPaneDragStart") _feedbackPaneExtend :: Lens' State Int -_feedbackPaneExtend = _Newtype <<< prop (SProxy :: SProxy "feedbackPaneExtend") +_feedbackPaneExtend = _Newtype <<< prop (Proxy :: _ "feedbackPaneExtend") _feedbackPanePreviousExtend :: Lens' State Int -_feedbackPanePreviousExtend = _Newtype <<< prop (SProxy :: SProxy "feedbackPanePreviousExtend") +_feedbackPanePreviousExtend = _Newtype <<< prop (Proxy :: _ "feedbackPanePreviousExtend") diff --git a/plutus-playground-client/src/Editor/State.purs b/plutus-playground-client/src/Editor/State.purs index 242e23619e..1b87574814 100644 --- a/plutus-playground-client/src/Editor/State.purs +++ b/plutus-playground-client/src/Editor/State.purs @@ -14,7 +14,7 @@ import Editor.Lenses (_currentCodeIsCompiled, _feedbackPaneDragStart, _feedbackP import Editor.Types (State(State), Action(..), readKeyBindings) import Effect.Aff.Class (class MonadAff, liftAff) import Effect.Class (class MonadEffect) -import Halogen (HalogenM, liftEffect, query, tell) +import Halogen (HalogenM, liftEffect, tell) import Halogen.Monaco (KeyBindings(..)) import Halogen.Monaco (Message(..), Query(..)) as Monaco import Language.Haskell.Interpreter (SourceCode(SourceCode)) @@ -49,6 +49,8 @@ handleAction :: Key -> Action -> HalogenM State action ChildSlots output m Unit +handleAction _ DoNothing = pure unit + handleAction bufferLocalStorageKey Init = do binding <- loadKeyBindings assign _keyBindings binding @@ -64,9 +66,9 @@ handleAction bufferLocalStorageKey (HandleEditorMessage (Monaco.TextChanged text liftEffect $ saveBuffer bufferLocalStorageKey text handleAction _ (SetKeyBindings binding) = do - void $ query _editorSlot unit $ tell $ Monaco.SetKeyBindings binding - void $ query _editorSlot unit $ tell $ Monaco.Focus - void $ query _editorSlot unit $ tell $ Monaco.Resize + void $ tell _editorSlot unit $ Monaco.SetKeyBindings binding + void $ tell _editorSlot unit $ Monaco.Focus + void $ tell _editorSlot unit $ Monaco.Resize assign _keyBindings binding liftEffect $ setItem keybindingsLocalStorageKey (show binding) @@ -75,14 +77,14 @@ handleAction _ ToggleFeedbackPane = modifying _feedbackPaneMinimised not handleAction _ (HandleDragEvent event) = liftEffect $ preventDefault event handleAction _ (ScrollTo position) = do - void $ query _editorSlot unit $ tell $ Monaco.SetPosition position - void $ query _editorSlot unit $ tell $ Monaco.Focus + void $ tell _editorSlot unit $ Monaco.SetPosition position + void $ tell _editorSlot unit $ Monaco.Focus handleAction bufferLocalStorageKey (HandleDropEvent event) = do liftEffect $ preventDefault event contents <- liftAff $ readFileFromDragEvent event - void $ query _editorSlot unit $ tell $ Monaco.SetText contents - void $ query _editorSlot unit $ tell $ Monaco.SetPosition { column: 1, lineNumber: 1 } + void $ tell _editorSlot unit $ Monaco.SetText contents + void $ tell _editorSlot unit $ Monaco.SetPosition { column: 1, lineNumber: 1 } saveBuffer bufferLocalStorageKey contents handleAction _ (SetFeedbackPaneDragStart event) = do @@ -120,7 +122,7 @@ initEditor :: State -> Monaco.Editor -> m Unit -initEditor initialContents bufferLocalStorageKey state@(State { keyBindings }) editor = +initEditor initialContents bufferLocalStorageKey (State _) editor = liftEffect do savedContents <- getItem bufferLocalStorageKey let diff --git a/plutus-playground-client/src/Editor/Types.purs b/plutus-playground-client/src/Editor/Types.purs index 4d6d372b02..f82c208406 100644 --- a/plutus-playground-client/src/Editor/Types.purs +++ b/plutus-playground-client/src/Editor/Types.purs @@ -39,6 +39,7 @@ data Action | SetFeedbackPaneDragStart MouseEvent | ClearFeedbackPaneDragStart | FixFeedbackPaneExtend Int + | DoNothing allKeyBindings :: Array KeyBindings allKeyBindings = enumFromTo bottom top diff --git a/plutus-playground-client/src/Editor/View.purs b/plutus-playground-client/src/Editor/View.purs index b7bd88bc44..5a7caa7141 100644 --- a/plutus-playground-client/src/Editor/View.purs +++ b/plutus-playground-client/src/Editor/View.purs @@ -6,12 +6,12 @@ module Editor.View , editorFeedback ) where +import Prologue hiding (div) import AjaxUtils (ajaxErrorPane) import Bootstrap (btn, card, cardHeader, cardHeader_, cardBody_, customSelect, empty, listGroupItem_, listGroup_, nbsp) import Data.Array as Array -import Data.Either (Either(..)) import Data.Lens (_Right, preview, to, view) -import Data.Maybe (Maybe(..), fromMaybe) +import Data.Maybe (fromMaybe, maybe) import Data.String as String import Editor.Lenses (_warnings) import Editor.State (initEditor) @@ -19,7 +19,7 @@ import Editor.Types (Action(..), State(..), allKeyBindings) import Effect.Aff.Class (class MonadAff) import Halogen.HTML (ClassName(ClassName), ComponentHTML, HTML, a, button, code_, div, div_, option, p_, pre, pre_, select, slot, text) import Halogen.HTML.Events (onClick, onDragOver, onDrop, onMouseDown, onMouseMove, onMouseUp, onSelectedIndexChange) -import Halogen.HTML.Properties (class_, classes, disabled, id_, selected, value) +import Halogen.HTML.Properties (class_, classes, disabled, id, selected, value) import Halogen.Monaco (KeyBindings(..), monacoComponent) import Icons (Icon(..), icon) import Language.Haskell.Interpreter (CompilationError(CompilationError, RawError), InterpreterError(CompilationErrors, TimeoutError), Warning, _InterpreterResult, _Warning) @@ -28,17 +28,13 @@ import LocalStorage (Key) import MainFrame.Lenses (_editorSlot) import MainFrame.Types (ChildSlots, HAction(..), View(..), WebCompilationResult) import Network.RemoteData (RemoteData(..), _Success, isLoading) -import Prelude (const, map, not, pure, show, unit, ($), (<$>), (<<<), (<>), (==)) import Web.UIEvent.MouseEvent (MouseEvent, pageY) editorPreferencesSelect :: forall p. KeyBindings -> HTML p Action editorPreferencesSelect active = select [ class_ customSelect - , onSelectedIndexChange - ( \index -> - SetKeyBindings <$> Array.index allKeyBindings index - ) + , onSelectedIndexChange $ maybe DoNothing SetKeyBindings <<< Array.index allKeyBindings ] (editor <$> allKeyBindings) where @@ -59,7 +55,7 @@ compileButton :: forall p. WebCompilationResult -> HTML p HAction compileButton compilationResult = button [ classes [ btn, ClassName "btn-green" ] - , onClick $ const $ Just CompileProgram + , onClick $ const CompileProgram , disabled (isLoading compilationResult) ] [ btnText ] @@ -72,7 +68,7 @@ simulateButton :: forall p. Boolean -> WebCompilationResult -> HTML p HAction simulateButton currentCodeIsCompiled compilationResult = button [ classes [ btn, ClassName "btn-turquoise" ] - , onClick $ const $ Just (ChangeView Simulations) + , onClick $ const $ ChangeView Simulations , disabled isDisabled ] [ text "Simulate" ] @@ -85,8 +81,8 @@ editorPane :: forall m. MonadAff m => Maybe String -> Key -> State -> ComponentH editorPane initialContents bufferLocalStorageKey editorState@(State { keyBindings }) = div [ class_ (ClassName "code-editor") - , onDragOver $ Just <<< HandleDragEvent - , onDrop $ Just <<< HandleDropEvent + , onDragOver HandleDragEvent + , onDrop HandleDropEvent -- This is not the natural place to have these listeners. But see note [1] below. , onMouseMove feedbackPaneResizeMouseMoveHandler , onMouseUp feedbackPaneResizeMouseUpHandler @@ -96,14 +92,14 @@ editorPane initialContents bufferLocalStorageKey editorState@(State { keyBinding unit (monacoComponent (HM.settings (initEditor initialContents bufferLocalStorageKey editorState))) unit - (Just <<< HandleEditorMessage) + HandleEditorMessage , case keyBindings of - Vim -> pre [ id_ "statusline" ] [ nbsp ] - _ -> pre [ id_ "statusline", class_ $ ClassName "hidden" ] [ nbsp ] + Vim -> pre [ id "statusline" ] [ nbsp ] + _ -> pre [ id "statusline", class_ $ ClassName "hidden" ] [ nbsp ] ] editorFeedback :: forall p. State -> WebCompilationResult -> HTML p Action -editorFeedback editorState@(State { currentCodeIsCompiled, feedbackPaneExtend, feedbackPaneMinimised }) compilationResult = +editorFeedback (State { currentCodeIsCompiled, feedbackPaneExtend, feedbackPaneMinimised }) compilationResult = div [ class_ $ ClassName "editor-feedback-container" -- This is also not the natural place to have these listeners. But see note [1] below. @@ -114,7 +110,7 @@ editorFeedback editorState@(State { currentCodeIsCompiled, feedbackPaneExtend, f [ classes feedbackPaneClasses ] [ div [ class_ $ ClassName "editor-feedback-resize-bar" - , onMouseDown $ \event -> Just $ SetFeedbackPaneDragStart event + , onMouseDown SetFeedbackPaneDragStart -- Note [1]: This is the natural place to have these listeners. But because the mouse -- can - and probably will - move faster than this resize bar, they also need to be on -- the editor pane (to catch when the mouse moves up faster), and on the feedback @@ -127,8 +123,8 @@ editorFeedback editorState@(State { currentCodeIsCompiled, feedbackPaneExtend, f [ class_ $ ClassName "editor-feedback-header" ] [ p_ [ summaryText ] , case compilationResult of - Success (Left error) -> minMaxButton - Failure error -> minMaxButton + Success (Left _) -> minMaxButton + Failure _ -> minMaxButton _ -> empty ] , div @@ -150,8 +146,8 @@ editorFeedback editorState@(State { currentCodeIsCompiled, feedbackPaneExtend, f summaryText = case compilationResult of NotAsked -> text "Not compiled" Loading -> text "Compiling ..." - Success (Left error) -> text "Compilation failed" - Failure error -> text "Compilation failed" + Success (Left _) -> text "Compilation failed" + Failure _ -> text "Compilation failed" _ -> if currentCodeIsCompiled then text "Compilation successful" @@ -161,7 +157,7 @@ editorFeedback editorState@(State { currentCodeIsCompiled, feedbackPaneExtend, f minMaxButton = a [ class_ btn - , onClick $ const $ Just ToggleFeedbackPane + , onClick $ const ToggleFeedbackPane ] [ icon $ if feedbackPaneMinimised then @@ -186,11 +182,11 @@ editorFeedback editorState@(State { currentCodeIsCompiled, feedbackPaneExtend, f ) compilationResult -feedbackPaneResizeMouseMoveHandler :: MouseEvent -> Maybe Action -feedbackPaneResizeMouseMoveHandler event = Just $ FixFeedbackPaneExtend $ pageY event +feedbackPaneResizeMouseMoveHandler :: MouseEvent -> Action +feedbackPaneResizeMouseMoveHandler event = FixFeedbackPaneExtend $ pageY event -feedbackPaneResizeMouseUpHandler :: MouseEvent -> Maybe Action -feedbackPaneResizeMouseUpHandler event = Just $ ClearFeedbackPaneDragStart +feedbackPaneResizeMouseUpHandler :: MouseEvent -> Action +feedbackPaneResizeMouseUpHandler = const ClearFeedbackPaneDragStart interpreterErrorPane :: forall p. InterpreterError -> Array (HTML p Action) interpreterErrorPane (TimeoutError error) = [ listGroupItem_ [ div_ [ text error ] ] ] @@ -213,7 +209,7 @@ compilationErrorPane (CompilationError error) = [ text $ "Compilation Error, Line " <> show error.row <> ", Column " <> show error.column , nbsp , a - [ onClick $ const $ Just $ ScrollTo { lineNumber: error.row, column: error.column } ] + [ onClick $ const $ ScrollTo { lineNumber: error.row, column: error.column } ] [ text "(jump)" ] ] , cardBody_ diff --git a/plutus-playground-client/src/Main.purs b/plutus-playground-client/src/Main.purs index 13fc328344..6473664cc0 100644 --- a/plutus-playground-client/src/Main.purs +++ b/plutus-playground-client/src/Main.purs @@ -1,11 +1,11 @@ module Main where +import Control.Apply (void) import Control.Coroutine (Consumer, Process, connect, consumer, runProcess) import Data.Maybe (Maybe(Nothing)) import Effect (Effect) import Effect.Aff (Aff, forkAff) import Effect.Class.Console (log) -import Effect.Unsafe (unsafePerformEffect) import Halogen.Aff (awaitBody, runHalogenAff) import Halogen.VDom.Driver (runUI) import LocalStorage (RawStorageEvent) @@ -19,7 +19,7 @@ main = do mainFrame <- mkMainFrame runHalogenAff do body <- awaitBody - driver <- runUI mainFrame Mounted body + void $ runUI mainFrame Mounted body forkAff $ runProcess watchLocalStorageProcess watchLocalStorageProcess :: Process Aff Unit @@ -30,6 +30,3 @@ watchLocalStorage = consumer \event -> do log $ "Got Local Storage Event: " <> show event pure Nothing - -onLoad :: Unit -onLoad = unsafePerformEffect main diff --git a/plutus-playground-client/src/MainFrame/Lenses.purs b/plutus-playground-client/src/MainFrame/Lenses.purs index 4e7c797ade..3c703fbb39 100644 --- a/plutus-playground-client/src/MainFrame/Lenses.purs +++ b/plutus-playground-client/src/MainFrame/Lenses.purs @@ -32,63 +32,61 @@ module MainFrame.Lenses , getKnownCurrencies ) where +import Prologue import Auth (AuthStatus) import Chain.Types as Chain import Control.Monad.State.Class (class MonadState) import Cursor (Cursor) -import Data.Either (Either) -import Data.Json.JsonTuple (JsonTuple) import Data.Lens (Lens', Traversal', _Right, lens, preview) import Data.Lens.Extra (peruse) import Data.Lens.Iso.Newtype (_Newtype) import Data.Lens.Record (prop) -import Data.Maybe (Maybe(..), fromMaybe) -import Data.Symbol (SProxy(..)) +import Data.Maybe (fromMaybe) import Editor.Types (State) as Editor import Gist (Gist) import Language.Haskell.Interpreter (InterpreterError, InterpreterResult, SourceCode, _InterpreterResult) +import Ledger.CardanoWallet (WalletNumber) import MainFrame.Types (State, View, WebData) import Network.RemoteData (_Success) import Playground.Types (CompilationResult, ContractCall, ContractDemo, EvaluationResult, FunctionSchema, KnownCurrency, PlaygroundError, Simulation, SimulatorWallet) import Plutus.V1.Ledger.Crypto (PubKeyHash) -import Prelude ((<$>), (<<<)) import Schema (FormSchema) import Schema.Types (FormArgument) -import Ledger.CardanoWallet (WalletNumber) +import Type.Proxy (Proxy(..)) import Wallet.Rollup.Types (AnnotatedTx) _demoFilesMenuVisible :: Lens' State Boolean -_demoFilesMenuVisible = _Newtype <<< prop (SProxy :: SProxy "demoFilesMenuVisible") +_demoFilesMenuVisible = _Newtype <<< prop (Proxy :: _ "demoFilesMenuVisible") _gistErrorPaneVisible :: Lens' State Boolean -_gistErrorPaneVisible = _Newtype <<< prop (SProxy :: SProxy "gistErrorPaneVisible") +_gistErrorPaneVisible = _Newtype <<< prop (Proxy :: _ "gistErrorPaneVisible") _currentView :: Lens' State View -_currentView = _Newtype <<< prop (SProxy :: SProxy "currentView") +_currentView = _Newtype <<< prop (Proxy :: _ "currentView") _contractDemos :: Lens' State (Array ContractDemo) -_contractDemos = _Newtype <<< prop (SProxy :: SProxy "contractDemos") +_contractDemos = _Newtype <<< prop (Proxy :: _ "contractDemos") _currentDemoName :: Lens' State (Maybe String) -_currentDemoName = _Newtype <<< prop (SProxy :: SProxy "currentDemoName") +_currentDemoName = _Newtype <<< prop (Proxy :: _ "currentDemoName") _editorState :: Lens' State Editor.State -_editorState = _Newtype <<< prop (SProxy :: SProxy "editorState") +_editorState = _Newtype <<< prop (Proxy :: _ "editorState") _simulations :: Lens' State (Cursor Simulation) -_simulations = _Newtype <<< prop (SProxy :: SProxy "simulations") +_simulations = _Newtype <<< prop (Proxy :: _ "simulations") _actionDrag :: Lens' State (Maybe Int) -_actionDrag = _Newtype <<< prop (SProxy :: SProxy "actionDrag") +_actionDrag = _Newtype <<< prop (Proxy :: _ "actionDrag") _evaluationResult :: Lens' State (WebData (Either PlaygroundError EvaluationResult)) -_evaluationResult = _Newtype <<< prop (SProxy :: SProxy "evaluationResult") +_evaluationResult = _Newtype <<< prop (Proxy :: _ "evaluationResult") _successfulEvaluationResult :: Traversal' State EvaluationResult _successfulEvaluationResult = _evaluationResult <<< _Success <<< _Right _lastEvaluatedSimulation :: Lens' State (Maybe Simulation) -_lastEvaluatedSimulation = _Newtype <<< prop (SProxy :: SProxy "lastEvaluatedSimulation") +_lastEvaluatedSimulation = _Newtype <<< prop (Proxy :: _ "lastEvaluatedSimulation") _compilationResult :: Lens' State (WebData (Either InterpreterError (InterpreterResult CompilationResult))) _compilationResult = _Newtype <<< lens g s @@ -103,58 +101,58 @@ _successfulCompilationResult :: Traversal' State CompilationResult _successfulCompilationResult = _compilationResult <<< _Success <<< _Right <<< _InterpreterResult <<< _result _lastSuccessfulCompilationResult :: Lens' State (Maybe CompilationResult) -_lastSuccessfulCompilationResult = _Newtype <<< prop (SProxy :: SProxy "lastSuccessfulCompilationResult") +_lastSuccessfulCompilationResult = _Newtype <<< prop (Proxy :: _ "lastSuccessfulCompilationResult") _authStatus :: Lens' State (WebData AuthStatus) -_authStatus = _Newtype <<< prop (SProxy :: SProxy "authStatus") +_authStatus = _Newtype <<< prop (Proxy :: _ "authStatus") _createGistResult :: Lens' State (WebData Gist) -_createGistResult = _Newtype <<< prop (SProxy :: SProxy "createGistResult") +_createGistResult = _Newtype <<< prop (Proxy :: _ "createGistResult") _gistUrl :: Lens' State (Maybe String) -_gistUrl = _Newtype <<< prop (SProxy :: SProxy "gistUrl") +_gistUrl = _Newtype <<< prop (Proxy :: _ "gistUrl") _blockchainVisualisationState :: Lens' State Chain.State -_blockchainVisualisationState = _Newtype <<< prop (SProxy :: SProxy "blockchainVisualisationState") +_blockchainVisualisationState = _Newtype <<< prop (Proxy :: _ "blockchainVisualisationState") ------------------------------------------------------------ -_editorSlot :: SProxy "editorSlot" -_editorSlot = SProxy +_editorSlot :: Proxy "editorSlot" +_editorSlot = Proxy -_balancesChartSlot :: SProxy "balancesChartSlot" -_balancesChartSlot = SProxy +_balancesChartSlot :: Proxy "balancesChartSlot" +_balancesChartSlot = Proxy ------------------------------------------------------------ _contractDemoEditorContents :: Lens' ContractDemo SourceCode -_contractDemoEditorContents = _Newtype <<< prop (SProxy :: SProxy "contractDemoEditorContents") +_contractDemoEditorContents = _Newtype <<< prop (Proxy :: _ "contractDemoEditorContents") _simulationId :: Lens' Simulation Int -_simulationId = _Newtype <<< prop (SProxy :: SProxy "simulationId") +_simulationId = _Newtype <<< prop (Proxy :: _ "simulationId") _simulationActions :: Lens' Simulation (Array (ContractCall FormArgument)) -_simulationActions = _Newtype <<< prop (SProxy :: SProxy "simulationActions") +_simulationActions = _Newtype <<< prop (Proxy :: _ "simulationActions") _simulationWallets :: Lens' Simulation (Array SimulatorWallet) -_simulationWallets = _Newtype <<< prop (SProxy :: SProxy "simulationWallets") +_simulationWallets = _Newtype <<< prop (Proxy :: _ "simulationWallets") _resultRollup :: Lens' EvaluationResult (Array (Array AnnotatedTx)) -_resultRollup = _Newtype <<< prop (SProxy :: SProxy "resultRollup") +_resultRollup = _Newtype <<< prop (Proxy :: _ "resultRollup") _functionSchema :: Lens' CompilationResult (Array (FunctionSchema FormSchema)) -_functionSchema = _Newtype <<< prop (SProxy :: SProxy "functionSchema") +_functionSchema = _Newtype <<< prop (Proxy :: _ "functionSchema") -_walletKeys :: Lens' EvaluationResult (Array (JsonTuple PubKeyHash WalletNumber)) -_walletKeys = _Newtype <<< prop (SProxy :: SProxy "walletKeys") +_walletKeys :: Lens' EvaluationResult (Array (Tuple PubKeyHash WalletNumber)) +_walletKeys = _Newtype <<< prop (Proxy :: _ "walletKeys") _knownCurrencies :: Lens' CompilationResult (Array KnownCurrency) -_knownCurrencies = _Newtype <<< prop (SProxy :: SProxy "knownCurrencies") +_knownCurrencies = _Newtype <<< prop (Proxy :: _ "knownCurrencies") --- Language.Haskell.Interpreter --- _result :: forall s a. Lens' { result :: a | s } a -_result = prop (SProxy :: SProxy "result") +_result = prop (Proxy :: _ "result") _warnings :: forall s a. Lens' { warnings :: a | s } a -_warnings = prop (SProxy :: SProxy "warnings") +_warnings = prop (Proxy :: _ "warnings") getKnownCurrencies :: forall m. MonadState State m => m (Array KnownCurrency) getKnownCurrencies = fromMaybe [] <$> peruse (_successfulCompilationResult <<< _knownCurrencies) diff --git a/plutus-playground-client/src/MainFrame/MonadApp.purs b/plutus-playground-client/src/MainFrame/MonadApp.purs index 8698a8a2e1..e75a1fa1ec 100644 --- a/plutus-playground-client/src/MainFrame/MonadApp.purs +++ b/plutus-playground-client/src/MainFrame/MonadApp.purs @@ -50,12 +50,11 @@ import MainFrame.Lenses (_balancesChartSlot, _editorSlot, _editorState) import MainFrame.Types (ChildSlots, HAction, State, WebData) import Monaco (IMarkerData) import Network.RemoteData as RemoteData -import Playground.Server (SPParams_) +import Playground.Server (class HasSPSettings) import Playground.Server as Server import Playground.Types (CompilationResult, Evaluation, EvaluationResult, PlaygroundError) import Prelude (class Applicative, class Apply, class Bind, class Functor, class Monad, Unit, Void, bind, identity, map, pure, unit, void, ($), (<$>), (<<<)) -import Servant.PureScript.Ajax (AjaxError) -import Servant.PureScript.Settings (SPSettings_) +import Servant.PureScript (AjaxError) import StaticData (bufferLocalStorageKey) import Web.Event.Extra (class IsEvent) import Web.Event.Extra as WebEvent @@ -126,7 +125,8 @@ runHalogenApp :: forall m a. HalogenApp m a -> HalogenM State HAction ChildSlots runHalogenApp = unwrap instance monadAppHalogenApp :: - ( MonadAsk (SPSettings_ SPParams_) m + ( HasSPSettings env + , MonadAsk env m , MonadEffect m , MonadAff m ) => @@ -134,7 +134,7 @@ instance monadAppHalogenApp :: editorGetContents = do mText <- wrap $ query _editorSlot unit $ Monaco.GetText identity pure $ map SourceCode mText - editorSetContents (SourceCode contents) cursor = wrap $ void $ query _editorSlot unit $ tell $ Monaco.SetText contents + editorSetContents (SourceCode contents) _ = wrap $ void $ tell _editorSlot unit $ Monaco.SetText contents editorHandleAction action = wrap $ HE.imapState _editorState $ Editor.handleAction bufferLocalStorageKey action editorSetAnnotations annotations = wrap $ void $ query _editorSlot unit $ Monaco.SetModelMarkers annotations identity setDropEffect dropEffect event = wrap $ liftEffect $ DataTransfer.setDropEffect dropEffect $ dataTransfer event diff --git a/plutus-playground-client/src/MainFrame/State.purs b/plutus-playground-client/src/MainFrame/State.purs index 050bc81546..7af8d1ae47 100644 --- a/plutus-playground-client/src/MainFrame/State.purs +++ b/plutus-playground-client/src/MainFrame/State.purs @@ -1,20 +1,20 @@ module MainFrame.State - ( mkMainFrame + ( Env(..) + , mkMainFrame , handleAction , mkInitialState ) where -import AjaxUtils (AjaxErrorPaneAction(..), ajaxErrorRefLabel, renderForeignErrors) +import AjaxUtils (AjaxErrorPaneAction(..), ajaxErrorRefLabel) import Analytics (analyticsTracking) import Animation (class MonadAnimate, animate) import Chain.State (handleAction) as Chain import Chain.Types (Action(..), AnnotatedBlockchain(..), _chainFocusAppearing, _txIdOf) import Chain.Types (initialState) as Chain import Clipboard (class MonadClipboard) -import Control.Monad.Error.Class (class MonadThrow) -import Control.Monad.Error.Extra (mapError) +import Control.Monad.Error.Class (class MonadThrow, throwError) import Control.Monad.Except.Extra (noteT) -import Control.Monad.Except.Trans (ExceptT(..), except, mapExceptT, withExceptT, runExceptT) +import Control.Monad.Except.Trans (ExceptT(..), except, runExceptT) import Control.Monad.Maybe.Extra (hoistMaybe) import Control.Monad.Maybe.Trans (MaybeT(..), runMaybeT) import Control.Monad.Reader (class MonadAsk, runReaderT) @@ -23,13 +23,15 @@ import Control.Monad.State.Extra (zoomStateT) import Control.Monad.Trans.Class (lift) import Cursor (_current) import Cursor as Cursor +import Data.Argonaut.Decode (printJsonDecodeError) +import Data.Argonaut.Extra (parseDecodeJson, encodeStringifyJson) import Data.Array (catMaybes, (..)) import Data.Array (deleteAt, snoc) as Array import Data.Array.Extra (move) as Array import Data.Bifunctor (lmap) -import Data.BigInteger (BigInteger) -import Data.BigInteger as BigInteger -import Data.Either (Either(..), note) +import Data.BigInt.Argonaut (BigInt) +import Data.BigInt.Argonaut as BigInt +import Data.Either (Either(..), either, note) import Data.Lens (assign, modifying, over, to, traversed, use, view) import Data.Lens.Extra (peruse) import Data.Lens.Fold (maximumOf, lastOf, preview) @@ -38,23 +40,23 @@ import Data.Maybe (Maybe(..), fromMaybe) import Data.MediaType.Common (textPlain) import Data.Newtype (unwrap) import Data.RawJson (RawJson(..)) +import Data.Semigroup (append) import Data.String as String import Data.Traversable (traverse) -import Editor.State (initialState) as Editor import Editor.Lenses (_currentCodeIsCompiled, _feedbackPaneMinimised, _lastCompiledCode) +import Editor.State (initialState) as Editor import Editor.Types (Action(..), State) as Editor import Effect.Aff.Class (class MonadAff) import Effect.Class (class MonadEffect, liftEffect) import Effect.Exception (Error, error) -import Foreign.Generic (decodeJSON, encodeJSON) import Gist (_GistId, gistId) import Gists.Types (GistAction(..)) import Gists.Types as Gists import Halogen (Component, hoist) import Halogen as H -import Halogen.HTML (HTML) import Halogen.Query (HalogenM) import Language.Haskell.Interpreter (CompilationError(..), InterpreterError(..), SourceCode(..)) +import Ledger.CardanoWallet (WalletNumber(WalletNumber)) import MainFrame.Lenses (_actionDrag, _authStatus, _blockchainVisualisationState, _compilationResult, _contractDemos, _createGistResult, _currentDemoName, _currentView, _demoFilesMenuVisible, _editorState, _evaluationResult, _functionSchema, _gistErrorPaneVisible, _gistUrl, _knownCurrencies, _lastEvaluatedSimulation, _lastSuccessfulCompilationResult, _resultRollup, _simulationActions, _simulationId, _simulationWallets, _simulations, _successfulCompilationResult, _successfulEvaluationResult, getKnownCurrencies) import MainFrame.MonadApp (class MonadApp, editorGetContents, editorHandleAction, editorSetAnnotations, editorSetContents, getGistByGistId, getOauthStatus, postGistByGistId, postContract, postEvaluation, postGist, preventDefault, resizeBalancesChart, resizeEditor, runHalogenApp, saveBuffer, scrollIntoView, setDataTransferData, setDropEffect) import MainFrame.Types (ChildSlots, DragAndDropEventType(..), HAction(..), Query, State(..), View(..), WalletEvent(..)) @@ -62,25 +64,23 @@ import MainFrame.View (render) import Monaco (IMarkerData, markerSeverity) import Network.RemoteData (RemoteData(..), _Success, isSuccess) import Playground.Gists (mkNewGist, playgroundGistFile, simulationGistFile) -import Playground.Server (SPParams_(..)) +import Playground.Server (class HasSPSettings, SPSettings_) import Playground.Types (ContractCall(..), ContractDemo(..), Evaluation(..), KnownCurrency, Simulation(..), SimulatorWallet(..), _CallEndpoint, _FunctionSchema) import Plutus.V1.Ledger.Value (Value) import Prelude (class Applicative, Unit, Void, add, const, bind, discard, flip, identity, join, not, mempty, one, pure, show, unit, unless, void, when, zero, (+), ($), (&&), (==), (<>), (<$>), (<*>), (>>=), (<<<)) import Schema.Types (Expression, FormArgument, SimulationAction(..), formArgumentToJson, handleActionEvent, handleFormEvent, handleValueEvent, mkInitialValue, traverseFunctionSchema) -import Servant.PureScript.Ajax (errorToString) -import Servant.PureScript.Settings (SPSettings_, defaultSettings) +import Servant.PureScript (printAjaxError) import Simulator.View (simulatorTitleRefLabel, simulationsErrorRefLabel) import StaticData (mkContractDemos, lookupContractDemo) import Validation (_argumentValues, _argument) -import Ledger.CardanoWallet (WalletNumber(WalletNumber)) import Wallet.Lenses (_simulatorWalletBalance, _simulatorWalletWallet, _walletId) import Web.HTML.Event.DataTransfer as DataTransfer -mkSimulatorWallet :: Array KnownCurrency -> BigInteger -> SimulatorWallet +mkSimulatorWallet :: Array KnownCurrency -> BigInt -> SimulatorWallet mkSimulatorWallet currencies walletId = SimulatorWallet { simulatorWalletWallet: WalletNumber { getWallet: walletId } - , simulatorWalletBalance: mkInitialValue currencies (BigInteger.fromInt 100_000_000) + , simulatorWalletBalance: mkInitialValue currencies (BigInt.fromInt 100_000_000) } mkSimulation :: Array KnownCurrency -> Int -> Simulation @@ -89,12 +89,20 @@ mkSimulation simulationCurrencies simulationId = { simulationName: "Simulation " <> show simulationId , simulationId , simulationActions: [] - , simulationWallets: mkSimulatorWallet simulationCurrencies <<< BigInteger.fromInt <$> 1 .. 2 + , simulationWallets: mkSimulatorWallet simulationCurrencies <<< BigInt.fromInt <$> 1 .. 2 } mkInitialState :: forall m. MonadThrow Error m => Editor.State -> m State mkInitialState editorState = do - contractDemos <- mapError (\e -> error $ "Could not load demo scripts. Parsing errors: " <> show e) mkContractDemos + contractDemos <- + either + ( throwError + <<< error + <<< append "Could not load demo scripts. Parsing errors: " + <<< printJsonDecodeError + ) + pure + mkContractDemos pure $ State { demoFilesMenuVisible: false @@ -116,19 +124,22 @@ mkInitialState editorState = do } ------------------------------------------------------------ -ajaxSettings :: SPSettings_ SPParams_ -ajaxSettings = defaultSettings $ SPParams_ { baseURL: "/api/" } +newtype Env + = Env { spSettings :: SPSettings_ } + +instance hasSPSettingsEnv :: HasSPSettings Env where + spSettings (Env e) = e.spSettings mkMainFrame :: forall m n. MonadThrow Error n => MonadEffect n => MonadAff m => - n (Component HTML Query HAction Void m) + n (Component Query HAction Void m) mkMainFrame = do editorState <- Editor.initialState initialState <- mkInitialState editorState - pure $ hoist (flip runReaderT ajaxSettings) + pure $ hoist (flip runReaderT $ Env { spSettings: { baseURL: "/api/" } }) $ H.mkComponent { initialState: const initialState , render @@ -144,9 +155,10 @@ mkMainFrame = do -- TODO: use web-common withAnalytics function handleActionWithAnalyticsTracking :: - forall m. + forall env m. + HasSPSettings env => + MonadAsk env m => MonadEffect m => - MonadAsk (SPSettings_ SPParams_) m => MonadAff m => HAction -> HalogenM State HAction ChildSlots Void m Unit handleActionWithAnalyticsTracking action = do @@ -154,10 +166,11 @@ handleActionWithAnalyticsTracking action = do runHalogenApp $ handleAction action handleAction :: - forall m. + forall env m. + HasSPSettings env => MonadState State m => MonadClipboard m => - MonadAsk (SPSettings_ SPParams_) m => + MonadAsk env m => MonadApp m => MonadAnimate m State => HAction -> m Unit @@ -173,7 +186,7 @@ handleAction (ActionDragAndDrop index DragStart event) = do setDataTransferData event textPlain (show index) assign _actionDrag (Just index) -handleAction (ActionDragAndDrop _ DragEnd event) = assign _actionDrag Nothing +handleAction (ActionDragAndDrop _ DragEnd _) = assign _actionDrag Nothing handleAction (ActionDragAndDrop _ DragEnter event) = do preventDefault event @@ -183,7 +196,7 @@ handleAction (ActionDragAndDrop _ DragOver event) = do preventDefault event setDropEffect DataTransfer.Move event -handleAction (ActionDragAndDrop _ DragLeave event) = pure unit +handleAction (ActionDragAndDrop _ DragLeave _) = pure unit handleAction (ActionDragAndDrop destination Drop event) = do use _actionDrag @@ -272,7 +285,7 @@ handleAction AddSimulationSlot = do knownCurrencies <- getKnownCurrencies mSignatures <- peruse (_successfulCompilationResult <<< _functionSchema) case mSignatures of - Just signatures -> + Just _ -> modifying _simulations ( \simulations -> let @@ -332,7 +345,6 @@ handleAction CompileProgram = do case mContents of Nothing -> pure unit Just contents -> do - oldCompilationResult <- use _compilationResult oldSuccessfulCompilationResult <- use _lastSuccessfulCompilationResult assign _compilationResult Loading newCompilationResult <- postContract contents @@ -429,7 +441,10 @@ handleGistAction LoadGist = when (isSuccess aGist) do assign _currentView Editor assign _currentDemoName Nothing - gist <- ExceptT $ pure $ toEither (Left "Gist not loaded.") $ lmap errorToString aGist + gist <- + except + $ toEither (Left "Gist not loaded.") + $ lmap printAjaxError aGist -- -- Load the source, if available. content <- noteT "Source not found in gist." $ view playgroundGistFile gist @@ -440,7 +455,7 @@ handleGistAction LoadGist = -- -- Load the simulation, if available. simulationString <- noteT "Simulation not found in gist." $ view simulationGistFile gist - simulations <- mapExceptT (pure <<< unwrap) $ withExceptT renderForeignErrors $ decodeJSON simulationString + simulations <- except $ lmap printJsonDecodeError $ parseDecodeJson simulationString assign _simulations simulations where toEither :: forall e a. Either e a -> RemoteData e a -> Either e a @@ -454,7 +469,7 @@ handleGistAction LoadGist = handleGistAction (AjaxErrorPaneAction CloseErrorPane) = assign _gistErrorPaneVisible false -handleActionWalletEvent :: (BigInteger -> SimulatorWallet) -> WalletEvent -> Array SimulatorWallet -> Array SimulatorWallet +handleActionWalletEvent :: (BigInt -> SimulatorWallet) -> WalletEvent -> Array SimulatorWallet -> Array SimulatorWallet handleActionWalletEvent mkWallet AddWallet wallets = let maxWalletId = fromMaybe zero $ maximumOf (traversed <<< _simulatorWalletWallet <<< _walletId) wallets @@ -480,7 +495,7 @@ replaceViewOnSuccess result source target = do ------------------------------------------------------------ toEvaluation :: SourceCode -> Simulation -> Maybe Evaluation toEvaluation sourceCode (Simulation { simulationActions, simulationWallets }) = do - program <- RawJson <<< encodeJSON <$> traverse toExpression simulationActions + program <- RawJson <<< encodeStringifyJson <$> traverse toExpression simulationActions pure $ Evaluation { wallets: simulationWallets @@ -492,7 +507,7 @@ toExpression :: ContractCall FormArgument -> Maybe Expression toExpression = traverseContractCall encodeForm where encodeForm :: FormArgument -> Maybe RawJson - encodeForm argument = (RawJson <<< encodeJSON) <$> formArgumentToJson argument + encodeForm argument = (RawJson <<< encodeStringifyJson) <$> formArgumentToJson argument traverseContractCall :: forall m b a. diff --git a/plutus-playground-client/src/MainFrame/Types.purs b/plutus-playground-client/src/MainFrame/Types.purs index eba80dec52..e883fcca1f 100644 --- a/plutus-playground-client/src/MainFrame/Types.purs +++ b/plutus-playground-client/src/MainFrame/Types.purs @@ -20,6 +20,7 @@ import Chain.Types (Action(..)) import Chain.Types as Chain import Clipboard as Clipboard import Cursor (Cursor) +import Data.Array.NonEmpty (fromNonEmpty) import Data.Either (Either) import Data.Generic.Rep (class Generic) import Data.Maybe (Maybe(..)) @@ -37,7 +38,7 @@ import Playground.Types (CompilationResult, ContractCall, ContractDemo, Evaluati import Plutus.V1.Ledger.Tx (Tx) import Prelude (class Eq, class Show, Unit, show, ($)) import Schema.Types (ActionEvent(..), FormArgument, SimulationAction(..)) -import Servant.PureScript.Ajax (AjaxError) +import Servant.PureScript (AjaxError) import Test.QuickCheck.Arbitrary (class Arbitrary) import Test.QuickCheck.Gen as Gen import ValueEditor (ValueEvent(..)) @@ -75,7 +76,7 @@ derive instance eqView :: Eq View derive instance genericView :: Generic View _ instance arbitraryView :: Arbitrary View where - arbitrary = Gen.elements (Editor :| [ Simulations, Transactions ]) + arbitrary = Gen.elements $ fromNonEmpty (Editor :| [ Simulations, Transactions ]) instance showView :: Show View where show Editor = "Editor" @@ -101,6 +102,7 @@ type WebEvaluationResult type SimulatorAction = ContractCall FormArgument +data Query :: forall k. k -> Type data Query a data HAction @@ -164,7 +166,7 @@ instance actionIsEvent :: IsEvent HAction where toEvent Init = Nothing toEvent Mounted = Just $ defaultEvent "Mounted" toEvent (EditorAction (Editor.HandleDropEvent _)) = Just $ defaultEvent "DropScript" - toEvent (EditorAction action) = Just $ (defaultEvent "ConfigureEditor") + toEvent (EditorAction _) = Just $ (defaultEvent "ConfigureEditor") toEvent CompileProgram = Just $ defaultEvent "CompileProgram" toEvent (HandleBalancesChartMessage _) = Nothing toEvent CheckAuthStatus = Nothing diff --git a/plutus-playground-client/src/MainFrame/View.purs b/plutus-playground-client/src/MainFrame/View.purs index 6c1d294f8d..425d316cb3 100644 --- a/plutus-playground-client/src/MainFrame/View.purs +++ b/plutus-playground-client/src/MainFrame/View.purs @@ -88,7 +88,7 @@ subHeader state@(State { demoFilesMenuVisible, contractDemos, currentDemoName }) [ classes [ navbar, navbarExpand, justifyContentBetween, ClassName "sub-header" ] ] [ a [ classes buttonClasses - , onClick $ const $ Just $ ToggleDemoFilesMenu + , onClick $ const $ ToggleDemoFilesMenu ] [ buttonIcon ] , contractDemosPane demoFilesMenuVisible contractDemos currentDemoName @@ -133,7 +133,7 @@ demoScriptNavItem currentDemoName (ContractDemo { contractDemoName }) = [ class_ navItem ] [ a [ classes navLinkClasses - , onClick $ const $ Just $ LoadScript contractDemoName + , onClick $ const $ LoadScript contractDemoName ] [ text contractDemoName ] ] @@ -155,7 +155,7 @@ editorMain contractDemos currentView editorState compilationResult = [ h1_ [ text "Editor" ] , button [ classes [ btn, ClassName "hidden" ] ] [ nbsp ] ] -- invisible button so the height matches the simulator header - , editorWrapper contractDemos currentView editorState compilationResult + , editorWrapper contractDemos editorState compilationResult ] simulationsMain :: forall m. MonadAff m => State -> ComponentHTML HAction ChildSlots m @@ -181,8 +181,8 @@ mainComponentClasses currentView targetView = else [ containerFluid, hidden, ClassName "main" ] -editorWrapper :: forall m. MonadAff m => Array ContractDemo -> View -> Editor.State -> WebCompilationResult -> ComponentHTML HAction ChildSlots m -editorWrapper contractDemos currentView editorState compilationResult = +editorWrapper :: forall m. MonadAff m => Array ContractDemo -> Editor.State -> WebCompilationResult -> ComponentHTML HAction ChildSlots m +editorWrapper contractDemos editorState compilationResult = div [ classes [ ClassName "main-body", ClassName "editor" ] ] [ div @@ -206,7 +206,7 @@ editorWrapper contractDemos currentView editorState compilationResult = defaultContents = view (_contractDemoEditorContents <<< _SourceCode) <$> lookupContractDemo "Vesting" contractDemos simulationsWrapper :: forall p. State -> HTML p HAction -simulationsWrapper state@(State { actionDrag, currentView, compilationResult, simulations, lastEvaluatedSimulation, evaluationResult }) = +simulationsWrapper state@(State { actionDrag, compilationResult, simulations, lastEvaluatedSimulation, evaluationResult }) = let knownCurrencies = evalState getKnownCurrencies state @@ -233,12 +233,12 @@ transactionsWrapper simulations evaluationResult blockchainVisualisationState = , div [ class_ $ ClassName "simulation" ] case evaluationResult of Success (Right evaluation) -> [ evaluationPane blockchainVisualisationState evaluation ] - Success (Left error) -> + Success (Left _) -> [ text "Your simulation has errors. Click the " , strong_ [ text "Simulations" ] , text " tab above to fix them and recompile." ] - Failure error -> + Failure _ -> [ text "Your simulation has errors. Click the " , strong_ [ text "Simulations" ] , text " tab above to fix them and recompile." diff --git a/plutus-playground-client/src/Playground/Gists.purs b/plutus-playground-client/src/Playground/Gists.purs index e77ba9ea20..97c20029d3 100644 --- a/plutus-playground-client/src/Playground/Gists.purs +++ b/plutus-playground-client/src/Playground/Gists.purs @@ -7,14 +7,14 @@ module Playground.Gists ) where import Cursor (Cursor) +import Data.Argonaut.Extra (encodeStringifyJson) import Data.Array (catMaybes) import Data.Array as Array -import Data.Lens (Traversal', view) +import Data.Lens (Traversal') import Data.Lens.Index (ix) import Data.Maybe (Maybe(..)) import Data.Newtype (unwrap) -import Foreign.Generic (encodeJSON) -import Gist (Gist, GistFile, NewGist(NewGist), NewGistFile(NewGistFile), gistFiles, gistFileContent) +import Gist (Gist, NewGist(NewGist), NewGistFile(NewGistFile), gistFileContent, gistFiles) import Language.Haskell.Interpreter (SourceCode) import Playground.Types (Simulation) import Prelude (($), (<$>), (<<<)) @@ -38,7 +38,7 @@ mkNewGist { source, simulations } = gistFiles = catMaybes [ mkNewGistFile gistSourceFilename <<< unwrap <$> source - , Just (mkNewGistFile gistSimulationFilename $ encodeJSON simulations) + , Just (mkNewGistFile gistSimulationFilename $ encodeStringifyJson simulations) ] mkNewGistFile _newGistFilename _newGistFileContent = diff --git a/plutus-playground-client/src/Simulator/View.purs b/plutus-playground-client/src/Simulator/View.purs index d6558014ac..25815e00a7 100644 --- a/plutus-playground-client/src/Simulator/View.purs +++ b/plutus-playground-client/src/Simulator/View.purs @@ -14,15 +14,14 @@ import Cursor (Cursor, current) import Cursor as Cursor import Data.Array as Array import Data.Either (Either(..)) -import Data.Int as Int import Data.Lens (_Right, view) import Data.Lens.Iso.Newtype (_Newtype) import Data.Maybe (Maybe(..)) import Data.String as String import Halogen (RefLabel(RefLabel)) -import Halogen.HTML (ClassName(ClassName), HTML, IProp, a, button, code_, div, div_, h1_, p_, pre_, span, text, ul, li) -import Halogen.HTML.Events (onClick, onValueInput) -import Halogen.HTML.Properties (class_, classes, disabled, id_, ref) +import Halogen.HTML (ClassName(ClassName), HTML, a, button, code_, div, div_, h1_, li, p_, pre_, span, text, ul) +import Halogen.HTML.Events (onClick) +import Halogen.HTML.Properties (class_, classes, disabled, id, ref) import Icons (Icon(..), icon) import Language.Haskell.Interpreter (CompilationError(..)) import Language.Haskell.Interpreter as PI @@ -31,9 +30,8 @@ import Network.RemoteData (RemoteData(..), _Success) import MainFrame.Lenses (_functionSchema, _result) import MainFrame.Types (HAction(..), View(..), SimulatorAction, WebCompilationResult, WebEvaluationResult) import Playground.Types (PlaygroundError(..), Simulation(..), SimulatorWallet) -import Prelude (const, map, not, pure, show, (#), ($), (/=), (<$>), (<<<), (<>), (==), (>)) +import Prelude (const, not, pure, show, (#), ($), (/=), (<$>), (<<<), (<>), (==), (>)) import Wallet.View (walletsPane) -import Web.Event.Event (Event) simulatorTitle :: forall p. HTML p HAction simulatorTitle = @@ -44,14 +42,14 @@ simulatorTitle = [ h1_ [ text "Simulator" ] , a [ class_ btn - , onClick $ const $ Just $ ChangeView Editor + , onClick $ const $ ChangeView Editor ] [ text "< Return to Editor" ] ] simulationsPane :: forall p. Value -> Maybe Int -> WebCompilationResult -> Cursor Simulation -> Maybe Simulation -> WebEvaluationResult -> HTML p HAction simulationsPane initialValue actionDrag compilationResult simulations lastEvaluatedSimulation evaluationResult = case current simulations of - Just (Simulation simulation@{ simulationWallets, simulationActions }) -> + Just (Simulation { simulationWallets, simulationActions }) -> div [ class_ $ ClassName "simulations" ] [ simulationsNav simulations @@ -98,18 +96,18 @@ simulationsNav simulations = simulationNavItem :: forall p. Boolean -> Int -> Int -> Simulation -> Array (HTML p HAction) simulationNavItem canClose activeIndex index (Simulation { simulationName }) = [ li - [ id_ $ "simulation-nav-item-" <> show index + [ id $ "simulation-nav-item-" <> show index , class_ navItem ] [ a [ classes navLinkClasses - , onClick $ const $ Just $ SetSimulationSlot index + , onClick $ const $ SetSimulationSlot index ] [ text simulationName ] , if canClose then button [ classes [ btn, navItemButtonClass ] - , onClick $ const $ Just $ RemoveSimulationSlot index + , onClick $ const $ RemoveSimulationSlot index ] [ icon Close ] else @@ -122,14 +120,14 @@ simulationNavItem canClose activeIndex index (Simulation { simulationName }) = addSimulationControl :: forall p. HTML p HAction addSimulationControl = li - [ id_ "simulation-nav-item-add" + [ id "simulation-nav-item-add" , class_ navItem ] [ span [ class_ navLink ] [ button [ classes [ btn, navItemButtonClass ] - , onClick $ const $ Just $ AddSimulationSlot + , onClick $ const $ AddSimulationSlot ] [ icon Plus ] ] @@ -140,7 +138,7 @@ evaluateActionsButton simulationWallets simulationActions evaluationResult = button [ classes [ btn, ClassName "btn-green" ] , disabled $ not valid - , onClick $ const $ Just EvaluateActions + , onClick $ const EvaluateActions ] [ btnText evaluationResult valid ] where @@ -157,7 +155,7 @@ viewTransactionsButton simulations lastEvaluatedSimulation evaluationResult = button [ classes [ btn, ClassName "btn-turquoise" ] , disabled isDisabled - , onClick $ const $ Just $ ChangeView Transactions + , onClick $ const $ ChangeView Transactions ] [ text "Transactions" ] where @@ -216,9 +214,6 @@ showCompilationError (RawError error) = code_ [ text error ] showCompilationError (CompilationError { text: errors }) = pre_ [ text (String.joinWith "\n" errors) ] -onIntInput :: forall i r. (Int -> i) -> IProp ( onInput :: Event, value :: String | r ) i -onIntInput f = onValueInput $ map f <<< Int.fromString - ------------------------------------------------------------ simulatorTitleRefLabel :: RefLabel simulatorTitleRefLabel = RefLabel "simulations" diff --git a/plutus-playground-client/src/StaticData.purs b/plutus-playground-client/src/StaticData.purs index adc58df80c..2785f29342 100644 --- a/plutus-playground-client/src/StaticData.purs +++ b/plutus-playground-client/src/StaticData.purs @@ -5,29 +5,28 @@ module StaticData , keybindingsLocalStorageKey ) where -import Data.Array as Array +import Prologue +import Data.Argonaut.Decode (JsonDecodeError) +import Data.Argonaut.Extra (parseDecodeJson) +import Data.Foldable as Foldable import Data.Lens (Lens', view) import Data.Lens.Iso.Newtype (_Newtype) import Data.Lens.Record (prop) -import Data.Maybe (Maybe) -import Data.Symbol (SProxy(..)) +import Type.Proxy (Proxy(..)) import Data.Traversable (class Foldable) -import Foreign (F) -import Foreign.Generic (decodeJSON) import LocalStorage (Key(..)) import Playground.Types (ContractDemo) import Playground.Usecases (contractDemos) -import Prelude ((<<<), (==)) -mkContractDemos :: F (Array ContractDemo) +mkContractDemos :: Either JsonDecodeError (Array ContractDemo) mkContractDemos = do - decodeJSON contractDemos + parseDecodeJson contractDemos lookupContractDemo :: forall f. Foldable f => String -> f ContractDemo -> Maybe ContractDemo -lookupContractDemo key = Array.find (\demo -> view _contractDemoName demo == key) +lookupContractDemo key = Foldable.find (\demo -> view _contractDemoName demo == key) _contractDemoName :: Lens' ContractDemo String -_contractDemoName = _Newtype <<< prop (SProxy :: SProxy "contractDemoName") +_contractDemoName = _Newtype <<< prop (Proxy :: _ "contractDemoName") bufferLocalStorageKey :: Key bufferLocalStorageKey = Key "PlutusPlaygroundBuffer" diff --git a/plutus-playground-client/src/Transaction/View.purs b/plutus-playground-client/src/Transaction/View.purs index 42807b49ed..972c4be40a 100644 --- a/plutus-playground-client/src/Transaction/View.purs +++ b/plutus-playground-client/src/Transaction/View.purs @@ -10,12 +10,12 @@ import Chartist (ChartistData, ChartistItem, ChartistOptions, ChartistPoint, toC import Chartist as Chartist import Data.Array as Array import Data.Array.Extra (collapse) -import Data.BigInteger (BigInteger) -import Data.BigInteger as BigInteger +import Data.BigInt.Argonaut (BigInt) +import Data.BigInt.Argonaut as BigInt import Data.Lens (_2, preview, to, toListOf, traversed, view) import Data.Lens.Index (ix) import Data.List (List) -import Data.Maybe (Maybe(..), fromMaybe) +import Data.Maybe (Maybe, fromMaybe) import Data.Newtype (wrap) import Data.Semiring (zero) import Data.Set (Set) @@ -48,7 +48,7 @@ import Wallet.Emulator.Wallet (Wallet(..), WalletEvent(..)) import Wallet.Lenses (_simulatorWalletBalance, _simulatorWalletWallet, _walletId) evaluationPane :: forall m. MonadAff m => State -> EvaluationResult -> ComponentHTML HAction ChildSlots m -evaluationPane state evaluationResult@(EvaluationResult { emulatorLog, emulatorTrace, fundsDistribution, resultRollup, walletKeys }) = +evaluationPane state (EvaluationResult { emulatorLog, emulatorTrace, fundsDistribution, resultRollup, walletKeys }) = div [ class_ $ ClassName "transactions" ] [ div @@ -56,7 +56,7 @@ evaluationPane state evaluationResult@(EvaluationResult { emulatorLog, emulatorT [ h2_ [ text "Transactions" ] , button [ classes [ btn ] - , onClick $ const $ Just $ ChangeView Simulations + , onClick $ const $ ChangeView Simulations ] [ icon Close ] ] @@ -69,7 +69,7 @@ evaluationPane state evaluationResult@(EvaluationResult { emulatorLog, emulatorT unit (chartist balancesChartOptions) (balancesToChartistData fundsDistribution) - (Just <<< HandleBalancesChartMessage) + HandleBalancesChartMessage ] , div [ class_ $ ClassName "logs" ] @@ -85,7 +85,7 @@ evaluationPane state evaluationResult@(EvaluationResult { emulatorLog, emulatorT ] ] where - namingFn pubKeyHash = preview (ix pubKeyHash <<< _walletId <<< to (\n -> "Wallet " <> show n)) (AssocMap.Map walletKeys) + namingFn pubKeyHash = preview (ix pubKeyHash <<< _walletId <<< to (\n -> "Wallet " <> BigInt.toString n)) (AssocMap.Map walletKeys) eveEvent :: forall a. MultiAgent.EmulatorTimeEvent a -> a eveEvent (MultiAgent.EmulatorTimeEvent { _eteEvent }) = _eteEvent @@ -152,7 +152,7 @@ emulatorEventPane (ChainEvent (TxnValidationFail _ (TxId txId) _ error _)) = emulatorEventPane (ChainEvent (SlotAdd (Slot slot))) = div [ class_ $ ClassName "info" ] - [ text $ "Add slot " <> show slot.getSlot ] + [ text $ "Add slot " <> BigInt.toString slot.getSlot ] -- TODO: convert Wallet back to WalletNumber? emulatorEventPane (WalletEvent (Wallet walletId) (GenericLog logMessageText)) = @@ -175,9 +175,9 @@ emulatorEventPane _ = div [] [] ------------------------------------------------------------ formatWalletId :: SimulatorWallet -> String -formatWalletId wallet = "Wallet " <> show (view (_simulatorWalletWallet <<< _walletId) wallet) +formatWalletId wallet = "Wallet " <> BigInt.toString (view (_simulatorWalletWallet <<< _walletId) wallet) -extractAmount :: Tuple CurrencySymbol TokenName -> SimulatorWallet -> Maybe BigInteger +extractAmount :: Tuple CurrencySymbol TokenName -> SimulatorWallet -> Maybe BigInt extractAmount (Tuple currencySymbol tokenName) = preview ( _simulatorWalletBalance @@ -198,10 +198,10 @@ balancesToChartistData wallets = toChartistData $ toChartistItem <$> wallets toChartistPoint :: SimulatorWallet -> Tuple CurrencySymbol TokenName -> ChartistPoint toChartistPoint wallet key = { meta: view (_2 <<< _tokenName) key - , value: BigInteger.toNumber $ fromMaybe zero $ extractAmount key wallet + , value: BigInt.toNumber $ fromMaybe zero $ extractAmount key wallet } - allValues :: List (AssocMap.Map CurrencySymbol (AssocMap.Map TokenName BigInteger)) + allValues :: List (AssocMap.Map CurrencySymbol (AssocMap.Map TokenName BigInt)) allValues = toListOf ( traversed diff --git a/plutus-playground-client/src/Wallet/Lenses.purs b/plutus-playground-client/src/Wallet/Lenses.purs index 6d79307148..e92d3a7d22 100644 --- a/plutus-playground-client/src/Wallet/Lenses.purs +++ b/plutus-playground-client/src/Wallet/Lenses.purs @@ -5,10 +5,10 @@ module Wallet.Lenses , _pubKey ) where -import Data.BigInteger (BigInteger) +import Data.BigInt.Argonaut (BigInt) import Data.Lens (Iso', Lens', iso) import Data.Lens.Record (prop) -import Data.Symbol (SProxy(..)) +import Type.Proxy (Proxy(..)) import Playground.Types (SimulatorWallet, _SimulatorWallet) import Plutus.V1.Ledger.Crypto (PubKey, _PubKey) import Plutus.V1.Ledger.Value (Value) @@ -16,13 +16,13 @@ import Prelude ((<<<)) import Ledger.CardanoWallet (WalletNumber, _WalletNumber) _simulatorWalletWallet :: Lens' SimulatorWallet WalletNumber -_simulatorWalletWallet = _SimulatorWallet <<< prop (SProxy :: SProxy "simulatorWalletWallet") +_simulatorWalletWallet = _SimulatorWallet <<< prop (Proxy :: _ "simulatorWalletWallet") _simulatorWalletBalance :: Lens' SimulatorWallet Value -_simulatorWalletBalance = _SimulatorWallet <<< prop (SProxy :: SProxy "simulatorWalletBalance") +_simulatorWalletBalance = _SimulatorWallet <<< prop (Proxy :: _ "simulatorWalletBalance") -_walletId :: Iso' WalletNumber BigInteger +_walletId :: Iso' WalletNumber BigInt _walletId = _WalletNumber <<< iso _.getWallet { getWallet: _ } _pubKey :: Lens' PubKey String -_pubKey = _PubKey <<< prop (SProxy :: SProxy "getPubKey") +_pubKey = _PubKey <<< prop (Proxy :: _ "getPubKey") diff --git a/plutus-playground-client/src/Wallet/View.purs b/plutus-playground-client/src/Wallet/View.purs index 6d4f3af476..ee75c37813 100644 --- a/plutus-playground-client/src/Wallet/View.purs +++ b/plutus-playground-client/src/Wallet/View.purs @@ -6,14 +6,15 @@ module Wallet.View import Bootstrap (btn, btnSecondary, btnSmall, card, cardBody_, cardTitle_, floatRight) import Data.Array (mapWithIndex) import Data.Array as Array +import Data.BigInt.Argonaut as BigInt import Data.Lens (view) -import Data.Maybe (Maybe(..)) import Data.Tuple (Tuple(..)) import Halogen.HTML (ClassName(ClassName), HTML, br_, button, div, div_, h2_, h3_, h4_, p_, span, text) import Halogen.HTML.Elements.Keyed as Keyed import Halogen.HTML.Events (onClick) import Halogen.HTML.Properties (class_, classes) import Icons (Icon(..), icon) +import Ledger.CardanoWallet (WalletNumber(..)) import MainFrame.Types (HAction(..), WalletEvent(..)) import Playground.Lenses (_endpointDescription, _getEndpointDescription) import Playground.Types (ContractCall(..), FunctionSchema, SimulatorWallet(..), _FunctionSchema) @@ -22,7 +23,6 @@ import Prelude (const, show, ($), (<), (<>), (<$>), (<<<)) import Schema (FormSchema) import Schema.Types (ActionEvent(..), SimulationAction(..), Signatures, toArgument) import ValueEditor (valueForm) -import Ledger.CardanoWallet (WalletNumber(..)) import Wallet.Lenses (_simulatorWalletWallet) walletsPane :: forall p. Signatures -> Value -> Array SimulatorWallet -> HTML p HAction @@ -50,7 +50,7 @@ walletPane signatures initialValue walletIndex simulatorWallet@(SimulatorWallet [ cardBody_ [ button [ classes [ btn, floatRight, ClassName "close-button" ] - , onClick $ const $ Just $ ModifyWallets $ RemoveWallet walletIndex + , onClick $ const $ ModifyWallets $ RemoveWallet walletIndex ] [ icon Close ] , cardTitle_ [ h3_ [ walletIdPane simulatorWalletWallet ] ] @@ -68,16 +68,16 @@ walletPane signatures initialValue walletIndex simulatorWallet@(SimulatorWallet -- this function is exported so that action panes can show their associated wallet walletIdPane :: forall p i. WalletNumber -> HTML p i -walletIdPane wallet@(WalletNumber { getWallet }) = +walletIdPane (WalletNumber { getWallet }) = span [ class_ $ ClassName "wallet-id" ] - [ text $ "Wallet " <> show getWallet ] + [ text $ "Wallet " <> BigInt.toString getWallet ] addWalletPane :: forall p. Tuple String (HTML p HAction) addWalletPane = Tuple "add-wallet" $ div [ classes [ card, walletClass, ClassName "add-wallet" ] - , onClick $ const $ Just $ ModifyWallets AddWallet + , onClick $ const $ ModifyWallets AddWallet ] [ cardBody_ [ icon Plus @@ -89,7 +89,7 @@ actionButton :: forall p. Value -> SimulatorWallet -> FunctionSchema FormSchema actionButton initialValue simulatorWallet functionSchema = button [ classes [ btn, btnSecondary, btnSmall, actionButtonClass ] - , onClick $ const $ Just $ ModifyActions $ AddAction + , onClick $ const $ ModifyActions $ AddAction $ CallEndpoint { argumentValues: toArgument initialValue <$> functionSchema , caller: view _simulatorWalletWallet simulatorWallet @@ -107,7 +107,7 @@ addPayToWalletButton :: forall p. Value -> SimulatorWallet -> HTML p SimulationA addPayToWalletButton initialValue simulatorWallet = button [ classes [ btn, btnSecondary, btnSmall, actionButtonClass ] - , onClick $ const $ Just $ ModifyActions $ AddAction + , onClick $ const $ ModifyActions $ AddAction $ PayToWallet { sender: view _simulatorWalletWallet simulatorWallet , recipient: view _simulatorWalletWallet simulatorWallet diff --git a/web-common/static/bootstrap.scss b/plutus-playground-client/static/bootstrap.scss similarity index 100% rename from web-common/static/bootstrap.scss rename to plutus-playground-client/static/bootstrap.scss diff --git a/web-common/static/chain.scss b/plutus-playground-client/static/chain.scss similarity index 100% rename from web-common/static/chain.scss rename to plutus-playground-client/static/chain.scss diff --git a/web-common/static/chartist.scss b/plutus-playground-client/static/chartist.scss similarity index 100% rename from web-common/static/chartist.scss rename to plutus-playground-client/static/chartist.scss diff --git a/plutus-playground-client/static/main.scss b/plutus-playground-client/static/main.scss index 71e2ada7ae..1126c49ae7 100644 --- a/plutus-playground-client/static/main.scss +++ b/plutus-playground-client/static/main.scss @@ -1,7 +1,7 @@ @import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700'); @import 'variables.scss'; -@import '../web-common/static/bootstrap.scss'; +@import './bootstrap.scss'; @import 'layout.scss'; @import 'subheader.scss'; diff --git a/plutus-playground-client/static/transactions.scss b/plutus-playground-client/static/transactions.scss index 283e099dc9..ec004fc0aa 100644 --- a/plutus-playground-client/static/transactions.scss +++ b/plutus-playground-client/static/transactions.scss @@ -4,8 +4,8 @@ $chart-tooltip: $gray-900; $chart-title: $gray-900; $chart-label: $gray-900; $chart-grid-stroke: $gray-500; -@import '../web-common/static/chartist.scss'; -@import '../web-common/static/chain.scss'; +@import './chartist.scss'; +@import './chain.scss'; .transactions { border: 1px solid $gray-border-color; diff --git a/plutus-playground-client/test/ChainTests.purs b/plutus-playground-client/test/ChainTests.purs index acb6f6856e..5dbe0cacba 100644 --- a/plutus-playground-client/test/ChainTests.purs +++ b/plutus-playground-client/test/ChainTests.purs @@ -2,61 +2,60 @@ module ChainTests ( all ) where -import Prelude +import Prologue import Data.Array (mapWithIndex) -import Data.BigInteger as BigInteger -import Data.Maybe (Maybe(..)) +import Data.BigInt.Argonaut as BigInt import Data.Tuple.Nested ((/\)) -import PlutusTx.AssocMap as AssocMap -import Plutus.V1.Ledger.Value (CurrencySymbol(..), TokenName(..), Value(..)) +import Ledger.CardanoWallet (WalletNumber(..)) import Playground.Types (SimulatorWallet(..)) -import Test.Unit (TestSuite, suite, test) -import Test.Unit.Assert (equal) +import Plutus.V1.Ledger.Value (CurrencySymbol(..), TokenName(..), Value(..)) +import PlutusTx.AssocMap as AssocMap +import Test.Spec (Spec, describe, it) +import Test.Spec.Assertions (shouldEqual) import Transaction.View (extractAmount) -import Ledger.CardanoWallet (WalletNumber(..)) -all :: TestSuite +all :: Spec Unit all = - suite "Chain" do + describe "Chain" do extractAmountsTests -extractAmountsTests :: TestSuite +extractAmountsTests :: Spec Unit extractAmountsTests = - suite "extractAmount" do - test "All present" - $ equal - [ Just (BigInteger.fromInt 10) - , Just (BigInteger.fromInt 40) - , Just (BigInteger.fromInt 70) + describe "extractAmount" do + it "All present" + $ map (extractAmount (currencies /\ usdToken)) wallets + `shouldEqual` + [ Just (BigInt.fromInt 10) + , Just (BigInt.fromInt 40) + , Just (BigInt.fromInt 70) + ] + it "All missing" + $ map (extractAmount (currencies /\ adaToken)) wallets + `shouldEqual` + [ Nothing + , Nothing + , Nothing + ] + it "Mixed" do + map (extractAmount (currencies /\ eurToken)) wallets + `shouldEqual` + [ Just (BigInt.fromInt 20) + , Just (BigInt.fromInt 50) + , Nothing ] - (map (extractAmount (currencies /\ usdToken)) wallets) - test "All missing" - $ equal + map (extractAmount (ada /\ adaToken)) wallets + `shouldEqual` [ Nothing - , Nothing - , Nothing + , Just (BigInt.fromInt 30) + , Just (BigInt.fromInt 60) ] - (map (extractAmount (currencies /\ adaToken)) wallets) - test "Mixed" do - equal - [ Just (BigInteger.fromInt 20) - , Just (BigInteger.fromInt 50) - , Nothing - ] - (map (extractAmount (currencies /\ eurToken)) wallets) - equal - [ Nothing - , Just (BigInteger.fromInt 30) - , Just (BigInteger.fromInt 60) - ] - (map (extractAmount (ada /\ adaToken)) wallets) wallets :: Array SimulatorWallet wallets = mapWithIndex ( \id value -> SimulatorWallet - { simulatorWalletWallet: WalletNumber { getWallet: BigInteger.fromInt id } + { simulatorWalletWallet: WalletNumber { getWallet: BigInt.fromInt id } , simulatorWalletBalance: value } ) @@ -66,32 +65,32 @@ values :: Array Value values = [ Value { getValue: - AssocMap.fromTuples + AssocMap.Map [ currencies - /\ AssocMap.fromTuples - [ usdToken /\ BigInteger.fromInt 10 - , eurToken /\ BigInteger.fromInt 20 + /\ AssocMap.Map + [ usdToken /\ BigInt.fromInt 10 + , eurToken /\ BigInt.fromInt 20 ] ] } , Value { getValue: - AssocMap.fromTuples - [ ada /\ AssocMap.fromTuples [ adaToken /\ BigInteger.fromInt 30 ] + AssocMap.Map + [ ada /\ AssocMap.Map [ adaToken /\ BigInt.fromInt 30 ] , currencies - /\ AssocMap.fromTuples - [ usdToken /\ BigInteger.fromInt 40 - , eurToken /\ BigInteger.fromInt 50 + /\ AssocMap.Map + [ usdToken /\ BigInt.fromInt 40 + , eurToken /\ BigInt.fromInt 50 ] ] } , Value { getValue: - AssocMap.fromTuples - [ ada /\ AssocMap.fromTuples [ adaToken /\ BigInteger.fromInt 60 ] + AssocMap.Map + [ ada /\ AssocMap.Map [ adaToken /\ BigInt.fromInt 60 ] , currencies - /\ AssocMap.fromTuples - [ usdToken /\ BigInteger.fromInt 70 + /\ AssocMap.Map + [ usdToken /\ BigInt.fromInt 70 ] ] } diff --git a/plutus-playground-client/test/CursorTests.purs b/plutus-playground-client/test/CursorTests.purs deleted file mode 100644 index d7624d5a6c..0000000000 --- a/plutus-playground-client/test/CursorTests.purs +++ /dev/null @@ -1,170 +0,0 @@ -module CursorTests - ( all - ) where - -import Prelude -import Cursor (Cursor) -import Cursor as Cursor -import Data.Array as Array -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Lens (over, preview) -import Data.Lens.Index (ix) -import Data.Maybe (Maybe(..), fromMaybe, isJust) -import Data.NonEmpty (NonEmpty(NonEmpty)) -import Data.String.Extra (unlines) -import Data.Tuple (Tuple(..)) -import Test.QuickCheck (class Arbitrary, arbitrary, withHelp, (), (===)) -import Test.QuickCheck.Gen (Gen, arrayOf, elements) -import Test.Unit (TestSuite, suite, test) -import Test.Unit.Assert (equal) -import Test.Unit.QuickCheck (quickCheck) -import TestUtils (genIndex, genLooseIndex) - -data Operation - = Set Int - | Left - | Right - | First - | Last - -derive instance genericOperation :: Generic Operation _ - -instance showOperation :: Show Operation where - show = genericShow - -applyOperation :: forall a. Operation -> Cursor a -> Cursor a -applyOperation (Set index) = Cursor.setIndex index - -applyOperation Left = Cursor.left - -applyOperation Right = Cursor.right - -applyOperation First = Cursor.first - -applyOperation Last = Cursor.last - -genOperation :: forall a. Cursor a -> Gen Operation -genOperation cursor = do - index <- genLooseIndex cursor - elements (NonEmpty (Set index) [ Left, Right ]) - -data Scenario a - = Scenario (Cursor a) (Array Operation) - -genScenario :: forall a. Arbitrary a => Gen (Scenario a) -genScenario = do - cursor <- Cursor.fromArray <$> arrayOf arbitrary - operations <- arrayOf $ genOperation cursor - pure $ Scenario cursor operations - ------------------------------------------------------------- -all :: TestSuite -all = - suite "Cursor" do - operationsTests - lensTests - snocTests - mapWithIndexTests - deleteAtTests - -operationsTests :: TestSuite -operationsTests = - test "Operations are safe." do - quickCheck do - Scenario cursor operations <- genScenario :: Gen (Scenario String) - let - finalCursor = Array.foldr applyOperation cursor operations - pure - $ withHelp - (isJust (Cursor.current finalCursor) || (Cursor.null finalCursor)) - ("Invalid state with cursor: " <> show cursor <> " and operations: " <> show operations) - -lensTests :: TestSuite -lensTests = - test "Lens indexing works." do - quickCheck do - cursor <- arbitrary :: Gen (Cursor String) - let - fromGetter = Cursor.current cursor - - fromLens = preview (Cursor._current) cursor - pure $ fromGetter == fromLens - unlines - [ "Invalid lookup from cursor: " <> show cursor - , "Current returns: " <> show fromGetter - , "Lens returns: " <> show fromLens - ] - equal - (Cursor.fromArray [ 1, 4, 3 ]) - (over (ix 1) ((*) 2) (Cursor.fromArray [ 1, 2, 3 ])) - -snocTests :: TestSuite -snocTests = - test "snoc appends a new value to the end of the cursor." do - quickCheck do - x <- arbitrary :: Gen String - cursor <- arbitrary - pure $ Just x === Cursor.current (Cursor.snoc cursor x) - -mapWithIndexTests :: TestSuite -mapWithIndexTests = - test "mapWithIndex works" do - equal - (Cursor.fromArray [ 1 + 0, 3 + 1, 5 + 2, 7 + 3, 11 + 4 ]) - (Cursor.mapWithIndex (+) (Cursor.fromArray [ 1, 3, 5, 7, 11 ])) - quickCheck \cursor -> - Cursor.toArray (Cursor.mapWithIndex (+) cursor) - === Array.mapWithIndex (+) (Cursor.toArray cursor) - -deleteAtTests :: TestSuite -deleteAtTests = - suite "deleteAt" do - test "deleteAt amends the contents correctly." do - quickCheck do - cursor <- arbitrary :: Gen (Cursor String) - index <- genIndex cursor - let - deleted = Cursor.deleteAt index cursor - pure - $ Cursor.toArray (Cursor.deleteAt index cursor) - === fromMaybe - (Cursor.toArray cursor) - (Array.deleteAt index (Cursor.toArray cursor)) - test "deleteAt preserves the cursor position." do - quickCheck do - cursor <- arbitrary :: Gen (Cursor Int) - index <- genIndex cursor - let - deleted = Cursor.deleteAt index cursor - pure - $ if Cursor.length cursor < 2 then - Cursor.current deleted == Nothing - "A cursor will be empty if we delete its only element: " - <> show (Tuple index cursor) - else - if Cursor.getIndex cursor == index then - if Cursor.getIndex cursor == Cursor.length cursor - 1 then - Cursor.current (Cursor.left cursor) == Cursor.current deleted - unlines - [ "Deleting an element at the cursor's position should shift left:" - , "Index: " <> show index - , "Cursor: " <> show cursor - , "Deleted: " <> show deleted - , "Cursor current: " <> show (Cursor.current (Cursor.left cursor)) - , "Deleted current: " <> show (Cursor.current deleted) - ] - else - Cursor.current (Cursor.right cursor) == Cursor.current deleted - unlines - [ "Deleting an element at the cursor's position should shift right:" - , "Index: " <> show index - , "Cursor: " <> show cursor - , "Deleted: " <> show deleted - , "Cursor current: " <> show (Cursor.current (Cursor.right cursor)) - , "Deleted current: " <> show (Cursor.current deleted) - ] - else - Cursor.current cursor == Cursor.current deleted - "Deleting an element that isn't at the cursor's position should not affect the current target: " - <> show (Tuple index cursor) diff --git a/plutus-playground-client/test/Data/Array/ExtraTests.purs b/plutus-playground-client/test/Data/Array/ExtraTests.purs deleted file mode 100644 index d4c2178fc1..0000000000 --- a/plutus-playground-client/test/Data/Array/ExtraTests.purs +++ /dev/null @@ -1,75 +0,0 @@ -module Data.Array.ExtraTests - ( all - ) where - -import Prelude -import Data.Array (length) -import Data.Array.Extra (collapse, move) -import Data.Map (Map) -import Data.Map as Map -import Data.Tuple.Nested ((/\)) -import Test.QuickCheck (arbitrary, (===)) -import Test.QuickCheck.Gen (Gen) -import Test.Unit (TestSuite, suite, test) -import Test.Unit.Assert (equal) -import Test.Unit.QuickCheck (quickCheck) -import TestUtils (genIndex, genLooseIndex) - -all :: TestSuite -all = - suite "Data.Array.Extra" do - moveTests - collapseTests - -moveTests :: TestSuite -moveTests = do - suite "move" do - test "length is always preserved" do - quickCheck do - xs <- arbitrary :: Gen (Array String) - source <- genLooseIndex xs - destination <- genLooseIndex xs - pure $ length xs === length (move source destination xs) - test "identity move" do - quickCheck do - before <- arbitrary :: Gen (Array String) - source <- genIndex before - let - after = move source source before - pure $ before === after - test "Concrete example - source to left of destination" do - equal - [ 1, 0, 2, 3, 4 ] - (move 0 1 [ 0, 1, 2, 3, 4 ]) - test "Concrete example - source to right of destination" do - equal - [ 1, 0, 2, 3, 4 ] - (move 1 0 [ 0, 1, 2, 3, 4 ]) - test "Concrete example - source less than destination" do - equal - [ 0, 2, 3, 1, 4 ] - (move 1 3 [ 0, 1, 2, 3, 4 ]) - test "Concrete example - source more than destination" do - equal - [ 0, 3, 1, 2, 4 ] - (move 3 1 [ 0, 1, 2, 3, 4 ]) - -collapseTests :: TestSuite -collapseTests = do - suite "collapse" do - test "Empty." do - equal - (collapse ([] :: Array (Map Boolean String))) - [] - test "Concrete example." do - equal - ( collapse - [ Map.fromFoldable [ "Foo" /\ true, "Bar" /\ false ] - , Map.fromFoldable [ "Quux" /\ true, "Loop" /\ true ] - ] - ) - [ 0 /\ "Bar" /\ false - , 0 /\ "Foo" /\ true - , 1 /\ "Loop" /\ true - , 1 /\ "Quux" /\ true - ] diff --git a/plutus-playground-client/test/Data/Foldable/ExtraTests.purs b/plutus-playground-client/test/Data/Foldable/ExtraTests.purs deleted file mode 100644 index 767b4bba7e..0000000000 --- a/plutus-playground-client/test/Data/Foldable/ExtraTests.purs +++ /dev/null @@ -1,112 +0,0 @@ -module Data.Foldable.ExtraTests - ( all - ) where - -import Prelude -import Data.Array (replicate, length) -import Data.Foldable (foldMap, null) -import Data.Foldable.Extra (interleave, countConsecutive) -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.List as List -import Data.NonEmpty ((:|)) -import Data.Tuple (uncurry) -import Data.Tuple.Nested (type (/\), (/\)) -import Test.QuickCheck (class Arbitrary, arbitrary, (<=?), (===)) -import Test.QuickCheck.Gen (Gen, frequency, suchThat) -import Test.Unit (TestSuite, suite, test) -import Test.Unit.Assert (equal) -import Test.Unit.QuickCheck (quickCheck) - -all :: TestSuite -all = - suite "Data.Foldable.Extra" do - interleaveTests - countConsecutiveTests - -interleaveTests :: TestSuite -interleaveTests = do - suite "interleave" do - test "Empty arrays are unchanged" do - quickCheck do - sep <- arbitrary :: Gen String - pure $ interleave sep [] === [] - test "Singleton arrays are unchanged" do - quickCheck do - sep <- arbitrary :: Gen String - x <- arbitrary - pure $ interleave sep [ x ] === [ x ] - test "Non-empty arrays increase their length by (2n - 1)" do - quickCheck do - sep <- arbitrary :: Gen String - xs :: Array String <- arbitrary `suchThat` (not <<< null) - pure $ length (interleave sep xs) === (2 * length xs) - 1 - test "Simple concrete example" do - equal - [ 1, 0, 2, 0, 3 ] - (interleave 0 [ 1, 2, 3 ]) - -data Msg - = Startup - | Heartbeat - | Healthy Boolean - | Shutdown - -derive instance eqMsg :: Eq Msg - -derive instance genericMsg :: Generic Msg _ - -instance showMsg :: Show Msg where - show = genericShow - -instance arbitraryMsg :: Arbitrary Msg where - arbitrary = - frequency - $ (20.0 /\ pure Heartbeat) - :| List.fromFoldable - [ 1.0 /\ pure Startup - , 3.0 /\ pure (Healthy true) - , 2.0 /\ pure (Healthy false) - , 1.0 /\ pure Shutdown - ] - -countConsecutiveTests :: TestSuite -countConsecutiveTests = do - suite "countConsecutive" do - test "Empty." do - equal - (countConsecutive []) - ([] :: Array (Int /\ String)) - test "The resulting sequence is never larger." do - quickCheck \msgs -> - length (countConsecutive msgs) <=? length (msgs :: Array Msg) - test "We can reconstruct the original sequence by replicating each message the given number of times.." do - quickCheck \msgs -> - let - counted :: Array (Int /\ Msg) - counted = countConsecutive msgs - in - msgs === foldMap (uncurry replicate) counted - test "Concrete example." do - equal - ( countConsecutive - [ Startup - , Heartbeat - , Heartbeat - , Heartbeat - , Heartbeat - , Heartbeat - , Healthy true - , Healthy true - , Heartbeat - , Heartbeat - , Heartbeat - , Shutdown - ] - ) - [ 1 /\ Startup - , 5 /\ Heartbeat - , 2 /\ Healthy true - , 3 /\ Heartbeat - , 1 /\ Shutdown - ] diff --git a/plutus-playground-client/test/Data/String/ExtraTests.purs b/plutus-playground-client/test/Data/String/ExtraTests.purs deleted file mode 100644 index 7496d85aa4..0000000000 --- a/plutus-playground-client/test/Data/String/ExtraTests.purs +++ /dev/null @@ -1,62 +0,0 @@ -module Data.String.ExtraTests - ( all - ) where - -import Prelude -import Data.String as String -import Data.String.Extra (abbreviate, leftPadTo, repeat, toHex) -import Test.QuickCheck (arbitrary, (<=?), (===)) -import Test.QuickCheck.Gen (Gen, chooseInt) -import Test.Unit (TestSuite, suite, test) -import Test.Unit.Assert (equal) -import Test.Unit.QuickCheck (quickCheck) - -all :: TestSuite -all = - suite "Data.String.Extra" do - abbreviateTests - toHexTests - leftPadToTests - repeatTests - -abbreviateTests :: TestSuite -abbreviateTests = do - suite "abbreviate" do - test "Always limits the string length" do - quickCheck \str -> String.length (abbreviate 7 str) <=? 10 - test "Never affects the start of the string" do - quickCheck \str -> - String.take 5 str - === String.take 5 (abbreviate 10 str) - test "Repeated application gives the same result" do - quickCheck - $ do - str <- arbitrary :: Gen String - n <- chooseInt 0 (String.length str * 2) - pure $ abbreviate n (abbreviate n str) === abbreviate n str - -toHexTests :: TestSuite -toHexTests = do - suite "toHex" do - test "A few examples" do - equal "41" (toHex "A") - equal "546573746572" (toHex "Tester") - -leftPadToTests :: TestSuite -leftPadToTests = do - suite "leftPadTo" do - test "0 is identity" do - quickCheck \prefix str -> str === leftPadTo 0 prefix str - test "A few examples" do - equal "0f" (leftPadTo 2 "0" "f") - equal " f" (leftPadTo 3 " " "f") - equal "f" (leftPadTo 1 "0" "f") - -repeatTests :: TestSuite -repeatTests = do - suite "repeat" do - test "0 is empty" do - quickCheck \str -> repeat 0 str === "" - test "A few examples" do - equal "abcabcabc" (repeat 3 "abc") - equal "TestTest" (repeat 2 "Test") diff --git a/plutus-playground-client/test/EditorTests.purs b/plutus-playground-client/test/EditorTests.purs index 4ef21c8bf7..f865423918 100644 --- a/plutus-playground-client/test/EditorTests.purs +++ b/plutus-playground-client/test/EditorTests.purs @@ -2,18 +2,19 @@ module EditorTests ( all ) where -import Data.Traversable (traverse_) +import Prologue +import Data.Traversable (for_) import Editor.Types (allKeyBindings, readKeyBindings) -import Prelude -import Test.Unit (TestSuite, suite, test) -import Test.Unit.Assert (equal) +import Test.Spec (Spec, describe, it) +import Test.Spec.Assertions (shouldEqual) -all :: TestSuite +all :: Spec Unit all = - suite "Editor" do + describe "Editor" do readShowKeyBindingsTests -readShowKeyBindingsTests :: TestSuite +readShowKeyBindingsTests :: Spec Unit readShowKeyBindingsTests = - test "readShowKeyBindingsTests" do - traverse_ (\keyBindings -> equal keyBindings (readKeyBindings (show keyBindings))) allKeyBindings + it "readShowKeyBindingsTests" do + for_ allKeyBindings \keyBindings -> + readKeyBindings (show keyBindings) `shouldEqual` keyBindings diff --git a/plutus-playground-client/test/GistsTests.purs b/plutus-playground-client/test/GistsTests.purs index 69bb51eba2..0befbd0c8f 100644 --- a/plutus-playground-client/test/GistsTests.purs +++ b/plutus-playground-client/test/GistsTests.purs @@ -2,29 +2,39 @@ module GistsTests ( all ) where -import Prelude -import Data.Either (Either(..)) -import Data.Generic.Rep.Show (genericShow) +import Prologue import Gist (GistId(..)) import Gists.Types (parseGistUrl) -import Test.Unit (TestSuite, Test, suite, test) -import TestUtils (equalWithBiformatter) +import Test.Spec (Spec, describe, it) +import Test.Spec.Assertions (shouldEqual) -all :: TestSuite +all :: Spec Unit all = - suite "Gists" do + describe "Gists" do parseGistUrlTests -parseGistUrlTests :: TestSuite +parseGistUrlTests :: Spec Unit parseGistUrlTests = - suite "parseGistUrlTests" do + describe "parseGistUrlTests" do let gistId = GistId "9d8feacacd8c4b553f870c4448483938" - test "Ref" $ equalGistResult (Right gistId) (parseGistUrl "9d8feacacd8c4b553f870c4448483938") - test "Direct link" $ equalGistResult (Right gistId) (parseGistUrl "https://gist.github.com/9d8feacacd8c4b553f870c4448483938") - test "User link" $ equalGistResult (Right gistId) (parseGistUrl "https://gist.github.com/krisajenkins/9d8feacacd8c4b553f870c4448483938") - test "No ID" $ equalGistResult (Left "Could not parse Gist Url") (parseGistUrl "https://gist.github.com/") - test "Too long" $ equalGistResult (Left "Could not parse Gist Url") (parseGistUrl "aaaabbbbccccddddeeeeffff000011112") - -equalGistResult :: Either String GistId -> Either String GistId -> Test -equalGistResult = equalWithBiformatter identity genericShow + it "Ref" do + parseGistUrl "9d8feacacd8c4b553f870c4448483938" + `shouldEqual` + Right gistId + it "Direct link" do + parseGistUrl "https://gist.github.com/9d8feacacd8c4b553f870c4448483938" + `shouldEqual` + Right gistId + it "User link" do + parseGistUrl "https://gist.github.com/krisajenkins/9d8feacacd8c4b553f870c4448483938" + `shouldEqual` + Right gistId + it "No ID" do + parseGistUrl "https://gist.github.com/" + `shouldEqual` + Left "Could not parse Gist Url" + it "Too long" do + parseGistUrl "aaaabbbbccccddddeeeeffff000011112" + `shouldEqual` + Left "Could not parse Gist Url" diff --git a/plutus-playground-client/test/JsonEncodingTests.purs b/plutus-playground-client/test/JsonEncodingTests.purs deleted file mode 100644 index 5efcb60381..0000000000 --- a/plutus-playground-client/test/JsonEncodingTests.purs +++ /dev/null @@ -1,193 +0,0 @@ -module JsonEncodingTests - ( all - ) where - -import Prelude -import Auth (AuthStatus) -import Control.Monad.Except (runExcept) -import Cursor (Cursor) -import Cursor as Cursor -import Data.BigInteger (BigInteger) -import Data.BigInteger as BigInteger -import Data.Either (Either(..)) -import Data.Foldable (product) -import Data.Json.JsonNonEmptyList (JsonNonEmptyList(..)) -import Data.Json.JsonTuple (JsonTuple(..)) -import Data.Tuple (Tuple(..)) -import Foreign (MultipleErrors) -import Foreign.Class (class Decode, class Encode, decode, encode) -import Language.Haskell.Interpreter (CompilationError, InterpreterResult) -import PlutusTx.AssocMap as AssocMap -import Plutus.V1.Ledger.Time (POSIXTime(..)) -import Plutus.V1.Ledger.Value (CurrencySymbol(..), TokenName(..), Value(..)) -import Playground.Types (CompilationResult, EvaluationResult, KnownCurrency(..)) -import Test.QuickCheck (arbitrary, withHelp) -import Test.QuickCheck.Gen (Gen, chooseInt, vectorOf) -import Test.Unit (TestSuite, failure, success, suite, test) -import Test.Unit.Assert (equal) -import Test.Unit.QuickCheck (quickCheck) -import TestUtils (arbitraryEither, arbitraryNonEmptyList, assertDecodesTo, assertEncodesTo) -import Type.Proxy (Proxy(..)) -import PlutusTx.Ratio - -all :: TestSuite -all = - suite "JsonEncoding" do - jsonHandlingTests - -jsonHandlingTests :: TestSuite -jsonHandlingTests = do - suite "Json handling" do - test "Decode a List." do - assertDecodesTo - (Proxy :: Proxy (Array TokenName)) - "test/token_names.json" - test ("Decode an empty NonEmptyList should fail.") do - case (runExcept (decode (encode ([] :: Array TokenName))) :: Either MultipleErrors (JsonNonEmptyList TokenName)) of - Left _ -> success - Right value -> failure $ "A empty list shouldn't decode into a NonEmptyList. Expected failure, got: " <> show value - test ("Decode a populated NonEmptyList.") do - assertDecodesTo - (Proxy :: Proxy (JsonNonEmptyList TokenName)) - "test/token_names.json" - test "Decode a KnownCurrency." do - assertDecodesTo - (Proxy :: Proxy KnownCurrency) - "test/known_currency.json" - test "Decode a compilation response." do - assertDecodesTo - (Proxy :: Proxy (InterpreterResult CompilationResult)) - "generated/compilation_response.json" - test "Decode an EvaluationResult." do - assertDecodesTo (Proxy :: Proxy (InterpreterResult EvaluationResult)) - "generated/evaluation_response0.json" - test "Decode an AuthStatus." do - assertDecodesTo - (Proxy :: Proxy AuthStatus) - "test/authstatus.json" - test "Decode a CompilationError." do - assertDecodesTo - (Proxy :: Proxy (Array CompilationError)) - "test/evaluation_error1.json" - test "Decode/Encode a Value" do - let - aValue = - Value - { getValue: - AssocMap.fromTuples - [ Tuple (CurrencySymbol { unCurrencySymbol: "0" }) (AssocMap.fromTuples [ Tuple (TokenName { unTokenName: "ADA" }) (BigInteger.fromInt 10) ]) - , Tuple (CurrencySymbol { unCurrencySymbol: "1" }) (AssocMap.fromTuples [ Tuple (TokenName { unTokenName: "USD" }) (BigInteger.fromInt 20) ]) - ] - } - equal - (Right aValue) - (runExcept (decode (encode aValue))) - test "Encode a Value." do - let - aValue = - Value - { getValue: - AssocMap.fromTuples - [ Tuple (CurrencySymbol { unCurrencySymbol: "0" }) (AssocMap.fromTuples [ Tuple (TokenName { unTokenName: "ADA" }) (BigInteger.fromInt 100) ]) - , Tuple (CurrencySymbol { unCurrencySymbol: "1" }) (AssocMap.fromTuples [ Tuple (TokenName { unTokenName: "USD" }) (BigInteger.fromInt 40) ]) - , Tuple (CurrencySymbol { unCurrencySymbol: "2" }) (AssocMap.fromTuples [ Tuple (TokenName { unTokenName: "EUR" }) (BigInteger.fromInt 40) ]) - ] - } - assertEncodesTo - aValue - "test/value1.json" - test "Encode Ada." do - let - aValue = Value { getValue: AssocMap.fromTuples [ Tuple (CurrencySymbol { unCurrencySymbol: "" }) (AssocMap.fromTuples [ Tuple (TokenName { unTokenName: "" }) (BigInteger.fromInt 50) ]) ] } - assertEncodesTo - aValue - "test/value_ada.json" - test "Encode POSIXTime" do - let - aValue = POSIXTime { getPOSIXTime: (BigInteger.fromInt 50) } - assertEncodesTo - aValue - "test/value_posixtime.json" - test "Encode Ratio" do - let - aValue = 1 % 2 - assertEncodesTo - aValue - "test/value_ratio.json" - suite "Roundtrips" do - testRoundTrip "POSIXTime" arbitraryPOSIXTime - testRoundTrip "Ratio" arbitraryRatio - testRoundTrip "BigInteger" arbitraryBigInteger - testRoundTrip "CurrencySymbol" arbitraryCurrencySymbol - testRoundTrip "TokenName" arbitraryTokenName - testRoundTrip "Value" arbitraryValue - testRoundTrip "KnownCurrency" arbitraryKnownCurrency - testRoundTrip "Either" (arbitraryEither arbitrary arbitrary :: Gen (Either String Int)) - testRoundTrip "JsonTuple" ((JsonTuple <$> (Tuple <$> arbitrary <*> arbitrary)) :: Gen (JsonTuple String Int)) - testRoundTrip "JsonNonEmptyList" ((JsonNonEmptyList <$> arbitrary) :: Gen (JsonNonEmptyList String)) - testRoundTrip "Cursor" ((Cursor.fromArray <$> arbitrary) :: Gen (Cursor String)) - -testRoundTrip :: - forall a. - Eq a => - Decode a => - Encode a => - Show a => - String -> - Gen a -> - TestSuite -testRoundTrip title gen = do - test title do - quickCheck do - value <- gen - let - expect = Right value - let - actual = runExcept $ decode $ encode value - pure $ withHelp (expect == actual) $ "Expected: " <> show expect <> "Got: " <> show actual - -arbitraryCurrencySymbol :: Gen CurrencySymbol -arbitraryCurrencySymbol = do - str <- arbitrary - pure $ CurrencySymbol { unCurrencySymbol: str } - -arbitraryTokenName :: Gen TokenName -arbitraryTokenName = do - str <- arbitrary - pure $ TokenName { unTokenName: str } - -arbitraryAssocMap :: forall k v. Gen k -> Gen v -> Gen (AssocMap.Map k v) -arbitraryAssocMap genK genV = do - n <- chooseInt 0 5 - xs <- vectorOf n (JsonTuple <$> (Tuple <$> genK <*> genV)) - pure $ AssocMap.Map xs - -arbitraryValue :: Gen Value -arbitraryValue = do - assocMap <- arbitraryAssocMap arbitraryCurrencySymbol (arbitraryAssocMap arbitraryTokenName arbitraryBigInteger) - pure $ Value { getValue: assocMap } - -arbitraryBigInteger :: Gen BigInteger -arbitraryBigInteger = do - let - intSized :: Gen BigInteger - intSized = BigInteger.fromInt <$> arbitrary - product <$> vectorOf 5 intSized - -arbitraryRatio :: Gen (Ratio Int) -arbitraryRatio = do - num <- chooseInt 0 5 - den <- chooseInt 1 5 - pure $ num % den - -arbitraryPOSIXTime :: Gen POSIXTime -arbitraryPOSIXTime = do - intSized <- BigInteger.fromInt <$> arbitrary - pure $ POSIXTime { getPOSIXTime: intSized } - -arbitraryKnownCurrency :: Gen KnownCurrency -arbitraryKnownCurrency = do - hash <- arbitrary - friendlyName <- arbitrary - knownTokens <- JsonNonEmptyList <$> arbitraryNonEmptyList arbitraryTokenName - pure $ KnownCurrency { hash, friendlyName, knownTokens } diff --git a/plutus-playground-client/test/Main.purs b/plutus-playground-client/test/Main.purs index 680914d469..e8e2378c87 100644 --- a/plutus-playground-client/test/Main.purs +++ b/plutus-playground-client/test/Main.purs @@ -1,35 +1,29 @@ module Test.Main where -import Prelude -import JsonEncodingTests as JsonEncodingTests +import Prologue import ChainTests as ChainTests -import CursorTests as CursorTests -import Data.Array.ExtraTests as Data.Array.ExtraTests -import Data.Foldable.ExtraTests as Data.Foldable.ExtraTests -import Data.String.ExtraTests as Data.String.ExtraTests +import Data.BigInt.Argonaut (withJsonPatch) import EditorTests as EditorTests import Effect (Effect) +import Effect.Aff (launchAff_) import GistsTests as GistsTests -import StaticDataTests as StaticDataTests -import PlutusTx.AssocMapTests as PlutusTx.AssocMapTests import MainFrameTests as MainFrameTests -import Test.Unit.Main (runTest) import Schema.TypesTests as Schema.TypesTests +import StaticDataTests as StaticDataTests +import Test.Spec (around_) +import Test.Spec.Reporter (consoleReporter) +import Test.Spec.Runner (runSpec) foreign import forDeps :: Effect Unit main :: Effect Unit main = - runTest do - JsonEncodingTests.all - ChainTests.all - CursorTests.all - Data.Array.ExtraTests.all - Data.Foldable.ExtraTests.all - Data.String.ExtraTests.all - EditorTests.all - GistsTests.all - StaticDataTests.all - PlutusTx.AssocMapTests.all - MainFrameTests.all - Schema.TypesTests.all + launchAff_ do + runSpec [ consoleReporter ] + $ around_ withJsonPatch do + ChainTests.all + EditorTests.all + GistsTests.all + StaticDataTests.all + MainFrameTests.all + Schema.TypesTests.all diff --git a/plutus-playground-client/test/MainFrameTests.purs b/plutus-playground-client/test/MainFrameTests.purs index 68f27e9b1f..e87bc66077 100644 --- a/plutus-playground-client/test/MainFrameTests.purs +++ b/plutus-playground-client/test/MainFrameTests.purs @@ -2,59 +2,56 @@ module MainFrameTests ( all ) where -import Prelude +import Prologue import Animation (class MonadAnimate) import Auth (AuthRole(..), AuthStatus(..)) import Clipboard (class MonadClipboard) -import Control.Monad.Error.Extra (mapError) -import Control.Monad.Except (runExcept) -import Control.Monad.Except.Trans (class MonadThrow) +import Control.Monad.Except.Trans (class MonadThrow, throwError) import Control.Monad.RWS.Trans (RWSResult(..), RWST(..), runRWST) import Control.Monad.Reader.Class (class MonadAsk) import Control.Monad.Rec.Class (class MonadRec, Step(..), tailRecM) import Control.Monad.State.Class (class MonadState, get) import Cursor as Cursor -import Data.Either (Either(..)) -import Data.Lens (Lens', _1, assign, preview, set, use, view) +import Data.Argonaut.Decode (printJsonDecodeError) +import Data.Argonaut.Extra (parseDecodeJson) +import Data.Bifunctor (lmap) +import Data.Either (either) +import Data.Lens (Lens', _1, assign, preview, set, to, use, view, (^.)) import Data.Lens.At (at) import Data.Lens.Index (ix) import Data.Lens.Record (prop) import Data.Map (Map) import Data.Map as Map -import Data.Maybe (Maybe(Nothing, Just)) import Data.Newtype (class Newtype, unwrap) -import Data.Symbol (SProxy(..)) import Data.Traversable (traverse_) -import Data.Tuple (Tuple(Tuple)) import Editor.Types (State(..)) as Editor import Effect.Class (class MonadEffect, liftEffect) import Effect.Exception (Error, error) -import Foreign.Generic (decodeJSON) import Gist (Gist, GistId, gistId) import Gists.Types (GistAction(..)) import Halogen.Monaco (KeyBindings(..)) as Editor import Language.Haskell.Interpreter (InterpreterError, InterpreterResult, SourceCode(..)) import MainFrame.Lenses (_authStatus, _contractDemoEditorContents, _createGistResult, _currentView, _simulations) import MainFrame.MonadApp (class MonadApp) -import MainFrame.State (handleAction, mkInitialState) +import MainFrame.State (Env(..), handleAction, mkInitialState) import MainFrame.Types (HAction(..), State, View(Editor, Simulations), WebData) import Network.RemoteData (RemoteData(..), isNotAsked, isSuccess) import Network.RemoteData as RemoteData import Node.Encoding (Encoding(..)) import Node.FS.Sync as FS import Playground.Gists (playgroundGistFile) -import Playground.Server (SPParams_(..)) import Playground.Types (CompilationResult, ContractDemo, EvaluationResult) -import Servant.PureScript.Settings (SPSettings_, defaultSettings) +import Servant.PureScript (printAjaxError) import StaticData (bufferLocalStorageKey, lookupContractDemo, mkContractDemos) import Test.QuickCheck (()) -import Test.Unit (TestSuite, failure, suite, test) -import Test.Unit.Assert (assert, equal, equal') -import Test.Unit.QuickCheck (quickCheck) +import Test.Spec (Spec, describe, it) +import Test.Spec.Assertions (fail, shouldEqual, shouldSatisfy) +import Test.Spec.QuickCheck (quickCheck) +import Type.Proxy (Proxy(..)) -all :: TestSuite +all :: Spec Unit all = - suite "MainFrame" do + describe "MainFrame" do evalTests ------------------------------------------------------------ @@ -67,17 +64,17 @@ type World } _gists :: forall r a. Lens' { gists :: a | r } a -_gists = prop (SProxy :: SProxy "gists") +_gists = prop (Proxy :: _ "gists") _editorContents :: forall r a. Lens' { editorContents :: a | r } a -_editorContents = prop (SProxy :: SProxy "editorContents") +_editorContents = prop (Proxy :: _ "editorContents") _localStorage :: forall r a. Lens' { localStorage :: a | r } a -_localStorage = prop (SProxy :: SProxy "localStorage") +_localStorage = prop (Proxy :: _ "localStorage") -- | A dummy implementation of `MonadApp`, for testing the main handleAction loop. newtype MockApp m a - = MockApp (RWST (SPSettings_ SPParams_) Unit (Tuple World State) m a) + = MockApp (RWST Env Unit (Tuple World State) m a) derive instance newtypeMockApp :: Newtype (MockApp m a) _ @@ -91,12 +88,12 @@ derive newtype instance bindMockApp :: Bind m => Bind (MockApp m) derive newtype instance monadMockApp :: Monad m => Monad (MockApp m) -derive newtype instance monadAskMockApp :: Monad m => MonadAsk (SPSettings_ SPParams_) (MockApp m) +derive newtype instance monadAskMockApp :: Monad m => MonadAsk Env (MockApp m) instance monadStateMockApp :: Monad m => MonadState State (MockApp m) where state f = MockApp - $ RWST \r (Tuple world appState) -> case f appState of + $ RWST \_ (Tuple world appState) -> case f appState of (Tuple a appState') -> pure $ RWSResult (Tuple world appState') a unit instance monadAppMockApp :: Monad m => MonadApp (MockApp m) where @@ -104,29 +101,29 @@ instance monadAppMockApp :: Monad m => MonadApp (MockApp m) where MockApp do editorContents <- use (_1 <<< _editorContents) pure editorContents - editorSetContents contents cursor = + editorSetContents contents _ = MockApp $ assign (_1 <<< _editorContents) (Just contents) editorHandleAction _ = pure unit - editorSetAnnotations annotations = pure unit + editorSetAnnotations _ = pure unit -- saveBuffer contents = MockApp $ assign (_1 <<< _localStorage <<< at (unwrap bufferLocalStorageKey)) (Just contents) - preventDefault event = pure unit - setDropEffect effectType event = pure unit - setDataTransferData event mimeType value = pure unit - readFileFromDragEvent event = pure "TEST" + preventDefault _ = pure unit + setDropEffect _ _ = pure unit + setDataTransferData _ _ _ = pure unit + readFileFromDragEvent _ = pure "TEST" -- getOauthStatus = pure $ Success $ AuthStatus { _authStatusAuthRole: GithubUser } getGistByGistId gistId = MockApp do Tuple { gists } _ <- get pure $ RemoteData.fromMaybe $ Map.lookup gistId gists - postEvaluation evaluation = pure NotAsked - postGist newGist = pure NotAsked - postGistByGistId newGist gistId = pure NotAsked - postContract sourceCode = + postEvaluation _ = pure NotAsked + postGist _ = pure NotAsked + postGistByGistId _ _ = pure NotAsked + postContract _ = MockApp do Tuple { compilationResult } _ <- get pure compilationResult @@ -143,7 +140,7 @@ instance monadRecMockApp :: Monad m => MonadRec (MockApp m) where -- | The mock app makes no attempt to animate anything, and just calls the embedded `action`. instance monadAnimateMockApp :: MonadAnimate (MockApp m) State where - animate toggle action = action + animate _ action = action instance monadClipboardMockApp :: Monad m => MonadClipboard (MockApp m) where copy _ = pure unit @@ -162,10 +159,10 @@ execMockApp world queries = do , feedbackPanePreviousExtend: 0 } ) - RWSResult state result writer <- + RWSResult state _ _ <- runRWST (unwrap (traverse_ handleAction queries :: MockApp m Unit)) - (defaultSettings (SPParams_ { baseURL: "/" })) + (Env { spSettings: { baseURL: "/" } }) (Tuple world initialState) pure state @@ -179,38 +176,44 @@ mockWorld = , evaluationResult: NotAsked } -evalTests :: TestSuite +evalTests :: Spec Unit evalTests = - suite "handleAction" do - test "CheckAuthStatus" do + describe "handleAction" do + it "CheckAuthStatus" do Tuple _ finalState <- execMockApp mockWorld [ CheckAuthStatus ] - assert "Auth Status loaded." $ isSuccess (view _authStatus finalState) - test "ChangeView" do + (finalState ^. _authStatus <<< to (lmap printAjaxError)) + `shouldSatisfy` + isSuccess + it "ChangeView" do quickCheck \aView -> do let result = execMockApp mockWorld [ ChangeView aView ] case result of Right (Tuple _ finalState) -> (aView == view _currentView finalState) "Unexpected final view." Left err -> false show err - suite "LoadGist" do - test "Bad URL" do + describe "LoadGist" do + it "Bad URL" do Tuple _ finalState <- execMockApp mockWorld [ GistAction $ SetGistUrl "9cfe" , GistAction LoadGist ] - assert "Gist not loaded." $ isNotAsked (view _createGistResult finalState) - test "Invalid URL" do + (finalState ^. _createGistResult <<< to (lmap printAjaxError)) + `shouldSatisfy` + isNotAsked + it "Invalid URL" do Tuple _ finalState <- execMockApp mockWorld [ GistAction $ SetGistUrl "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" , GistAction LoadGist ] - assert "Gist not loaded." $ isNotAsked (view _createGistResult finalState) - test "Gist loaded successfully" do + (finalState ^. _createGistResult <<< to (lmap printAjaxError)) + `shouldSatisfy` + isNotAsked + it "Gist loaded successfully" do contents <- liftEffect $ FS.readTextFile UTF8 "test/gist1.json" - case runExcept $ decodeJSON contents of - Left err -> failure $ show err + case parseDecodeJson contents of + Left err -> fail $ printJsonDecodeError err Right gist -> do Tuple finalWorld finalState <- execMockApp @@ -218,39 +221,41 @@ evalTests = [ GistAction $ SetGistUrl (unwrap (view gistId gist)) , GistAction LoadGist ] - assert "Gist gets loaded." $ isSuccess (view _createGistResult finalState) - equal - 2 - (Cursor.length (view _simulations finalState)) + (finalState ^. _createGistResult <<< to (lmap printAjaxError)) + `shouldSatisfy` + isSuccess + Cursor.length (view _simulations finalState) `shouldEqual` 2 case view playgroundGistFile gist of - Nothing -> failure "Could not read gist content. Sample test data may be incorrect." + Nothing -> fail "Could not read gist content. Sample it data may be incorrect." Just sourceFile -> do - equal' "Editor gets updated." - (Just (SourceCode sourceFile)) - (view _editorContents finalWorld) - equal' "Source gets stored." - (Just sourceFile) - (preview (_localStorage <<< ix (unwrap bufferLocalStorageKey)) finalWorld) - test "Loading a script works." do - Tuple finalWorld finalState <- + view _editorContents finalWorld `shouldEqual` Just (SourceCode sourceFile) + preview (_localStorage <<< ix (unwrap bufferLocalStorageKey)) finalWorld + `shouldEqual` + Just sourceFile + it "Loading a script works." do + Tuple finalWorld _ <- ( execMockApp (set _editorContents Nothing mockWorld) [ LoadScript "Game" ] ) - contractDemos :: Array ContractDemo <- mapError (error <<< show) mkContractDemos - equal' "Script gets loaded." - (view _contractDemoEditorContents <$> lookupContractDemo "Game" contractDemos) - finalWorld.editorContents - test "Loading a script switches back to the editor." do + contractDemos :: Array ContractDemo <- + either + (throwError <<< error <<< printJsonDecodeError) + pure + mkContractDemos + finalWorld.editorContents + `shouldEqual` + (view _contractDemoEditorContents <$> lookupContractDemo "Game" contractDemos) + it "Loading a script switches back to the editor." do loadCompilationResponse1 >>= case _ of - Left err -> failure err + Left err -> fail err Right compilationResult -> do Tuple _ finalState <- execMockApp (mockWorld { compilationResult = compilationResult }) [ ChangeView Simulations , LoadScript "Game" ] - equal' "View is reset." Editor $ view _currentView finalState + view _currentView finalState `shouldEqual` Editor loadCompilationResponse1 :: forall m. @@ -258,6 +263,6 @@ loadCompilationResponse1 :: m (Either String (WebData (Either InterpreterError (InterpreterResult CompilationResult)))) loadCompilationResponse1 = do contents <- liftEffect $ FS.readTextFile UTF8 "generated/compilation_response.json" - case runExcept $ decodeJSON contents of + case parseDecodeJson contents of Left err -> pure $ Left $ show err Right value -> pure $ Right $ Success $ Right value diff --git a/plutus-playground-client/test/PlutusTx/AssocMapTests.purs b/plutus-playground-client/test/PlutusTx/AssocMapTests.purs deleted file mode 100644 index ebac5c24de..0000000000 --- a/plutus-playground-client/test/PlutusTx/AssocMapTests.purs +++ /dev/null @@ -1,194 +0,0 @@ -module PlutusTx.AssocMapTests - ( all - ) where - -import Prelude -import Data.BigInteger (BigInteger) -import Data.BigInteger as BigInteger -import Data.Json.JsonTuple (JsonTuple) -import Data.Lens (preview, set) -import Data.Lens.At (at) -import Data.Lens.Index (ix) -import Data.Maybe (Maybe(..)) -import Data.Newtype (wrap) -import Data.Tuple (Tuple(..)) -import Data.Tuple.Nested ((/\)) -import PlutusTx.AssocMap (Map(..), fromTuples, unionWith) -import Ledger.Extra (sum) -import Plutus.V1.Ledger.Value (CurrencySymbol(..), TokenName(..), Value(..)) -import Test.Unit (TestSuite, suite, test) -import Test.Unit.Assert (equal) -import TestUtils (equalGenericShow) - -all :: TestSuite -all = - suite "PlutusTx.AssocMap" do - indexTests - atTests - unionWithTests - unionWithCurrenciesTests - sumTests - -currencies :: CurrencySymbol -currencies = CurrencySymbol { unCurrencySymbol: "Currency" } - -usd :: TokenName -usd = TokenName { unTokenName: "USD" } - -eur :: TokenName -eur = TokenName { unTokenName: "EUR" } - -gbp :: TokenName -gbp = TokenName { unTokenName: "GBP" } - -baseValue :: Map CurrencySymbol (Map TokenName BigInteger) -baseValue = Map [ wrap $ Tuple currencies (Map [ wrap $ Tuple usd $ BigInteger.fromInt 10 ]) ] - -indexTests :: TestSuite -indexTests = - suite "Index" do - test "simple gets" do - equal (Just (BigInteger.fromInt 10)) (preview (ix currencies <<< ix usd) baseValue) - equal Nothing (preview (ix currencies <<< ix eur) baseValue) - test "simple sets" do - equal (Just (BigInteger.fromInt 20)) - ( baseValue - # set (ix currencies <<< ix usd) (BigInteger.fromInt 20) - # preview (ix currencies <<< ix usd) - ) - -atTests :: TestSuite -atTests = - suite "At" do - test "create" do - equalGenericShow - baseValue - ( Map [] - # set (at currencies) (Just (Map [])) - # set (ix currencies <<< at usd) (Just (BigInteger.fromInt 10)) - ) - test "modify" do - equal (Just (BigInteger.fromInt 20)) - ( baseValue - # set (ix currencies <<< at usd) (Just (BigInteger.fromInt 20)) - # preview (ix currencies <<< ix usd) - ) - test "delete" do - equal Nothing - ( baseValue - # set (ix currencies <<< at usd) Nothing - # preview (ix currencies <<< ix usd) - ) - -unionWithTests :: TestSuite -unionWithTests = do - suite "unionWith" do - let - a = - fromTuples - [ "a" /\ 1 - , "b" /\ 2 - , "c" /\ 3 - ] - let - b = - fromTuples - [ "b" /\ 1 - , "c" /\ 2 - , "d" /\ 3 - ] - test "Merge with (+)" do - equal - ( fromTuples - [ "a" /\ 1 - , "b" /\ 3 - , "c" /\ 5 - , "d" /\ 3 - ] - ) - (unionWith (+) a b) - test "Merge with (-)" do - equal - ( fromTuples - [ "a" /\ 1 - , "b" /\ 1 - , "c" /\ 1 - , "d" /\ 3 - ] - ) - (unionWith (-) a b) - -unionWithCurrenciesTests :: TestSuite -unionWithCurrenciesTests = - suite "unionWith - currencies" do - let - valueA = - ( mkMap currencies - [ Tuple usd 10 - , Tuple eur 20 - ] - ) - - valueB = - ( mkMap currencies - [ Tuple eur 30 - , Tuple gbp 40 - ] - ) - test "addition" - $ equalGenericShow - ( mkMap currencies - [ Tuple usd 10 - , Tuple eur 50 - , Tuple gbp 40 - ] - ) - (unionWith (unionWith (+)) valueA valueB) - test "choice" - $ equalGenericShow - ( mkMap currencies - [ Tuple usd 10 - , Tuple eur 20 - , Tuple gbp 40 - ] - ) - (unionWith (unionWith const) valueA valueB) - -sumTests :: TestSuite -sumTests = - suite "sum" do - let - valueA = - mkValue currencies - [ Tuple usd 10 - , Tuple eur 20 - ] - - valueB = - mkValue currencies - [ Tuple eur 30 - , Tuple gbp 40 - ] - test "sum" - $ equalGenericShow - ( mkValue currencies - ( [ Tuple usd 10 - , Tuple eur 50 - , Tuple gbp 40 - ] - ) - ) - (sum valueA valueB) - -mkValue :: CurrencySymbol -> Array (Tuple TokenName Int) -> Value -mkValue symbol pairs = - Value - { getValue: mkMap symbol pairs } - -mkMap :: CurrencySymbol -> Array (Tuple TokenName Int) -> Map CurrencySymbol (Map TokenName BigInteger) -mkMap symbol pairs = - Map - [ wrap $ Tuple symbol (Map (mkTokenAmount <$> pairs)) ] - where - mkTokenAmount :: Tuple TokenName Int -> JsonTuple TokenName BigInteger - mkTokenAmount (Tuple token amount) = wrap $ Tuple token (BigInteger.fromInt amount) diff --git a/plutus-playground-client/test/Schema/TypesTests.purs b/plutus-playground-client/test/Schema/TypesTests.purs index 4a6013002b..68284ae64d 100644 --- a/plutus-playground-client/test/Schema/TypesTests.purs +++ b/plutus-playground-client/test/Schema/TypesTests.purs @@ -2,110 +2,108 @@ module Schema.TypesTests ( all ) where -import Prelude -import Data.BigInteger as BigInteger +import Prologue +import Control.Monad.Error.Class (class MonadThrow) +import Data.Argonaut.Core (Json, stringify) +import Data.BigInt.Argonaut as BigInt import Data.Functor.Foldable (Fix(..)) -import Data.Json.JsonNonEmptyList (JsonNonEmptyList(..)) -import Data.Json.JsonTuple (JsonTuple(..)) -import Data.List (List(..)) +import Data.List (List(..), (:)) import Data.List.NonEmpty (NonEmptyList(..)) -import Data.Maybe (Maybe(..)) import Data.NonEmpty ((:|)) -import Data.Tuple (Tuple(..)) -import Data.Tuple.Nested ((/\)) import Effect.Aff (Aff) -import Foreign (Foreign) -import Foreign.Class (encode) -import Foreign.Generic (encodeJSON) -import Foreign.Object as FO -import PlutusTx.AssocMap as AssocMap -import Plutus.V1.Ledger.Value (CurrencySymbol(..), TokenName(..), Value(..)) +import Effect.Exception (Error) +import Ledger.CardanoWallet (WalletNumber(..)) import Playground.Types (ContractCall(..), FunctionSchema(..), KnownCurrency(..)) +import Plutus.V1.Ledger.Value (CurrencySymbol(..), TokenName(..), Value(..)) +import PlutusTx.AssocMap as AssocMap import Schema (FormSchema(..), FormArgumentF(..)) import Schema.Types (FormArgument, formArgumentToJson, mkInitialValue, toArgument) -import Test.Unit (TestSuite, Test, suite, test) -import Test.Unit.Assert (equal) -import TestUtils (equalGenericShow) +import Test.Spec (Spec, describe, it) +import Test.Spec.Assertions (shouldEqual) import Validation (ValidationError(..), validate, withPath) -import Ledger.CardanoWallet (WalletNumber(..)) import Wallet.Types (EndpointDescription(..)) -all :: TestSuite +all :: Spec Unit all = - suite "Schema.Types" do - validateTests - toArgumentTests - formArgumentToJsonTests - mkInitialValueTests + describe "Schema.Types" do + validateSpec + toArgumentSpec + formArgumentToJsonSpec + mkInitialValueSpec -validateTests :: TestSuite -validateTests = do - test "No validation errors" do +validateSpec :: Spec Unit +validateSpec = do + it "No validation errors" do isValid $ AddBlocks { blocks: one } isValid $ makeTestAction $ Fix $ FormIntF (Just 5) - isValid $ makeTestAction $ Fix $ FormIntegerF (Just (BigInteger.fromInt 5)) + isValid $ makeTestAction $ Fix $ FormIntegerF (Just (BigInt.fromInt 5)) isValid $ makeTestAction $ Fix $ FormStringF (Just "TEST") isValid $ makeTestAction $ Fix $ FormTupleF (Fix $ FormIntF (Just 5)) (Fix $ FormIntF (Just 6)) isValid $ makeTestAction $ Fix $ FormArrayF FormSchemaInt [] isValid $ makeTestAction $ Fix $ FormObjectF [] -- - test "Validation errors" do - equal [ withPath [] Unsupported ] $ validate (makeTestAction $ Fix $ FormUnsupportedF "Test case.") - equal [ withPath [] Required ] $ validate (makeTestAction $ Fix $ FormIntF Nothing) - equal [ withPath [] Required ] $ validate (makeTestAction $ Fix $ FormIntegerF Nothing) - equal [ withPath [] Required ] $ validate (makeTestAction $ Fix $ FormStringF Nothing) - equal - [ withPath [ "_1" ] Required - , withPath [ "_2" ] Unsupported - ] - (validate (makeTestAction $ Fix $ FormTupleF (Fix $ FormIntF Nothing) (Fix $ FormUnsupportedF "Test."))) - equal [ withPath [ "_1" ] Required ] $ validate (makeTestAction $ Fix $ FormTupleF (Fix $ FormIntF Nothing) (Fix $ FormIntF (Just 5))) - equal [ withPath [ "_2" ] Required ] $ validate (makeTestAction $ Fix $ FormTupleF (Fix $ FormIntF (Just 5)) (Fix $ FormIntF Nothing)) - equal [ withPath [ "2" ] Required ] - $ validate - ( makeTestAction - $ Fix - $ FormArrayF FormSchemaInt - [ Fix $ FormIntF (Just 5) - , Fix $ FormIntF (Just 6) - , Fix $ FormIntF Nothing - , Fix $ FormIntF (Just 7) - ] - ) - equal - [ withPath [ "name" ] Required ] - ( validate - ( makeTestAction - $ Fix - $ FormObjectF - [ JsonTuple $ Tuple "name" (Fix $ FormStringF Nothing) - , JsonTuple $ Tuple "test" (Fix $ FormIntF (Just 5)) - ] - ) + it "Validation errors" do + validate (makeTestAction $ Fix $ FormUnsupportedF "Test case.") `shouldEqual` [ withPath [] Unsupported ] + validate (makeTestAction $ Fix $ FormIntF Nothing) `shouldEqual` [ withPath [] Required ] + validate (makeTestAction $ Fix $ FormIntegerF Nothing) `shouldEqual` [ withPath [] Required ] + validate (makeTestAction $ Fix $ FormStringF Nothing) `shouldEqual` [ withPath [] Required ] + validate (makeTestAction $ Fix $ FormTupleF (Fix $ FormIntF Nothing) (Fix $ FormUnsupportedF "Test.")) + `shouldEqual` + [ withPath [ "_1" ] Required + , withPath [ "_2" ] Unsupported + ] + validate (makeTestAction $ Fix $ FormTupleF (Fix $ FormIntF Nothing) (Fix $ FormIntF (Just 5))) `shouldEqual` [ withPath [ "_1" ] Required ] + validate (makeTestAction $ Fix $ FormTupleF (Fix $ FormIntF (Just 5)) (Fix $ FormIntF Nothing)) + `shouldEqual` + [ withPath [ "_2" ] Required ] + validate + ( makeTestAction + $ Fix + $ FormArrayF FormSchemaInt + [ Fix $ FormIntF (Just 5) + , Fix $ FormIntF (Just 6) + , Fix $ FormIntF Nothing + , Fix $ FormIntF (Just 7) + ] ) + `shouldEqual` + [ withPath [ "2" ] Required ] + ( validate + ( makeTestAction + $ Fix + $ FormObjectF + [ Tuple "name" (Fix $ FormStringF Nothing) + , Tuple "test" (Fix $ FormIntF (Just 5)) + ] + ) + ) + `shouldEqual` + [ withPath [ "name" ] Required ] -toArgumentTests :: TestSuite -toArgumentTests = do - suite "toArgument" do +toArgumentSpec :: Spec Unit +toArgumentSpec = do + describe "toArgument" do let initialValue :: Value initialValue = Value { getValue: - AssocMap.fromTuples - [ ( Tuple (CurrencySymbol { unCurrencySymbol: "12345" }) - (AssocMap.fromTuples [ Tuple (TokenName { unTokenName: "ADA" }) (BigInteger.fromInt 100) ]) + AssocMap.Map + [ ( Tuple + (CurrencySymbol { unCurrencySymbol: "12345" }) + ( AssocMap.Map + [ Tuple + (TokenName { unTokenName: "ADA" }) + (BigInt.fromInt 100) + ] + ) ) ] } - test "FormIntF" do - equal - (toArgument initialValue FormSchemaInt) - (Fix (FormIntF Nothing)) - test "Value" do - equal - (toArgument initialValue FormSchemaValue) - (Fix (FormValueF initialValue)) + it "FormIntF" do + toArgument initialValue FormSchemaInt `shouldEqual` Fix (FormIntF Nothing) + it "Value" do + toArgument initialValue FormSchemaValue `shouldEqual` Fix (FormValueF initialValue) makeTestAction :: FormArgument -> ContractCall FormArgument makeTestAction argument = @@ -120,33 +118,33 @@ makeTestAction argument = } isValid :: ContractCall FormArgument -> Aff Unit -isValid = validate >>> equal [] +isValid = validate >>> flip shouldEqual [] -formArgumentToJsonTests :: TestSuite -formArgumentToJsonTests = do - suite "FormArgument to JSON" do - test "Ints" do +formArgumentToJsonSpec :: Spec Unit +formArgumentToJsonSpec = do + describe "FormArgument to JSON" do + it "Ints" do equalJson Nothing (formArgumentToJson (Fix $ FormIntF Nothing)) equalJson - (Just (encodeJSON 5)) + (Just "5") (formArgumentToJson (Fix $ FormIntF (Just 5))) - test "BigIntegers" do + it "BigInts" do equalJson Nothing (formArgumentToJson (Fix $ FormIntegerF Nothing)) equalJson - (Just (encodeJSON (BigInteger.fromInt 5))) - (formArgumentToJson (Fix $ FormIntegerF (Just (BigInteger.fromInt 5)))) - test "Strings" do + (Just "5") + (formArgumentToJson (Fix $ FormIntegerF (Just (BigInt.fromInt 5)))) + it "Strings" do equalJson Nothing (formArgumentToJson (Fix $ FormStringF Nothing)) equalJson - (Just (encodeJSON "Test")) + (Just "\"Test\"") (formArgumentToJson (Fix $ FormStringF (Just "Test"))) - test "Tuples" do + it "Tuples" do equalJson Nothing (formArgumentToJson (Fix $ FormTupleF (Fix $ FormIntF Nothing) (Fix $ FormStringF Nothing))) @@ -157,11 +155,11 @@ formArgumentToJsonTests = do Nothing (formArgumentToJson (Fix $ FormTupleF (Fix $ FormIntF (Just 5)) (Fix $ FormStringF Nothing))) equalJson - (Just (encodeJSON [ encode 5.0, encode "Test" ])) + (Just "[5,\"Test\"]") (formArgumentToJson (Fix $ FormTupleF (Fix $ FormIntF (Just 5)) (Fix $ FormStringF (Just "Test")))) - test "Arrays" do + it "Arrays" do equalJson - (Just (encodeJSON [ 1.0, 2.0, 3.0 ])) + (Just "[1,2,3]") ( formArgumentToJson ( Fix $ FormArrayF FormSchemaInt @@ -171,71 +169,77 @@ formArgumentToJsonTests = do ] ) ) - test "Values" do + it "Values" do equalJson ( Just - ( encodeJSON - ( FO.singleton "getValue" - [ [ encode $ FO.singleton "unCurrencySymbol" "" - , encode - [ [ encode $ FO.singleton "unTokenName" "" - , encode (BigInteger.fromInt 4) - ] - ] - ] - ] - ) - ) + "{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},4]]]]}" ) ( formArgumentToJson ( Fix $ FormValueF - (Value { getValue: AssocMap.fromTuples [ CurrencySymbol { unCurrencySymbol: "" } /\ AssocMap.fromTuples [ TokenName { unTokenName: "" } /\ BigInteger.fromInt 4 ] ] }) + ( Value + { getValue: + AssocMap.Map + [ Tuple + (CurrencySymbol { unCurrencySymbol: "" }) + ( AssocMap.Map + [ Tuple + (TokenName { unTokenName: "" }) + (BigInt.fromInt 4) + ] + ) + ] + } + ) ) ) - test "Objects" do + it "Objects" do equalJson - ( Just - ( encodeJSON - ( FO.fromFoldable - [ "name" /\ encode "Tester" - , "arg" /\ encode 20.0 - ] - ) - ) - ) + (Just "{\"name\":\"Tester\",\"arg\":20}") ( formArgumentToJson ( Fix $ FormObjectF - [ JsonTuple $ "name" /\ (Fix $ FormStringF (Just "Tester")) - , JsonTuple $ "arg" /\ (Fix $ FormIntF (Just 20)) + [ Tuple "name" $ Fix (FormStringF (Just "Tester")) + , Tuple "arg" $ Fix (FormIntF (Just 20)) ] ) ) -mkInitialValueTests :: TestSuite -mkInitialValueTests = - suite "mkInitialValue" do - test "balance" do - equalGenericShow - ( Value +mkInitialValueSpec :: Spec Unit +mkInitialValueSpec = + describe "mkInitialValue" do + it "balance" do + mkInitialValue + [ KnownCurrency + { hash: "" + , friendlyName: "Ada" + , knownTokens: + NonEmptyList $ TokenName { unTokenName: "" } :| Nil + } + , KnownCurrency + { hash: "Currency" + , friendlyName: "Currencies" + , knownTokens: + NonEmptyList + $ TokenName { unTokenName: "USDToken" } + :| TokenName { unTokenName: "EURToken" } + : Nil + } + ] + (BigInt.fromInt 10) + `shouldEqual` + Value { getValue: - AssocMap.fromTuples - [ ada /\ AssocMap.fromTuples [ adaToken /\ BigInteger.fromInt 10 ] - , currencies - /\ AssocMap.fromTuples - [ usdToken /\ BigInteger.fromInt 10 - , eurToken /\ BigInteger.fromInt 10 + AssocMap.Map + [ Tuple ada $ AssocMap.Map [ Tuple adaToken $ BigInt.fromInt 10 ] + , Tuple + currencies + $ AssocMap.Map + [ Tuple usdToken $ BigInt.fromInt 10 + , Tuple eurToken $ BigInt.fromInt 10 ] ] } - ) - ( mkInitialValue - [ KnownCurrency { hash: "", friendlyName: "Ada", knownTokens: (JsonNonEmptyList (pure (TokenName { unTokenName: "" }))) } - , KnownCurrency { hash: "Currency", friendlyName: "Currencies", knownTokens: JsonNonEmptyList (NonEmptyList ((TokenName { unTokenName: "USDToken" }) :| (Cons (TokenName { unTokenName: "EURToken" }) Nil))) } - ] - (BigInteger.fromInt 10) - ) ada :: CurrencySymbol ada = CurrencySymbol { unCurrencySymbol: "" } @@ -252,5 +256,5 @@ usdToken = TokenName { unTokenName: "USDToken" } eurToken :: TokenName eurToken = TokenName { unTokenName: "EURToken" } -equalJson :: Maybe String -> Maybe Foreign -> Test -equalJson expected actual = equal expected (encodeJSON <$> actual) +equalJson :: forall m. MonadThrow Error m => Maybe String -> Maybe Json -> m Unit +equalJson expected actual = (stringify <$> actual) `shouldEqual` expected diff --git a/plutus-playground-client/test/StaticDataTests.purs b/plutus-playground-client/test/StaticDataTests.purs index c6cae83a30..618ab9b4d0 100644 --- a/plutus-playground-client/test/StaticDataTests.purs +++ b/plutus-playground-client/test/StaticDataTests.purs @@ -2,18 +2,19 @@ module StaticDataTests ( all ) where -import Control.Monad.Except (runExcept) -import Prelude (($)) +import Prologue +import Data.Either (isRight) import StaticData (mkContractDemos) -import Test.Unit (TestSuite, suite, test) -import TestUtils (assertRight) +import Test.Spec (Spec, describe, it) +import Test.Spec.Assertions (shouldSatisfy) -all :: TestSuite +all :: Spec Unit all = - suite "StaticData" do - simulationDecodingTests + describe "StaticData" do + simulationDecodingSpec -simulationDecodingTests :: TestSuite -simulationDecodingTests = - suite "Simulation Decoding" do - test "contractDemos" $ assertRight $ runExcept mkContractDemos +simulationDecodingSpec :: Spec Unit +simulationDecodingSpec = + describe "Simulation Decoding" do + it "contractDemos" do + mkContractDemos `shouldSatisfy` isRight diff --git a/plutus-playground-client/test/gist1.json b/plutus-playground-client/test/gist1.json index f1c54ce30f..d94b7d24a9 100644 --- a/plutus-playground-client/test/gist1.json +++ b/plutus-playground-client/test/gist1.json @@ -15,7 +15,7 @@ }, "Simulation.json": { "_gistFileTruncated": false, - "_gistFileContent": "[0,[{\"simulationWallets\":[{\"simulatorWalletWallet\":{\"getWallet\":1},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}},{\"simulatorWalletWallet\":{\"getWallet\":2},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}},{\"simulatorWalletWallet\":{\"getWallet\":3},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}}],\"simulationName\":\"Basic Game\",\"simulationId\":1,\"simulationActions\":[{\"caller\":{\"getWallet\":1},\"argumentValues\":{\"endpointDescription\":{\"getEndpointDescription\":\"lock\"},\"argument\":{\"contents\":[[\"secretWord\",{\"contents\":\"Plutus\",\"tag\":\"FormStringF\"}],[\"amount\",{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},50]]]],\"tag\":\"FormValueF\"}]],\"tag\":\"FormObjectF\"}},\"tag\":\"CallEndpoint\"},{\"blocks\":1,\"tag\":\"AddBlocks\"},{\"caller\":{\"getWallet\":2},\"argumentValues\":{\"endpointDescription\":{\"getEndpointDescription\":\"guess\"},\"argument\":{\"contents\":[[\"guessWord\",{\"contents\":\"Plutus\",\"tag\":\"FormStringF\"}]],\"tag\":\"FormObjectF\"}},\"tag\":\"CallEndpoint\"},{\"blocks\":1,\"tag\":\"AddBlocks\"}]},{\"simulationWallets\":[{\"simulatorWalletWallet\":{\"getWallet\":1},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}},{\"simulatorWalletWallet\":{\"getWallet\":2},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}},{\"simulatorWalletWallet\":{\"getWallet\":3},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}}],\"simulationName\":\"One Bad Guess\",\"simulationId\":2,\"simulationActions\":[{\"caller\":{\"getWallet\":1},\"argumentValues\":{\"endpointDescription\":{\"getEndpointDescription\":\"lock\"},\"argument\":{\"contents\":[[\"secretWord\",{\"contents\":\"Plutus\",\"tag\":\"FormStringF\"}],[\"amount\",{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},50]]]],\"tag\":\"FormValueF\"}]],\"tag\":\"FormObjectF\"}},\"tag\":\"CallEndpoint\"},{\"blocks\":1,\"tag\":\"AddBlocks\"},{\"caller\":{\"getWallet\":2},\"argumentValues\":{\"endpointDescription\":{\"getEndpointDescription\":\"guess\"},\"argument\":{\"contents\":[[\"guessWord\",{\"contents\":\"Marlowe\",\"tag\":\"FormStringF\"}]],\"tag\":\"FormObjectF\"}},\"tag\":\"CallEndpoint\"},{\"blocks\":1,\"tag\":\"AddBlocks\"},{\"caller\":{\"getWallet\":3},\"argumentValues\":{\"endpointDescription\":{\"getEndpointDescription\":\"guess\"},\"argument\":{\"contents\":[[\"guessWord\",{\"contents\":\"Plutus\",\"tag\":\"FormStringF\"}]],\"tag\":\"FormObjectF\"}},\"tag\":\"CallEndpoint\"},{\"blocks\":1,\"tag\":\"AddBlocks\"}]}]]", + "_gistFileContent": "[0,[{\"simulationWallets\":[{\"simulatorWalletWallet\":{\"getWallet\":1},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}},{\"simulatorWalletWallet\":{\"getWallet\":2},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}},{\"simulatorWalletWallet\":{\"getWallet\":3},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}}],\"simulationName\":\"Basic Game\",\"simulationId\":1,\"simulationActions\":[{\"caller\":{\"getWallet\":1},\"argumentValues\":{\"endpointDescription\":{\"getEndpointDescription\":\"lock\"},\"argument\":{\"contents\":[[\"secretWord\",{\"contents\":\"Plutus\",\"tag\":\"FormStringF\"}],[\"amount\",{\"contents\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},50]]]]},\"tag\":\"FormValueF\"}]],\"tag\":\"FormObjectF\"}},\"tag\":\"CallEndpoint\"},{\"blocks\":1,\"tag\":\"AddBlocks\"},{\"caller\":{\"getWallet\":2},\"argumentValues\":{\"endpointDescription\":{\"getEndpointDescription\":\"guess\"},\"argument\":{\"contents\":[[\"guessWord\",{\"contents\":\"Plutus\",\"tag\":\"FormStringF\"}]],\"tag\":\"FormObjectF\"}},\"tag\":\"CallEndpoint\"},{\"blocks\":1,\"tag\":\"AddBlocks\"}]},{\"simulationWallets\":[{\"simulatorWalletWallet\":{\"getWallet\":1},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}},{\"simulatorWalletWallet\":{\"getWallet\":2},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}},{\"simulatorWalletWallet\":{\"getWallet\":3},\"simulatorWalletBalance\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},100]]]]}}],\"simulationName\":\"One Bad Guess\",\"simulationId\":2,\"simulationActions\":[{\"caller\":{\"getWallet\":1},\"argumentValues\":{\"endpointDescription\":{\"getEndpointDescription\":\"lock\"},\"argument\":{\"contents\":[[\"secretWord\",{\"contents\":\"Plutus\",\"tag\":\"FormStringF\"}],[\"amount\",{\"contents\":{\"getValue\":[[{\"unCurrencySymbol\":\"\"},[[{\"unTokenName\":\"\"},50]]]]},\"tag\":\"FormValueF\"}]],\"tag\":\"FormObjectF\"}},\"tag\":\"CallEndpoint\"},{\"blocks\":1,\"tag\":\"AddBlocks\"},{\"caller\":{\"getWallet\":2},\"argumentValues\":{\"endpointDescription\":{\"getEndpointDescription\":\"guess\"},\"argument\":{\"contents\":[[\"guessWord\",{\"contents\":\"Marlowe\",\"tag\":\"FormStringF\"}]],\"tag\":\"FormObjectF\"}},\"tag\":\"CallEndpoint\"},{\"blocks\":1,\"tag\":\"AddBlocks\"},{\"caller\":{\"getWallet\":3},\"argumentValues\":{\"endpointDescription\":{\"getEndpointDescription\":\"guess\"},\"argument\":{\"contents\":[[\"guessWord\",{\"contents\":\"Plutus\",\"tag\":\"FormStringF\"}]],\"tag\":\"FormObjectF\"}},\"tag\":\"CallEndpoint\"},{\"blocks\":1,\"tag\":\"AddBlocks\"}]}]]", "_gistFileLanguage": "JSON", "_gistFileType": "application/json", "_gistFileFilename": "Simulation.json" diff --git a/plutus-playground-client/web-common b/plutus-playground-client/web-common deleted file mode 120000 index 3159f1766a..0000000000 --- a/plutus-playground-client/web-common +++ /dev/null @@ -1 +0,0 @@ -../web-common \ No newline at end of file diff --git a/plutus-playground-client/webpack.config.js b/plutus-playground-client/webpack.config.js index 7a708c2c74..47fd8f5c3c 100644 --- a/plutus-playground-client/webpack.config.js +++ b/plutus-playground-client/webpack.config.js @@ -48,22 +48,31 @@ module.exports = { test: /\.purs$/, use: [ { - loader: "purs-loader", + loader: 'purs-loader', options: { - src: [ - "src/**/*.purs", - "generated/**/*.purs", - ".spago/*/*/src/**/*.purs", - "web-common/**/*.purs", - "web-common-plutus/**/*.purs", - "web-common-playground/**/*.purs", - ], - psc: "psa", bundle: !isDevelopment, + psc: "psa", + pscArgs: { + strict: true, + censorLib: true, + stash: isDevelopment, + isLib: ["generated", ".spago"], + }, + spago: isDevelopment, watch: isDevelopment, - }, - }, - ], + src: isDevelopment + ? [] + : [ + '.spago/*/*/src/**/*.purs', + 'src/**/*.purs', + 'test/**/*.purs', + 'generated/**/*.purs', + "web-common-plutus/src/**/*.purs", + "web-common-playground/src/**/*.purs", + ], + } + } + ] }, { test: /\.tsx?$/, loader: "ts-loader", @@ -107,7 +116,7 @@ module.exports = { }, plugins: [ new HtmlWebpackPlugin({ - template: "web-common/static/index.html", + template: `${process.env.WEB_COMMON_SRC}/static/index.html`, favicon: "static/favicon.ico", title: "Plutus Playground", productName: "plutus-playground", diff --git a/plutus-playground-server/app/PSGenerator.hs b/plutus-playground-server/app/PSGenerator.hs index b889cd9ad0..aa27c7de28 100644 --- a/plutus-playground-server/app/PSGenerator.hs +++ b/plutus-playground-server/app/PSGenerator.hs @@ -44,10 +44,8 @@ import HelloWorldSimulations qualified import Interpreter qualified as Webghc import Language.Haskell.Interpreter (CompilationError, InterpreterError, InterpreterResult (InterpreterResult), SourceCode (SourceCode), Warning, result, warnings) -import Language.PureScript.Bridge (BridgePart, Language (Haskell), SumType, buildBridge, equal, genericShow, mkSumType, - order, writePSTypesWith) -import Language.PureScript.Bridge.CodeGenSwitches (ForeignOptions (ForeignOptions), genForeign, - unwrapSingleConstructors) +import Language.PureScript.Bridge (BridgePart, Language (Haskell), SumType, argonaut, buildBridge, equal, genericShow, + mkSumType, order, writePSTypes) import Language.PureScript.Bridge.TypeParameters (A) import Ledger.CardanoWallet qualified as CW import Ledger.Tx.CardanoAPI (ToCardanoError) @@ -65,8 +63,8 @@ import Playground.Usecases qualified as Usecases import Plutus.Contract.Checkpoint (CheckpointKey, CheckpointLogMsg) import Schema (FormSchema, formArgumentToJson) import Servant ((:<|>)) -import Servant.PureScript (HasBridge, Settings, _generateSubscriberAPI, apiModuleName, defaultBridge, defaultSettings, - languageBridge, writeAPIModuleWithSettings) +import Servant.PureScript (HasBridge, Settings, apiModuleName, defaultBridge, defaultSettings, languageBridge, + writeAPIModuleWithSettings) import Starter qualified import StarterSimulations qualified import System.FilePath (()) @@ -102,44 +100,42 @@ myTypes :: [SumType 'Haskell] myTypes = PSGenerator.Common.ledgerTypes <> PSGenerator.Common.playgroundTypes <> - [ (genericShow <*> (equal <*> mkSumType)) (Proxy @CompilationResult) - , (genericShow <*> (equal <*> mkSumType)) (Proxy @Warning) - , (genericShow <*> (equal <*> mkSumType)) (Proxy @SourceCode) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @EM.Wallet) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @CW.WalletNumber) - , (genericShow <*> (equal <*> mkSumType)) (Proxy @Simulation) - , (genericShow <*> (equal <*> mkSumType)) (Proxy @ContractDemo) - , (genericShow <*> (equal <*> mkSumType)) (Proxy @SimulatorWallet) - , (genericShow <*> mkSumType) (Proxy @CompilationError) - , (genericShow <*> mkSumType) (Proxy @Evaluation) - , (genericShow <*> mkSumType) (Proxy @EvaluationResult) - , (genericShow <*> mkSumType) (Proxy @EM.EmulatorEvent') - , (genericShow <*> mkSumType) (Proxy @(EM.EmulatorTimeEvent A)) - , (genericShow <*> mkSumType) (Proxy @EM.ChainEvent) - , (genericShow <*> mkSumType) (Proxy @Log.LogLevel) - , (genericShow <*> mkSumType) (Proxy @(Log.LogMessage A)) - , (genericShow <*> mkSumType) (Proxy @EM.WalletEvent) - , (genericShow <*> mkSumType) (Proxy @EM.NodeClientEvent) - , (genericShow <*> mkSumType) (Proxy @PlaygroundError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @WalletAPIError) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @ToCardanoError) - , (order <*> (genericShow <*> mkSumType)) (Proxy @SequenceId) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @AnnotatedTx) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @DereferencedInput) - , (order <*> (genericShow <*> mkSumType)) (Proxy @BeneficialOwner) - , (equal <*> (genericShow <*> mkSumType)) (Proxy @TxKey) - , (genericShow <*> mkSumType) (Proxy @InterpreterError) - , (genericShow <*> (equal <*> mkSumType)) (Proxy @(InterpreterResult A)) - , (genericShow <*> mkSumType) (Proxy @CheckpointLogMsg) - , (genericShow <*> mkSumType) (Proxy @CheckpointKey) - , (genericShow <*> mkSumType) (Proxy @EM.RequestHandlerLogMsg) - , (genericShow <*> mkSumType) (Proxy @EM.TxBalanceMsg) + [ genericShow $ equal $ argonaut $ mkSumType @CompilationResult + , genericShow $ equal $ argonaut $ mkSumType @Warning + , genericShow $ equal $ argonaut $ mkSumType @SourceCode + , equal $ genericShow $ argonaut $ mkSumType @EM.Wallet + , equal $ genericShow $ argonaut $ mkSumType @CW.WalletNumber + , genericShow $ equal $ argonaut $ mkSumType @Simulation + , genericShow $ equal $ argonaut $ mkSumType @ContractDemo + , genericShow $ equal $ argonaut $ mkSumType @SimulatorWallet + , genericShow $ argonaut $ mkSumType @CompilationError + , genericShow $ argonaut $ mkSumType @Evaluation + , genericShow $ argonaut $ mkSumType @EvaluationResult + , genericShow $ argonaut $ mkSumType @EM.EmulatorEvent' + , genericShow $ argonaut $ mkSumType @(EM.EmulatorTimeEvent A) + , genericShow $ argonaut $ mkSumType @EM.ChainEvent + , equal $ order $ genericShow $ argonaut $ mkSumType @Log.LogLevel + , genericShow $ argonaut $ mkSumType @(Log.LogMessage A) + , genericShow $ argonaut $ mkSumType @EM.WalletEvent + , genericShow $ argonaut $ mkSumType @EM.NodeClientEvent + , genericShow $ argonaut $ mkSumType @PlaygroundError + , equal $ genericShow $ argonaut $ mkSumType @WalletAPIError + , equal $ genericShow $ argonaut $ mkSumType @ToCardanoError + , order $ genericShow $ argonaut $ mkSumType @SequenceId + , equal $ genericShow $ argonaut $ mkSumType @AnnotatedTx + , equal $ genericShow $ argonaut $ mkSumType @DereferencedInput + , order $ genericShow $ argonaut $ mkSumType @BeneficialOwner + , equal $ genericShow $ argonaut $ mkSumType @TxKey + , genericShow $ argonaut $ mkSumType @InterpreterError + , genericShow $ equal $ argonaut $ mkSumType @(InterpreterResult A) + , genericShow $ argonaut $ mkSumType @CheckpointLogMsg + , genericShow $ argonaut $ mkSumType @CheckpointKey + , genericShow $ argonaut $ mkSumType @EM.RequestHandlerLogMsg + , genericShow $ argonaut $ mkSumType @EM.TxBalanceMsg ] mySettings :: Settings -mySettings = - (defaultSettings & set apiModuleName "Playground.Server") - {_generateSubscriberAPI = False} +mySettings = defaultSettings & set apiModuleName "Playground.Server" multilineString :: Text -> Text -> Text multilineString name value = @@ -226,6 +222,7 @@ toExpression = traverse (fmap encodeToText . formArgumentToJson) ------------------------------------------------------------ generate :: FilePath -> IO () generate outputDir = do + writePSTypes outputDir (buildBridge myBridge) myTypes writeAPIModuleWithSettings mySettings outputDir @@ -233,11 +230,6 @@ generate outputDir = do (Proxy @(API.API :<|> Auth.FrontendAPI)) - writePSTypesWith - (genForeign (ForeignOptions {unwrapSingleConstructors = True})) - outputDir - (buildBridge myBridge) - myTypes writeUsecases outputDir writeTestData outputDir putStrLn $ "Done: " <> outputDir diff --git a/shell.nix b/shell.nix index ced559b021..59773c0c6b 100644 --- a/shell.nix +++ b/shell.nix @@ -3,10 +3,9 @@ , packages ? import ./. { inherit system enableHaskellProfiling; } }: let - inherit (packages) pkgs plutus-apps plutus-playground plutus-pab docs webCommon; + inherit (packages) pkgs plutus-apps plutus-playground docs webCommon; inherit (pkgs) stdenv lib utillinux python3 nixpkgs-fmt; inherit (plutus-apps) haskell stylish-haskell sphinxcontrib-haddock sphinx-markdown-tables sphinxemoji nix-pre-commit-hooks cardano-cli cardano-node; - inherit (plutus-apps) purty purty-pre-commit purs spargo; # For Sphinx, and ad-hoc usage sphinxTools = python3.withPackages (ps: [ @@ -27,7 +26,7 @@ let stylish-haskell = stylish-haskell; nixpkgs-fmt = nixpkgs-fmt; shellcheck = pkgs.shellcheck; - purty = purty-pre-commit; + purty = plutus-apps.purty-pre-commit; }; hooks = { purty.enable = true; @@ -37,7 +36,7 @@ let # While nixpkgs-fmt does exclude patterns specified in `.ignore` this # does not appear to work inside the hook. For now we have to thus # maintain excludes here *and* in `./.ignore` and *keep them in sync*. - excludes = [ ".*nix/pkgs/haskell/materialized.*/.*" ".*/spago-packages.nix$" ".*/packages.nix$" ]; + excludes = [ ".*nix/pkgs/haskell/materialized.*/.*" ".*/spago-packages.nix$" ]; }; shellcheck.enable = true; png-optimization = { @@ -70,7 +69,6 @@ let yq z3 zlib - nodePackages.purescript-language-server ]; # local build inputs ( -> ./nix/pkgs/default.nix ) @@ -86,11 +84,8 @@ let hlint plutus-playground.generate-purescript plutus-playground.start-backend - plutus-pab.generate-purescript - plutus-pab.migrate - plutus-pab.start-backend - plutus-pab.start-all-servers - plutus-pab.start-all-servers-m + psa + purescript-language-server purs purty spago @@ -99,7 +94,6 @@ let updateMaterialized updateClientDeps docs.build-and-serve-docs - webCommon.newComponent ]); in @@ -119,5 +113,8 @@ haskell.project.shellFor { # affinity APIs! + lib.optionalString stdenv.isLinux '' ${utillinux}/bin/taskset -pc 0-1000 $$ + '' + + '' + export WEB_COMMON_SRC=${webCommon} ''; } diff --git a/stack.yaml b/stack.yaml index 6b6a0f433d..c3e6ca335c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -58,7 +58,7 @@ extra-deps: - git: https://github.com/input-output-hk/purescript-bridge.git commit: 6a92d7853ea514be8b70bab5e72077bf5a510596 - git: https://github.com/input-output-hk/servant-purescript.git - commit: a0c7c7e37c95564061247461aef4be505a853538 + commit: ebea59c7bdfc0338d83fca772b9a57e28560bcde - git: https://github.com/input-output-hk/cardano-crypto.git commit: 07397f0e50da97eaa0575d93bee7ac4b2b2576ec - git: https://github.com/input-output-hk/cardano-base diff --git a/web-common-playground/src/Gists/View.purs b/web-common-playground/src/Gists/View.purs index 3653881ec5..942fcd0b38 100644 --- a/web-common-playground/src/Gists/View.purs +++ b/web-common-playground/src/Gists/View.purs @@ -4,28 +4,27 @@ module Gists.View , idLoadGist ) where +import Prologue hiding (div) import Gists.Types (GistAction(..), parseGistUrl) import AjaxUtils (closeableAjaxErrorPane) import Auth (AuthRole(..), AuthStatus, authStatusAuthRole) import Bootstrap (btn, btnDanger, btnSecondary, btnSmall, empty, formControl, formGroup, isInvalid, isValid, nbsp) import DOM.HTML.Indexed.InputType (InputType(..)) -import Data.Either (Either(..), isRight, note) import Data.Lens (view) -import Data.Maybe (Maybe(..), fromMaybe) +import Data.Maybe (fromMaybe) import Gist (Gist, GistId, gistHtmlUrl) import Halogen.HTML (ClassName(ClassName), HTML, IProp, a, button, div, input, label, text) import Halogen.HTML.Events (onClick, onValueInput) -import Halogen.HTML.Properties (class_, classes, disabled, for, href, id_, target, type_, value) +import Halogen.HTML.Properties (class_, classes, disabled, for, href, id, target, type_, value) import Icons (Icon(..), icon) import Network.RemoteData (RemoteData(NotAsked, Loading, Failure, Success)) -import Prelude (const, ($), (<$>), (<<<), (<>), (=<<)) -import Servant.PureScript.Ajax (AjaxError) +import Servant.PureScript (AjaxError) idPublishGist :: forall r i. IProp ( id :: String | r ) i -idPublishGist = id_ "publish-gist" +idPublishGist = id "publish-gist" idLoadGist :: forall r i. IProp ( id :: String | r ) i -idLoadGist = id_ "load-gist" +idLoadGist = id "load-gist" gistControls :: forall a p. @@ -50,15 +49,15 @@ gistControls { authStatus, createGistResult, gistErrorPaneVisible, gistUrl } = , input [ type_ InputText , value $ fromMaybe "" $ gistUrl - , id_ gistIdInputId + , id gistIdInputId , classes ( [ formControl, ClassName "form-control-sm" ] <> case parsedGistId of - Just (Left err) -> [ isInvalid ] - Just (Right err) -> [ isValid ] + Just (Left _) -> [ isInvalid ] + Just (Right _) -> [ isValid ] Nothing -> [] ) - , onValueInput $ Just <<< SetGistUrl + , onValueInput SetGistUrl ] ] , loadButton @@ -67,14 +66,12 @@ gistControls { authStatus, createGistResult, gistErrorPaneVisible, gistUrl } = , case createGistResult, gistErrorPaneVisible of Success gist, _ -> gistPane gist Failure err, true -> AjaxErrorPaneAction <$> closeableAjaxErrorPane err - Failure err, false -> empty + Failure _, false -> empty _, _ -> empty ] where gistIdInputId = "gist-id" - canTryLoad = isRight $ parseGistUrl =<< note "No gist Url set" gistUrl - parsedGistId :: Maybe (Either String GistId) parsedGistId = parseGistUrl <$> gistUrl @@ -116,7 +113,7 @@ gistControls { authStatus, createGistResult, gistErrorPaneVisible, gistUrl } = button [ idPublishGist , classes [ btn, btnSmall, btnSecondary ] - , onClick $ const $ Just PublishOrUpdateGist + , onClick $ const PublishOrUpdateGist ] [ text "Save" ] Loading -> @@ -131,7 +128,7 @@ gistControls { authStatus, createGistResult, gistErrorPaneVisible, gistUrl } = button [ idPublishGist , classes [ btn, btnSmall, btnSecondary ] - , onClick $ const $ Just PublishOrUpdateGist + , onClick $ const PublishOrUpdateGist ] [ text "Save" ] @@ -145,15 +142,15 @@ gistControls { authStatus, createGistResult, gistErrorPaneVisible, gistUrl } = [ btn , btnSmall , case parsedGistId of - Just (Left url) -> btnDanger - Just (Right url) -> btnSecondary + Just (Left _) -> btnDanger + Just (Right _) -> btnSecondary Nothing -> btnSecondary ] - , onClick $ const $ Just LoadGist + , onClick $ const LoadGist , disabled $ case parsedGistId of - Just (Left url) -> true - Just (Right url) -> false + Just (Left _) -> true + Just (Right _) -> false Nothing -> true ] [ text "Load" ] diff --git a/web-common-plutus/src/Chain/Types.purs b/web-common-plutus/src/Chain/Types.purs index 9af8568a68..7c46fdb741 100644 --- a/web-common-plutus/src/Chain/Types.purs +++ b/web-common-plutus/src/Chain/Types.purs @@ -1,17 +1,17 @@ module Chain.Types where -import Prelude +import Prologue import Clipboard (Action) as Clipboard -import Data.BigInteger (BigInteger) +import Data.BigInt.Argonaut (BigInt) import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Lens (Fold', Iso', Lens', Prism', Traversal', anyOf, filtered, preview, prism', traversed) +import Data.Show.Generic (genericShow) +import Data.Lens (Fold', Iso', Lens', Prism', Traversal', anyOf, filtered, preview, prism', folded, traversed) import Data.Lens.Iso.Newtype (_Newtype) import Data.Lens.Record (prop) import Data.Map (Map) -import Data.Maybe (Maybe(..)) import Data.Newtype (class Newtype) -import Data.Symbol (SProxy(..)) +import Type.Proxy (Proxy(..)) +import Data.Set (Set) import Plutus.V1.Ledger.Address (Address(..)) import Plutus.V1.Ledger.Credential (Credential(..)) import Plutus.V1.Ledger.Crypto (PubKey, Signature) @@ -65,61 +65,61 @@ initialState = } _chainFocus :: forall r a. Lens' { chainFocus :: a | r } a -_chainFocus = prop (SProxy :: SProxy "chainFocus") +_chainFocus = prop (Proxy :: _ "chainFocus") _chainFocusAppearing :: forall r a. Lens' { chainFocusAppearing :: a | r } a -_chainFocusAppearing = prop (SProxy :: SProxy "chainFocusAppearing") +_chainFocusAppearing = prop (Proxy :: _ "chainFocusAppearing") _chainFocusAge :: forall r a. Lens' { chainFocusAge :: a | r } a -_chainFocusAge = prop (SProxy :: SProxy "chainFocusAge") +_chainFocusAge = prop (Proxy :: _ "chainFocusAge") _sequenceId :: Lens' AnnotatedTx SequenceId -_sequenceId = _Newtype <<< prop (SProxy :: SProxy "sequenceId") +_sequenceId = _Newtype <<< prop (Proxy :: _ "sequenceId") _dereferencedInputs :: Lens' AnnotatedTx (Array DereferencedInput) -_dereferencedInputs = _Newtype <<< prop (SProxy :: SProxy "dereferencedInputs") +_dereferencedInputs = _Newtype <<< prop (Proxy :: _ "dereferencedInputs") _value :: forall s a r. Newtype s { getValue :: a | r } => Lens' s a -_value = _Newtype <<< prop (SProxy :: SProxy "getValue") +_value = _Newtype <<< prop (Proxy :: _ "getValue") _txIdOf :: Lens' AnnotatedTx TxId -_txIdOf = _Newtype <<< prop (SProxy :: SProxy "txId") +_txIdOf = _Newtype <<< prop (Proxy :: _ "txId") _balances :: Lens' AnnotatedTx (Map BeneficialOwner Value) -_balances = _Newtype <<< prop (SProxy :: SProxy "balances") +_balances = _Newtype <<< prop (Proxy :: _ "balances") _tx :: Lens' AnnotatedTx Tx -_tx = _Newtype <<< prop (SProxy :: SProxy "tx") +_tx = _Newtype <<< prop (Proxy :: _ "tx") _txFee :: Lens' Tx Value -_txFee = _Newtype <<< prop (SProxy :: SProxy "txFee") +_txFee = _Newtype <<< prop (Proxy :: _ "txFee") _txMint :: Lens' Tx Value -_txMint = _Newtype <<< prop (SProxy :: SProxy "txMint") +_txMint = _Newtype <<< prop (Proxy :: _ "txMint") _txValidRange :: Lens' Tx (Interval Slot) -_txValidRange = _Newtype <<< prop (SProxy :: SProxy "txValidRange") +_txValidRange = _Newtype <<< prop (Proxy :: _ "txValidRange") _txSignatures :: Lens' Tx (Map PubKey Signature) -_txSignatures = _Newtype <<< prop (SProxy :: SProxy "txSignatures") +_txSignatures = _Newtype <<< prop (Proxy :: _ "txSignatures") -_txInputs :: Lens' Tx (Array TxIn) -_txInputs = _Newtype <<< prop (SProxy :: SProxy "txInputs") +_txInputs :: Lens' Tx (Set TxIn) +_txInputs = _Newtype <<< prop (Proxy :: _ "txInputs") _txOutputs :: Lens' Tx (Array TxOut) -_txOutputs = _Newtype <<< prop (SProxy :: SProxy "txOutputs") +_txOutputs = _Newtype <<< prop (Proxy :: _ "txOutputs") _txInRef :: Lens' TxIn TxOutRef -_txInRef = _Newtype <<< prop (SProxy :: SProxy "txInRef") +_txInRef = _Newtype <<< prop (Proxy :: _ "txInRef") _txOutRefId :: Lens' TxOutRef TxId -_txOutRefId = _Newtype <<< prop (SProxy :: SProxy "txOutRefId") +_txOutRefId = _Newtype <<< prop (Proxy :: _ "txOutRefId") _txKeyTxId :: Lens' TxKey TxId -_txKeyTxId = _TxKey <<< prop (SProxy :: SProxy "_txKeyTxId") +_txKeyTxId = _TxKey <<< prop (Proxy :: _ "_txKeyTxId") -_txKeyTxOutRefIdx :: Lens' TxKey BigInteger -_txKeyTxOutRefIdx = _TxKey <<< prop (SProxy :: SProxy "_txKeyTxOutRefIdx") +_txKeyTxOutRefIdx :: Lens' TxKey BigInt +_txKeyTxOutRefIdx = _TxKey <<< prop (Proxy :: _ "_txKeyTxOutRefIdx") toBeneficialOwner :: TxOut -> BeneficialOwner toBeneficialOwner (TxOut { txOutAddress }) = @@ -137,11 +137,11 @@ _findTx focussedTxId = (_AnnotatedBlocks <<< filtered isAnnotationOf) isAnnotationOf (AnnotatedTx { txId }) = txId == focussedTxId -- | Where is this output consumed? -findConsumptionPoint :: BigInteger -> TxId -> AnnotatedBlockchain -> Maybe AnnotatedTx +findConsumptionPoint :: BigInt -> TxId -> AnnotatedBlockchain -> Maybe AnnotatedTx findConsumptionPoint outputIndex txId = preview (_AnnotatedBlocks <<< filtered isMatchingTx) where isMatchingTx :: AnnotatedTx -> Boolean - isMatchingTx tx = anyOf (_tx <<< _txInputs <<< traversed <<< _txInRef) ((==) txOutRef) tx + isMatchingTx tx = anyOf (_tx <<< _txInputs <<< folded <<< _txInRef) ((==) txOutRef) tx txOutRef :: TxOutRef txOutRef = diff --git a/web-common-plutus/src/Chain/View.purs b/web-common-plutus/src/Chain/View.purs index a71260650c..6c1a25cb8b 100644 --- a/web-common-plutus/src/Chain/View.purs +++ b/web-common-plutus/src/Chain/View.purs @@ -11,13 +11,12 @@ import Bootstrap.Extra (clickable) import Clipboard (showShortCopyLong) import Data.Array ((:)) import Data.Array as Array -import Data.BigInteger (BigInteger) -import Data.BigInteger as BigInteger +import Data.BigInt.Argonaut (BigInt) +import Data.BigInt.Argonaut as BigInt import Data.Foldable (foldMap, foldr) import Data.Foldable.Extra (interleave) import Data.FoldableWithIndex (foldMapWithIndex, foldrWithIndex) import Data.FunctorWithIndex (mapWithIndex) -import Data.Json.JsonTuple (JsonTuple(..)) import Data.Lens (Traversal', _Just, filtered, has, preview, to, view) import Data.Lens.Index (ix) import Data.Map (Map) @@ -37,7 +36,7 @@ import Ledger.Extra (humaniseSlotInterval) import Plutus.V1.Ledger.Tx (TxOut(..)) import Plutus.V1.Ledger.TxId (TxId(..)) import Plutus.V1.Ledger.Value (CurrencySymbol(..), TokenName(..), Value(..)) -import Prelude (Ordering(..), const, eq, pure, show, zero, ($), (<$>), (<<<), (<>)) +import Prologue (Ordering(..), Tuple, const, eq, pure, show, zero, ($), (<$>), (<<<), (<>)) import Wallet.Rollup.Types (AnnotatedTx(..), BeneficialOwner(..), DereferencedInput(..), SequenceId(..)) import Web.UIEvent.MouseEvent (MouseEvent) @@ -82,14 +81,14 @@ amountClass :: ClassName amountClass = ClassName "amount" chainSlotView :: forall p. State -> Array AnnotatedTx -> HTML p Action -chainSlotView state [] = empty +chainSlotView _ [] = empty chainSlotView state chainSlot = div [ classes [ colXs12, colSm6, colMd3, colLg2, slotClass ] ] (blockView state <$> chainSlot) blockView :: forall p. State -> AnnotatedTx -> HTML p Action -blockView state annotatedTx@(AnnotatedTx { txId, sequenceId }) = +blockView state (AnnotatedTx { txId, sequenceId }) = div [ classes ([ card, clickable, ClassName "transaction" ] <> if isActive then [ active ] else []) , onClickFocusTx txId @@ -99,11 +98,11 @@ blockView state annotatedTx@(AnnotatedTx { txId, sequenceId }) = isActive = has (_chainFocus <<< _Just <<< filtered (eq txId)) state detailView :: forall p. NamingFn -> State -> AnnotatedBlockchain -> HTML p Action -detailView namingFn state@{ chainFocus: Just focussedTxId } annotatedBlockchain = case preview (_findTx focussedTxId) annotatedBlockchain of +detailView namingFn { chainFocus: Just focussedTxId } annotatedBlockchain = case preview (_findTx focussedTxId) annotatedBlockchain of Just annotatedTx -> transactionDetailView namingFn annotatedBlockchain annotatedTx Nothing -> empty -detailView _ state@{ chainFocus: Nothing } _ = empty +detailView _ { chainFocus: Nothing } _ = empty transactionDetailView :: forall p. NamingFn -> AnnotatedBlockchain -> AnnotatedTx -> HTML p Action transactionDetailView namingFn annotatedBlockchain annotatedTx = @@ -148,7 +147,7 @@ transactionDetailView namingFn annotatedBlockchain annotatedTx = namingFn (view _txIdOf annotatedTx) annotatedBlockchain - (BigInteger.fromInt index) + (BigInt.fromInt index) txout ) (view (_tx <<< _txOutputs) annotatedTx) @@ -253,10 +252,10 @@ balancesTable namingFn sequenceId balances = foldMap ( \token -> let - _thisBalance :: Traversal' (Map BeneficialOwner Value) BigInteger + _thisBalance :: Traversal' (Map BeneficialOwner Value) BigInt _thisBalance = ix owner <<< _value <<< ix currency <<< ix token - amount :: Maybe BigInteger + amount :: Maybe BigInt amount = preview _thisBalance balances in [ td [ class_ amountClass ] @@ -285,7 +284,7 @@ collectBalanceTableHeadings balances = foldr collectCurrencies Map.empty $ Map.v collectCurrencies :: Value -> Map CurrencySymbol (Set TokenName) -> Map CurrencySymbol (Set TokenName) collectCurrencies (Value { getValue: entries }) ownersBalance = foldrWithIndex collectTokenNames ownersBalance entries - collectTokenNames :: CurrencySymbol -> AssocMap.Map TokenName BigInteger -> Map CurrencySymbol (Set TokenName) -> Map CurrencySymbol (Set TokenName) + collectTokenNames :: CurrencySymbol -> AssocMap.Map TokenName BigInt -> Map CurrencySymbol (Set TokenName) -> Map CurrencySymbol (Set TokenName) collectTokenNames currency currencyBalances = Map.insertWith Set.union currency $ AssocMap.keys currencyBalances sequenceIdView :: forall p i. SequenceId -> HTML p i @@ -331,7 +330,7 @@ dereferencedInputView namingFn annotatedBlockchain (DereferencedInput { original originatingTx :: Maybe AnnotatedTx originatingTx = preview (_findTx txId) annotatedBlockchain -dereferencedInputView namingFn annotatedBlockchain (InputNotFound txKey) = +dereferencedInputView _ _ (InputNotFound txKey) = div [ classes [ card, entryClass, notFoundClass ] ] [ div [ classes [ cardHeader, textTruncate ] ] @@ -339,11 +338,11 @@ dereferencedInputView namingFn annotatedBlockchain (InputNotFound txKey) = , cardBody_ [ txIdView (view _txKeyTxId txKey) , br_ - , text $ "Index: " <> show (view _txKeyTxOutRefIdx txKey) + , text $ "Index: " <> BigInt.toString (view _txKeyTxOutRefIdx txKey) ] ] -outputView :: forall p. NamingFn -> TxId -> AnnotatedBlockchain -> BigInteger -> TxOut -> HTML p Action +outputView :: forall p. NamingFn -> TxId -> AnnotatedBlockchain -> BigInt -> TxOut -> HTML p Action outputView namingFn txId annotatedBlockchain outputIndex txOut = txOutOfView namingFn false txOut $ case consumedInTx of @@ -361,7 +360,7 @@ outputView namingFn txId annotatedBlockchain outputIndex txOut = consumedInTx = findConsumptionPoint outputIndex txId annotatedBlockchain txOutOfView :: forall p. NamingFn -> Boolean -> TxOut -> Maybe (HTML p Action) -> HTML p Action -txOutOfView namingFn showArrow txOut@(TxOut { txOutAddress, txOutValue }) mFooter = +txOutOfView namingFn showArrow txOut@(TxOut { txOutValue }) mFooter = div [ classes [ card, entryClass, beneficialOwnerClass beneficialOwner ] ] [ div [ classes [ cardHeader, textTruncate ] ] @@ -429,24 +428,24 @@ valueView (Value { getValue: (AssocMap.Map []) }) = empty valueView (Value { getValue: (AssocMap.Map currencies) }) = div_ (interleave hr_ (currencyView <$> currencies)) where - currencyView :: JsonTuple CurrencySymbol (AssocMap.Map TokenName BigInteger) -> HTML p i - currencyView (JsonTuple (currency /\ (AssocMap.Map tokens))) = + currencyView :: Tuple CurrencySymbol (AssocMap.Map TokenName BigInt) -> HTML p i + currencyView (currency /\ (AssocMap.Map tokens)) = div_ [ div [ class_ Bootstrap.textTruncate ] [ strong_ [ text $ showCurrency currency ] ] , div_ (tokenView <$> tokens) ] - tokenView :: JsonTuple TokenName BigInteger -> HTML p i - tokenView (JsonTuple (token /\ amount)) = + tokenView :: Tuple TokenName BigInt -> HTML p i + tokenView (token /\ amount) = row_ [ col_ [ showToken token ] , div [ classes [ col, amountClass ] ] [ text $ formatAmount amount ] ] -formatAmount :: BigInteger -> String -formatAmount = BigInteger.format +formatAmount :: BigInt -> String +formatAmount = BigInt.toString showCurrency :: CurrencySymbol -> String showCurrency (CurrencySymbol { unCurrencySymbol: "" }) = "Ada" @@ -462,6 +461,5 @@ onClickFocusTx :: forall p. TxId -> IProp ( onClick :: MouseEvent | p ) Action onClickFocusTx txId = onClick $ const - $ Just $ FocusTx $ Just txId diff --git a/web-common-plutus/src/Data/Functor/Foldable.purs b/web-common-plutus/src/Data/Functor/Foldable.purs index 6e4c0a081a..0f8c2f2008 100644 --- a/web-common-plutus/src/Data/Functor/Foldable.purs +++ b/web-common-plutus/src/Data/Functor/Foldable.purs @@ -1,14 +1,12 @@ module Data.Functor.Foldable where -import AjaxUtils (defaultJsonOptions) -import Data.Eq (class Eq, class Eq1) -import Data.Functor (class Functor) +import Prologue +import Data.Argonaut.Decode (class DecodeJson, decodeJson) +import Data.Argonaut.Encode (class EncodeJson, encodeJson) +import Data.Eq (class Eq1) import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) +import Data.Show.Generic (genericShow) import Data.Newtype (class Newtype) -import Data.Show (class Show) -import Foreign.Generic (genericDecode, genericEncode) -import Foreign.Generic.Class (class Decode, class Encode) import Matryoshka (class Corecursive, class Recursive) import Schema (FormArgumentF) @@ -30,11 +28,11 @@ instance corecursiveFix ∷ Functor f ⇒ Corecursive (Fix f) f where embed v = Fix v ------------------------------------------------------------ -instance encodeFix :: Encode (Fix FormArgumentF) where - encode (Fix value) = genericEncode defaultJsonOptions value +instance encodeJsonFixFormArgumentF :: EncodeJson (Fix FormArgumentF) where + encodeJson (Fix f) = encodeJson f -instance decodeFix :: Decode (Fix FormArgumentF) where - decode value = genericDecode defaultJsonOptions value +instance decodeJsonFixFormArgumentF :: DecodeJson (Fix FormArgumentF) where + decodeJson json = Fix <$> decodeJson json -- instance showFix :: Show (Fix FormArgumentF) where diff --git a/web-common-plutus/src/Ledger/Extra.purs b/web-common-plutus/src/Ledger/Extra.purs index 214b3a910b..de8d2db37a 100644 --- a/web-common-plutus/src/Ledger/Extra.purs +++ b/web-common-plutus/src/Ledger/Extra.purs @@ -1,9 +1,9 @@ module Ledger.Extra where +import Data.BigInt.Argonaut as BigInt import Data.Lens (Lens', lens, view) import Data.Lens.Record (prop) -import Data.Json.JsonTuple (JsonTuple(..)) -import Data.Symbol (SProxy(..)) +import Type.Proxy (Proxy(..)) import Data.Tuple (Tuple(..)) import PlutusTx.AssocMap (unionWith) import PlutusTx.AssocMap as AssocMap @@ -12,7 +12,7 @@ import Plutus.V1.Ledger.Interval (Extended(..), Interval, LowerBound(..), UpperB import Plutus.V1.Ledger.Slot (Slot(..)) import Plutus.V1.Ledger.Time (POSIXTime(..)) import Plutus.V1.Ledger.Value (CurrencySymbol(..), TokenName(..), Value(..)) -import Prelude (show, (+), (<<<), (<>)) +import Prelude ((+), (<<<), (<>)) humaniseSlotInterval :: Interval Slot -> String humaniseSlotInterval interval = case from, to of @@ -28,7 +28,7 @@ humaniseSlot bound = start <> " " <> end where start = case hasBound bound of NegInf -> "the start of time" - Finite (Slot slot) -> "Slot " <> show slot.getSlot + Finite (Slot slot) -> "Slot " <> BigInt.toString slot.getSlot PosInf -> "the end of time" end = case isInclusive bound of @@ -49,7 +49,7 @@ humaniseTime bound = start <> " " <> end where start = case hasBound bound of NegInf -> "the start of time" - Finite (POSIXTime time) -> "POSIXTime " <> show time.getPOSIXTime + Finite (POSIXTime time) -> "POSIXTime " <> BigInt.toString time.getPOSIXTime PosInf -> "the end of time" end = case isInclusive bound of @@ -71,10 +71,10 @@ instance upperBoundHasBound :: HasBound (UpperBound v) v where ------------------------------------------------------------ _ivFrom :: forall a r. Lens' { ivFrom :: a | r } a -_ivFrom = prop (SProxy :: SProxy "ivFrom") +_ivFrom = prop (Proxy :: _ "ivFrom") _ivTo :: forall a r. Lens' { ivTo :: a | r } a -_ivTo = prop (SProxy :: SProxy "ivTo") +_ivTo = prop (Proxy :: _ "ivTo") _LowerBoundExtended :: forall a. Lens' (LowerBound a) (Extended a) _LowerBoundExtended = lens get set @@ -105,7 +105,7 @@ _UpperBoundInclusive = lens get set set (UpperBound e _) i = UpperBound e i _a :: forall a r. Lens' { a :: a | r } a -_a = prop (SProxy :: SProxy "a") +_a = prop (Proxy :: _ "a") ------------------------------------------------------------ sum :: Value -> Value -> Value @@ -116,10 +116,8 @@ adaToValue (Lovelace ada) = Value { getValue: AssocMap.Map - [ JsonTuple - ( Tuple - (CurrencySymbol { unCurrencySymbol: "" }) - (AssocMap.Map [ JsonTuple (Tuple (TokenName { unTokenName: "" }) ada.getLovelace) ]) - ) + [ Tuple + (CurrencySymbol { unCurrencySymbol: "" }) + (AssocMap.Map [ Tuple (TokenName { unTokenName: "" }) ada.getLovelace ]) ] } diff --git a/web-common-plutus/src/NavTabs.purs b/web-common-plutus/src/NavTabs.purs index 1f809c685f..7f6684a9dc 100644 --- a/web-common-plutus/src/NavTabs.purs +++ b/web-common-plutus/src/NavTabs.purs @@ -1,11 +1,10 @@ module NavTabs where import Bootstrap (active, container, hidden, navItem_, navLink, navTabs_) -import Data.Maybe (Maybe(..)) import Data.String as String import Halogen.HTML (HTML, a, div, div_, text) import Halogen.HTML.Events (onClick) -import Halogen.HTML.Properties (classes, id_) +import Halogen.HTML.Properties (classes, id) import Prelude (class Eq, class Show, const, show, ($), (<$>), (<>), (==)) mainTabBar :: @@ -26,9 +25,9 @@ mainTabBar mkAction tabs activeView = mkTab { link, title } = navItem_ [ a - [ id_ $ "tab-" <> String.toLower (show link) + [ id $ "tab-" <> String.toLower (show link) , classes $ [ navLink ] <> activeClass - , onClick $ const $ Just $ mkAction link + , onClick $ const $ mkAction link ] [ text title ] ] diff --git a/web-common-plutus/src/Playground/Lenses.purs b/web-common-plutus/src/Playground/Lenses.purs index 065a548abd..20aed0285b 100644 --- a/web-common-plutus/src/Playground/Lenses.purs +++ b/web-common-plutus/src/Playground/Lenses.purs @@ -7,50 +7,50 @@ import Data.Lens (Lens') import Data.Lens.Iso.Newtype (_Newtype) import Data.Lens.Record (prop) import Data.Newtype (class Newtype) -import Data.Symbol (SProxy(..)) +import Type.Proxy (Proxy(..)) import Ledger.Index (UtxoIndex, _UtxoIndex) import Plutus.V1.Ledger.Tx (TxOut, TxOutRef) import Plutus.V1.Ledger.TxId (TxId) import Plutus.V1.Ledger.Value (CurrencySymbol, TokenName, _CurrencySymbol, _TokenName) _currencySymbol :: Lens' CurrencySymbol String -_currencySymbol = _CurrencySymbol <<< prop (SProxy :: SProxy "unCurrencySymbol") +_currencySymbol = _CurrencySymbol <<< prop (Proxy :: _ "unCurrencySymbol") _tokenName :: Lens' TokenName String -_tokenName = _TokenName <<< prop (SProxy :: SProxy "unTokenName") +_tokenName = _TokenName <<< prop (Proxy :: _ "unTokenName") _amount :: forall r a. Lens' { amount :: a | r } a -_amount = prop (SProxy :: SProxy "amount") +_amount = prop (Proxy :: _ "amount") _recipient :: forall r a. Lens' { recipient :: a | r } a -_recipient = prop (SProxy :: SProxy "recipient") +_recipient = prop (Proxy :: _ "recipient") _endpointDescription :: forall r a. Lens' { endpointDescription :: a | r } a -_endpointDescription = prop (SProxy :: SProxy "endpointDescription") +_endpointDescription = prop (Proxy :: _ "endpointDescription") _getEndpointDescription :: forall s r a. Newtype s { getEndpointDescription :: a | r } => Lens' s a -_getEndpointDescription = _Newtype <<< prop (SProxy :: SProxy "getEndpointDescription") +_getEndpointDescription = _Newtype <<< prop (Proxy :: _ "getEndpointDescription") _endpointValue :: forall s r a. Newtype s { unEndpointValue :: a | r } => Lens' s a -_endpointValue = _Newtype <<< prop (SProxy :: SProxy "unEndpointValue") +_endpointValue = _Newtype <<< prop (Proxy :: _ "unEndpointValue") _schema :: forall r a. Lens' { schema :: a | r } a -_schema = prop (SProxy :: SProxy "schema") +_schema = prop (Proxy :: _ "schema") _txConfirmed :: forall s r a. Newtype s { unTxConfirmed :: a | r } => Lens' s a -_txConfirmed = _Newtype <<< prop (SProxy :: SProxy "unTxConfirmed") +_txConfirmed = _Newtype <<< prop (Proxy :: _ "unTxConfirmed") _contractInstanceTag :: forall s r a. Newtype s { unContractInstanceTag :: a | r } => Lens' s a -_contractInstanceTag = _Newtype <<< prop (SProxy :: SProxy "unContractInstanceTag") +_contractInstanceTag = _Newtype <<< prop (Proxy :: _ "unContractInstanceTag") _txId :: Lens' TxId String -_txId = _Newtype <<< prop (SProxy :: SProxy "getTxId") +_txId = _Newtype <<< prop (Proxy :: _ "getTxId") _utxoIndexEntries :: Lens' UtxoIndex (Map TxOutRef TxOut) -_utxoIndexEntries = _UtxoIndex <<< prop (SProxy :: SProxy "getIndex") +_utxoIndexEntries = _UtxoIndex <<< prop (Proxy :: _ "getIndex") _aeDescription :: forall s r a. Newtype s { aeDescription :: a | r } => Lens' s a -_aeDescription = _Newtype <<< prop (SProxy :: SProxy "aeDescription") +_aeDescription = _Newtype <<< prop (Proxy :: _ "aeDescription") _aeMetadata :: forall s r a. Newtype s { aeMetadata :: a | r } => Lens' s a -_aeMetadata = _Newtype <<< prop (SProxy :: SProxy "aeMetadata") +_aeMetadata = _Newtype <<< prop (Proxy :: _ "aeMetadata") diff --git a/web-common-plutus/src/Schema/Types.purs b/web-common-plutus/src/Schema/Types.purs index 42cc0adf00..5907cb1969 100644 --- a/web-common-plutus/src/Schema/Types.purs +++ b/web-common-plutus/src/Schema/Types.purs @@ -1,27 +1,24 @@ module Schema.Types where -import Prelude +import Prologue import Chain.Types (_value) +import Data.Argonaut.Core (Json) +import Data.Argonaut.Encode (encodeJson) import Data.Array as Array -import Data.BigInteger (BigInteger) +import Data.BigInt.Argonaut (BigInt) import Data.Foldable (fold, foldMap) import Data.Functor.Foldable (Fix(..)) import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Json.JsonTuple (JsonTuple) +import Data.Show.Generic (genericShow) import Data.Lens (_2, _Just, over, set) import Data.Lens.Index (ix) -import Data.Lens.Iso.Newtype (_Newtype) -import Data.Maybe (Maybe(..), fromMaybe) +import Data.Maybe (fromMaybe) import Data.Monoid.Additive (Additive(..)) import Data.Newtype (unwrap) import Data.RawJson (RawJson) import Data.String.Extra as String import Data.Traversable (sequence, traverse) -import Data.Tuple (Tuple) import Data.Tuple.Nested ((/\)) -import Foreign (Foreign) -import Foreign.Class (encode) import Foreign.Object as FO import PlutusTx.AssocMap as AssocMap import Plutus.V1.Ledger.Interval (Extended(..), Interval(..), LowerBound(..), UpperBound(..)) @@ -57,7 +54,7 @@ instance showFormEvent :: Show FormEvent where data FieldEvent = SetIntField (Maybe Int) - | SetBigIntegerField (Maybe BigInteger) + | SetBigIntField (Maybe BigInt) | SetBoolField Boolean | SetStringField String | SetHexField String @@ -72,9 +69,9 @@ instance showFieldEvent :: Show FieldEvent where data ActionEvent = AddAction (ContractCall FormArgument) - | AddWaitAction BigInteger + | AddWaitAction BigInt | RemoveAction Int - | SetWaitTime Int BigInteger + | SetWaitTime Int BigInt | SetWaitUntilTime Int Slot | SetPayToWalletValue Int ValueEvent | SetPayToWalletRecipient Int WalletNumber @@ -134,50 +131,41 @@ defaultTimeRange = , ivTo: UpperBound PosInf true } -formArgumentToJson :: FormArgument -> Maybe Foreign +formArgumentToJson :: FormArgument -> Maybe Json formArgumentToJson = cata algebra where - algebra :: Algebra FormArgumentF (Maybe Foreign) - algebra FormUnitF = Just $ encode (mempty :: Array Unit) + algebra :: Algebra FormArgumentF (Maybe Json) + algebra FormUnitF = Just $ encodeJson (mempty :: Array Unit) - algebra (FormBoolF b) = Just $ encode b + algebra (FormBoolF b) = Just $ encodeJson b - algebra (FormIntF n) = encode <$> n + algebra (FormIntF n) = encodeJson <$> n - algebra (FormIntegerF n) = encode <$> n + algebra (FormIntegerF n) = encodeJson <$> n - algebra (FormStringF str) = encode <$> str + algebra (FormStringF str) = encodeJson <$> str - algebra (FormRadioF _ option) = encode <$> option + algebra (FormRadioF _ option) = encodeJson <$> option - algebra (FormHexF str) = encode <<< String.toHex <$> str + algebra (FormHexF str) = encodeJson <<< String.toHex <$> str - algebra (FormTupleF (Just fieldA) (Just fieldB)) = Just $ encode [ fieldA, fieldB ] + algebra (FormTupleF (Just fieldA) (Just fieldB)) = Just $ encodeJson [ fieldA, fieldB ] algebra (FormTupleF _ _) = Nothing - algebra (FormMaybeF _ field) = encode <$> field + algebra (FormMaybeF _ field) = encodeJson <$> field - algebra (FormArrayF _ fields) = Just $ encode fields + algebra (FormArrayF _ fields) = Just $ encodeJson fields - algebra (FormObjectF fields) = encodeFields fields - where - encodeFields :: Array (JsonTuple String (Maybe Foreign)) -> Maybe Foreign - encodeFields xs = map (encode <<< FO.fromFoldable) $ prepareObject xs + algebra (FormObjectF fields) = encodeJson <<< FO.fromFoldable <$> traverse sequence fields - prepareObject :: Array (JsonTuple String (Maybe Foreign)) -> Maybe (Array (Tuple String Foreign)) - prepareObject = traverse processTuples + algebra (FormValueF x) = Just $ encodeJson x - processTuples :: JsonTuple String (Maybe Foreign) -> Maybe (Tuple String Foreign) - processTuples = unwrap >>> sequence - - algebra (FormValueF x) = Just $ encode x - - algebra (FormPOSIXTimeRangeF x) = Just $ encode x + algebra (FormPOSIXTimeRangeF x) = Just $ encodeJson x algebra (FormUnsupportedF _) = Nothing -mkInitialValue :: Array KnownCurrency -> BigInteger -> Value +mkInitialValue :: Array KnownCurrency -> BigInt -> Value mkInitialValue currencies initialBalance = Value { getValue: value } where value = @@ -187,9 +175,9 @@ mkInitialValue currencies initialBalance = Value { getValue: value } ( \(KnownCurrency { hash, knownTokens }) -> map ( \tokenName -> - AssocMap.fromTuples + AssocMap.Map [ CurrencySymbol { unCurrencySymbol: hash } - /\ AssocMap.fromTuples [ tokenName /\ Additive initialBalance ] + /\ AssocMap.Map [ tokenName /\ Additive initialBalance ] ] ) $ Array.fromFoldable knownTokens @@ -205,7 +193,7 @@ handleFormEvent initialValue event = cata (Fix <<< algebra event) where algebra (SetField (SetIntField n)) (FormIntF _) = FormIntF n - algebra (SetField (SetBigIntegerField n)) (FormIntegerF _) = FormIntegerF n + algebra (SetField (SetBigIntField n)) (FormIntegerF _) = FormIntegerF n algebra (SetField (SetBoolField n)) (FormBoolF _) = FormBoolF n @@ -217,7 +205,7 @@ handleFormEvent initialValue event = cata (Fix <<< algebra event) algebra (SetField (SetValueField valueEvent)) (FormValueF value) = FormValueF $ handleValueEvent valueEvent value - algebra (SetField (SetPOSIXTimeRangeField newInterval)) arg@(FormPOSIXTimeRangeF _) = FormPOSIXTimeRangeF newInterval + algebra (SetField (SetPOSIXTimeRangeField newInterval)) (FormPOSIXTimeRangeF _) = FormPOSIXTimeRangeF newInterval algebra (SetSubField 1 subEvent) (FormTupleF field1 field2) = FormTupleF (handleFormEvent initialValue subEvent field1) field2 @@ -227,7 +215,7 @@ handleFormEvent initialValue event = cata (Fix <<< algebra event) algebra (SetSubField n subEvent) (FormArrayF schema fields) = FormArrayF schema $ over (ix n) (handleFormEvent initialValue subEvent) fields - algebra (SetSubField n subEvent) s@(FormObjectF fields) = FormObjectF $ over (ix n <<< _Newtype <<< _2) (handleFormEvent initialValue subEvent) fields + algebra (SetSubField n subEvent) (FormObjectF fields) = FormObjectF $ over (ix n <<< _2) (handleFormEvent initialValue subEvent) fields -- As the code stands, this is the only guarantee we get that every -- value in the array will conform to the schema: the fact that we @@ -238,7 +226,7 @@ handleFormEvent initialValue event = cata (Fix <<< algebra event) algebra AddSubField arg = arg - algebra (RemoveSubField n) arg@(FormArrayF schema fields) = (FormArrayF schema (fromMaybe fields (Array.deleteAt n fields))) + algebra (RemoveSubField n) (FormArrayF schema fields) = (FormArrayF schema (fromMaybe fields (Array.deleteAt n fields))) algebra _ arg = arg diff --git a/web-common-plutus/src/Schema/View.purs b/web-common-plutus/src/Schema/View.purs index 7250965573..0b8905193c 100644 --- a/web-common-plutus/src/Schema/View.purs +++ b/web-common-plutus/src/Schema/View.purs @@ -1,35 +1,35 @@ module Schema.View (actionArgumentForm) where -import Prelude hiding (div) +import Prologue hiding (div) import Bootstrap (btn, btnInfo, btnLink, btnPrimary, btnSmall, col, col10_, col2_, colFormLabel, formCheckInput, formCheckLabel, formCheck_, formControl, formGroup, formGroup_, formRow_, formText, inputGroupAppend_, inputGroupPrepend_, inputGroup_, invalidFeedback_, row_, textMuted, validFeedback_, wasValidated) import Bootstrap as Bootstrap import Data.Array as Array -import Data.BigInteger as BigInteger +import Data.BigInt.Argonaut as BigInt import Data.Functor.Foldable (Fix(..)) import Data.FunctorWithIndex (mapWithIndex) import Data.Int as Int -import Data.Json.JsonTuple (JsonTuple(..)) import Data.Lens (Lens', over, set, view) -import Data.Maybe (Maybe(..), fromMaybe, maybe) +import Data.Maybe (fromMaybe, maybe) import Data.String as String import Data.Tuple.Nested ((/\)) import Halogen (ClassName(..)) import Halogen.HTML (HTML, button, code_, div, div_, input, label, small, text) import Halogen.HTML.Elements.Keyed as Keyed import Halogen.HTML.Events (onChecked, onClick, onValueInput) -import Halogen.HTML.Properties (IProp, InputType(..), checked, class_, classes, for, id_, name, placeholder, required, type_, value) +import Halogen.HTML.Properties (IProp, InputType(..), checked, class_, classes, for, id, name, placeholder, required, type_, value) import Halogen.HTML.Properties as HP import Icons (Icon(..), icon) -import Ledger.Extra (_LowerBoundExtended, _LowerBoundInclusive, _UpperBoundExtended, _UpperBoundInclusive, _ivFrom, _ivTo, humaniseSlotInterval, humaniseTimeInterval) +import Ledger.Extra (_LowerBoundExtended, _LowerBoundInclusive, _UpperBoundExtended, _UpperBoundInclusive, _ivFrom, _ivTo, humaniseTimeInterval) import Plutus.V1.Ledger.Interval (Extended(..), Interval, _Interval) -import Plutus.V1.Ledger.Slot (Slot(..)) import Plutus.V1.Ledger.Time (POSIXTime(..)) -import Prim.TypeError (class Warn, Text) import Schema (FormArgumentF(..)) import Schema.Types (FieldEvent(..), FormArgument, FormEvent(..)) import Validation (ValidationError, WithPath, joinPath, showPathValue, validate) import ValueEditor (valueForm) +-- TODO Handle the Unsupported case. +-- TODO Handle the FormMaybe case. +-- TODO Force Hex fields to comply to [0-9a-fA-F]. actionArgumentForm :: forall p i. Int -> @@ -42,23 +42,20 @@ actionArgumentForm index wrapper argument = actionArgumentField :: forall p. - Warn (Text "We're still not handling the Unsupported case.") => - Warn (Text "We're still not handling the FormMaybe case.") => - Warn (Text "The Hex fields should be forced to comply to [0-9a-fA-F].") => Array String -> Boolean -> FormArgument -> HTML p FormEvent -actionArgumentField ancestors _ arg@(Fix FormUnitF) = Bootstrap.empty +actionArgumentField _ _ (Fix FormUnitF) = Bootstrap.empty actionArgumentField ancestors _ arg@(Fix (FormBoolF b)) = formCheck_ [ input [ type_ InputCheckbox - , id_ elementId + , id elementId , classes (Array.cons formCheckInput (actionArgumentClass ancestors)) , checked b - , onChecked (Just <<< SetField <<< SetBoolField) + , onChecked (SetField <<< SetBoolField) ] , label [ class_ formCheckLabel @@ -78,7 +75,7 @@ actionArgumentField ancestors _ arg@(Fix (FormIntF n)) = , value $ maybe "" show n , required true , placeholder "Int" - , onValueInput (Just <<< SetField <<< SetIntField <<< Int.fromString) + , onValueInput (SetField <<< SetIntField <<< Int.fromString) ] , validationFeedback (joinPath ancestors <$> validate arg) ] @@ -88,10 +85,10 @@ actionArgumentField ancestors _ arg@(Fix (FormIntegerF n)) = [ input [ type_ InputNumber , classes (Array.cons formControl (actionArgumentClass ancestors)) - , value $ maybe "" show n + , value $ maybe "" BigInt.toString n , required true , placeholder "Integer" - , onValueInput (Just <<< SetField <<< SetBigIntegerField <<< BigInteger.fromString) + , onValueInput (SetField <<< SetBigIntField <<< BigInt.fromString) ] , validationFeedback (joinPath ancestors <$> validate arg) ] @@ -106,7 +103,7 @@ actionArgumentField ancestors _ arg@(Fix (FormStringF s)) = -- so don't mark these fields as required , required false , placeholder "String" - , onValueInput (Just <<< SetField <<< SetStringField) + , onValueInput (SetField <<< SetStringField) ] , validationFeedback (joinPath ancestors <$> validate arg) ] @@ -125,12 +122,12 @@ actionArgumentField ancestors _ arg@(Fix (FormRadioF options s)) = formCheck_ [ input [ type_ InputRadio - , id_ elementId + , id elementId , classes (Array.cons formCheckInput (actionArgumentClass ancestors)) , name option , value option , required (s == Nothing) - , onValueInput (Just <<< SetField <<< SetRadioField) + , onValueInput (SetField <<< SetRadioField) , checked (Just option == s) ] , label @@ -148,12 +145,12 @@ actionArgumentField ancestors _ arg@(Fix (FormHexF s)) = , value $ fromMaybe "" s , required true , placeholder "String" - , onValueInput (Just <<< SetField <<< SetHexField) + , onValueInput (SetField <<< SetHexField) ] , validationFeedback (joinPath ancestors <$> validate arg) ] -actionArgumentField ancestors isNested (Fix (FormTupleF subFieldA subFieldB)) = +actionArgumentField ancestors _ (Fix (FormTupleF subFieldA subFieldB)) = div_ [ formGroup_ [ SetSubField 1 <$> actionArgumentField (Array.snoc ancestors "_1") true subFieldA ] @@ -161,13 +158,13 @@ actionArgumentField ancestors isNested (Fix (FormTupleF subFieldA subFieldB)) = [ SetSubField 2 <$> actionArgumentField (Array.snoc ancestors "_2") true subFieldB ] ] -actionArgumentField ancestors isNested (Fix (FormArrayF schema subFields)) = +actionArgumentField ancestors isNested (Fix (FormArrayF _ subFields)) = div_ [ Keyed.div [ nesting isNested ] (mapWithIndex subFormContainer subFields) , button [ classes [ btn, btnInfo ] - , onClick $ const $ Just AddSubField + , onClick $ const AddSubField ] [ icon Plus ] ] @@ -181,7 +178,7 @@ actionArgumentField ancestors isNested (Fix (FormArrayF schema subFields)) = , col2_ [ button [ classes [ btn, btnLink ] - , onClick $ const $ Just (RemoveSubField i) + , onClick $ const $ RemoveSubField i ] [ icon Trash ] ] @@ -190,7 +187,7 @@ actionArgumentField ancestors isNested (Fix (FormArrayF schema subFields)) = actionArgumentField ancestors isNested (Fix (FormObjectF subFields)) = div [ nesting isNested ] - (mapWithIndex (\i (JsonTuple field) -> map (SetSubField i) (subForm field)) subFields) + (mapWithIndex (\i field -> map (SetSubField i) (subForm field)) subFields) where subForm (name /\ arg) = ( formGroup_ @@ -199,7 +196,7 @@ actionArgumentField ancestors isNested (Fix (FormObjectF subFields)) = ] ) -actionArgumentField ancestors isNested (Fix (FormPOSIXTimeRangeF interval)) = +actionArgumentField _ isNested (Fix (FormPOSIXTimeRangeF interval)) = div [ class_ formGroup, nesting isNested ] [ label [ for "interval" ] [ text "Interval" ] , formRow_ @@ -252,7 +249,7 @@ actionArgumentField ancestors isNested (Fix (FormPOSIXTimeRangeF interval)) = extentFieldInclusionButton inclusionLens inclusionIcon exclusionIcon = button [ classes [ btn, btnSmall, btnPrimary ] - , onClick $ const $ Just $ SetField $ SetPOSIXTimeRangeField $ over inclusionLens not interval + , onClick $ const $ SetField $ SetPOSIXTimeRangeField $ over inclusionLens not interval ] [ icon $ if view inclusionLens interval then @@ -272,7 +269,7 @@ actionArgumentField ancestors isNested (Fix (FormPOSIXTimeRangeF interval)) = else btnInfo ] - , onClick $ const $ Just $ SetField $ SetPOSIXTimeRangeField $ set extensionLens value interval + , onClick $ const $ SetField $ SetPOSIXTimeRangeField $ set extensionLens value interval ] [ icon Infinity ] @@ -286,10 +283,16 @@ actionArgumentField ancestors isNested (Fix (FormPOSIXTimeRangeF interval)) = $ case view extensionLens interval of Finite (POSIXTime time) -> show time.getPOSIXTime _ -> mempty - , onValueInput $ map (\n -> SetField (SetPOSIXTimeRangeField (set extensionLens (Finite (POSIXTime { getPOSIXTime: n })) interval))) <<< BigInteger.fromString + , onValueInput $ BigInt.fromString + >>> case _ of + Just n -> + SetField + $ SetPOSIXTimeRangeField + $ set extensionLens (Finite (POSIXTime { getPOSIXTime: n })) interval + Nothing -> SetField $ SetPOSIXTimeRangeField interval ] -actionArgumentField ancestors isNested (Fix (FormValueF value)) = +actionArgumentField _ isNested (Fix (FormValueF value)) = div [ nesting isNested ] [ valueForm (SetField <<< SetValueField) value ] diff --git a/web-common-plutus/src/Validation.purs b/web-common-plutus/src/Validation.purs index 3b1cdcd0b4..cde1d4071b 100644 --- a/web-common-plutus/src/Validation.purs +++ b/web-common-plutus/src/Validation.purs @@ -1,17 +1,14 @@ module Validation where -import Prelude +import Prologue import Data.Array (elem, mapWithIndex) import Data.Array as Array import Data.Foldable (class Foldable) import Data.Functor.Foldable (Fix) import Data.Generic.Rep (class Generic) -import Data.Json.JsonTuple (JsonTuple(..)) import Data.Lens (Lens', view) import Data.Lens.Record (prop) -import Data.Maybe (Maybe(..)) -import Data.Symbol (SProxy(..)) -import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(..)) import Matryoshka (Algebra, cata) import Playground.Types (ContractCall(..), _FunctionSchema) import Schema (FormArgumentF(..)) @@ -107,9 +104,9 @@ instance formArgumentValidation :: Validation (Fix FormArgumentF) where algebra (FormArrayF _ xs) = Array.concat $ mapWithIndex (\i values -> addPath (show i) <$> values) xs - algebra (FormObjectF xs) = Array.concat $ map (\(JsonTuple (Tuple name values)) -> addPath name <$> values) xs + algebra (FormObjectF xs) = Array.concat $ map (\(Tuple name values) -> addPath name <$> values) xs - algebra (FormValueF x) = [] + algebra (FormValueF _) = [] algebra (FormPOSIXTimeRangeF _) = [] @@ -126,7 +123,7 @@ instance simulatorActionValidation :: Validation (ContractCall (Fix FormArgument arg = view (_argumentValues <<< _FunctionSchema <<< _argument) call _argument :: forall r a. Lens' { argument :: a | r } a -_argument = prop (SProxy :: SProxy "argument") +_argument = prop (Proxy :: _ "argument") _argumentValues :: forall r a. Lens' { argumentValues :: a | r } a -_argumentValues = prop (SProxy :: SProxy "argumentValues") +_argumentValues = prop (Proxy :: _ "argumentValues") diff --git a/web-common-plutus/src/ValueEditor.purs b/web-common-plutus/src/ValueEditor.purs index a1fcdb3337..58251b728a 100644 --- a/web-common-plutus/src/ValueEditor.purs +++ b/web-common-plutus/src/ValueEditor.purs @@ -4,12 +4,13 @@ import Prelude hiding (div, min) import Bootstrap (col, colFormLabel, col_, formControl, formGroup, formRow_) import Data.Array (mapWithIndex) import Data.Array as Array -import Data.BigInteger (BigInteger) -import Data.BigInteger as BigInteger +import Data.BigInt.Argonaut (BigInt) +import Data.BigInt.Argonaut as BigInt import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) +import Data.Show.Generic (genericShow) import Data.Lens (view) -import Data.Maybe (Maybe(Just), fromMaybe) +import Data.Maybe (fromMaybe) +import Data.Newtype (unwrap) import Data.Tuple (Tuple(..), fst) import Data.Tuple.Nested ((/\)) import Halogen.HTML (ClassName(ClassName), HTML, div, input, label, text) @@ -21,7 +22,7 @@ import Plutus.V1.Ledger.Value (CurrencySymbol, TokenName, Value(Value)) import Playground.Lenses (_currencySymbol, _tokenName) data ValueEvent - = SetBalance CurrencySymbol TokenName BigInteger + = SetBalance CurrencySymbol TokenName BigInt derive instance genericValueEvent :: Generic ValueEvent _ @@ -31,15 +32,23 @@ instance showValueEvent :: Show ValueEvent where valueForm :: forall p i. (ValueEvent -> i) -> Value -> HTML p i valueForm handler (Value { getValue: balances }) = Keyed.div_ - (Array.concat (mapWithIndex (currencyRow handler) (Array.sortWith fst $ AssocMap.toTuples balances))) + ( Array.concat + ( mapWithIndex (currencyRow handler) + ( Array.sortWith fst + $ unwrap balances + ) + ) + ) currencyRow :: forall p i. (ValueEvent -> i) -> Int -> - Tuple CurrencySymbol (AssocMap.Map TokenName BigInteger) -> + Tuple CurrencySymbol (AssocMap.Map TokenName BigInt) -> Array (Tuple String (HTML p i)) -currencyRow handler currencyIndex (Tuple currencySymbol tokenBalances) = mapWithIndex (balanceRow handler currencyIndex currencySymbol) (Array.sortWith fst $ AssocMap.toTuples tokenBalances) +currencyRow handler currencyIndex (Tuple currencySymbol tokenBalances) = + mapWithIndex (balanceRow handler currencyIndex currencySymbol) + (Array.sortWith fst $ unwrap tokenBalances) balanceRow :: forall p i. @@ -47,7 +56,7 @@ balanceRow :: Int -> CurrencySymbol -> Int -> - Tuple TokenName BigInteger -> + Tuple TokenName BigInt -> Tuple String (HTML p i) balanceRow handler currencyIndex currencySymbol tokenIndex (Tuple tokenName amount) = (show currencyIndex <> "-" <> show tokenIndex) @@ -70,7 +79,7 @@ balanceRow handler currencyIndex currencySymbol tokenIndex (Tuple tokenName amou [ input [ type_ InputNumber , classes [ formControl, ClassName "balance-amount" ] - , value $ show amount + , value $ BigInt.toString amount , required true , placeholder "Amount" , min zero @@ -80,10 +89,10 @@ balanceRow handler currencyIndex currencySymbol tokenIndex (Tuple tokenName amou -- (for reasons I have yet to fathom, this doesn't work when you delete "0"; -- until I get to the bottom of that, this is at least an improvement) let - newAmount = fromMaybe zero $ BigInteger.fromString str + newAmount = fromMaybe zero $ BigInt.fromString str in do - pure $ handler $ SetBalance currencySymbol tokenName newAmount + handler $ SetBalance currencySymbol tokenName newAmount ] ] ] diff --git a/web-common/.gitignore b/web-common/.gitignore deleted file mode 100644 index d59d537144..0000000000 --- a/web-common/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -# FIXME: @michaelpj to remove this in favour of root .giignore file -# once he figures out what's going on with nix-gitignore -**/generated -**/generated/ -**/generated-docs/ -**/node_modules/ -**/output/ -**/yarn-error.log -**/yarn.lock -**/.psci_modules/ -**/.psc-package/ -**/.psc-package2nix/ -**/.spago/ -**/.spago2nix/ diff --git a/web-common/ARCHITECTURE.adoc b/web-common/ARCHITECTURE.adoc deleted file mode 100644 index a33e4fe521..0000000000 --- a/web-common/ARCHITECTURE.adoc +++ /dev/null @@ -1,3 +0,0 @@ -=== `web-common` - -This contains frontend code that can be used by any frontend project. \ No newline at end of file diff --git a/web-common/default.nix b/web-common/default.nix deleted file mode 100644 index 548d3d67ad..0000000000 --- a/web-common/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ lib, pkgs, gitignore-nix }: -let - cleanSrc = gitignore-nix.gitignoreSource ./.; - - replaceName = "sed s/\\$name/$name/g | sed s/\\$lname/$lname/g"; - - # TODO rewrite this codegen utility with https://github.com/natefaubion/purescript-language-cst-parser - newComponent = pkgs.writeShellScriptBin "new-component" '' - name=$1 - lname="$(tr '[:upper:]' '[:lower:]' <<< ''${name:0:1})''${name:1}" - dir="src/Component/$1" - file="$dir.purs" - stateFile="$dir/State.purs" - typesFile="$dir/Types.purs" - internalTypesFile="$dir/Types/Internal.purs" - viewFile="$dir/View.purs" - case $2 in - page) - dir="src/Page/$1" - file="$dir.purs" - stateFile="$dir/State.purs" - typesFile="$dir/Types.purs" - internalTypesFile="$dir/Types/Internal.purs" - viewFile="$dir/View.purs" - mkdir $dir - mkdir $dir/Types - cat ${./templates/Page.purs.template} | ${replaceName} > $file - cat ${./templates/Page/State.purs.template} | ${replaceName} > $stateFile - cat ${./templates/Page/Types.purs.template} | ${replaceName} > $typesFile - cat ${./templates/Page/Types/Internal.purs.template} | ${replaceName} > $internalTypesFile - cat ${./templates/Page/View.purs.template} | ${replaceName} > $viewFile - ;; - stateful) - mkdir $dir - mkdir $dir/Types - cat ${./templates/Component/Stateful.purs.template} | ${replaceName} > $file - cat ${./templates/Component/Stateful/State.purs.template} | ${replaceName} > $stateFile - cat ${./templates/Component/Stateful/Types.purs.template} | ${replaceName} > $typesFile - cat ${./templates/Component/Stateful/Types/Internal.purs.template} | ${replaceName} > $internalTypesFile - cat ${./templates/Component/Stateful/View.purs.template} | ${replaceName} > $viewFile - ;; - *) - mkdir $dir - cat ${./templates/Component/Stateless/Types.purs.template} | ${replaceName} > $typesFile - cat ${./templates/Component/Stateless/View.purs.template} | ${replaceName} > $viewFile - ;; - esac - ''; -in -{ - inherit cleanSrc newComponent; -} diff --git a/web-common/src/AjaxUtils.purs b/web-common/src/AjaxUtils.purs deleted file mode 100644 index 1058f2a5ee..0000000000 --- a/web-common/src/AjaxUtils.purs +++ /dev/null @@ -1,83 +0,0 @@ -module AjaxUtils - ( AjaxErrorPaneAction(..) - , ajaxErrorPane - , closeableAjaxErrorPane - , ajaxErrorRefLabel - , renderForeignErrors - , defaultJsonOptions - ) where - -import Prelude hiding (div) -import Bootstrap (alertDanger_, btn, floatRight) -import Data.Foldable (intercalate) -import Data.Maybe (Maybe(Just)) -import Foreign (MultipleErrors, renderForeignError) -import Foreign.Generic.Class (Options, aesonSumEncoding, defaultOptions) -import Halogen (RefLabel(RefLabel)) -import Halogen.HTML (ClassName(..), HTML, br_, button, div, div_, p_, text) -import Halogen.HTML.Events (onClick) -import Halogen.HTML.Properties (class_, classes, ref) -import Icons (Icon(..), icon) -import Servant.PureScript.Ajax (AjaxError, ErrorDescription(..), runAjaxError) - -data AjaxErrorPaneAction - = CloseErrorPane - -ajaxErrorPane :: forall p i. AjaxError -> HTML p i -ajaxErrorPane error = - div - [ class_ ajaxErrorClass - , ref ajaxErrorRefLabel - ] - [ alertDanger_ - [ showAjaxError error - , br_ - , text "Please try again or contact support for assistance." - ] - ] - -closeableAjaxErrorPane :: forall p. AjaxError -> HTML p AjaxErrorPaneAction -closeableAjaxErrorPane error = - div - [ class_ ajaxErrorClass ] - [ alertDanger_ - [ button - [ classes [ btn, floatRight, ClassName "ajax-error-close-button" ] - , onClick $ const $ Just CloseErrorPane - ] - [ icon Close ] - , p_ [ showAjaxError error ] - ] - ] - -ajaxErrorRefLabel :: RefLabel -ajaxErrorRefLabel = RefLabel "ajax-error" - -ajaxErrorClass :: ClassName -ajaxErrorClass = ClassName "ajax-error" - -showAjaxError :: forall p i. AjaxError -> HTML p i -showAjaxError = runAjaxError >>> _.description >>> showErrorDescription - -showErrorDescription :: forall p i. ErrorDescription -> HTML p i -showErrorDescription NotFound = text "Data not found." - -showErrorDescription (ResponseError statusCode err) = text $ "Server error " <> show statusCode <> ": " <> err - -showErrorDescription (DecodingError err@"(\"Unexpected token E in JSON at position 0\" : Nil)") = text "Cannot connect to the server. Please check your network connection." - -showErrorDescription (DecodingError err) = text $ "DecodingError: " <> err - -showErrorDescription (ResponseFormatError err) = text $ "ResponseFormatError: " <> err - -showErrorDescription (ConnectionError err) = text $ "ConnectionError: " <> err - -renderForeignErrors :: MultipleErrors -> String -renderForeignErrors = intercalate "\n" <<< map renderForeignError - -defaultJsonOptions :: Options -defaultJsonOptions = - defaultOptions - { unwrapSingleConstructors = true - , sumEncoding = aesonSumEncoding - } diff --git a/web-common/src/Analytics.js b/web-common/src/Analytics.js deleted file mode 100644 index 2508be1fbe..0000000000 --- a/web-common/src/Analytics.js +++ /dev/null @@ -1,21 +0,0 @@ -/*eslint-env node*/ -/*global exports gtag, analytics*/ -'use strict'; - -exports.trackEvent_ = function (action, category, label, value) { - // Google Analytics, the default. - if (gtag) { - gtag('event', action, { - 'event_category': category, - 'event_label': label, - 'value': value - }); - }; -}; - -exports.trackSegmentEvent_ = function (action, payload) { - // Segment.com. - if (typeof analytics !== 'undefined') { - analytics.track(action, payload); - }; -}; diff --git a/web-common/src/Analytics.purs b/web-common/src/Analytics.purs deleted file mode 100644 index 22f3605f5b..0000000000 --- a/web-common/src/Analytics.purs +++ /dev/null @@ -1,106 +0,0 @@ -module Analytics - ( Event - , SegmentEvent - , defaultEvent - , class IsEvent - , toEvent - , analyticsTracking - ) where - -import Prelude -import Data.Maybe (Maybe(..)) -import Data.Traversable (for_) -import Data.Tuple.Nested ((/\)) -import Data.Undefinable (Undefinable, toUndefinable) -import Effect (Effect) -import Effect.Uncurried (EffectFn2, EffectFn4, runEffectFn2, runEffectFn4) -import Foreign (Foreign, unsafeToForeign) -import Foreign.NullOrUndefined (null) -import Foreign.Object (Object) -import Foreign.Object as Object - -foreign import trackEvent_ :: - EffectFn4 String (Undefinable String) (Undefinable String) (Undefinable Number) Unit - -foreign import trackSegmentEvent_ :: - EffectFn2 String (Object Foreign) Unit - -type Event - = { action :: String - , category :: Maybe String - , label :: Maybe String - , value :: Maybe Number - } - -type SegmentEvent - = { action :: String - , payload :: Object Foreign - } - -type TimingEvent - = { category :: String - , variable :: String - , miliseconds :: Number - , label :: String - } - -defaultEvent :: String -> Event -defaultEvent action = - { action - , category: Nothing - , label: Nothing - , value: Nothing - } - -trackEvent :: Event -> Effect Unit -trackEvent { action, category, label, value } = - runEffectFn4 trackEvent_ - action - (toUndefinable category) - (toUndefinable label) - (toUndefinable value) - -trackSegmentEvent :: SegmentEvent -> Effect Unit -trackSegmentEvent { action, payload } = runEffectFn2 trackSegmentEvent_ action payload - -class IsEvent a where - toEvent :: a -> Maybe Event - -toSegmentEvent :: Event -> SegmentEvent -toSegmentEvent { action, category, label, value } = - { action - , payload: - Object.fromFoldable - [ "category" /\ toForeign category - , "label" /\ toForeign label - , "value" /\ toForeign value - ] - } - -analyticsTracking :: forall a. IsEvent a => a -> Effect Unit -analyticsTracking action = do - for_ (toEvent action) - $ \event -> do - trackEvent event - trackSegmentEvent $ toSegmentEvent event - ------------------------------------------------------------- --- This `IsForeign` code only exists because we need to use --- `unsafeToForeign`, but we want to limit it to types we know are safe. --- --- As the docs say, "[unsafeToForeign] is considered unsafe as it's --- only intended to be used on primitive JavaScript types, rather than --- PureScript types." So it's safe as long as you use it on the right --- types. -class IsForeign a where - toForeign :: a -> Foreign - -instance toForeignMaybe :: IsForeign a => IsForeign (Maybe a) where - toForeign Nothing = null - toForeign (Just x) = toForeign x - -instance toForeignString :: IsForeign String where - toForeign = unsafeToForeign - -instance toForeignNumber :: IsForeign Number where - toForeign = unsafeToForeign diff --git a/web-common/src/Animation.purs b/web-common/src/Animation.purs deleted file mode 100644 index aea8f6ee5b..0000000000 --- a/web-common/src/Animation.purs +++ /dev/null @@ -1,89 +0,0 @@ --- | An extremely primitive, but Halogen-5 compatible, animation system. --- | --- | To use: --- | --- | 1. Add a Boolean "is animating" flag to your state, and create a lens to that state. --- | --- | 2. In your Halogen `handleAction` function, instead of calling: --- | --- | ```purescript --- | handleAction _ = do --- | stuff --- | thingThatNeedsToBeAnimated --- | stuff --- | ... --- | ``` --- | --- | ...call: --- | --- | ```purescript --- | handleAction _ = do --- | stuff --- | animate _isAnimating thingThatNeedsToBeAnimated --- | stuff --- | ... --- | ``` --- | --- | 3. Mix `animationClass` into the HTML attributes of the thing to be animated (or a parent): --- | --- | ```purescript --- | div --- | [ classes $ --- | [ClassName "order"] --- | <> --- | animationClass _isAnimating state --- | ] --- | [ h3_ [ text "Your Order" ], ... ] --- | ``` --- | --- | 4. Add in CSS rules. When animating, the classes --- | `.animation.animation-start` will appear temporarily, to be replaced --- | moments later with `.animation.animation-done`. This allows you to use --- | SCSS such as: --- | --- | ```scss --- | order.animation { --- | position: relative; --- | --- | &.animation-start { --- | opacity: 0; --- | left: -100%; --- | } --- | --- | &.animation-done { --- | transition: opacity 250ms, left 250ms; --- | opacity: 1; --- | left: 0; --- | } --- | ``` --- | --- | ...making your `order` fade in from the left. -module Animation where - -import Data.Lens (Lens', assign, view) -import Data.Time.Duration (Milliseconds(..)) -import Data.Time.Duration as Duration -import Effect.Aff as Aff -import Effect.Aff.Class (class MonadAff, liftAff) -import Halogen (HalogenM) -import Halogen.HTML (ClassName(..)) -import Prelude (bind, discard, pure, ($), (<>)) - -class MonadAnimate m state where - animate :: forall a. (Lens' state Boolean) -> m a -> m a - -instance monadAnimateHalogenM :: MonadAff m => MonadAnimate (HalogenM state action input output m) state where - animate toggle action = do - assign toggle true - result <- action - liftAff $ Aff.delay $ Duration.fromDuration $ Milliseconds 1.0 - assign toggle false - pure result - -animationClass :: forall state. Lens' state Boolean -> state -> Array ClassName -animationClass toggle state = - [ ClassName "animation" ] - <> if view toggle state then - [ ClassName "animation-start" ] - else - [ ClassName "animation-done" ] diff --git a/web-common/src/Bootstrap.purs b/web-common/src/Bootstrap.purs deleted file mode 100644 index a432988dc6..0000000000 --- a/web-common/src/Bootstrap.purs +++ /dev/null @@ -1,552 +0,0 @@ --- | For most definitions in this file: --- | --- | `fooId` is the Bootstrap ClassName "foo-id" --- | and --- | `fooId_` is a div that has that class name as its sole attribute. --- | --- | Use `fooId_` for convenience and `div [ classes [ fooId ... ] ]` when you need more control. --- | --- | (Note: I'm not 100% convinced this is the best organisation, but we'll --- | try it and see how it works out!) -module Bootstrap where - -import Halogen.HTML (ClassName(ClassName), HTML, div, li, span, text, ul) -import Halogen.HTML.Properties (class_, classes) - -container :: ClassName -container = ClassName "container" - -container_ :: forall p i. Array (HTML p i) -> HTML p i -container_ = div [ class_ container ] - -containerFluid :: ClassName -containerFluid = ClassName "container-fluid" - -containerFluid_ :: forall p i. Array (HTML p i) -> HTML p i -containerFluid_ = div [ class_ containerFluid ] - -noGutters :: ClassName -noGutters = ClassName "no-gutters" - -row :: ClassName -row = ClassName "row" - -row_ :: forall p i. Array (HTML p i) -> HTML p i -row_ = div [ class_ row ] - -col :: ClassName -col = ClassName "col" - -col_ :: forall p i. Array (HTML p i) -> HTML p i -col_ = div [ class_ col ] - -col1 :: ClassName -col1 = ClassName "col-1" - -col1_ :: forall p i. Array (HTML p i) -> HTML p i -col1_ = div [ classes [ col, col1 ] ] - -col2 :: ClassName -col2 = ClassName "col-2" - -col2_ :: forall p i. Array (HTML p i) -> HTML p i -col2_ = div [ classes [ col, col2 ] ] - -col3 :: ClassName -col3 = ClassName "col-3" - -col3_ :: forall p i. Array (HTML p i) -> HTML p i -col3_ = div [ classes [ col, col3 ] ] - -col4 :: ClassName -col4 = ClassName "col-4" - -col4_ :: forall p i. Array (HTML p i) -> HTML p i -col4_ = div [ classes [ col, col4 ] ] - -col5 :: ClassName -col5 = ClassName "col-5" - -col5_ :: forall p i. Array (HTML p i) -> HTML p i -col5_ = div [ classes [ col, col5 ] ] - -col6 :: ClassName -col6 = ClassName "col-6" - -col6_ :: forall p i. Array (HTML p i) -> HTML p i -col6_ = div [ classes [ col, col6 ] ] - -col7 :: ClassName -col7 = ClassName "col-7" - -col7_ :: forall p i. Array (HTML p i) -> HTML p i -col7_ = div [ classes [ col, col7 ] ] - -col8 :: ClassName -col8 = ClassName "col-8" - -col8_ :: forall p i. Array (HTML p i) -> HTML p i -col8_ = div [ classes [ col, col8 ] ] - -col9 :: ClassName -col9 = ClassName "col-9" - -col9_ :: forall p i. Array (HTML p i) -> HTML p i -col9_ = div [ classes [ col, col9 ] ] - -col10 :: ClassName -col10 = ClassName "col-10" - -col10_ :: forall p i. Array (HTML p i) -> HTML p i -col10_ = div [ classes [ col, col10 ] ] - -col11 :: ClassName -col11 = ClassName "col-11" - -col11_ :: forall p i. Array (HTML p i) -> HTML p i -col11_ = div [ classes [ col, col11 ] ] - -col12 :: ClassName -col12 = ClassName "col-12" - -col12_ :: forall p i. Array (HTML p i) -> HTML p i -col12_ = div [ classes [ col, col12 ] ] - -colXs6 :: ClassName -colXs6 = ClassName "col-xs-6" - -colXs12 :: ClassName -colXs12 = ClassName "col-xs-12" - -colSm4 :: ClassName -colSm4 = ClassName "col-sm-4" - -colSm5 :: ClassName -colSm5 = ClassName "col-sm-5" - -colSm6 :: ClassName -colSm6 = ClassName "col-sm-6" - -colSm7 :: ClassName -colSm7 = ClassName "col-sm-7" - -colSm8 :: ClassName -colSm8 = ClassName "col-sm-8" - -colSm12 :: ClassName -colSm12 = ClassName "col-sm-12" - -colMd3 :: ClassName -colMd3 = ClassName "col-md-3" - -colMd4 :: ClassName -colMd4 = ClassName "col-md-4" - -colMd5 :: ClassName -colMd5 = ClassName "col-md-5" - -colMd6 :: ClassName -colMd6 = ClassName "col-md-6" - -colMd7 :: ClassName -colMd7 = ClassName "col-md-7" - -colMd8 :: ClassName -colMd8 = ClassName "col-md-8" - -colMd12 :: ClassName -colMd12 = ClassName "col-md-12" - -colLg2 :: ClassName -colLg2 = ClassName "col-lg-2" - -colLg4 :: ClassName -colLg4 = ClassName "col-lg-4" - -colLg5 :: ClassName -colLg5 = ClassName "col-lg-5" - -colLg7 :: ClassName -colLg7 = ClassName "col-lg-7" - -colLg8 :: ClassName -colLg8 = ClassName "col-lg-8" - -colAuto :: ClassName -colAuto = ClassName "col-auto" - -colAuto_ :: forall p i. Array (HTML p i) -> HTML p i -colAuto_ = div [ class_ colAuto ] - -offset3 :: ClassName -offset3 = ClassName "offset-3" - -offset6 :: ClassName -offset6 = ClassName "offset-6" - -offset7 :: ClassName -offset7 = ClassName "offset-7" - -justifyContentBetween :: ClassName -justifyContentBetween = ClassName "justify-content-between" - -card :: ClassName -card = ClassName "card" - -card_ :: forall p i. Array (HTML p i) -> HTML p i -card_ = div [ class_ card ] - -textWhite :: ClassName -textWhite = ClassName "text-white" - -bgInfo :: ClassName -bgInfo = ClassName "bg-info" - -cardHeader :: ClassName -cardHeader = ClassName "card-header" - -cardHeader_ :: forall p i. Array (HTML p i) -> HTML p i -cardHeader_ = div [ class_ cardHeader ] - -cardBody :: ClassName -cardBody = ClassName "card-body" - -cardBody_ :: forall p i. Array (HTML p i) -> HTML p i -cardBody_ = div [ class_ cardBody ] - -cardFooter :: ClassName -cardFooter = ClassName "card-footer" - -cardFooter_ :: forall p i. Array (HTML p i) -> HTML p i -cardFooter_ = div [ class_ cardFooter ] - -cardTitle :: ClassName -cardTitle = ClassName "card-title" - -cardTitle_ :: forall p i. Array (HTML p i) -> HTML p i -cardTitle_ = div [ class_ cardTitle ] - -cardText :: ClassName -cardText = ClassName "card-text" - -cardText_ :: forall p i. Array (HTML p i) -> HTML p i -cardText_ = div [ class_ cardText ] - -btn :: ClassName -btn = ClassName "btn" - -btn_ :: forall p i. Array (HTML p i) -> HTML p i -btn_ = div [ class_ btn ] - -btnBlock :: ClassName -btnBlock = ClassName "btn-block" - -btnGroup :: ClassName -btnGroup = ClassName "btn-group" - -btnGroupSmall :: ClassName -btnGroupSmall = ClassName "btn-group-sm" - -btnGroup_ :: forall p i. Array (HTML p i) -> HTML p i -btnGroup_ = div [ class_ btnGroup ] - -btnGroupVertical :: ClassName -btnGroupVertical = ClassName "btn-group-vertical" - -btnGroupVertical_ :: forall p i. Array (HTML p i) -> HTML p i -btnGroupVertical_ = div [ class_ btnGroupVertical ] - -btnPrimary :: ClassName -btnPrimary = ClassName "btn-primary" - -btnPrimary_ :: forall p i. Array (HTML p i) -> HTML p i -btnPrimary_ = div [ classes [ btn, btnPrimary ] ] - -btnSecondary :: ClassName -btnSecondary = ClassName "btn-secondary" - -btnSecondary_ :: forall p i. Array (HTML p i) -> HTML p i -btnSecondary_ = div [ classes [ btn, btnSecondary ] ] - -btnWarning :: ClassName -btnWarning = ClassName "btn-warning" - -btnWarning_ :: forall p i. Array (HTML p i) -> HTML p i -btnWarning_ = div [ classes [ btn, btnWarning ] ] - -btnLight :: ClassName -btnLight = ClassName "btn-light" - -btnLight_ :: forall p i. Array (HTML p i) -> HTML p i -btnLight_ = div [ classes [ btn, btnLight ] ] - -btnDark :: ClassName -btnDark = ClassName "btn-dark" - -btnDark_ :: forall p i. Array (HTML p i) -> HTML p i -btnDark_ = div [ classes [ btn, btnDark ] ] - -btnInfo :: ClassName -btnInfo = ClassName "btn-info" - -btnDefault :: ClassName -btnDefault = ClassName "btn-default" - -btnSuccess :: ClassName -btnSuccess = ClassName "btn-success" - -btnDanger :: ClassName -btnDanger = ClassName "btn-danger" - -btnSmall :: ClassName -btnSmall = ClassName "btn-sm" - -btnExtraSmall :: ClassName -btnExtraSmall = ClassName "btn-xs" - -btnLink :: ClassName -btnLink = ClassName "btn-link" - -dropdownToggle :: ClassName -dropdownToggle = ClassName "dropdown-toggle" - -pullLeft :: ClassName -pullLeft = ClassName "pull-left" - -pullRight :: ClassName -pullRight = ClassName "pull-right" - -floatLeft :: ClassName -floatLeft = ClassName "float-left" - -floatRight :: ClassName -floatRight = ClassName "float-right" - -displayFlex :: ClassName -displayFlex = ClassName "d-flex" - -alignItemsCenter :: ClassName -alignItemsCenter = ClassName "align-items-center" - -mlAuto :: ClassName -mlAuto = ClassName "ml-auto" - -mrAuto :: ClassName -mrAuto = ClassName "mr-auto" - -clearfix :: ClassName -clearfix = ClassName "clearfix" - -clearfix_ :: forall i p. HTML p i -clearfix_ = div [ class_ clearfix ] [] - -listGroup :: ClassName -listGroup = ClassName "list-group" - -listGroup_ :: forall i p. Array (HTML p i) -> HTML p i -listGroup_ = div [ class_ listGroup ] - -listGroupItem :: ClassName -listGroupItem = ClassName "list-group-item" - -listGroupItem_ :: forall i p. Array (HTML p i) -> HTML p i -listGroupItem_ = div [ class_ listGroupItem ] - -alert :: ClassName -alert = ClassName "alert" - -alertDanger :: ClassName -alertDanger = ClassName "alert-danger" - -alertDanger_ :: forall i p. Array (HTML p i) -> HTML p i -alertDanger_ = div [ classes [ alert, alertDanger ] ] - -alertInfo :: ClassName -alertInfo = ClassName "alert-info" - -alertInfo_ :: forall i p. Array (HTML p i) -> HTML p i -alertInfo_ = div [ classes [ alert, alertInfo ] ] - -alertPrimary :: ClassName -alertPrimary = ClassName "alert-primary" - -alertPrimary_ :: forall i p. Array (HTML p i) -> HTML p i -alertPrimary_ = div [ classes [ alert, alertPrimary ] ] - -empty :: forall p i. HTML p i -empty = text "" - -nbsp :: forall p i. HTML p i -nbsp = text "\x00A0" - -badge :: ClassName -badge = ClassName "badge" - -badgePrimary :: ClassName -badgePrimary = ClassName "badge-primary" - -badgePrimary_ :: forall p i. Array (HTML p i) -> HTML p i -badgePrimary_ = span [ classes [ badge, badgePrimary ] ] - -wasValidated :: ClassName -wasValidated = ClassName "was-validated" - -isValid :: ClassName -isValid = ClassName "is-valid" - -isInvalid :: ClassName -isInvalid = ClassName "is-invalid" - -colFormLabel :: ClassName -colFormLabel = ClassName "col-form-label" - -formControl :: ClassName -formControl = ClassName "form-control" - -formControl_ :: forall p i. Array (HTML p i) -> HTML p i -formControl_ = div [ class_ formControl ] - -formRow :: ClassName -formRow = ClassName "form-row" - -formRow_ :: forall p i. Array (HTML p i) -> HTML p i -formRow_ = div [ class_ formRow ] - -formGroup :: ClassName -formGroup = ClassName "form-group" - -formGroup_ :: forall p i. Array (HTML p i) -> HTML p i -formGroup_ = div [ class_ formGroup ] - -formCheck :: ClassName -formCheck = ClassName "form-check" - -formCheck_ :: forall p i. Array (HTML p i) -> HTML p i -formCheck_ = div [ class_ formCheck ] - -formCheckInline :: ClassName -formCheckInline = ClassName "form-check-inline" - -formCheckInput :: ClassName -formCheckInput = ClassName "form-check-input" - -formCheckLabel :: ClassName -formCheckLabel = ClassName "form-check-label" - -formText :: ClassName -formText = ClassName "form-text" - -inputGroup :: ClassName -inputGroup = ClassName "input-group" - -inputGroup_ :: forall p i. Array (HTML p i) -> HTML p i -inputGroup_ = div [ class_ inputGroup ] - -inputGroupPrepend :: ClassName -inputGroupPrepend = ClassName "input-group-prepend" - -inputGroupPrepend_ :: forall p i. Array (HTML p i) -> HTML p i -inputGroupPrepend_ = div [ class_ inputGroupPrepend ] - -inputGroupAppend :: ClassName -inputGroupAppend = ClassName "input-group-append" - -inputGroupAppend_ :: forall p i. Array (HTML p i) -> HTML p i -inputGroupAppend_ = div [ class_ inputGroupAppend ] - -inputGroupText :: ClassName -inputGroupText = ClassName "input-group-text" - -customSelect :: ClassName -customSelect = ClassName "custom-select" - -validFeedback :: ClassName -validFeedback = ClassName "valid-feedback" - -validFeedback_ :: forall p i. Array (HTML p i) -> HTML p i -validFeedback_ = div [ class_ validFeedback ] - -invalidFeedback :: ClassName -invalidFeedback = ClassName "invalid-feedback" - -invalidFeedback_ :: forall p i. Array (HTML p i) -> HTML p i -invalidFeedback_ = div [ class_ invalidFeedback ] - -active :: ClassName -active = ClassName "active" - -disabled :: ClassName -disabled = ClassName "disabled" - -nav :: ClassName -nav = ClassName "nav" - -navbar :: ClassName -navbar = ClassName "navbar" - -navbarBrand :: ClassName -navbarBrand = ClassName "navbar-brand" - -navbarText :: ClassName -navbarText = ClassName "navbar-text" - -navbarNav :: ClassName -navbarNav = ClassName "navbar-nav" - -navbarExpand :: ClassName -navbarExpand = ClassName "navbar-expand" - -navbarExpandSmall :: ClassName -navbarExpandSmall = ClassName "navbar-expand-sm" - -navPills_ :: forall p i. Array (HTML p i) -> HTML p i -navPills_ = ul [ classes [ nav, ClassName "nav-pills" ] ] - -navTabs_ :: forall p i. Array (HTML p i) -> HTML p i -navTabs_ = ul [ classes [ nav, ClassName "nav-tabs" ] ] - -navItem :: ClassName -navItem = ClassName "nav-item" - -navItem_ :: forall p i. Array (HTML p i) -> HTML p i -navItem_ = li [ class_ navItem ] - -navLink :: ClassName -navLink = ClassName "nav-link" - -hidden :: ClassName -hidden = ClassName "d-none" - --- | A third of the screen, assuming a reasonable screen --- size. Collapses sensibly as the size goes down to iPhone. -responsiveThird :: forall p i. Array (HTML p i) -> HTML p i -responsiveThird = div [ classes [ col12, colSm6, colMd4 ] ] - -textTruncate :: ClassName -textTruncate = ClassName "text-truncate" - -textCenter :: ClassName -textCenter = ClassName "text-center" - -textLeft :: ClassName -textLeft = ClassName "text-left" - -textRight :: ClassName -textRight = ClassName "text-right" - -textMuted :: ClassName -textMuted = ClassName "text-muted" - --- | Because of the clash with the HTML tag, it's recommended to use this class name qualified. --- eq. `table [ classes [ Bootstrap.table, tableStriped ] ] [ ... ] ` -table :: ClassName -table = ClassName "table" - -tableStriped :: ClassName -tableStriped = ClassName "table-striped" - -tableBordered :: ClassName -tableBordered = ClassName "table-bordered" - -tableSmall :: ClassName -tableSmall = ClassName "table-sm" diff --git a/web-common/src/Bootstrap/Extra.purs b/web-common/src/Bootstrap/Extra.purs deleted file mode 100644 index ee11344838..0000000000 --- a/web-common/src/Bootstrap/Extra.purs +++ /dev/null @@ -1,26 +0,0 @@ -module Bootstrap.Extra where - -import Halogen.HTML (ClassName(..), HTML, IProp, PropName(..), pre, prop) -import Halogen.HTML.Properties (class_) -import Prelude (show) - -clickable :: ClassName -clickable = ClassName "clickable" - -dataToggle :: forall r i. String -> IProp r i -dataToggle = prop (PropName "data-toggle") - -ariaHasPopup :: forall r i. Boolean -> IProp r i -ariaHasPopup hasPopup = prop (PropName "data-toggle") (show hasPopup) - -ariaExpanded :: forall r i. Boolean -> IProp r i -ariaExpanded expanded = prop (PropName "data-toggle") (show expanded) - -ariaLabelledBy :: forall r i. String -> IProp r i -ariaLabelledBy label = prop (PropName "data-toggle") label - -preWrap_ :: forall p i. Array (HTML p i) -> HTML p i -preWrap_ = pre [ class_ preWrap ] - -preWrap :: ClassName -preWrap = ClassName "preWrap" diff --git a/web-common/src/Chartist.js b/web-common/src/Chartist.js deleted file mode 100644 index 9f8dba5713..0000000000 --- a/web-common/src/Chartist.js +++ /dev/null @@ -1,35 +0,0 @@ -/*global exports, require*/ -'use strict'; - -var Chartist = require('chartist'); -require('chartist-plugin-tooltips'); -require('chartist-plugin-axistitle'); - -exports.tooltipPlugin = Chartist.plugins.tooltip(); - -exports.axisTitlePlugin = Chartist.plugins.ctAxisTitle; - -exports.intAutoScaleAxis = { - type: Chartist.AutoScaleAxis, - onlyInteger: true -}; - -exports._updateData = function (chart, newData) { - chart.update(newData); -}; - -// Chartist does a resize when you call update with no new data. I -// find that a bit weird and want to separate those behaviours into -// two separately-named calls in PureScript-space. -exports._resize = function (chart) { - chart.update(); -}; - -exports._barChart = function (element, options) { - return new Chartist.Bar( - element, - {}, - options, - {} - ); -}; diff --git a/web-common/src/Chartist.purs b/web-common/src/Chartist.purs deleted file mode 100644 index 37665122ad..0000000000 --- a/web-common/src/Chartist.purs +++ /dev/null @@ -1,113 +0,0 @@ -module Chartist - ( barChart - , Chart - , ChartistOptions - , ChartistPlugin - , tooltipPlugin - , axisTitlePlugin - , AxisScale - , intAutoScaleAxis - , AxisTitleOptions - , AxisTitleAxisOptions - , updateData - , resize - , ChartistData - , ChartistItem - , ChartistPoint - , toChartistData - ) where - -import Effect (Effect) -import Effect.Uncurried (EffectFn1, runEffectFn1, EffectFn2, runEffectFn2) -import Control.Semigroupoid ((<<<)) -import Web.HTML.HTMLElement (HTMLElement) -import Data.Array as Array -import Data.Foldable (foldl) -import Data.Function (($)) -import Data.Maybe (maybe) -import Data.Unit (Unit) - -foreign import data Chart :: Type - -foreign import data ChartistPlugin :: Type - -foreign import data AxisScale :: Type - -type ChartistPoint - = { meta :: String - , value :: Number - } - -type ChartistItem - = { label :: String - , points :: Array ChartistPoint - } - -toChartistData :: Array ChartistItem -> ChartistData -toChartistData xs = foldl reducer { labels: [], series: initialSeries } xs - where - initialSeries = Array.replicate n [] - - n = maybe 0 (Array.length <<< _.points) $ Array.head xs - - reducer { labels, series } { label, points } = - { labels: Array.snoc labels label - , series: Array.zipWith Array.snoc series points - } - -type ChartistData - = { labels :: Array String - , series :: Array (Array ChartistPoint) - } - -type ChartistOptions - = { seriesBarDistance :: Int - , chartPadding :: - { top :: Int - , bottom :: Int - , right :: Int - , left :: Int - } - , axisY :: AxisScale - , plugins :: Array ChartistPlugin - } - -type AxisTitleAxisOptions - = { axisTitle :: String - , axisClass :: String - , offset :: - { x :: Int - , y :: Int - } - , textAnchor :: String - , flipTitle :: Boolean - } - -type AxisTitleOptions - = { axisX :: AxisTitleAxisOptions - , axisY :: AxisTitleAxisOptions - } - -foreign import intAutoScaleAxis :: AxisScale - -foreign import tooltipPlugin :: ChartistPlugin - -foreign import axisTitlePlugin :: AxisTitleOptions -> ChartistPlugin - -foreign import _barChart :: EffectFn2 HTMLElement ChartistOptions Chart - -foreign import _updateData :: EffectFn2 Chart ChartistData Unit - -foreign import _resize :: EffectFn1 Chart Unit - -updateData :: Chart -> ChartistData -> Effect Unit -updateData = runEffectFn2 _updateData - -resize :: Chart -> Effect Unit -resize = runEffectFn1 _resize - -barChart :: - HTMLElement -> - ChartistOptions -> - Effect Chart -barChart element options = runEffectFn2 _barChart element options diff --git a/web-common/src/Clipboard.js b/web-common/src/Clipboard.js deleted file mode 100644 index d58f839f6a..0000000000 --- a/web-common/src/Clipboard.js +++ /dev/null @@ -1,8 +0,0 @@ -/*global exports, require*/ -'use strict'; - -exports._copy = function (string) { - if (navigator && navigator.clipboard) { - navigator.clipboard.writeText(string); - }; -}; diff --git a/web-common/src/Clipboard.purs b/web-common/src/Clipboard.purs deleted file mode 100644 index fb5118891f..0000000000 --- a/web-common/src/Clipboard.purs +++ /dev/null @@ -1,78 +0,0 @@ -module Clipboard - ( class MonadClipboard - , handleAction - , Action(..) - , copy - , clipboardButton - , showShortCopyLong - ) where - -import Bootstrap (btn, btnLink, displayFlex, textTruncate, alignItemsCenter) -import Control.Monad (class Monad) -import Control.Monad.Reader.Trans (ReaderT) -import Control.Monad.State.Trans (StateT) -import Control.Monad.Trans.Class (lift) -import Data.Function ((<<<)) -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Maybe (Maybe(..), fromMaybe) -import Effect (Effect) -import Effect.Aff (Aff) -import Effect.Class (liftEffect) -import Effect.Uncurried (EffectFn1, runEffectFn1) -import Halogen (HalogenM) -import Halogen.HTML (ClassName(..), HTML, button, div, text) -import Halogen.HTML.Events (onClick) -import Halogen.HTML.Properties (class_, classes) -import Icons (Icon(..), icon) -import Prelude (class Show, Unit, const, ($)) - -data Action - = CopyToClipboard String - -derive instance genericAction :: Generic Action _ - -instance showAction :: Show Action where - show = genericShow - -class MonadClipboard m where - copy :: String -> m Unit - -instance monadClipboardEffect :: MonadClipboard Effect where - copy = runEffectFn1 _copy - -instance monadClipboardAff :: MonadClipboard Aff where - copy = liftEffect <<< copy - -instance monadClipboardHalogenM :: (Monad m, MonadClipboard m) => MonadClipboard (HalogenM state action slots output m) where - copy = lift <<< copy - -instance monadClipboardStateT :: (Monad m, MonadClipboard m) => MonadClipboard (StateT s m) where - copy = lift <<< copy - -instance monadClipboardReaderT :: (Monad m, MonadClipboard m) => MonadClipboard (ReaderT env m) where - copy = lift <<< copy - -handleAction :: forall m. MonadClipboard m => Action -> m Unit -handleAction (CopyToClipboard str) = copy str - -foreign import _copy :: EffectFn1 String Unit - -clipboardButton :: forall p. String -> HTML p Action -clipboardButton str = - div - [ class_ $ ClassName "clipboard" ] - [ button - [ classes [ btn, btnLink ] - , onClick $ const $ Just $ CopyToClipboard str - ] - [ icon Clipboard ] - ] - -showShortCopyLong :: forall p. String -> Maybe (Array (HTML p Action)) -> HTML p Action -showShortCopyLong str content = - div [ classes [ displayFlex, alignItemsCenter ] ] - [ div [ classes [ textTruncate ] ] - (fromMaybe [ text str ] content) - , clipboardButton str - ] diff --git a/web-common/src/Component/Avatar/Types.purs b/web-common/src/Component/Avatar/Types.purs deleted file mode 100644 index 64406134ff..0000000000 --- a/web-common/src/Component/Avatar/Types.purs +++ /dev/null @@ -1,12 +0,0 @@ -module Component.Avatar.Types (Input, Size(..)) where - -data Size - = Small - | Medium - | Large - -type Input - = { nickname :: String - , size :: Size - , background :: Array String - } diff --git a/web-common/src/Component/Avatar/View.purs b/web-common/src/Component/Avatar/View.purs deleted file mode 100644 index 4cba2880ab..0000000000 --- a/web-common/src/Component/Avatar/View.purs +++ /dev/null @@ -1,45 +0,0 @@ -module Component.Avatar.View - ( avatar - , avatarWithChildren - ) where - -import Prologue hiding (div) -import Component.Avatar.Types (Input, Size(..)) -import Data.String (take) -import Halogen.Css (classNames) -import Halogen.HTML (HTML, div, span, text) - -avatar :: forall w action. Input -> HTML w action -avatar input = avatarWithChildren input pure - -avatarWithChildren :: - forall w action. - Input -> - (HTML w action -> Array (HTML w action)) -> - HTML w action -avatarWithChildren { background, nickname, size } avatarChildren = - div - [ classNames - $ [ "flex" - , "items-center" - , "justify-center" - , "rounded-full" - ] - <> background - <> case size of - Small -> - [ "h-5" - , "w-5" - ] - Medium -> - [ "h-10" - , "w-10" - ] - Large -> - [ "h-25" - , "w-25" - ] - ] - $ avatarChildren - $ span [ classNames [ "text-sm", "uppercase", "font-semibold", "text-white" ] ] - [ text $ take 1 nickname ] diff --git a/web-common/src/Component/Box.purs b/web-common/src/Component/Box.purs deleted file mode 100644 index d5b24587b6..0000000000 --- a/web-common/src/Component/Box.purs +++ /dev/null @@ -1,44 +0,0 @@ -module Component.Box - ( Preset(..) - , box - , boxIn - ) where - -import Component.Container - ( Container - , ContainerOf - , container - ) -import Data.Default (class Default) -import Halogen.HTML as HH - -data Preset - = NoSpace - | Cramped - | Snug - | Default - | Loose - | CardCramped - | CardSnug - | Card - | CardLoose - -instance defaultPreset :: Default Preset where - default = Default - -boxIn :: Preset -> ContainerOf -boxIn preset = container baseClasses - where - baseClasses = case preset of - NoSpace -> [ "p-0" ] - Cramped -> [ "p-1" ] - Snug -> [ "p-2" ] - Default -> [ "p-4" ] - Loose -> [ "p-6" ] - CardCramped -> [ "p-1", "rounded-sm", "shadow-sm" ] - CardSnug -> [ "p-2", "rounded", "shadow-sm" ] - Card -> [ "p-4", "rounded", "shadow" ] - CardLoose -> [ "p-6", "rounded-lg", "shadow-lg" ] - -box :: Preset -> Container -box preset = boxIn preset HH.div diff --git a/web-common/src/Component/Button/Types.purs b/web-common/src/Component/Button/Types.purs deleted file mode 100644 index 3e0b263235..0000000000 --- a/web-common/src/Component/Button/Types.purs +++ /dev/null @@ -1,5 +0,0 @@ -module Component.Button.Types where - -data Variant - = Primary - | Secondary diff --git a/web-common/src/Component/Button/View.purs b/web-common/src/Component/Button/View.purs deleted file mode 100644 index 1930483c84..0000000000 --- a/web-common/src/Component/Button/View.purs +++ /dev/null @@ -1,46 +0,0 @@ -module Component.Button.View (button) where - -import Prologue -import Component.Button.Types (Variant(..)) -import Data.Array (length) -import Data.Maybe (isNothing) -import Halogen.Css (classNames) -import Halogen.HTML as HH -import Halogen.HTML.Events as HE -import Halogen.HTML.Properties as HP - -button :: - forall w action. - Variant -> - Maybe action -> - Array String -> - Array (HH.HTML w action) -> - HH.HTML w action -button variant onClick extraClasses children = - HH.button - [ classNames $ classes <> extraClasses - , HP.disabled disabled - , HE.onClick (const onClick) - ] - children - where - disabled = isNothing onClick - - classes = - [ "rounded-full" - , "flex" - , "font-bold" - , "p-4" - , if disabled then "cursor-default" else "cursor-pointer" - , if length children == 1 then "justify-center" else "justify-between" - , "transition-all" - , "duration-200" - ] - <> variantStyles - - -- TODO make the focus and active styles better - variantStyles - | disabled = [ "bg-gray-200", "text-black", "text-opacity-50" ] - | otherwise = case variant of - Primary -> [ "bg-gradient-to-r", "from-purple", "to-lightpurple", "text-white", "shadow", "active:shadow", "hover:shadow-lg" ] - Secondary -> [ "bg-gray-200", "text-black", "hover:shadow", "active:shadow-none" ] diff --git a/web-common/src/Component/Column.purs b/web-common/src/Component/Column.purs deleted file mode 100644 index 580deb2268..0000000000 --- a/web-common/src/Component/Column.purs +++ /dev/null @@ -1,38 +0,0 @@ -module Component.Column - ( Preset(..) - , column - , columnIn - ) where - -import Component.Layout - ( Layout - , LayoutOf - , layout - ) -import Data.Default (class Default) -import Halogen.HTML as HH - -data Preset - = NoSpace - | Divided - | Cramped - | Snug - | Default - | Loose - -instance defaultPreset :: Default Preset where - default = Default - -columnIn :: Preset -> LayoutOf -columnIn preset = layout baseClasses - where - baseClasses = case preset of - NoSpace -> [] - Divided -> [ "divide-y-2", "divide-gray-300" ] - Cramped -> [ "space-y-1" ] - Snug -> [ "space-y-2" ] - Default -> [ "space-y-4" ] - Loose -> [ "space-y-6" ] - -column :: Preset -> Layout -column preset = columnIn preset HH.div diff --git a/web-common/src/Component/Container.purs b/web-common/src/Component/Container.purs deleted file mode 100644 index 705bf1091c..0000000000 --- a/web-common/src/Component/Container.purs +++ /dev/null @@ -1,22 +0,0 @@ -module Component.Container where - -import Prologue -import Data.Array (singleton) -import Halogen.Css (classNames) -import Halogen.HTML as HH - -type ContainerOf - = forall r w i. - HH.Node ( class :: String | r ) w i -> - Array String -> - HH.HTML w i -> - HH.HTML w i - -type Container - = forall w i. - Array String -> - HH.HTML w i -> - HH.HTML w i - -container :: Array String -> ContainerOf -container baseClasses node extraClasses = node [ classNames $ baseClasses <> extraClasses ] <<< singleton diff --git a/web-common/src/Component/Expand.purs b/web-common/src/Component/Expand.purs deleted file mode 100644 index 11d497a3ad..0000000000 --- a/web-common/src/Component/Expand.purs +++ /dev/null @@ -1,75 +0,0 @@ -module Component.Expand - ( component - , expand - , expand_ - , toggle - , module Types - ) where - -import Prologue -import Component.Expand.State (handleAction, handleQuery, initialState) -import Component.Expand.Types (Action(..), Component, ComponentHTML, Slot, State) -import Component.Expand.Types (Action, Component, ComponentHTML, Input, Query(..), Slot, State(..)) as Types -import Data.Symbol (SProxy(..)) -import Halogen as H -import Halogen.HTML as HH - -expandSlot :: SProxy "expandSlot" -expandSlot = SProxy - -expand :: - forall slots slot m parentAction parentSlots. - Ord slot => - Monad m => - slot -> - State -> - (State -> ComponentHTML parentSlots parentAction m) -> - H.ComponentHTML parentAction ( expandSlot :: Slot parentAction slot | slots ) m -expand slot initial render = - HH.slot - expandSlot - slot - component - { initial, render } - Just - -expand_ :: - forall slots slot m parentAction parentSlots. - Ord slot => - Monad m => - slot -> - State -> - (State -> ComponentHTML parentSlots Void m) -> - H.ComponentHTML parentAction ( expandSlot :: Slot Void slot | slots ) m -expand_ slot initial render = - HH.slot expandSlot slot component - { initial - , render - } - $ const Nothing - -component :: - forall parentSlots parentAction m. - Monad m => - Component parentSlots parentAction m -component = - H.mkComponent - { initialState - , render: \{ render, state } -> render state - , eval: - H.mkEval - H.defaultEval - { handleAction = handleAction - , handleQuery = handleQuery - , receive = Just <<< Receive - } - } - -toggle :: forall parentSlots parentAction m. Action parentSlots parentAction m -toggle = AToggle - -raise :: - forall parentSlots parentAction m. - parentAction -> - Action parentSlots parentAction m -raise = Raise diff --git a/web-common/src/Component/Expand/State.purs b/web-common/src/Component/Expand/State.purs deleted file mode 100644 index fc23600330..0000000000 --- a/web-common/src/Component/Expand/State.purs +++ /dev/null @@ -1,49 +0,0 @@ -module Component.Expand.State - ( handleAction - , handleQuery - , initialState - ) where - -import Prologue -import Component.Expand.Types (Action(..), Input, Query(..), State(..)) -import Component.Expand.Types.Internal (DSL, InnerState) -import Halogen as H - -initialState :: - forall parentSlots parentAction m. - Input parentSlots parentAction m -> - InnerState parentSlots parentAction m -initialState input = - { state: input.initial - , render: input.render - } - -handleQuery :: - forall parentSlots parentAction m a. - Monad m => - Query a -> - DSL parentSlots parentAction m (Maybe a) -handleQuery = case _ of - Open a -> do - void $ H.modify _ { state = Opened } - pure $ Just a - Close a -> do - void $ H.modify _ { state = Closed } - pure $ Just a - Toggle a -> do - handleAction AToggle - pure $ Just a - IsOpen k -> Just <<< k <$> H.gets _.state - -handleAction :: - forall parentSlots parentAction m. - Monad m => - Action parentSlots parentAction m -> - DSL parentSlots parentAction m Unit -handleAction = case _ of - AToggle -> - H.modify_ case _ of - state@{ state: Opened } -> state { state = Closed } - state -> state { state = Opened } - Raise input -> H.raise input - Receive { render } -> void $ H.modify _ { render = render } diff --git a/web-common/src/Component/Expand/Types.purs b/web-common/src/Component/Expand/Types.purs deleted file mode 100644 index c79b06121b..0000000000 --- a/web-common/src/Component/Expand/Types.purs +++ /dev/null @@ -1,33 +0,0 @@ -module Component.Expand.Types where - -import Halogen as H -import Halogen.HTML as HH - -data Action parentSlots parentAction m - = AToggle - | Raise parentAction - | Receive (Input parentSlots parentAction m) - -type Input parentSlots parentAction m - = { initial :: State - , render :: State -> ComponentHTML parentSlots parentAction m - } - -type ComponentHTML parentSlots parentAction m - = H.ComponentHTML (Action parentSlots parentAction m) parentSlots m - -data Query a - = Open a - | Close a - | Toggle a - | IsOpen (State -> a) - -data State - = Opened - | Closed - -type Slot parentAction slot - = H.Slot Query parentAction slot - -type Component parentSlots parentAction m - = H.Component HH.HTML Query (Input parentSlots parentAction m) parentAction m diff --git a/web-common/src/Component/Expand/Types/Internal.purs b/web-common/src/Component/Expand/Types/Internal.purs deleted file mode 100644 index 0e3da4de07..0000000000 --- a/web-common/src/Component/Expand/Types/Internal.purs +++ /dev/null @@ -1,17 +0,0 @@ -module Component.Expand.Types.Internal where - -import Component.Expand.Types (Action, ComponentHTML, State) -import Halogen as H - -type InnerState parentSlots parentAction m - = { state :: State - , render :: State -> ComponentHTML parentSlots parentAction m - } - -type DSL parentSlots parentAction m a - = H.HalogenM (InnerState parentSlots parentAction m) - (Action parentSlots parentAction m) - parentSlots - parentAction - m - a diff --git a/web-common/src/Component/Heading.purs b/web-common/src/Component/Heading.purs deleted file mode 100644 index 23db971b14..0000000000 --- a/web-common/src/Component/Heading.purs +++ /dev/null @@ -1,23 +0,0 @@ -module Component.Heading (Preset(..), heading) where - -import Prologue -import Component.Layout (Layout, layout) -import Halogen.HTML as HH - -data Preset - = H1 - | H2 - | H3 - | H4 - -heading :: Preset -> Layout -heading H1 = layout (commonStyles <> [ "text-xl" ]) HH.h1 - -heading H2 = layout (commonStyles <> [ "text-lg" ]) HH.h2 - -heading H3 = layout (commonStyles <> [ "text-base" ]) HH.h3 - -heading H4 = layout (commonStyles <> [ "text-sm" ]) HH.h4 - -commonStyles :: Array String -commonStyles = [ "font-semibold" ] diff --git a/web-common/src/Component/Hint/Lenses.purs b/web-common/src/Component/Hint/Lenses.purs deleted file mode 100644 index 2eb1574b79..0000000000 --- a/web-common/src/Component/Hint/Lenses.purs +++ /dev/null @@ -1,23 +0,0 @@ -module Component.Hint.Lenses where - -import Data.Lens (Lens') -import Data.Lens.Record (prop) -import Data.Symbol (SProxy(..)) - -_content :: forall s a. Lens' { content :: a | s } a -_content = prop (SProxy :: SProxy "content") - -_active :: forall s a. Lens' { active :: a | s } a -_active = prop (SProxy :: SProxy "active") - -_reference :: forall s a. Lens' { reference :: a | s } a -_reference = prop (SProxy :: SProxy "reference") - -_placement :: forall s a. Lens' { placement :: a | s } a -_placement = prop (SProxy :: SProxy "placement") - -_mPopperInstance :: forall s a. Lens' { mPopperInstance :: a | s } a -_mPopperInstance = prop (SProxy :: SProxy "mPopperInstance") - -_mGlobalClickSubscription :: forall s a. Lens' { mGlobalClickSubscription :: a | s } a -_mGlobalClickSubscription = prop (SProxy :: SProxy "mGlobalClickSubscription") diff --git a/web-common/src/Component/Hint/State.purs b/web-common/src/Component/Hint/State.purs deleted file mode 100644 index 2c74a66cad..0000000000 --- a/web-common/src/Component/Hint/State.purs +++ /dev/null @@ -1,185 +0,0 @@ -module Component.Hint.State (component, hint) where - -import Prelude -import Component.Hint.Lenses (_active, _content, _mGlobalClickSubscription, _mPopperInstance, _placement) -import Component.Hint.Types (Action(..), Input, State, arrowRef, hintRef, popoutRef) -import Component.Hint.View (render) -import Component.Popper (OffsetOption(..), PaddingOption(..), Placement, PositioningStrategy(..), arrow, createPopper, defaultFlip, defaultModifiers, defaultPreventOverflow, destroyPopper, flipPlacement, forceUpdate, offset, pAll, preventOverflow) -import Control.Monad.Maybe.Trans (MaybeT(..), runMaybeT) -import Data.Array (all) -import Data.Foldable (for_) -import Data.Int (toNumber) -import Data.Lens (assign, set, use) -import Data.Maybe (Maybe(..)) -import Data.Symbol (SProxy(..)) -import Data.Traversable (for, traverse) -import Effect.Aff.Class (class MonadAff) -import Halogen (Component, HalogenM, Slot, get, getHTMLElementRef, liftEffect, mkComponent, modify_) -import Halogen as H -import Halogen.HTML (ComponentHTML, HTML, PlainHTML, slot) -import Halogen.Query.EventSource (EventSource) -import Halogen.Query.EventSource as EventSource -import Web.Event.Event (EventType(..)) -import Web.Event.EventTarget (addEventListener, eventListener, removeEventListener) -import Web.HTML (HTMLElement, window) -import Web.HTML.HTMLDocument as HTMLDocument -import Web.HTML.HTMLElement (DOMRect, getBoundingClientRect) -import Web.HTML.Window (document) -import Web.UIEvent.MouseEvent as MouseEvent - -_hintSlot :: SProxy "hintSlot" -_hintSlot = SProxy - -hint :: - forall slots m action. - MonadAff m => - Array String -> - String -> - Placement -> - PlainHTML -> - ComponentHTML action ( hintSlot :: forall query. Slot query Void String | slots ) m -hint hintElementClasses ref placement content = - slot - _hintSlot - ref - component - { content, placement, hintElementClasses } - absurd - -initialState :: Input -> State -initialState { content, placement, hintElementClasses } = - { content - , placement - , hintElementClasses - , active: false - , mPopperInstance: Nothing - , mGlobalClickSubscription: Nothing - } - -component :: - forall m query. - MonadAff m => - Component HTML query Input Void m -component = - mkComponent - { initialState - , render - , eval: - H.mkEval - $ H.defaultEval - { initialize = Just Init - , finalize = Just Finalize - , handleAction = handleAction - , receive = \input -> Just $ OnNewInput input - } - } - -handleAction :: - forall m slots. - MonadAff m => - Action -> - HalogenM State Action slots Void m Unit -handleAction Init = do - placement <- use _placement - mPopperInstance <- - runMaybeT do - arrowElem <- MaybeT $ getHTMLElementRef arrowRef - let - modifiers = - defaultModifiers - <> [ arrow arrowElem (PaddingValue $ pAll 0.0) - , offset (OffsetValue { skidding: 0.0, distance: 8.0 }) - , preventOverflow defaultPreventOverflow - , flipPlacement defaultFlip - ] - hintElem <- MaybeT $ getHTMLElementRef hintRef - popoutElem <- MaybeT $ getHTMLElementRef popoutRef - liftEffect $ createPopper hintElem popoutElem { placement, modifiers, strategy: Fixed } - assign _mPopperInstance mPopperInstance - -handleAction Finalize = do - mPopperInstance <- use _mPopperInstance - for_ mPopperInstance $ liftEffect <<< destroyPopper - -handleAction (OnNewInput input) = do - { active, content, placement } <- get - modify_ - $ set _content input.content - <<< set _placement input.placement - when active forceUpdatePopper - -handleAction Open = do - mHintElem <- getHTMLElementRef hintRef - mPopoutElem <- getHTMLElementRef popoutRef - let - mElements :: Maybe (Array HTMLElement) - mElements = (\a b -> [ a, b ]) <$> mHintElem <*> mPopoutElem - mGlobalClickSubscription <- traverse (H.subscribe <<< clickOutsideEventSource) mElements - modify_ - $ set _active true - <<< set _mGlobalClickSubscription mGlobalClickSubscription - forceUpdatePopper - -handleAction Close = do - mGlobalClickSubscription <- use _mGlobalClickSubscription - for_ mGlobalClickSubscription H.unsubscribe - modify_ - $ set _active false - <<< set _mGlobalClickSubscription Nothing - -handleAction Toggle = do - active <- use _active - if active then - handleAction Close - else - handleAction Open - -type Point2D - = { x :: Number, y :: Number } - -outside :: DOMRect -> Point2D -> Boolean -outside { top, bottom, left, right } { x, y } = x < left || x > right || y > bottom || y < top - -inside :: DOMRect -> Point2D -> Boolean -inside rect = not <<< outside rect - --- This subscription attaches to the document's click event and checks wether a click was --- made outside the hint dialog and the hint element. We need to check for both elements --- because we also receive the event that starts this subscription, which is inside the hint --- element but outside the hint dialog. --- Initially this was done using `eventListenerEventSource` which is simpler than `effectEventSource` --- (as you don't need to manually add and remove the event listener) --- but it had a problem of not being able to perform effects, so we couldn't recalculate --- the client rect on each click. -clickOutsideEventSource :: - forall m. - MonadAff m => - Array HTMLElement -> - EventSource m Action -clickOutsideEventSource elements = - EventSource.effectEventSource \emitter -> do - listener <- - eventListener \evt -> do - -- We recalculate the client rect for each element because Popper might move them - clientRects <- for elements getBoundingClientRect - let - mClickOutside = - MouseEvent.fromEvent evt - <#> \mouseEvent -> - let - point = - { x: toNumber $ MouseEvent.clientX mouseEvent - , y: toNumber $ MouseEvent.clientY mouseEvent - } - in - all (\rect -> outside rect point) clientRects - when (mClickOutside == Just true) $ EventSource.emit emitter Close - -- Add the event listener and remove it once the subscription finalizes - docTarget <- liftEffect $ map HTMLDocument.toEventTarget $ document =<< window - addEventListener (EventType "click") listener false docTarget - pure $ EventSource.Finalizer $ removeEventListener (EventType "click") listener false docTarget - -forceUpdatePopper :: forall m slots. MonadAff m => HalogenM State Action slots Void m Unit -forceUpdatePopper = do - mPopperInstance <- use _mPopperInstance - for_ mPopperInstance $ liftEffect <<< forceUpdate diff --git a/web-common/src/Component/Hint/Types.purs b/web-common/src/Component/Hint/Types.purs deleted file mode 100644 index aeb85aabe4..0000000000 --- a/web-common/src/Component/Hint/Types.purs +++ /dev/null @@ -1,43 +0,0 @@ -module Component.Hint.Types where - -import Data.Maybe (Maybe) -import Component.Popper (Placement, PopperInstance) -import Halogen (RefLabel(..), SubscriptionId) -import Halogen.HTML (PlainHTML) - -type State - = { content :: PlainHTML - , active :: Boolean - , placement :: Placement - -- The placement of the hint icon (the "?" icon) is a responsability of - -- the parent (whoever includes the hint). - , hintElementClasses :: Array String - , mPopperInstance :: Maybe PopperInstance - -- When the hint is active we keep track of clicks in the window to close - -- the hint if the click was made outside of the dialog. We need to keep - -- the subscription in the state to clear it once the hint closes. - , mGlobalClickSubscription :: Maybe SubscriptionId - } - -type Input - = { hintElementClasses :: Array String - , content :: PlainHTML - , placement :: Placement - } - -data Action - = Init - | Finalize - | OnNewInput Input - | Open - | Close - | Toggle - -hintRef :: RefLabel -hintRef = (RefLabel "hint") - -popoutRef :: RefLabel -popoutRef = (RefLabel "popout") - -arrowRef :: RefLabel -arrowRef = (RefLabel "arrow") diff --git a/web-common/src/Component/Hint/View.purs b/web-common/src/Component/Hint/View.purs deleted file mode 100644 index 2147d74755..0000000000 --- a/web-common/src/Component/Hint/View.purs +++ /dev/null @@ -1,63 +0,0 @@ -module Component.Hint.View (render) where - -import Prelude hiding (div) -import Component.Hint.Types (Action(..), State, arrowRef, hintRef, popoutRef) -import Component.Icons as Icon -import Halogen.Css (classNames, hideWhen) -import Halogen.HTML (HTML, div, fromPlainHTML) -import Halogen.HTML.Events.Extra (onClick_) -import Halogen.HTML.Properties (ref) -import Halogen.HTML.Properties.ARIA (role) - -render :: forall p. State -> HTML p Action -render state = - div [ classNames $ [ "inline" ] <> state.hintElementClasses ] - [ div - [ classNames - [ "cursor-pointer" - , "inline" - ] - , onClick_ Toggle - , ref hintRef - ] - [ Icon.icon Icon.HelpOutline [ "text-purple", "text-xs" ] ] - , div - [ ref popoutRef - , role "tooltip" - , classNames - ( [ "bg-white" - , "rounded-sm" - , "shadow-flat" - , "z-50" - -- The poput dialog has a min width in pixels (min-w-hint) and - -- a max width set to min-content (max-w-min). The first property - -- is straight forward, it guarantees that the width of the dialog - -- will be at least the defined size. The second property defines - -- the "breaking point", and it's calculated from the state.content's - -- width. - -- If we didn't provide a max-width, the dialog would occupy as much - -- as possible, so it would never break. By setting the max-width to - -- min-content it's up to state.content to define which is the minimum - -- unbreakable width. This can be defined using `min-w-max` or - -- `flex-shrink-0`. - , "min-w-hint" - , "max-w-min" - ] - <> hideWhen (not state.active) - ) - ] - [ div - [ ref arrowRef - , classNames [ "popover-arrow" ] - ] - [] - , div - [ classNames [ "flex", "justify-end", "pt-2", "pr-2" ] - , onClick_ Close - ] - [ Icon.icon Icon.Close [ "cursor-pointer" ] ] - , div - [ classNames [ "p-4", "pt-0" ] ] - [ fromPlainHTML state.content ] - ] - ] diff --git a/web-common/src/Component/IconButton/View.purs b/web-common/src/Component/IconButton/View.purs deleted file mode 100644 index e9f33a30bf..0000000000 --- a/web-common/src/Component/IconButton/View.purs +++ /dev/null @@ -1,16 +0,0 @@ -module Component.IconButton.View (iconButton) where - -import Prologue -import Component.Icons (Icon, icon_) -import Data.Maybe (isNothing) -import Halogen.HTML as HH -import Halogen.HTML.Events as HE -import Halogen.HTML.Properties as HP - -iconButton :: forall w action. Icon -> Maybe action -> HH.HTML w action -iconButton ic onClick = - HH.button - [ HP.disabled $ isNothing onClick - , HE.onClick (const onClick) - ] - [ icon_ ic ] diff --git a/web-common/src/Component/Icons.purs b/web-common/src/Component/Icons.purs deleted file mode 100644 index 61f8a07b27..0000000000 --- a/web-common/src/Component/Icons.purs +++ /dev/null @@ -1,227 +0,0 @@ --- All available icons can be found here: https://material.io/resources/icons/?icon=timer&style=round --- TODO: replace web-common Icons module with this one -module Component.Icons - ( icon - , icon_ - , Icon(..) - , iconClass - ) where - -import Prelude -import Data.Array (cons) -import Halogen.HTML (ClassName(ClassName), HTML, span, text) -import Halogen.HTML.Properties (classes) - -icon :: forall p i. Icon -> Array String -> HTML p i -icon i extraClasses = span [ classes $ ClassName <$> cons "material-icons-round" extraClasses ] [ text $ content i ] - -icon_ :: forall p i. Icon -> HTML p i -icon_ i = icon i [] - ------ -data Icon - = Add - | AddBox - | AddCircle - | ArrowRight - | ArrowLeft - | Close - | Contacts - | Contract - | ContractContractForDifferences - | ContractLoan - | ContractPurchase - | Copy - | Done - | DoneWithCircle - | ErrorOutline - | ExpandMore - | ExpandLess - | Help - | HelpOutline - | History - | Home - | Info - | Language - | Menu - | Next - | NewContact - | Pay - | Play - | Previous - | Refresh - | ReadMore - | Roles - | Running - | South - | Sync - | Task - | TaskAlt - | Terms - | Timer - | Tutorials - -content :: Icon -> String -content Add = "add" - -content AddBox = "add_box" - -content AddCircle = "add_circle" - -content ArrowRight = "east" - -content ArrowLeft = "west" - -content Close = "close" - -content Contacts = "people" - -content Contract = "history_edu" - -content ContractContractForDifferences = "trending_up" - -content ContractLoan = "wrap_text" -- FIXME: this is the wrong icon (I can't find the right one) - -content ContractPurchase = "swap_horiz" - -content Copy = "copy_content" - -content Done = "done" - -content DoneWithCircle = "check_circle_outline" - -content ErrorOutline = "error_outline" - -content ExpandMore = "expand_more" - -content ExpandLess = "expand_less" - -content Help = "help" - -content HelpOutline = "help_outline" - -content History = "history" - -content Home = "home" - -content Info = "info" - -content Language = "language" - -content Menu = "short_text" - -content Next = "chevron_right" - -content NewContact = "person_add_alt" - -content Pay = "credit_score" - -content Play = "play_arrow" - -content Previous = "chevron_left" - -content Refresh = "refresh" - -content ReadMore = "read_more" - -content Roles = "person_pin_circle" - -content Running = "directions_run" - -content South = "south" - -content Sync = "sync" - -content Task = "task" - -content TaskAlt = "task_alt" - -content Terms = "drive_file_rename_outline" - -content Timer = "timer" - -content Tutorials = "school" - --- This helper function allow us to add `with-icon-{iconClass}` class name --- which allow Icons in buttons to look correctly. Whenever a new icon is added --- here, we should update the `icons.css` file accordingly. -iconClass :: Icon -> String -iconClass Add = "add" - -iconClass AddBox = "add-box" - -iconClass AddCircle = "add-circle" - -iconClass ArrowRight = "arrow-right" - -iconClass ArrowLeft = "arrow-left" - -iconClass Close = "close" - -iconClass Contacts = "contacts" - -iconClass Contract = "contract" - -iconClass ContractContractForDifferences = "contract-contract-for-differences" - -iconClass ContractLoan = "contract-loan" - -iconClass ContractPurchase = "contract-purchase" - -iconClass Copy = "copy" - -iconClass Done = "done" - -iconClass DoneWithCircle = "check-circle-outline" - -iconClass ErrorOutline = "error-outline" - -iconClass ExpandMore = "expand-more" - -iconClass ExpandLess = "expand-less" - -iconClass Help = "help" - -iconClass HelpOutline = "help-outline" - -iconClass History = "history" - -iconClass Home = "home" - -iconClass Info = "info" - -iconClass Language = "language" - -iconClass Menu = "menu" - -iconClass Next = "next" - -iconClass NewContact = "new-contact" - -iconClass Pay = "pay" - -iconClass Play = "play" - -iconClass Previous = "previous" - -iconClass Refresh = "refresh" - -iconClass ReadMore = "read-more" - -iconClass Roles = "roles" - -iconClass Running = "running" - -iconClass South = "south" - -iconClass Sync = "sync" - -iconClass Task = "task" - -iconClass TaskAlt = "task-alt" - -iconClass Terms = "terms" - -iconClass Timer = "timer" - -iconClass Tutorials = "tutorials" diff --git a/web-common/src/Component/Input/Types.purs b/web-common/src/Component/Input/Types.purs deleted file mode 100644 index ef605a9cae..0000000000 --- a/web-common/src/Component/Input/Types.purs +++ /dev/null @@ -1,23 +0,0 @@ -module Component.Input.Types - ( InputType(..) - , Input - ) where - -import Data.Maybe (Maybe) - -data InputType - = Text - | Numeric - -type Input action - = { autocomplete :: Boolean - , id :: String - , inputType :: InputType - , invalid :: Boolean - , noHighlight :: Boolean - , onBlur :: Maybe action - , onChange :: Maybe (String -> action) - , onFocus :: Maybe action - , placeholder :: String - , value :: String - } diff --git a/web-common/src/Component/Input/View.purs b/web-common/src/Component/Input/View.purs deleted file mode 100644 index c70d8ad41e..0000000000 --- a/web-common/src/Component/Input/View.purs +++ /dev/null @@ -1,97 +0,0 @@ -module Component.Input.View - ( defaultInput - , renderWithChildren - , render - ) where - -import Prelude -import Component.Input.Types (Input, InputType(..)) -import Data.Maybe (Maybe(..), isNothing, maybe) -import Data.Traversable (sequence) -import Halogen as H -import Halogen.Css (classNames) -import Halogen.HTML as HH -import Halogen.HTML.Events as HE -import Halogen.HTML.Properties as HP - -defaultInput :: forall action. Input action -defaultInput = - { autocomplete: false - , id: "" - , inputType: Text - , invalid: false - , noHighlight: false - , onBlur: Nothing - , onChange: Nothing - , onFocus: Nothing - , placeholder: "" - , value: "" - } - -render :: forall w action. Input action -> HH.HTML w action -render input = renderWithChildren input pure - -renderWithChildren :: - forall w action. - Input action -> - (HH.HTML w action -> Array (HH.HTML w action)) -> - HH.HTML w action -renderWithChildren input renderChildren = - HH.div - [ classNames containerStyles ] - $ renderChildren - $ HH.input - $ [ classNames inputStyles - , HP.id_ input.id - , HP.ref $ H.RefLabel input.id - , HP.placeholder input.placeholder - , HP.autocomplete input.autocomplete - , HP.value input.value - , HP.readOnly $ isNothing input.onChange - , HP.tabIndex $ maybe (-1) (const 0) input.onChange - , HE.onValueInput $ sequence input.onChange - , HE.onBlur $ const input.onBlur - , HE.onFocus $ const input.onFocus - , HP.type_ case input.inputType of - Text -> HP.InputText - Numeric -> HP.InputNumber - ] - where - containerStyles = - [ "border-2" - , "duration-200" - , "flex" - , "gap-1" - , "items-baseline" - , "p-4" - , "relative" - , "rounded-sm" - , "transition-all" - , "w-full" - ] - <> if input.noHighlight || isNothing input.onChange then - [ if input.invalid then "border-red" else "border-gray" ] - else - [ "focus:border-transparent" - , "focus:ring-2" - , "focus-within:border-transparent" - , "focus-within:ring-2" - ] - <> if input.invalid then - [ "border-red", "ring-red" ] - else - [ "border-gray", "ring-purple" ] - - inputStyles = - [ "border-0" - , "duration-200" - , "flex-1" - , "focus:outline-none" - , "focus:ring-0" - , "leading-none" - , "outline-none" - , "p-0" - , "ring-0" - , "text-black" - , "transition-all" - ] diff --git a/web-common/src/Component/Label/Types.purs b/web-common/src/Component/Label/Types.purs deleted file mode 100644 index ea54638849..0000000000 --- a/web-common/src/Component/Label/Types.purs +++ /dev/null @@ -1,14 +0,0 @@ -module Component.Label.Types - ( Input - , Variant(..) - ) where - -data Variant - = Above - | Nested - -type Input - = { for :: String - , text :: String - , variant :: Variant - } diff --git a/web-common/src/Component/Label/View.purs b/web-common/src/Component/Label/View.purs deleted file mode 100644 index b5b3f496cf..0000000000 --- a/web-common/src/Component/Label/View.purs +++ /dev/null @@ -1,51 +0,0 @@ -module Component.Label.View - ( defaultInput - , render - , renderWithChildren - ) where - -import Prelude -import Component.Label.Types (Input, Variant(..)) -import Halogen.Css (classNames) -import Halogen.HTML as HH - -defaultInput :: Input -defaultInput = - { for: "" - , text: "" - , variant: Nested - } - -render :: forall w action. Input -> HH.HTML w action -render params = renderWithChildren params pure - -renderWithChildren :: - forall w action. - Input -> - (HH.HTML w action -> Array (HH.HTML w action)) -> - HH.HTML w action -renderWithChildren params renderChildren = - HH.label - ( [ classNames labelStyles ] - ) - $ renderChildren - $ HH.span [ classNames spanStyles ] [ HH.text params.text ] - where - labelStyles = - [ "space-x-2", "leading-none" ] - <> case params.variant of - Above -> [ "block" ] - Nested -> - [ "absolute" - , "z-10" - , "left-2" - , "-top-2.5" - , "px-2" - , "bg-white" - ] - - spanStyles = - [ "font-semibold" ] - <> case params.variant of - Above -> [ "text-sm" ] - Nested -> [ "text-xs" ] diff --git a/web-common/src/Component/Layout.purs b/web-common/src/Component/Layout.purs deleted file mode 100644 index bf7a0b4b0f..0000000000 --- a/web-common/src/Component/Layout.purs +++ /dev/null @@ -1,21 +0,0 @@ -module Component.Layout where - -import Prologue -import Halogen.Css (classNames) -import Halogen.HTML as HH - -type LayoutOf - = forall r w i. - HH.Node ( class :: String | r ) w i -> - Array String -> - Array (HH.HTML w i) -> - HH.HTML w i - -type Layout - = forall w i. - Array String -> - Array (HH.HTML w i) -> - HH.HTML w i - -layout :: Array String -> LayoutOf -layout baseClasses node extraClasses = node [ classNames $ baseClasses <> extraClasses ] diff --git a/web-common/src/Component/Link.purs b/web-common/src/Component/Link.purs deleted file mode 100644 index a3c39cb077..0000000000 --- a/web-common/src/Component/Link.purs +++ /dev/null @@ -1,19 +0,0 @@ -module Component.Link (link) where - -import Prologue -import Component.Layout (Layout) -import Halogen.Css (classNames) -import Halogen.HTML as HH -import Halogen.HTML.Properties as HP - -link :: String -> Layout -link href extraClasses = HH.a [ classNames classes, HP.href href ] - where - classes = - [ "font-semibold" - , "underline" - , "hover:text-lightpurple" - , "active:text-purple" - , "visited:text-red" - ] - <> extraClasses diff --git a/web-common/src/Component/Popper.purs b/web-common/src/Component/Popper.purs deleted file mode 100644 index 9bae29a9d9..0000000000 --- a/web-common/src/Component/Popper.purs +++ /dev/null @@ -1,59 +0,0 @@ -module Component.Popper - ( module Component.Popper.Types - , module ExportedInternal - , defaultModifiers - , defaultPreventOverflow - , defaultFlip - ) where - -import Component.Popper.Types -import Component.Popper.Internal (createPopper, forceUpdate, destroyPopper, arrow, computeStyles, applyStyles, eventListeners, popperOffsets, offset, preventOverflow, flipPlacement) as ExportedInternal - -defaultModifiers :: Array Modifier -defaultModifiers = - [ ExportedInternal.computeStyles - { gpuAcceleration: true - , adaptive: true - , roundOffsets: true - } - , ExportedInternal.applyStyles - , ExportedInternal.eventListeners - { scroll: true - , resize: true - } - , ExportedInternal.popperOffsets - ] - -defaultPreventOverflow :: PreventOverflowOptions -defaultPreventOverflow = - { mainAxis: true - , altAxis: false - , padding: pAll 0.0 - , boundary: ClippinParents - , altBoundary: false - , rootBoundary: ViewportBoundary - , tether: true - , tetherOffset: TetherOffset 0.0 - } - -defaultFlip :: FlipOptions -defaultFlip = - { padding: pAll 0.0 - , boundary: ClippinParents - , rootBoundary: ViewportBoundary - , flipVariations: true - , allowedAutoPlacements: - [ Top - , TopStart - , TopEnd - , Bottom - , BottomStart - , BottomEnd - , Right - , RightStart - , RightEnd - , Left - , LeftStart - , LeftEnd - ] - } diff --git a/web-common/src/Component/Popper/Internal.js b/web-common/src/Component/Popper/Internal.js deleted file mode 100644 index aac4db6a83..0000000000 --- a/web-common/src/Component/Popper/Internal.js +++ /dev/null @@ -1,67 +0,0 @@ -exports._arrow = function (element, padding) { - const modifier = require("@popperjs/core/lib/modifiers/arrow").default; - return Object.assign({}, modifier, { - options: { element, padding }, - }); -}; - -exports._popperOffsets = function () { - return require("@popperjs/core/lib/modifiers/popperOffsets").default; -}; - -exports._computeStyles = function (options) { - const modifier = - require("@popperjs/core/lib/modifiers/computeStyles").default; - return Object.assign({}, modifier, { - options, - }); -}; - -exports._applyStyles = function () { - return require("@popperjs/core/lib/modifiers/applyStyles").default; -}; - -exports._eventListeners = function (options) { - const modifier = - require("@popperjs/core/lib/modifiers/eventListeners").default; - return Object.assign({}, modifier, { - options, - }); -}; - -exports._offset = function (options) { - const modifier = require("@popperjs/core/lib/modifiers/offset").default; - return Object.assign({}, modifier, { - options, - }); -}; - -exports._preventOverflow = function (options) { - const modifier = - require("@popperjs/core/lib/modifiers/preventOverflow").default; - return Object.assign({}, modifier, { - options, - }); -}; - -exports._flipPlacement = function (options) { - const modifier = - require("@popperjs/core/lib/modifiers/flip").default; - return Object.assign({}, modifier, { - options, - }); -}; - - -exports._createPopper = function (reference, popper, options) { - const { createPopper } = require("@popperjs/core/lib/createPopper"); - return createPopper(reference, popper, options); -}; - -exports._destroyPopper = function (instance) { - instance.destroy(); -}; - -exports._forceUpdate = function (instance) { - instance.forceUpdate(); -}; diff --git a/web-common/src/Component/Popper/Internal.purs b/web-common/src/Component/Popper/Internal.purs deleted file mode 100644 index 32db493b86..0000000000 --- a/web-common/src/Component/Popper/Internal.purs +++ /dev/null @@ -1,219 +0,0 @@ -module Component.Popper.Internal - ( createPopper -- constructor - -- instance methods - , forceUpdate - , destroyPopper - -- Modifiers - , arrow - , popperOffsets - , computeStyles - , applyStyles - , eventListeners - , offset - , preventOverflow - , flipPlacement - ) where - -import Prelude -import Component.Popper.Types (Boundary(..), ComputeStyleOptions, EventListenerOptions, Modifier, Offset, OffsetOption(..), Options, Padding(..), PaddingOption(..), Placement(..), PopperInstance, PositioningStrategy(..), PreventOverflowOptions, Rect, RootBoundary(..), TetherOffsetOption(..), FlipOptions) -import Data.Array as Array -import Data.Function.Uncurried (Fn0, Fn1, Fn2, runFn0, runFn1, runFn2) -import Data.Tuple (Tuple(..)) -import Effect (Effect) -import Effect.Exception.Unsafe (unsafeThrow) -import Effect.Uncurried (EffectFn1, EffectFn3, runEffectFn1, runEffectFn3) -import Foreign (Foreign, unsafeToForeign) -import Foreign.Generic (encode) as Foreign -import Foreign.Object as Object -import Web.HTML (HTMLElement) - -------------------------------------------------------------------------------------------------------- --- General note on Modifiers: --- PopperJS has a plugin architecture around modifiers. We offer FFI bindings to them using the --- "plain" uncurried helpers. --- There is no need to use the effect uncurried functions (death man last words) as we treat Modifiers --- as opaque types. We don't compare them, and have no need for referential transparency with them. --- Some of the modifiers don't receive any parameters (e.g. applyStyles), but they are still functions --- of no argument. This helps the bundler to tree shake the modifiers we don't use. ----- -foreign import _arrow :: Fn2 HTMLElement Foreign Modifier - -arrow :: HTMLElement -> PaddingOption -> Modifier -arrow elm (PaddingValue padding) = runFn2 _arrow elm (paddingToFFI padding) - -arrow elm (PaddingFn fn) = runFn2 _arrow elm $ unsafeToForeign (paddingToFFI <<< fn <<< optsFromFFI) - -foreign import _popperOffsets :: Fn0 Modifier - -popperOffsets :: Modifier -popperOffsets = runFn0 _popperOffsets - -foreign import _computeStyles :: Fn1 ComputeStyleOptions Modifier - -computeStyles :: ComputeStyleOptions -> Modifier -computeStyles = runFn1 _computeStyles - -foreign import _applyStyles :: Fn0 Modifier - -applyStyles :: Modifier -applyStyles = runFn0 _applyStyles - -foreign import _eventListeners :: Fn1 EventListenerOptions Modifier - -eventListeners :: EventListenerOptions -> Modifier -eventListeners = runFn1 _eventListeners - -foreign import _offset :: Fn1 Foreign Modifier - -offset :: OffsetOption -> Modifier -offset (OffsetValue value) = runFn1 _offset $ unsafeToForeign { offset: offsetToFFI value } - -offset (OffsetFn fn) = runFn1 _offset $ unsafeToForeign { offset: (offsetToFFI <<< fn <<< optsFromFFI) } - -foreign import _preventOverflow :: Fn1 Foreign Modifier - -preventOverflow :: PreventOverflowOptions -> Modifier -preventOverflow { mainAxis -, altAxis -, padding -, boundary -, altBoundary -, rootBoundary -, tether -, tetherOffset -} = - runFn1 _preventOverflow - $ Foreign.encode - { mainAxis - , altAxis - , padding: paddingToFFI padding - , boundary: boundaryToFFI boundary - , altBoundary - , rootBoundary: rootBoundaryToFFI rootBoundary - , tether - , tetherOffset: tetherOffsetToFFI tetherOffset - } - -foreign import _flipPlacement :: Fn1 Foreign Modifier - -flipPlacement :: FlipOptions -> Modifier -flipPlacement { padding -, boundary -, rootBoundary -, flipVariations -, allowedAutoPlacements -} = - runFn1 _flipPlacement - $ Foreign.encode - { padding: paddingToFFI padding - , boundary: boundaryToFFI boundary - , rootBoundary: rootBoundaryToFFI rootBoundary - , flipVariations - , allowedAutoPlacements: placementToFFI <$> allowedAutoPlacements - } - --------------------------------------------------------------------------------- -foreign import _createPopper :: EffectFn3 HTMLElement HTMLElement FFIOptions PopperInstance - -createPopper :: HTMLElement -> HTMLElement -> Options -> Effect PopperInstance -createPopper reference popper options = runEffectFn3 _createPopper reference popper (optionsToFFI options) - -foreign import _forceUpdate :: EffectFn1 PopperInstance Unit - -forceUpdate :: PopperInstance -> Effect Unit -forceUpdate = runEffectFn1 _forceUpdate - -foreign import _destroyPopper :: EffectFn1 PopperInstance Unit - -destroyPopper :: PopperInstance -> Effect Unit -destroyPopper = runEffectFn1 _destroyPopper - --------------------------------------------------------------------------------- -type FFIOptions - = { placement :: String - , modifiers :: Array Modifier - , strategy :: String - -- , onFirstUpdate :: - } - -optionsToFFI :: Options -> FFIOptions -optionsToFFI { placement, modifiers, strategy } = - { placement: placementToFFI placement - , modifiers - , strategy: strategyToFFI strategy - } - -paddingToFFI :: Padding -> Foreign -paddingToFFI (Padding { top, left, right, bottom }) = - Foreign.encode - $ Object.fromFoldable - $ Array.catMaybes - [ Tuple "top" <$> top - , Tuple "left" <$> left - , Tuple "right" <$> right - , Tuple "bottom" <$> bottom - ] - -boundaryToFFI :: Boundary -> Foreign -boundaryToFFI = case _ of - ClippinParents -> unsafeToForeign "clippingParents" - SingleElementBoundary elm -> unsafeToForeign elm - MultipleElementsBoundary elems -> unsafeToForeign elems - -rootBoundaryToFFI :: RootBoundary -> String -rootBoundaryToFFI = case _ of - DocumentBoundary -> "document" - ViewportBoundary -> "viewport" - -offsetToFFI :: Offset -> Foreign -offsetToFFI { skidding, distance } = Foreign.encode [ skidding, distance ] - -tetherOffsetToFFI :: TetherOffsetOption -> Foreign -tetherOffsetToFFI = case _ of - TetherOffset n -> unsafeToForeign n - TetherOffsetFn fn -> unsafeToForeign (fn <<< optsFromFFI) - -placementToFFI :: Placement -> String -placementToFFI = case _ of - Auto -> "auto" - AutoStart -> "auto-start" - AutoEnd -> "auto-end" - Top -> "top" - TopStart -> "top-start" - TopEnd -> "top-end" - Bottom -> "bottom" - BottomStart -> "bottom-start" - BottomEnd -> "bottom-end" - Right -> "right" - RightStart -> "right-start" - RightEnd -> "right-end" - Left -> "left" - LeftStart -> "left-start" - LeftEnd -> "left-end" - -optsFromFFI :: { popper :: Rect, reference :: Rect, placement :: String } -> { popper :: Rect, reference :: Rect, placement :: Placement } -optsFromFFI { popper, reference, placement } = { popper, reference, placement: unsafePlacementFromFFI placement } - -unsafePlacementFromFFI :: String -> Placement -unsafePlacementFromFFI = case _ of - "auto" -> Auto - "auto-start" -> AutoStart - "auto-end" -> AutoEnd - "top" -> Top - "top-start" -> TopStart - "top-end" -> TopEnd - "bottom" -> Bottom - "bottom-start" -> BottomStart - "bottom-end" -> BottomEnd - "right" -> Right - "right-start" -> RightStart - "right-end" -> RightEnd - "left" -> Left - "left-start" -> LeftStart - "left-end" -> LeftEnd - str -> unsafeThrow $ "Popper.js internal: Invalid placement string: " <> str - -strategyToFFI :: PositioningStrategy -> String -strategyToFFI = case _ of - Absolute -> "absolute" - Fixed -> "fixed" diff --git a/web-common/src/Component/Popper/Types.purs b/web-common/src/Component/Popper/Types.purs deleted file mode 100644 index c7289ab552..0000000000 --- a/web-common/src/Component/Popper/Types.purs +++ /dev/null @@ -1,143 +0,0 @@ -module Component.Popper.Types where - -import Prelude -import Control.Alt ((<|>)) -import Data.Maybe (Maybe(..)) -import Web.HTML (HTMLElement) - -data Placement - = Auto - | AutoStart - | AutoEnd - | Top - | TopStart - | TopEnd - | Bottom - | BottomStart - | BottomEnd - | Right - | RightStart - | RightEnd - | Left - | LeftStart - | LeftEnd - -derive instance eqPlacement :: Eq Placement - -data PositioningStrategy - = Absolute - | Fixed - -type Rect - = { width :: Number - , height :: Number - , x :: Number - , y :: Number - } - -newtype Padding - = Padding - { top :: Maybe Number - , left :: Maybe Number - , right :: Maybe Number - , bottom :: Maybe Number - } - -instance semigroupPadding :: Semigroup Padding where - append (Padding fst) (Padding snd) = - Padding - { top: fst.top <|> snd.top - , left: fst.left <|> snd.left - , right: fst.right <|> snd.right - , bottom: fst.bottom <|> snd.bottom - } - -instance monoidPadding :: Monoid Padding where - mempty = - Padding - { top: Nothing, left: Nothing, right: Nothing, bottom: Nothing } - -pAll :: Number -> Padding -pAll n = Padding { top: Just n, left: Just n, right: Just n, bottom: Just n } - -pTop :: Number -> Padding -pTop top = Padding { top: Just top, left: Nothing, right: Nothing, bottom: Nothing } - -pLeft :: Number -> Padding -pLeft left = Padding { top: Nothing, left: Just left, right: Nothing, bottom: Nothing } - -pRight :: Number -> Padding -pRight right = Padding { top: Nothing, left: Nothing, right: Just right, bottom: Nothing } - -pBottom :: Number -> Padding -pBottom bottom = Padding { top: Nothing, left: Nothing, right: Nothing, bottom: Just bottom } - -type CalculateFromBoundingBox a - = { popper :: Rect, reference :: Rect, placement :: Placement } -> a - -type Offset - = { skidding :: Number, distance :: Number } - -data OffsetOption - = OffsetValue Offset - | OffsetFn (CalculateFromBoundingBox Offset) - -data PaddingOption - = PaddingValue Padding - | PaddingFn (CalculateFromBoundingBox Padding) - -data TetherOffsetOption - = TetherOffset Number - | TetherOffsetFn (CalculateFromBoundingBox Number) - -data Boundary - = ClippinParents - | SingleElementBoundary HTMLElement - | MultipleElementsBoundary (Array HTMLElement) - -data RootBoundary - = DocumentBoundary - | ViewportBoundary - -foreign import data Modifier :: Type - -foreign import data PopperInstance :: Type - -type Options - = { placement :: Placement - , modifiers :: Array Modifier - , strategy :: PositioningStrategy - -- , onFirstUpdate :: - } - -type ComputeStyleOptions - = { gpuAcceleration :: Boolean - , adaptive :: Boolean - , roundOffsets :: Boolean - } - -type EventListenerOptions - = { scroll :: Boolean - , resize :: Boolean - } - -type PreventOverflowOptions - = { mainAxis :: Boolean - , altAxis :: Boolean - , padding :: Padding - , boundary :: Boundary - , altBoundary :: Boolean - , rootBoundary :: RootBoundary - , tether :: Boolean - , tetherOffset :: TetherOffsetOption - } - -type FlipOptions - = { padding :: Padding - , boundary :: Boundary - , rootBoundary :: RootBoundary - , flipVariations :: Boolean - , allowedAutoPlacements :: Array Placement - -- TODO: need to come up with a constructor for Placement or oppositePlacement - -- fallbackPlacements: Array, // [oppositePlacement] - } diff --git a/web-common/src/Component/Progress.purs b/web-common/src/Component/Progress.purs deleted file mode 100644 index 24c9594bfb..0000000000 --- a/web-common/src/Component/Progress.purs +++ /dev/null @@ -1,40 +0,0 @@ -module Component.Progress where - -data Progress - = Progress0 - | Progress10 - | Progress20 - | Progress30 - | Progress40 - | Progress50 - | Progress60 - | Progress70 - | Progress80 - | Progress90 - | Progress100 - | Indeterminate - -progressClass :: Progress -> String -progressClass Progress0 = "progress-0" - -progressClass Progress10 = "progress-10" - -progressClass Progress20 = "progress-20" - -progressClass Progress30 = "progress-30" - -progressClass Progress40 = "progress-40" - -progressClass Progress50 = "progress-50" - -progressClass Progress60 = "progress-60" - -progressClass Progress70 = "progress-70" - -progressClass Progress80 = "progress-80" - -progressClass Progress90 = "progress-90" - -progressClass Progress100 = "progress-100" - -progressClass Indeterminate = "progress-indeterminate" diff --git a/web-common/src/Component/Progress/Circular.purs b/web-common/src/Component/Progress/Circular.purs deleted file mode 100644 index 29a9a635f8..0000000000 --- a/web-common/src/Component/Progress/Circular.purs +++ /dev/null @@ -1,51 +0,0 @@ -module Component.Progress.Circular where - -import Prelude -import Component.Progress (Progress(..), progressClass) -import Data.Int (toNumber) -import Halogen.Css as HC -import Halogen.HTML as HH -import Halogen.SVG as HS - -type Spec - = { color :: String - , width :: String - , height :: String - , additionalCss :: Array String - , value :: Progress - , trackWidth :: Int - } - -defaultSpec :: Spec -defaultSpec = - { color: "text-black" - , width: "w-8" - , height: "h-8" - , additionalCss: [] - , value: Indeterminate - , trackWidth: 4 - } - -view :: forall p a. Spec -> HH.HTML p a -view { color, width, height, additionalCss, value, trackWidth } = - HH.div - [ HC.classNames - $ [ "progress" - , "progress-circular" - , progressClass value - , color - , width - , height - ] - <> additionalCss - ] - [ HS.svg [ HS.viewBox $ HS.Box { height: 48, width: 48, x: 0, y: 0 } ] - [ HS.circle - [ HS.cx $ HS.Length 24.0 - , HS.cy $ HS.Length 24.0 - , HS.r $ HS.Length $ 24.0 - toNumber trackWidth * 2.0 - , HS.strokeWidth trackWidth - ] - [] - ] - ] diff --git a/web-common/src/Component/Row.purs b/web-common/src/Component/Row.purs deleted file mode 100644 index a8f21fb70e..0000000000 --- a/web-common/src/Component/Row.purs +++ /dev/null @@ -1,41 +0,0 @@ -module Component.Row - ( Preset(..) - , row - , rowIn - ) where - -import Prologue -import Component.Layout - ( Layout - , LayoutOf - , layout - ) -import Data.Default (class Default) -import Halogen.HTML as HH - -data Preset - = NoSpace - | Divided - | Cramped - | Snug - | Default - | Loose - | Between - -instance defaultPreset :: Default Preset where - default = Default - -rowIn :: Preset -> LayoutOf -rowIn preset = layout $ [ "flex" ] <> baseClasses - where - baseClasses = case preset of - NoSpace -> [] - Divided -> [ "divide-x-2", "divide-gray-300" ] - Cramped -> [ "space-x-1" ] - Snug -> [ "space-x-2" ] - Default -> [ "space-x-4" ] - Loose -> [ "space-x-6" ] - Between -> [ "justify-between" ] - -row :: Preset -> Layout -row preset = rowIn preset HH.div diff --git a/web-common/src/Component/Tooltip/Lenses.purs b/web-common/src/Component/Tooltip/Lenses.purs deleted file mode 100644 index 595f87f829..0000000000 --- a/web-common/src/Component/Tooltip/Lenses.purs +++ /dev/null @@ -1,20 +0,0 @@ -module Component.Tooltip.Lenses where - -import Data.Lens (Lens') -import Data.Lens.Record (prop) -import Data.Symbol (SProxy(..)) - -_message :: forall s a. Lens' { message :: a | s } a -_message = prop (SProxy :: SProxy "message") - -_active :: forall s a. Lens' { active :: a | s } a -_active = prop (SProxy :: SProxy "active") - -_reference :: forall s a. Lens' { reference :: a | s } a -_reference = prop (SProxy :: SProxy "reference") - -_placement :: forall s a. Lens' { placement :: a | s } a -_placement = prop (SProxy :: SProxy "placement") - -_mPopperInstance :: forall s a. Lens' { mPopperInstance :: a | s } a -_mPopperInstance = prop (SProxy :: SProxy "mPopperInstance") diff --git a/web-common/src/Component/Tooltip/State.purs b/web-common/src/Component/Tooltip/State.purs deleted file mode 100644 index 6b6026c3fc..0000000000 --- a/web-common/src/Component/Tooltip/State.purs +++ /dev/null @@ -1,132 +0,0 @@ -module Component.Tooltip.State (component, tooltip) where - -import Prelude -import Component.Popper (OffsetOption(..), PaddingOption(..), Placement, PositioningStrategy(..), arrow, createPopper, defaultFlip, defaultModifiers, defaultPreventOverflow, destroyPopper, flipPlacement, forceUpdate, offset, pAll, preventOverflow) -import Component.Tooltip.Lenses (_active, _mPopperInstance, _message, _placement) -import Component.Tooltip.Types (Action(..), Input, ReferenceId(..), State, arrowRef, tooltipRef) -import Component.Tooltip.View (render) -import Control.Bind (bindFlipped) -import Control.Monad.Maybe.Trans (MaybeT(..), runMaybeT) -import Data.Foldable (for_) -import Data.Lens (assign, set, use) -import Data.Maybe (Maybe(..)) -import Data.Symbol (SProxy(..)) -import Effect (Effect) -import Effect.Aff.Class (class MonadAff) -import Halogen (Component, HalogenM, Slot, get, getHTMLElementRef, liftEffect, mkComponent, modify_) -import Halogen as H -import Halogen.HTML (ComponentHTML, HTML, slot) -import Halogen.Query.EventSource (eventListenerEventSource) -import Web.DOM.NonElementParentNode (getElementById) -import Web.Event.Event (EventType(..)) -import Web.HTML (HTMLElement, window) -import Web.HTML.HTMLDocument (toNonElementParentNode) -import Web.HTML.HTMLElement as HTMLElement -import Web.HTML.Window (document) -import Web.HTML.WindowExtra (matchMedia, matches) - -_tooltipSlot :: SProxy "tooltipSlot" -_tooltipSlot = SProxy - -tooltip :: - forall slots m action. - MonadAff m => - String -> - ReferenceId -> - Placement -> - ComponentHTML action ( tooltipSlot :: forall query. Slot query Void ReferenceId | slots ) m -tooltip message reference placement = slot _tooltipSlot reference component { message, reference, placement } absurd - -initialState :: Input -> State -initialState { message, reference, placement } = - { message - , reference - , placement - , active: false - , mPopperInstance: Nothing - } - -component :: - forall m query. - MonadAff m => - Component HTML query Input Void m -component = - mkComponent - { initialState - , render - , eval: - H.mkEval - $ H.defaultEval - { initialize = Just Init - , finalize = Just Finalize - , handleAction = handleAction - , receive = \input -> Just $ OnNewInput input - } - } - --- We need to use id and not RefLabel because the RefLabel don't cross component boundaries. -getElementById' :: String -> Effect (Maybe HTMLElement) -getElementById' id = map (bindFlipped HTMLElement.fromElement) $ getElementById id <=< map toNonElementParentNode $ document =<< window - -handleAction :: - forall m slots. - MonadAff m => - Action -> - HalogenM State Action slots Void m Unit -handleAction Init = do - ({ placement, reference: RefId refId }) <- get - mPopperInstance <- - runMaybeT do - arrowElem <- MaybeT $ getHTMLElementRef arrowRef - let - modifiers = - defaultModifiers - <> [ arrow arrowElem (PaddingValue $ pAll 0.0) - , offset (OffsetValue { skidding: 0.0, distance: 8.0 }) - , preventOverflow defaultPreventOverflow - , flipPlacement defaultFlip - ] - refElem <- MaybeT $ liftEffect $ getElementById' refId - tooltipElem <- MaybeT $ getHTMLElementRef tooltipRef - popperInstance <- liftEffect $ createPopper refElem tooltipElem { placement, modifiers, strategy: Absolute } - -- We add event listeners to the target element to know when to show and hide the tooltip. We don't store the - -- subscriptionId to manually remove it because we are inside a component (not a subcomponent), so any - -- subscriptions will be terminated when the component is no longer rendered. - -- TODO: We could later implement the performance suggestions from https://popper.js.org/docs/v2/tutorial/#performance - acceptsHover <- liftEffect $ matches =<< matchMedia "(hover: hover)" =<< window - if acceptsHover then do - void $ MaybeT $ map pure $ H.subscribe $ eventListenerEventSource (EventType "mouseenter") (HTMLElement.toEventTarget refElem) (const $ Just Show) - void $ MaybeT $ map pure $ H.subscribe $ eventListenerEventSource (EventType "focus") (HTMLElement.toEventTarget refElem) (const $ Just Show) - void $ MaybeT $ map pure $ H.subscribe $ eventListenerEventSource (EventType "mouseleave") (HTMLElement.toEventTarget refElem) (const $ Just Hide) - void $ MaybeT $ map pure $ H.subscribe $ eventListenerEventSource (EventType "blur") (HTMLElement.toEventTarget refElem) (const $ Just Hide) - else do - void $ MaybeT $ map pure $ H.subscribe $ eventListenerEventSource (EventType "touchstart") (HTMLElement.toEventTarget refElem) (const $ Just Show) - void $ MaybeT $ map pure $ H.subscribe $ eventListenerEventSource (EventType "touchend") (HTMLElement.toEventTarget refElem) (const $ Just Hide) - pure popperInstance - assign _mPopperInstance mPopperInstance - -handleAction Finalize = do - mPopperInstance <- use _mPopperInstance - for_ mPopperInstance $ liftEffect <<< destroyPopper - --- TODO: This is being called 5 times per second per active tooltip. There is probably an overhead in the timer from the PAB --- that causes 5 re-renders per second, but also we should investigate on memoize this -handleAction (OnNewInput input) = do - { active, message, placement } <- get - when (message /= input.message || placement /= input.placement) - $ modify_ - ( set _message input.message - <<< set _placement input.placement - ) - when active forceUpdatePopper - -handleAction Show = do - assign _active true - forceUpdatePopper - -handleAction Hide = assign _active false - -forceUpdatePopper :: forall m slots. MonadAff m => HalogenM State Action slots Void m Unit -forceUpdatePopper = do - mPopperInstance <- use _mPopperInstance - for_ mPopperInstance $ liftEffect <<< forceUpdate diff --git a/web-common/src/Component/Tooltip/Types.purs b/web-common/src/Component/Tooltip/Types.purs deleted file mode 100644 index 06c3b052cd..0000000000 --- a/web-common/src/Component/Tooltip/Types.purs +++ /dev/null @@ -1,43 +0,0 @@ -module Component.Tooltip.Types where - -import Prelude -import Component.Popper (Placement, PopperInstance) -import Data.Maybe (Maybe) -import Data.Newtype (class Newtype) -import Halogen (RefLabel(..)) - -newtype ReferenceId - = RefId String - -derive instance newtypeReferenceId :: Newtype ReferenceId _ - -derive newtype instance eqReferenceId :: Eq ReferenceId - -derive newtype instance ordReferenceId :: Ord ReferenceId - -type State - = { message :: String - , active :: Boolean - , reference :: ReferenceId - , placement :: Placement - , mPopperInstance :: Maybe PopperInstance - } - -type Input - = { message :: String - , reference :: ReferenceId - , placement :: Placement - } - -data Action - = Init - | Finalize - | OnNewInput Input - | Show - | Hide - -tooltipRef :: RefLabel -tooltipRef = (RefLabel "tooltip") - -arrowRef :: RefLabel -arrowRef = (RefLabel "arrow") diff --git a/web-common/src/Component/Tooltip/View.purs b/web-common/src/Component/Tooltip/View.purs deleted file mode 100644 index a933d09cf9..0000000000 --- a/web-common/src/Component/Tooltip/View.purs +++ /dev/null @@ -1,26 +0,0 @@ -module Component.Tooltip.View (render) where - -import Prelude hiding (div) -import Component.Tooltip.Types (State, tooltipRef, arrowRef) -import Halogen.Css (classNames, hideWhen) -import Halogen.HTML (HTML, div, text) -import Halogen.HTML.Properties (ref) -import Halogen.HTML.Properties.ARIA (role) - -render :: forall p action. State -> HTML p action -render state = - div - [ ref tooltipRef - , role "tooltip" - , classNames - ( [ "tooltip", "bg-black", "p-2", "rounded-sm", "text-white", "text-sm", "whitespace-nowrap", "z-50" ] - <> hideWhen (not state.active) - ) - ] - [ div - [ ref arrowRef - , classNames [ "popover-arrow" ] - ] - [] - , text state.message - ] diff --git a/web-common/src/Control/Coroutine/Extra.purs b/web-common/src/Control/Coroutine/Extra.purs deleted file mode 100644 index 505e2adf54..0000000000 --- a/web-common/src/Control/Coroutine/Extra.purs +++ /dev/null @@ -1,10 +0,0 @@ -module Control.Coroutine.Extra where - -import Control.Coroutine (Consumer) -import Control.Monad.Free.Trans (interpret) -import Data.Function ((<<<)) -import Data.Functor (class Functor) -import Data.Profunctor (lcmap) - -mapConsumer :: forall f a b r. Functor f => (a -> b) -> Consumer b f r -> Consumer a f r -mapConsumer = interpret <<< lcmap diff --git a/web-common/src/Control/Monad/Error/Extra.purs b/web-common/src/Control/Monad/Error/Extra.purs deleted file mode 100644 index 6d8da43780..0000000000 --- a/web-common/src/Control/Monad/Error/Extra.purs +++ /dev/null @@ -1,22 +0,0 @@ -module Control.Monad.Error.Extra where - -import Control.Monad (pure, (=<<)) -import Control.Monad.Except (Except) -import Control.Monad.Except.Trans (class MonadThrow, ExceptT, runExceptT, throwError) -import Data.Either (Either(..), either) -import Data.Function (($), (<<<)) -import Data.Newtype (unwrap) - -liftEither :: forall f e m a. MonadThrow f m => (e -> f) -> Either e a -> m a -liftEither f = either (throwError <<< f) pure - -mapError :: forall m e f a. MonadThrow f m => (e -> f) -> Except e a -> m a -mapError f action = liftEither f $ unwrap $ runExceptT action - -mapErrorT :: forall m e f a. MonadThrow f m => (e -> f) -> ExceptT e m a -> m a -mapErrorT f action = liftEither f =<< runExceptT action - -toMonadThrow :: forall m e a. MonadThrow e m => Either e a -> m a -toMonadThrow (Left err) = throwError err - -toMonadThrow (Right value) = pure value diff --git a/web-common/src/Control/Monad/Except/Extra.purs b/web-common/src/Control/Monad/Except/Extra.purs deleted file mode 100644 index 10378d4382..0000000000 --- a/web-common/src/Control/Monad/Except/Extra.purs +++ /dev/null @@ -1,11 +0,0 @@ -module Control.Monad.Except.Extra where - -import Control.Applicative (class Applicative) -import Control.Monad.Except (except) -import Control.Monad.Except.Trans (ExceptT) -import Data.Either (note) -import Data.Function ((<<<)) -import Data.Maybe (Maybe) - -noteT :: forall m e a. Applicative m => e -> Maybe a -> ExceptT e m a -noteT e = except <<< note e diff --git a/web-common/src/Control/Monad/Maybe/Extra.purs b/web-common/src/Control/Monad/Maybe/Extra.purs deleted file mode 100644 index a040a4c647..0000000000 --- a/web-common/src/Control/Monad/Maybe/Extra.purs +++ /dev/null @@ -1,9 +0,0 @@ -module Control.Monad.Maybe.Extra where - -import Control.Applicative (class Applicative, pure) -import Control.Monad.Maybe.Trans (MaybeT(..)) -import Data.Function ((<<<)) -import Data.Maybe (Maybe) - -hoistMaybe :: forall m a. Applicative m => Maybe a -> MaybeT m a -hoistMaybe = MaybeT <<< pure diff --git a/web-common/src/Control/Monad/Reader/Extra.purs b/web-common/src/Control/Monad/Reader/Extra.purs deleted file mode 100644 index 715bb5dd19..0000000000 --- a/web-common/src/Control/Monad/Reader/Extra.purs +++ /dev/null @@ -1,10 +0,0 @@ -module Control.Monad.Reader.Extra where - -import Prelude -import Control.Monad.Reader (ReaderT, runReaderT) -import Control.Monad.Reader.Class (class MonadAsk, asks) - -mapEnvReaderT :: forall m e f a. MonadAsk f m => (f -> e) -> ReaderT e m a -> m a -mapEnvReaderT f action = do - s <- asks f - runReaderT action s diff --git a/web-common/src/Control/Monad/State/Extra.purs b/web-common/src/Control/Monad/State/Extra.purs deleted file mode 100644 index bd7b0517b7..0000000000 --- a/web-common/src/Control/Monad/State/Extra.purs +++ /dev/null @@ -1,13 +0,0 @@ -module Control.Monad.State.Extra where - -import Control.Bind (bind, discard, pure) -import Control.Monad.State.Trans (class MonadState, StateT, runStateT) -import Data.Lens (Lens', assign, use) -import Data.Tuple (Tuple(..)) - -zoomStateT :: forall m s t a. MonadState s m => Lens' s t -> StateT t m a -> m a -zoomStateT l f = do - s <- use l - (Tuple a v) <- runStateT f s - assign l v - pure a diff --git a/web-common/src/Data/Array/Extra.purs b/web-common/src/Data/Array/Extra.purs deleted file mode 100644 index 6f7f2776cf..0000000000 --- a/web-common/src/Data/Array/Extra.purs +++ /dev/null @@ -1,35 +0,0 @@ -module Data.Array.Extra - ( move - , lookup - , collapse - ) where - -import Prelude -import Data.Array as Array -import Data.FoldableWithIndex (class FoldableWithIndex, foldMapWithIndex) -import Data.Maybe (Maybe, fromMaybe) -import Data.Tuple (fst, snd) -import Data.Tuple.Nested (type (/\), (/\)) - -move :: forall a. Int -> Int -> Array a -> Array a -move source destination before - | destination == source = before - | otherwise = - fromMaybe before do - x <- Array.index before source - midway <- Array.deleteAt source before - after <- Array.insertAt destination x midway - pure after - -lookup :: forall k v. Eq k => k -> Array (k /\ v) -> Maybe v -lookup key = map snd <<< Array.find (fst >>> (==) key) - ---| Turn a nested foldable into an array with keys. So, for example, a --- `List (Map String Bool)` would become an `Array (Int /\ String /\ Bool)`. -collapse :: - forall m n i j a. - FoldableWithIndex i m => - FoldableWithIndex j n => - m (n a) -> - Array (i /\ j /\ a) -collapse = foldMapWithIndex (\i -> foldMapWithIndex (\j a -> [ i /\ j /\ a ])) diff --git a/web-common/src/Data/Default.purs b/web-common/src/Data/Default.purs deleted file mode 100644 index e1f92e2093..0000000000 --- a/web-common/src/Data/Default.purs +++ /dev/null @@ -1,4 +0,0 @@ -module Data.Default where - -class Default a where - default :: a diff --git a/web-common/src/Data/Foldable/Extra.purs b/web-common/src/Data/Foldable/Extra.purs deleted file mode 100644 index 648e6681e7..0000000000 --- a/web-common/src/Data/Foldable/Extra.purs +++ /dev/null @@ -1,65 +0,0 @@ -module Data.Foldable.Extra - ( interleave - , countConsecutive - ) where - -import Data.Tuple.Nested -import Control.Applicative (class Applicative, pure) -import Data.Array as Array -import Data.Boolean (otherwise) -import Data.Eq (class Eq, (==)) -import Data.Foldable (class Foldable, foldl, intercalate) -import Data.Function ((>>>)) -import Data.Functor (map) -import Data.Maybe (Maybe(..)) -import Data.Monoid (class Monoid, mempty) -import Data.Semiring ((+)) - -interleave :: forall m a. Applicative m => Foldable m => Monoid (m a) => a -> m a -> m a -interleave sep xs = intercalate (pure sep) (map pure xs) - --- | Collapse a sequence of things that tend to repeat so that you --- just get the thing, and how many times it appeared in a row. For --- example, if you had a log of 100 ping messages followed by --- something interesting, you'd get an array of --- `[100 /\ Ping, 1 /\ InterestingThing]`. -countConsecutive :: forall f a. Eq a => Foldable f => f a -> Array (Int /\ a) -countConsecutive = tallyAll >>> finalize - where - tallyAll :: f a -> Tally a - tallyAll = - foldl tallyNext - { count: 0 - , current: Nothing - , result: mempty - } - - tallyNext :: Tally a -> a -> Tally a - tallyNext a@{ count, current: Just x, result } y - | x == y = - { count: count + 1 - , current: Just y - , result - } - | otherwise = - { count: 1 - , current: Just y - , result: Array.snoc result (count /\ x) - } - - tallyNext a@{ count, current: Nothing, result } y = - { count: 1 - , current: Just y - , result - } - - finalize :: Tally a -> Array (Int /\ a) - finalize { count, current: Just x, result } = Array.snoc result (count /\ x) - - finalize { result } = result - -type Tally a - = { current :: Maybe a - , count :: Int - , result :: Array (Int /\ a) - } diff --git a/web-common/src/Data/Json/JsonNTuple.purs b/web-common/src/Data/Json/JsonNTuple.purs deleted file mode 100644 index 6cada77711..0000000000 --- a/web-common/src/Data/Json/JsonNTuple.purs +++ /dev/null @@ -1,60 +0,0 @@ --- This module exposes a data type that is equal to the Data.Tuple type. But --- only the minimium methods for encoding and decoding are provided, as their only --- use case is to serve as a serialization mechanism with Haskell tuple type. -module Data.Json.JsonNTuple where - -import Prelude -import Data.Array as Array -import Data.List (List(..)) -import Data.List as List -import Data.Tuple (Tuple(..)) -import Foreign (ForeignError(..), fail, readArray) -import Foreign.Class (class Decode, class Encode, decode, encode) - -data JsonNTuple a b - = JsonNTuple a b - -infixr 6 JsonNTuple as /\ - -infixr 6 type JsonNTuple as /\ - -instance showTuple :: (Show a, Show b) => Show (JsonNTuple a b) where - show (JsonNTuple a b) = show a <> " /\\ " <> show b - -derive instance eqTuple :: (Eq a, Eq b) => Eq (JsonNTuple a b) - -instance encodeJsonNTuple6 :: (Encode a, Encode b, Encode c, Encode d, Encode e, Encode f) => Encode (a /\ b /\ c /\ d /\ e /\ f) where - encode (a /\ b /\ c /\ d /\ e /\ f) = encode $ [ encode a, encode b, encode c, encode d, encode e, encode f ] -else instance encodeJsonNTuple5 :: (Encode a, Encode b, Encode c, Encode d, Encode e) => Encode (a /\ b /\ c /\ d /\ e) where - encode (a /\ b /\ c /\ d /\ e) = encode $ [ encode a, encode b, encode c, encode d, encode e ] -else instance encodeJsonNTuple4 :: (Encode a, Encode b, Encode c, Encode d) => Encode (a /\ b /\ c /\ d) where - encode (a /\ b /\ c /\ d) = encode $ [ encode a, encode b, encode c, encode d ] -else instance encodeJsonNTuple3 :: (Encode a, Encode b, Encode c) => Encode (a /\ b /\ c) where - encode (a /\ b /\ c) = encode $ [ encode a, encode b, encode c ] -else instance encodeJsonNTuple2 :: (Encode a, Encode b) => Encode (a /\ b) where - encode (a /\ b) = encode [ encode a, encode b ] - -instance decodeJsonNTuple2 :: (Decode a, Decode b) => Decode (a /\ b) where - decode value = do - elements <- List.fromFoldable <$> readArray value - consume elements - where - consume Nil = fail $ ForeignError "Decoding a JsonTuple, expected to see an array with exactly 2 elements, got 0" - - consume (Cons x Nil) = fail $ ForeignError "Decoding a JsonTuple, expected to see an array with exactly 2 elements, got 1." - - consume (Cons x (Cons y Nil)) = do - a <- decode x - b <- decode y - pure $ a /\ b - - consume (Cons x ys) = do - a <- decode x - b <- decode $ encode $ Array.fromFoldable ys - pure $ a /\ b - -fromTuple :: forall a b. Tuple a b -> JsonNTuple a b -fromTuple (Tuple a b) = JsonNTuple a b - -toTuple :: forall a b. JsonNTuple a b -> Tuple a b -toTuple (JsonNTuple a b) = Tuple a b diff --git a/web-common/src/Data/Json/JsonNonEmptyList.purs b/web-common/src/Data/Json/JsonNonEmptyList.purs deleted file mode 100644 index 719659418e..0000000000 --- a/web-common/src/Data/Json/JsonNonEmptyList.purs +++ /dev/null @@ -1,40 +0,0 @@ -module Data.Json.JsonNonEmptyList where - -import Prelude -import Data.Array as Array -import Data.Foldable (class Foldable, foldMap, foldlDefault, foldrDefault) -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.List.NonEmpty (NonEmptyList) -import Data.List.NonEmpty as NEL -import Data.Maybe (Maybe(..)) -import Data.Newtype (class Newtype) -import Foreign (F, ForeignError(..), fail) -import Foreign.Class (class Decode, class Encode, decode, encode) - -newtype JsonNonEmptyList a - = JsonNonEmptyList (NonEmptyList a) - -derive instance genericJsonNonEmptyList :: Generic (JsonNonEmptyList a) _ - -derive instance newtypeJsonNonEmptyList :: Newtype (JsonNonEmptyList a) _ - -derive instance eqJsonNonEmptyList :: Eq a => Eq (JsonNonEmptyList a) - -instance showJsonNonEmptyList :: Show a => Show (JsonNonEmptyList a) where - show = genericShow - -instance encodeJsonNonEmptyList :: Encode a => Encode (JsonNonEmptyList a) where - encode (JsonNonEmptyList x) = encode $ Array.fromFoldable x - -instance decodeJsonNonEmptyList :: Decode a => Decode (JsonNonEmptyList a) where - decode value = do - xs <- (decode value :: F (Array a)) - case NEL.fromFoldable xs of - Nothing -> fail $ ForeignError "Decoding a JsonNonEmptyList, found an empty Array." - Just nel -> pure $ JsonNonEmptyList nel - -instance foldableJsonNonEmptyList :: Foldable JsonNonEmptyList where - foldMap f (JsonNonEmptyList x) = foldMap f x - foldl f x = foldlDefault f x - foldr f x = foldrDefault f x diff --git a/web-common/src/Data/Json/JsonTuple.purs b/web-common/src/Data/Json/JsonTuple.purs deleted file mode 100644 index 66a2edcce0..0000000000 --- a/web-common/src/Data/Json/JsonTuple.purs +++ /dev/null @@ -1,56 +0,0 @@ --- TODO: We should replace JsonTuple for JsonNTuple from all repositories and from the generated code -module Data.Json.JsonTuple where - -import Prelude -import Data.Array as Array -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Lens (Iso') -import Data.Lens.Iso.Newtype (_Newtype) -import Data.List (List(..)) -import Data.List as List -import Data.Newtype (class Newtype) -import Data.Tuple (Tuple(..)) -import Foreign (ForeignError(..), fail, readArray) -import Foreign.Class (class Decode, class Encode, decode, encode) - -newtype JsonTuple a b - = JsonTuple (Tuple a b) - -derive instance newtypeJsonTuple :: Newtype (JsonTuple a b) _ - -derive instance eqJsonTuple :: (Eq a, Eq b) => Eq (JsonTuple a b) - -derive instance ordJsonTuple :: (Ord a, Ord b) => Ord (JsonTuple a b) - -derive instance genericJsonTuple :: Generic (JsonTuple a b) _ - -derive instance functorJsonTuple :: Functor (JsonTuple a) - -instance showJsonTuple :: (Show a, Show b) => Show (JsonTuple a b) where - show = genericShow - -instance encodeJsonTuple :: (Encode a, Encode b) => Encode (JsonTuple a b) where - encode (JsonTuple (Tuple a b)) = encode [ encode a, encode b ] - -instance decodeJsonTuple :: (Decode a, Decode b) => Decode (JsonTuple a b) where - decode value = do - elements <- List.fromFoldable <$> readArray value - consume elements - where - consume Nil = fail $ ForeignError "Decoding a JsonTuple, expected to see an array with exactly 2 elements, got 0" - - consume (Cons x Nil) = fail $ ForeignError "Decoding a JsonTuple, expected to see an array with exactly 2 elements, got 1." - - consume (Cons x (Cons y Nil)) = do - a <- decode x - b <- decode y - pure $ JsonTuple (Tuple a b) - - consume (Cons x ys) = do - a <- decode x - b <- decode $ encode $ Array.fromFoldable ys - pure $ JsonTuple (Tuple a b) - -_JsonTuple :: forall k v. Iso' (JsonTuple k v) (Tuple k v) -_JsonTuple = _Newtype diff --git a/web-common/src/Data/Json/JsonUUID.purs b/web-common/src/Data/Json/JsonUUID.purs deleted file mode 100644 index f5f28572e9..0000000000 --- a/web-common/src/Data/Json/JsonUUID.purs +++ /dev/null @@ -1,40 +0,0 @@ -module Data.Json.JsonUUID where - -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Lens (Iso') -import Data.Lens.Iso.Newtype (_Newtype) -import Data.Maybe (Maybe(..)) -import Data.Newtype (class Newtype) -import Data.UUID (UUID) -import Data.UUID as UUID -import Foreign (fail, ForeignError(TypeMismatch), readString) -import Foreign.Class (class Decode, class Encode, encode) -import Prelude - -newtype JsonUUID - = JsonUUID UUID - -derive instance newtypeJsonUUID :: Newtype JsonUUID _ - -derive instance eqJsonUUID :: Eq JsonUUID - -derive instance genericJsonUUID :: Generic JsonUUID _ - -derive instance ordJsonUUID :: Ord JsonUUID - -instance showJsonUUID :: Show JsonUUID where - show = genericShow - -instance encodeJsonUUID :: Encode JsonUUID where - encode (JsonUUID uuid) = encode $ UUID.toString uuid - -instance decodeJsonUUID :: Decode JsonUUID where - decode value = - readString value - >>= \x -> case UUID.parseUUID x of - Nothing -> fail $ TypeMismatch "UUID" x - Just uuid -> pure $ JsonUUID uuid - -_JsonUUID :: Iso' JsonUUID UUID -_JsonUUID = _Newtype diff --git a/web-common/src/Data/Lens/Extra.purs b/web-common/src/Data/Lens/Extra.purs deleted file mode 100644 index e70c3dba2b..0000000000 --- a/web-common/src/Data/Lens/Extra.purs +++ /dev/null @@ -1,43 +0,0 @@ -module Data.Lens.Extra (hasable, useable, peruse, toArrayOf, toSetOf) where - -import Control.Category ((<<<)) -import Control.Monad.State.Class (class MonadState, gets) -import Data.Array as Array -import Data.HeytingAlgebra (class HeytingAlgebra) -import Data.Lens (APrism, is, has, toListOf) -import Data.Lens.Fold (Fold, preview) -import Data.List (List) -import Data.Maybe (Maybe) -import Data.Maybe.First (First) -import Data.Monoid.Disj (Disj) -import Data.Monoid.Endo (Endo) -import Data.Ord (class Ord) -import Data.Set (Set) -import Data.Set as Set - --- | Extract a `Maybe` in the context of `MonadState`. --- ie. `preview` on a `use`. --- --- By happy coincidence, the English language has a word that's spelt --- like a portmanteau of 'preview+use' and means, "to look at --- something in a relaxed way." -peruse :: forall m s t a b. MonadState s m => Fold (First a) s t a b -> m (Maybe a) -peruse = gets <<< preview - --- | Like `peruse` but for `is` -useable :: forall m s t a b r. HeytingAlgebra r => MonadState s m => APrism s t a b -> m r -useable = gets <<< is - --- | Like `peruse` but for `has` -hasable :: forall m s t a b r. HeytingAlgebra r => MonadState s m => Fold (Disj r) s t a b -> m r -hasable = gets <<< has - --- | Analagous to `toListOf`. This is included in a forthcoming --- release of purescript-profunctor-lenses. When we update we can delete --- this. -toArrayOf :: forall s t a b. Fold (Endo (->) (List a)) s t a b -> s -> Array a -toArrayOf p = Array.fromFoldable <<< toListOf p - --- | Analagous to `toListOf`. -toSetOf :: forall s t a b. Ord a => Fold (Endo (->) (List a)) s t a b -> s -> Set a -toSetOf p = Set.fromFoldable <<< toListOf p diff --git a/web-common/src/Data/Lens/NonEmptyList.purs b/web-common/src/Data/Lens/NonEmptyList.purs deleted file mode 100644 index 9ad7a0c287..0000000000 --- a/web-common/src/Data/Lens/NonEmptyList.purs +++ /dev/null @@ -1,8 +0,0 @@ -module Data.Lens.NonEmptyList where - -import Data.Lens (Lens, lens) -import Data.List.NonEmpty (head, uncons, cons') -import Data.List.Types (NonEmptyList) - -_Head :: forall a. Lens (NonEmptyList a) (NonEmptyList a) a a -_Head = lens head (\l new -> let { head, tail } = uncons l in cons' new tail) diff --git a/web-common/src/Data/Map/Extra.purs b/web-common/src/Data/Map/Extra.purs deleted file mode 100644 index 83c17a95eb..0000000000 --- a/web-common/src/Data/Map/Extra.purs +++ /dev/null @@ -1,16 +0,0 @@ -module Data.Map.Extra - ( mapIndex - , findIndex - ) where - -import Prelude -import Data.FoldableWithIndex (class FoldableWithIndex, foldMapWithIndex) -import Data.Map (Map, keys, singleton) -import Data.Maybe (Maybe) -import Data.Set (filter, findMin) - -mapIndex :: forall f v k1 k2. FoldableWithIndex k1 f => Ord k2 => (k1 -> k2) -> f v -> Map k2 v -mapIndex f = foldMapWithIndex (\k v -> singleton (f k) v) - -findIndex :: forall k v. Ord k => (k -> Boolean) -> Map k v -> Maybe k -findIndex f map = findMin $ filter f $ keys map diff --git a/web-common/src/Data/Map/Ordered/OMap.purs b/web-common/src/Data/Map/Ordered/OMap.purs deleted file mode 100644 index cac8d7e59e..0000000000 --- a/web-common/src/Data/Map/Ordered/OMap.purs +++ /dev/null @@ -1,130 +0,0 @@ -module Data.Map.Ordered.OMap (OMap, alter, delete, fromFoldable, fromFoldableWithIndex, insert, isEmpty, keys, lookup, singleton, toUnfoldable, unionWith) where - -import Prelude -import Data.Array as Array -import Data.Bifunctor (rmap) -import Data.Foldable (class Foldable, foldMap) -import Data.FoldableWithIndex (class FoldableWithIndex, foldlWithIndex) -import Data.Map as Map -import Data.Maybe (Maybe(..), fromMaybe, maybe) -import Data.Set as Set -import Data.Tuple (fst, snd, uncurry) -import Data.Tuple.Nested (type (/\), (/\)) -import Data.Unfoldable (class Unfoldable) -import Foreign.Generic (class Decode, class Encode, F, decode, encode) -import Data.Set.Ordered.OSet (OSet) -import Data.Set.Ordered.OSet as OSet - -newtype OMap a b - = OMap (Array (a /\ b)) - -instance eqOMap :: (Eq a, Eq b) => Eq (OMap a b) where - eq (OMap om1) (OMap om2) = eq om1 om2 - -instance semigroupOMap :: Ord a => Semigroup (OMap a b) where - append = appendOMap - -instance monoidOMap :: Ord a => Monoid (OMap a b) where - mempty = OMap mempty - -instance foldableOMap :: Foldable (OMap k) where - foldl f z (OMap m) = Array.foldl f z (map snd m) - foldr f z (OMap m) = Array.foldr f z (map snd m) - foldMap f (OMap m) = Array.foldMap f (map snd m) - -instance foldableWithIndexOMap :: FoldableWithIndex k (OMap k) where - foldlWithIndex f z (OMap m) = Array.foldl (uncurry <<< (flip f)) z m - foldrWithIndex f z (OMap m) = Array.foldr (uncurry f) z m - foldMapWithIndex f (OMap m) = Array.foldMap (uncurry f) m - -instance functorOMap :: Functor (OMap k) where - map f (OMap m) = OMap (map (rmap f) m) - -instance encodeOMap :: (Encode a, Encode b) => Encode (OMap a b) where - encode (OMap m) = encode m - -instance decodeSession :: (Ord a, Decode a, Decode b) => Decode (OMap a b) where - decode m = fromFoldable <$> ((decode m) :: F (Array (a /\ b))) - -instance showOMap :: (Show k, Show v) => Show (OMap k v) where - show (OMap m) = "(fromFoldable " <> show m <> ")" - -isEmpty :: forall k v. OMap k v -> Boolean -isEmpty (OMap om) = Array.null om - -singleton :: forall k v. k -> v -> OMap k v -singleton k v = OMap (Array.singleton (k /\ v)) - -fromFoldable :: forall f k v. Ord k => Foldable f => f (k /\ v) -> OMap k v -fromFoldable = foldMap (uncurry singleton) - -fromFoldableWithIndex :: forall f k v. Ord k => FoldableWithIndex k f => f v -> OMap k v -fromFoldableWithIndex = foldlWithIndex (\k m v -> insert k v m) mempty - -keys :: forall k v. Ord k => OMap k v -> OSet k -keys (OMap om) = OSet.fromFoldable (map fst om) - -filter :: forall k v. Ord k => (v -> Boolean) -> OMap k v -> OMap k v -filter f om = filterWithKey (\k v -> f v) om - -filterKeys :: forall k v. Ord k => (k -> Boolean) -> OMap k v -> OMap k v -filterKeys f om = filterWithKey (\k v -> f k) om - -filterWithKey :: forall k v. Ord k => (k -> v -> Boolean) -> OMap k v -> OMap k v -filterWithKey f (OMap om) = OMap $ Array.filter (uncurry f) om - -appendOMap :: forall k v. Ord k => OMap k v -> OMap k v -> OMap k v -appendOMap om1 om2@(OMap innerOm2) = OMap (innerOm1WithoutOm2 <> innerOm2) - where - om2KeySet = Set.fromFoldable $ keys om2 - - OMap innerOm1WithoutOm2 = filterKeys (\x -> not $ Set.member x om2KeySet) om1 - -unionWith :: forall k v. Ord k => (v -> v -> v) -> OMap k v -> OMap k v -> OMap k v -unionWith f om1 om2 = foldMap (\k -> maybe mempty (singleton k) (Map.lookup k fomm)) allKeys - where - omm1 = Map.fromFoldableWithIndex om1 - - omm2 = Map.fromFoldableWithIndex om2 - - fomm = Map.unionWith f omm1 omm2 - - k1 = keys om1 - - sk1 = Set.fromFoldable k1 - - k2 = OSet.filter (\x -> not $ Set.member x sk1) $ keys om2 - - allKeys = k1 <> k2 - -toUnfoldable :: forall f k v. Unfoldable f => OMap k v -> f (k /\ v) -toUnfoldable (OMap m) = Array.toUnfoldable m - -insert :: forall k v. Ord k => k -> v -> OMap k v -> OMap k v -insert k v (OMap m) = - OMap - ( ( fromMaybe (\_ -> Array.snoc m (k /\ v)) - ( do - i <- Array.findIndex (\(x /\ _) -> x == k) m - r <- Array.updateAt i (k /\ v) m - pure (\_ -> r) - ) - ) - unit - ) -- Anonymous function wrapper added to delay computation of the default case - -delete :: forall k v. Ord k => k -> OMap k v → OMap k v -delete k om = filterKeys ((/=) k) om - -lookup :: forall k v. Ord k => k -> OMap k v -> Maybe v -lookup k (OMap m) = map snd (Array.find (\(k2 /\ _) -> k2 == k) m) - -alter :: forall k v. Ord k => (Maybe v -> Maybe v) -> k -> OMap k v -> OMap k v -alter f k om = case mOldValue, mNewValue of - Nothing, Nothing -> om - Just _, Nothing -> delete k om - _, Just x -> insert k x om - where - mOldValue = lookup k om - - mNewValue = f mOldValue diff --git a/web-common/src/Data/Number/Extra.js b/web-common/src/Data/Number/Extra.js deleted file mode 100644 index 9bcdfe5b6d..0000000000 --- a/web-common/src/Data/Number/Extra.js +++ /dev/null @@ -1,6 +0,0 @@ -/*global exports, require*/ -'use strict'; - -exports.toLocaleString = function (i) { - return Number(i).toLocaleString(); -}; diff --git a/web-common/src/Data/Number/Extra.purs b/web-common/src/Data/Number/Extra.purs deleted file mode 100644 index 33321ace81..0000000000 --- a/web-common/src/Data/Number/Extra.purs +++ /dev/null @@ -1,3 +0,0 @@ -module Data.Number.Extra (toLocaleString) where - -foreign import toLocaleString :: Number -> String diff --git a/web-common/src/Data/RawJson.js b/web-common/src/Data/RawJson.js deleted file mode 100644 index c96903f3f2..0000000000 --- a/web-common/src/Data/RawJson.js +++ /dev/null @@ -1,11 +0,0 @@ -/*eslint-env node*/ -/*global exports gtag*/ -'use strict'; - -exports._pretty = function (str) { - return JSON.stringify( - JSON.parse(str), - null, - 2 - ); -}; diff --git a/web-common/src/Data/RawJson.purs b/web-common/src/Data/RawJson.purs deleted file mode 100644 index e8806d8a87..0000000000 --- a/web-common/src/Data/RawJson.purs +++ /dev/null @@ -1,38 +0,0 @@ -module Data.RawJson where - -import Prelude -import Control.Alternative ((<|>)) -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Lens (Iso') -import Data.Lens.Iso.Newtype (_Newtype) -import Data.Newtype (class Newtype) -import Foreign (readString, unsafeToForeign) -import Foreign.Class (class Decode, class Encode) -import Global.Unsafe (unsafeStringify) - -newtype RawJson - = RawJson String - -derive instance genericRawJson :: Generic RawJson _ - -derive instance newtypeRawJson :: Newtype RawJson _ - -derive instance eqRawJson :: Eq RawJson - -_RawJson :: Iso' RawJson String -_RawJson = _Newtype - -foreign import _pretty :: String -> String - -pretty :: RawJson -> String -pretty (RawJson str) = _pretty str - -instance showRawJson :: Show RawJson where - show = genericShow - -instance encodeRawJson :: Encode RawJson where - encode (RawJson string) = unsafeToForeign string - -instance decodeRawJson :: Decode RawJson where - decode value = RawJson <$> (readString value <|> pure (unsafeStringify value)) diff --git a/web-common/src/Data/Set/Extra.purs b/web-common/src/Data/Set/Extra.purs deleted file mode 100644 index af0651576b..0000000000 --- a/web-common/src/Data/Set/Extra.purs +++ /dev/null @@ -1,14 +0,0 @@ -module Data.Set.Extra where - -import Prelude -import Data.Map (Map) -import Data.Map as Map -import Data.Set (Set) -import Data.Set as Set -import Data.Tuple.Nested ((/\)) - --- TODO: There is a function called toMap in version 2.0 of ordered-collections which is more performant as --- it just extracts the inner representation, but we'll need to upgrade to PS 0.14 to use it --- https://github.com/purescript/purescript-ordered-collections/blob/master/CHANGELOG.md#v200---2021-02-26 -setToMap :: forall a. Ord a => Set a -> Map a Unit -setToMap = Map.fromFoldable <<< Set.map (\key -> key /\ unit) diff --git a/web-common/src/Data/Set/Ordered/OSet.purs b/web-common/src/Data/Set/Ordered/OSet.purs deleted file mode 100644 index f022601044..0000000000 --- a/web-common/src/Data/Set/Ordered/OSet.purs +++ /dev/null @@ -1,34 +0,0 @@ -module Data.Set.Ordered.OSet (OSet, fromFoldable, filter, insert) where - -import Prelude -import Data.Array as Array -import Data.Foldable (class Foldable) - -newtype OSet a - = OSet (Array a) - -instance semigroupOSet :: Ord a => Semigroup (OSet a) where - append = appendOSet - -instance monoidOSet :: Ord a => Monoid (OSet a) where - mempty = OSet mempty - -instance foldableOSet :: Foldable OSet where - foldr f acc (OSet s) = Array.foldr f acc s - foldl f acc (OSet s) = Array.foldl f acc s - foldMap f (OSet s) = Array.foldMap f s - -fromFoldable :: forall f a. Ord a => Foldable f => f a -> OSet a -fromFoldable = OSet <<< Array.nub <<< Array.fromFoldable - -appendOSet :: forall a. Ord a => OSet a -> OSet a -> OSet a -appendOSet (OSet om1) (OSet om2) = OSet (Array.nub (om1 <> om2)) - -filter :: forall a. (a -> Boolean) -> OSet a -> OSet a -filter f (OSet os) = OSet $ Array.filter f os - -singleton :: forall a. Ord a => a -> OSet a -singleton x = OSet (Array.singleton x) - -insert :: forall a. Ord a => a -> OSet a -> OSet a -insert a os = os <> singleton a diff --git a/web-common/src/Data/String/Extra.purs b/web-common/src/Data/String/Extra.purs deleted file mode 100644 index 96826da518..0000000000 --- a/web-common/src/Data/String/Extra.purs +++ /dev/null @@ -1,62 +0,0 @@ -module Data.String.Extra where - -import Prologue -import Data.Array (intercalate) -import Data.Char as Char -import Data.Int as Int -import Data.Maybe (isJust) -import Data.String as String -import Data.String.CodeUnits as CodeUnits - -abbreviate :: Int -> String -> String -abbreviate n str = - let - prefix = String.take n str - in - if str == prefix then - str - else - prefix <> "..." - -toHex :: String -> String -toHex = - CodeUnits.toCharArray - >>> map - ( Char.toCharCode - >>> Int.toStringAs Int.hexadecimal - >>> leftPadTo 2 " " - ) - >>> intercalate "" - -leftPadTo :: Int -> String -> String -> String -leftPadTo length prefix str = repeat (max 0 (length - strlen)) prefix <> str - where - strlen = String.length str - -rightPadTo :: Int -> String -> String -> String -rightPadTo length suffix str = str <> repeat (max 0 (length - strlen)) suffix - where - strlen = String.length str - -repeat :: forall m. Monoid m => Int -> m -> m -repeat 0 str = mempty - -repeat n str = str <> repeat (n - 1) str - -unlines :: Array String -> String -unlines = String.joinWith "\n" - --- | Capitalize the first `Char` in a `String` -capitalize :: String -> String -capitalize str = - let - { before, after } = String.splitAt 1 str - in - String.toUpper before <> after - --- Absurdly, these two are not in the standard library -startsWith :: String.Pattern -> String -> Boolean -startsWith pattern = isJust <<< String.stripPrefix pattern - -endsWith :: String.Pattern -> String -> Boolean -endsWith pattern = isJust <<< String.stripSuffix pattern diff --git a/web-common/src/Debug/Trace/Extra.js b/web-common/src/Debug/Trace/Extra.js deleted file mode 100644 index 9a264c1329..0000000000 --- a/web-common/src/Debug/Trace/Extra.js +++ /dev/null @@ -1,13 +0,0 @@ -/*eslint-env node*/ -'use strict'; - -exports.traceTime = function () { - return function (label) { - return function (action) { - console.time(label); - var result = action(); - console.timeEnd(label); - return result; - }; - }; -} \ No newline at end of file diff --git a/web-common/src/Debug/Trace/Extra.purs b/web-common/src/Debug/Trace/Extra.purs deleted file mode 100644 index f192fd6675..0000000000 --- a/web-common/src/Debug/Trace/Extra.purs +++ /dev/null @@ -1,7 +0,0 @@ -module Debug.Trace.Extra where - -import Prelude -import Debug.Trace (class DebugWarning) - --- | Similar to Debug.Trace.trace but also reports the time taken to evaluate the thunk -foreign import traceTime :: forall a b. DebugWarning => a -> (Unit -> b) -> b diff --git a/web-common/src/Halogen/Analytics.purs b/web-common/src/Halogen/Analytics.purs deleted file mode 100644 index 0d1e2357da..0000000000 --- a/web-common/src/Halogen/Analytics.purs +++ /dev/null @@ -1,15 +0,0 @@ -module Halogen.Analytics where - -import Analytics (class IsEvent, analyticsTracking) -import Effect.Class (class MonadEffect, liftEffect) -import Halogen (HalogenM) -import Prelude (discard, ($)) - -withAnalytics :: - forall state action slots message m a. - MonadEffect m => - IsEvent action => - (action -> HalogenM state action slots message m a) -> action -> HalogenM state action slots message m a -withAnalytics handler action = do - liftEffect $ analyticsTracking action - handler action diff --git a/web-common/src/Halogen/Animation.js b/web-common/src/Halogen/Animation.js deleted file mode 100644 index 55ed07cbd9..0000000000 --- a/web-common/src/Halogen/Animation.js +++ /dev/null @@ -1,21 +0,0 @@ -exports.getAnimations_ = function (element) { - // If the browser does not implement the Web Animation API - // we return an empty array instead of failing. - if ("getAnimations" in element) { - return element.getAnimations(); - } else { - return []; - } -}; - -exports.getAnimationName = function (animation) { - return animation.animationName; -}; - -exports.setOnFinishHandler_ = function (animation, cb) { - animation.onfinish = cb; -}; - -exports.animationFinished_ = function (animation) { - return animation.finished; -}; diff --git a/web-common/src/Halogen/Animation.purs b/web-common/src/Halogen/Animation.purs deleted file mode 100644 index e080ed966b..0000000000 --- a/web-common/src/Halogen/Animation.purs +++ /dev/null @@ -1,101 +0,0 @@ --- This module offers some helpers for using Tailwind animations with halogen using the Web Animation API --- https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API -module Halogen.Animation where - -import Prelude -import Control.Promise (Promise, toAffE) -import Data.Array (filter) -import Data.Traversable (traverse) -import Effect (Effect) -import Effect.Aff (Aff) -import Effect.Aff.Class (class MonadAff) -import Effect.Class (liftEffect) -import Effect.Uncurried (EffectFn1, EffectFn2, runEffectFn1, runEffectFn2) -import Halogen.Query.EventSource (EventSource) -import Halogen.Query.EventSource as EventSource -import Web.DOM.DOMTokenList as DOMTokenList -import Web.HTML (HTMLElement) -import Web.HTML.HTMLElement (classList) - -foreign import data CSSAnimation :: Type - -foreign import getAnimations_ :: EffectFn1 HTMLElement (Array CSSAnimation) - -foreign import getAnimationName :: CSSAnimation -> String - -foreign import setOnFinishHandler_ :: EffectFn2 CSSAnimation (Effect Unit) Unit - -foreign import animationFinished_ :: EffectFn1 CSSAnimation (Promise Unit) - -getAnimations :: HTMLElement -> Effect (Array CSSAnimation) -getAnimations = runEffectFn1 getAnimations_ - --- The feautre is experimental and is not supported on Internet Explorer. --- https://developer.mozilla.org/en-US/docs/Web/API/Animation/onfinish -setOnFinishHandler :: CSSAnimation -> Effect Unit -> Effect Unit -setOnFinishHandler = runEffectFn2 setOnFinishHandler_ - --- The Animation.finished returns a Promise which resolves once the animation has finished playing. --- The feautre is experimental and is not supported on Internet Explorer. --- https://developer.mozilla.org/en-US/docs/Web/API/Animation/finished -animationFinished :: CSSAnimation -> Aff Unit -animationFinished = toAffE <<< runEffectFn1 animationFinished_ - --- This function adds a tailwind animation `animationName` (which can be customized using CSS Animations) --- to an element, and calls an `action` once it finished. The only way to call HalogenM from the Effect world --- is via the subscriptions mechanism, so you need to subscribe to this EventSource. --- You don't need to unsubscribe as the EventSource closes itself after firing the action. --- https://tailwindcss.com/docs/animation -animateAndWaitUntilFinishSubscription :: - forall m action. - MonadAff m => - String -> - action -> - HTMLElement -> - EventSource m action -animateAndWaitUntilFinishSubscription animationName action element = - EventSource.effectEventSource \emitter -> do - let - className = "animate-" <> animationName - -- Adding the class to the element starts the animation - classes <- classList element - DOMTokenList.add classes className - animations <- getAnimations element <#> filter (\animation -> animationName == getAnimationName animation) - let - cb :: Effect Unit - cb = do - EventSource.emit emitter action - EventSource.close emitter - -- We remove the css class so we can redo the animation if necessary - DOMTokenList.remove classes className - case animations of - [ animation ] -> setOnFinishHandler animation cb - _ -> cb - pure $ EventSource.Finalizer mempty - --- same as `animateAndWaitUntilFinishSubscription` but works with Aff instead of subscriptions so it allows --- to sequence animations. -animateAndWaitUntilFinish :: - String -> - HTMLElement -> - Aff Unit -animateAndWaitUntilFinish animationName element = do - let - className = "animate-" <> animationName - - getAnimations' = liftEffect <<< getAnimations - -- Adding the class to the element starts the animation - classes <- liftEffect $ classList element - liftEffect $ DOMTokenList.add classes className - animations <- getAnimations' element <#> filter (\animation -> animationName == getAnimationName animation) - -- TODO: Try to use `finally` to make sure the class is removed even if we kill the Aff ("cancel animation") - case animations of - [ animation ] -> animationFinished animation - _ -> pure unit - -- We remove the css class so we can redo the animation if necessary - liftEffect $ DOMTokenList.remove classes className - -waitForAllAnimations :: HTMLElement -> Aff Unit -waitForAllAnimations element = do - animations <- liftEffect $ getAnimations element - void $ traverse animationFinished animations diff --git a/web-common/src/Halogen/Chartist.purs b/web-common/src/Halogen/Chartist.purs deleted file mode 100644 index aacf839808..0000000000 --- a/web-common/src/Halogen/Chartist.purs +++ /dev/null @@ -1,94 +0,0 @@ -module Halogen.Chartist - ( chartist - , Query(..) - , Message(..) - ) where - -import Chartist (Chart, ChartistData, ChartistOptions, resize, updateData) -import Chartist as Chartist -import Control.Applicative (pure) -import Control.Bind (bind, (>>=), discard) -import Control.Category ((<<<)) -import Data.Function (const, ($)) -import Data.Maybe (Maybe(Just, Nothing)) -import Data.Unit (Unit, unit) -import Effect.Aff.Class (class MonadAff) -import Effect.Class (class MonadEffect, liftEffect) -import Halogen (HalogenM, RefLabel(..)) -import Halogen as H -import Halogen.HTML (ClassName(..)) -import Halogen.HTML as HH -import Halogen.HTML.Properties (classes) -import Halogen.HTML.Properties as HP - -type State - = { chart :: Maybe Chart - } - -data Query a - = Resize a - -data Action - = Init ChartistOptions - | SetData ChartistData - -data Message - = Initialized - -chartist :: - forall m. - MonadAff m => - MonadEffect m => - ChartistOptions -> - H.Component HH.HTML Query ChartistData Message m -chartist options = - H.mkComponent - { initialState: const { chart: Nothing } - , render - , eval: - H.mkEval - { handleAction - , handleQuery - , initialize: Just $ Init options - , receive: Just <<< SetData - , finalize: Nothing - } - } - -handleQuery :: forall a input m. MonadEffect m => Query a -> HalogenM State Action input Message m (Maybe a) -handleQuery (Resize next) = do - H.gets _.chart - >>= case _ of - Nothing -> pure unit - Just chart -> liftEffect $ resize chart - pure $ Just next - -handleAction :: forall slots m. MonadEffect m => Action -> HalogenM State Action slots Message m Unit -handleAction (Init options) = do - mElement <- H.getHTMLElementRef chartRefLabel - case mElement of - Nothing -> pure unit - Just element -> do - chart <- liftEffect $ Chartist.barChart element options - _ <- H.modify _ { chart = Just chart } - H.raise Initialized - -handleAction (SetData chartistData) = do - H.gets _.chart - >>= case _ of - Nothing -> pure unit - Just chart -> liftEffect $ updateData chart chartistData - -chartRefLabel :: RefLabel -chartRefLabel = RefLabel "chartist" - -render ∷ forall p i. State -> HH.HTML p i -render state = - HH.div - [ classes - [ ClassName "ct-chart" - , ClassName "ct-major-twelfth" - ] - , HP.ref chartRefLabel - ] - [] diff --git a/web-common/src/Halogen/Css.purs b/web-common/src/Halogen/Css.purs deleted file mode 100644 index 6f4143315f..0000000000 --- a/web-common/src/Halogen/Css.purs +++ /dev/null @@ -1,21 +0,0 @@ -module Halogen.Css - ( classNames - , applyWhen - , hideWhen - ) where - -import Prelude -import Halogen (ClassName(ClassName)) -import Halogen.HTML.Properties (IProp, classes) - -classNames :: forall r i. Array String -> IProp ( class :: String | r ) i -classNames = classes <<< map ClassName - ---- utilities -applyWhen :: Boolean -> Array String -> Array String -applyWhen true classes = classes - -applyWhen false _ = [] - -hideWhen :: Boolean -> Array String -hideWhen = flip applyWhen [ "hidden" ] diff --git a/web-common/src/Halogen/ElementResize.purs b/web-common/src/Halogen/ElementResize.purs deleted file mode 100644 index e0b973b65d..0000000000 --- a/web-common/src/Halogen/ElementResize.purs +++ /dev/null @@ -1,25 +0,0 @@ -module Halogen.ElementResize where - -import Prelude -import Data.Array (head) -import Data.Foldable (for_) -import Effect.Aff.Class (class MonadAff) -import Halogen.Query.EventSource (EventSource) -import Halogen.Query.EventSource as EventSource -import Web.DOM (Element) -import Web.DOM.ResizeObserver (ResizeObserverBoxOptions, ResizeObserverEntry, observe, resizeObserver, unobserve) - -elementResize :: - forall m action. - MonadAff m => - ResizeObserverBoxOptions -> - (ResizeObserverEntry -> action) -> - Element -> - EventSource m action -elementResize options toAction element = - EventSource.effectEventSource \emitter -> do - observer <- - resizeObserver \entries _ -> - for_ (head entries) \entry -> EventSource.emit emitter (toAction entry) - observe element options observer - pure $ EventSource.Finalizer $ unobserve element observer diff --git a/web-common/src/Halogen/ElementVisible.purs b/web-common/src/Halogen/ElementVisible.purs deleted file mode 100644 index 5473a90623..0000000000 --- a/web-common/src/Halogen/ElementVisible.purs +++ /dev/null @@ -1,28 +0,0 @@ -module Halogen.ElementVisible where - -import Prelude -import Data.Array (head) -import Data.Foldable (for_) -import Effect.Aff.Class (class MonadAff) -import Halogen.Query.EventSource (EventSource) -import Halogen.Query.EventSource as EventSource -import Web.DOM (Element) -import Web.DOM.IntersectionObserver (intersectionObserver, observe, unobserve) - --- This Halogen EventSource uses the IntersectionObserver to detect if an element is visible in the --- viewport. --- The `toAction` callback allows the subscriber to dispatch a particular action when the element is --- visible or not. -elementVisible :: - forall m action. - MonadAff m => - (Boolean -> action) -> - Element -> - EventSource m action -elementVisible toAction element = - EventSource.effectEventSource \emitter -> do - observer <- - intersectionObserver {} \entries _ -> - for_ (head entries) \entry -> EventSource.emit emitter (toAction entry.isIntersecting) - observe element observer - pure $ EventSource.Finalizer $ unobserve element observer diff --git a/web-common/src/Halogen/Extra.js b/web-common/src/Halogen/Extra.js deleted file mode 100644 index 2f8a41c6ef..0000000000 --- a/web-common/src/Halogen/Extra.js +++ /dev/null @@ -1,8 +0,0 @@ -/*eslint-env node*/ -/*global exports global*/ - -'use strict'; - -exports.scrollIntoView_ = function (element) { - element.scrollIntoView(); -}; diff --git a/web-common/src/Halogen/Extra.purs b/web-common/src/Halogen/Extra.purs deleted file mode 100644 index 5ec39239ee..0000000000 --- a/web-common/src/Halogen/Extra.purs +++ /dev/null @@ -1,178 +0,0 @@ -module Halogen.Extra where - -import Prelude -import Control.Applicative.Free (hoistFreeAp) -import Control.Monad.Free (hoistFree) -import Control.Monad.State (get) -import Data.Bifunctor (bimap) -import Data.Foldable (for_) -import Data.Lens (Lens', Traversal', preview, set, view) -import Data.Maybe (Maybe(..), fromMaybe) -import Data.Newtype (over) -import Data.Symbol (SProxy(..)) -import Data.Tuple (Tuple(..)) -import Effect.Class (class MonadEffect, liftEffect) -import Effect.Uncurried (EffectFn1, runEffectFn1) -import Halogen (Component, ComponentHTML, HalogenF(..), HalogenM(..), RefLabel, Slot, getHTMLElementRef, mkComponent) -import Halogen as H -import Halogen.HTML (HTML, IProp, div_, slot) -import Halogen.HTML.Core (Prop) -import Halogen.HTML.Core as Core -import Halogen.Query (HalogenM) -import Halogen.Query.HalogenM (HalogenAp(..), mapAction) -import Halogen.Query.HalogenM (imapState) as Halogen -import Halogen.Query.Input (Input) -import Halogen.Query.Input as Input -import Unsafe.Coerce (unsafeCoerce) -import Web.HTML.HTMLElement (HTMLElement) - --- | This is a version of imapState that uses a lens. --- | With the official version it is easy to make a mistake and --- | 'freeze' the old state and end up replacing any changes to --- | the state that have happened asynchronously. -imapState :: - forall state state' action slots output m. - Lens' state' state -> - HalogenM state action slots output m - ~> HalogenM state' action slots output m -imapState lens (HalogenM h) = HalogenM (hoistFree go h) - where - go :: HalogenF state action slots output m ~> HalogenF state' action slots output m - go = case _ of - State fs -> - State - ( \s' -> - let - (Tuple a s) = fs (view lens s') - in - (Tuple a (set lens s s')) - ) - Subscribe fes k -> Subscribe fes k - Unsubscribe sid a -> Unsubscribe sid a - Lift q -> Lift q - ChildQuery cq -> ChildQuery cq - Raise o a -> Raise o a - Par p -> Par (over HalogenAp (hoistFreeAp (imapState lens)) p) - Fork hmu k -> Fork (imapState lens hmu) k - Kill fid a -> Kill fid a - GetRef p k -> GetRef p k - -mapSubmodule :: - forall m action action' state state' slots msg. - Functor m => - Lens' state state' -> - (action' -> action) -> - HalogenM state' action' slots msg m - ~> HalogenM state action slots msg m -mapSubmodule lens wrapper halogen = (imapState lens <<< mapAction wrapper) halogen - -mapComponentAction :: - forall m action action' slots. - (action' -> action) -> - ComponentHTML action' slots m -> - ComponentHTML action slots m -mapComponentAction actionWrapper rendered = bimap (map actionWrapper) actionWrapper rendered - --- Allows you to render a submodule changing the state with the provided optic and --- wrapping the action. If the optic cant produce a value, an empty div is inserted instead -renderSubmodule :: - forall m action action' state state' slots. - Traversal' state state' -> - (action' -> action) -> - (state' -> ComponentHTML action' slots m) -> - state -> - ComponentHTML action slots m -renderSubmodule optic actionWrapper render state = - let - mSubState = preview optic state - - rendered = case mSubState of - Nothing -> div_ [] - Just subState -> render subState - in - mapComponentAction actionWrapper rendered - --- | This lets you map the state of a submodule that may not exist, --- | given an affine traversal into that optional substate. It's --- | an ugly solution, and it suffers from the same problem with --- | Halogen's `imapState` noted above. But for now, at least it works. -mapMaybeSubmodule :: - forall m state state' action action' slots msg. - Functor m => - Traversal' state state' -> - (action' -> action) -> - state' -> - HalogenM state' action' slots msg m Unit -> - HalogenM state action slots msg m Unit -mapMaybeSubmodule traversal wrapper submoduleDefaultState submoduleHandleAction = do - state <- get - let - mSubmoduleState :: Maybe state' - mSubmoduleState = preview traversal state - - subToMain :: state' -> state - subToMain submoduleState = set traversal submoduleState state - - mainToSub :: state -> state' - mainToSub = fromMaybe submoduleDefaultState <<< preview traversal - Halogen.imapState subToMain mainToSub $ mapAction wrapper $ submoduleHandleAction - -foreign import scrollIntoView_ :: EffectFn1 HTMLElement Unit - -scrollIntoView :: forall surface action slots output m. MonadEffect m => RefLabel -> HalogenM surface action slots output m Unit -scrollIntoView ref = do - mElement <- getHTMLElementRef ref - for_ mElement (liftEffect <<< runEffectFn1 scrollIntoView_) - --- NOTE: There is a problem with this implementation of lifeCycleEvent that affect the use of normal components --- (like tooltips or hints) when a branch of the component tree uses this property. --- I think that by firing an Action and not using the RefUpdate we are "hijacking" halogen internals --- and not allowing the slots component Init state to kick in. --- The workaround for this issue is to use lifeCycleSlot instead, which is a little more verbose --- as it requires to be in the context of a ComponentHTML and also leaves an empty div in the DOM. --- I leave this code here to see if we can later come up with a solution that works as a property instead of a slot. --- --- This HTML property dispatch lifecycle actions when the element is added or removed to the DOM -lifeCycleEventProperty :: forall r action. { onInit :: Maybe action, onFinalize :: Maybe action } -> IProp r action -lifeCycleEventProperty handlers = (unsafeCoerce :: Prop (Input action) -> IProp r action) $ Core.ref onLifecycleEvent - where - onLifecycleEvent (Just _) = Input.Action <$> handlers.onInit - - onLifecycleEvent Nothing = Input.Action <$> handlers.onFinalize - -_lifeCycleSlot :: SProxy "lifeCycleSlot" -_lifeCycleSlot = SProxy - -data LifecycleEvent - = OnInit - | OnFinalize - -lifeCycleComponent :: - forall m query. - Component HTML query Unit LifecycleEvent m -lifeCycleComponent = - mkComponent - { initialState: identity - , render: const $ div_ [] - , eval: - H.mkEval - $ H.defaultEval - { handleAction = H.raise - , initialize = Just OnInit - , finalize = Just OnFinalize - } - } - --- Helper function to fire life-cycle actions in a sub component. -lifeCycleSlot :: - forall slots m action. - String -> - (LifecycleEvent -> Maybe action) -> - ComponentHTML action ( lifeCycleSlot :: forall query. Slot query LifecycleEvent String | slots ) m -lifeCycleSlot ref handler = - slot - _lifeCycleSlot - ref - lifeCycleComponent - unit - handler diff --git a/web-common/src/Halogen/HTML/Events/Extra.purs b/web-common/src/Halogen/HTML/Events/Extra.purs deleted file mode 100644 index c72fb95f51..0000000000 --- a/web-common/src/Halogen/HTML/Events/Extra.purs +++ /dev/null @@ -1,21 +0,0 @@ -module Halogen.HTML.Events.Extra where - -import Prelude -import Data.Maybe (Maybe(..)) -import Halogen.HTML (IProp) -import Halogen.HTML.Events (onBlur, onClick, onFocus, onValueInput) -import Web.Event.Internal.Types (Event) -import Web.UIEvent.FocusEvent (FocusEvent) -import Web.UIEvent.MouseEvent (MouseEvent) - -onClick_ :: forall a b. a -> IProp ( onClick :: MouseEvent | b ) a -onClick_ = onClick <<< const <<< Just - -onValueInput_ :: forall a b. (String -> a) -> IProp ( onInput :: Event, value :: String | b ) a -onValueInput_ a = onValueInput $ Just <<< a - -onFocus_ :: forall a b. a -> IProp ( onFocus :: FocusEvent | b ) a -onFocus_ = onFocus <<< const <<< Just - -onBlur_ :: forall a b. a -> IProp ( onBlur :: FocusEvent | b ) a -onBlur_ = onBlur <<< const <<< Just diff --git a/web-common/src/Halogen/HTML/Extra.purs b/web-common/src/Halogen/HTML/Extra.purs deleted file mode 100644 index 55d4698923..0000000000 --- a/web-common/src/Halogen/HTML/Extra.purs +++ /dev/null @@ -1,8 +0,0 @@ -module Halogen.HTML.Extra (mapComponent) where - -import Data.Bifunctor (bimap) -import Data.Functor (map) -import Halogen.HTML (ComponentHTML) - -mapComponent :: forall m a b slots. (a -> b) -> ComponentHTML a slots m -> ComponentHTML b slots m -mapComponent f = bimap (map f) f diff --git a/web-common/src/Halogen/LocalStorage.purs b/web-common/src/Halogen/LocalStorage.purs deleted file mode 100644 index b57958d424..0000000000 --- a/web-common/src/Halogen/LocalStorage.purs +++ /dev/null @@ -1,30 +0,0 @@ -module Halogen.LocalStorage (localStorageEvents) where - -import Prelude -import Control.Coroutine (connect, consumer, runProcess) -import Data.Maybe (Maybe(..)) -import Effect.Aff (forkAff, killFiber) -import Effect.Aff.Class (class MonadAff) -import Effect.Exception (error) -import Halogen.Query.EventSource (EventSource) -import Halogen.Query.EventSource as EventSource -import LocalStorage (RawStorageEvent) -import LocalStorage as LocalStorage - --- This EventSource allows you to subscribe to local storage events from within --- a Halogen handle action, and dispatch custom actions using the `toAction` wrapper. -localStorageEvents :: - forall m action. - MonadAff m => - (RawStorageEvent -> action) -> - EventSource m action -localStorageEvents toAction = - EventSource.affEventSource \emitter -> do - fiber <- - forkAff $ runProcess $ connect LocalStorage.listen - $ consumer \event -> do - EventSource.emit emitter (toAction event) - pure Nothing - pure - $ EventSource.Finalizer - $ killFiber (error "unsubscribing") fiber diff --git a/web-common/src/Halogen/Monaco.purs b/web-common/src/Halogen/Monaco.purs deleted file mode 100644 index 29b21b91bf..0000000000 --- a/web-common/src/Halogen/Monaco.purs +++ /dev/null @@ -1,366 +0,0 @@ -module Halogen.Monaco - ( KeyBindings(..) - , Settings - , Query(..) - , Objects - , Message(..) - , monacoComponent - ) where - -import Prelude hiding (div) -import Control.Monad.Maybe.Trans (MaybeT(..), runMaybeT) -import Control.Monad.Trans.Class (lift) -import Data.Array (catMaybes) -import Data.Either (Either(..)) -import Data.Enum (class BoundedEnum, class Enum) -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Bounded (genericBottom, genericTop) -import Data.Generic.Rep.Enum (genericCardinality, genericFromEnum, genericPred, genericSucc, genericToEnum) -import Data.Generic.Rep.Eq (genericEq) -import Data.Generic.Rep.Ord (genericCompare) -import Data.Lens (Lens', set, use, view) -import Data.Lens.Record (prop) -import Data.Maybe (Maybe(..)) -import Data.Symbol (SProxy(..)) -import Data.Traversable (for, for_, sequence, traverse) -import Effect (Effect) -import Effect.Aff.Class (class MonadAff) -import Effect.Class (class MonadEffect, liftEffect) -import Halogen (HalogenM, RefLabel, get, modify_) -import Halogen as H -import Halogen.ElementResize (elementResize) -import Halogen.HTML (HTML, div) -import Halogen.HTML.Properties (class_, ref) -import Halogen.Query.EventSource (Emitter(..), Finalizer, effectEventSource) -import Monaco (CodeActionProvider, CompletionItemProvider, DocumentFormattingEditProvider, Editor, HoverProvider, IDisposable, IMarker, IMarkerData, IModelDeltaDecoration, IPosition, IRange, LanguageExtensionPoint, MonarchLanguage, Theme, TokensProvider, dispose) -import Monaco as Monaco -import Web.DOM.ResizeObserver (ResizeObserverBoxOptions(..)) -import Web.HTML.HTMLElement as HTMLElement - -data KeyBindings - = DefaultBindings - | Vim - | Emacs - -derive instance genericKeyBindings :: Generic KeyBindings _ - -instance showKeyBindings :: Show KeyBindings where - show DefaultBindings = "Default Key Bindings" - show Vim = "Vim" - show Emacs = "Emacs" - -instance eqKeyBindings :: Eq KeyBindings where - eq = genericEq - -instance ordKeyBindings :: Ord KeyBindings where - compare = genericCompare - -instance enumKeyBindings :: Enum KeyBindings where - succ = genericSucc - pred = genericPred - -instance boundedKeyBindings :: Bounded KeyBindings where - bottom = genericBottom - top = genericTop - -instance boundedEnumKeyBindings :: BoundedEnum KeyBindings where - cardinality = genericCardinality - toEnum = genericToEnum - fromEnum = genericFromEnum - -type Objects - = { codeActionProvider :: Maybe CodeActionProvider - , completionItemProvider :: Maybe CompletionItemProvider - } - -newtype CancelBindings - = CancelBindings (Effect Unit) - -defaultCancelBindings :: CancelBindings -defaultCancelBindings = CancelBindings (pure unit) - -type State - = { editor :: Maybe Editor - , deactivateBindings :: CancelBindings - , objects :: Objects - , disposables :: Array IDisposable - } - -_editor :: Lens' State (Maybe Editor) -_editor = prop (SProxy :: SProxy "editor") - -_mCodeActionProvider :: Lens' State (Maybe CodeActionProvider) -_mCodeActionProvider = prop (SProxy :: SProxy "objects") <<< prop (SProxy :: SProxy "codeActionProvider") - -_mCompletionItemProvider :: Lens' State (Maybe CompletionItemProvider) -_mCompletionItemProvider = prop (SProxy :: SProxy "objects") <<< prop (SProxy :: SProxy "completionItemProvider") - -_disposables :: Lens' State (Array IDisposable) -_disposables = prop (SProxy :: SProxy "disposables") - -data Query a - = SetText String a - | GetText (String -> a) - | GetLineCount (Int -> a) - | GetModel (Monaco.ITextModel -> a) - | GetModelMarkers (Array IMarker -> a) - | GetDecorationRange String (IRange -> a) - | SetDeltaDecorations (Array String) (Array IModelDeltaDecoration) (Array String -> a) - | SetPosition IPosition a - | RevealRange IRange a - | Focus a - | Resize a - | SetTheme String a - | SetModelMarkers (Array IMarkerData) (Array IMarker -> a) - | SetKeyBindings KeyBindings a - | GetObjects (Objects -> a) - -data Action - = Init - | Finalize - | HandleChange String - | ResizeWorkspace - -data Message - = TextChanged String - | EditorReady - -type Settings m - = { languageExtensionPoint :: LanguageExtensionPoint - , theme :: Maybe Theme - , monarchTokensProvider :: m (Maybe MonarchLanguage) - , tokensProvider :: m (Maybe TokensProvider) - , hoverProvider :: m (Maybe HoverProvider) - , completionItemProvider :: m (Maybe CompletionItemProvider) - , codeActionProvider :: m (Maybe CodeActionProvider) - , documentFormattingEditProvider :: m (Maybe DocumentFormattingEditProvider) - , refLabel :: RefLabel - , owner :: String - , setup :: Editor -> m Unit - } - -monacoComponent :: forall m. MonadAff m => Settings m -> H.Component HTML Query Unit Message m -monacoComponent settings = - H.mkComponent - { initialState: - const - { editor: Nothing - , deactivateBindings: defaultCancelBindings - , objects: - { codeActionProvider: Nothing - , completionItemProvider: Nothing - } - , disposables: [] - } - , render: render settings.refLabel - , eval: - H.mkEval - { handleAction: handleAction settings - , handleQuery - , initialize: Just Init - , receive: const Nothing - , finalize: Just Finalize - } - } - -render :: forall p i. RefLabel -> State -> HTML p i -render label state = - div - [ ref label - , class_ $ H.ClassName "monaco-editor-container" - ] - [] - -handleAction :: forall slots m. MonadAff m => Settings m -> Action -> HalogenM State Action slots Message m Unit -handleAction settings Init = do - monaco <- liftEffect Monaco.getMonaco - maybeElement <- H.getHTMLElementRef settings.refLabel - case maybeElement of - Just element -> do - let - languageId = view Monaco._id settings.languageExtensionPoint - -- The monaco component receives in its settings multiple optional providers. The - -- settings are created inside a view, but to create the provider we need access to Effect so - -- we can call the FFI. - -- To solve this in the least disrupting way I modified the existing `Settings m` so that we - -- can pass an effectful computation that may return a provider (m (Maybe XProvider)). - -- And the following code invokes the FFI function returning a Maybe XProvider. - -- TODO: We should re-arrange the `Settings m` and move the logic from the view to the handleAction - -- changing the `Settings m` to be just `Settings` and the `setup` logic not to be included in there. - mMonarchTokensProvider <- H.lift $ settings.monarchTokensProvider - mTokensProvider <- H.lift $ settings.tokensProvider - mHoverProvider <- H.lift $ settings.hoverProvider - mCodeActionProvider <- H.lift $ settings.codeActionProvider - mCompletionItemProvider <- H.lift $ settings.completionItemProvider - mDocumentFormattingEditProvider <- H.lift $ settings.documentFormattingEditProvider - liftEffect do - when (languageId == "typescript") do - Monaco.addExtraTypeScriptLibsJS monaco - Monaco.setStrictNullChecks monaco true - Monaco.registerLanguage monaco settings.languageExtensionPoint - for_ settings.theme $ Monaco.defineTheme monaco - -- We set the defined providers and receive an array of the cleanup functions - disposables :: Array IDisposable <- - liftEffect $ catMaybes - <$> sequence - [ for mMonarchTokensProvider $ Monaco.setMonarchTokensProvider monaco languageId - , for mTokensProvider $ Monaco.setTokensProvider monaco languageId - , for mHoverProvider $ Monaco.registerHoverProvider monaco languageId - , for mCompletionItemProvider $ Monaco.registerCompletionItemProvider monaco languageId - , for mCodeActionProvider $ Monaco.registerCodeActionProvider monaco languageId - , for mDocumentFormattingEditProvider $ Monaco.registerDocumentFormattingEditProvider monaco languageId - ] - editor <- liftEffect $ Monaco.create monaco element languageId - void $ H.modify - $ set _editor (Just editor) - <<< set _mCodeActionProvider mCodeActionProvider - <<< set _mCompletionItemProvider mCompletionItemProvider - <<< set _disposables disposables - H.lift $ settings.setup editor - model <- liftEffect $ Monaco.getModel editor - void $ H.subscribe $ elementResize ContentBox (const ResizeWorkspace) (HTMLElement.toElement element) - H.raise EditorReady - H.raise $ TextChanged (Monaco.getValue model) - void $ H.subscribe $ effectEventSource (changeContentHandler editor) - Nothing -> pure unit - -handleAction _ Finalize = do - disposables <- use _disposables - for_ disposables $ liftEffect <<< dispose - -handleAction _ (HandleChange contents) = H.raise $ TextChanged contents - -handleAction _ ResizeWorkspace = do - mEditor <- use _editor - for_ mEditor \editor -> - liftEffect $ Monaco.layout editor - -changeContentHandler :: - forall m. - Applicative m => - Editor -> - Emitter Effect Action -> Effect (Finalizer m) -changeContentHandler editor (Emitter emitter) = do - Monaco.onDidChangeContent editor - ( \_ -> do - model <- Monaco.getModel editor - emitter $ Left $ HandleChange (Monaco.getValue model) - ) - pure mempty - --- If the editor has been set then we can use it when handling our Query -withEditor :: forall input m a. MonadEffect m => (Editor -> HalogenM State Action input Message m a) -> HalogenM State Action input Message m (Maybe a) -withEditor f = H.gets _.editor >>= traverse f - -handleQuery :: forall a input m. MonadEffect m => Query a -> HalogenM State Action input Message m (Maybe a) -handleQuery (SetText text next) = do - withEditor \editor -> do - model <- liftEffect $ Monaco.getModel editor - -- We want to avoid setting the same value because it will cause https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.itextmodel.html#ondidchangecontent - -- to fire even though the content didn't change - when (text /= Monaco.getValue model) $ liftEffect $ Monaco.setValue model text - pure next - -handleQuery (GetText f) = do - withEditor \editor -> do - model <- liftEffect $ Monaco.getModel editor - let - s = Monaco.getValue model - pure $ f s - -handleQuery (GetLineCount f) = do - withEditor \editor -> do - model <- liftEffect $ Monaco.getModel editor - let - i = Monaco.getLineCount model - pure $ f i - -handleQuery (GetModel f) = do - withEditor \editor -> do - m <- liftEffect $ Monaco.getModel editor - pure $ f m - -handleQuery (GetModelMarkers f) = do - withEditor \editor -> - liftEffect do - monaco <- Monaco.getMonaco - model <- Monaco.getModel editor - markers <- Monaco.getModelMarkers monaco model - pure $ f markers - -handleQuery (GetDecorationRange decoratorId f) = - runMaybeT do - editor <- MaybeT $ H.gets _.editor - model <- lift $ liftEffect $ Monaco.getModel editor - decoRange <- MaybeT $ liftEffect $ Monaco.getDecorationRange model decoratorId - pure $ f decoRange - -handleQuery (SetDeltaDecorations first last f) = do - withEditor \editor -> do - decoId <- liftEffect $ Monaco.setDeltaDecorations editor first last - pure $ f decoId - -handleQuery (SetPosition position next) = do - withEditor \editor -> do - liftEffect $ Monaco.setPosition editor position - liftEffect $ Monaco.revealLine editor position.lineNumber - pure next - -handleQuery (RevealRange range next) = do - withEditor \editor -> do - liftEffect $ Monaco.revealRange editor range - pure next - -handleQuery (Focus next) = do - withEditor \editor -> do - liftEffect $ Monaco.focus editor - pure next - -handleQuery (Resize next) = do - withEditor \editor -> do - liftEffect $ Monaco.layout editor - pure next - -handleQuery (SetTheme themeName next) = do - liftEffect do - monaco <- Monaco.getMonaco - Monaco.setTheme monaco themeName - pure $ Just next - -handleQuery (SetModelMarkers markersData f) = do - withEditor \editor -> - liftEffect do - let - owner = Monaco.getEditorId editor - monaco <- Monaco.getMonaco - model <- Monaco.getModel editor - Monaco.setModelMarkers monaco model owner markersData - markers <- Monaco.getModelMarkers monaco model - pure $ f markers - -handleQuery (SetKeyBindings bindings next) = - withEditor \editor -> do - { deactivateBindings } <- get - newDeactivateBindings <- liftEffect $ replaceKeyBindings bindings editor deactivateBindings - modify_ (_ { deactivateBindings = newDeactivateBindings }) - -- Changing keybindings can affect layout (by changing the status - -- line in Vim/Emacs modes, for instance). - liftEffect $ Monaco.layout editor - pure next - -handleQuery (GetObjects f) = do - { objects } <- get - pure $ Just $ f objects - -replaceKeyBindings :: KeyBindings -> Editor -> CancelBindings -> Effect CancelBindings -replaceKeyBindings bindings editor (CancelBindings deactivateOldBindings) = do - let - enableFn :: KeyBindings -> Editor -> Effect (Effect Unit) - enableFn DefaultBindings = pure $ pure $ pure unit - - enableFn Vim = Monaco.enableVimBindings - - enableFn Emacs = Monaco.enableEmacsBindings - deactivateOldBindings - deactivateNewBindings <- enableFn bindings editor - pure $ CancelBindings deactivateNewBindings diff --git a/web-common/src/Halogen/SVG.purs b/web-common/src/Halogen/SVG.purs deleted file mode 100644 index f91661872c..0000000000 --- a/web-common/src/Halogen/SVG.purs +++ /dev/null @@ -1,320 +0,0 @@ -module Halogen.SVG where - -import Prelude -import DOM.HTML.Indexed (Interactive) -import Data.Array as Array -import Data.Newtype (unwrap) -import Data.String (joinWith) -import Halogen.HTML (AttrName(..), ClassName, ElemName(..), HTML, Namespace(..), Node, elementNS, text) -import Halogen.HTML as HH -import Halogen.HTML.Properties (CSSPixel, IProp) - ------------------------------------------------------------- --- Nodes. ------------------------------------------------------------- -type SVGNode - = SVGStyling - ( SVGCore - ( viewBox :: Box - , xmlns :: Namespace - , width :: Length - , height :: Length - , class :: String - , role :: String - ) - ) - -type SVGrect - = SVGPresentation - ( Interactive - ( x :: CSSPixel - , y :: CSSPixel - , width :: Length - , height :: Length - , fill :: RGB - , stroke :: RGB - , strokeWidth :: CSSPixel - ) - ) - -type SVGg - = SVGPresentation (SVGCore ()) - -type SVGCore r - = ( id :: String, class :: String | r ) - -type SVGStyling r - = ( style :: String | r ) - -type SVGPresentation r - = ( transform :: Translate | r ) - -type SVGline - = ( x1 :: Length - , y1 :: Length - , x2 :: Length - , y2 :: Length - , stroke :: RGB - , strokeWidth :: CSSPixel - ) - -type SVGtext - = SVGPresentation - ( x :: CSSPixel - , y :: CSSPixel - , stroke :: RGB - , textAnchor :: Anchor - , transform :: Translate - ) - -type SVGgradiant - = ( id :: String - , x1 :: Length - , x2 :: Length - , y1 :: Length - , y2 :: Length - , gradientUnits :: GradientUnits - ) - -type SVGstop - = ( offset :: Length - , stopColour :: String - ) - -type SVGcircle - = SVGCore - ( id :: String - , fill :: RGB - , strokeWidth :: CSSPixel - , strokeLinecap :: Linecap - , cx :: Length - , cy :: Length - , r :: Length - ) - -type SVGpath - = ( id :: String - , d :: String - , transform :: Translate - , fill :: RGB - ) - -type SVGUse - = ( xmlns :: Namespace - , xlink :: String - ) - -svgNS :: Namespace -svgNS = Namespace "http://www.w3.org/2000/svg" - -xlinkNS :: Namespace -xlinkNS = Namespace "http://www.w3.org/2000/svg" - -svg :: forall p i. Node SVGNode p i -svg attributes = elementNS svgNS (ElemName "svg") (Array.snoc attributes (xmlns svgNS)) - -defs :: forall r p i. Node r p i -defs = elementNS svgNS (ElemName "defs") - -linearGradient :: forall p i. Node SVGgradiant p i -linearGradient = elementNS svgNS (ElemName "linearGradient") - -stop :: forall p i. Node SVGstop p i -stop = elementNS svgNS (ElemName "stop") - -path :: forall p i. Node SVGpath p i -path = elementNS svgNS (ElemName "path") - -circle :: forall p i. Node SVGcircle p i -circle = elementNS svgNS (ElemName "circle") - -rect :: forall p i. Node SVGrect p i -rect = elementNS svgNS (ElemName "rect") - -svgText :: forall r i. Array (IProp SVGtext i) -> String -> HTML r i -svgText attributes content = elementNS svgNS (ElemName "text") attributes [ text content ] - -g :: forall p i. Node SVGg p i -g = elementNS svgNS (ElemName "g") - -line :: forall p i. Node SVGline p i -line = elementNS svgNS (ElemName "line") - -use :: forall p i. Namespace -> Node SVGUse p i -use ns = elementNS ns (ElemName "use") - ------------------------------------------------------------- --- Attributes. ------------------------------------------------------------- -class IsAttr a where - toAttrValue :: a -> String - -instance isAttrNamespace :: IsAttr Namespace where - toAttrValue (Namespace namespace) = namespace - -instance isAttrString :: IsAttr String where - toAttrValue = identity - -instance isAttrInt :: IsAttr Int where - toAttrValue = show - -attr :: forall i r a. IsAttr a => AttrName -> a -> IProp r i -attr name = HH.attr name <<< toAttrValue - -x :: forall r i. CSSPixel -> IProp ( x :: CSSPixel | r ) i -x = attr (AttrName "x") - -y :: forall r i. CSSPixel -> IProp ( y :: CSSPixel | r ) i -y = attr (AttrName "y") - -x1 :: forall r i. Length -> IProp ( x1 :: Length | r ) i -x1 = attr (AttrName "x1") - -y1 :: forall r i. Length -> IProp ( y1 :: Length | r ) i -y1 = attr (AttrName "y1") - -x2 :: forall r i. Length -> IProp ( x2 :: Length | r ) i -x2 = attr (AttrName "x2") - -y2 :: forall r i. Length -> IProp ( y2 :: Length | r ) i -y2 = attr (AttrName "y2") - -cx :: forall r i. Length -> IProp ( cx :: Length | r ) i -cx = attr (AttrName "cx") - -cy :: forall r i. Length -> IProp ( cy :: Length | r ) i -cy = attr (AttrName "cy") - -r :: forall r i. Length -> IProp ( r :: Length | r ) i -r = attr (AttrName "r") - --- | `AttrName "className"` as used by Halogen.HTML.Properties does not work with SVG --- | See https://github.com/niklasvh/html2canvas/pull/2034 -clazz :: forall r i. ClassName -> IProp ( class :: String | r ) i -clazz = unwrap >>> attr (AttrName "class") - -height :: forall r i. Length -> IProp ( height :: Length | r ) i -height = attr (AttrName "height") - -width :: forall r i. Length -> IProp ( width :: Length | r ) i -width = attr (AttrName "width") - -gradientUnits :: forall r i. GradientUnits -> IProp ( gradientUnits :: GradientUnits | r ) i -gradientUnits = attr (AttrName "gradientUnits") - -offset :: forall r i. Length -> IProp ( offset :: Length | r ) i -offset = attr (AttrName "offset") - -stopColour :: forall r i. String -> IProp ( stopColour :: String | r ) i -stopColour = attr (AttrName "stop-color") - -xmlns :: forall r i. Namespace -> IProp ( xmlns :: Namespace | r ) i -xmlns = attr (AttrName "xmlns") - -d :: forall r i. String -> IProp ( d :: String | r ) i -d = attr (AttrName "d") - -transform :: forall r i. Translate -> IProp ( transform :: Translate | r ) i -transform = attr (AttrName "transform") - -textAnchor :: forall r i. Anchor -> IProp ( textAnchor :: Anchor | r ) i -textAnchor = attr (AttrName "text-anchor") - -fill :: forall r i. RGB -> IProp ( fill :: RGB | r ) i -fill = attr (AttrName "fill") - -stroke :: forall r i. RGB -> IProp ( stroke :: RGB | r ) i -stroke = attr (AttrName "stroke") - -strokeWidth :: forall r i. CSSPixel -> IProp ( strokeWidth :: CSSPixel | r ) i -strokeWidth = attr (AttrName "stroke-width") - -strokeLinecap :: forall r i. Linecap -> IProp ( strokeLinecap :: Linecap | r ) i -strokeLinecap = attr (AttrName "stroke-linecap") - -id_ :: forall r i. String -> IProp ( id :: String | r ) i -id_ = attr (AttrName "id") - -style :: forall r i. String -> IProp ( style :: String | r ) i -style = attr (AttrName "style") - -viewBox :: forall i r. Box -> IProp ( viewBox :: Box | r ) i -viewBox = attr (AttrName "viewBox") - -xlink :: forall i r. String -> IProp ( xlink :: String | r ) i -xlink = attr (AttrName "xlink:href") - ------------------------------------------------------------- --- Types ------------------------------------------------------------- -data Box - = Box - { x :: Int - , y :: Int - , width :: Int - , height :: Int - } - -instance isAttrBox :: IsAttr Box where - toAttrValue (Box box) = joinWith " " (show <$> [ box.x, box.y, box.width, box.height ]) - -data Translate - = Translate - { x :: Number - , y :: Number - } - -instance isAttrTranslate :: IsAttr Translate where - toAttrValue (Translate translate) = "translate" <> parens (joinWith "," (show <$> [ translate.x, translate.y ])) - -data RGB - = RGB - { red :: Int - , green :: Int - , blue :: Int - } - | Hex String - | None - -instance isAttrRGB :: IsAttr RGB where - toAttrValue (RGB { red, green, blue }) = "rgb" <> parens (joinWith "," (show <$> [ red, green, blue ])) - toAttrValue (Hex val) = val - toAttrValue None = "none" - -toRGB :: Int -> Int -> Int -> RGB -toRGB red green blue = RGB { red, green, blue } - -data Anchor - = Start - | Middle - | End - -instance isAttrAnchor :: IsAttr Anchor where - toAttrValue Start = "start" - toAttrValue Middle = "middle" - toAttrValue End = "end" - -parens :: String -> String -parens str = "(" <> str <> ")" - -data GradientUnits - = UserSpaceOnUse - | ObjectBoundingBox - -instance isAttrGradientUnits :: IsAttr GradientUnits where - toAttrValue UserSpaceOnUse = "userSpaceOnUse" - toAttrValue ObjectBoundingBox = "objectBoundingBox" - -data Length - = Length Number - | Px Int - -instance isAttrLength :: IsAttr Length where - toAttrValue (Length n) = show n - toAttrValue (Px n) = show n <> "px" - -data Linecap - = Round - -instance isAttrLinecap :: IsAttr Linecap where - toAttrValue Round = "round" diff --git a/web-common/src/Icons.purs b/web-common/src/Icons.purs deleted file mode 100644 index 432a22f5e9..0000000000 --- a/web-common/src/Icons.purs +++ /dev/null @@ -1,88 +0,0 @@ -module Icons where - -import Halogen.HTML (ClassName(ClassName), HTML, i) -import Halogen.HTML.Properties (class_) - -data Icon - = CreditCard - | LongArrowAltDown - | ArrowUp - | ArrowRight - | ArrowDown - | ArrowLeft - | Bars - | Close - | Check - | Bitcoin - | Clipboard - | Github - | Plus - | Trash - | Spinner - | SignInAlt - | Infinity - | Play - | Reverse - | StepBackward - | StepForward - | Hourglass - | HourglassStart - | HourglassEnd - | CheckCircle - | ExclamationCircle - -icon :: forall p i. Icon -> HTML p i -icon iconType = i [ class_ (iconClass iconType) ] [] - -iconClass :: Icon -> ClassName -iconClass CreditCard = ClassName "fa fa-credit-card" - -iconClass LongArrowAltDown = ClassName "fa fa-long-arrow-alt-down" - -iconClass ArrowUp = ClassName "fa fa-arrow-up" - -iconClass ArrowRight = ClassName "fa fa-arrow-right" - -iconClass ArrowDown = ClassName "fa fa-arrow-down" - -iconClass ArrowLeft = ClassName "fa fa-arrow-left" - -iconClass Bars = ClassName "fa fa-bars" - -iconClass Close = ClassName "fa fa-times" - -iconClass Check = ClassName "fa fa-check" - -iconClass Bitcoin = ClassName "fab fa-bitcoin" - -iconClass Clipboard = ClassName "fa fa-clipboard" - -iconClass Github = ClassName "fab fa-github" - -iconClass Plus = ClassName "fa fa-plus" - -iconClass Trash = ClassName "fa fa-trash" - -iconClass Spinner = ClassName "fa fa-spinner fa-pulse" - -iconClass SignInAlt = ClassName "fa fa-sign-in-alt" - -iconClass Infinity = ClassName "fa fa-infinity" - -iconClass Play = ClassName "fa fa-play" - -iconClass Reverse = ClassName "fa fa-play fa-flip-horizontal" - -iconClass StepBackward = ClassName "fa fa-step-backward" - -iconClass StepForward = ClassName "fa fa-step-forward" - -iconClass Hourglass = ClassName "fa fa-hourglass" - -iconClass HourglassStart = ClassName "fa fa-hourglass-start" - -iconClass HourglassEnd = ClassName "fa fa-hourglass-end" - -iconClass CheckCircle = ClassName "fa fa-check-circle" - -iconClass ExclamationCircle = ClassName "fa fa-exclamation-circle" diff --git a/web-common/src/Language/Haskell/Monaco.js b/web-common/src/Language/Haskell/Monaco.js deleted file mode 100644 index 806e4d73ea..0000000000 --- a/web-common/src/Language/Haskell/Monaco.js +++ /dev/null @@ -1,200 +0,0 @@ -/*eslint-env node*/ -'use strict'; - -// you can play with this at https://microsoft.github.io/monaco-editor/monarch.html -// just paste it in and at the bottom `return haskell;` -exports.monarchTokensProvider_ = function () { - return { - // Set defaultToken to invalid to see what you do not tokenize yet - defaultToken: 'invalid', - - tokenizer: { - - root: [ - ['(`)([a-zA-Z_\']*?)(`)', - ['punctuation.definition.entity.haskell', - 'keyword.operator.function.infix.haskell', - 'punctuation.definition.entity.haskell']], - ['\\(\\)', 'constant.language.unit.haskell'], - ['\\[\\]', 'constant.language.empty-list.haskell'], - ['\\b(module|signature)\\b', 'keyword.other.haskell', '@module_def'], - ['\\bclass\\b', 'keyword.other.haskell', 'class_'], - ['\\binstance\\b', 'keyword.other.haskell', '@instance'], - ['import', 'keyword.other.haskell', '@import_'], - ['(deriving|deriving anyclass|deriving stock|deriving newtype)(\\s*\\()', [ - { token: 'keyword.other.haskell' }, - { token: 'meta.deriving.haskell', next: '@deriving' }], - ], - ['\\binfix[lr]?\\b', 'keyword.operator.haskell'], - ['\\b(?:do|if|then|else)\\b', 'keyword.control.haskell'], - ['\\b(?:[0-9]+\\.[0-9]+(?:[eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b', - 'constant.numeric.float.haskell'], - ['\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b', - 'constant.numeric.haskell'], - ['^(\\s*)(#)(\\s*\\w+)', - ['meta.preprocessor.c', - 'punctuation.definition.preprocessor.c', - 'meta.preprocessor.c']], - ['\\{-#', 'meta.preprocessor.haskell', '@pragma'], - ['"', 'punctuation.definition.string.begin.haskell', '@stringx'], - ['(\')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(\')', - ['punctuation.definition.string.begin.haskell', - 'string.quoted.single.haskell', - 'constant.character.escape.haskell', - 'constant.character.escape.octal.haskell', - 'constant.character.escape.hexadecimal.haskell', - 'constant.character.escape.control.haskell', - 'punctuation.definition.string.end.haskell']], - ['^(\\s*)([a-z_][a-zA-Z0-9_\']*|\\([|!%$+\\-.,=]+\\))(\\s*)(::)', - [{ token: 'meta.function.type-declaration.haskell' }, - { token: 'entity.name.function.haskell' }, - { token: 'meta.function.type-declaration.haskell' }, - { token: 'keyword.other.double-colon.haskell', next: '@function_' } - ], - ], - ['\\b(?:Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b', - 'support.constant.haskell'], - ['\\b[A-Z]\\w*\\b', 'constructor'], - [/[a-z][a-zA-Z0-9_\']*/, 'name'], - { include: '@comment' }, - ['\\b(?:abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b', - 'support.function.prelude.haskell'], - { include: '@infix_op' }, - ['[|!%$?~+:\\-.=\\\\]+', 'keyword.operator.haskell'], - [',', 'punctuation.separator.comma.haskell'], - ['(?:deriving|where|data|type|case|of|let|in|newtype|default)', - 'keyword.other.haskell'], - ], - - class_: [ - ['\\bwhere\\b', 'keyword.other.haskell', '@pop'], - ['\\b(?:Monad|Functor|Eq|Ord|Read|Show|Num|(?:Frac|Ra)tional|Enum|Bounded|Real(?:Frac|Float)?|Integral|Floating)\\b', - 'support.class.prelude.haskell'], - ['[A-Z][A-Za-z_\']*', 'entity.other.inherited-class.haskell'], - ['\\b[a-z][a-zA-Z0-9_\']*\\b', - 'variable.other.generic-type.haskell'], - // default token - ['.', 'keyword'] - ], - instance: [ - ['\\bwhere\\b|$', 'keyword.other.haskell', '@pop'], - { include: '@type_signature' }, - ], - import_: [ - // this regex is slightly broken - [/^|;|$/, 'meta.import.haskell', '@pop'], - ['qualified|as|hiding', 'keyword.other.haskell'], - { include: '@module_name' }, - { include: '@module_exports' }, - ], - deriving: [ - ['\\)', 'meta.deriving.haskell', '@pop'], - ['\\b[A-Z][a-zA-Z_\']*', - 'entity.other.inherited-class.haskell'], - ], - block_comment: [ - ['\\{-(?!#)', 'comment', '@push'], - ['-\\}', 'comment', '@pop'], - // default token - ['.', 'comment'], - ], - comment: - [['--.*', 'comment'], - ['\\{-(?!#)', 'comment', '@block_comment'], - ], - infix_op: - [[/([|!%$+:\-.=]+)|(,+)/, - 'entity.name.function.infix.haskell']], - module_def: [ - ['\\bwhere\\b', 'keyword.other.haskell', '@pop'], - { include: '@module_name' }, - { include: '@module_exports' }, - ['[a-z]+', 'invalid'], - ], - module_exports: - [['\\(', 'meta.declaration.exports.haskell', '@push'], - ['\\)', 'meta.declaration.exports.haskell.end', '@pop'], - ['\\b[a-z][a-zA-Z_\']*', 'entity.name.function.haskell'], - ['\\b[A-Z][A-Za-z_\']*', 'storage.type.haskell'], - [',', 'punctuation.separator.comma.haskell'], - { include: '@infix_op' }, - ['\\(.*?\\)', 'meta.other.unknown.haskell'], - ], - module_name: - [['[A-Z][A-Za-z._\']*', 'support.other.module.haskell']], - function_: [ - ['^', 'meta.function.type-declaration.haskell', '@pop'], - { include: '@type_signature' }, - ], - stringx: - [['"', 'punctuation.definition.string.end.haskell', '@pop'], - ['\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&])', - 'constant.character.escape.haskell'], - ['\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+', - 'constant.character.escape.octal.haskell'], - ['\\^[A-Z@\\[\\]\\\\\\^_]', - 'constant.character.escape.control.haskell'], - // default token - ['.', 'string.quoted.double.haskell'] - ], - pragma: [ - ['#-\\}', 'meta.preprocessor.haskell', '@pop'], - ['\\b(?:LANGUAGE|UNPACK|INLINE)\\b', 'keyword.other.preprocessor.haskell'], - // default token - ['.', 'keyword.other.preprocessor.haskell'] - ], - type_signature: [ - ['(\\(\\s*)([A-Z][A-Za-z]*)(\\s+)([a-z][A-Za-z_\']*)(\\)\\s*)(=>)', - ['meta.class-constraint.haskell', - 'entity.other.inherited-class.haskell', - 'meta.class-constraint.haskell', - 'variable.other.generic-type.haskell', - 'meta.class-constraint.haskell', - 'keyword.other.big-arrow.haskell']], - ['\\{-#', 'meta.preprocessor.haskell', '@pragma'], - ['->', 'keyword.other.arrow.haskell'], - ['=>', 'keyword.other.big-arrow.haskell'], - ['\\b(?:Int(?:eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(?:Error)?) \\b', - 'support.type.prelude.haskell'], - ['\\b[a-z][a-zA-Z0-9_\']*\\b', - 'variable.other.generic-type.haskell'], - ['\\b[A-Z][a-zA-Z0-9_\']*\\b', 'storage.type.haskell'], - ['\\(\\)', 'support.constant.unit.haskell'], - { include: '@comment' } - ] - }, - }; -} -const purple = "#832DC4"; -const orange = "#EB4A22"; -const darkGreen = "#007600"; -const lightGreen = "#2CBB69"; -const blue = "#1746A0"; -const red = "#EB2256"; -const grey = "#AAAAAA" -const black = "#000000"; - -exports.haskellDaylightTheme_ = { - base: 'vs', - inherit: true, - rules: [ - // { token: '', foreground: red, background: 'fffffe' }, - // normal stuff - { token: "comment", foreground: grey }, - { token: "constant.numeric", foreground: purple }, - { token: "string", foreground: orange }, - { token: "punctuation.definition.string.begin.haskell", foreground: orange }, - { token: "punctuation.definition.string.end.haskell", foreground: orange }, - { token: "constructor", foreground: blue }, - { token: "variable.other.generic-type.haskell", foreground: blue }, - { token: "keyword", foreground: purple }, - // type signatures - { token: "storage.type.haskell", foreground: lightGreen }, - { token: "entity.name.function.haskell", foreground: black}, - { token: "meta.function.type-declaration.haskell", foreground: lightGreen}, - { token: "keyword.other.double-colon.haskell", foreground: lightGreen}, - { token: "support.constant.unit.haskell", foreground: lightGreen}, - - { token: "support.constant.haskell", foreground: blue }, - ], -} diff --git a/web-common/src/Language/Haskell/Monaco.purs b/web-common/src/Language/Haskell/Monaco.purs deleted file mode 100644 index 1347fcbd69..0000000000 --- a/web-common/src/Language/Haskell/Monaco.purs +++ /dev/null @@ -1,42 +0,0 @@ -module Language.Haskell.Monaco where - -import Prelude -import Data.Maybe (Maybe(..)) -import Data.Traversable (traverse) -import Effect (Effect) -import Effect.Class (class MonadEffect, liftEffect) -import Effect.Uncurried (EffectFn1, runEffectFn1) -import Halogen (RefLabel(..)) -import Halogen.Monaco (Settings) -import Monaco (Editor, IStandaloneThemeData, LanguageExtensionPoint(..), MonarchLanguage, Theme) - -foreign import monarchTokensProvider_ :: EffectFn1 Unit MonarchLanguage - -foreign import haskellDaylightTheme_ :: IStandaloneThemeData - -monarchTokensProvider :: Effect MonarchLanguage -monarchTokensProvider = runEffectFn1 monarchTokensProvider_ unit - -languageExtensionPoint :: LanguageExtensionPoint -languageExtensionPoint = LanguageExtensionPoint { id: "haskell" } - -daylightTheme :: Theme -daylightTheme = { name: "haskell-daylight", themeData: haskellDaylightTheme_ } - -refLabel :: RefLabel -refLabel = RefLabel "haskellEditor" - -settings :: forall m. MonadEffect m => (Editor -> m Unit) -> Settings m -settings setup = - { languageExtensionPoint - , theme: Just daylightTheme - , monarchTokensProvider: traverse liftEffect $ Just monarchTokensProvider - , tokensProvider: pure Nothing - , hoverProvider: pure Nothing - , completionItemProvider: pure Nothing - , codeActionProvider: pure Nothing - , documentFormattingEditProvider: pure Nothing - , refLabel - , owner: "haskellEditor" - , setup - } diff --git a/web-common/src/LocalStorage.js b/web-common/src/LocalStorage.js deleted file mode 100644 index 56b8e9a0fa..0000000000 --- a/web-common/src/LocalStorage.js +++ /dev/null @@ -1,49 +0,0 @@ -/*eslint-env node*/ -/*global exports*/ -'use strict'; - -exports._setItem = function (key, value) { - window.localStorage.setItem(key, value); -}; - -exports._removeItem = function (key) { - window.localStorage.removeItem(key); -}; - -exports._getItem = function (key) { - return window.localStorage.getItem(key); -}; - -exports._listen = function (toRawStorageEvent, callback) { - var onStorageEvent = function(event) { - if (event.storageArea === window.localStorage) { - var rawStorageEvent = toRawStorageEvent(event.key, event.oldValue, event.newValue); - return callback(rawStorageEvent)(); - } else { - return null; - }; - }; - - var canceler = function (error) { - return function () { - window.removeEventListener('storage', onStorageEvent, false); - }; - }; - - window.addEventListener('storage', onStorageEvent, false); - return canceler; -}; - -exports._getItems = function (toRawStorageEvent) { - var events = []; - var i; - - for (i = 0; i < window.localStorage.length; i++) { - var key = window.localStorage.key(i); - var value = window.localStorage.getItem(key); - var rawStorageEvent = toRawStorageEvent(key, null, value); - events.push(rawStorageEvent); - } - - return events; -}; diff --git a/web-common/src/LocalStorage.purs b/web-common/src/LocalStorage.purs deleted file mode 100644 index 46b9063ed7..0000000000 --- a/web-common/src/LocalStorage.purs +++ /dev/null @@ -1,94 +0,0 @@ -module LocalStorage - ( setItem - , removeItem - , getItem - , listen - , getItems - , Key(Key) - , RawStorageEvent - ) where - -import Prelude -import Control.Coroutine (Producer, producer) -import Data.Either (Either(..)) -import Data.Function.Uncurried (Fn3, mkFn3) -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Maybe (Maybe) -import Data.Newtype (class Newtype) -import Data.Nullable (Nullable, toMaybe) -import Effect (Effect) -import Effect.Aff (Aff, Canceler, effectCanceler, makeAff) -import Effect.Uncurried (EffectFn1, EffectFn2, runEffectFn1, runEffectFn2) - -newtype Key - = Key String - -derive instance genericKey :: Generic Key _ - -derive instance newtypeKey :: Newtype Key _ - -instance semigroupKey :: Semigroup Key where - append (Key a) (Key b) = Key (append a b) - -instance showKey :: Show Key where - show = genericShow - -newtype RawStorageEvent - = RawStorageEvent - { key :: Maybe Key - , oldValue :: Maybe String - , newValue :: Maybe String - } - -derive instance genericRawStorageEvent :: Generic RawStorageEvent _ - -derive instance newtypeRawStorageEvent :: Newtype RawStorageEvent _ - -instance showRawStorageEvent :: Show RawStorageEvent where - show = genericShow - -toEvent :: Nullable String -> Nullable String -> Nullable String -> RawStorageEvent -toEvent key oldValue newValue = - RawStorageEvent - { key: Key <$> toMaybe key - , oldValue: toMaybe oldValue - , newValue: toMaybe newValue - } - ------------------------------------------------------------- -foreign import _setItem :: EffectFn2 Key String Unit - -foreign import _removeItem :: EffectFn1 Key Unit - -foreign import _getItem :: EffectFn1 Key (Nullable String) - -foreign import _listen :: - EffectFn2 - (Fn3 (Nullable String) (Nullable String) (Nullable String) RawStorageEvent) - (RawStorageEvent -> Effect Unit) - (EffectFn1 Unit Unit) - -foreign import _getItems :: - EffectFn1 - (Fn3 (Nullable String) (Nullable String) (Nullable String) RawStorageEvent) - (Array RawStorageEvent) - -setItem :: Key -> String -> Effect Unit -setItem = runEffectFn2 _setItem - -removeItem :: Key -> Effect Unit -removeItem = runEffectFn1 _removeItem - -getItem :: Key -> Effect (Maybe String) -getItem = map toMaybe <$> runEffectFn1 _getItem - -listen :: Producer RawStorageEvent Aff Unit -listen = - producer - $ makeAff \callback -> do - canceller <- runEffectFn2 _listen (mkFn3 toEvent) (callback <<< Right <<< Left) - pure $ effectCanceler $ runEffectFn1 canceller unit - -getItems :: Effect (Array RawStorageEvent) -getItems = runEffectFn1 _getItems (mkFn3 toEvent) diff --git a/web-common/src/Monaco.js b/web-common/src/Monaco.js deleted file mode 100644 index 5cd022315e..0000000000 --- a/web-common/src/Monaco.js +++ /dev/null @@ -1,195 +0,0 @@ -/*eslint-env node*/ -/*global exports global*/ - -'use strict'; - -exports.isWarning_ = function (severity) { - return severity == 4; -} - -exports.isError_ = function (severity) { - return severity == 8; -} - -exports.getMonaco = function () { - return global.monaco; -} - -exports.registerLanguage_ = function (monaco, language) { - monaco.languages.register(language); -} - -exports.defineTheme_ = function (monaco, theme) { - monaco.editor.defineTheme(theme.name, theme.themeData); -} - -exports.setMonarchTokensProvider_ = function (monaco, languageId, languageDef) { - return monaco.languages.setMonarchTokensProvider(languageId, languageDef); -} - -exports.setModelMarkers_ = function (monaco, model, owner, markers) { - monaco.editor.setModelMarkers(model, owner, markers); -} - -exports.getModelMarkers_ = function (monaco, model) { - return monaco.editor.getModelMarkers({ resource: model.uri }); -} - -exports.create_ = function (monaco, nodeId, languageId) { - const editor = monaco.editor.create(nodeId, { - language: languageId, - minimap: { - enabled: false - } - }); - - window.addEventListener('resize', function () { - editor.layout(); - }); - - return editor; -} - -exports.setTheme_ = function (monaco, themeName) { - monaco.editor.setTheme(themeName); -} - -exports.onDidChangeContent_ = function (editor, handler) { - editor.getModel().onDidChangeContent(function (event) { - handler(event)(); - }); -} - -exports.addExtraTypeScriptLibsJS_ = function (monaco) { - global.monacoExtraTypeScriptLibs.forEach(function ([dts, dtsFilename]) { - monaco.languages.typescript.typescriptDefaults.addExtraLib(dts, dtsFilename); - }); -} - -exports.setStrictNullChecks_ = function (monaco, bool) { - var compilerOptions = monaco.languages.typescript.typescriptDefaults.getCompilerOptions(); - compilerOptions['strictNullChecks'] = bool; - monaco.languages.typescript.typescriptDefaults.setCompilerOptions(compilerOptions); -} - -exports.getDecorationRange_ = function (editor, identifier) { - return editor.getDecorationRange(identifier); -} - -exports.setDeltaDecorations_ = function (editor, oldDecorations, newDecorations) { - return editor.deltaDecorations(oldDecorations, newDecorations); -} - -exports.getModel_ = function (editor) { - return editor.getModel(); -} - -exports.getEditorId_ = function(editor) { - return editor.getId(); -} - -exports.getValue_ = function (model) { - return model.getValue(); -} - -exports.setValue_ = function (model, value) { - return model.setValue(value); -} - -exports.getLineCount_ = function (model) { - return model.getLineCount(); -} - -exports.setTokensProvider_ = function (monaco, languageId, provider) { - return monaco.languages.setTokensProvider(languageId, provider); -} - -exports.completionItemKind_ = function (name) { - return monaco.languages.CompletionItemKind[name]; -} - -exports.markerSeverity_ = function (name) { - return monaco.MarkerSeverity[name]; -} - -exports.registerHoverProvider_ = function (monaco, languageId, provider) { - return monaco.languages.registerHoverProvider(languageId, provider); -} - -exports.registerCompletionItemProvider_ = function (monaco, languageId, provider) { - return monaco.languages.registerCompletionItemProvider(languageId, provider); -} - -exports.registerCodeActionProvider_ = function (monaco, languageId, actionProvider) { - return monaco.languages.registerCodeActionProvider(languageId, actionProvider); -} - -exports.registerDocumentFormattingEditProvider_ = function (monaco, languageId, formatter) { - return monaco.languages.registerDocumentFormattingEditProvider(languageId, formatter); -} - -exports.setPosition_ = function (editor, position) { - editor.setPosition(position); -} - -exports.revealRange_ = function (editor, range) { - editor.revealRange(range); -} - -exports.revealRangeInCenter_ = function (editor, range) { - editor.revealRangeInCenter(range); -} - -exports.revealRangeAtTop_ = function (editor, range) { - editor.revealRangeAtTop(range); -} - -exports.revealRangeNearTop_ = function (editor, range) { - editor.revealRangeNearTop(range); -} - -exports.revealLine_ = function (editor, lineNumber) { - editor.revealLine(lineNumber); -} - -exports.layout_ = function (editor) { - editor.layout(); -} - -exports.focus_ = function (editor) { - editor.focus(); -} - -exports.enableVimBindings_ = function (editor) { - var statusNode = document.getElementById('statusline'); - var vimMode = global.initVimMode(editor, statusNode); - return (() => vimMode.dispose()); -} - -exports.enableEmacsBindings_ = function (editor) { - var emacsMode = new global.EmacsExtension(editor); - emacsMode.start(); - return (() => emacsMode.dispose()); -} - -exports.completionItemKindEq_ = function (a, b) { - return a == b; -} - -exports.completionItemKindOrd_ = function (lt, eq, gt, a, b) { - if (a < b) { - return lt; - } else if (a == b) { - return eq; - } else { - return gt; - } -} - -exports.setReadOnly_ = function (editor, val) { - editor.updateOptions({ readOnly: val }) -} - -exports.dispose_ = function (disposable) { - disposable.dispose(); -} diff --git a/web-common/src/Monaco.purs b/web-common/src/Monaco.purs deleted file mode 100644 index 08849b6139..0000000000 --- a/web-common/src/Monaco.purs +++ /dev/null @@ -1,414 +0,0 @@ -module Monaco where - -import Prelude -import Data.Function.Uncurried (Fn1, Fn2, Fn5, runFn1, runFn2, runFn5) -import Data.Generic.Rep (class Generic) -import Data.Lens (Lens') -import Data.Lens.Iso.Newtype (_Newtype) -import Data.Lens.Record (prop) -import Data.Maybe (Maybe(..)) -import Data.Newtype (class Newtype) -import Data.Nullable (Nullable, toMaybe) -import Data.String.Regex (Regex) -import Data.Symbol (SProxy(..)) -import Data.Tuple (Tuple) -import Effect (Effect) -import Effect.Uncurried (EffectFn1, EffectFn2, EffectFn3, EffectFn4, runEffectFn1, runEffectFn2, runEffectFn3, runEffectFn4) -import Foreign (unsafeFromForeign, unsafeToForeign) -import Foreign.Generic (class Decode, class Encode, Foreign, SumEncoding(..), defaultOptions, encode, genericEncode) -import Foreign.Object (Object) -import Foreign.Object as Object -import Web.HTML (HTMLElement) - -newtype LanguageExtensionPoint - = LanguageExtensionPoint { id :: String } - -_id :: Lens' LanguageExtensionPoint String -_id = _Newtype <<< prop (SProxy :: SProxy "id") - -derive instance newtypeLanguageExtensionPoint :: Newtype LanguageExtensionPoint _ - -derive instance genericLanguageExtensionPoint :: Generic LanguageExtensionPoint _ - -derive newtype instance encodeLanguageExtensionPoint :: Encode LanguageExtensionPoint - -newtype MonarchLanguageBracket - = MonarchLanguageBracket { close :: String, open :: String, token :: String } - -derive instance newtypeMonarchLanguageBracket :: Newtype MonarchLanguageBracket _ - -derive instance genericMonarchLanguageBracket :: Generic MonarchLanguageBracket _ - -derive newtype instance encodeMonarchLanguageBracket :: Encode MonarchLanguageBracket - -data Action - = Action { token :: String, next :: Maybe String, log :: Maybe String } - | Cases { cases :: (Object String), log :: Maybe String } - -derive instance genericAction :: Generic Action _ - -instance encodeAction :: Encode Action where - encode a = - let - sumEncoding = - TaggedObject - { tagFieldName: "tag" - , contentsFieldName: "contents" - , constructorTagTransform: identity - , unwrapRecords: true - } - in - genericEncode (defaultOptions { sumEncoding = sumEncoding }) a - -newtype LanguageRule - = LanguageRule { regex :: Regex, action :: Action } - -derive instance newtypeLanguageRule :: Newtype LanguageRule _ - -derive instance genericLanguageRule :: Generic LanguageRule _ - -instance encodeLanguageRule :: Encode LanguageRule where - encode (LanguageRule r) = encode { regex: unsafeToForeign r.regex, action: r.action } - -simpleRule :: Regex -> String -> LanguageRule -simpleRule regex token = LanguageRule { regex, action: Action { token, next: Nothing, log: Nothing } } - -simpleRuleWithLog :: Regex -> String -> String -> LanguageRule -simpleRuleWithLog regex token msg = LanguageRule { regex, action: Action { token, next: Nothing, log: Just msg } } - -simpleRuleWithAction :: Regex -> String -> String -> LanguageRule -simpleRuleWithAction regex token next = LanguageRule { regex, action: Action { token, next: Just next, log: Nothing } } - -simpleRuleCases :: Regex -> Array (Tuple String String) -> LanguageRule -simpleRuleCases regex cases = LanguageRule { regex, action: Cases { log: Nothing, cases: (Object.fromFoldable cases) } } - -simpleRuleCasesWithLog :: Regex -> String -> Array (Tuple String String) -> LanguageRule -simpleRuleCasesWithLog regex msg cases = LanguageRule { regex, action: Cases { log: Just msg, cases: (Object.fromFoldable cases) } } - -foreign import data MonarchLanguage :: Type - -foreign import data HoverProvider :: Type - -foreign import data CompletionItemProvider :: Type - -foreign import data CodeActionProvider :: Type - -foreign import data IStandaloneThemeData :: Type - -foreign import data DocumentFormattingEditProvider :: Type - -foreign import data Monaco :: Type - -foreign import data Editor :: Type - -foreign import data ITextModel :: Type - -foreign import data ITextMarker :: Type - -foreign import data CompletionItemKind :: Type - -foreign import data IDisposable :: Type - -foreign import completionItemKindEq_ :: Fn2 CompletionItemKind CompletionItemKind Boolean - -instance eqCompletionItemKind :: Eq CompletionItemKind where - eq = runFn2 completionItemKindEq_ - -foreign import completionItemKindOrd_ :: Fn5 Ordering Ordering Ordering CompletionItemKind CompletionItemKind Ordering - -instance ordCompletionItemKind :: Ord CompletionItemKind where - compare = runFn5 completionItemKindOrd_ LT EQ GT - -foreign import data MarkerSeverity :: Type - -instance encodeMarkerSeverity :: Encode MarkerSeverity where - encode = encode <<< unsafeToForeign - -instance decodeMarkerSeverity :: Decode MarkerSeverity where - decode = pure <<< unsafeFromForeign - -foreign import data TokensProvider :: Type - -foreign import data Uri :: Type - -instance encodeUri :: Encode Uri where - encode = encode <<< unsafeToForeign - -instance decodeUri :: Decode Uri where - decode = pure <<< unsafeFromForeign - -type IMarkdownString - = { value :: String - } - -type IRange - = { startLineNumber :: Int - , startColumn :: Int - , endLineNumber :: Int - , endColumn :: Int - } - -type CompletionItem - = { label :: String - , kind :: CompletionItemKind - , insertText :: String - , range :: IRange - , filterText :: String - , sortText :: String - , preselect :: Boolean - } - -type Marker r - = ( severity :: MarkerSeverity - , message :: String - , startLineNumber :: Int - , startColumn :: Int - , endLineNumber :: Int - , endColumn :: Int - , code :: String - , source :: String - | r - ) - -type IMarkerData - = Record (Marker ()) - -getRange :: IMarkerData -> IRange -getRange { startLineNumber, startColumn, endLineNumber, endColumn } = { startLineNumber, startColumn, endLineNumber, endColumn } - -type IMarker - = Record (Marker ( owner :: String, resource :: Uri )) - -type IPosition - = { column :: Int - , lineNumber :: Int - } - -type TextEdit - = { range :: IRange - , text :: String - } - -type WorkspaceTextEdit - = { resource :: Uri - , edit :: TextEdit - } - -type WorkspaceEdit - = { edits :: Array WorkspaceTextEdit - } - -type CodeAction - = { title :: String - , edit :: WorkspaceEdit - , kind :: String - } - -type Theme - = { name :: String, themeData :: IStandaloneThemeData } - -type IModelDeltaDecoration - = { range :: IRange, options :: IModelDecorationOptions } - --- This is a trimmed down version of https://github.com/microsoft/monaco-editor/blob/08dd4fad2bd41dcdac8bbdc3c08cc21578144d45/typedoc/monaco.d.ts#L1382 --- PS type system is too strict to represent this data structure without help, eventually we could use something like --- https://github.com/natefaubion/purescript-convertable-options to model this correctly, for now, only the needed --- properties are modeled. -type IModelDecorationOptions - = { isWholeLine :: Boolean, className :: String, linesDecorationsClassName :: String } - -foreign import isWarning_ :: Fn1 MarkerSeverity Boolean - -foreign import isError_ :: Fn1 MarkerSeverity Boolean - -foreign import getMonaco :: Effect Monaco - -foreign import create_ :: EffectFn3 Monaco HTMLElement String Editor - -foreign import setTheme_ :: EffectFn2 Monaco String Unit - -foreign import onDidChangeContent_ :: forall a. EffectFn2 Editor ({} -> Effect a) Unit - -foreign import registerLanguage_ :: EffectFn2 Monaco Foreign Unit - -foreign import defineTheme_ :: EffectFn2 Monaco Theme Unit - -foreign import setMonarchTokensProvider_ :: EffectFn3 Monaco String MonarchLanguage IDisposable - -foreign import setModelMarkers_ :: EffectFn4 Monaco ITextModel String (Array IMarkerData) Unit - -foreign import getModelMarkers_ :: EffectFn2 Monaco ITextModel (Array IMarker) - -foreign import addExtraTypeScriptLibsJS_ :: EffectFn1 Monaco Unit - -foreign import getDecorationRange_ :: EffectFn2 ITextModel String (Nullable IRange) - -foreign import setStrictNullChecks_ :: EffectFn2 Monaco Boolean Unit - -foreign import setDeltaDecorations_ :: EffectFn3 Editor (Array String) (Array IModelDeltaDecoration) (Array String) - -foreign import getModel_ :: EffectFn1 Editor ITextModel - -foreign import getEditorId_ :: Fn1 Editor String - -foreign import getValue_ :: Fn1 ITextModel String - -foreign import setValue_ :: EffectFn2 ITextModel String Unit - -foreign import getLineCount_ :: Fn1 ITextModel Int - -foreign import setTokensProvider_ :: EffectFn3 Monaco String TokensProvider IDisposable - -foreign import completionItemKind_ :: Fn1 String CompletionItemKind - -foreign import markerSeverity_ :: Fn1 String MarkerSeverity - -foreign import registerHoverProvider_ :: EffectFn3 Monaco String HoverProvider IDisposable - -foreign import registerCompletionItemProvider_ :: EffectFn3 Monaco String CompletionItemProvider IDisposable - -foreign import registerCodeActionProvider_ :: EffectFn3 Monaco String CodeActionProvider IDisposable - -foreign import registerDocumentFormattingEditProvider_ :: EffectFn3 Monaco String DocumentFormattingEditProvider IDisposable - -foreign import setPosition_ :: EffectFn2 Editor IPosition Unit - -foreign import revealRange_ :: EffectFn2 Editor IRange Unit - -foreign import revealRangeInCenter_ :: EffectFn2 Editor IRange Unit - -foreign import revealRangeAtTop_ :: EffectFn2 Editor IRange Unit - -foreign import revealRangeNearTop_ :: EffectFn2 Editor IRange Unit - -foreign import revealLine_ :: EffectFn2 Editor Int Unit - -foreign import layout_ :: EffectFn1 Editor Unit - -foreign import focus_ :: EffectFn1 Editor Unit - -foreign import enableVimBindings_ :: EffectFn1 Editor (Effect Unit) - -foreign import enableEmacsBindings_ :: EffectFn1 Editor (Effect Unit) - -foreign import setReadOnly_ :: EffectFn2 Editor Boolean Unit - -foreign import dispose_ :: EffectFn1 IDisposable Unit - -markerSeverity :: String -> MarkerSeverity -markerSeverity = runFn1 markerSeverity_ - -isWarning :: MarkerSeverity -> Boolean -isWarning = runFn1 isWarning_ - -isError :: MarkerSeverity -> Boolean -isError = runFn1 isError_ - -completionItemKind :: String -> CompletionItemKind -completionItemKind = runFn1 completionItemKind_ - -create :: Monaco -> HTMLElement -> String -> Effect Editor -create = runEffectFn3 create_ - -setTheme :: Monaco -> String -> Effect Unit -setTheme monaco themeName = runEffectFn2 setTheme_ monaco themeName - -onDidChangeContent :: forall a. Editor -> ({} -> Effect a) -> Effect Unit -onDidChangeContent = runEffectFn2 onDidChangeContent_ - -registerLanguage :: Monaco -> LanguageExtensionPoint -> Effect Unit -registerLanguage monaco language = - let - languageF = encode language - in - runEffectFn2 registerLanguage_ monaco languageF - -defineTheme :: Monaco -> Theme -> Effect Unit -defineTheme = runEffectFn2 defineTheme_ - -setMonarchTokensProvider :: Monaco -> String -> MonarchLanguage -> Effect IDisposable -setMonarchTokensProvider = runEffectFn3 setMonarchTokensProvider_ - -addExtraTypeScriptLibsJS :: Monaco -> Effect Unit -addExtraTypeScriptLibsJS = runEffectFn1 addExtraTypeScriptLibsJS_ - -setStrictNullChecks :: Monaco -> Boolean -> Effect Unit -setStrictNullChecks = runEffectFn2 setStrictNullChecks_ - -getDecorationRange :: ITextModel -> String -> Effect (Maybe IRange) -getDecorationRange model id = toMaybe <$> runEffectFn2 getDecorationRange_ model id - -setDeltaDecorations :: Editor -> Array String -> Array IModelDeltaDecoration -> Effect (Array String) -setDeltaDecorations = runEffectFn3 setDeltaDecorations_ - -getModel :: Editor -> Effect ITextModel -getModel = runEffectFn1 getModel_ - -getEditorId :: Editor -> String -getEditorId = runFn1 getEditorId_ - -getValue :: ITextModel -> String -getValue = runFn1 getValue_ - -setValue :: ITextModel -> String -> Effect Unit -setValue = runEffectFn2 setValue_ - -getLineCount :: ITextModel -> Int -getLineCount = runFn1 getLineCount_ - -setModelMarkers :: Monaco -> ITextModel -> String -> Array IMarkerData -> Effect Unit -setModelMarkers = runEffectFn4 setModelMarkers_ - -getModelMarkers :: Monaco -> ITextModel -> Effect (Array IMarker) -getModelMarkers = runEffectFn2 getModelMarkers_ - -setTokensProvider :: Monaco -> String -> TokensProvider -> Effect IDisposable -setTokensProvider = runEffectFn3 setTokensProvider_ - -registerHoverProvider :: Monaco -> String -> HoverProvider -> Effect IDisposable -registerHoverProvider = runEffectFn3 registerHoverProvider_ - -registerCompletionItemProvider :: Monaco -> String -> CompletionItemProvider -> Effect IDisposable -registerCompletionItemProvider = runEffectFn3 registerCompletionItemProvider_ - -registerCodeActionProvider :: Monaco -> String -> CodeActionProvider -> Effect IDisposable -registerCodeActionProvider = runEffectFn3 registerCodeActionProvider_ - -registerDocumentFormattingEditProvider :: Monaco -> String -> DocumentFormattingEditProvider -> Effect IDisposable -registerDocumentFormattingEditProvider = runEffectFn3 registerDocumentFormattingEditProvider_ - -setPosition :: Editor -> IPosition -> Effect Unit -setPosition = runEffectFn2 setPosition_ - -revealRange :: Editor -> IRange -> Effect Unit -revealRange = runEffectFn2 revealRange_ - -revealRangeInCenter :: Editor -> IRange -> Effect Unit -revealRangeInCenter = runEffectFn2 revealRangeInCenter_ - -revealRangeAtTop :: Editor -> IRange -> Effect Unit -revealRangeAtTop = runEffectFn2 revealRangeAtTop_ - -revealRangeNearTop :: Editor -> IRange -> Effect Unit -revealRangeNearTop = runEffectFn2 revealRangeNearTop_ - -revealLine :: Editor -> Int -> Effect Unit -revealLine = runEffectFn2 revealLine_ - -layout :: Editor -> Effect Unit -layout = runEffectFn1 layout_ - -focus :: Editor -> Effect Unit -focus = runEffectFn1 focus_ - -enableVimBindings :: Editor -> Effect (Effect Unit) -enableVimBindings = runEffectFn1 enableVimBindings_ - -enableEmacsBindings :: Editor -> Effect (Effect Unit) -enableEmacsBindings = runEffectFn1 enableEmacsBindings_ - -setReadOnly :: Editor -> Boolean -> Effect Unit -setReadOnly = runEffectFn2 setReadOnly_ - -dispose :: IDisposable -> Effect Unit -dispose = runEffectFn1 dispose_ diff --git a/web-common/src/Plutus/V1/Ledger/Time.purs b/web-common/src/Plutus/V1/Ledger/Time.purs deleted file mode 100644 index 105e8db22b..0000000000 --- a/web-common/src/Plutus/V1/Ledger/Time.purs +++ /dev/null @@ -1,39 +0,0 @@ --- As 'POSIXTime' from 'Plutus.V1.Ledger.Time' has a custom 'FromJSON' and 'ToJSON' --- instances, we declare the corresponding 'POSIXTime' PureScript type here since --- the PSGenerator Generic instances won't match. -module Plutus.V1.Ledger.Time where - -import Data.BigInteger (BigInteger, readBigInteger) -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Lens (Iso') -import Data.Lens.Iso.Newtype (_Newtype) -import Data.Newtype (class Newtype) -import Foreign.Class (class Decode, class Encode, encode) -import Prelude - -newtype POSIXTime - = POSIXTime - { getPOSIXTime :: BigInteger - } - -derive instance eqPOSIXTime :: Eq POSIXTime - -instance showPOSIXTime :: Show POSIXTime where - show x = genericShow x - -instance encodePOSIXTime :: Encode POSIXTime where - encode (POSIXTime { getPOSIXTime: value }) = encode value - -instance decodePOSIXTime :: Decode POSIXTime where - decode value = (\v -> POSIXTime { getPOSIXTime: v }) <$> readBigInteger value - -derive instance genericPOSIXTime :: Generic POSIXTime _ - -derive instance newtypePOSIXTime :: Newtype POSIXTime _ - --------------------------------------------------------------------------------- -_POSIXTime :: Iso' POSIXTime { getPOSIXTime :: BigInteger } -_POSIXTime = _Newtype - --------------------------------------------------------------------------------- diff --git a/web-common/src/PlutusTx/AssocMap.purs b/web-common/src/PlutusTx/AssocMap.purs deleted file mode 100644 index 7df35502bf..0000000000 --- a/web-common/src/PlutusTx/AssocMap.purs +++ /dev/null @@ -1,132 +0,0 @@ -module PlutusTx.AssocMap where - -import Prelude -import AjaxUtils (defaultJsonOptions) -import Data.Array as Array -import Data.Foldable (class Foldable, foldMap, foldl, foldr) -import Data.FoldableWithIndex (class FoldableWithIndex) -import Data.Function (on) -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (genericShow) -import Data.Json.JsonTuple (JsonTuple(..)) -import Data.Lens (Iso', lens, wander) -import Data.Lens.At (class At) -import Data.Lens.Index (class Index) -import Data.Lens.Iso.Newtype (_Newtype) -import Data.Map as Data.Map -import Data.Maybe (Maybe(..)) -import Data.Newtype (class Newtype, unwrap, wrap) -import Data.Newtype as Newtype -import Data.Set (Set) -import Data.Set as Set -import Data.Traversable (sequence) -import Data.Tuple (Tuple(..), fst, snd, uncurry) -import Foreign.Class (class Decode, class Encode) -import Foreign.Generic (genericDecode, genericEncode) - -newtype Map a b - = Map (Array (JsonTuple a b)) - -keys :: forall k v. Ord k => Map k v -> Set k -keys (Map entries) = Set.fromFoldable $ map (fst <<< unwrap) entries - -derive instance functorMap :: Functor (Map a) - -instance encodeMap :: (Encode a, Encode b) => Encode (Map a b) where - encode value = genericEncode defaultJsonOptions value - -instance decodeMap :: (Decode a, Decode b) => Decode (Map a b) where - decode value = genericDecode defaultJsonOptions value - -derive instance genericMap :: Generic (Map a b) _ - -derive instance newtypeMap :: Newtype (Map a b) _ - -instance eqMap :: (Ord k, Eq k, Eq v) => Eq (Map k v) where - eq = eq `on` (Data.Map.fromFoldable <<< map unwrap <<< unwrap) - --------------------------------------------------------------------------------- -_Map :: forall a b. Iso' (Map a b) (Array (JsonTuple a b)) -_Map = _Newtype - -instance showMap :: (Show k, Show v) => Show (Map k v) where - show x = genericShow x - -instance foldableMap :: Foldable (Map k) where - foldMap f = foldMap (f <<< snd) <<< toTuples - foldl f z = foldl (\b -> f b <<< snd) z <<< toTuples - foldr f z = foldr (\x b -> f (snd x) b) z <<< toTuples - -instance foldableWithIndexMap :: FoldableWithIndex k (Map k) where - foldMapWithIndex f = foldMap (uncurry f) <<< toTuples - foldlWithIndex f z = foldl (\acc (Tuple k v) -> f k acc v) z <<< toTuples - foldrWithIndex f z = foldr (\(Tuple k v) acc -> f k v acc) z <<< toTuples - -instance indexMap :: Eq k => Index (Map k a) k a where - ix key = - wander \f (Map values) -> - map Map - $ sequence - $ map - ( Newtype.traverse JsonTuple - ( \(Tuple k v) -> - Tuple k <$> (if k == key then f v else pure v) - ) - ) - values - -instance atMap :: Eq k => At (Map k a) k a where - at key = lens get set - where - matching (JsonTuple tuple) = fst tuple == key - - get (Map xs) = map (snd <<< unwrap) $ Array.find matching xs - - set (Map xs) Nothing = Map $ Array.filter (not matching) $ xs - - set (Map xs) (Just new) = - Map - $ case Array.findIndex matching xs of - Nothing -> Array.snoc xs (JsonTuple (Tuple key new)) - _ -> - map - ( Newtype.over JsonTuple - ( \(Tuple k v) -> - Tuple k (if k == key then new else v) - ) - ) - xs - -toTuples :: forall k v. Map k v -> Array (Tuple k v) -toTuples = map unwrap <<< unwrap - -fromTuples :: forall k v. Array (Tuple k v) -> Map k v -fromTuples = Map <<< map wrap - -null :: forall k v. Map k v -> Boolean -null = Array.null <<< unwrap - --- | Compute the union of two `AssocMaps`s, using the specified function to combine values for duplicate keys. --- Notes: --- --- * This function does not offer any guarantees about ordering. --- * `AssocMap`s may themselves contain duplicate keys, and so the --- same key may appear several times in *both* input `AssocMap`s. They --- too will be combined with the given function. Thus the --- resulting `AssocMap` will have unique keys. -unionWith :: forall k v. Ord k => (v -> v -> v) -> Map k v -> Map k v -> Map k v -unionWith f a b = - fromTuples - $ Data.Map.toUnfoldable - $ on (Data.Map.unionWith f) (Data.Map.fromFoldableWith f <<< toTuples) - a - b - -instance semigroupMap :: (Ord k, Semigroup v) => Semigroup (Map k v) where - append = unionWith append - -instance monoidMap :: (Ord k, Semigroup v) => Monoid (Map k v) where - mempty = Map mempty - -toDataMap :: forall k v. Ord k => Map k v -> Data.Map.Map k v -toDataMap (Map m) = Data.Map.fromFoldable (unwrap <$> m) diff --git a/web-common/src/PlutusTx/Ratio.purs b/web-common/src/PlutusTx/Ratio.purs deleted file mode 100644 index 587d751277..0000000000 --- a/web-common/src/PlutusTx/Ratio.purs +++ /dev/null @@ -1,61 +0,0 @@ --- Unfortunately PSGenerator can't handle 'PlutusTx.Ratio' data constructor ':%', --- so we are forced to create a mapping on PureScript side with custom 'Encode' and 'Decode' instances. -module PlutusTx.Ratio (Ratio(..), (%), reduce, numerator, denominator) where - -import Data.Ratio as R -import Foreign (F, ForeignError(..), fail) -import Foreign.Class (class Decode, class Encode, encode, decode) -import Prelude - -newtype Ratio a - = Ratio (R.Ratio a) - -instance showRatio :: (Show a) => Show (Ratio a) where - show (Ratio x) = show x - -instance eqRatio :: Eq a => Eq (Ratio a) where - eq (Ratio a) (Ratio b) = eq a b - -instance ordRatio :: (Ord a, EuclideanRing a) => Ord (Ratio a) where - compare (Ratio x) (Ratio y) = compare x y - -instance semiringRatio :: (Ord a, EuclideanRing a) => Semiring (Ratio a) where - one = Ratio one - mul (Ratio a) (Ratio b) = Ratio (mul a b) - zero = Ratio zero - add (Ratio a) (Ratio b) = Ratio (add a b) - -instance ringRatio :: (Ord a, EuclideanRing a) => Ring (Ratio a) where - sub (Ratio a) (Ratio b) = Ratio (sub a b) - -instance commutativeRingRatio :: (Ord a, EuclideanRing a) => CommutativeRing (Ratio a) - -instance euclideanRingRatio :: (Ord a, EuclideanRing a) => EuclideanRing (Ratio a) where - degree _ = 1 - div (Ratio a) (Ratio b) = Ratio (div a b) - mod _ _ = zero - -instance divisionRingRatio :: (Ord a, EuclideanRing a) => DivisionRing (Ratio a) where - recip (Ratio a) = Ratio (recip a) - -instance encodeRatio :: (Encode a) => Encode (Ratio a) where - encode (Ratio r) = encode [ R.numerator r, R.denominator r ] - -instance decodeRatio :: (EuclideanRing a, Ord a, Decode a) => Decode (Ratio a) where - decode value = do - xs <- (decode value :: F (Array a)) - case xs of - [ x, y ] -> do - pure $ reduce x y - _ -> fail $ ForeignError "Decoding a Ratio, expected to see an array with exactly 2 elements." - -numerator :: forall a. Ratio a -> a -numerator (Ratio r) = R.numerator r - -denominator :: forall a. Ratio a -> a -denominator (Ratio r) = R.denominator r - -reduce :: forall a. Ord a => EuclideanRing a => a -> a -> Ratio a -reduce n d = Ratio (R.reduce n d) - -infixl 7 reduce as % diff --git a/web-common/src/Prologue.purs b/web-common/src/Prologue.purs deleted file mode 100644 index 941e38c6f5..0000000000 --- a/web-common/src/Prologue.purs +++ /dev/null @@ -1,12 +0,0 @@ --- | A custom prelude that re-exports the most commonly implorted modules. -module Prologue - ( module Prelude - , module Data.Either - , module Data.Maybe - , module Data.Tuple - ) where - -import Prelude -import Data.Either (Either(..)) -import Data.Maybe (Maybe(..)) -import Data.Tuple (Tuple(..), fst, snd) diff --git a/web-common/src/SessionStorage.js b/web-common/src/SessionStorage.js deleted file mode 100644 index 9098b0c8e4..0000000000 --- a/web-common/src/SessionStorage.js +++ /dev/null @@ -1,7 +0,0 @@ -exports._setItem = function (key, value) { - window.sessionStorage.setItem(key, value); -}; - -exports._getItem = function (key) { - return window.sessionStorage.getItem(key); -}; diff --git a/web-common/src/SessionStorage.purs b/web-common/src/SessionStorage.purs deleted file mode 100644 index 1a46310fa1..0000000000 --- a/web-common/src/SessionStorage.purs +++ /dev/null @@ -1,18 +0,0 @@ -module SessionStorage where - -import Data.Maybe (Maybe) -import Data.Nullable (Nullable, toMaybe) -import Effect (Effect) -import Effect.Uncurried (EffectFn1, EffectFn2, runEffectFn1, runEffectFn2) -import Prelude -import LocalStorage (Key) - -foreign import _setItem :: EffectFn2 Key String Unit - -foreign import _getItem :: EffectFn1 Key (Nullable String) - -setItem :: Key -> String -> Effect Unit -setItem = runEffectFn2 _setItem - -getItem :: Key -> Effect (Maybe String) -getItem = map toMaybe <$> runEffectFn1 _getItem diff --git a/web-common/src/Web/DOM/ElementExtra.js b/web-common/src/Web/DOM/ElementExtra.js deleted file mode 100644 index 4ab39a4ad8..0000000000 --- a/web-common/src/Web/DOM/ElementExtra.js +++ /dev/null @@ -1,58 +0,0 @@ -exports._scrollTo = function (options) { - return function (element) { - return function () { - element.scrollTo(options); - }; - }; -}; - -exports._scrollIntoView = function (options) { - return function (element) { - return function () { - element.scrollIntoView(options); - }; - }; -}; - -exports.throttledOnScroll = function (waitWindow) { - return function (element) { - return function (cb) { - return function () { - let lastCall = 0; - const inner = function () { - window.requestAnimationFrame(function (currentTime) { - if (currentTime - lastCall > waitWindow) { - lastCall = currentTime; - cb({ left: element.scrollLeft, top: element.scrollTop })(); - } - }); - }; - element.addEventListener("scroll", inner); - return function () { - element.removeEventListener("scroll", inner); - }; - }; - }; - }; -}; - -exports.debouncedOnScroll = function (waitWindow) { - return function (element) { - return function (cb) { - return function () { - let timeoutId; - const inner = function () { - if (timeoutId) clearTimeout(timeoutId); - timeoutId = setTimeout(function () { - cb({ left: element.scrollLeft, top: element.scrollTop })(); - }, waitWindow); - }; - element.addEventListener("scroll", inner); - return function () { - if (timeoutId) clearTimeout(timeoutId); - element.removeEventListener("scroll", inner); - }; - }; - }; - }; -}; diff --git a/web-common/src/Web/DOM/ElementExtra.purs b/web-common/src/Web/DOM/ElementExtra.purs deleted file mode 100644 index edddce1322..0000000000 --- a/web-common/src/Web/DOM/ElementExtra.purs +++ /dev/null @@ -1,55 +0,0 @@ -module Web.Dom.ElementExtra - ( ScrollBehavior(..) - , Alignment(..) - , scrollTo - , scrollIntoView - , throttledOnScroll - , debouncedOnScroll - ) where - -import Prelude -import Effect (Effect) -import Web.DOM (Element) - -data ScrollBehavior - = Smooth - | Auto - -scrollBehaviorToFFI :: ScrollBehavior -> String -scrollBehaviorToFFI Smooth = "smooth" - -scrollBehaviorToFFI Auto = "auto" - -data Alignment - = Start - | Center - | End - | Nearest - -alignmentToFFI :: Alignment -> String -alignmentToFFI Start = "start" - -alignmentToFFI Center = "center" - -alignmentToFFI End = "end" - -alignmentToFFI Nearest = "nearest" - -foreign import _scrollTo :: { left :: Number, top :: Number, behavior :: String } -> Element -> Effect Unit - -scrollTo :: ScrollBehavior -> { left :: Number, top :: Number } -> Element -> Effect Unit -scrollTo behavior { left, top } = _scrollTo { left, top, behavior: scrollBehaviorToFFI behavior } - -foreign import _scrollIntoView :: { block :: String, inline :: String, behavior :: String } -> Element -> Effect Unit - -scrollIntoView :: { block :: Alignment, inline :: Alignment, behavior :: ScrollBehavior } -> Element -> Effect Unit -scrollIntoView { block, inline, behavior } = - _scrollIntoView - { block: alignmentToFFI block - , inline: alignmentToFFI inline - , behavior: scrollBehaviorToFFI behavior - } - -foreign import throttledOnScroll :: Number -> Element -> ({ left :: Number, top :: Number } -> Effect Unit) -> Effect (Effect Unit) - -foreign import debouncedOnScroll :: Number -> Element -> ({ left :: Number, top :: Number } -> Effect Unit) -> Effect (Effect Unit) diff --git a/web-common/src/Web/DOM/IntersectionObserver.js b/web-common/src/Web/DOM/IntersectionObserver.js deleted file mode 100644 index 7a9de67a5f..0000000000 --- a/web-common/src/Web/DOM/IntersectionObserver.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -exports._intersectionObserver = function (config) { - return function (cb) { - return function () { - return new IntersectionObserver(function (entries, observer) { - return cb(entries)(observer)(); - }, config); - }; - }; -}; - -exports.observe = function (element) { - return function (observer) { - return function () { - return observer.observe(element); - }; - }; -}; - -exports.unobserve = function (element) { - return function (observer) { - return function () { - return observer.unobserve(element); - }; - }; -}; - -exports.disconnect = function (observer) { - return function () { - return observer.disconnect(); - }; -}; diff --git a/web-common/src/Web/DOM/IntersectionObserver.purs b/web-common/src/Web/DOM/IntersectionObserver.purs deleted file mode 100644 index 1de31fded3..0000000000 --- a/web-common/src/Web/DOM/IntersectionObserver.purs +++ /dev/null @@ -1,63 +0,0 @@ --- This module provides FFI bindings for the Intersection Observer API. --- https://www.w3.org/TR/intersection-observer/#intersection-observer-interface --- TODO: Create a PR to make this a part of `purescript-web-dom`. --- NOTE: I'm not using the uncurried package as `web-dom` doesn't use it either. -module Web.DOM.IntersectionObserver - ( IntersectionObserver - , IntersectionObserverEntry(..) - , intersectionObserver - , observe - , unobserve - , disconnect - ) where - -import Prelude -import Effect (Effect) -import Prim.Row (class Union) -import Web.DOM (Element) -import Web.HTML.HTMLElement (DOMRect) - -foreign import data IntersectionObserver :: Type - -type IntersectionObserverEntry - = { target :: Element - -- time :: DOMHighResTimeStamp - -- rootBounds :: Nullable DOMRect - , boundingClientRect :: DOMRect - , intersectionRect :: DOMRect - , isIntersecting :: Boolean - , intersectionRatio :: Number - } - -type IntersectionObserverInitFields - = ( {- NOTE: The spec says it can be a Element or Document. For the moment I choose - Element for simplicity, maybe it would be a good idea to add a wrapper data - ElementOrDocument - -} root :: Element - , rootMargin :: String - {- NOTE: The spec says it can be a double or array of double. For the moment I choose - only to manage a single Number for simplicity, maybe we would add a wrapper - constructor - -} - , threshold :: Number - ) - -foreign import _intersectionObserver :: - forall r. - Record r -> - (Array IntersectionObserverEntry -> IntersectionObserver -> Effect Unit) -> - Effect IntersectionObserver - -intersectionObserver :: - forall r rx. - Union r rx IntersectionObserverInitFields => - Record r -> - (Array IntersectionObserverEntry -> IntersectionObserver -> Effect Unit) -> - Effect IntersectionObserver -intersectionObserver = _intersectionObserver - -foreign import observe :: Element -> IntersectionObserver -> Effect Unit - -foreign import unobserve :: Element -> IntersectionObserver -> Effect Unit - -foreign import disconnect :: IntersectionObserver -> Effect Unit diff --git a/web-common/src/Web/DOM/ResizeObserver.js b/web-common/src/Web/DOM/ResizeObserver.js deleted file mode 100644 index ad28d18b7a..0000000000 --- a/web-common/src/Web/DOM/ResizeObserver.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -exports.resizeObserver = function (cb) { - return function () { - return new ResizeObserver(function (entries, observer) { - return cb(entries)(observer)(); - }); - }; -}; - -exports._observe = function (element) { - return function (config) { - - return function (observer) { - - return function () { - - return observer.observe(element, config); - }; - }; - }; -}; - -exports.unobserve = function (element) { - return function (observer) { - return function () { - return observer.unobserve(element); - }; - }; -}; - -exports.disconnect = function (observer) { - return function () { - return observer.disconnect(); - }; -}; diff --git a/web-common/src/Web/DOM/ResizeObserver.purs b/web-common/src/Web/DOM/ResizeObserver.purs deleted file mode 100644 index a651da3694..0000000000 --- a/web-common/src/Web/DOM/ResizeObserver.purs +++ /dev/null @@ -1,63 +0,0 @@ --- This module provides FFI bindings for the Resize Observer API. --- https://www.w3.org/TR/resize-observer/#api --- TODO: Create a PR to make this a part of `purescript-web-dom`. --- NOTE: I'm not using the uncurried package as `web-dom` doesn't use it either. -module Web.DOM.ResizeObserver - ( ResizeObserver - , ResizeObserverEntry(..) - , ResizeObserverSize(..) - , ResizeObserverBoxOptions(..) - , resizeObserver - , observe - , unobserve - , disconnect - ) where - -import Prelude -import Effect (Effect) -import Web.DOM (Element) -import Web.HTML.HTMLElement (DOMRect) - -foreign import data ResizeObserver :: Type - -type ResizeObserverSize - = { inlineSize :: Number - , blockSize :: Number - } - -type ResizeObserverEntry - = { target :: Element - , contentRect :: DOMRect - , borderBoxSize :: ResizeObserverSize - , contentBoxSize :: ResizeObserverSize - , devicePixelContentBoxSize :: ResizeObserverSize - } - -data ResizeObserverBoxOptions - = BorderBox - | ContentBox - | DevicePixelContentBox - -optionsToFFI :: ResizeObserverBoxOptions -> String -optionsToFFI BorderBox = "border-box" - -optionsToFFI ContentBox = "content-box" - -optionsToFFI DevicePixelContentBox = "device-pixel-content-box" - -foreign import resizeObserver :: - (Array ResizeObserverEntry -> ResizeObserver -> Effect Unit) -> - Effect ResizeObserver - -foreign import _observe :: forall r. Element -> Record r -> ResizeObserver -> Effect Unit - -observe :: - Element -> - ResizeObserverBoxOptions -> - ResizeObserver -> - Effect Unit -observe element options = _observe element { box: optionsToFFI options } - -foreign import unobserve :: Element -> ResizeObserver -> Effect Unit - -foreign import disconnect :: ResizeObserver -> Effect Unit diff --git a/web-common/src/Web/Event/Extra.js b/web-common/src/Web/Event/Extra.js deleted file mode 100644 index 3564250ca8..0000000000 --- a/web-common/src/Web/Event/Extra.js +++ /dev/null @@ -1,34 +0,0 @@ -/*global FileReader, exports*/ -'use strict'; - -exports._readFileFromDragEvent = function(onLoad, onError, e) { - var i, item, files, file, reader; - - files = []; - if (e.dataTransfer.items) { - for (i = 0; i < e.dataTransfer.items.length; i++) { - item = e.dataTransfer.items[i]; - if (item.kind === 'file') { - files.push(item.getAsFile()); - } - } - } - - file = files[0]; - if (file) { - reader = new FileReader(); - reader.onloadend = function (loadEvent) { - if (reader.error) { - onError(reader.error)(); - } else { - onLoad(loadEvent.target.result)(); - } - }; - - reader.readAsText(file); - } - - return function canceler (error) { - reader.abort(); - }; -}; diff --git a/web-common/src/Web/Event/Extra.purs b/web-common/src/Web/Event/Extra.purs deleted file mode 100644 index ba804ae1b4..0000000000 --- a/web-common/src/Web/Event/Extra.purs +++ /dev/null @@ -1,53 +0,0 @@ -module Web.Event.Extra - ( class IsEvent - , toEvent - , preventDefault - , readFileFromDragEvent - ) where - -import Data.Either (Either(..)) -import Effect (Effect) -import Effect.Aff (Aff, Canceler, Error, makeAff) -import Effect.Uncurried (EffectFn3, runEffectFn3) -import Prelude (Unit, ($), (<<<)) -import Web.Event.Event (Event) -import Web.Event.Event (preventDefault) as WebEvent -import Web.HTML.Event.DragEvent (DragEvent) -import Web.HTML.Event.DragEvent (toEvent) as DragEvent -import Web.UIEvent.FocusEvent (FocusEvent) -import Web.UIEvent.FocusEvent (toEvent) as FocusEvent -import Web.UIEvent.KeyboardEvent (KeyboardEvent) -import Web.UIEvent.KeyboardEvent (toEvent) as KeyboardEvent -import Web.UIEvent.MouseEvent (MouseEvent) -import Web.UIEvent.MouseEvent (toEvent) as MouseEvent - -class IsEvent e where - toEvent :: e -> Event - -instance eventIsEvent :: IsEvent Event where - toEvent event = event - -instance dragEventIsEvent :: IsEvent DragEvent where - toEvent = DragEvent.toEvent - -instance focusEventIsEvent :: IsEvent FocusEvent where - toEvent = FocusEvent.toEvent - -instance keyboardEventIsEvent :: IsEvent KeyboardEvent where - toEvent = KeyboardEvent.toEvent - -instance mouseEventIsEvent :: IsEvent MouseEvent where - toEvent = MouseEvent.toEvent - -preventDefault :: forall e. IsEvent e => e -> Effect Unit -preventDefault = WebEvent.preventDefault <<< toEvent - -foreign import _readFileFromDragEvent :: - EffectFn3 - (String -> Effect Unit) - (Error -> Effect Unit) - DragEvent - Canceler - -readFileFromDragEvent :: DragEvent -> Aff String -readFileFromDragEvent event = makeAff $ \callback -> runEffectFn3 _readFileFromDragEvent (callback <<< Right) (callback <<< Left) event diff --git a/web-common/src/Web/HTML/WindowExtra.js b/web-common/src/Web/HTML/WindowExtra.js deleted file mode 100644 index 6959876744..0000000000 --- a/web-common/src/Web/HTML/WindowExtra.js +++ /dev/null @@ -1,15 +0,0 @@ -exports._close = function (window) { - window.close(); -}; - -exports._postMessage = function (message, targetOrigin, window) { - window.postMessage(message, targetOrigin); -}; - -exports._matchMedia = function (query, window) { - return window.matchMedia(query); -}; - -exports._matches = function (mediaQueryList) { - return mediaQueryList.matches; -}; diff --git a/web-common/src/Web/HTML/WindowExtra.purs b/web-common/src/Web/HTML/WindowExtra.purs deleted file mode 100644 index 4723eea08d..0000000000 --- a/web-common/src/Web/HTML/WindowExtra.purs +++ /dev/null @@ -1,43 +0,0 @@ --- This module contains helpers that should eventually be added into purescript-web-html --- through a PR -module Web.HTML.WindowExtra - ( close - , postMessage - , matchMedia - , matches - , MediaQueryList - ) where - -import Prelude -import Effect (Effect) -import Effect.Uncurried as FU -import Foreign (Foreign) -import Web.HTML (Window) - -foreign import _close :: FU.EffectFn1 Window Unit - -close :: Window -> Effect Unit -close = FU.runEffectFn1 _close - -foreign import _postMessage :: FU.EffectFn3 Foreign String Window Unit - --- Post message dispatches a MessageEvent on a Window. --- Browser documentation: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage --- TODO: transfer is not being modeled, see if needed later -postMessage :: Foreign -> String -> Window -> Effect Unit -postMessage = FU.runEffectFn3 _postMessage - ---------- --- These functions allow the use of window.matchMedia --- https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia -foreign import data MediaQueryList :: Type - -foreign import _matchMedia :: FU.EffectFn2 String Window MediaQueryList - -matchMedia :: String -> Window -> Effect MediaQueryList -matchMedia = FU.runEffectFn2 _matchMedia - -foreign import _matches :: FU.EffectFn1 MediaQueryList Boolean - -matches :: MediaQueryList -> Effect Boolean -matches = FU.runEffectFn1 _matches diff --git a/web-common/src/WebSocket/Support.purs b/web-common/src/WebSocket/Support.purs deleted file mode 100644 index 8ce31dbcb6..0000000000 --- a/web-common/src/WebSocket/Support.purs +++ /dev/null @@ -1,227 +0,0 @@ -module WebSocket.Support - ( WebSocketManager - , mkWebSocketManager - , runWebSocketManager - , managerWriteOutbound - , URI(..) - , FromSocket(..) - , ToSocket(..) - ) where - -import Prelude -import Concurrent.Queue (Queue) -import Concurrent.Queue as Queue -import Control.Monad.Except (runExcept) -import Control.Monad.Rec.Class (forever) -import Control.Parallel (parSequence_) -import Data.Either (Either(..)) -import Data.Foldable (for_) -import Data.Newtype (class Newtype, unwrap) -import Effect (Effect) -import Effect.AVar (AVar, AVarCallback) -import Effect.AVar as AVar -import Effect.Aff (Aff, launchAff) -import Effect.Class (class MonadEffect, liftEffect) -import Effect.Console (log) -import Effect.Exception (Error) -import Foreign (MultipleErrors) -import Foreign.Class (class Decode, class Encode, decode) -import Foreign.Generic (decodeJSON, encodeJSON) -import Web.Event.EventTarget (addEventListener, eventListener) -import Web.HTML as W -import Web.HTML.Location as WL -import Web.HTML.Window as WW -import Web.Socket.Event.CloseEvent (CloseEvent) -import Web.Socket.Event.CloseEvent as CloseEvent -import Web.Socket.Event.EventTypes (onClose, onMessage, onOpen) -import Web.Socket.Event.MessageEvent (MessageEvent) -import Web.Socket.Event.MessageEvent as MessageEvent -import Web.Socket.WebSocket (WebSocket) -import Web.Socket.WebSocket as WS - --- | A type that manages a queue of messages going-to and coming-from a websocket. --- | --- | You may ask, "Why not use the websocket directly?" and the answer --- | is so we can transparently manage network problems and reconnections --- | for you. Messages go into inbound and outbound queues, and if the --- | connection drops we hold the queue while we get it back up. --- | --- | See `runWebSocketManager` for an example of how to use this. -newtype WebSocketManager i o - = WebSocketManager - { inbound :: Queue (FromSocket i) - , outbound :: Queue (ToSocket o) - , socket :: AVar WebSocket - } - -derive instance newtypeWebSocketManager :: Newtype (WebSocketManager i o) _ - -managerReadInbound :: forall i o. WebSocketManager i o -> Aff (FromSocket i) -managerReadInbound = unwrap >>> _.inbound >>> Queue.read - -managerWriteInbound :: forall i o. WebSocketManager i o -> FromSocket i -> Aff Unit -managerWriteInbound = unwrap >>> _.inbound >>> Queue.write - -managerReadOutbound :: forall i o. WebSocketManager i o -> Aff (ToSocket o) -managerReadOutbound = unwrap >>> _.outbound >>> Queue.read - -managerWriteOutbound :: forall i o. WebSocketManager i o -> ToSocket o -> Aff Unit -managerWriteOutbound = unwrap >>> _.outbound >>> Queue.write - -mkWebSocketManager :: forall i o. Aff (WebSocketManager i o) -mkWebSocketManager = do - inbound <- Queue.new - outbound <- Queue.new - socket <- liftEffect AVar.empty - pure $ WebSocketManager { inbound, outbound, socket } - ------------------------------------------------------------- -data FromSocket a - = WebSocketOpen - | ReceiveMessage (Either MultipleErrors a) - | WebSocketClosed CloseEvent - -data ToSocket a - = SendMessage a - ------------------------------------------------------------- -newtype URI - = URI String - -mkSocket :: - URI -> Effect WebSocket -mkSocket (URI uri) = do - window <- W.window - location <- WW.location window - protocol <- WL.protocol location - hostname <- WL.hostname location - port <- WL.port location - let - wsProtocol = case protocol of - "https:" -> "wss" - _ -> "ws" - - wsPath = wsProtocol <> "://" <> hostname <> ":" <> port <> uri - WS.create wsPath [] - ------------------------------------------------------------- --- | Take a resource that's wrapped in an AVar, then lock it, use it and unlock it. -bracket :: - forall m a. - MonadEffect m => - (Error -> Effect Unit) -> - (a -> Effect Unit) -> - AVar a -> - m Unit -bracket errorHandler successHandler resourceVar = - void $ liftEffect - $ AVar.take resourceVar - $ withError - $ \resource -> do - successHandler resource - void $ AVar.put resource resourceVar $ withError pure - where - withError :: forall b. (b -> Effect Unit) -> Either Error b -> Effect Unit - withError _ (Left err) = errorHandler err - - withError f (Right value) = f value - ------------------------------------------------------------- --- | Wire a websocket into a Halogen app. Example usage: --- | --- | ``` --- | data MessageToServer = BuyWidgets Int | ... --- | data MessageFromServer = OrderReceived Date | ... --- | --- | main = do --- | runHalogenAff do --- | body <- awaitBody --- | halogenDriver <- runUI initialMainFrame Init body --- | wsManager :: WebSocketManager MessageFromServer MessageToServer <- --- | mkWebSocketManager --- | void --- | $ forkAff --- | $ WS.runWebSocketManager --- | (WS.URI "/ws") --- | (\msg -> void $ halogenDriver.query --- | $ ReceiveWebSocketMessage msg unit) --- | wsManager --- | driver.subscribe --- | $ consumer --- | $ case _ of --- | (WebSocketMessage msg) -> do --- | WS.managerWriteOutbound wsManager $ WS.SendMessage msg --- | pure Nothing --- | ``` -runWebSocketManager :: - forall o i. - Decode i => - Encode o => - URI -> - (FromSocket i -> Aff Unit) -> - WebSocketManager i o -> - Aff Unit -runWebSocketManager uri handler manager = - parSequence_ - [ liftEffect $ runWebSocketManagerListeners uri manager - , runWebSocketManagerSender manager - , forever $ managerReadInbound manager >>= handler - ] - -runWebSocketManagerSender :: forall i o. Encode o => WebSocketManager i o -> Aff Unit -runWebSocketManagerSender manager = - forever - $ do - contents <- managerReadOutbound manager - case contents of - SendMessage msg -> do - bracket - (\err -> log $ "Fatal websocket error: " <> show err) - (\socket -> WS.sendString socket $ encodeJSON msg) - (_.socket $ unwrap manager) - -runWebSocketManagerListeners :: forall i o. Decode i => URI -> WebSocketManager i o -> Effect Unit -runWebSocketManagerListeners uri manager = do - socket <- mkSocket uri - -- Listen for messages and store them. - messageListener <- - eventListener \event -> do - for_ (MessageEvent.fromEvent event) \messageEvent -> do - launchAff $ managerWriteInbound manager (ReceiveMessage $ decoder messageEvent) - addEventListener onMessage messageListener false (WS.toEventTarget socket) - -- Listen for the close and get ready to reconnect. - closeListener <- - eventListener \event -> do - for_ (CloseEvent.fromEvent event) \closeEvent -> do - void $ launchAff $ managerWriteInbound manager (WebSocketClosed closeEvent) - reconnect - addEventListener onClose closeListener false (WS.toEventTarget socket) - -- Listen for the open and store the socket when it's useable. - openListener <- - eventListener \event -> do - void $ launchAff $ managerWriteInbound manager WebSocketOpen - liftEffect $ AVar.put socket (_.socket $ unwrap manager) - $ withHandler - $ const - $ pure unit - addEventListener onOpen openListener false (WS.toEventTarget socket) - where - decoder :: MessageEvent -> Either MultipleErrors i - decoder msgEvent = - runExcept - $ do - str <- decode $ MessageEvent.data_ msgEvent - decodeJSON str - - -- | Reconnect discards the existing socket and boots up a new one. - reconnect = do - void $ AVar.take (_.socket $ unwrap manager) - $ withHandler - ( \oldSocket -> - runWebSocketManagerListeners uri manager - ) - -withHandler :: forall a. (a -> Effect Unit) -> AVarCallback a -withHandler _ (Left err) = log $ "Fatal websocket error: " <> show err - -withHandler handler (Right value) = handler value diff --git a/web-common/static/common.scss b/web-common/static/common.scss deleted file mode 100644 index 603b071562..0000000000 --- a/web-common/static/common.scss +++ /dev/null @@ -1,213 +0,0 @@ -@import 'bootstrap.scss'; - -.alert a { - color: inherit; - text-decoration: underline; -} - -b, strong { - font-weight: bold; -} - -h2 { - font-size: 1.22rem; -} - -.clickable { - &:not(:disabled):not(.disabled) { - cursor: pointer; - } -} - -.gist-controls { - padding-left: 15px; - margin-bottom: 15px; - - input { - padding: 0.375rem; - } - #gist-id { - margin-bottom: 10px; - } - - .gist-link { - text-align: center; - text-decoration: underline; - padding: 5px; - } - - input { - color: $input-color; - background: $input-bg; - border: $input-border-color; - outline:none; - border-bottom:1px solid $input-border-color; - padding-left: 0; - padding-right: 0; - } -} - -.compilation-error { - cursor: pointer; - - pre { - margin-top: 1rem; - } -} - -.ajax-error { - margin-top: 15px; - margin-bottom: 15px; -} - -.fa-close { - font-size:26px; - &:before { - content: '\00d7'; - } -} - -.fa-plus { - cursor:pointer; - font-size:32px; - transform:rotate(45deg); - &:before { - content: '\00d7'; - } -} - -.btn-link { - padding: 0.375rem; -} - -.badge-action { - $badge-width: 4rem; - padding: 0.25rem 1.75rem 0.25rem 1.5rem; - width: $badge-width; - font-size: 100%; - background: $badge-background; - border-color: $section-border; - border-radius: 1.5rem; - color: $badge; - line-height: inherit; - position: absolute; - top: -1rem; - left: calc(50% - #{$badge-width / 2}); -} - -.card { - margin-bottom: 1rem; - - .btn.pull-right, .btn.pull-right:focus { - border:none; - background:none; - outline:0; - box-shadow: none; - } - button.pull-right { - margin:-0.5rem 0 0 0; - padding:0; - } - .pull-right { - float: right; - .fa-plus { - font-size: 1rem; - margin-left: 1rem; - } - } - .form-row { - margin-bottom: 0.5rem; - } -} - -.card-footer { - padding: $card-spacer-y $card-spacer-x; - background-color: $card-bg !important; - border-top: $card-border-width solid $card-border-color; -} - -.nav-tabs { - margin-bottom: 15px; - text-transform: uppercase; - letter-spacing: 0.1rem; - border-bottom: none; - - a.nav-link { - color: $nav-link; - padding: 0.375rem 2rem; - line-height: 16px; - - &.active, - &:hover { - color: $nav-link-hover; - font-weight: bold; - border: $nav-link-active-border; - border-radius: 0; - border-top-left-radius: $nav-link-border-radius; - border-top-right-radius: $nav-link-border-radius; - } - } - - @include media-breakpoint-up(lg) { - border-bottom: $nav-link-active-border; - - a.nav-link { - &.active, - &:hover { - border-bottom: dotted 1px transparent; - } - } - } - -} - -.form-control { - &:focus { - color: inherit; - } -} - -input.form-control { - min-width: 4.5rem; -} - -.input-group-prepend, -.input-group-append { - button, - .input-group-text { - padding: 0.375rem; - } -} - -.input-group-prepend button { - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; -} - -.input-group-append button { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} - -.preWrap { - white-space: pre-wrap; -} - -.clipboard { - display: inline; - - button { - padding-top: 0; - padding-bottom: 0; - - .fa { - transition: color 500ms; - - } - - &:active .fa { - transition: color 50ms; - color: $clipboard-button-color; - } - } -} diff --git a/web-common/static/icons.css b/web-common/static/icons.css deleted file mode 100644 index 9725155a30..0000000000 --- a/web-common/static/icons.css +++ /dev/null @@ -1,172 +0,0 @@ -@import url("https://fonts.googleapis.com/css2?family=Material+Icons+Round"); - -.material-icons-round { - font-weight: inherit; /* override the default of normal that ships with google's css */ - user-select: none; /* disable icons from being selected with the mouse */ -} - -.with-icon::after { - font-family: "Material Icons Round"; - font-size: 24px; - font-weight: normal; - line-height: 1; - white-space: nowrap; - float: right; - margin: -5px -5px -5px 5px; -} - -.with-icon-add::after { - content: "add"; -} - -.with-icon-add-box::after { - content: "add_box"; -} - -.with-icon-add-circle::after { - content: "add_circle"; -} - -.with-icon-arrow-right::after { - content: "east"; -} - -.with-icon-arrow-left::after { - content: "west"; -} - -.with-icon-close::after { - content: "close"; -} - -.with-icon-contacts::after { - content: "people"; -} - -.with-icon-contract::after { - content: "history_edu"; -} - -.with-icon-contract-contract-for-differences::after { - content: "trending_up"; -} - -.with-icon-contract-loan::after { - content: "wrap_text"; /* FIXME: this is the wrong icon */ -} - -.with-icon-contract-purchase::after { - content: "swap_horiz"; -} - -.with-icon-copy::after { - content: "copy"; -} - -.with-icon-done::after { - content: "done"; -} - -.with-icon-check-circle-outline::after { - content: "check_circle_outline"; -} - -.with-icon-error-outline::after { - content: "error_outline"; -} - -.with-icon-expand-more::after { - content: "expand_more"; -} - -.with-icon-expand-less::after { - content: "expand_less"; -} - -.with-icon-help::after { - content: "help"; -} - -.with-icon-help-outline::after { - content: "help_outline"; -} - -.with-icon-history::after { - content: "history"; -} - -.with-icon-home::after { - content: "home"; -} - -.with-icon-info::after { - content: "info"; -} - -.with-icon-language::after { - content: "language"; -} - -.with-icon-menu::after { - content: "short_text"; -} - -.with-icon-next::after { - content: "chevron_right"; -} - -.with-icon-new-contact::after { - content: "person_add_alt"; -} - -.with-icon-pay::after { - content: "credit_score"; -} - -.with-icon-play::after { - content: "play"; -} - -.with-icon-previous::after { - content: "chevron_left"; -} - -.with-icon-refresh::after { - content: "refresh"; -} - -.with-icon-read-more::after { - content: "read_more"; -} - -.with-icon-roles::after { - content: "person_pin_circle"; -} - -.with-icon-running::after { - content: "directions_run"; -} - -.with-icon-south::after { - content: "south"; -} - -.with-icon-sync::after { - content: "sync"; -} - -.with-icon-task-alt::after { - content: "task_alt"; -} - -.with-icon-terms::after { - content: "drive_file_rename_outline"; -} - -.with-icon-timer::after { - content: "timer"; -} - -.with-icon-tutorials::after { - content: "school"; -} diff --git a/web-common/static/index.html b/web-common/static/index.html deleted file mode 100644 index 4c5b63af37..0000000000 --- a/web-common/static/index.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - diff --git a/web-common/static/popover.css b/web-common/static/popover.css deleted file mode 100644 index fe79b606d6..0000000000 --- a/web-common/static/popover.css +++ /dev/null @@ -1,34 +0,0 @@ -/* This styles were taken from https://popper.js.org/docs/v2/tutorial/ */ -.popover-arrow, -.popover-arrow::before { - position: absolute; - width: 8px; - height: 8px; - background: inherit; -} - -.popover-arrow { - visibility: hidden; -} - -.popover-arrow::before { - visibility: visible; - content: ""; - transform: rotate(45deg); -} - -div[data-popper-placement^="top"] > .popover-arrow { - bottom: -4px; -} - -div[data-popper-placement^="bottom"] > .popover-arrow { - top: -4px; -} - -div[data-popper-placement^="left"] > .popover-arrow { - right: -4px; -} - -div[data-popper-placement^="right"] > .popover-arrow { - left: -4px; -} diff --git a/web-common/static/progress-circular.css b/web-common/static/progress-circular.css deleted file mode 100644 index 3215485d39..0000000000 --- a/web-common/static/progress-circular.css +++ /dev/null @@ -1,86 +0,0 @@ -/* Adapted from https://codepen.io/zapdev/pen/MYJRaj */ -.progress.progress-circular svg { - height: 100%; - width: 100%; -} - -.progress.progress-circular.progress-indeterminate svg { - animation: progress-circular-rotate 1.8s linear infinite; -} - -.progress.progress-circular circle { - stroke: currentColor; - fill: none; - transition: stroke-dashoffset 0.5s ease-in-out; - stroke-dasharray: 113,113; -} - -.progress.progress-circular.progress-0 circle { - stroke-dashoffset: -113; -} - -.progress.progress-circular.progress-10 circle { - stroke-dashoffset: -124.3; -} - -.progress.progress-circular.progress-20 circle { - stroke-dashoffset: -135.6; -} - -.progress.progress-circular.progress-30 circle { - stroke-dashoffset: -146.9; -} - -.progress.progress-circular.progress-40 circle { - stroke-dashoffset: -158.2; -} - -.progress.progress-circular.progress-50 circle { - stroke-dashoffset: -169.5; -} - -.progress.progress-circular.progress-60 circle { - stroke-dashoffset: -180.8; -} - -.progress.progress-circular.progress-70 circle { - stroke-dashoffset: -192.1; -} - -.progress.progress-circular.progress-80 circle { - stroke-dashoffset: -203.4; -} - -.progress.progress-circular.progress-90 circle { - stroke-dashoffset: -214.7; -} - -.progress.progress-circular.progress-100 circle { - stroke-dashoffset: -226; -} - -.progress.progress-circular.progress-indeterminate circle { - animation: progress-circular-dash 1.2s ease-in-out infinite 0s; - transform-origin: 50% 50%; -} - -@keyframes progress-circular-rotate { - 100% { - transform: rotate(360deg); - } -} -@keyframes progress-circular-dash { - 0% { - stroke-dasharray: 7,106; - stroke-dashoffset: 0; - } - 50% { - stroke-dasharray: 83,40; - stroke-dashoffset: -28; - } - 100% { - stroke-dasharray: 7,106; - stroke-dashoffset: -106; - transform: rotate(22deg); - } -} diff --git a/web-common/templates/Component/Stateful.purs.template b/web-common/templates/Component/Stateful.purs.template deleted file mode 100644 index e647959d28..0000000000 --- a/web-common/templates/Component/Stateful.purs.template +++ /dev/null @@ -1,43 +0,0 @@ -module Component.$name - ( component - , $lname - , $lnameSlot - , module Types - ) where - -import Prologue -import Component.$name.State (handleAction, initialState) -import Component.$name.Types (Component, Input, Msg, Query, Slot) -import Component.$name.Types.Internal (Action(..)) -import Component.$name.Types as Types -import Component.$name.View (render) -import Data.Symbol (SProxy(..)) -import Halogen as H -import Halogen.HTML (slot, text) - -$lnameSlot :: SProxy "$lnameSlot" -$lnameSlot = SProxy - -$lname :: - forall slots slot action m. - Ord slot => - Monad m => - slot -> - Input -> - (Msg -> action) -> - H.ComponentHTML action ( $lnameSlot :: Slot slot | slots ) m -$lname s input = slot $lnameSlot s component input <<< (Just <<< _) - -component :: forall m. Monad m => Component m -component = - H.mkComponent - { initialState - , render - , eval: - H.mkEval - H.defaultEval - { handleAction = handleAction - , initialize = Just Init - , receive = Just <<< Receive - } - } diff --git a/web-common/templates/Component/Stateful/State.purs.template b/web-common/templates/Component/Stateful/State.purs.template deleted file mode 100644 index ca4e362452..0000000000 --- a/web-common/templates/Component/Stateful/State.purs.template +++ /dev/null @@ -1,24 +0,0 @@ -module Component.$name.State - ( handleAction - , initialState - ) where - -import Prologue -import Component.$name.Types (Input) -import Component.$name.Types.Internal (Action(..), DSL, State) - -initialState :: Input -> State -initialState input = - { - } - -handleAction :: forall m. Monad m => Action -> DSL m Unit -handleAction = case _ of - Init -> init - Receive input -> receive input - -init :: forall m. Monad m => DSL m Unit -init = pure unit - -receive :: forall m. Monad m => Input -> DSL m Unit -receive _ = pure unit diff --git a/web-common/templates/Component/Stateful/Types.purs.template b/web-common/templates/Component/Stateful/Types.purs.template deleted file mode 100644 index bff0dd96ab..0000000000 --- a/web-common/templates/Component/Stateful/Types.purs.template +++ /dev/null @@ -1,18 +0,0 @@ -module Component.$name.Types where - -import Halogen as H -import Halogen.HTML as HH - -data Query a - -type Input - = { - } - -data Msg - -type Slot slot - = H.Slot Query Msg slot - -type Component m - = H.Component HH.HTML Query Input Msg m diff --git a/web-common/templates/Component/Stateful/Types/Internal.purs.template b/web-common/templates/Component/Stateful/Types/Internal.purs.template deleted file mode 100644 index f02b78d89f..0000000000 --- a/web-common/templates/Component/Stateful/Types/Internal.purs.template +++ /dev/null @@ -1,25 +0,0 @@ -module Component.$name.Types.Internal where - -import Component.$name.Types (Input, Msg) - -import Halogen as H -import Halogen.HTML as HH - -data Action - = Init - | Receive Input - -type State - = { - } - -type Slots - = ( - ) - -type DSL - = H.HalogenM State Action Slots Msg - -type ComponentHTML m - = H.ComponentHTML Action Slots m - diff --git a/web-common/templates/Component/Stateful/View.purs.template b/web-common/templates/Component/Stateful/View.purs.template deleted file mode 100644 index 42c16e0c38..0000000000 --- a/web-common/templates/Component/Stateful/View.purs.template +++ /dev/null @@ -1,10 +0,0 @@ -module Component.$name.View - ( render - ) where - -import Component.$name.Types.Internal (ComponentHTML, State) -import Halogen.HTML (text) - -render :: forall m. State -> ComponentHTML m -render state = - text "hello, world" diff --git a/web-common/templates/Component/Stateless/Types.purs.template b/web-common/templates/Component/Stateless/Types.purs.template deleted file mode 100644 index b9b86465e9..0000000000 --- a/web-common/templates/Component/Stateless/Types.purs.template +++ /dev/null @@ -1,6 +0,0 @@ --- | This module contains all the public API types for the component. -module Component.$name.Types where - -type Input - = { - } diff --git a/web-common/templates/Component/Stateless/View.purs.template b/web-common/templates/Component/Stateless/View.purs.template deleted file mode 100644 index 27341ec027..0000000000 --- a/web-common/templates/Component/Stateless/View.purs.template +++ /dev/null @@ -1,10 +0,0 @@ -module Component.$name.View (render) where - -import Prologue -import Component.$name.Types (Input) -import Halogen.Css (classNames) -import Halogen.HTML (HTML, text) - -render :: forall w i. Input -> HTML w i -render input = - text "hello, world" diff --git a/web-common/templates/Page.purs.template b/web-common/templates/Page.purs.template deleted file mode 100644 index 2977fd18ab..0000000000 --- a/web-common/templates/Page.purs.template +++ /dev/null @@ -1,41 +0,0 @@ -module Page.$name - ( component - , $lnamePage - , $lnamePageSlot - , module Types - ) where - -import Prologue -import Page.$name.State (handleAction, initialState) -import Page.$name.Types (Component, Input, Msg, Query, Slot) -import Page.$name.Types.Internal (Action(..)) -import Page.$name.Types as Types -import Page.$name.View (render) -import Data.Symbol (SProxy(..)) -import Halogen as H -import Halogen.HTML (slot, text) - -$lnamePageSlot :: SProxy "$lnamePageSlot" -$lnamePageSlot = SProxy - -$lnamePage :: - forall slots action m. - Monad m => - Input -> - (Msg -> action) -> - H.ComponentHTML action ( $lnamePageSlot :: Slot | slots ) m -$lnamePage input = slot $lnamePageSlot unit component input <<< (Just <<< _) - -component :: forall m. Monad m => Component m -component = - H.mkComponent - { initialState - , render - , eval: - H.mkEval - H.defaultEval - { handleAction = handleAction - , initialize = Just Init - , receive = Just <<< Receive - } - } diff --git a/web-common/templates/Page/State.purs.template b/web-common/templates/Page/State.purs.template deleted file mode 100644 index 677040670c..0000000000 --- a/web-common/templates/Page/State.purs.template +++ /dev/null @@ -1,27 +0,0 @@ -module Page.$name.State - ( handleAction - , initialState - ) where - -import Prologue -import Page.$name.Types (Input) -import Page.$name.Types.Internal (Action(..), DSL, State) - -initialState :: Input -> State -initialState input = - { - } - -------------------------------------------------------------------------------- --- Handlers -------------------------------------------------------------------------------- -handleAction :: forall m. Monad m => Action -> DSL m Unit -handleAction = case _ of - Init -> init - Receive input -> receive input - -init :: forall m. Monad m => DSL m Unit -init = pure unit - -receive :: forall m. Monad m => Input -> DSL m Unit -receive _ = pure unit diff --git a/web-common/templates/Page/Types.purs.template b/web-common/templates/Page/Types.purs.template deleted file mode 100644 index b79ae0b466..0000000000 --- a/web-common/templates/Page/Types.purs.template +++ /dev/null @@ -1,19 +0,0 @@ -module Page.$name.Types where - -import Prologue -import Halogen as H -import Halogen.HTML as HH - -data Query a - -type Input - = { - } - -data Msg - -type Slot - = H.Slot Query Msg Unit - -type Component m - = H.Component HH.HTML Query Input Msg m diff --git a/web-common/templates/Page/Types/Internal.purs.template b/web-common/templates/Page/Types/Internal.purs.template deleted file mode 100644 index b23891ddb5..0000000000 --- a/web-common/templates/Page/Types/Internal.purs.template +++ /dev/null @@ -1,25 +0,0 @@ -module Page.$name.Types.Internal where - -import Page.$name.Types (Input, Msg) - -import Halogen as H -import Halogen.HTML as HH - -data Action - = Init - | Receive Input - -type State - = { - } - -type Slots - = ( - ) - -type DSL - = H.HalogenM State Action Slots Msg - -type ComponentHTML m - = H.ComponentHTML Action Slots m - diff --git a/web-common/templates/Page/View.purs.template b/web-common/templates/Page/View.purs.template deleted file mode 100644 index 2229f2b6b2..0000000000 --- a/web-common/templates/Page/View.purs.template +++ /dev/null @@ -1,10 +0,0 @@ -module Page.$name.View - ( render - ) where - -import Page.$name.Types.Internal (ComponentHTML, State) -import Halogen.HTML (text) - -render :: forall m. State -> ComponentHTML m -render state = - text "hello, world" diff --git a/web-common/test/Test/Data/Json/JsonNTuple.js b/web-common/test/Test/Data/Json/JsonNTuple.js deleted file mode 100644 index 3f84be915c..0000000000 --- a/web-common/test/Test/Data/Json/JsonNTuple.js +++ /dev/null @@ -1,7 +0,0 @@ -exports.stringify = function (a) { - return JSON.stringify(a); -}; - -exports.jsonParse = function (a) { - return JSON.parse(a); -}; diff --git a/web-common/test/Test/Data/Json/JsonNTuple.purs b/web-common/test/Test/Data/Json/JsonNTuple.purs deleted file mode 100644 index 8f845c49ce..0000000000 --- a/web-common/test/Test/Data/Json/JsonNTuple.purs +++ /dev/null @@ -1,43 +0,0 @@ -module Test.Data.Json.JsonNTuple where - -import Prelude -import Control.Monad.Except (runExceptT) -import Data.Either (Either(..)) -import Data.Json.JsonNTuple ((/\)) -import Foreign (Foreign) -import Foreign.Class (decode, encode) -import Test.Unit (TestSuite, suite, test) -import Test.Unit.Assert (equal) - -foreign import stringify :: Foreign -> String - -foreign import jsonParse :: String -> Foreign - -jsonNTupleTest :: TestSuite -jsonNTupleTest = do - suite "encode" do - test "Tuple" do - equal - "[1,\"2\"]" - (stringify $ encode $ 1 /\ "2") - test "Triple" do - equal - "[1,\"2\",true]" - (stringify $ encode $ 1 /\ "2" /\ true) - test "4-Tuple" do - equal - "[1,\"2\",true,4]" - (stringify $ encode $ 1 /\ "2" /\ true /\ 4) - suite "decode" do - test "Tuple" do - equal - (pure $ Right $ 1 /\ "2") - (runExceptT $ decode $ jsonParse "[1,\"2\"]") - test "Triple" do - equal - (pure $ Right $ 1 /\ "2" /\ true) - (runExceptT $ decode $ jsonParse "[1,\"2\",true]") - test "4-Tuple" do - equal - (pure $ Right $ 1 /\ "2" /\ true /\ 4) - (runExceptT $ decode $ jsonParse "[1,\"2\",true,4]") diff --git a/web-common/test/TestUtils.purs b/web-common/test/TestUtils.purs deleted file mode 100644 index 0c29e4ea2f..0000000000 --- a/web-common/test/TestUtils.purs +++ /dev/null @@ -1,101 +0,0 @@ -module TestUtils where - -import Prelude -import Control.Monad.Except (runExcept) -import Control.Monad.Gen (class MonadGen, chooseInt, oneOf) -import Data.Bifoldable (class Bifoldable, bifoldMap) -import Data.Either (Either(..)) -import Data.Foldable (class Foldable, intercalate, length) -import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Show (class GenericShow, genericShow) -import Data.List as List -import Data.List.NonEmpty (NonEmptyList(..)) -import Data.NonEmpty (NonEmpty(..), (:|)) -import Effect.Class (class MonadEffect, liftEffect) -import Foreign (MultipleErrors) -import Foreign.Class (class Decode, class Encode) -import Foreign.Generic (decodeJSON, encodeJSON) -import Foreign.JSON (parseJSON) -import Node.Encoding (Encoding(..)) -import Node.FS.Sync as FS -import Test.QuickCheck.Gen (Gen, vectorOf) -import Test.Unit (Test, failure, success) -import Test.Unit.Assert (equal) -import Type.Proxy (Proxy) - -assertRight :: forall e a. Show e => Either e a -> Test -assertRight (Left err) = failure $ show err - -assertRight (Right _) = success - -assertDecodesTo :: forall a. Decode a => Proxy a -> String -> Test -assertDecodesTo proxy filename = do - result :: Either MultipleErrors a <- decodeFile filename - case result of - Left errs -> failure $ "JSON Decoding Error:\n" <> intercalate "\n" (show <$> errs) - Right _ -> success - --- | Check a value encodes to the contents of a file. --- This test will reformat the input file to ignore any whitespace --- differences. -assertEncodesTo :: forall a. Encode a => a -> String -> Test -assertEncodesTo value filename = do - file <- liftEffect (FS.readTextFile UTF8 filename) - let - encoded = encodeJSON value - let - reformatted = runExcept (encodeJSON <$> parseJSON file) - case reformatted of - Left err -> failure $ "Input file is not valid JSON" - Right expected -> equal expected encoded - -decodeFile :: - forall m a. - MonadEffect m => - Decode a => - String -> - m (Either MultipleErrors a) -decodeFile filename = do - contents <- liftEffect $ FS.readTextFile UTF8 filename - pure $ runExcept $ decodeJSON contents - -equalWithFormatter :: forall a. Eq a => (a -> String) -> a -> a -> Test -equalWithFormatter f expected actual = - if expected == actual then - success - else - failure $ "expected " <> f expected - <> ", got " - <> f actual - --- | Similar to `equalWithFormatter`, but this instance tends to come in handy when comparing things like `Either`s. -equalWithBiformatter :: forall p a b. Bifoldable p => Eq (p a b) => (a -> String) -> (b -> String) -> p a b -> p a b -> Test -equalWithBiformatter f g = equalWithFormatter $ bifoldMap f g - -equalGenericShow :: forall a rep. Eq a => Generic a rep => GenericShow rep => a -> a -> Test -equalGenericShow = equalWithFormatter genericShow - -genIndex :: forall f a m. MonadGen m => Foldable f => f a -> m Int -genIndex xs = chooseInt 0 (length xs - 1) - --- | Generates an index that will either be within the array bounds, or slightly outside of it. --- --- Useful when you want to test valid indexes, plus the edge cases, --- but there's no point using truly random Ints and checking -1 AND --- -1234 AND -9237581, etc. -genLooseIndex :: forall m f a. MonadGen m => Foldable f => f a -> m Int -genLooseIndex xs = chooseInt (-2) (length xs + 2) - -arbitraryEither :: forall m a b. MonadGen m => m a -> m b -> m (Either a b) -arbitraryEither genLeft genRight = - oneOf - $ NonEmpty - (Left <$> genLeft) - [ (Right <$> genRight) ] - -arbitraryNonEmptyList :: forall a. Gen a -> Gen (NonEmptyList a) -arbitraryNonEmptyList genX = do - n <- chooseInt 0 5 - x <- genX - xs <- List.fromFoldable <$> vectorOf n genX - pure $ NonEmptyList $ x :| xs