diff --git a/R/get.R b/R/get.R index 01e41f06..ba39384e 100644 --- a/R/get.R +++ b/R/get.R @@ -1131,11 +1131,16 @@ get_runtimes <- function(client, runtimes = NULL) { } } - purrr::map_dfr(runtimes, function(runtime) { - res <- client$GET(paste0("v1/server_settings/", runtime)) - res_df <- purrr::map_dfr(res$installations, ~ tibble::as_tibble(.)) - tibble::add_column(res_df, runtime = runtime, .before = 1) - }) + purrr::list_rbind(purrr::map( + runtimes, + function(runtime) { + res <- client$GET(paste0("v1/server_settings/", runtime)) + res_df <- purrr::list_rbind( + purrr::map(res$installations, ~ tibble::as_tibble(.)) + ) + tibble::add_column(res_df, runtime = runtime, .before = 1) + } + )) } #' All package dependencies on the server diff --git a/R/groups.R b/R/groups.R index 716ffdc4..79d98edb 100644 --- a/R/groups.R +++ b/R/groups.R @@ -149,9 +149,11 @@ get_group_members <- function(src, guid) { get_group_content <- function(src, guids) { validate_R6_class(src, "Connect") - purrr::map_dfr( - guids, - ~ get_one_groups_content(src = src, guid = .x) + purrr::list_rbind( + purrr::map( + guids, + ~ get_one_groups_content(src = src, guid = .x) + ) ) } @@ -172,11 +174,16 @@ get_one_groups_content <- function(src, guid) { } parsed <- parse_connectapi_typed(res, connectapi_ptypes$group_content) - permissions_df <- purrr::map_dfr( - parsed$permissions, - ~ purrr::keep( - .x, - ~ .x[["principal_guid"]] == guid + permissions_df <- purrr::list_rbind( + purrr::map( + parsed$permissions, + ~ tibble::as_tibble(unlist( + purrr::keep( + .x, + ~ .x[["principal_guid"]] == guid + ), + recursive = FALSE + )) ) ) diff --git a/R/parse.R b/R/parse.R index 22d582fe..d9e29e68 100644 --- a/R/parse.R +++ b/R/parse.R @@ -82,10 +82,10 @@ parse_connectapi_typed <- function(data, ptype, strict = FALSE) { } parse_connectapi <- function(data) { - tibble::as_tibble(purrr::map_df( + purrr::list_rbind(purrr::map( data, function(x) { - purrr::map( + tibble::as_tibble(purrr::map( .x = x, .f = function(y) { if (is.list(y)) { @@ -100,7 +100,7 @@ parse_connectapi <- function(data) { } return(prep) } - ) + )) } )) } diff --git a/R/runtime-caches.R b/R/runtime-caches.R index c770b2de..11ed4fcc 100644 --- a/R/runtime-caches.R +++ b/R/runtime-caches.R @@ -21,7 +21,7 @@ get_runtime_caches <- function(client) { validate_R6_class(client, "Connect") res <- client$GET(v1_url("system/caches/runtime")) - purrr::map_dfr(res$caches, ~.x) + purrr::list_rbind(purrr::map(res$caches, ~ tibble::as_tibble(.x))) } #' Delete a runtime cache diff --git a/R/tags.R b/R/tags.R index f48c4949..98e59493 100644 --- a/R/tags.R +++ b/R/tags.R @@ -472,7 +472,7 @@ tag_tree <- function(.x) { } parse_tags_tbl <- function(x) { - parsed_tags <- purrr::map_dfr( + parsed_tags <- purrr::list_rbind(purrr::map( x, ~ { out <- tibble::tibble( @@ -490,7 +490,7 @@ parse_tags_tbl <- function(x) { return(out) } - ) + )) return(parsed_tags) }