Commit 3892af4e authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch '671-dev-update-deps' into 'dev'

Resolve "`./install` doesn't work on Darwin"

See merge request !508
parents 266248f8 9c06952e
Pipeline #7530 passed with stages
in 26 minutes and 34 seconds
...@@ -49,4 +49,7 @@ bundle.js ...@@ -49,4 +49,7 @@ bundle.js
/dist/bundle.min.js* /dist/bundle.min.js*
# IDE specific # IDE specific
.vscode .idea/
.vscode/
.parcel-cache/
#!/bin/bash #!/bin/bash
set -e
# To get infos # To get infos
# nix-shell -p nix-info --run --extra-experimental-features nix-command "nix-info -m" # nix-shell -p nix-info --run --extra-experimental-features nix-command "nix-info -m"
......
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1731533236,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -59,11 +59,11 @@ ...@@ -59,11 +59,11 @@
"slimlock": "slimlock" "slimlock": "slimlock"
}, },
"locked": { "locked": {
"lastModified": 1727269424, "lastModified": 1739795788,
"narHash": "sha256-uoVjAkKbuJSA7++kyBjxLozICDdukZ+Mjj5Z/K5qMak=", "narHash": "sha256-PG4lO49fvWHpQoCN3mIGflisXF+5vEf91ceV9hsWTLU=",
"owner": "thomashoneyman", "owner": "thomashoneyman",
"repo": "purescript-overlay", "repo": "purescript-overlay",
"rev": "5a28abe663758634b1e5ca7053e08af62fd3be80", "rev": "f754c2ef94cef46e5d5223c25d3f361e1f6cb509",
"type": "github" "type": "github"
}, },
"original": { "original": {
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
}; };
dependencies = with pkgs; [ dependencies = with pkgs; [
purs-bin.purs-0_15_16-1 # from the purescript-overlay purs-bin.purs-0_15_16-4 # from the purescript-overlay
spago-bin.spago-0_93_37 spago-bin.spago-0_93_43
nodePackages.purs-tidy nodePackages.purs-tidy
watchexec watchexec
esbuild esbuild
......
This diff is collapsed.
This diff is collapsed.
...@@ -39,8 +39,8 @@ workspace: ...@@ -39,8 +39,8 @@ workspace:
# other external packages # other external packages
url-validator: url-validator:
git: https://github.com/bbarker/purescript-url-validator git: https://github.com/garganscript/purescript-url-validator
ref: master ref: spago-next
# for tests # for tests
spec-discovery: spec-discovery:
......
...@@ -15,6 +15,7 @@ import Effect.Exception (error) ...@@ -15,6 +15,7 @@ import Effect.Exception (error)
import Gargantext.Components.Bootstrap as B import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ComponentStatus(..), Variant(..)) import Gargantext.Components.Bootstrap.Types (ComponentStatus(..), Variant(..))
import Gargantext.Components.CodeEditor as CE import Gargantext.Components.CodeEditor as CE
import Gargantext.Components.Forest.Tree.Node.Action.Add (addNode, AddNodeValue(..))
import Gargantext.Components.InputWithEnter (inputWithEnter) import Gargantext.Components.InputWithEnter (inputWithEnter)
import Gargantext.Components.Node (HyperdataList, NodePoly(..)) import Gargantext.Components.Node (HyperdataList, NodePoly(..))
import Gargantext.Components.Nodes.Corpus.Types (CorpusData, Hyperdata) import Gargantext.Components.Nodes.Corpus.Types (CorpusData, Hyperdata)
...@@ -23,7 +24,7 @@ import Gargantext.Config.REST (AffRESTError, RESTError(..)) ...@@ -23,7 +24,7 @@ import Gargantext.Config.REST (AffRESTError, RESTError(..))
import Gargantext.Data.Array as GDA import Gargantext.Data.Array as GDA
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Routes (SessionRoute(Children, NodeAPI)) import Gargantext.Routes (SessionRoute(Children, NodeAPI))
import Gargantext.Sessions (Session, get, put) import Gargantext.Sessions (Session, get, post, put)
import Gargantext.Types (AffETableResult, NodeType(..), ID) import Gargantext.Types (AffETableResult, NodeType(..), ID)
import Gargantext.Utils ((?)) import Gargantext.Utils ((?))
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
...@@ -418,35 +419,9 @@ loadCorpus { nodeId, session } = do ...@@ -418,35 +419,9 @@ loadCorpus { nodeId, session } = do
case res of case res of
Left err -> pure $ Left err Left err -> pure $ Left err
Right (NodePoly { parentId: corpusId } :: NodePoly {}) -> do Right (NodePoly { parentId: corpusId } :: NodePoly {}) -> do
eCorpusNode <- get session $ corpusNodeRoute (fromMaybe 0 corpusId) "" fetchCorpusNode session corpusId
eDefaultListIds <-
(get session $ defaultListIdsRoute (fromMaybe 0 corpusId))
:: forall a. JSON.ReadForeign a => AffETableResult (NodePoly a)
case eCorpusNode of
Left err -> pure $ Left err
Right corpusNode -> do
case eDefaultListIds of
Left err -> pure $ Left err
Right defaultListIds -> do
case (A.head defaultListIds.docs :: Maybe (NodePoly HyperdataList)) of
Just (NodePoly { id: defaultListId }) ->
pure $ Right { corpusId: (fromMaybe 0 corpusId), corpusNode, defaultListId }
Nothing ->
pure $ Left $ CustomError "Missing default list"
-- (NodePoly {parentId: corpusId} :: NodePoly {}) <- get session nodePolyRoute
-- corpusNode <- get session $ corpusNodeRoute corpusId ""
-- defaultListIds <- (get session $ defaultListIdsRoute corpusId)
-- :: forall a. JSON.ReadForeign a => AffTableResult (NodePoly a)
-- case (A.head defaultListIds.docs :: Maybe (NodePoly HyperdataList)) of
-- Just (NodePoly { id: defaultListId }) ->
-- pure {corpusId, corpusNode, defaultListId}
-- Nothing ->
-- throwError $ error "Missing default list"
where where
nodePolyRoute = NodeAPI Corpus (Just nodeId) "" nodePolyRoute = NodeAPI Corpus (Just nodeId) ""
corpusNodeRoute = NodeAPI Corpus <<< Just
defaultListIdsRoute = Children NodeList 0 1 Nothing <<< Just
loadCorpusWithChild :: Record LoadProps -> AffRESTError CorpusData loadCorpusWithChild :: Record LoadProps -> AffRESTError CorpusData
loadCorpusWithChild { nodeId: childId, session } = do loadCorpusWithChild { nodeId: childId, session } = do
...@@ -456,24 +431,38 @@ loadCorpusWithChild { nodeId: childId, session } = do ...@@ -456,24 +431,38 @@ loadCorpusWithChild { nodeId: childId, session } = do
Left err -> pure $ Left err Left err -> pure $ Left err
Right listNode -> do Right listNode -> do
let (NodePoly { parentId: corpusId } :: NodePoly {}) = listNode let (NodePoly { parentId: corpusId } :: NodePoly {}) = listNode
eCorpusNode <- get session $ corpusNodeRoute (fromMaybe 0 corpusId) "" fetchCorpusNode session corpusId
case eCorpusNode of where
listNodeRoute = NodeAPI Node <<< Just
fetchCorpusNode session corpusId = do
eCorpusNode <- get session $ corpusNodeRoute defaultCorpusId ""
case eCorpusNode of
Left err -> pure $ Left err
Right corpusNode -> do
eDefaultListId <- fetchDefaultList session defaultCorpusId
case eDefaultListId of
Left err -> pure $ Left err Left err -> pure $ Left err
Right corpusNode -> do Right defaultListId ->
eDefaultListIds <- pure $ Right { corpusId: defaultCorpusId, corpusNode, defaultListId }
(get session $ defaultListIdsRoute (fromMaybe 0 corpusId))
:: forall a. JSON.ReadForeign a => AffETableResult (NodePoly a)
case eDefaultListIds of
Left err -> pure $ Left err
Right defaultListIds -> do
case (A.head defaultListIds.docs :: Maybe (NodePoly HyperdataList)) of
Just (NodePoly { id: defaultListId }) ->
pure $ Right { corpusId: fromMaybe 0 corpusId, corpusNode, defaultListId }
Nothing ->
throwError $ error "Missing default list"
where where
defaultCorpusId = fromMaybe 0 corpusId
corpusNodeRoute = NodeAPI Corpus <<< Just corpusNodeRoute = NodeAPI Corpus <<< Just
listNodeRoute = NodeAPI Node <<< Just
fetchDefaultList :: Session -> ID -> AffRESTError ID
fetchDefaultList session corpusId = do
eDefaultListIds <-
(get session $ defaultListIdsRoute corpusId)
:: forall a. JSON.ReadForeign a => AffETableResult (NodePoly a)
case eDefaultListIds of
Left err -> pure $ Left err
Right defaultListIds -> do
case (A.head defaultListIds.docs :: Maybe (NodePoly HyperdataList)) of
Just (NodePoly { id: defaultListId }) ->
pure $ Right defaultListId
Nothing ->
pure $ Left $ CustomError "Missing default list"
where
defaultListIdsRoute = Children NodeList 0 1 Nothing <<< Just defaultListIdsRoute = Children NodeList 0 1 Nothing <<< Just
type LoadWithReloadProps = type LoadWithReloadProps =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment