Skip to content

Commit

Permalink
Update docs and package
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrocp committed Aug 2, 2024
1 parent 37d7334 commit 3cd6d60
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
4 changes: 2 additions & 2 deletions guides/introduction/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Note that Beacon supports Umbrella applications as well.
7. Add `:beacon` and `:beacon_live_admin` dependencies to `mix.exs`

```diff
+ {:beacon, github: "BeaconCMS/beacon", override: true},
+ {:beacon_live_admin, github: "BeaconCMS/beacon_live_admin"},
+ {:beacon, "~> 0.1.0-rc.0", override: true},
+ {:beacon_live_admin, "~> 0.1.0-rc.0"},
```

8. Add `:beacon` and `:beacon_live_admin` into `:import_deps` in file `.formatter.exs`
Expand Down
15 changes: 0 additions & 15 deletions lib/beacon/template/heex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,6 @@ defmodule Beacon.Template.HEEx do
Handles loading and compilation of HEEx templates.
"""

@doc """
Check if the template is safe.
Perform the check using https://github.com/TheFirstAvenger/safe_code
"""
@spec safe_code_check(String.t()) :: {:ok, String.t()} | {:error, Exception.t()}
def safe_code_check(template) when is_binary(template) do
# TODO: enable safe code when it's ready to parse complex templates
# SafeCode.Validator.validate!(template, extra_function_validators: Beacon.Loader.SafeCodeImpl)
{:ok, template}
rescue
exception ->
{:error, exception}
end

@doc """
Compile `template` returning its AST.
"""
Expand Down
5 changes: 3 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ defmodule Beacon.MixProject do
links: %{
Changelog: "https://hexdocs.pm/beacon/changelog.html",
GitHub: @source_url,
Website: @homepage_url
Website: @homepage_url,
DockYard: "https://dockyard.com"
},
files:
~w(lib priv .formatter.exs mix.exs CHANGELOG.md LICENSE.md)
Expand Down Expand Up @@ -78,7 +79,7 @@ defmodule Beacon.MixProject do
{:phoenix_html_helpers, "~> 1.0"},
{:phoenix_pubsub, "~> 2.1"},
{:postgrex, "~> 0.16"},
{:safe_code, github: "TheFirstAvenger/safe_code"},
{:safe_code, "~> 0.2"},
{:solid, "~> 0.14"},
{:tailwind, "~> 0.2"},

Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"httpoison": {:hex, :httpoison, "2.2.1", "87b7ed6d95db0389f7df02779644171d7319d319178f6680438167d7b69b1f3d", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "51364e6d2f429d80e14fe4b5f8e39719cacd03eb3f9a9286e61e216feac2d2df"},
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
"image": {:hex, :image, "0.53.0", "77ba25c41992a2f230ef991040e110a0558badc22d83cb9a0faf9b68209a3961", [:mix], [{:bumblebee, "~> 0.3", [hex: :bumblebee, repo: "hexpm", optional: true]}, {:evision, "~> 0.1.33 or ~> 0.2", [hex: :evision, repo: "hexpm", optional: true]}, {:exla, "~> 0.5", [hex: :exla, repo: "hexpm", optional: true]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: true]}, {:kino, "~> 0.13", [hex: :kino, repo: "hexpm", optional: true]}, {:nx, "~> 0.7", [hex: :nx, repo: "hexpm", optional: true]}, {:nx_image, "~> 0.1", [hex: :nx_image, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.1 or ~> 3.2 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.13", [hex: :plug, repo: "hexpm", optional: true]}, {:req, "~> 0.4", [hex: :req, repo: "hexpm", optional: true]}, {:rustler, "> 0.0.0", [hex: :rustler, repo: "hexpm", optional: true]}, {:scholar, "~> 0.3", [hex: :scholar, repo: "hexpm", optional: true]}, {:sweet_xml, "~> 0.7", [hex: :sweet_xml, repo: "hexpm", optional: false]}, {:vix, "~> 0.23", [hex: :vix, repo: "hexpm", optional: false]}], "hexpm", "ce06fff64b4dcf34a64c2b0dc907d0ce51cca85566912a9d5b8ec3378fe3e902"},
"jason": {:hex, :jason, "1.4.3", "d3f984eeb96fe53b85d20e0b049f03e57d075b5acda3ac8d465c969a2536c17b", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "9a90e868927f7c777689baa16d86f4d0e086d968db5c05d917ccff6d443e58a3"},
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
"live_monaco_editor": {:hex, :live_monaco_editor, "0.1.8", "149c02cab1c595fe2d2049cffb0a424db2a329a5fa848ee8b778d5acd8694733", [:mix], [{:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.7", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.18", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "9a56e88a61cdf6d58081627e4842f4e3a8e3a75dd8749f271a464164ad4530f1"},
"makeup": {:hex, :makeup, "1.1.2", "9ba8837913bdf757787e71c1581c21f9d2455f4dd04cfca785c70bbfff1a76a3", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cce1566b81fbcbd21eca8ffe808f33b221f9eee2cbc7a1706fc3da9ff18e6cac"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.2", "627e84b8e8bf22e60a2579dad15067c755531fea049ae26ef1020cad58fe9578", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "41193978704763f6bbe6cc2758b84909e62984c7752b3784bd3c218bb341706b"},
Expand Down Expand Up @@ -57,7 +57,7 @@
"postgrex": {:hex, :postgrex, "0.18.0", "f34664101eaca11ff24481ed4c378492fed2ff416cd9b06c399e90f321867d7e", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "a042989ba1bc1cca7383ebb9e461398e3f89f868c92ce6671feb7ef132a252d1"},
"ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"},
"rustler_precompiled": {:hex, :rustler_precompiled, "0.7.2", "097f657e401f02e7bc1cab808cfc6abdc1f7b9dc5e5adee46bf2fd8fdcce9ecf", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:rustler, "~> 0.23", [hex: :rustler, repo: "hexpm", optional: true]}], "hexpm", "7663faaeadc9e93e605164dcf9e69168e35f2f8b7f2b9eb4e400d1a8e0fe2999"},
"safe_code": {:git, "https://github.com/TheFirstAvenger/safe_code.git", "3d994c619431018cea20ed2a31dbd6fb1f8dedf2", []},
"safe_code": {:hex, :safe_code, "0.2.3", "c37329a03d4ac847ccd437344abdbb6d8a8ff6a46f1b6e5ad976bf9a86a5227f", [:mix], [{:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: false]}, {:phoenix_live_view, ">= 0.18.17", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "de5f3ad37d0f7804281f42be8dac32ee52f7b5f7c5c4c851eba34e42bffd4aef"},
"solid": {:hex, :solid, "0.15.2", "6921af98a3a862041bb6af72b5f6e094dbf0242366b142f98a92cabe4ed30d2a", [:mix], [{:nimble_parsec, "~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "18b062b04948b7f7b99ac4a9360681dac7e0bd142df5e62a7761696c7384be45"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
"sweet_xml": {:hex, :sweet_xml, "0.7.4", "a8b7e1ce7ecd775c7e8a65d501bc2cd933bff3a9c41ab763f5105688ef485d08", [:mix], [], "hexpm", "e7c4b0bdbf460c928234951def54fe87edf1a170f6896675443279e2dbeba167"},
Expand Down

0 comments on commit 3cd6d60

Please sign in to comment.