auto-format

This commit is contained in:
Mayel de Borniol 2022-09-12 16:34:14 +12:00
parent 9d0ca204ad
commit 0ef85e77f9
364 changed files with 8650 additions and 4590 deletions

View file

@ -3,14 +3,20 @@
%{ %{
name: "default", name: "default",
files: %{ files: %{
included: ["mix.exs", "flavours/", "lib/", "forks/*/mix.exs", "forks/*/lib"], included: [
"mix.exs",
"flavours/",
"lib/",
"forks/*/mix.exs",
"forks/*/lib"
],
excluded: [~r"/_build/", "**/*_test.exs"] excluded: [~r"/_build/", "**/*_test.exs"]
}, },
plugins: [], plugins: [],
requires: [], requires: [],
strict: false, strict: false,
parse_timeout: 5000, parse_timeout: 5000,
color: true, color: true
# checks: [ # checks: [
# {Credo.Check.Design.AliasUsage, priority: :low}, # {Credo.Check.Design.AliasUsage, priority: :low},
# # ... other checks omitted for readability ... # # ... other checks omitted for readability ...

View file

@ -1,15 +1,21 @@
[ [
import_deps: [:surface], import_deps: [:surface],
plugins: [Surface.Formatter.Plugin], plugins: [Phoenix.LiveView.HTMLFormatter, Surface.Formatter.Plugin],
# add patterns matching all .sface files and all .ex files with ~F sigils # add patterns matching all .sface files and all .ex files with ~F sigils
inputs: ["*.{ex,exs}", "{config,lib,test,forks}/**/*.{ex,exs,sface}"], inputs: [
"{mix,.formatter,mess}.exs",
"{flavours,lib,test}/**/*.{ex,exs,sface,heex}",
"forks/bonfire*/{config,lib,test}/**/*.{ex,exs,sface,heex}"
],
# THE FOLLOWING ARE OPTIONAL: # THE FOLLOWING ARE OPTIONAL:
# set desired line length for both Elixir's code formatter and this one # set desired line length for both Elixir's code formatter and this one
# (only affects opening tags in Surface) # (only affects opening tags in Surface)
line_length: 80, line_length: 98
# heex_line_length: 84,
# or, set line length only for Surface code (overrides `line_length`) # or, set line length only for Surface code (overrides `line_length`)
# surface_line_length: 84 # surface_line_length: 84

View file

@ -24,9 +24,9 @@ if module_enabled?(Bonfire.Common.Test.Interactive) && Mix.env() == :test do
Process.unlink(pid) Process.unlink(pid)
end end
Bonfire.Common.Test.Interactive.Helpers.ready Bonfire.Common.Test.Interactive.Helpers.ready()
else else
info("IExWatchTests is not running") info("IExWatchTests is not running")
end end
import_if_enabled Bonfire.Common.Test.Interactive.Helpers
import_if_enabled(Bonfire.Common.Test.Interactive.Helpers)

32
.recode.exs Normal file
View file

@ -0,0 +1,32 @@
alias Recode.Task
[
version: "0.4.0",
# Can also be set/reset with "--autocorrect"/"--no-autocorrect".
autocorrect: true,
# With "--dry" no changes will be written to the files.
# Can also be set/reset with "--dry"/"--no-dry".
# If dry is true then verbose is also active.
dry: true,
# Can also be set/reset with "--verbose"/"--no-verbose".
verbose: true,
# Can be overwriten by calling `mix recode "lib/**/*.ex"`.
inputs: [
"{flavours,lib,test}/**/*.{ex,exs}",
"forks/bonfire*/{config,lib,test}/**/*.{ex,exs}"
],
formatter: {Recode.Formatter, []},
tasks: [
# Tasks could be added by a tuple of the tasks module name and an options
# keyword list. A task can be deactived by `active: false`. The execution of
# a deactivated task can be forced by calling `mix recode --task ModuleName`.
{Task.AliasExpansion, []},
{Task.AliasOrder, active: false},
{Task.EnforceLineLength, active: false},
{Task.PipeFunOne, []},
{Task.SinglePipe, active: false}, # Note: does not known how to handle `Arrows`
{Task.Specs, active: false, exclude: "{test}/**/*.{ex,exs}", config: [only: :visible]},
{Task.TestFileExt, []},
{Task.UnusedVariable, active: false}
]
]

View file

@ -49,7 +49,7 @@
"tailwindcss-debug-screens": "^2.2.1" "tailwindcss-debug-screens": "^2.2.1"
}, },
"optionalDependencies": { "optionalDependencies": {
"chromedriver": "^103.0.0" "chromedriver": "^105.0.0"
}, },
"disabledDependencies": { "disabledDependencies": {
"@rtvision/esbuild-dynamic-import": "^0.2.0", "@rtvision/esbuild-dynamic-import": "^0.2.0",

View file

@ -12,6 +12,11 @@
resolved "https://registry.yarnpkg.com/@alpinejs/intersect/-/intersect-3.10.3.tgz#9aebf43b40e02b0f53e244229472cc3f1d1ed304" resolved "https://registry.yarnpkg.com/@alpinejs/intersect/-/intersect-3.10.3.tgz#9aebf43b40e02b0f53e244229472cc3f1d1ed304"
integrity sha512-vMRvhbMJzS1tupb2a/3GF5H+gLxxWaXJpcxJlfSHrV2JTb+RFWOJIkL/63JpPPGibtpaNBDrx3hsRN0CJ4d5mw== integrity sha512-vMRvhbMJzS1tupb2a/3GF5H+gLxxWaXJpcxJlfSHrV2JTb+RFWOJIkL/63JpPPGibtpaNBDrx3hsRN0CJ4d5mw==
"@esbuild/linux-loong64@0.14.54":
version "0.14.54"
resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz#de2a4be678bd4d0d1ffbb86e6de779cde5999028"
integrity sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==
"@nodelib/fs.scandir@2.1.5": "@nodelib/fs.scandir@2.1.5":
version "2.1.5" version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@ -34,25 +39,26 @@
fastq "^1.6.0" fastq "^1.6.0"
"@tailwindcss/forms@^0.5.2": "@tailwindcss/forms@^0.5.2":
version "0.5.2" version "0.5.3"
resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.5.2.tgz#4ef45f9916dcb37838cbe7fecdcc4ba7a7c2ab59" resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.5.3.tgz#e4d7989686cbcaf416c53f1523df5225332a86e7"
integrity sha512-pSrFeJB6Bg1Mrg9CdQW3+hqZXAKsBrSG9MAfFLKy1pVA4Mb4W7C0k7mEhlmS2Dfo/otxrQOET7NJiJ9RrS563w== integrity sha512-y5mb86JUoiUgBjY/o6FJSFZSEttfb3Q5gllE4xoKjAAD+vBrnIhE4dViwUuow3va8mpH4s9jyUbUbrRGoRdc2Q==
dependencies: dependencies:
mini-svg-data-uri "^1.2.3" mini-svg-data-uri "^1.2.3"
"@tailwindcss/line-clamp@^0.4.0": "@tailwindcss/line-clamp@^0.4.0":
version "0.4.0" version "0.4.2"
resolved "https://registry.yarnpkg.com/@tailwindcss/line-clamp/-/line-clamp-0.4.0.tgz#03353e31e77636b785f2336e8c978502cec1de81" resolved "https://registry.yarnpkg.com/@tailwindcss/line-clamp/-/line-clamp-0.4.2.tgz#f353c5a8ab2c939c6267ac5b907f012e5ee130f9"
integrity sha512-HQZo6gfx1D0+DU3nWlNLD5iA6Ef4JAXh0LeD8lOGrJwEDBwwJNKQza6WoXhhY1uQrxOuU8ROxV7CqiQV4CoiLw== integrity sha512-HFzAQuqYCjyy/SX9sLGB1lroPzmcnWv1FHkIpmypte10hptf4oPUfucryMKovZh2u0uiS9U5Ty3GghWfEJGwVw==
"@tailwindcss/typography@^0.5.2": "@tailwindcss/typography@^0.5.2":
version "0.5.4" version "0.5.7"
resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.5.4.tgz#ad8c9e6808bae297bb7826742e4789f2a9f09a48" resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.5.7.tgz#e0b95bea787ee14c5a34a74fc824e6fe86ea8855"
integrity sha512-QEdg40EmGvE7kKoDei8zr5sf4D1pIayHj4R31bH3lX8x2BtTiR+jNejYPOkhbmy3DXgkMF9jC8xqNiGFAuL9Sg== integrity sha512-JTTSTrgZfp6Ki4svhPA4mkd9nmQ/j9EfE7SbHJ1cLtthKkpW2OxsFXzSmxbhYbEkfNIyAyhle5p4SYyKRbz/jg==
dependencies: dependencies:
lodash.castarray "^4.4.0" lodash.castarray "^4.4.0"
lodash.isplainobject "^4.0.6" lodash.isplainobject "^4.0.6"
lodash.merge "^4.6.2" lodash.merge "^4.6.2"
postcss-selector-parser "6.0.10"
"@testim/chrome-version@^1.1.2": "@testim/chrome-version@^1.1.2":
version "1.1.2" version "1.1.2"
@ -60,9 +66,9 @@
integrity sha512-1c4ZOETSRpI0iBfIFUqU4KqwBAB2lHUAlBjZz/YqOHqwM9dTTzjV6Km0ZkiEiSCx/tLr1BtESIKyWWMww+RUqw== integrity sha512-1c4ZOETSRpI0iBfIFUqU4KqwBAB2lHUAlBjZz/YqOHqwM9dTTzjV6Km0ZkiEiSCx/tLr1BtESIKyWWMww+RUqw==
"@types/node@*": "@types/node@*":
version "18.6.1" version "18.7.16"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.1.tgz#828e4785ccca13f44e2fb6852ae0ef11e3e20ba5" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.16.tgz#0eb3cce1e37c79619943d2fd903919fc30850601"
integrity sha512-z+2vB6yDt1fNwKOeGbckpmirO+VBDuQqecXkgeIqDlaOtmKn6hPR/viQ8cxCfqLU4fTlvM3+YjM367TukWdxpg== integrity sha512-EQHhixfu+mkqHMZl1R2Ovuvn47PUw18azMJOTwSZr9/fhzHNGXAJ0ma0dayRVchprpCj0Kc1K1xKoWaATWF1qg==
"@types/yauzl@^2.9.1": "@types/yauzl@^2.9.1":
version "2.10.0" version "2.10.0"
@ -84,9 +90,9 @@
integrity sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA== integrity sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==
"@yaireo/tagify@^4.12.0": "@yaireo/tagify@^4.12.0":
version "4.14.1" version "4.16.4"
resolved "https://registry.yarnpkg.com/@yaireo/tagify/-/tagify-4.14.1.tgz#2657426ec64a12f1a1000400a7be6bba319a2657" resolved "https://registry.yarnpkg.com/@yaireo/tagify/-/tagify-4.16.4.tgz#78d2cbb56cd083af175d3cb48178ada0b37d9872"
integrity sha512-Yo/keCvgGRNV2KA6M8W/A2XUV4S9lTX+VYWwErWMJxKgzfMlZmhaOqkmuQBbGCvSS/GcLW4lzcV+IxPd+yPEXA== integrity sha512-7x13aVfYPGUUMXWkV11/Zw4w1RkkTWtaO/rEAkaOFNwGIFXDBeG5Wr4gWF6JSHXLZAreS53nHq6b6mJrtpUgYA==
acorn-node@^1.8.2: acorn-node@^1.8.2:
version "1.8.2" version "1.8.2"
@ -165,12 +171,12 @@ asynckit@^0.4.0:
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
autoprefixer@^10.4.7: autoprefixer@^10.4.7:
version "10.4.7" version "10.4.9"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.7.tgz#1db8d195f41a52ca5069b7593be167618edbbedf" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.9.tgz#40f932f7d0535264823882031f9254ea72c693e5"
integrity sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA== integrity sha512-Uu67eduPEmOeA0vyJby5ghu1AAELCCNSsLAjK+lz6kYzNM5sqnBO36MqfsjhPjQF/BaJM5U/UuFYyl7PavY/wQ==
dependencies: dependencies:
browserslist "^4.20.3" browserslist "^4.21.3"
caniuse-lite "^1.0.30001335" caniuse-lite "^1.0.30001394"
fraction.js "^4.2.0" fraction.js "^4.2.0"
normalize-range "^0.1.2" normalize-range "^0.1.2"
picocolors "^1.0.0" picocolors "^1.0.0"
@ -214,15 +220,15 @@ braces@^3.0.2, braces@~3.0.2:
dependencies: dependencies:
fill-range "^7.0.1" fill-range "^7.0.1"
browserslist@^4.20.3: browserslist@^4.21.3:
version "4.21.2" version "4.21.3"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.2.tgz#59a400757465535954946a400b841ed37e2b4ecf" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.3.tgz#5df277694eb3c48bc5c4b05af3e8b7e09c5a6d1a"
integrity sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA== integrity sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==
dependencies: dependencies:
caniuse-lite "^1.0.30001366" caniuse-lite "^1.0.30001370"
electron-to-chromium "^1.4.188" electron-to-chromium "^1.4.202"
node-releases "^2.0.6" node-releases "^2.0.6"
update-browserslist-db "^1.0.4" update-browserslist-db "^1.0.5"
buffer-crc32@~0.2.3: buffer-crc32@~0.2.3:
version "0.2.13" version "0.2.13"
@ -242,10 +248,10 @@ camelcase-css@^2.0.1:
resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5"
integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==
caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001366: caniuse-lite@^1.0.30001370, caniuse-lite@^1.0.30001394:
version "1.0.30001370" version "1.0.30001397"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001370.tgz#0a30d4f20d38b9e108cc5ae7cc62df9fe66cd5ba" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001397.tgz#010d9d56e3b8abcd8df261d0a94b22426271a15f"
integrity sha512-3PDmaP56wz/qz7G508xzjx8C+MC2qEm4SYhSEzC9IBROo+dGXFWRuaXkWti0A9tuI00g+toiriVqxtWMgl350g== integrity sha512-SW9N2TbCdLf0eiNDRrrQXx2sOkaakNZbCjgNpPyMJJbiOrU5QzMIrXOVMRM1myBXTD5iTkdrtU/EguCrBocHlA==
chokidar@^3.3.0, chokidar@^3.5.3: chokidar@^3.3.0, chokidar@^3.5.3:
version "3.5.3" version "3.5.3"
@ -262,10 +268,10 @@ chokidar@^3.3.0, chokidar@^3.5.3:
optionalDependencies: optionalDependencies:
fsevents "~2.3.2" fsevents "~2.3.2"
chromedriver@^103.0.0: chromedriver@^105.0.0:
version "103.0.0" version "105.0.0"
resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-103.0.0.tgz#2ef086d62076e3ff6df6cfb84895d11d2c18d9cf" resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-105.0.0.tgz#81a68e2bc0618a640defd7317ddf6ae9127fc5e4"
integrity sha512-7BHf6HWt0PeOHCzWO8qlnD13sARzr5AKTtG8Csn+czsuAsajwPxdLNtry5GPh8HYFyl+i0M+yg3bT43AGfgU9w== integrity sha512-BX3GOUW5m6eiW9cVVF8hw+EFxvrGqYCxbwOqnpk8PjbNFqL5xjy7yel+e6ilJPjckAYFutMKs8XJvOs/W85vvg==
dependencies: dependencies:
"@testim/chrome-version" "^1.1.2" "@testim/chrome-version" "^1.1.2"
axios "^0.27.2" axios "^0.27.2"
@ -362,9 +368,9 @@ cssesc@^3.0.0:
integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
daisyui@^2.24.0: daisyui@^2.24.0:
version "2.24.0" version "2.27.0"
resolved "https://registry.yarnpkg.com/daisyui/-/daisyui-2.24.0.tgz#7eacfc943815979227cf50b98f7df622c2814118" resolved "https://registry.yarnpkg.com/daisyui/-/daisyui-2.27.0.tgz#145e75e17529f81a113c84e86cc5312e01799f88"
integrity sha512-Fdu/4LCdTfWLWAbCuPxvnaRotEfJ+hVPgZ2kv/aUk9RZ00Yk8fGdJtIf0kXJ3IgUKOr8rCXUpfQY6DQU9usPCQ== integrity sha512-AhFGhTore1Kdnae+5RGc2PGESSXOjAQDHJfvryP+KY41gxMcNErtuaGZG+nOmvOzNKgxViSDSaOn/VZq6H8kxA==
dependencies: dependencies:
color "^4.2" color "^4.2"
css-selector-tokenizer "^0.8.0" css-selector-tokenizer "^0.8.0"
@ -455,10 +461,10 @@ duplexer@^0.1.1:
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6"
integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==
electron-to-chromium@^1.4.188: electron-to-chromium@^1.4.202:
version "1.4.202" version "1.4.247"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.202.tgz#0c2ed733f42b02ec49a955c5badfcc65888c390b" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.247.tgz#cc93859bc5fc521f611656e65ce17eae26a0fd3d"
integrity sha512-JYsK2ex9lmQD27kj19fhXYxzFJ/phLAkLKHv49A5UY6kMRV2xED3qMMLg/voW/+0AR6wMiI+VxlmK9NDtdxlPA== integrity sha512-FLs6R4FQE+1JHM0hh3sfdxnYjKvJpHZyhQDjc2qFq/xFvmmRt/TATNToZhrcGUFzpF2XjeiuozrA8lI0PZmYYw==
emoji-regex@^8.0.0: emoji-regex@^8.0.0:
version "8.0.0" version "8.0.0"
@ -472,131 +478,132 @@ end-of-stream@^1.1.0:
dependencies: dependencies:
once "^1.4.0" once "^1.4.0"
esbuild-android-64@0.14.50: esbuild-android-64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.50.tgz#a46fc80fa2007690e647680d837483a750a3097f" resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz#505f41832884313bbaffb27704b8bcaa2d8616be"
integrity sha512-H7iUEm7gUJHzidsBlFPGF6FTExazcgXL/46xxLo6i6bMtPim6ZmXyTccS8yOMpy6HAC6dPZ/JCQqrkkin69n6Q== integrity sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==
esbuild-android-arm64@0.14.50: esbuild-android-arm64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.50.tgz#bdda7851fa7f5f770d6ff0ad593a8945d3a0fcdd" resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz#8ce69d7caba49646e009968fe5754a21a9871771"
integrity sha512-NFaoqEwa+OYfoYVpQWDMdKII7wZZkAjtJFo1WdnBeCYlYikvUhTnf2aPwPu5qEAw/ie1NYK0yn3cafwP+kP+OQ== integrity sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==
esbuild-darwin-64@0.14.50: esbuild-darwin-64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.50.tgz#f0535435f9760766f30db14a991ee5ca94c022a4" resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz#24ba67b9a8cb890a3c08d9018f887cc221cdda25"
integrity sha512-gDQsCvGnZiJv9cfdO48QqxkRV8oKAXgR2CGp7TdIpccwFdJMHf8hyIJhMW/05b/HJjET/26Us27Jx91BFfEVSA== integrity sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==
esbuild-darwin-arm64@0.14.50: esbuild-darwin-arm64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.50.tgz#76a41a40e8947a15ae62970e9ed2853883c4b16c" resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz#3f7cdb78888ee05e488d250a2bdaab1fa671bf73"
integrity sha512-36nNs5OjKIb/Q50Sgp8+rYW/PqirRiFN0NFc9hEvgPzNJxeJedktXwzfJSln4EcRFRh5Vz4IlqFRScp+aiBBzA== integrity sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==
esbuild-freebsd-64@0.14.50: esbuild-freebsd-64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.50.tgz#2ed6633c17ed42c20a1bd68e82c4bbc75ea4fb57" resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz#09250f997a56ed4650f3e1979c905ffc40bbe94d"
integrity sha512-/1pHHCUem8e/R86/uR+4v5diI2CtBdiWKiqGuPa9b/0x3Nwdh5AOH7lj+8823C6uX1e0ufwkSLkS+aFZiBCWxA== integrity sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==
esbuild-freebsd-arm64@0.14.50: esbuild-freebsd-arm64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.50.tgz#cb115f4cdafe9cdbe58875ba482fccc54d32aa43" resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz#bafb46ed04fc5f97cbdb016d86947a79579f8e48"
integrity sha512-iKwUVMQztnPZe5pUYHdMkRc9aSpvoV1mkuHlCoPtxZA3V+Kg/ptpzkcSY+fKd0kuom+l6Rc93k0UPVkP7xoqrw== integrity sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==
esbuild-linux-32@0.14.50: esbuild-linux-32@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.50.tgz#fe2b724994dcf1d4e48dc4832ff008ad7d00bcfd" resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz#e2a8c4a8efdc355405325033fcebeb941f781fe5"
integrity sha512-sWUwvf3uz7dFOpLzYuih+WQ7dRycrBWHCdoXJ4I4XdMxEHCECd8b7a9N9u7FzT6XR2gHPk9EzvchQUtiEMRwqw== integrity sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==
esbuild-linux-64@0.14.50: esbuild-linux-64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.50.tgz#7851ab5151df9501a2187bd4909c594ad232b623" resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz#de5fdba1c95666cf72369f52b40b03be71226652"
integrity sha512-u0PQxPhaeI629t4Y3EEcQ0wmWG+tC/LpP2K7yDFvwuPq0jSQ8SIN+ARNYfRjGW15O2we3XJvklbGV0wRuUCPig== integrity sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==
esbuild-linux-arm64@0.14.50: esbuild-linux-arm64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.50.tgz#76a76afef484a0512f1fbbcc762edd705dee8892" resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz#dae4cd42ae9787468b6a5c158da4c84e83b0ce8b"
integrity sha512-ZyfoNgsTftD7Rp5S7La5auomKdNeB3Ck+kSKXC4pp96VnHyYGjHHXWIlcbH8i+efRn9brszo1/Thl1qn8RqmhQ== integrity sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==
esbuild-linux-arm@0.14.50: esbuild-linux-arm@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.50.tgz#6d7a8c0712091b0c3a668dd5d8b5c924adbaeb12" resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz#a2c1dff6d0f21dbe8fc6998a122675533ddfcd59"
integrity sha512-VALZq13bhmFJYFE/mLEb+9A0w5vo8z+YDVOWeaf9vOTrSC31RohRIwtxXBnVJ7YKLYfEMzcgFYf+OFln3Y0cWg== integrity sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==
esbuild-linux-mips64le@0.14.50: esbuild-linux-mips64le@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.50.tgz#43426909c1884c5dc6b40765673a08a7ec1d2064" resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz#d9918e9e4cb972f8d6dae8e8655bf9ee131eda34"
integrity sha512-ygo31Vxn/WrmjKCHkBoutOlFG5yM9J2UhzHb0oWD9O61dGg+Hzjz9hjf5cmM7FBhAzdpOdEWHIrVOg2YAi6rTw== integrity sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==
esbuild-linux-ppc64le@0.14.50: esbuild-linux-ppc64le@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.50.tgz#c754ea3da1dd180c6e9b6b508dc18ce983d92b11" resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz#3f9a0f6d41073fb1a640680845c7de52995f137e"
integrity sha512-xWCKU5UaiTUT6Wz/O7GKP9KWdfbsb7vhfgQzRfX4ahh5NZV4ozZ4+SdzYG8WxetsLy84UzLX3Pi++xpVn1OkFQ== integrity sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==
esbuild-linux-riscv64@0.14.50: esbuild-linux-riscv64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.50.tgz#f3b2dd3c4c2b91bf191d3b98a9819c8aa6f5ad7f" resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz#618853c028178a61837bc799d2013d4695e451c8"
integrity sha512-0+dsneSEihZTopoO9B6Z6K4j3uI7EdxBP7YSF5rTwUgCID+wHD3vM1gGT0m+pjCW+NOacU9kH/WE9N686FHAJg== integrity sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==
esbuild-linux-s390x@0.14.50: esbuild-linux-s390x@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.50.tgz#3dfbc4578b2a81995caabb79df2b628ea86a5390" resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz#d1885c4c5a76bbb5a0fe182e2c8c60eb9e29f2a6"
integrity sha512-tVjqcu8o0P9H4StwbIhL1sQYm5mWATlodKB6dpEZFkcyTI8kfIGWiWcrGmkNGH2i1kBUOsdlBafPxR3nzp3TDA== integrity sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==
esbuild-netbsd-64@0.14.50: esbuild-netbsd-64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.50.tgz#17dbf51eaa48d983e794b588d195415410ef8c85" resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz#69ae917a2ff241b7df1dbf22baf04bd330349e81"
integrity sha512-0R/glfqAQ2q6MHDf7YJw/TulibugjizBxyPvZIcorH0Mb7vSimdHy0XF5uCba5CKt+r4wjax1mvO9lZ4jiAhEg== integrity sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==
esbuild-openbsd-64@0.14.50: esbuild-openbsd-64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.50.tgz#cf6b1a50c8cf67b0725aaa4bce9773976168c50e" resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz#db4c8495287a350a6790de22edea247a57c5d47b"
integrity sha512-7PAtmrR5mDOFubXIkuxYQ4bdNS6XCK8AIIHUiZxq1kL8cFIH5731jPcXQ4JNy/wbj1C9sZ8rzD8BIM80Tqk29w== integrity sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==
esbuild-sunos-64@0.14.50: esbuild-sunos-64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.50.tgz#f705ae0dd914c3b45dc43319c4f532216c3d841f" resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz#54287ee3da73d3844b721c21bc80c1dc7e1bf7da"
integrity sha512-gBxNY/wyptvD7PkHIYcq7se6SQEXcSC8Y7mE0FJB+CGgssEWf6vBPfTTZ2b6BWKnmaP6P6qb7s/KRIV5T2PxsQ== integrity sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==
esbuild-windows-32@0.14.50: esbuild-windows-32@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.50.tgz#6364905a99c1e6c1e2fe7bfccebd958131b1cd6c" resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz#f8aaf9a5667630b40f0fb3aa37bf01bbd340ce31"
integrity sha512-MOOe6J9cqe/iW1qbIVYSAqzJFh0p2LBLhVUIWdMVnNUNjvg2/4QNX4oT4IzgDeldU+Bym9/Tn6+DxvUHJXL5Zw== integrity sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==
esbuild-windows-64@0.14.50: esbuild-windows-64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.50.tgz#56603cb6367e30d14098deb77de6aa18d76dd89b" resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz#bf54b51bd3e9b0f1886ffdb224a4176031ea0af4"
integrity sha512-r/qE5Ex3w1jjGv/JlpPoWB365ldkppUlnizhMxJgojp907ZF1PgLTuW207kgzZcSCXyquL9qJkMsY+MRtaZ5yQ== integrity sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==
esbuild-windows-arm64@0.14.50: esbuild-windows-arm64@0.14.54:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.50.tgz#e7ddde6a97194051a5a4ac05f4f5900e922a7ea5" resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz#937d15675a15e4b0e4fafdbaa3a01a776a2be982"
integrity sha512-EMS4lQnsIe12ZyAinOINx7eq2mjpDdhGZZWDwPZE/yUTN9cnc2Ze/xUTYIAyaJqrqQda3LnDpADKpvLvol6ENQ== integrity sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==
esbuild@^0.14.47: esbuild@^0.14.47:
version "0.14.50" version "0.14.54"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.50.tgz#7a665392c8df94bf6e1ae1e999966a5ee62c6cbc" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.54.tgz#8b44dcf2b0f1a66fc22459943dccf477535e9aa2"
integrity sha512-SbC3k35Ih2IC6trhbMYW7hYeGdjPKf9atTKwBUHqMCYFZZ9z8zhuvfnZihsnJypl74FjiAKjBRqFkBkAd0rS/w== integrity sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==
optionalDependencies: optionalDependencies:
esbuild-android-64 "0.14.50" "@esbuild/linux-loong64" "0.14.54"
esbuild-android-arm64 "0.14.50" esbuild-android-64 "0.14.54"
esbuild-darwin-64 "0.14.50" esbuild-android-arm64 "0.14.54"
esbuild-darwin-arm64 "0.14.50" esbuild-darwin-64 "0.14.54"
esbuild-freebsd-64 "0.14.50" esbuild-darwin-arm64 "0.14.54"
esbuild-freebsd-arm64 "0.14.50" esbuild-freebsd-64 "0.14.54"
esbuild-linux-32 "0.14.50" esbuild-freebsd-arm64 "0.14.54"
esbuild-linux-64 "0.14.50" esbuild-linux-32 "0.14.54"
esbuild-linux-arm "0.14.50" esbuild-linux-64 "0.14.54"
esbuild-linux-arm64 "0.14.50" esbuild-linux-arm "0.14.54"
esbuild-linux-mips64le "0.14.50" esbuild-linux-arm64 "0.14.54"
esbuild-linux-ppc64le "0.14.50" esbuild-linux-mips64le "0.14.54"
esbuild-linux-riscv64 "0.14.50" esbuild-linux-ppc64le "0.14.54"
esbuild-linux-s390x "0.14.50" esbuild-linux-riscv64 "0.14.54"
esbuild-netbsd-64 "0.14.50" esbuild-linux-s390x "0.14.54"
esbuild-openbsd-64 "0.14.50" esbuild-netbsd-64 "0.14.54"
esbuild-sunos-64 "0.14.50" esbuild-openbsd-64 "0.14.54"
esbuild-windows-32 "0.14.50" esbuild-sunos-64 "0.14.54"
esbuild-windows-64 "0.14.50" esbuild-windows-32 "0.14.54"
esbuild-windows-arm64 "0.14.50" esbuild-windows-64 "0.14.54"
esbuild-windows-arm64 "0.14.54"
escalade@^3.1.1: escalade@^3.1.1:
version "3.1.1" version "3.1.1"
@ -615,9 +622,9 @@ extract-zip@^2.0.1:
"@types/yauzl" "^2.9.1" "@types/yauzl" "^2.9.1"
fast-glob@^3.2.11, fast-glob@^3.2.9: fast-glob@^3.2.11, fast-glob@^3.2.9:
version "3.2.11" version "3.2.12"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80"
integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==
dependencies: dependencies:
"@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3" "@nodelib/fs.walk" "^1.2.3"
@ -850,9 +857,9 @@ is-binary-path@~2.1.0:
binary-extensions "^2.0.0" binary-extensions "^2.0.0"
is-core-module@^2.9.0: is-core-module@^2.9.0:
version "2.9.0" version "2.10.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed"
integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==
dependencies: dependencies:
has "^1.0.3" has "^1.0.3"
@ -894,9 +901,9 @@ is-url@^1.2.4:
integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==
is2@^2.0.6: is2@^2.0.6:
version "2.0.7" version "2.0.9"
resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.7.tgz#d084e10cab3bd45d6c9dfde7a48599fcbb93fcac" resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.9.tgz#ff63b441f90de343fa8fac2125ee170da8e8240d"
integrity sha512-4vBQoURAXC6hnLFxD4VW7uc04XiwTTl/8ydYJxKvPwkWQrSjInkuM5VZVg6BGr1/natq69zDuvO9lGpLClJqvA== integrity sha512-rZkHeBn9Zzq52sd9IUIV3a5mfwBY+o2HePMh0wkGBM4z4qjvy2GwVxQ6nNXSfw6MmVP6gf1QIlWjiOavhM3x5g==
dependencies: dependencies:
deep-is "^0.1.3" deep-is "^0.1.3"
ip-regex "^4.1.0" ip-regex "^4.1.0"
@ -916,7 +923,7 @@ jsonfile@^6.0.1:
optionalDependencies: optionalDependencies:
graceful-fs "^4.1.6" graceful-fs "^4.1.6"
lilconfig@^2.0.5: lilconfig@^2.0.5, lilconfig@^2.0.6:
version "2.0.6" version "2.0.6"
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4"
integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg== integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==
@ -1166,7 +1173,7 @@ postcss-reporter@^7.0.0:
picocolors "^1.0.0" picocolors "^1.0.0"
thenby "^1.3.4" thenby "^1.3.4"
postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.6: postcss-selector-parser@6.0.10, postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.6:
version "6.0.10" version "6.0.10"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d"
integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==
@ -1180,9 +1187,9 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0:
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
postcss@^8.4.14: postcss@^8.4.14:
version "8.4.14" version "8.4.16"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.16.tgz#33a1d675fac39941f5f445db0de4db2b6e01d43c"
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== integrity sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==
dependencies: dependencies:
nanoid "^3.3.4" nanoid "^3.3.4"
picocolors "^1.0.0" picocolors "^1.0.0"
@ -1343,9 +1350,9 @@ tailwindcss-debug-screens@^2.2.1:
integrity sha512-EMyA0CYBzqcZJHtVDvBfmYzfx3NxuK4qDyVO5wnzcGOrmJsv25D9xPpWefVTORTvhE6pCh90Z1WYnLUKsg3yMw== integrity sha512-EMyA0CYBzqcZJHtVDvBfmYzfx3NxuK4qDyVO5wnzcGOrmJsv25D9xPpWefVTORTvhE6pCh90Z1WYnLUKsg3yMw==
tailwindcss@^3, tailwindcss@~3.1.4: tailwindcss@^3, tailwindcss@~3.1.4:
version "3.1.6" version "3.1.8"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.1.6.tgz#bcb719357776c39e6376a8d84e9834b2b19a49f1" resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.1.8.tgz#4f8520550d67a835d32f2f4021580f9fddb7b741"
integrity sha512-7skAOY56erZAFQssT1xkpk+kWt2NrO45kORlxFPXUt3CiGsVPhH1smuH5XoDH6sGPXLyBv+zgCKA2HWBsgCytg== integrity sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==
dependencies: dependencies:
arg "^5.0.2" arg "^5.0.2"
chokidar "^3.5.3" chokidar "^3.5.3"
@ -1356,7 +1363,7 @@ tailwindcss@^3, tailwindcss@~3.1.4:
fast-glob "^3.2.11" fast-glob "^3.2.11"
glob-parent "^6.0.2" glob-parent "^6.0.2"
is-glob "^4.0.3" is-glob "^4.0.3"
lilconfig "^2.0.5" lilconfig "^2.0.6"
normalize-path "^3.0.0" normalize-path "^3.0.0"
object-hash "^3.0.0" object-hash "^3.0.0"
picocolors "^1.0.0" picocolors "^1.0.0"
@ -1395,10 +1402,10 @@ universalify@^2.0.0:
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==
update-browserslist-db@^1.0.4: update-browserslist-db@^1.0.5:
version "1.0.5" version "1.0.7"
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.7.tgz#16279639cff1d0f800b14792de43d97df2d11b7d"
integrity sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q== integrity sha512-iN/XYesmZ2RmmWAiI4Z5rq0YqSiv0brj9Ce9CfhNE4xIW2h+MFxcgkxIzZ+ShkFPUkjU3gQ+3oypadD3RAMtrg==
dependencies: dependencies:
escalade "^3.1.1" escalade "^3.1.1"
picocolors "^1.0.0" picocolors "^1.0.0"
@ -1448,9 +1455,9 @@ yaml@^2.1.1:
integrity sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw== integrity sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==
yargs-parser@^21.0.0: yargs-parser@^21.0.0:
version "21.0.1" version "21.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
yargs@^17.0.0: yargs@^17.0.0:
version "17.5.1" version "17.5.1"

View file

@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
## [Unreleased (2022-09-09)] ## [Unreleased (2022-09-12)]
### Added ### Added
- Static page generator [#444](https://github.com/bonfire-networks/bonfire-app/issues/444) - Static page generator [#444](https://github.com/bonfire-networks/bonfire-app/issues/444)

View file

@ -5,7 +5,6 @@ config :activity_pub, :repo, Bonfire.Common.Repo
config :nodeinfo, :adapter, Bonfire.Federate.ActivityPub.NodeinfoAdapter config :nodeinfo, :adapter, Bonfire.Federate.ActivityPub.NodeinfoAdapter
config :activity_pub, :instance, config :activity_pub, :instance,
hostname: "localhost", hostname: "localhost",
federation_publisher_modules: [ActivityPubWeb.Publisher], federation_publisher_modules: [ActivityPubWeb.Publisher],
@ -29,6 +28,7 @@ config :activity_pub, :mrf_simple,
banner_removal: [] banner_removal: []
config :http_signatures, adapter: ActivityPub.Signature config :http_signatures, adapter: ActivityPub.Signature
config :activity_pub, :http, config :activity_pub, :http,
proxy_url: nil, proxy_url: nil,
send_user_agent: true, send_user_agent: true,
@ -42,10 +42,14 @@ config :activity_pub, :http,
] ]
config :activity_pub, ActivityPubWeb.Endpoint, config :activity_pub, ActivityPubWeb.Endpoint,
render_errors: [view: ActivityPubWeb.ErrorView, accepts: ~w(json), layout: false] render_errors: [
view: ActivityPubWeb.ErrorView,
accepts: ~w(json),
layout: false
]
config :activity_pub, :json_contexts, %{ config :activity_pub, :json_contexts, %{
"Hashtag"=> "as:Hashtag", "Hashtag" => "as:Hashtag",
"ValueFlows" => "https://w3id.org/valueflows#", "ValueFlows" => "https://w3id.org/valueflows#",
"om2" => "http://www.ontology-of-units-of-measure.org/resource/om-2/" "om2" => "http://www.ontology-of-units-of-measure.org/resource/om-2/"
} }

View file

@ -12,9 +12,8 @@ config :activity_pub, Oban,
repo: Bonfire.Common.Repo, repo: Bonfire.Common.Repo,
queues: false queues: false
config :activity_pub, :instance, config :activity_pub, :instance, federating: false
federating: false # rewrite_policy: [ActivityPub.MRF.SimplePolicy]
# rewrite_policy: [ActivityPub.MRF.SimplePolicy]
config :tesla, adapter: Tesla.Mock config :tesla, adapter: Tesla.Mock

View file

@ -13,10 +13,12 @@ config :bonfire_common,
config :bonfire_common, Bonfire.Common.Localise.Cldr, config :bonfire_common, Bonfire.Common.Localise.Cldr,
default_locale: default_locale, default_locale: default_locale,
locales: ["fr", "en", "es", "it", "vi"], # locales that will be made available on top of those for which gettext localisation files are available # locales that will be made available on top of those for which gettext localisation files are available
locales: ["fr", "en", "es", "it", "vi"],
providers: [Cldr.Language], providers: [Cldr.Language],
gettext: Bonfire.Common.Localise.Gettext, gettext: Bonfire.Common.Localise.Gettext,
extra_gettext: [Timex.Gettext], # extra Gettex modules from dependencies not using the one from Bonfire.Common, so we can change their locale too # extra Gettex modules from dependencies not using the one from Bonfire.Common, so we can change their locale too
extra_gettext: [Timex.Gettext],
data_dir: "priv/cldr", data_dir: "priv/cldr",
add_fallback_locales: true, add_fallback_locales: true,
# precompile_number_formats: ["¤¤#,##0.##"], # precompile_number_formats: ["¤¤#,##0.##"],

File diff suppressed because it is too large Load diff

View file

@ -12,9 +12,11 @@ config :bonfire_fail,
bad_header: {400, "Bad request: malformed header."}, bad_header: {400, "Bad request: malformed header."},
no_access: {403, "This site is by invitation only."}, no_access: {403, "This site is by invitation only."},
token_expired: {403, "This link or token has expired, please request a fresh one."}, token_expired: {403, "This link or token has expired, please request a fresh one."},
already_claimed: {403, "This link or token was already used, please request a fresh one if necessary."}, already_claimed:
{403, "This link or token was already used, please request a fresh one if necessary."},
token_not_found: {403, "This token was not found, please request a fresh one."}, token_not_found: {403, "This token was not found, please request a fresh one."},
user_disabled: {403, "This user account is disabled. Please contact the instance administrator."}, user_disabled:
{403, "This user account is disabled. Please contact the instance administrator."},
email_not_confirmed: {403, "Please confirm your email address first."}, email_not_confirmed: {403, "Please confirm your email address first."},
unknown_resource: {400, "Unknown resource."}, unknown_resource: {400, "Unknown resource."},
invalid_argument: {400, "Invalid arguments passed."}, invalid_argument: {400, "Invalid arguments passed."},

View file

@ -21,5 +21,5 @@ config :bonfire_gc,
Bonfire.Data.Identity.Caretaker, Bonfire.Data.Identity.Caretaker,
Bonfire.Data.Identity.Self, Bonfire.Data.Identity.Self,
Bonfire.Data.Social.PostContent Bonfire.Data.Social.PostContent
], ]
] ]

View file

@ -3,5 +3,4 @@ import Config
config :bonfire_geolocate, config :bonfire_geolocate,
templates_path: "lib" templates_path: "lib"
config :bonfire, :js_config, config :bonfire, :js_config, mapbox_api_key: System.get_env("MAPBOX_API_KEY")
mapbox_api_key: System.get_env("MAPBOX_API_KEY")

View file

@ -11,17 +11,16 @@ config :boruta, Boruta.Oauth,
] ]
# config :bonfire_open_id, :openid_connect_providers, # config :bonfire_open_id, :openid_connect_providers,
# bonfire_cafe: [ # bonfire_cafe: [
# discovery_document_uri: "https://bonfire.cafe/.well-known/openid-configuration", # discovery_document_uri: "https://bonfire.cafe/.well-known/openid-configuration",
# client_id: "CLIENT_ID", # client_id: "CLIENT_ID",
# client_secret: "CLIENT_SECRET", # client_secret: "CLIENT_SECRET",
# redirect_uri: "https://myinstance.net/", # redirect_uri: "https://myinstance.net/",
# response_type: "code", # response_type: "code",
# scope: "identity data:public" # scope: "identity data:public"
# ] # ]
if Mix.env() == :test do
if Mix.env()==:test do
config :bonfire_open_id, :oauth_module, Boruta.OauthMock config :bonfire_open_id, :oauth_module, Boruta.OauthMock
config :bonfire_open_id, :openid_module, Boruta.OpenidMock config :bonfire_open_id, :openid_module, Boruta.OpenidMock
end end

View file

@ -2,15 +2,15 @@ import Config
# Please note that these are defaults meant to be overriden in Settings rather than edited here # Please note that these are defaults meant to be overriden in Settings rather than edited here
config :bonfire, :ui, config :bonfire, :ui,
theme: [ theme: [
instance_name: "Bonfire", instance_name: "Bonfire",
instance_theme: "bonfire", instance_theme: "bonfire",
instance_icon: "/images/bonfire-icon.png", instance_icon: "/images/bonfire-icon.png",
instance_image: "/images/bonfires.png", instance_image: "/images/bonfires.png",
instance_description: "This is a bonfire demo instance for testing purposes", instance_description: "This is a bonfire demo instance for testing purposes",
instance_welcome: [ instance_welcome: [
title: "👋 Welcome", title: "👋 Welcome",
description: " description: "
Bonfire is a federated social networking toolkit for communities and individuals to design, operate and control their digital lives, by assembling their own social networks like lego blocks in order to cultivate safe and private spaces while being interconnected with the rest of the 'fediverse' and the internet at wide on their own terms. Bonfire is a federated social networking toolkit for communities and individuals to design, operate and control their digital lives, by assembling their own social networks like lego blocks in order to cultivate safe and private spaces while being interconnected with the rest of the 'fediverse' and the internet at wide on their own terms.
The bonfire ecosystem will include: The bonfire ecosystem will include:
1. Bonfire apps/flavours: Open source federated networks that are ready to be installed and used for different purposes. Made up of a set of pre-configured extensions. 1. Bonfire apps/flavours: Open source federated networks that are ready to be installed and used for different purposes. Made up of a set of pre-configured extensions.
@ -19,122 +19,123 @@ The bonfire ecosystem will include:
4. Bonfire cloud services: Your public identity in the cloud can receive messages even when your device is offline. Syncs your Bonfire device with the fediverse, and deletes already-synced data from the cloud. Open source so others can host equivalent services. 4. Bonfire cloud services: Your public identity in the cloud can receive messages even when your device is offline. Syncs your Bonfire device with the fediverse, and deletes already-synced data from the cloud. Open source so others can host equivalent services.
More details at https://bonfirenetworks.org", More details at https://bonfirenetworks.org",
links: [ links: [
"About Bonfire": "https://bonfirenetworks.org/", "About Bonfire": "https://bonfirenetworks.org/",
"Forum": "https://socialhub.activitypub.rocks/g/bonfire/activity/posts", Forum: "https://socialhub.activitypub.rocks/g/bonfire/activity/posts",
"Community Chat": "https://matrix.to/#/%23bonfire-networks:matrix.org", "Community Chat": "https://matrix.to/#/%23bonfire-networks:matrix.org",
"Contribute": "https://bonfirenetworks.org/contribute/" Contribute: "https://bonfirenetworks.org/contribute/"
]
] ]
], # end theme ]
# rich_text_editor_disabled: true, ],
rich_text_editor: Bonfire.Editor.Quill,
# rich_text_editor: Bonfire.Editor.Ck,
font_family: "Inter (Latin Languages)", # default
font_families: [
"Inter (Latin Languages)",
"Inter (More Languages)",
"Noto Sans (Latin Languages)",
"Noto Sans (More Languages)",
"OpenDyslexic"
],
theme: "bonfire",
themes: [
"bonfire",
"light",
"dark",
"cupcake",
"bumblebee",
"emerald",
"corporate",
"synthwave",
"retro",
"cyberpunk",
"valentine",
"halloween",
"garden",
"forest",
"aqua",
"lofi",
"pastel",
"fantasy",
"wireframe",
"black",
"luxury",
"dracula",
"cmyk",
"autumn",
"business",
"acid",
"lemonade",
"night",
"coffee",
"winter"
],
show_trending_tags: [ # end theme
disabled: false, # rich_text_editor_disabled: true,
for_last_x_days: 30, rich_text_editor: Bonfire.Editor.Quill,
limit: 8, # rich_text_editor: Bonfire.Editor.Ck,
], # default
sidebar_components: [ font_family: "Inter (Latin Languages)",
{Bonfire.UI.Social.SidebarNavigationLive, []}, font_families: [
], "Inter (Latin Languages)",
smart_input: [ "Inter (More Languages)",
post: true, "Noto Sans (Latin Languages)",
cw: true, "Noto Sans (More Languages)",
summary: true "OpenDyslexic"
], ],
profile: [ theme: "bonfire",
sections: [ themes: [
timeline: Bonfire.UI.Social.ProfileTimelineLive, "bonfire",
# private: Bonfire.UI.Social.MessageThreadsLive, "light",
posts: Bonfire.UI.Social.ProfilePostsLive, "dark",
boosts: Bonfire.UI.Social.ProfileBoostsLive, "cupcake",
followers: Bonfire.UI.Social.ProfileFollowsLive, "bumblebee",
followed: Bonfire.UI.Social.ProfileFollowsLive, "emerald",
follow: Bonfire.UI.Me.RemoteInteractionFormLive, "corporate",
], "synthwave",
navigation: [ "retro",
timeline: "Timeline", "cyberpunk",
posts: "Posts", "valentine",
boosts: "Boosts", "halloween",
# private: "Messages", "garden",
], "forest",
widgets: [ "aqua",
], "lofi",
], "pastel",
category: [ "fantasy",
navigation: [ "wireframe",
timeline: "Published", "black",
submitted: "Submitted" "luxury",
], "dracula",
sections: [ "cmyk",
timeline: Bonfire.UI.Social.ProfileTimelineLive, "autumn",
posts: Bonfire.UI.Social.ProfilePostsLive, "business",
boosts: Bonfire.UI.Social.ProfileBoostsLive, "acid",
followers: Bonfire.UI.Social.ProfileFollowsLive, "lemonade",
follow: Bonfire.UI.Me.RemoteInteractionFormLive, "night",
new: Bonfire.Classify.Web.NewCategoryLive, "coffee",
settings: Bonfire.Classify.Web.SettingsLive "winter"
], ],
], show_trending_tags: [
smart_input_activities: [ disabled: false,
post: "Compose a post", for_last_x_days: 30,
category: "Create a topic", limit: 8
# offer: "Publish an offer", ],
# need: "Publish a need", sidebar_components: [
# transfer_resource: "Transfer a resource", {Bonfire.UI.Social.SidebarNavigationLive, []}
# produce_resource: "Add a resource", ],
# intent: "Indicate an itent", smart_input: [
# economic_event: "Record an economic event", post: true,
# process: "Define a process" cw: true,
], summary: true
smart_input_components: [ ],
post: Bonfire.UI.Social.WritePostContentLive, profile: [
message: Bonfire.UI.Social.WritePostContentLive, sections: [
category: Bonfire.Classify.Web.NewCategoryLive, timeline: Bonfire.UI.Social.ProfileTimelineLive,
], # private: Bonfire.UI.Social.MessageThreadsLive,
posts: Bonfire.UI.Social.ProfilePostsLive,
boosts: Bonfire.UI.Social.ProfileBoostsLive,
followers: Bonfire.UI.Social.ProfileFollowsLive,
followed: Bonfire.UI.Social.ProfileFollowsLive,
follow: Bonfire.UI.Me.RemoteInteractionFormLive
],
navigation: [
timeline: "Timeline",
posts: "Posts",
boosts: "Boosts"
# private: "Messages",
],
widgets: []
],
category: [
navigation: [
timeline: "Published",
submitted: "Submitted"
],
sections: [
timeline: Bonfire.UI.Social.ProfileTimelineLive,
posts: Bonfire.UI.Social.ProfilePostsLive,
boosts: Bonfire.UI.Social.ProfileBoostsLive,
followers: Bonfire.UI.Social.ProfileFollowsLive,
follow: Bonfire.UI.Me.RemoteInteractionFormLive,
new: Bonfire.Classify.Web.NewCategoryLive,
settings: Bonfire.Classify.Web.SettingsLive
]
],
smart_input_activities: [
post: "Compose a post",
category: "Create a topic"
# offer: "Publish an offer",
# need: "Publish a need",
# transfer_resource: "Transfer a resource",
# produce_resource: "Add a resource",
# intent: "Indicate an itent",
# economic_event: "Record an economic event",
# process: "Define a process"
],
smart_input_components: [
post: Bonfire.UI.Social.WritePostContentLive,
message: Bonfire.UI.Social.WritePostContentLive,
category: Bonfire.Classify.Web.NewCategoryLive
],
invites_component: Bonfire.Invite.Links.Web.InvitesLive invites_component: Bonfire.Invite.Links.Web.InvitesLive
# config :surface_boxicon, # config :surface_boxicon,

View file

@ -2,7 +2,7 @@ import Config
default_flavour = "classic" default_flavour = "classic"
flavour = System.get_env("FLAVOUR", default_flavour) flavour = System.get_env("FLAVOUR", default_flavour)
flavour_path = System.get_env("FLAVOUR_PATH", "flavours/"<>flavour) flavour_path = System.get_env("FLAVOUR_PATH", "flavours/" <> flavour)
#### Basic configuration #### Basic configuration
@ -26,9 +26,12 @@ config :bonfire,
org_schema: Bonfire.Data.Identity.User, org_schema: Bonfire.Data.Identity.User,
home_page: Bonfire.Web.HomeLive, home_page: Bonfire.Web.HomeLive,
user_home_page: Bonfire.UI.Social.FeedsLive, user_home_page: Bonfire.UI.Social.FeedsLive,
default_pagination_limit: 15, # limit for prod # limit for prod
thread_default_pagination_limit: 500, # very high limit for prod default_pagination_limit: 15,
thread_default_max_depth: 3, # how many nested replies to show # very high limit for prod
thread_default_pagination_limit: 500,
# how many nested replies to show
thread_default_max_depth: 3,
localisation_path: "priv/localisation", localisation_path: "priv/localisation",
ap_base_path: System.get_env("AP_BASE_PATH", "/pub"), ap_base_path: System.get_env("AP_BASE_PATH", "/pub"),
signing_salt: "this-will-be-overriden-by-a-secure-string-in-runtime.exs", signing_salt: "this-will-be-overriden-by-a-secure-string-in-runtime.exs",
@ -37,10 +40,15 @@ config :bonfire,
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint,
url: [host: "localhost"], url: [host: "localhost"],
http: [ http: [
port: String.to_integer(System.get_env("SERVER_PORT", "4000")), # this gets overriden in runtime.exs # this gets overriden in runtime.exs
port: String.to_integer(System.get_env("SERVER_PORT", "4000")),
transport_options: [socket_opts: [:inet6]] transport_options: [socket_opts: [:inet6]]
], ],
render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false], render_errors: [
view: Bonfire.UI.Common.ErrorView,
accepts: ~w(html json),
layout: false
],
pubsub_server: Bonfire.PubSub pubsub_server: Bonfire.PubSub
config :phoenix, :json_library, Jason config :phoenix, :json_library, Jason
@ -48,11 +56,17 @@ config :phoenix_gon, :json_library, Jason
config :ecto_sparkles, :otp_app, :bonfire config :ecto_sparkles, :otp_app, :bonfire
config :bonfire, :ecto_repos, [Bonfire.Common.Repo] config :bonfire, :ecto_repos, [Bonfire.Common.Repo]
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
types: Bonfire.Geolocate.PostgresTypes # point to the appropriate definition to support any Postgres extensions used by your Bonfire flavour or extensions # point to the appropriate definition to support any Postgres extensions used by your Bonfire flavour or extensions
# priv: flavour_path <> "/repo", types: Bonfire.Geolocate.PostgresTypes
# priv: flavour_path <> "/repo",
config :ecto_sparkles, :otp_app, :bonfire config :ecto_sparkles, :otp_app, :bonfire
config :ecto_shorts, repo: Bonfire.Common.Repo, error_module: EctoShorts.Actions.Error
config :ecto_shorts,
repo: Bonfire.Common.Repo,
error_module: EctoShorts.Actions.Error
# ecto query filtering # ecto query filtering
# config :query_elf, :id_types, [:id, :binary_id, Pointers.ULID] # config :query_elf, :id_types, [:id, :binary_id, Pointers.ULID]
@ -63,8 +77,7 @@ config :logger, :console,
config :elixir, :dbg_callback, {Untangle, :custom_dbg, []} config :elixir, :dbg_callback, {Untangle, :custom_dbg, []}
config :surface, :compiler, config :surface, :compiler, warn_on_undefined_props: false
warn_on_undefined_props: false
config :bonfire, Oban, config :bonfire, Oban,
repo: Bonfire.Common.Repo, repo: Bonfire.Common.Repo,
@ -85,13 +98,12 @@ config :mime, :types, %{
config :sentry, config :sentry,
dsn: "this-will-be-overriden-by-a-secure-string-in-runtime.exs", dsn: "this-will-be-overriden-by-a-secure-string-in-runtime.exs",
environment_name: Mix.env, environment_name: Mix.env(),
# enable_source_code_context: true, # enable_source_code_context: true,
root_source_code_path: File.cwd!(), root_source_code_path: File.cwd!(),
included_environments: [:prod, :dev], included_environments: [:prod, :dev],
tags: %{app_version: Mix.Project.config()[:version]} tags: %{app_version: Mix.Project.config()[:version]}
# include config for all used Bonfire extensions # include config for all used Bonfire extensions
for config <- "bonfire_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do for config <- "bonfire_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do
# IO.inspect(include_config: config) # IO.inspect(include_config: config)
@ -100,6 +112,5 @@ end
import_config "activity_pub.exs" import_config "activity_pub.exs"
# finally, append/override config based on env, which will override any config set above (including from imported files) # finally, append/override config based on env, which will override any config set above (including from imported files)
import_config "#{config_env()}.exs" import_config "#{config_env()}.exs"

View file

@ -4,8 +4,10 @@ import Config
changelog_issues_closed_after = "2022-08-30" changelog_issues_closed_after = "2022-08-30"
config :bonfire, config :bonfire,
experimental_features_enabled: true, # Note: you can run `Bonfire.Common.Config.put(:experimental_features_enabled, true)` to enable these in prod too # Note: you can run `Bonfire.Common.Config.put(:experimental_features_enabled, true)` to enable these in prod too
default_pagination_limit: 10 # low limit so it is easier to test experimental_features_enabled: true,
# low limit so it is easier to test
default_pagination_limit: 10
# config :pseudo_gettext, :locale, "en-pseudo_text" # uncomment to use https://en.wikipedia.org/wiki/Pseudolocalization and check that the app is properly localisable # config :pseudo_gettext, :locale, "en-pseudo_text" # uncomment to use https://en.wikipedia.org/wiki/Pseudolocalization and check that the app is properly localisable
@ -20,15 +22,22 @@ path_dep_dirs =
|> Enum.map(&(Keyword.fetch!(elem(&1, 1), :path) <> "/lib")) |> Enum.map(&(Keyword.fetch!(elem(&1, 1), :path) <> "/lib"))
config :phoenix_live_reload, config :phoenix_live_reload,
dirs: path_dep_dirs ++ ["lib/"] # watch the app's lib/ dir + the dep/lib/ dir of every locally-cloned dep # watch the app's lib/ dir + the dep/lib/ dir of every locally-cloned dep
dirs: path_dep_dirs ++ ["lib/"]
path_dep_patterns = path_dep_dirs |> Enum.map(&(String.slice(&1, 2..1000) <>".*ex")) # to include cloned code in patterns # to include cloned code in patterns
path_dep_patterns = path_dep_patterns ++ path_dep_dirs |> Enum.map(&(String.slice(&1, 2..1000) <>".*sface")) # Surface views path_dep_patterns = Enum.map(path_dep_dirs, &(String.slice(&1, 2..1000) <> ".*ex"))
# Surface views
path_dep_patterns =
(path_dep_patterns ++ path_dep_dirs)
|> Enum.map(&(String.slice(&1, 2..1000) <> ".*sface"))
# Watch static and templates for browser reloading. # Watch static and templates for browser reloading.
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint,
server: true, server: true,
debug_errors: true, # In the development environment, Phoenix will debug errors by default, showing us a very informative debugging page. If we want to see what the application would serve in production, set to false # In the development environment, Phoenix will debug errors by default, showing us a very informative debugging page. If we want to see what the application would serve in production, set to false
debug_errors: true,
check_origin: false, check_origin: false,
code_reloader: true, code_reloader: true,
watchers: [ watchers: [
@ -50,49 +59,51 @@ config :bonfire, Bonfire.Web.Endpoint,
] ]
], ],
live_reload: [ live_reload: [
patterns: [ patterns:
# ~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$", [
# ~r"^priv/gettext/.*(po)$", # ~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
# ~r"^web/(live|views)/.*ex$", # ~r"^priv/gettext/.*(po)$",
# ~r"^lib/.*_live\.ex$", # ~r"^web/(live|views)/.*ex$",
# ~r".*leex$", # ~r"^lib/.*_live\.ex$",
~r"lib/.*(ex|sface)$", # ~r".*leex$",
~r"priv/catalogue/.*(ex)$", # defp elixirc_paths(:dev), do: ["lib"] ++ catalogues()
] ++ path_dep_patterns
]
# defp elixirc_paths(:dev), do: ["lib"] ++ catalogues() ~r"lib/.*(ex|sface)$",
~r"priv/catalogue/.*(ex)$"
] ++ path_dep_patterns
]
config :logger, :console, config :logger, :console,
level: :debug, level: :debug,
truncate: :infinity, truncate: :infinity,
format: "[$level] $message\n" # Do not include metadata or timestamps # Do not include metadata or timestamps
format: "[$level] $message\n"
config :phoenix, :stacktrace_depth, 30 config :phoenix, :stacktrace_depth, 30
config :phoenix, :plug_init_mode, :runtime config :phoenix, :plug_init_mode, :runtime
config :surface, :compiler, config :surface, :compiler, warn_on_undefined_props: true
warn_on_undefined_props: true
config :exsync, config :exsync,
src_monitor: true, src_monitor: true,
extra_extensions: [".leex", ".js", ".css", ".sface"] extra_extensions: [".leex", ".js", ".css", ".sface"]
config :versioce, :changelog, config :versioce, :changelog,
datagrabber: Versioce.Changelog.DataGrabber.Git, # Or your own datagrabber module # Or your own datagrabber module
formatter: Versioce.Changelog.Formatter.Keepachangelog # Or your own formatter module datagrabber: Versioce.Changelog.DataGrabber.Git,
# Or your own formatter module
formatter: Versioce.Changelog.Formatter.Keepachangelog
config :versioce, :changelog, config :versioce, :changelog,
closed_after: changelog_issues_closed_after, closed_after: changelog_issues_closed_after,
changelog_file: "docs/CHANGELOG-autogenerated.md", changelog_file: "docs/CHANGELOG-autogenerated.md",
datagrabber: Bonfire.Common.Changelog.Github.DataGrabber, datagrabber: Bonfire.Common.Changelog.Github.DataGrabber,
anchors: anchors: %{
%{ added: ["Feature"],
added: ["Feature"], changed: ["Improvement", "UI/UX", "Refactor"],
changed: ["Improvement", "UI/UX", "Refactor"], deprecated: ["[DEP]"],
deprecated: ["[DEP]"], removed: ["[REM]"],
removed: ["[REM]"], fixed: ["Bug"],
fixed: ["Bug"], security: ["Security", "Safety"]
security: ["Security", "Safety"] }
}

View file

@ -1,13 +1,11 @@
import Config import Config
# We include the path to a cache manifest # We include the path to a cache manifest
# containing the digested version of static files. This # containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task, # manifest is generated by the `mix phx.digest` task,
# which you should run after static files are built and # which you should run after static files are built and
# before starting your production server. # before starting your production server.
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
cache_static_manifest: "priv/static/cache_manifest.json"
config :logger, config :logger,
backends: [:console, Sentry.LoggerBackend] backends: [:console, Sentry.LoggerBackend]
@ -18,4 +16,5 @@ config :logger, level: :info
config :bonfire, Bonfire.Web.Endpoint, server: true config :bonfire, Bonfire.Web.Endpoint, server: true
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
priv: "priv/repo" # in releases migrations are not in a flavour-specific directory # in releases migrations are not in a flavour-specific directory
priv: "priv/repo"

View file

@ -12,17 +12,17 @@ public_port = String.to_integer(System.get_env("PUBLIC_PORT", "4000"))
Bonfire.Common.Config.LoadExtensionsConfig.load_configs() Bonfire.Common.Config.LoadExtensionsConfig.load_configs()
## ##
System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") || System.get_env("CI") || System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") ||
raise """ System.get_env("CI") ||
Environment variables for database are missing. raise """
For example: DATABASE_URL=ecto://USER:PASS@HOST/DATABASE Environment variables for database are missing.
You can also set POSTGRES_PASSWORD (required), For example: DATABASE_URL=ecto://USER:PASS@HOST/DATABASE
and POSTGRES_USER (default: postgres) and POSTGRES_HOST (default: localhost) You can also set POSTGRES_PASSWORD (required),
""" and POSTGRES_USER (default: postgres) and POSTGRES_HOST (default: localhost)
"""
if System.get_env("DATABASE_URL") do if System.get_env("DATABASE_URL") do
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo, url: System.get_env("DATABASE_URL")
url: System.get_env("DATABASE_URL")
else else
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
# ssl: true, # ssl: true,
@ -38,12 +38,14 @@ secret_key_base =
You can generate one by calling: mix phx.gen.secret You can generate one by calling: mix phx.gen.secret
""" """
signing_salt = System.get_env("SIGNING_SALT") || System.get_env("CI") || signing_salt =
System.get_env("SIGNING_SALT") || System.get_env("CI") ||
raise """ raise """
environment variable SIGNING_SALT is missing. environment variable SIGNING_SALT is missing.
""" """
encryption_salt = System.get_env("ENCRYPTION_SALT") || System.get_env("CI") || encryption_salt =
System.get_env("ENCRYPTION_SALT") || System.get_env("CI") ||
raise """ raise """
environment variable ENCRYPTION_SALT is missing. environment variable ENCRYPTION_SALT is missing.
""" """
@ -58,7 +60,10 @@ config :bonfire,
signing_salt: signing_salt, signing_salt: signing_salt,
root_path: File.cwd!() root_path: File.cwd!()
start_server? = if config_env() == :test, do: System.get_env("START_SERVER", "true"), else: System.get_env("START_SERVER", "true") start_server? =
if config_env() == :test,
do: System.get_env("START_SERVER", "true"),
else: System.get_env("START_SERVER", "true")
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint,
server: String.to_existing_atom(start_server?), server: String.to_existing_atom(start_server?),
@ -73,9 +78,7 @@ config :bonfire, Bonfire.Web.Endpoint,
live_view: [signing_salt: signing_salt] live_view: [signing_salt: signing_salt]
if System.get_env("SENTRY_DSN") do if System.get_env("SENTRY_DSN") do
IO.puts( IO.puts("Note: errors will be reported to Sentry.")
"Note: errors will be reported to Sentry."
)
config :sentry, config :sentry,
dsn: System.get_env("SENTRY_DSN") dsn: System.get_env("SENTRY_DSN")
@ -87,22 +90,20 @@ end
# start prod-only config # start prod-only config
if config_env() == :prod do if config_env() == :prod do
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
# ssl: true, # ssl: true,
database: System.get_env("POSTGRES_DB", "bonfire"), database: System.get_env("POSTGRES_DB", "bonfire"),
pool_size: String.to_integer(System.get_env("POOL_SIZE", "10")), pool_size: String.to_integer(System.get_env("POOL_SIZE", "10")),
log: String.to_atom(System.get_env("DB_QUERIES_LOG_LEVEL", "false")) # Note: keep this disabled if using ecto_dev_logger or EctoSparkles.Log instead # # Note: keep this disabled if using ecto_dev_logger or EctoSparkles.Log instead #
log: String.to_atom(System.get_env("DB_QUERIES_LOG_LEVEL", "false"))
end # prod only config end
# prod only config
# start prod and dev only config # start prod and dev only config
if config_env() != :test do if config_env() != :test do
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
slow_query_ms: String.to_integer(System.get_env("SLOW_QUERY_MS", "100")) slow_query_ms: String.to_integer(System.get_env("SLOW_QUERY_MS", "100"))
end end
## bonfire_livebook ## bonfire_livebook
@ -110,6 +111,4 @@ if Code.ensure_loaded?(Livebook) do
Livebook.config_runtime() Livebook.config_runtime()
end end
IO.puts( IO.puts("Welcome to Bonfire!")
"Welcome to Bonfire!"
)

View file

@ -5,8 +5,10 @@ import Config
import_config "activity_pub_test.exs" import_config "activity_pub_test.exs"
config :bonfire, config :bonfire,
default_pagination_limit: 10, # should match limit hardcoded in tests # should match limit hardcoded in tests
thread_default_pagination_limit: 10, # should match limit hardcoded in tests default_pagination_limit: 10,
# should match limit hardcoded in tests
thread_default_pagination_limit: 10,
skip_all_boundary_checks: false skip_all_boundary_checks: false
config :bonfire, Bonfire.Mailer, adapter: Bamboo.TestAdapter config :bonfire, Bonfire.Mailer, adapter: Bamboo.TestAdapter
@ -40,8 +42,7 @@ config :bonfire, Bonfire.Common.Repo,
timeout: 10_000, timeout: 10_000,
connect_timeout: 10_000 connect_timeout: 10_000
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint, http: [port: 4001]
http: [port: 4001]
config :bonfire, Oban, config :bonfire, Oban,
crontab: false, crontab: false,
@ -54,6 +55,7 @@ config :mix_test_interactive,
clear: true clear: true
config :paginator, ecto_repos: [Bonfire.Common.Repo] config :paginator, ecto_repos: [Bonfire.Common.Repo]
config :paginator, Paginator.Repo, config :paginator, Paginator.Repo,
pool: Ecto.Adapters.SQL.Sandbox, pool: Ecto.Adapters.SQL.Sandbox,
username: System.get_env("POSTGRES_USER", "postgres"), username: System.get_env("POSTGRES_USER", "postgres"),
@ -65,15 +67,17 @@ config :exsync,
src_monitor: false, src_monitor: false,
extra_extensions: [".leex", ".js", ".css", ".sface"] extra_extensions: [".leex", ".js", ".css", ".sface"]
# for headless browser testing: # for headless browser testing:
config :bonfire, sql_sandbox: true config :bonfire, sql_sandbox: true
config :wallaby, config :wallaby,
otp_app: :bonfire, otp_app: :bonfire,
# base_url: Bonfire.Web.Endpoint.url(), # base_url: Bonfire.Web.Endpoint.url(),
max_wait_time: 6_000, max_wait_time: 6_000,
screenshot_on_failure: true, screenshot_on_failure: true,
chromedriver: [ chromedriver: [
path: "assets/node_modules/chromedriver/bin/chromedriver", # point to your chromedriver path # point to your chromedriver path
headless: true # change to false if you want to see the browser in action path: "assets/node_modules/chromedriver/bin/chromedriver",
# change to false if you want to see the browser in action
headless: true
] ]

View file

@ -2,11 +2,10 @@ defmodule Bonfire.Repo.Migrations.HelloWorld do
use Ecto.Migration use Ecto.Migration
def up do def up do
execute "CREATE EXTENSION IF NOT EXISTS \"citext\"" execute("CREATE EXTENSION IF NOT EXISTS \"citext\"")
end end
def down do def down do
execute "DROP EXTENSION IF EXISTS \"citext\"" execute("DROP EXTENSION IF EXISTS \"citext\"")
end end
end end

View file

@ -6,9 +6,9 @@ defmodule Bonfire.Repo.Migrations.InitPointers do
init_pointers_ulid_extra() init_pointers_ulid_extra()
init_pointers() init_pointers()
end end
def down do def down do
init_pointers_ulid_extra() init_pointers_ulid_extra()
init_pointers() init_pointers()
end end
end end

View file

@ -2,7 +2,6 @@ defmodule Bonfire.Repo.Migrations.InitEdges do
use Ecto.Migration use Ecto.Migration
alias Bonfire.Data.Edges.Migration alias Bonfire.Data.Edges.Migration
def up do def up do
Migration.up() Migration.up()
end end
@ -10,5 +9,4 @@ defmodule Bonfire.Repo.Migrations.InitEdges do
def down do def down do
Migration.down() Migration.down()
end end
end end

View file

@ -6,5 +6,4 @@ defmodule Bonfire.Federate.ActivityPub.Repo.Migrations.ImportMe do
def up, do: migrate_activity_pub def up, do: migrate_activity_pub
def down, do: migrate_activity_pub def down, do: migrate_activity_pub
end end

View file

@ -5,5 +5,4 @@ defmodule Bonfire.Boundaries.Repo.Migrations.ImportBoundaries do
def up, do: migrate_boundaries() def up, do: migrate_boundaries()
def down, do: migrate_boundaries() def down, do: migrate_boundaries()
end end

View file

@ -9,5 +9,4 @@ defmodule Bonfire.Repo.Migrations.ImportMe do
end end
def down, do: migrate_me() def down, do: migrate_me()
end end

View file

@ -5,10 +5,8 @@ defmodule Bonfire.Social.Repo.Migrations.ImportSocial do
import Pointers.Migration import Pointers.Migration
def up do def up do
migrate_social() migrate_social()
end end
def down, do: migrate_social()
def down, do: migrate_social()
end end

View file

@ -5,5 +5,4 @@ defmodule Bonfire.Boundaries.Repo.Migrations.BoundariesFixtures do
def up, do: Bonfire.Boundaries.Fixtures.insert() def up, do: Bonfire.Boundaries.Fixtures.insert()
def down, do: nil def down, do: nil
end end

View file

@ -2,12 +2,12 @@ defmodule Bonfire.Repo.Migrations.ImportQuantify do
use Ecto.Migration use Ecto.Migration
def up do def up do
Bonfire.Quantify.Migrations.change Bonfire.Quantify.Migrations.change()
Bonfire.Quantify.Migrations.change_measure Bonfire.Quantify.Migrations.change_measure()
end end
def down do def down do
Bonfire.Quantify.Migrations.change Bonfire.Quantify.Migrations.change()
Bonfire.Quantify.Migrations.change_measure Bonfire.Quantify.Migrations.change_measure()
end end
end end

View file

@ -2,10 +2,10 @@ defmodule Bonfire.Repo.Migrations.ImportGeolocation do
use Ecto.Migration use Ecto.Migration
def up do def up do
Bonfire.Geolocate.Migrations.change Bonfire.Geolocate.Migrations.change()
end end
def down do def down do
Bonfire.Geolocate.Migrations.change Bonfire.Geolocate.Migrations.change()
end end
end end

View file

@ -6,5 +6,4 @@ defmodule Bonfire.Repo.Migrations.ImportSharedUser do
def up, do: migrate_shared_user() def up, do: migrate_shared_user()
def down, do: migrate_shared_user() def down, do: migrate_shared_user()
end end

View file

@ -4,12 +4,12 @@ defmodule ActivityPub.Repo.Migrations.APTestTable do
def change do def change do
# This table only exists for test purposes # This table only exists for test purposes
create table("local_actor", primary_key: false) do create table("local_actor", primary_key: false) do
add :id, :uuid, primary_key: true add(:id, :uuid, primary_key: true)
add :username, :citext add(:username, :citext)
add :data, :map add(:data, :map)
add :local, :boolean add(:local, :boolean)
add :keys, :text add(:keys, :text)
add :followers, {:array, :string} add(:followers, {:array, :string})
end end
end end
end end

View file

@ -4,15 +4,19 @@ defmodule Bonfire.Social.Repo.Migrations.ProfileImages do
import Pointers.Migration import Pointers.Migration
def up do def up do
drop_if_exists(
constraint("bonfire_data_social_profile", "bonfire_data_social_profile_icon_id_fkey")
)
drop_if_exists constraint "bonfire_data_social_profile", "bonfire_data_social_profile_icon_id_fkey" drop_if_exists(
drop_if_exists constraint "bonfire_data_social_profile", "bonfire_data_social_profile_image_id_fkey" constraint("bonfire_data_social_profile", "bonfire_data_social_profile_image_id_fkey")
)
alter table("bonfire_data_social_profile") do alter table("bonfire_data_social_profile") do
Ecto.Migration.add_if_not_exists :icon_id, strong_pointer(Bonfire.Files.Media) Ecto.Migration.add_if_not_exists(:icon_id, strong_pointer(Bonfire.Files.Media))
Ecto.Migration.add_if_not_exists :image_id, strong_pointer(Bonfire.Files.Media) Ecto.Migration.add_if_not_exists(:image_id, strong_pointer(Bonfire.Files.Media))
end end
end end
def down, do: nil
def down, do: nil
end end

View file

@ -1,7 +1,6 @@
defmodule Bonfire.Repo.Migrations.FP do defmodule Bonfire.Repo.Migrations.FP do
use Ecto.Migration use Ecto.Migration
def up do def up do
execute("create or replace function execute("create or replace function
column_exists(ptable text, pcolumn text, pschema text default 'public') column_exists(ptable text, pcolumn text, pschema text default 'public')
@ -18,7 +17,8 @@ defmodule Bonfire.Repo.Migrations.FP do
); );
$body$;") $body$;")
execute("CREATE OR REPLACE FUNCTION rename_column_if_exists(ptable TEXT, pcolumn TEXT, new_name TEXT) execute(
"CREATE OR REPLACE FUNCTION rename_column_if_exists(ptable TEXT, pcolumn TEXT, new_name TEXT)
RETURNS VOID AS $BODY$ RETURNS VOID AS $BODY$
BEGIN BEGIN
-- Rename the column if it exists. -- Rename the column if it exists.
@ -27,14 +27,15 @@ defmodule Bonfire.Repo.Migrations.FP do
ptable, pcolumn, new_name); ptable, pcolumn, new_name);
END IF; END IF;
END$BODY$ END$BODY$
LANGUAGE plpgsql VOLATILE;") LANGUAGE plpgsql VOLATILE;"
)
flush() flush()
execute("SELECT rename_column_if_exists('bonfire_data_social_feed_publish', 'object_id', 'activity_id') ") execute(
"SELECT rename_column_if_exists('bonfire_data_social_feed_publish', 'object_id', 'activity_id') "
)
end end
def down, do: nil def down, do: nil
end end

View file

@ -5,9 +5,9 @@ defmodule Bonfire.Social.Repo.Migrations.PeeredURI do
def up do def up do
alter table("bonfire_data_activity_pub_peered") do alter table("bonfire_data_activity_pub_peered") do
Ecto.Migration.add_if_not_exists :canonical_uri, :text, null: true Ecto.Migration.add_if_not_exists(:canonical_uri, :text, null: true)
end end
end end
def down, do: nil
def down, do: nil
end end

View file

@ -2,10 +2,10 @@ defmodule Bonfire.Repo.Migrations.ImportClassify do
use Ecto.Migration use Ecto.Migration
def up do def up do
Bonfire.Classify.Migrations.up Bonfire.Classify.Migrations.up()
end end
def down do def down do
Bonfire.Classify.Migrations.down Bonfire.Classify.Migrations.down()
end end
end end

View file

@ -2,10 +2,10 @@ defmodule Bonfire.Repo.Migrations.ImportInviteLink do
use Ecto.Migration use Ecto.Migration
def up do def up do
Bonfire.Invites.Link.Migration.up Bonfire.Invites.Link.Migration.up()
end end
def down do def down do
Bonfire.Invites.Link.Migration.down Bonfire.Invites.Link.Migration.down()
end end
end end

View file

@ -4,5 +4,4 @@ defmodule Bonfire.Data.Identity.Repo.Migrations.CareClosure do
alias Bonfire.Data.Identity.CareClosure.Migration alias Bonfire.Data.Identity.CareClosure.Migration
def change, do: Migration.migrate_care_closure_view() def change, do: Migration.migrate_care_closure_view()
end end

View file

@ -5,9 +5,10 @@ defmodule Bonfire.Repo.Migrations.AddFilesMixin do
import Pointers.Migration import Pointers.Migration
def up do def up do
alter table("bonfire_files_media") do # cleanup old stuff # cleanup old stuff
remove_if_exists :created_at, :utc_datetime_usec alter table("bonfire_files_media") do
remove_if_exists :updated_at, :utc_datetime_usec remove_if_exists(:created_at, :utc_datetime_usec)
remove_if_exists(:updated_at, :utc_datetime_usec)
end end
Bonfire.Files.Migrations.migrate_files() Bonfire.Files.Migrations.migrate_files()

View file

@ -5,5 +5,4 @@ defmodule Bonfire.Boundaries.Repo.Migrations.BoundariesFixturesUp do
def up, do: Bonfire.Boundaries.Fixtures.insert() def up, do: Bonfire.Boundaries.Fixtures.insert()
def down, do: nil def down, do: nil
end end

View file

@ -8,11 +8,13 @@ System.put_env("SEARCH_INDEXING_DISABLED", "true")
# if the user has configured an admin user for the seeds, insert it. # if the user has configured an admin user for the seeds, insert it.
case {System.get_env("ADMIN_USER", "root"), System.get_env("ADMIN_PASSWORD", "")} do case {System.get_env("ADMIN_USER", "root"), System.get_env("ADMIN_PASSWORD", "")} do
{u,p} when p != "" -> {u, p} when p != "" ->
fake_account!(%{credential: %{password: p}}) fake_account!(%{credential: %{password: p}})
|> fake_user!(%{character: %{username: u}, profile: %{name: u}}) |> fake_user!(%{character: %{username: u}, profile: %{name: u}})
|> Bonfire.Me.Users.make_admin() |> Bonfire.Me.Users.make_admin()
_ -> nil
_ ->
nil
end end
# create some users # create some users
@ -20,7 +22,7 @@ users = for _ <- 1..3, do: fake_user!()
random_user = fn -> Faker.Util.pick(users) end random_user = fn -> Faker.Util.pick(users) end
# start fake threads # start fake threads
#for _ <- 1..3 do # for _ <- 1..3 do
# user = random_user.() # user = random_user.()
# thread = fake_thread!(user) # thread = fake_thread!(user)
# comment = fake_comment!(user, thread) # comment = fake_comment!(user, thread)
@ -28,15 +30,14 @@ random_user = fn -> Faker.Util.pick(users) end
# reply = fake_comment!(random_user.(), thread, %{in_reply_to_id: comment.id}) # reply = fake_comment!(random_user.(), thread, %{in_reply_to_id: comment.id})
# subreply = fake_comment!(random_user.(), thread, %{in_reply_to_id: reply.id}) # subreply = fake_comment!(random_user.(), thread, %{in_reply_to_id: reply.id})
# subreply2 = fake_comment!(random_user.(), thread, %{in_reply_to_id: subreply.id}) # subreply2 = fake_comment!(random_user.(), thread, %{in_reply_to_id: subreply.id})
#end # end
# #
## more fake threads ## more fake threads
#for _ <- 1..2 do # for _ <- 1..2 do
# user = random_user.() # user = random_user.()
# thread = fake_thread!(user) # thread = fake_thread!(user)
# comment = fake_comment!(user, thread) # comment = fake_comment!(user, thread)
#end # end
# define some tags/categories # define some tags/categories
if(Bonfire.Common.Extend.extension_enabled?(Bonfire.Classify.Simulate)) do if(Bonfire.Common.Extend.extension_enabled?(Bonfire.Classify.Simulate)) do
@ -82,18 +83,22 @@ if(Bonfire.Common.Extend.extension_enabled?(ValueFlows.Simulate)) do
# some proposed intents # some proposed intents
action_id = ValueFlows.Simulate.action_id() action_id = ValueFlows.Simulate.action_id()
intent = ValueFlows.Simulate.fake_intent!(user, %{resource_conforms_to: res_spec, action_id: action_id})
intent =
ValueFlows.Simulate.fake_intent!(user, %{
resource_conforms_to: res_spec,
action_id: action_id
})
proposal = ValueFlows.Simulate.fake_proposal!(user) proposal = ValueFlows.Simulate.fake_proposal!(user)
ValueFlows.Simulate.fake_proposed_to!(random_user.(), proposal) ValueFlows.Simulate.fake_proposed_to!(random_user.(), proposal)
ValueFlows.Simulate.fake_proposed_intent!(proposal, intent) ValueFlows.Simulate.fake_proposed_intent!(proposal, intent)
# define some geolocations # define some geolocations
if(Bonfire.Common.Extend.extension_enabled?(Bonfire.Geolocate.Simulate)) do if(Bonfire.Common.Extend.extension_enabled?(Bonfire.Geolocate.Simulate)) do
places = for _ <- 1..2, do: Bonfire.Geolocate.Simulate.fake_geolocation!(random_user.()) places = for _ <- 1..2, do: Bonfire.Geolocate.Simulate.fake_geolocation!(random_user.())
random_place = fn -> Faker.Util.pick(places) end random_place = fn -> Faker.Util.pick(places) end
for _ <- 1..2 do for _ <- 1..2 do
# define some intents with geolocation # define some intents with geolocation
_intent = _intent =
@ -103,7 +108,8 @@ if(Bonfire.Common.Extend.extension_enabled?(ValueFlows.Simulate)) do
) )
# define some proposals with geolocation # define some proposals with geolocation
_proposal = ValueFlows.Simulate.fake_proposal!(user, %{eligible_location: random_place.()}) _proposal =
ValueFlows.Simulate.fake_proposal!(user, %{eligible_location: random_place.()})
# both with geo # both with geo
intent = intent =
@ -118,8 +124,13 @@ if(Bonfire.Common.Extend.extension_enabled?(ValueFlows.Simulate)) do
# some economic events # some economic events
user = random_user.() user = random_user.()
resource_inventoried_as = ValueFlows.Simulate.fake_economic_resource!(user, %{current_location: random_place.()}) resource_inventoried_as =
to_resource_inventoried_as = ValueFlows.Simulate.fake_economic_resource!(random_user.(), %{current_location: random_place.()}) ValueFlows.Simulate.fake_economic_resource!(user, %{current_location: random_place.()})
to_resource_inventoried_as =
ValueFlows.Simulate.fake_economic_resource!(random_user.(), %{
current_location: random_place.()
})
ValueFlows.Simulate.fake_economic_event!( ValueFlows.Simulate.fake_economic_event!(
user, user,
@ -155,7 +166,9 @@ if(Bonfire.Common.Extend.extension_enabled?(ValueFlows.Simulate)) do
unit = Faker.Util.pick([unit1, unit2]) unit = Faker.Util.pick([unit1, unit2])
resource_inventoried_as = ValueFlows.Simulate.fake_economic_resource!(user, %{}, unit) resource_inventoried_as = ValueFlows.Simulate.fake_economic_resource!(user, %{}, unit)
to_resource_inventoried_as = ValueFlows.Simulate.fake_economic_resource!(random_user.(), %{}, unit)
to_resource_inventoried_as =
ValueFlows.Simulate.fake_economic_resource!(random_user.(), %{}, unit)
ValueFlows.Simulate.fake_economic_event!( ValueFlows.Simulate.fake_economic_event!(
user, user,

View file

@ -37,7 +37,7 @@ config :activity_pub, ActivityPubWeb.Endpoint,
render_errors: [view: ActivityPubWeb.ErrorView, accepts: ~w(json), layout: false] render_errors: [view: ActivityPubWeb.ErrorView, accepts: ~w(json), layout: false]
config :activity_pub, :json_contexts, %{ config :activity_pub, :json_contexts, %{
"Hashtag"=> "as:Hashtag", "Hashtag" => "as:Hashtag",
"ValueFlows" => "https://w3id.org/valueflows#", "ValueFlows" => "https://w3id.org/valueflows#",
"om2" => "http://www.ontology-of-units-of-measure.org/resource/om-2/" "om2" => "http://www.ontology-of-units-of-measure.org/resource/om-2/"
} }

View file

@ -12,9 +12,8 @@ config :activity_pub, Oban,
repo: Bonfire.Common.Repo, repo: Bonfire.Common.Repo,
queues: false queues: false
config :activity_pub, :instance, config :activity_pub, :instance, federating: false
federating: false # rewrite_policy: [ActivityPub.MRF.SimplePolicy]
# rewrite_policy: [ActivityPub.MRF.SimplePolicy]
config :tesla, adapter: Tesla.Mock config :tesla, adapter: Tesla.Mock

View file

@ -8,7 +8,8 @@ config :bonfire_common,
# internationalisation # internationalisation
config :bonfire_common, Bonfire.Common.Localise.Cldr, config :bonfire_common, Bonfire.Common.Localise.Cldr,
default_locale: default_locale, default_locale: default_locale,
locales: ["fr", "en", "es"], # locales that will be made available on top of those for which gettext localisation files are available # locales that will be made available on top of those for which gettext localisation files are available
locales: ["fr", "en", "es"],
providers: [Cldr.Language], providers: [Cldr.Language],
gettext: Bonfire.Common.Localise.Gettext, gettext: Bonfire.Common.Localise.Gettext,
data_dir: "./priv/cldr", data_dir: "./priv/cldr",

File diff suppressed because it is too large Load diff

View file

@ -11,9 +11,11 @@ config :bonfire_fail,
bad_header: {400, "Bad request: malformed header."}, bad_header: {400, "Bad request: malformed header."},
no_access: {403, "This site is by invitation only."}, no_access: {403, "This site is by invitation only."},
token_expired: {403, "This link or token has expired, please request a fresh one."}, token_expired: {403, "This link or token has expired, please request a fresh one."},
already_claimed: {403, "This link or token was already used, please request a fresh one if necessary."}, already_claimed:
{403, "This link or token was already used, please request a fresh one if necessary."},
token_not_found: {403, "This token was not found, please request a fresh one."}, token_not_found: {403, "This token was not found, please request a fresh one."},
user_disabled: {403, "This user account is disabled. Please contact the instance administrator."}, user_disabled:
{403, "This user account is disabled. Please contact the instance administrator."},
email_not_confirmed: {403, "Please confirm your email address first."}, email_not_confirmed: {403, "Please confirm your email address first."},
unknown_resource: {400, "Unknown resource."}, unknown_resource: {400, "Unknown resource."},
invalid_argument: {400, "Invalid arguments passed."}, invalid_argument: {400, "Invalid arguments passed."},

View file

@ -13,12 +13,13 @@ config :bonfire,
:bonfire_classify, :bonfire_classify,
:bonfire_geolocate, :bonfire_geolocate,
:bonfire_quantify :bonfire_quantify
], ],
log_federation: true, # enable/disable logging of federation logic # enable/disable logging of federation logic
log_federation: true,
federation_fallback_module: Bonfire.Social.APActivities federation_fallback_module: Bonfire.Social.APActivities
config :bonfire, actor_AP_types: actor_types config :bonfire, actor_AP_types: actor_types
# config :bonfire, Bonfire.Instance, # config :bonfire, Bonfire.Instance,
# hostname: hostname, # hostname: hostname,
# description: desc # description: desc

View file

@ -4,48 +4,53 @@ import Config
# see https://hexdocs.pm/waffle/Waffle.html#module-setup-a-storage-provider # see https://hexdocs.pm/waffle/Waffle.html#module-setup-a-storage-provider
config :waffle, config :waffle,
storage: Waffle.Storage.Local, storage: Waffle.Storage.Local,
asset_host: "/" # or {:system, "ASSET_HOST"} # or {:system, "ASSET_HOST"}
asset_host: "/"
image_media_types = ["image/png", "image/jpeg", "image/gif", "image/svg+xml", "image/tiff"] image_media_types = ["image/png", "image/jpeg", "image/gif", "image/svg+xml", "image/tiff"]
all_allowed_media_types = image_media_types ++ [ all_allowed_media_types =
"text/plain", image_media_types ++
# doc [
"text/csv", "text/plain",
"application/pdf", # doc
"application/rtf", "text/csv",
"application/msword", "application/pdf",
"application/vnd.ms-excel", "application/rtf",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/msword",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.ms-excel",
"application/vnd.oasis.opendocument.presentation", "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.oasis.opendocument.spreadsheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.presentation",
"application/epub+zip", "application/vnd.oasis.opendocument.spreadsheet",
# archives "application/vnd.oasis.opendocument.text",
"application/x-tar", "application/epub+zip",
"application/x-bzip", # archives
"application/x-bzip2", "application/x-tar",
"application/gzip", "application/x-bzip",
"application/zip", "application/x-bzip2",
"application/rar", "application/gzip",
"application/x-7z-compressed", "application/zip",
# audio "application/rar",
"audio/mpeg", "application/x-7z-compressed",
"audio/ogg", # audio
"audio/wav", "audio/mpeg",
"audio/webm", "audio/ogg",
"audio/opus", "audio/wav",
# video "audio/webm",
"video/mp4", "audio/opus",
"video/mpeg", # video
"video/ogg", "video/mp4",
"video/webm", "video/mpeg",
] "video/ogg",
"video/webm"
]
config :bonfire_files, image_media_types: image_media_types config :bonfire_files, image_media_types: image_media_types
config :bonfire_files, all_allowed_media_types: all_allowed_media_types config :bonfire_files, all_allowed_media_types: all_allowed_media_types
config :bonfire_files, Bonfire.Files.IconUploader, allowed_media_types: image_media_types config :bonfire_files, Bonfire.Files.IconUploader, allowed_media_types: image_media_types
config :bonfire_files, Bonfire.Files.ImageUploader, allowed_media_types: image_media_types config :bonfire_files, Bonfire.Files.ImageUploader, allowed_media_types: image_media_types
config :bonfire_files, Bonfire.Files.DocumentUploader, allowed_media_types: all_allowed_media_types
config :bonfire_files, Bonfire.Files.DocumentUploader,
allowed_media_types: all_allowed_media_types

View file

@ -3,5 +3,4 @@ import Config
config :bonfire_geolocate, config :bonfire_geolocate,
templates_path: "lib" templates_path: "lib"
config :bonfire, :js_config, config :bonfire, :js_config, mapbox_api_key: System.get_env("MAPBOX_API_KEY")
mapbox_api_key: System.get_env("MAPBOX_API_KEY")

View file

@ -3,4 +3,5 @@ import Config
config :bonfire_quantify, config :bonfire_quantify,
templates_path: "lib" templates_path: "lib"
config :bonfire_quantify, Bonfire.Quantify.Units, valid_contexts: [Bonfire.Quantify.Units, Bonfire.Data.Identity.User] config :bonfire_quantify, Bonfire.Quantify.Units,
valid_contexts: [Bonfire.Quantify.Units, Bonfire.Data.Identity.User]

View file

@ -3,8 +3,10 @@ import Config
config :bonfire_search, config :bonfire_search,
disable_indexing: System.get_env("SEARCH_INDEXING_DISABLED", "false"), disable_indexing: System.get_env("SEARCH_INDEXING_DISABLED", "false"),
adapter: Bonfire.Search.Meili, adapter: Bonfire.Search.Meili,
instance: System.get_env("SEARCH_MEILI_INSTANCE", "http://search:7700"), # protocol, hostname and port # protocol, hostname and port
api_key: System.get_env("MEILI_MASTER_KEY", "make-sure-to-change-me") # secret key instance: System.get_env("SEARCH_MEILI_INSTANCE", "http://search:7700"),
# secret key
api_key: System.get_env("MEILI_MASTER_KEY", "make-sure-to-change-me")
# for use by API client # for use by API client
config :tesla, adapter: Tesla.Adapter.Hackney config :tesla, adapter: Tesla.Adapter.Hackney

View file

@ -1,113 +1,117 @@
import Config import Config
config :bonfire, :ui, config :bonfire, :ui,
theme: [ theme: [
instance_name: "Bonfire", instance_name: "Bonfire",
instance_icon: "/images/bonfire-icon.png", instance_icon: "/images/bonfire-icon.png",
instance_image: "/images/bonfires.png", instance_image: "/images/bonfires.png",
instance_description: "This is a bonfire demo instance for testing purposes", instance_description: "This is a bonfire demo instance for testing purposes",
instance_welcome: [ instance_welcome: [
title: "👋 Welcome", title: "👋 Welcome",
description: "Bonfire is a federated social networking toolkit to customise and host your own online space and control your experience at the most granular level. description:
"Bonfire is a federated social networking toolkit to customise and host your own online space and control your experience at the most granular level.
More details at https://bonfirenetworks.org", More details at https://bonfirenetworks.org",
links: [ links: [
"About Bonfire": "https://bonfirenetworks.org/", "About Bonfire": "https://bonfirenetworks.org/",
"About ValueFlows": "https://valueflo.ws/", "About ValueFlows": "https://valueflo.ws/",
"Forum": "https://socialhub.activitypub.rocks/g/bonfire/activity/posts", Forum: "https://socialhub.activitypub.rocks/g/bonfire/activity/posts",
"Community Chat": "https://matrix.to/#/%23bonfire-networks:matrix.org", "Community Chat": "https://matrix.to/#/%23bonfire-networks:matrix.org",
"Contribute": "https://bonfirenetworks.org/contribute/" Contribute: "https://bonfirenetworks.org/contribute/"
] ]
]], ]
app_menu_extension_paths: %{ # TODO: make dynamic based on active extensions ],
"Social" => Bonfire.UI.Social.FeedsLive, # TODO: make dynamic based on active extensions
"Breadpub" => Bonfire.Breadpub.Web.HomeLive, app_menu_extension_paths: %{
"Kanban" => Bonfire.UI.Kanban.HomeLive, "Social" => Bonfire.UI.Social.FeedsLive,
# "Coordination" => Bonfire.UI.Coordination.ProcessesLive "Breadpub" => Bonfire.Breadpub.Web.HomeLive,
}, "Kanban" => Bonfire.UI.Kanban.HomeLive
sidebar_components: [ # TODO: make dynamic based on active extensions # "Coordination" => Bonfire.UI.Coordination.ProcessesLive
{Bonfire.UI.Social.SidebarNavigationLive, []}, },
# {Bonfire.UI.Coordination.SidebarNavigationLive, []}, # TODO: make dynamic based on active extensions
#{Bonfire.Breadpub.SidebarNavigationLive, []}, sidebar_components: [
# {Bonfire.UI.ValueFlows.ProcessesListLive, [title: "Processes", process_url: "/process/"]}, {Bonfire.UI.Social.SidebarNavigationLive, []}
# {Bonfire.UI.ValueFlows.ProcessesListLive, [title: "Lists", process_url: "/breadpub/list/"]} # {Bonfire.UI.Coordination.SidebarNavigationLive, []},
], # {Bonfire.Breadpub.SidebarNavigationLive, []},
rich_text_editor: Bonfire.Editor.Quill, # {Bonfire.UI.ValueFlows.ProcessesListLive, [title: "Processes", process_url: "/process/"]},
smart_input: [ # {Bonfire.UI.ValueFlows.ProcessesListLive, [title: "Lists", process_url: "/breadpub/list/"]}
post: true, ],
cw: true, rich_text_editor: Bonfire.Editor.Quill,
summary: true smart_input: [
], post: true,
profile: [ cw: true,
sections: [ # TODO: make dynamic based on active extensions summary: true
timeline: Bonfire.UI.Social.ProfileTimelineLive, ],
# private: Bonfire.UI.Social.MessageThreadsLive, profile: [
posts: Bonfire.UI.Social.ProfilePostsLive, # TODO: make dynamic based on active extensions
boosts: Bonfire.UI.Social.ProfileBoostsLive, sections: [
followers: Bonfire.UI.Social.ProfileFollowsLive, timeline: Bonfire.UI.Social.ProfileTimelineLive,
followed: Bonfire.UI.Social.ProfileFollowsLive, # private: Bonfire.UI.Social.MessageThreadsLive,
# inventory: Bonfire.UI.Reflow.ProfileInventoryLive, posts: Bonfire.UI.Social.ProfilePostsLive,
], boosts: Bonfire.UI.Social.ProfileBoostsLive,
navigation: [ followers: Bonfire.UI.Social.ProfileFollowsLive,
timeline: "timeline", followed: Bonfire.UI.Social.ProfileFollowsLive
# inventory: "inventory", # inventory: Bonfire.UI.Reflow.ProfileInventoryLive,
posts: "posts", ],
boosts: "boosts", navigation: [
# private: "private", timeline: "timeline",
], # inventory: "inventory",
widgets: [ posts: "posts",
], boosts: "boosts"
], # private: "private",
smart_input_activities: [ ],
post: "Compose a post", widgets: []
task: "Add a task", ],
offer: "Publish an offer", smart_input_activities: [
need: "Publish a need", post: "Compose a post",
# transfer_resource: "Transfer a resource", task: "Add a task",
# produce_resource: "Add a resource", offer: "Publish an offer",
# intent: "Indicate an itent", need: "Publish a need",
economic_event: "Record an economic event", # transfer_resource: "Transfer a resource",
process: "Define a process" # produce_resource: "Add a resource",
], # intent: "Indicate an itent",
smart_input_components: [ economic_event: "Record an economic event",
post: Bonfire.UI.Social.WritePostContentLive, process: "Define a process"
message: Bonfire.UI.Social.WritePostContentLive, ],
category: Bonfire.Classify.Web.NewCategoryLive, smart_input_components: [
economic_event: Bonfire.UI.ValueFlows.SelectEconomicEventLive, post: Bonfire.UI.Social.WritePostContentLive,
process: Bonfire.UI.ValueFlows.CreateProcessSmartInputLive, message: Bonfire.UI.Social.WritePostContentLive,
offer: Bonfire.UI.ValueFlows.CreateIntentLive, category: Bonfire.Classify.Web.NewCategoryLive,
need: Bonfire.UI.ValueFlows.CreateIntentLive, economic_event: Bonfire.UI.ValueFlows.SelectEconomicEventLive,
task: Bonfire.UI.Coordination.CreateTaskLive, process: Bonfire.UI.ValueFlows.CreateProcessSmartInputLive,
], offer: Bonfire.UI.ValueFlows.CreateIntentLive,
resource: [ need: Bonfire.UI.ValueFlows.CreateIntentLive,
navigation: [ task: Bonfire.UI.Coordination.CreateTaskLive
timeline: "timeline", ],
material_passport: "material passport", resource: [
], navigation: [
widgets: [ timeline: "timeline",
# Bonfire.UI.Social.SubscribeWidgetLive, material_passport: "material passport"
Bonfire.UI.ValueFlows.LocationWidgetLive, ],
Bonfire.UI.Social.HashtagsWidgetLive, widgets: [
], # Bonfire.UI.Social.SubscribeWidgetLive,
] Bonfire.UI.ValueFlows.LocationWidgetLive,
# process: [ Bonfire.UI.Social.HashtagsWidgetLive
# navigation: [ ]
# events: "Economic events", ]
# intents: "Intents",
# # material_passport: "material passport", # process: [
# ], # navigation: [
# sections: [ # events: "Economic events",
# events: Bonfire.UI.ValueFlows.EconomicEventsLive, # intents: "Intents",
# intents: Bonfire.UI.ValueFlows.IntentsLive, # # material_passport: "material passport",
# ], # ],
# widgets: [ # sections: [
# # Bonfire.UI.Social.SubscribeWidgetLive, # events: Bonfire.UI.ValueFlows.EconomicEventsLive,
# # Bonfire.UI.ValueFlows.LocationWidgetLive, # intents: Bonfire.UI.ValueFlows.IntentsLive,
# # Bonfire.UI.Social.HashtagsWidgetLive, # ],
# ], # widgets: [
# ] # # Bonfire.UI.Social.SubscribeWidgetLive,
# # Bonfire.UI.ValueFlows.LocationWidgetLive,
# # Bonfire.UI.Social.HashtagsWidgetLive,
# ],
# ]
config :surface_catalogue, config :surface_catalogue,
title: "Bonfire UI", title: "Bonfire UI",
subtitle: "Surface Components Documentation & Examples" subtitle: "Surface Components Documentation & Examples"

View file

@ -2,7 +2,7 @@ import Config
default_flavour = "classic" default_flavour = "classic"
flavour = System.get_env("FLAVOUR", default_flavour) flavour = System.get_env("FLAVOUR", default_flavour)
flavour_path = System.get_env("FLAVOUR_PATH", "flavours/"<>flavour) flavour_path = System.get_env("FLAVOUR_PATH", "flavours/" <> flavour)
#### Basic configuration #### Basic configuration
@ -33,7 +33,8 @@ config :bonfire,
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint,
url: [host: "localhost"], url: [host: "localhost"],
http: [ http: [
port: String.to_integer(System.get_env("SERVER_PORT", "4000")), # this gets overriden in runtime.exs # this gets overriden in runtime.exs
port: String.to_integer(System.get_env("SERVER_PORT", "4000")),
transport_options: [socket_opts: [:inet6]] transport_options: [socket_opts: [:inet6]]
], ],
render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false], render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false],
@ -44,6 +45,7 @@ config :phoenix_gon, :json_library, Jason
config :ecto_sparkles, :otp_app, :bonfire config :ecto_sparkles, :otp_app, :bonfire
config :bonfire, :ecto_repos, [Bonfire.Common.Repo] config :bonfire, :ecto_repos, [Bonfire.Common.Repo]
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
types: Bonfire.Geolocate.PostgresTypes, types: Bonfire.Geolocate.PostgresTypes,
priv: flavour_path <> "/repo" priv: flavour_path <> "/repo"
@ -74,10 +76,9 @@ config :mime, :types, %{
config :sentry, config :sentry,
dsn: "this-will-be-overriden-by-a-secure-string-in-runtime.exs", dsn: "this-will-be-overriden-by-a-secure-string-in-runtime.exs",
environment_name: Mix.env, environment_name: Mix.env(),
included_environments: [:prod] included_environments: [:prod]
# include config for all used Bonfire extensions # include config for all used Bonfire extensions
for config <- "bonfire_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do for config <- "bonfire_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do
# IO.inspect(include_config: config) # IO.inspect(include_config: config)
@ -86,6 +87,5 @@ end
import_config "activity_pub.exs" import_config "activity_pub.exs"
# finally, append/override config based on env, which will override any config set above (including from imported files) # finally, append/override config based on env, which will override any config set above (including from imported files)
import_config "#{config_env()}.exs" import_config "#{config_env()}.exs"

View file

@ -1,21 +1,27 @@
import Config import Config
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
experimental_features_enabled: true, # Note: you can run `Bonfire.Common.Config.put(:experimental_features_enabled, true)` to enable these in prod too # Note: you can run `Bonfire.Common.Config.put(:experimental_features_enabled, true)` to enable these in prod too
experimental_features_enabled: true,
database: System.get_env("POSTGRES_DB", "bonfire_dev"), database: System.get_env("POSTGRES_DB", "bonfire_dev"),
# show_sensitive_data_on_connection_error: true, # show_sensitive_data_on_connection_error: true,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"), pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
log: false # EctoSparkles does the logging instead # EctoSparkles does the logging instead
log: false
path_dep_dirs = path_dep_dirs =
Mess.deps([path: "deps.path"], []) Mess.deps([path: "deps.path"], [])
|> Enum.map(&(Keyword.fetch!(elem(&1, 1), :path) <> "/lib")) |> Enum.map(&(Keyword.fetch!(elem(&1, 1), :path) <> "/lib"))
config :phoenix_live_reload, config :phoenix_live_reload,
dirs: path_dep_dirs ++ ["lib/"] # watch the app's lib/ dir + the dep/lib/ dir of every locally-cloned dep # watch the app's lib/ dir + the dep/lib/ dir of every locally-cloned dep
dirs: path_dep_dirs ++ ["lib/"]
path_dep_patterns = path_dep_dirs |> Enum.map(&(String.slice(&1, 2..1000) <>".*ex")) # to include cloned code in patterns # to include cloned code in patterns
path_dep_patterns = path_dep_patterns ++ path_dep_dirs |> Enum.map(&(String.slice(&1, 2..1000) <>".*sface")) # Surface views path_dep_patterns = Enum.map(path_dep_dirs, &(String.slice(&1, 2..1000) <> ".*ex"))
# Surface views
path_dep_patterns =
(path_dep_patterns ++ path_dep_dirs) |> Enum.map(&(String.slice(&1, 2..1000) <> ".*sface"))
# Watch static and templates for browser reloading. # Watch static and templates for browser reloading.
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint,
@ -38,24 +44,26 @@ config :bonfire, Bonfire.Web.Endpoint,
] ]
], ],
live_reload: [ live_reload: [
patterns: [ patterns:
# ~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$", [
# ~r"^priv/gettext/.*(po)$", # ~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
# ~r"^web/(live|views)/.*ex$", # ~r"^priv/gettext/.*(po)$",
# ~r"^lib/.*_live\.ex$", # ~r"^web/(live|views)/.*ex$",
# ~r".*leex$", # ~r"^lib/.*_live\.ex$",
~r"lib/.*ex$", # ~r".*leex$",
~r".*sface$", # defp elixirc_paths(:dev), do: ["lib"] ++ catalogues()
~r"priv/catalogue/.*(ex)$",
] ++ path_dep_patterns
]
# defp elixirc_paths(:dev), do: ["lib"] ++ catalogues() ~r"lib/.*ex$",
~r".*sface$",
~r"priv/catalogue/.*(ex)$"
] ++ path_dep_patterns
]
config :logger, :console, config :logger, :console,
level: :debug, level: :debug,
# truncate: :infinity, # truncate: :infinity,
format: "[$level] $message\n" # Do not include metadata or timestamps # Do not include metadata or timestamps
format: "[$level] $message\n"
config :phoenix, :stacktrace_depth, 30 config :phoenix, :stacktrace_depth, 30

View file

@ -1,13 +1,11 @@
import Config import Config
# We include the path to a cache manifest # We include the path to a cache manifest
# containing the digested version of static files. This # containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task, # manifest is generated by the `mix phx.digest` task,
# which you should run after static files are built and # which you should run after static files are built and
# before starting your production server. # before starting your production server.
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
cache_static_manifest: "priv/static/cache_manifest.json"
config :logger, config :logger,
backends: [:console, Sentry.LoggerBackend] backends: [:console, Sentry.LoggerBackend]
@ -18,4 +16,5 @@ config :logger, level: :info
config :bonfire, Bonfire.Web.Endpoint, server: true config :bonfire, Bonfire.Web.Endpoint, server: true
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
priv: "priv/repo" # in releases migrations are not in a flavour-specific directory # in releases migrations are not in a flavour-specific directory
priv: "priv/repo"

View file

@ -13,16 +13,15 @@ Bonfire.Common.Config.LoadExtensionsConfig.load_configs()
## ##
System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") || System.get_env("CI") || System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") || System.get_env("CI") ||
raise """ raise """
Environment variables for database are missing. Environment variables for database are missing.
For example: DATABASE_URL=ecto://USER:PASS@HOST/DATABASE For example: DATABASE_URL=ecto://USER:PASS@HOST/DATABASE
You can also set POSTGRES_PASSWORD (required), You can also set POSTGRES_PASSWORD (required),
and POSTGRES_USER (default: postgres) and POSTGRES_HOST (default: localhost) and POSTGRES_USER (default: postgres) and POSTGRES_HOST (default: localhost)
""" """
if System.get_env("DATABASE_URL") do if System.get_env("DATABASE_URL") do
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo, url: System.get_env("DATABASE_URL")
url: System.get_env("DATABASE_URL")
else else
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
# ssl: true, # ssl: true,
@ -38,12 +37,14 @@ secret_key_base =
You can generate one by calling: mix phx.gen.secret You can generate one by calling: mix phx.gen.secret
""" """
signing_salt = System.get_env("SIGNING_SALT") || System.get_env("CI") || signing_salt =
System.get_env("SIGNING_SALT") || System.get_env("CI") ||
raise """ raise """
environment variable SIGNING_SALT is missing. environment variable SIGNING_SALT is missing.
""" """
encryption_salt = System.get_env("ENCRYPTION_SALT") || System.get_env("CI") || encryption_salt =
System.get_env("ENCRYPTION_SALT") || System.get_env("CI") ||
raise """ raise """
environment variable ENCRYPTION_SALT is missing. environment variable ENCRYPTION_SALT is missing.
""" """
@ -57,7 +58,10 @@ config :bonfire,
encryption_salt: encryption_salt, encryption_salt: encryption_salt,
signing_salt: signing_salt signing_salt: signing_salt
start_server? = if config_env() == :test, do: System.get_env("START_SERVER", "true"), else: System.get_env("START_SERVER", "true") start_server? =
if config_env() == :test,
do: System.get_env("START_SERVER", "true"),
else: System.get_env("START_SERVER", "true")
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint,
server: String.to_existing_atom(start_server?), server: String.to_existing_atom(start_server?),
@ -72,9 +76,7 @@ config :bonfire, Bonfire.Web.Endpoint,
live_view: [signing_salt: signing_salt] live_view: [signing_salt: signing_salt]
if System.get_env("SENTRY_DSN") do if System.get_env("SENTRY_DSN") do
IO.puts( IO.puts("Note: errors will be reported to Sentry.")
"Note: errors will be reported to Sentry."
)
config :sentry, config :sentry,
dsn: System.get_env("SENTRY_DSN") dsn: System.get_env("SENTRY_DSN")
@ -86,22 +88,20 @@ end
# start prod-only config # start prod-only config
if config_env() == :prod do if config_env() == :prod do
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
# ssl: true, # ssl: true,
database: System.get_env("POSTGRES_DB", "bonfire"), database: System.get_env("POSTGRES_DB", "bonfire"),
pool_size: String.to_integer(System.get_env("POOL_SIZE", "10")), pool_size: String.to_integer(System.get_env("POOL_SIZE", "10")),
log: String.to_atom(System.get_env("DB_QUERIES_LOG_LEVEL", "false")) # Note: keep this disabled if using ecto_dev_logger or EctoSparkles.Log instead # # Note: keep this disabled if using ecto_dev_logger or EctoSparkles.Log instead #
log: String.to_atom(System.get_env("DB_QUERIES_LOG_LEVEL", "false"))
end # prod only config end
# prod only config
# start prod and dev only config # start prod and dev only config
if config_env() != :test do if config_env() != :test do
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
slow_query_ms: String.to_integer(System.get_env("SLOW_QUERY_MS", "100")) slow_query_ms: String.to_integer(System.get_env("SLOW_QUERY_MS", "100"))
end end
## bonfire_livebook ## bonfire_livebook

View file

@ -15,7 +15,6 @@ config :bonfire_search,
config :logger, level: :info config :logger, level: :info
# config :logger, level: :notice # config :logger, level: :notice
# Configure your database # Configure your database
db = "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}" db = "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}"
# #
@ -46,6 +45,7 @@ config :mix_test_interactive,
clear: true clear: true
config :paginator, ecto_repos: [Bonfire.Common.Repo] config :paginator, ecto_repos: [Bonfire.Common.Repo]
config :paginator, Paginator.Repo, config :paginator, Paginator.Repo,
pool: Ecto.Adapters.SQL.Sandbox, pool: Ecto.Adapters.SQL.Sandbox,
username: System.get_env("POSTGRES_USER", "postgres"), username: System.get_env("POSTGRES_USER", "postgres"),

View file

@ -2,11 +2,10 @@ defmodule Bonfire.Repo.Migrations.HelloWorld do
use Ecto.Migration use Ecto.Migration
def up do def up do
execute "CREATE EXTENSION IF NOT EXISTS \"citext\"" execute("CREATE EXTENSION IF NOT EXISTS \"citext\"")
end end
def down do def down do
execute "DROP EXTENSION IF EXISTS \"citext\"" execute("DROP EXTENSION IF EXISTS \"citext\"")
end end
end end

View file

@ -6,9 +6,9 @@ defmodule Bonfire.Repo.Migrations.InitPointers do
init_pointers_ulid_extra() init_pointers_ulid_extra()
init_pointers() init_pointers()
end end
def down do def down do
init_pointers_ulid_extra() init_pointers_ulid_extra()
init_pointers() init_pointers()
end end
end end

View file

@ -2,7 +2,6 @@ defmodule Bonfire.Repo.Migrations.InitEdges do
use Ecto.Migration use Ecto.Migration
alias Bonfire.Data.Edges.Migration alias Bonfire.Data.Edges.Migration
def up do def up do
Migration.up() Migration.up()
end end
@ -10,5 +9,4 @@ defmodule Bonfire.Repo.Migrations.InitEdges do
def down do def down do
Migration.down() Migration.down()
end end
end end

View file

@ -6,5 +6,4 @@ defmodule Bonfire.Federate.ActivityPub.Repo.Migrations.ImportMe do
def up, do: migrate_activity_pub def up, do: migrate_activity_pub
def down, do: migrate_activity_pub def down, do: migrate_activity_pub
end end

View file

@ -5,5 +5,4 @@ defmodule Bonfire.Boundaries.Repo.Migrations.ImportBoundaries do
def up, do: migrate_boundaries def up, do: migrate_boundaries
def down, do: migrate_boundaries def down, do: migrate_boundaries
end end

View file

@ -9,5 +9,4 @@ defmodule Bonfire.Repo.Migrations.ImportMe do
end end
def down, do: migrate_me() def down, do: migrate_me()
end end

View file

@ -5,10 +5,8 @@ defmodule Bonfire.Social.Repo.Migrations.ImportSocial do
import Pointers.Migration import Pointers.Migration
def up do def up do
migrate_social() migrate_social()
end end
def down, do: migrate_social()
def down, do: migrate_social()
end end

View file

@ -5,5 +5,4 @@ defmodule Bonfire.Boundaries.Repo.Migrations.BoundariesFixtures do
def up, do: Bonfire.Boundaries.Fixtures.insert() def up, do: Bonfire.Boundaries.Fixtures.insert()
def down, do: nil def down, do: nil
end end

View file

@ -2,12 +2,12 @@ defmodule Bonfire.Repo.Migrations.ImportQuantify do
use Ecto.Migration use Ecto.Migration
def up do def up do
Bonfire.Quantify.Migrations.change Bonfire.Quantify.Migrations.change()
Bonfire.Quantify.Migrations.change_measure Bonfire.Quantify.Migrations.change_measure()
end end
def down do def down do
Bonfire.Quantify.Migrations.change Bonfire.Quantify.Migrations.change()
Bonfire.Quantify.Migrations.change_measure Bonfire.Quantify.Migrations.change_measure()
end end
end end

View file

@ -2,10 +2,10 @@ defmodule Bonfire.Repo.Migrations.ImportGeolocation do
use Ecto.Migration use Ecto.Migration
def up do def up do
Bonfire.Geolocate.Migrations.change Bonfire.Geolocate.Migrations.change()
end end
def down do def down do
Bonfire.Geolocate.Migrations.change Bonfire.Geolocate.Migrations.change()
end end
end end

View file

@ -2,10 +2,10 @@ defmodule Bonfire.Repo.Migrations.ImportValueFlows do
use Ecto.Migration use Ecto.Migration
def up do def up do
ValueFlows.AllMigrations.up ValueFlows.AllMigrations.up()
end end
def down do def down do
ValueFlows.AllMigrations.down ValueFlows.AllMigrations.down()
end end
end end

View file

@ -6,5 +6,4 @@ defmodule Bonfire.Repo.Migrations.ImportSharedUser do
def up, do: migrate_shared_user() def up, do: migrate_shared_user()
def down, do: migrate_shared_user() def down, do: migrate_shared_user()
end end

View file

@ -4,10 +4,10 @@ defmodule Bonfire.Repo.Migrations.ImportValueFlowsObserve do
alias ValueFlows.Observe.Migrations alias ValueFlows.Observe.Migrations
def up do def up do
Migrations.up Migrations.up()
end end
def down do def down do
Migrations.down Migrations.down()
end end
end end

View file

@ -4,12 +4,12 @@ defmodule ActivityPub.Repo.Migrations.APTestTable do
def change do def change do
# This table only exists for test purposes # This table only exists for test purposes
create table("local_actor", primary_key: false) do create table("local_actor", primary_key: false) do
add :id, :uuid, primary_key: true add(:id, :uuid, primary_key: true)
add :username, :citext add(:username, :citext)
add :data, :map add(:data, :map)
add :local, :boolean add(:local, :boolean)
add :keys, :text add(:keys, :text)
add :followers, {:array, :string} add(:followers, {:array, :string})
end end
end end
end end

View file

@ -5,5 +5,4 @@ defmodule Bonfire.Repo.Migrations.Message do
def up, do: migrate_message() def up, do: migrate_message()
def down, do: migrate_message() def down, do: migrate_message()
end end

View file

@ -4,15 +4,19 @@ defmodule Bonfire.Social.Repo.Migrations.ProfileImages do
import Pointers.Migration import Pointers.Migration
def up do def up do
drop_if_exists(
constraint("bonfire_data_social_profile", "bonfire_data_social_profile_icon_id_fkey")
)
drop_if_exists constraint "bonfire_data_social_profile", "bonfire_data_social_profile_icon_id_fkey" drop_if_exists(
drop_if_exists constraint "bonfire_data_social_profile", "bonfire_data_social_profile_image_id_fkey" constraint("bonfire_data_social_profile", "bonfire_data_social_profile_image_id_fkey")
)
alter table("bonfire_data_social_profile") do alter table("bonfire_data_social_profile") do
Ecto.Migration.add_if_not_exists :icon_id, strong_pointer(Bonfire.Files.Media) Ecto.Migration.add_if_not_exists(:icon_id, strong_pointer(Bonfire.Files.Media))
Ecto.Migration.add_if_not_exists :image_id, strong_pointer(Bonfire.Files.Media) Ecto.Migration.add_if_not_exists(:image_id, strong_pointer(Bonfire.Files.Media))
end end
end end
def down, do: nil
def down, do: nil
end end

View file

@ -1,7 +1,6 @@
defmodule Bonfire.Repo.Migrations.FP do defmodule Bonfire.Repo.Migrations.FP do
use Ecto.Migration use Ecto.Migration
def up do def up do
execute("create or replace function execute("create or replace function
column_exists(ptable text, pcolumn text, pschema text default 'public') column_exists(ptable text, pcolumn text, pschema text default 'public')
@ -18,7 +17,8 @@ defmodule Bonfire.Repo.Migrations.FP do
); );
$body$;") $body$;")
execute("CREATE OR REPLACE FUNCTION rename_column_if_exists(ptable TEXT, pcolumn TEXT, new_name TEXT) execute(
"CREATE OR REPLACE FUNCTION rename_column_if_exists(ptable TEXT, pcolumn TEXT, new_name TEXT)
RETURNS VOID AS $BODY$ RETURNS VOID AS $BODY$
BEGIN BEGIN
-- Rename the column if it exists. -- Rename the column if it exists.
@ -27,14 +27,15 @@ defmodule Bonfire.Repo.Migrations.FP do
ptable, pcolumn, new_name); ptable, pcolumn, new_name);
END IF; END IF;
END$BODY$ END$BODY$
LANGUAGE plpgsql VOLATILE;") LANGUAGE plpgsql VOLATILE;"
)
flush() flush()
execute("SELECT rename_column_if_exists('bonfire_data_social_feed_publish', 'object_id', 'activity_id') ") execute(
"SELECT rename_column_if_exists('bonfire_data_social_feed_publish', 'object_id', 'activity_id') "
)
end end
def down, do: nil def down, do: nil
end end

View file

@ -5,9 +5,9 @@ defmodule Bonfire.Social.Repo.Migrations.PeeredURI do
def up do def up do
alter table("bonfire_data_activity_pub_peered") do alter table("bonfire_data_activity_pub_peered") do
Ecto.Migration.add_if_not_exists :canonical_uri, :text, null: true Ecto.Migration.add_if_not_exists(:canonical_uri, :text, null: true)
end end
end end
def down, do: nil
def down, do: nil
end end

View file

@ -2,10 +2,10 @@ defmodule Bonfire.Repo.Migrations.ImportClassify do
use Ecto.Migration use Ecto.Migration
def up do def up do
Bonfire.Classify.Migrations.up Bonfire.Classify.Migrations.up()
end end
def down do def down do
Bonfire.Classify.Migrations.down Bonfire.Classify.Migrations.down()
end end
end end

View file

@ -2,7 +2,6 @@ defmodule Bonfire.Repo.Migrations.ImportRanked do
use Ecto.Migration use Ecto.Migration
require Bonfire.Data.Assort.Ranked.Migration require Bonfire.Data.Assort.Ranked.Migration
def up, do: Bonfire.Data.Assort.Ranked.Migration.migrate_ranked def up, do: Bonfire.Data.Assort.Ranked.Migration.migrate_ranked()
def down, do: Bonfire.Data.Assort.Ranked.Migration.migrate_ranked def down, do: Bonfire.Data.Assort.Ranked.Migration.migrate_ranked()
end end

View file

@ -3,7 +3,7 @@ defmodule Bonfire.Repo.Migrations.ImportCommitmentSatisfaction do
def up do def up do
ValueFlows.Planning.Commitment.Migrations.up() ValueFlows.Planning.Commitment.Migrations.up()
ValueFlows.Planning.Satisfaction.Migrations.up() ValueFlows.Planning.Satisfaction.Migrations.up()
end end
def down do def down do

View file

@ -2,10 +2,10 @@ defmodule Bonfire.Repo.Migrations.ImportInviteLink do
use Ecto.Migration use Ecto.Migration
def up do def up do
Bonfire.Invites.Link.Migration.up Bonfire.Invites.Link.Migration.up()
end end
def down do def down do
Bonfire.Invites.Link.Migration.down Bonfire.Invites.Link.Migration.down()
end end
end end

View file

@ -4,5 +4,4 @@ defmodule Bonfire.Data.Identity.Repo.Migrations.CareClosure do
alias Bonfire.Data.Identity.CareClosure.Migration alias Bonfire.Data.Identity.CareClosure.Migration
def change, do: Migration.migrate_care_closure_view() def change, do: Migration.migrate_care_closure_view()
end end

View file

@ -2,7 +2,7 @@ defmodule Bonfire.Repo.Migrations.ImportSettings do
use Ecto.Migration use Ecto.Migration
require Bonfire.Data.Identity.Settings.Migration require Bonfire.Data.Identity.Settings.Migration
def up do def up do
Bonfire.Data.Identity.Settings.Migration.migrate_settings(:up) Bonfire.Data.Identity.Settings.Migration.migrate_settings(:up)
end end

View file

@ -5,9 +5,10 @@ defmodule Bonfire.Repo.Migrations.AddFilesMixin do
import Pointers.Migration import Pointers.Migration
def up do def up do
alter table("bonfire_files_media") do # cleanup old stuff # cleanup old stuff
remove_if_exists :created_at, :utc_datetime_usec alter table("bonfire_files_media") do
remove_if_exists :updated_at, :utc_datetime_usec remove_if_exists(:created_at, :utc_datetime_usec)
remove_if_exists(:updated_at, :utc_datetime_usec)
end end
Bonfire.Files.Migrations.migrate_files() Bonfire.Files.Migrations.migrate_files()

View file

@ -5,5 +5,4 @@ defmodule Bonfire.Boundaries.Repo.Migrations.BoundariesUpFixtures do
def up, do: Bonfire.Boundaries.Fixtures.insert() def up, do: Bonfire.Boundaries.Fixtures.insert()
def down, do: nil def down, do: nil
end end

View file

@ -3,28 +3,30 @@ import Bonfire.Me.Fake
System.put_env("INVITE_ONLY", "false") System.put_env("INVITE_ONLY", "false")
System.put_env("SEARCH_INDEXING_DISABLED", "true") System.put_env("SEARCH_INDEXING_DISABLED", "true")
%{ fake_user!(
preferred_username: System.get_env("SEEDS_USER", "root"), %{
name: System.get_env("SEEDS_USER", "Seed User") preferred_username: System.get_env("SEEDS_USER", "root"),
} name: System.get_env("SEEDS_USER", "Seed User")
|> fake_user!(%{confirm_email: true}) },
%{confirm_email: true}
)
# create some users # create some users
users = for _ <- 1..2, do: fake_user!() users = for _ <- 1..2, do: fake_user!()
random_user = fn -> Faker.Util.pick(users) end random_user = fn -> Faker.Util.pick(users) end
# start some communities # start some communities
#communities = for _ <- 1..2, do: fake_community!(random_user.()) # communities = for _ <- 1..2, do: fake_community!(random_user.())
#subcommunities = for _ <- 1..2, do: fake_community!(random_user.(), Faker.Util.pick(communities)) # subcommunities = for _ <- 1..2, do: fake_community!(random_user.(), Faker.Util.pick(communities))
#maybe_random_community = fn -> maybe_one_of(communities ++ subcommunities) end # maybe_random_community = fn -> maybe_one_of(communities ++ subcommunities) end
# create fake collections # create fake collections
#collections = for _ <- 1..4, do: fake_collection!(random_user.(), maybe_random_community.()) # collections = for _ <- 1..4, do: fake_collection!(random_user.(), maybe_random_community.())
#subcollections = for _ <- 1..2, do: fake_collection!(random_user.(), Faker.Util.pick(collections)) # subcollections = for _ <- 1..2, do: fake_collection!(random_user.(), Faker.Util.pick(collections))
#maybe_random_collection = fn -> maybe_one_of(collections ++ subcollections) end # maybe_random_collection = fn -> maybe_one_of(collections ++ subcollections) end
# start fake threads # start fake threads
#for _ <- 1..3 do # for _ <- 1..3 do
# user = random_user.() # user = random_user.()
# thread = fake_thread!(user, maybe_random_community.()) # thread = fake_thread!(user, maybe_random_community.())
# comment = fake_comment!(user, thread) # comment = fake_comment!(user, thread)
@ -32,18 +34,18 @@ random_user = fn -> Faker.Util.pick(users) end
# reply = fake_comment!(random_user.(), thread, %{in_reply_to_id: comment.id}) # reply = fake_comment!(random_user.(), thread, %{in_reply_to_id: comment.id})
# subreply = fake_comment!(random_user.(), thread, %{in_reply_to_id: reply.id}) # subreply = fake_comment!(random_user.(), thread, %{in_reply_to_id: reply.id})
# subreply2 = fake_comment!(random_user.(), thread, %{in_reply_to_id: subreply.id}) # subreply2 = fake_comment!(random_user.(), thread, %{in_reply_to_id: subreply.id})
#end # end
# #
## more fake threads ## more fake threads
#for _ <- 1..2 do # for _ <- 1..2 do
# user = random_user.() # user = random_user.()
# thread = fake_thread!(user, maybe_random_collection.()) # thread = fake_thread!(user, maybe_random_collection.())
# comment = fake_comment!(user, thread) # comment = fake_comment!(user, thread)
#end # end
# post some links/resources # post some links/resources
#for _ <- 1..2, do: fake_resource!(random_user.(), maybe_random_community.()) # for _ <- 1..2, do: fake_resource!(random_user.(), maybe_random_community.())
#for _ <- 1..2, do: fake_resource!(random_user.(), maybe_random_collection.()) # for _ <- 1..2, do: fake_resource!(random_user.(), maybe_random_collection.())
# define some tags/categories # define some tags/categories
if(Bonfire.Common.Extend.extension_enabled?(Bonfire.Classify.Simulate)) do if(Bonfire.Common.Extend.extension_enabled?(Bonfire.Classify.Simulate)) do
@ -89,18 +91,22 @@ if(Bonfire.Common.Extend.extension_enabled?(ValueFlows.Simulate)) do
# some proposed intents # some proposed intents
action_id = ValueFlows.Simulate.action_id() action_id = ValueFlows.Simulate.action_id()
intent = ValueFlows.Simulate.fake_intent!(user, %{resource_conforms_to: res_spec, action_id: action_id})
intent =
ValueFlows.Simulate.fake_intent!(user, %{
resource_conforms_to: res_spec,
action_id: action_id
})
proposal = ValueFlows.Simulate.fake_proposal!(user) proposal = ValueFlows.Simulate.fake_proposal!(user)
ValueFlows.Simulate.fake_proposed_to!(random_user.(), proposal) ValueFlows.Simulate.fake_proposed_to!(random_user.(), proposal)
ValueFlows.Simulate.fake_proposed_intent!(proposal, intent) ValueFlows.Simulate.fake_proposed_intent!(proposal, intent)
# define some geolocations # define some geolocations
if(Bonfire.Common.Extend.extension_enabled?(Bonfire.Geolocate.Simulate)) do if(Bonfire.Common.Extend.extension_enabled?(Bonfire.Geolocate.Simulate)) do
places = for _ <- 1..2, do: Bonfire.Geolocate.Simulate.fake_geolocation!(random_user.()) places = for _ <- 1..2, do: Bonfire.Geolocate.Simulate.fake_geolocation!(random_user.())
random_place = fn -> Faker.Util.pick(places) end random_place = fn -> Faker.Util.pick(places) end
for _ <- 1..2 do for _ <- 1..2 do
# define some intents with geolocation # define some intents with geolocation
_intent = _intent =
@ -110,7 +116,8 @@ if(Bonfire.Common.Extend.extension_enabled?(ValueFlows.Simulate)) do
) )
# define some proposals with geolocation # define some proposals with geolocation
_proposal = ValueFlows.Simulate.fake_proposal!(user, %{eligible_location: random_place.()}) _proposal =
ValueFlows.Simulate.fake_proposal!(user, %{eligible_location: random_place.()})
# both with geo # both with geo
intent = intent =
@ -125,8 +132,13 @@ if(Bonfire.Common.Extend.extension_enabled?(ValueFlows.Simulate)) do
# some economic events # some economic events
user = random_user.() user = random_user.()
resource_inventoried_as = ValueFlows.Simulate.fake_economic_resource!(user, %{current_location: random_place.()}) resource_inventoried_as =
to_resource_inventoried_as = ValueFlows.Simulate.fake_economic_resource!(random_user.(), %{current_location: random_place.()}) ValueFlows.Simulate.fake_economic_resource!(user, %{current_location: random_place.()})
to_resource_inventoried_as =
ValueFlows.Simulate.fake_economic_resource!(random_user.(), %{
current_location: random_place.()
})
ValueFlows.Simulate.fake_economic_event!( ValueFlows.Simulate.fake_economic_event!(
user, user,
@ -162,7 +174,9 @@ if(Bonfire.Common.Extend.extension_enabled?(ValueFlows.Simulate)) do
unit = Faker.Util.pick([unit1, unit2]) unit = Faker.Util.pick([unit1, unit2])
resource_inventoried_as = ValueFlows.Simulate.fake_economic_resource!(user, %{}, unit) resource_inventoried_as = ValueFlows.Simulate.fake_economic_resource!(user, %{}, unit)
to_resource_inventoried_as = ValueFlows.Simulate.fake_economic_resource!(random_user.(), %{}, unit)
to_resource_inventoried_as =
ValueFlows.Simulate.fake_economic_resource!(random_user.(), %{}, unit)
ValueFlows.Simulate.fake_economic_event!( ValueFlows.Simulate.fake_economic_event!(
user, user,

View file

@ -1,7 +1,7 @@
defmodule Bonfire.Repo.Seeds.ObserveClassifications do defmodule Bonfire.Repo.Seeds.ObserveClassifications do
use Bonfire.Seeder use Bonfire.Seeder
envs [:dev, :prod, :test] envs([:dev, :prod, :test])
def up(repo), do: ValueFlows.Observe.Seeds.up(repo) def up(repo), do: ValueFlows.Observe.Seeds.up(repo)
end end

View file

@ -12,9 +12,8 @@ config :activity_pub, Oban,
repo: Bonfire.Common.Repo, repo: Bonfire.Common.Repo,
queues: false queues: false
config :activity_pub, :instance, config :activity_pub, :instance, federating: false
federating: false # rewrite_policy: [ActivityPub.MRF.SimplePolicy]
# rewrite_policy: [ActivityPub.MRF.SimplePolicy]
config :tesla, adapter: Tesla.Mock config :tesla, adapter: Tesla.Mock

View file

@ -8,7 +8,8 @@ config :bonfire_common,
# internationalisation # internationalisation
config :bonfire_common, Bonfire.Common.Localise.Cldr, config :bonfire_common, Bonfire.Common.Localise.Cldr,
default_locale: default_locale, default_locale: default_locale,
locales: ["fr", "en", "es"], # locales that will be made available on top of those for which gettext localisation files are available # locales that will be made available on top of those for which gettext localisation files are available
locales: ["fr", "en", "es"],
providers: [Cldr.Language], providers: [Cldr.Language],
gettext: Bonfire.Common.Localise.Gettext, gettext: Bonfire.Common.Localise.Gettext,
data_dir: "./priv/cldr", data_dir: "./priv/cldr",

File diff suppressed because it is too large Load diff

View file

@ -11,9 +11,11 @@ config :bonfire_fail,
bad_header: {400, "Bad request: malformed header."}, bad_header: {400, "Bad request: malformed header."},
no_access: {403, "This site is by invitation only."}, no_access: {403, "This site is by invitation only."},
token_expired: {403, "This link or token has expired, please request a fresh one."}, token_expired: {403, "This link or token has expired, please request a fresh one."},
already_claimed: {403, "This link or token was already used, please request a fresh one if necessary."}, already_claimed:
{403, "This link or token was already used, please request a fresh one if necessary."},
token_not_found: {403, "This token was not found, please request a fresh one."}, token_not_found: {403, "This token was not found, please request a fresh one."},
user_disabled: {403, "This user account is disabled. Please contact the instance administrator."}, user_disabled:
{403, "This user account is disabled. Please contact the instance administrator."},
email_not_confirmed: {403, "Please confirm your email address first."}, email_not_confirmed: {403, "Please confirm your email address first."},
unknown_resource: {400, "Unknown resource."}, unknown_resource: {400, "Unknown resource."},
invalid_argument: {400, "Invalid arguments passed."}, invalid_argument: {400, "Invalid arguments passed."},

View file

@ -10,12 +10,13 @@ config :bonfire,
:bonfire_me, :bonfire_me,
:bonfire_social, :bonfire_social,
:bonfire_valueflows :bonfire_valueflows
], ],
log_federation: true, # enable/disable logging of federation logic # enable/disable logging of federation logic
log_federation: true,
federation_fallback_module: Bonfire.Social.APActivities federation_fallback_module: Bonfire.Social.APActivities
config :bonfire, actor_AP_types: actor_types config :bonfire, actor_AP_types: actor_types
# config :bonfire, Bonfire.Instance, # config :bonfire, Bonfire.Instance,
# hostname: hostname, # hostname: hostname,
# description: desc # description: desc

View file

@ -4,48 +4,53 @@ import Config
# see https://hexdocs.pm/waffle/Waffle.html#module-setup-a-storage-provider # see https://hexdocs.pm/waffle/Waffle.html#module-setup-a-storage-provider
config :waffle, config :waffle,
storage: Waffle.Storage.Local, storage: Waffle.Storage.Local,
asset_host: "/" # or {:system, "ASSET_HOST"} # or {:system, "ASSET_HOST"}
asset_host: "/"
image_media_types = ["image/png", "image/jpeg", "image/gif", "image/svg+xml", "image/tiff"] image_media_types = ["image/png", "image/jpeg", "image/gif", "image/svg+xml", "image/tiff"]
all_allowed_media_types = image_media_types ++ [ all_allowed_media_types =
"text/plain", image_media_types ++
# doc [
"text/csv", "text/plain",
"application/pdf", # doc
"application/rtf", "text/csv",
"application/msword", "application/pdf",
"application/vnd.ms-excel", "application/rtf",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/msword",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.ms-excel",
"application/vnd.oasis.opendocument.presentation", "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.oasis.opendocument.spreadsheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.presentation",
"application/epub+zip", "application/vnd.oasis.opendocument.spreadsheet",
# archives "application/vnd.oasis.opendocument.text",
"application/x-tar", "application/epub+zip",
"application/x-bzip", # archives
"application/x-bzip2", "application/x-tar",
"application/gzip", "application/x-bzip",
"application/zip", "application/x-bzip2",
"application/rar", "application/gzip",
"application/x-7z-compressed", "application/zip",
# audio "application/rar",
"audio/mpeg", "application/x-7z-compressed",
"audio/ogg", # audio
"audio/wav", "audio/mpeg",
"audio/webm", "audio/ogg",
"audio/opus", "audio/wav",
# video "audio/webm",
"video/mp4", "audio/opus",
"video/mpeg", # video
"video/ogg", "video/mp4",
"video/webm", "video/mpeg",
] "video/ogg",
"video/webm"
]
config :bonfire_files, image_media_types: image_media_types config :bonfire_files, image_media_types: image_media_types
config :bonfire_files, all_allowed_media_types: all_allowed_media_types config :bonfire_files, all_allowed_media_types: all_allowed_media_types
config :bonfire_files, Bonfire.Files.IconUploader, allowed_media_types: image_media_types config :bonfire_files, Bonfire.Files.IconUploader, allowed_media_types: image_media_types
config :bonfire_files, Bonfire.Files.ImageUploader, allowed_media_types: image_media_types config :bonfire_files, Bonfire.Files.ImageUploader, allowed_media_types: image_media_types
config :bonfire_files, Bonfire.Files.DocumentUploader, allowed_media_types: all_allowed_media_types
config :bonfire_files, Bonfire.Files.DocumentUploader,
allowed_media_types: all_allowed_media_types

View file

@ -2,4 +2,5 @@ import Config
config :bonfire_me, config :bonfire_me,
validate_name_min: 1, validate_name_min: 1,
validate_name_max: 250 # needed for taxonomy # needed for taxonomy
validate_name_max: 250

View file

@ -3,8 +3,10 @@ import Config
config :bonfire_search, config :bonfire_search,
disable_indexing: System.get_env("SEARCH_INDEXING_DISABLED", "false"), disable_indexing: System.get_env("SEARCH_INDEXING_DISABLED", "false"),
adapter: Bonfire.Search.Meili, adapter: Bonfire.Search.Meili,
instance: System.get_env("SEARCH_MEILI_INSTANCE", "http://search:7700"), # protocol, hostname and port # protocol, hostname and port
api_key: System.get_env("MEILI_MASTER_KEY", "make-sure-to-change-me") # secret key instance: System.get_env("SEARCH_MEILI_INSTANCE", "http://search:7700"),
# secret key
api_key: System.get_env("MEILI_MASTER_KEY", "make-sure-to-change-me")
# for use by API client # for use by API client
config :tesla, adapter: Tesla.Adapter.Hackney config :tesla, adapter: Tesla.Adapter.Hackney

View file

@ -1,49 +1,47 @@
import Config import Config
config :bonfire, :ui, config :bonfire, :ui,
theme: [ theme: [
instance_name: "HAHA Academy", instance_name: "HAHA Academy",
instance_icon: "/images/bonfire-icon.png", instance_icon: "/images/bonfire-icon.png",
instance_image: "https://haha.academy/images/wheel.png", instance_image: "https://haha.academy/images/wheel.png",
instance_description: "Community roadmaps for learning every branch of human knowledge" instance_description: "Community roadmaps for learning every branch of human knowledge"
], ],
sidebar_components: [ sidebar_components: [
{Bonfire.UI.Social.SidebarNavigationLive, []}, {Bonfire.UI.Social.SidebarNavigationLive, []}
], ],
rich_text_editor: Bonfire.Editor.Quill, rich_text_editor: Bonfire.Editor.Quill,
smart_input: [ smart_input: [
post: true, post: true,
cw: true, cw: true,
summary: true summary: true
], ],
profile: [ profile: [
sections: [ sections: [
timeline: Bonfire.UI.Social.ProfileTimelineLive, timeline: Bonfire.UI.Social.ProfileTimelineLive,
# private: Bonfire.UI.Social.MessageThreadsLive, # private: Bonfire.UI.Social.MessageThreadsLive,
posts: Bonfire.UI.Social.ProfilePostsLive, posts: Bonfire.UI.Social.ProfilePostsLive,
boosts: Bonfire.UI.Social.ProfileBoostsLive, boosts: Bonfire.UI.Social.ProfileBoostsLive,
followers: Bonfire.UI.Social.ProfileFollowsLive, followers: Bonfire.UI.Social.ProfileFollowsLive,
followed: Bonfire.UI.Social.ProfileFollowsLive, followed: Bonfire.UI.Social.ProfileFollowsLive
], ],
navigation: [ navigation: [
timeline: "timeline", timeline: "timeline",
posts: "posts", posts: "posts",
boosts: "boosts", boosts: "boosts"
# private: "private", # private: "private",
], ],
widgets: [ widgets: []
], ],
], smart_input_activities: [
smart_input_activities: [ # offer: "Publish an offer",
# offer: "Publish an offer", # need: "Publish a need",
# need: "Publish a need", # transfer_resource: "Transfer a resource",
# transfer_resource: "Transfer a resource", # produce_resource: "Add a resource",
# produce_resource: "Add a resource", # intent: "Indicate an itent",
# intent: "Indicate an itent", # economic_event: "Record an economic event",
# economic_event: "Record an economic event", # process: "Define a process"
# process: "Define a process" ],
], smart_input_components: [
smart_input_components: [ post: Bonfire.UI.Social.WritePostContentLive
post: Bonfire.UI.Social.WritePostContentLive, ]
]

View file

@ -2,7 +2,7 @@ import Config
default_flavour = "classic" default_flavour = "classic"
flavour = System.get_env("FLAVOUR", default_flavour) flavour = System.get_env("FLAVOUR", default_flavour)
flavour_path = System.get_env("FLAVOUR_PATH", "flavours/"<>flavour) flavour_path = System.get_env("FLAVOUR_PATH", "flavours/" <> flavour)
#### Basic configuration #### Basic configuration
@ -33,7 +33,8 @@ config :bonfire,
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint,
url: [host: "localhost"], url: [host: "localhost"],
http: [ http: [
port: String.to_integer(System.get_env("SERVER_PORT", "4000")), # this gets overriden in runtime.exs # this gets overriden in runtime.exs
port: String.to_integer(System.get_env("SERVER_PORT", "4000")),
transport_options: [socket_opts: [:inet6]] transport_options: [socket_opts: [:inet6]]
], ],
render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false], render_errors: [view: Bonfire.UI.Common.ErrorView, accepts: ~w(html json), layout: false],
@ -43,6 +44,7 @@ config :phoenix, :json_library, Jason
config :phoenix_gon, :json_library, Jason config :phoenix_gon, :json_library, Jason
config :bonfire, :ecto_repos, [Bonfire.Common.Repo] config :bonfire, :ecto_repos, [Bonfire.Common.Repo]
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
types: Bonfire.Geolocate.PostgresTypes, types: Bonfire.Geolocate.PostgresTypes,
priv: flavour_path <> "/repo" priv: flavour_path <> "/repo"
@ -73,10 +75,9 @@ config :mime, :types, %{
config :sentry, config :sentry,
dsn: "this-will-be-overriden-by-a-secure-string-in-runtime.exs", dsn: "this-will-be-overriden-by-a-secure-string-in-runtime.exs",
environment_name: Mix.env, environment_name: Mix.env(),
included_environments: [:prod] included_environments: [:prod]
# include config for all used Bonfire extensions # include config for all used Bonfire extensions
for config <- "bonfire_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do for config <- "bonfire_*.exs" |> Path.expand(__DIR__) |> Path.wildcard() do
# IO.inspect(include_config: config) # IO.inspect(include_config: config)
@ -85,6 +86,5 @@ end
import_config "activity_pub.exs" import_config "activity_pub.exs"
# finally, append/override config based on env, which will override any config set above (including from imported files) # finally, append/override config based on env, which will override any config set above (including from imported files)
import_config "#{config_env()}.exs" import_config "#{config_env()}.exs"

View file

@ -10,10 +10,14 @@ path_dep_dirs =
|> Enum.map(&(Keyword.fetch!(elem(&1, 1), :path) <> "/lib")) |> Enum.map(&(Keyword.fetch!(elem(&1, 1), :path) <> "/lib"))
config :phoenix_live_reload, config :phoenix_live_reload,
dirs: path_dep_dirs ++ ["lib/"] # watch the app's lib/ dir + the dep/lib/ dir of every locally-cloned dep # watch the app's lib/ dir + the dep/lib/ dir of every locally-cloned dep
dirs: path_dep_dirs ++ ["lib/"]
path_dep_patterns = path_dep_dirs |> Enum.map(&(String.slice(&1, 2..1000) <>".*ex")) # to include cloned code in patterns # to include cloned code in patterns
path_dep_patterns = path_dep_patterns ++ path_dep_dirs |> Enum.map(&(String.slice(&1, 2..1000) <>".*sface")) # Surface views path_dep_patterns = Enum.map(path_dep_dirs, &(String.slice(&1, 2..1000) <> ".*ex"))
# Surface views
path_dep_patterns =
(path_dep_patterns ++ path_dep_dirs) |> Enum.map(&(String.slice(&1, 2..1000) <> ".*sface"))
# Watch static and templates for browser reloading. # Watch static and templates for browser reloading.
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint,
@ -29,31 +33,34 @@ config :bonfire, Bonfire.Web.Endpoint,
yarn: [ yarn: [
"watch.css", "watch.css",
cd: Path.expand("assets", File.cwd!()) cd: Path.expand("assets", File.cwd!())
], ]
# yarn: [ # yarn: [
# "watch.assets", # "watch.assets",
# cd: Path.expand("assets", File.cwd!()) # cd: Path.expand("assets", File.cwd!())
# ] # ]
], ],
live_reload: [ live_reload: [
patterns: [ patterns:
# ~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$", [
# ~r"^priv/gettext/.*(po)$", # ~r"^priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
# ~r"^web/(live|views)/.*ex$", # ~r"^priv/gettext/.*(po)$",
# ~r"^lib/.*_live\.ex$", # ~r"^web/(live|views)/.*ex$",
# ~r".*leex$", # ~r"^lib/.*_live\.ex$",
~r"lib/.*ex$", # ~r".*leex$",
~r".*sface$", # defp elixirc_paths(:dev), do: ["lib"] ++ catalogues()
~r"priv/catalogue/.*(ex)$",
] ++ path_dep_patterns
]
# defp elixirc_paths(:dev), do: ["lib"] ++ catalogues() ~r"lib/.*ex$",
~r".*sface$",
~r"priv/catalogue/.*(ex)$"
] ++ path_dep_patterns
]
config :logger, :console, config :logger, :console,
level: :debug, level: :debug,
# truncate: :infinity, # truncate: :infinity,
format: "[$level] $message\n" # Do not include metadata or timestamps # Do not include metadata or timestamps
format: "[$level] $message\n"
config :phoenix, :stacktrace_depth, 30 config :phoenix, :stacktrace_depth, 30

View file

@ -1,13 +1,11 @@
import Config import Config
# We include the path to a cache manifest # We include the path to a cache manifest
# containing the digested version of static files. This # containing the digested version of static files. This
# manifest is generated by the `mix phx.digest` task, # manifest is generated by the `mix phx.digest` task,
# which you should run after static files are built and # which you should run after static files are built and
# before starting your production server. # before starting your production server.
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
cache_static_manifest: "priv/static/cache_manifest.json"
config :logger, config :logger,
backends: [:console, Sentry.LoggerBackend] backends: [:console, Sentry.LoggerBackend]
@ -18,4 +16,5 @@ config :logger, level: :info
config :bonfire, Bonfire.Web.Endpoint, server: true config :bonfire, Bonfire.Web.Endpoint, server: true
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
priv: "priv/repo" # in releases migrations are not in a flavour-specific directory # in releases migrations are not in a flavour-specific directory
priv: "priv/repo"

View file

@ -13,16 +13,15 @@ Bonfire.Common.Config.LoadExtensionsConfig.load_configs()
## ##
System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") || System.get_env("CI") || System.get_env("DATABASE_URL") || System.get_env("POSTGRES_PASSWORD") || System.get_env("CI") ||
raise """ raise """
Environment variables for database are missing. Environment variables for database are missing.
For example: DATABASE_URL=ecto://USER:PASS@HOST/DATABASE For example: DATABASE_URL=ecto://USER:PASS@HOST/DATABASE
You can also set POSTGRES_PASSWORD (required), You can also set POSTGRES_PASSWORD (required),
and POSTGRES_USER (default: postgres) and POSTGRES_HOST (default: localhost) and POSTGRES_USER (default: postgres) and POSTGRES_HOST (default: localhost)
""" """
if System.get_env("DATABASE_URL") do if System.get_env("DATABASE_URL") do
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo, url: System.get_env("DATABASE_URL")
url: System.get_env("DATABASE_URL")
else else
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
# ssl: true, # ssl: true,
@ -38,12 +37,14 @@ secret_key_base =
You can generate one by calling: mix phx.gen.secret You can generate one by calling: mix phx.gen.secret
""" """
signing_salt = System.get_env("SIGNING_SALT") || System.get_env("CI") || signing_salt =
System.get_env("SIGNING_SALT") || System.get_env("CI") ||
raise """ raise """
environment variable SIGNING_SALT is missing. environment variable SIGNING_SALT is missing.
""" """
encryption_salt = System.get_env("ENCRYPTION_SALT") || System.get_env("CI") || encryption_salt =
System.get_env("ENCRYPTION_SALT") || System.get_env("CI") ||
raise """ raise """
environment variable ENCRYPTION_SALT is missing. environment variable ENCRYPTION_SALT is missing.
""" """
@ -57,7 +58,10 @@ config :bonfire,
encryption_salt: encryption_salt, encryption_salt: encryption_salt,
signing_salt: signing_salt signing_salt: signing_salt
start_server? = if config_env() == :test, do: System.get_env("START_SERVER", "true"), else: System.get_env("START_SERVER", "true") start_server? =
if config_env() == :test,
do: System.get_env("START_SERVER", "true"),
else: System.get_env("START_SERVER", "true")
config :bonfire, Bonfire.Web.Endpoint, config :bonfire, Bonfire.Web.Endpoint,
server: String.to_existing_atom(start_server?), server: String.to_existing_atom(start_server?),
@ -72,9 +76,7 @@ config :bonfire, Bonfire.Web.Endpoint,
live_view: [signing_salt: signing_salt] live_view: [signing_salt: signing_salt]
if System.get_env("SENTRY_DSN") do if System.get_env("SENTRY_DSN") do
IO.puts( IO.puts("Note: errors will be reported to Sentry.")
"Note: errors will be reported to Sentry."
)
config :sentry, config :sentry,
dsn: System.get_env("SENTRY_DSN") dsn: System.get_env("SENTRY_DSN")
@ -86,22 +88,20 @@ end
# start prod-only config # start prod-only config
if config_env() == :prod do if config_env() == :prod do
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
# ssl: true, # ssl: true,
database: System.get_env("POSTGRES_DB", "bonfire"), database: System.get_env("POSTGRES_DB", "bonfire"),
pool_size: String.to_integer(System.get_env("POOL_SIZE", "10")), pool_size: String.to_integer(System.get_env("POOL_SIZE", "10")),
log: String.to_atom(System.get_env("DB_QUERIES_LOG_LEVEL", "false")) # Note: keep this disabled if using ecto_dev_logger or EctoSparkles.Log instead # # Note: keep this disabled if using ecto_dev_logger or EctoSparkles.Log instead #
log: String.to_atom(System.get_env("DB_QUERIES_LOG_LEVEL", "false"))
end # prod only config end
# prod only config
# start prod and dev only config # start prod and dev only config
if config_env() != :test do if config_env() != :test do
config :bonfire, Bonfire.Common.Repo, config :bonfire, Bonfire.Common.Repo,
slow_query_ms: String.to_integer(System.get_env("SLOW_QUERY_MS", "100")) slow_query_ms: String.to_integer(System.get_env("SLOW_QUERY_MS", "100"))
end end
## bonfire_livebook ## bonfire_livebook

View file

@ -15,7 +15,6 @@ config :bonfire_search,
config :logger, level: :warn config :logger, level: :warn
# config :logger, level: :notice # config :logger, level: :notice
# Configure your database # Configure your database
db = "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}" db = "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}"
# #
@ -46,6 +45,7 @@ config :mix_test_interactive,
clear: true clear: true
config :paginator, ecto_repos: [Bonfire.Common.Repo] config :paginator, ecto_repos: [Bonfire.Common.Repo]
config :paginator, Paginator.Repo, config :paginator, Paginator.Repo,
pool: Ecto.Adapters.SQL.Sandbox, pool: Ecto.Adapters.SQL.Sandbox,
username: System.get_env("POSTGRES_USER", "postgres"), username: System.get_env("POSTGRES_USER", "postgres"),

Some files were not shown because too many files have changed in this diff Show more