From cdfaacd045744ddc31fb52b2be1e3e237c9bd7da Mon Sep 17 00:00:00 2001 From: Leonardo Diez Date: Thu, 15 Jul 2021 15:51:55 +0200 Subject: [PATCH 1/9] chore: remove webpacker from gemfile --- Gemfile | 2 -- Gemfile.lock | 1 - 2 files changed, 3 deletions(-) diff --git a/Gemfile b/Gemfile index b9da4d96..7e6dba50 100644 --- a/Gemfile +++ b/Gemfile @@ -13,8 +13,6 @@ gem "decidim-elections", DECIDIM_VERSION #gem "decidim-initiatives", DECIDIM_VERSION #gem "decidim-templates", DECIDIM_VERSION -gem "webpacker", "6.0.0.beta.7" - gem "wicked_pdf" gem "wkhtmltopdf-binary" diff --git a/Gemfile.lock b/Gemfile.lock index 3a6a6afe..01f3f1f0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -850,7 +850,6 @@ DEPENDENCIES spring spring-watcher-listen (~> 2.0.0) web-console - webpacker (= 6.0.0.beta.7) wicked_pdf wkhtmltopdf-binary From fa2ba9dba4f56bb44041591877e4658613d9bccc Mon Sep 17 00:00:00 2001 From: leio10 Date: Wed, 30 Jun 2021 08:57:00 +0000 Subject: [PATCH 2/9] Update decidim to active_storage_migration branch --- Gemfile | 2 +- Gemfile.lock | 12 +++---- ...01_create_active_storage_tables.decidim.rb | 30 ++++++++++++++++ ...umn_in_oauth_applications_table.decidim.rb | 8 +++++ ...cidim_content_block_attachments.decidim.rb | 11 ++++++ ...s_table.decidim_participatory_processes.rb | 8 +++++ db/schema.rb | 34 +++++++++++++++++-- 7 files changed, 95 insertions(+), 10 deletions(-) create mode 100644 db/migrate/20210705050501_create_active_storage_tables.decidim.rb create mode 100644 db/migrate/20210705050502_allow_null_organization_logo_column_in_oauth_applications_table.decidim.rb create mode 100644 db/migrate/20210705050503_create_decidim_content_block_attachments.decidim.rb create mode 100644 db/migrate/20210705050504_allow_null_file_column_in_decidim_attachments_table.decidim_participatory_processes.rb diff --git a/Gemfile b/Gemfile index 7e6dba50..f0bf491c 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source "https://rubygems.org" ruby RUBY_VERSION -DECIDIM_VERSION = { git: "https://github.com/decidim/decidim", branch: "develop" } +DECIDIM_VERSION = { git: "https://github.com/decidim/decidim", branch: "active_storage_migration" } gem "decidim", DECIDIM_VERSION #gem "decidim-conferences", DECIDIM_VERSION diff --git a/Gemfile.lock b/Gemfile.lock index 01f3f1f0..5f99dab9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GIT remote: https://github.com/decidim/decidim - revision: ab2b342a0643fd7b3a5cfe15d999295f8b46a091 - branch: develop + revision: a664bd92af9ee78085a4a87bf38b40a661925c2e + branch: active_storage_migration specs: decidim (0.25.0.dev) decidim-accountability (= 0.25.0.dev) @@ -102,7 +102,7 @@ GIT social-share-button (~> 1.2, >= 1.2.1) truncato (~> 0.7) valid_email2 (~> 2.1) - webpacker (~> 6.0.0.beta.7) + webpacker (~> 6.0.0.beta.7, < 6.0.0.c) wisper (~> 2.0) decidim-debates (0.25.0.dev) decidim-comments (= 0.25.0.dev) @@ -575,7 +575,7 @@ GEM activerecord (>= 4.2) request_store (~> 1.1) parallel (1.20.1) - parser (3.0.1.1) + parser (3.0.2.0) ast (~> 2.4.1) pg (1.1.4) pg_search (2.3.5) @@ -703,7 +703,7 @@ GEM rubocop-ast (>= 0.5.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.7.0) + rubocop-ast (1.8.0) parser (>= 3.0.1.1) rubocop-rails (2.9.1) activesupport (>= 4.2.0) @@ -720,7 +720,7 @@ GEM rubyzip (>= 1.3.0) ruby_dep (1.5.0) ruby_http_client (3.5.2) - rubyzip (2.3.1) + rubyzip (2.3.2) searchlight (4.1.0) selenium-webdriver (3.142.7) childprocess (>= 0.5, < 4.0) diff --git a/db/migrate/20210705050501_create_active_storage_tables.decidim.rb b/db/migrate/20210705050501_create_active_storage_tables.decidim.rb new file mode 100644 index 00000000..0afc5f4c --- /dev/null +++ b/db/migrate/20210705050501_create_active_storage_tables.decidim.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20210309190009) + +# This migration comes from active_storage (originally 20170806125915) +class CreateActiveStorageTables < ActiveRecord::Migration[5.2] + def change + create_table :active_storage_blobs do |t| + t.string :key, null: false + t.string :filename, null: false + t.string :content_type + t.text :metadata + t.bigint :byte_size, null: false + t.string :checksum, null: false + t.datetime :created_at, null: false + + t.index [:key], unique: true + end + + create_table :active_storage_attachments do |t| + t.string :name, null: false + t.references :record, null: false, polymorphic: true, index: false + t.references :blob, null: false + + t.datetime :created_at, null: false + + t.index [:record_type, :record_id, :name, :blob_id], name: "index_active_storage_attachments_uniqueness", unique: true + t.foreign_key :active_storage_blobs, column: :blob_id + end + end +end diff --git a/db/migrate/20210705050502_allow_null_organization_logo_column_in_oauth_applications_table.decidim.rb b/db/migrate/20210705050502_allow_null_organization_logo_column_in_oauth_applications_table.decidim.rb new file mode 100644 index 00000000..cd239430 --- /dev/null +++ b/db/migrate/20210705050502_allow_null_organization_logo_column_in_oauth_applications_table.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20210407190753) + +class AllowNullOrganizationLogoColumnInOAuthApplicationsTable < ActiveRecord::Migration[6.0] + def change + change_column_null :oauth_applications, :organization_logo, true + end +end diff --git a/db/migrate/20210705050503_create_decidim_content_block_attachments.decidim.rb b/db/migrate/20210705050503_create_decidim_content_block_attachments.decidim.rb new file mode 100644 index 00000000..cbcad613 --- /dev/null +++ b/db/migrate/20210705050503_create_decidim_content_block_attachments.decidim.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20210419165805) + +class CreateDecidimContentBlockAttachments < ActiveRecord::Migration[6.0] + def change + create_table :decidim_content_block_attachments do |t| + t.string :name + t.references :decidim_content_block, null: false, index: { name: "decidim_content_block_attachments_on_content_block" } + end + end +end diff --git a/db/migrate/20210705050504_allow_null_file_column_in_decidim_attachments_table.decidim_participatory_processes.rb b/db/migrate/20210705050504_allow_null_file_column_in_decidim_attachments_table.decidim_participatory_processes.rb new file mode 100644 index 00000000..ca6a8fb3 --- /dev/null +++ b/db/migrate/20210705050504_allow_null_file_column_in_decidim_attachments_table.decidim_participatory_processes.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_participatory_processes (originally 20210415163339) + +class AllowNullFileColumnInDecidimAttachmentsTable < ActiveRecord::Migration[6.0] + def change + change_column_null :decidim_attachments, :file, true + end +end diff --git a/db/schema.rb b/db/schema.rb index 48955136..5ec04115 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,13 +10,34 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_07_05_050450) do +ActiveRecord::Schema.define(version: 2021_07_05_050504) do # These are extensions that must be enabled in order to support this database enable_extension "ltree" enable_extension "pg_trgm" enable_extension "plpgsql" + create_table "active_storage_attachments", force: :cascade do |t| + t.string "name", null: false + t.string "record_type", null: false + t.bigint "record_id", null: false + t.bigint "blob_id", null: false + t.datetime "created_at", null: false + t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" + t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true + end + + create_table "active_storage_blobs", force: :cascade do |t| + t.string "key", null: false + t.string "filename", null: false + t.string "content_type" + t.text "metadata" + t.bigint "byte_size", null: false + t.string "checksum", null: false + t.datetime "created_at", null: false + t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true + end + create_table "decidim_accountability_results", id: :serial, force: :cascade do |t| t.jsonb "title" t.jsonb "description" @@ -237,7 +258,7 @@ create_table "decidim_attachments", id: :serial, force: :cascade do |t| t.jsonb "title", null: false t.jsonb "description" - t.string "file", null: false + t.string "file" t.string "content_type", null: false t.string "file_size", null: false t.integer "attached_to_id", null: false @@ -648,6 +669,12 @@ t.index ["decidim_user_group_id"], name: "index_decidim_consultations_votes_on_decidim_user_group_id" end + create_table "decidim_content_block_attachments", force: :cascade do |t| + t.string "name" + t.bigint "decidim_content_block_id", null: false + t.index ["decidim_content_block_id"], name: "decidim_content_block_attachments_on_content_block" + end + create_table "decidim_content_blocks", force: :cascade do |t| t.integer "decidim_organization_id", null: false t.string "manifest_name", null: false @@ -2084,7 +2111,7 @@ t.string "name", null: false t.string "organization_name", null: false t.string "organization_url", null: false - t.string "organization_logo", null: false + t.string "organization_logo" t.string "uid", null: false t.string "secret", null: false t.text "redirect_uri", null: false @@ -2110,6 +2137,7 @@ t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" end + add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" add_foreign_key "decidim_area_types", "decidim_organizations" add_foreign_key "decidim_areas", "decidim_area_types", column: "area_type_id" add_foreign_key "decidim_areas", "decidim_organizations" From a9211a2865723ec9178bc41d184d15c9f5bda6ab Mon Sep 17 00:00:00 2001 From: Leonardo Diez Date: Wed, 30 Jun 2021 11:28:58 +0200 Subject: [PATCH 3/9] fix: apply migration fix from decidim --- ...13_move_organization_fields_to_hero_content_block.decidim.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20201009122313_move_organization_fields_to_hero_content_block.decidim.rb b/db/migrate/20201009122313_move_organization_fields_to_hero_content_block.decidim.rb index 095150f7..fad69403 100644 --- a/db/migrate/20201009122313_move_organization_fields_to_hero_content_block.decidim.rb +++ b/db/migrate/20201009122313_move_organization_fields_to_hero_content_block.decidim.rb @@ -5,7 +5,7 @@ class MoveOrganizationFieldsToHeroContentBlock < ActiveRecord::Migration[5.2] class Organization < ApplicationRecord self.table_name = :decidim_organizations - mount_uploader :homepage_image, ::Decidim::HomepageImageUploader + mount_uploader :homepage_image, CarrierWave::Uploader::Base end def change From 31e00231741da95cd423ba8a8fe4e1c7ac02e765 Mon Sep 17 00:00:00 2001 From: Leonardo Diez Date: Wed, 30 Jun 2021 11:58:51 +0200 Subject: [PATCH 4/9] fix: config active_storage for the app --- Gemfile | 1 + Gemfile.lock | 18 ++++++++++++++++ config/environments/development.rb | 3 +++ config/environments/production.rb | 3 +++ config/environments/test.rb | 3 +++ config/initializers/carrierwave.rb | 33 ------------------------------ config/secrets.yml | 5 ----- config/storage.yml | 14 +++++++++++++ 8 files changed, 42 insertions(+), 38 deletions(-) delete mode 100644 config/initializers/carrierwave.rb create mode 100644 config/storage.yml diff --git a/Gemfile b/Gemfile index f0bf491c..fbf46db9 100644 --- a/Gemfile +++ b/Gemfile @@ -34,6 +34,7 @@ group :development do end group :production do + gem "aws-sdk-s3", require: false gem "fog-aws" gem "lograge" gem "sendgrid-ruby" diff --git a/Gemfile.lock b/Gemfile.lock index 5f99dab9..a48fefae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -250,6 +250,22 @@ GEM public_suffix (>= 2.0.2, < 5.0) anchored (1.1.0) ast (2.4.2) + aws-eventstream (1.1.1) + aws-partitions (1.472.0) + aws-sdk-core (3.115.0) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.239.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1.0) + aws-sdk-kms (1.44.0) + aws-sdk-core (~> 3, >= 3.112.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.96.1) + aws-sdk-core (~> 3, >= 3.112.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.1) + aws-sigv4 (1.2.3) + aws-eventstream (~> 1, >= 1.0.2) axe-core-api (4.2.1) capybara dumb_delegator @@ -471,6 +487,7 @@ GEM invisible_captcha (0.13.0) rails (>= 3.2.0) ipaddress (0.8.3) + jmespath (1.4.0) json (2.5.1) jwt (2.2.3) kaminari (1.2.1) @@ -834,6 +851,7 @@ PLATFORMS ruby DEPENDENCIES + aws-sdk-s3 byebug decidim! decidim-dev! diff --git a/config/environments/development.rb b/config/environments/development.rb index 033cf750..aae60ccd 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -46,4 +46,7 @@ # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. config.file_watcher = ActiveSupport::EventedFileUpdateChecker + + # Store files locally. + config.active_storage.service = :local end diff --git a/config/environments/production.rb b/config/environments/production.rb index 1ee44501..e217e339 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -119,4 +119,7 @@ referer: event.payload[:referer], } end + + # Store files on Amazon S3. + config.active_storage.service = :amazon end diff --git a/config/environments/test.rb b/config/environments/test.rb index 8e5cbde5..2102217f 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -39,4 +39,7 @@ # Raises error for missing translations # config.action_view.raise_on_missing_translations = true + + # Store files locally. + config.active_storage.service = :test end diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb deleted file mode 100644 index 75916c05..00000000 --- a/config/initializers/carrierwave.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -# Default CarrierWave setup. -# -CarrierWave.configure do |config| - config.permissions = 0o666 - config.directory_permissions = 0o777 - config.storage = :file - config.enable_processing = !Rails.env.test? -end - -# Setup CarrierWave to use Amazon S3. Add `gem "fog-aws" to your Gemfile. -# -if Rails.application.secrets.aws_access_key_id.present? - require "carrierwave/storage/fog" - CarrierWave.configure do |config| - config.storage = :fog - config.fog_provider = 'fog/aws' # required - config.fog_credentials = { - provider: 'AWS', # required - aws_access_key_id: Rails.application.secrets.aws_access_key_id, # required - aws_secret_access_key: Rails.application.secrets.aws_secret_access_key, # required - region: Rails.application.secrets.aws_region, - host: Rails.application.secrets.aws_host, - } - config.fog_directory = Rails.application.secrets.aws_bucket - config.fog_public = true - config.fog_attributes = { - 'Cache-Control' => "max-age=#{365.day.to_i}", - 'X-Content-Type-Options' => "nosniff" - } - end -end diff --git a/config/secrets.yml b/config/secrets.yml index 3e1724af..353e2a38 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -12,11 +12,6 @@ default: &default sentry_enabled: false - aws_access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %> - aws_secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %> - aws_region: <%= ENV["AWS_REGION"] %> - aws_bucket: <%= ENV["AWS_BUCKET_NAME"] %> - aws_host: <%= ENV["AWS_HOST"] %> omniauth: facebook: # It must be a boolean. Remember ENV variables doesn't support booleans. diff --git a/config/storage.yml b/config/storage.yml new file mode 100644 index 00000000..e353d5c8 --- /dev/null +++ b/config/storage.yml @@ -0,0 +1,14 @@ +local: + service: Disk + root: <%= Rails.root.join("storage") %> + +test: + service: Disk + root: <%= Rails.root.join("tmp/storage") %> + +amazon: + service: S3 + access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %> + secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %> + region: <%= ENV["AWS_REGION"] %> + bucket: <%= ENV["AWS_BUCKET_NAME"] %> \ No newline at end of file From b76ef336253969b19d82dd79c83ed7b51181a978 Mon Sep 17 00:00:00 2001 From: Leonardo Diez Date: Wed, 7 Jul 2021 18:18:08 +0200 Subject: [PATCH 5/9] fix: add folder to active_storage files --- config/initializers/active_storage.rb | 9 +++++++++ config/initializers/decidim.rb | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 config/initializers/active_storage.rb diff --git a/config/initializers/active_storage.rb b/config/initializers/active_storage.rb new file mode 100644 index 00000000..909cf5e3 --- /dev/null +++ b/config/initializers/active_storage.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +if ENV["HEROKU_APP_NAME"].present? + ActiveSupport.on_load(:active_storage_blob) do + def key + self[:key] ||= "#{Decidim.base_uploads_path}#{self.class.generate_unique_secure_token}" + end + end +end \ No newline at end of file diff --git a/config/initializers/decidim.rb b/config/initializers/decidim.rb index c6f1957e..f0358508 100644 --- a/config/initializers/decidim.rb +++ b/config/initializers/decidim.rb @@ -134,4 +134,3 @@ Rails.application.config.i18n.available_locales = Decidim.available_locales Rails.application.config.i18n.default_locale = Decidim.default_locale - From bafdd72dfe5dd64552bef4b5215fb024893c86ed Mon Sep 17 00:00:00 2001 From: Leonardo Diez Date: Thu, 15 Jul 2021 19:39:09 +0200 Subject: [PATCH 6/9] chore: update to AS migrations service branch --- Gemfile | 2 +- Gemfile.lock | 4 +- package-lock.json | 369 +++++++++++++++++++++++++++++--- packages/core/package.json | 3 +- packages/webpacker/package.json | 2 +- 5 files changed, 348 insertions(+), 32 deletions(-) diff --git a/Gemfile b/Gemfile index fbf46db9..ff72ccb6 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source "https://rubygems.org" ruby RUBY_VERSION -DECIDIM_VERSION = { git: "https://github.com/decidim/decidim", branch: "active_storage_migration" } +DECIDIM_VERSION = { git: "https://github.com/decidim/decidim", branch: "active_storage_migrations_service" } gem "decidim", DECIDIM_VERSION #gem "decidim-conferences", DECIDIM_VERSION diff --git a/Gemfile.lock b/Gemfile.lock index a48fefae..76466cfe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GIT remote: https://github.com/decidim/decidim - revision: a664bd92af9ee78085a4a87bf38b40a661925c2e - branch: active_storage_migration + revision: 9405466f2b5c9b6a53c9255a5c3f89e381ba4191 + branch: active_storage_migrations_service specs: decidim (0.25.0.dev) decidim-accountability (= 0.25.0.dev) diff --git a/package-lock.json b/package-lock.json index 3c6490bb..96c81b86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1767,6 +1767,51 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@fortawesome/fontawesome-common-types": { + "version": "0.2.35", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.35.tgz", + "integrity": "sha512-IHUfxSEDS9dDGqYwIW7wTN6tn/O8E0n5PcAHz9cAaBoZw6UpG20IG/YM3NNLaGPwPqgjBAFjIURzqoQs3rrtuw==", + "hasInstallScript": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@fortawesome/fontawesome-svg-core": { + "version": "1.2.35", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.35.tgz", + "integrity": "sha512-uLEXifXIL7hnh2sNZQrIJWNol7cTVIzwI+4qcBIq9QWaZqUblm0IDrtSqbNg+3SQf8SMGHkiSigD++rHmCHjBg==", + "hasInstallScript": true, + "dependencies": { + "@fortawesome/fontawesome-common-types": "^0.2.35" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@fortawesome/free-regular-svg-icons": { + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.3.tgz", + "integrity": "sha512-q4/p8Xehy9qiVTdDWHL4Z+o5PCLRChePGZRTXkl+/Z7erDVL8VcZUuqzJjs6gUz6czss4VIPBRdCz6wP37/zMQ==", + "hasInstallScript": true, + "dependencies": { + "@fortawesome/fontawesome-common-types": "^0.2.35" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@fortawesome/free-solid-svg-icons": { + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.3.tgz", + "integrity": "sha512-XPeeu1IlGYqz4VWGRAT5ukNMd4VHUEEJ7ysZ7pSSgaEtNvSo+FLurybGJVmiqkQdK50OkSja2bfZXOeyMGRD8Q==", + "hasInstallScript": true, + "dependencies": { + "@fortawesome/fontawesome-common-types": "^0.2.35" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@graphiql/toolkit": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@graphiql/toolkit/-/toolkit-0.2.2.tgz", @@ -1791,6 +1836,28 @@ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" } }, + "node_modules/@joeattardi/emoji-button": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@joeattardi/emoji-button/-/emoji-button-4.6.0.tgz", + "integrity": "sha512-KwOE1j+YxX47JmT0pXNCa+9Ai4Wf2fmABtvuxy6JBJ5QV0HdoThRKjL6CxAreVwwLbNQ/PDoR36xpc5QJjLXPA==", + "dependencies": { + "@fortawesome/fontawesome-svg-core": "^1.2.28", + "@fortawesome/free-regular-svg-icons": "^5.13.0", + "@fortawesome/free-solid-svg-icons": "^5.13.0", + "@popperjs/core": "^2.4.0", + "@types/twemoji": "^12.1.1", + "focus-trap": "^5.1.0", + "fuzzysort": "^1.1.4", + "tiny-emitter": "^2.1.0", + "tslib": "^2.0.0", + "twemoji": "^13.0.0" + } + }, + "node_modules/@joeattardi/emoji-button/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, "node_modules/@n1ru4l/push-pull-async-iterable-iterator": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@n1ru4l/push-pull-async-iterable-iterator/-/push-pull-async-iterable-iterator-2.1.4.tgz", @@ -1874,6 +1941,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@popperjs/core": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.2.tgz", + "integrity": "sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@rails/ujs": { "version": "6.1.3", "resolved": "https://registry.npmjs.org/@rails/ujs/-/ujs-6.1.3.tgz", @@ -2019,6 +2095,11 @@ "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" }, + "node_modules/@types/twemoji": { + "version": "12.1.2", + "resolved": "https://registry.npmjs.org/@types/twemoji/-/twemoji-12.1.2.tgz", + "integrity": "sha512-3eMyKenMi0R1CeKzBYtk/Z2JIHsTMQrIrTah0q54o45pHTpWVNofU2oHx0jS8tqsDRhis2TbB6238WP9oh2l2w==" + }, "node_modules/@types/unist": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", @@ -6758,6 +6839,15 @@ "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==" }, + "node_modules/focus-trap": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-5.1.0.tgz", + "integrity": "sha512-CkB/nrO55069QAUjWFBpX6oc+9V90Qhgpe6fBWApzruMq5gnlh90Oo7iSSDK7pKiV5ugG6OY2AXM5mxcmL3lwQ==", + "dependencies": { + "tabbable": "^4.0.0", + "xtend": "^4.0.1" + } + }, "node_modules/follow-redirects": { "version": "1.14.1", "funding": [ @@ -6832,6 +6922,27 @@ "node": ">= 0.6" } }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs-extra/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -6881,6 +6992,11 @@ "node": ">= 0.6.0" } }, + "node_modules/fuzzysort": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-1.1.4.tgz", + "integrity": "sha512-JzK/lHjVZ6joAg3OnCjylwYXYVjRiwTY6Yb25LvfpJHK8bjisfnZJ5bY8aVWwTwCXgxPNgLAtmHL+Hs5q1ddLQ==" + }, "node_modules/gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -8610,6 +8726,17 @@ "node": ">=6" } }, + "node_modules/jsonfile": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz", + "integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==", + "dependencies": { + "universalify": "^0.1.2" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -9651,6 +9778,7 @@ "version": "3.1.23", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", + "peer": true, "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -10647,6 +10775,7 @@ "version": "8.3.4", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.4.tgz", "integrity": "sha512-/tZY0PXExXXnNhKv3TOvZAOUYRyuqcCbBm2c17YMDK0PlVII3K7/LKdt3ScHL+hhouddjUWi+1sKDf9xXW+8YA==", + "peer": true, "dependencies": { "colorette": "^1.2.2", "nanoid": "^3.1.23", @@ -14506,21 +14635,6 @@ "node": ">=0.10.0" } }, - "node_modules/postcss-scss": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-3.0.5.tgz", - "integrity": "sha512-3e0qYk87eczfzg5P73ZVuuxEGCBfatRhPze6KrSaIbEKVtmnFI1RYp1Fv+AyZi+w8kcNRSPeNX6ap4b65zEkiA==", - "dependencies": { - "postcss": "^8.2.7" - }, - "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, "node_modules/postcss-selector-matches": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-selector-matches/-/postcss-selector-matches-4.0.0.tgz", @@ -16389,6 +16503,7 @@ "version": "0.6.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -17821,6 +17936,11 @@ "node": ">=0.10" } }, + "node_modules/tabbable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-4.0.0.tgz", + "integrity": "sha512-H1XoH1URcBOa/rZZWxLxHCtOdVUEev+9vo5YdYhC9tCY4wnybX+VQrCYuy9ubkg69fCBxCONJOSLGfw0DWMffQ==" + }, "node_modules/table": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", @@ -18027,6 +18147,11 @@ "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=" }, + "node_modules/tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" + }, "node_modules/to-fast-properties": { "version": "2.0.0", "license": "MIT", @@ -18244,6 +18369,22 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "node_modules/twemoji": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/twemoji/-/twemoji-13.1.0.tgz", + "integrity": "sha512-e3fZRl2S9UQQdBFLYXtTBT6o4vidJMnpWUAhJA+yLGR+kaUTZAt3PixC0cGvvxWSuq2MSz/o0rJraOXrWw/4Ew==", + "dependencies": { + "fs-extra": "^8.0.1", + "jsonfile": "^5.0.0", + "twemoji-parser": "13.1.0", + "universalify": "^0.1.2" + } + }, + "node_modules/twemoji-parser": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-13.1.0.tgz", + "integrity": "sha512-AQOzLJpYlpWMy8n+0ATyKKZzWlZBJN+G0C+5lhX7Ftc2PeEVdUU/7ns2Pn2vVje26AIZ/OHwFoUbdv6YYD/wGg==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -18459,6 +18600,14 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/unpipe": { "version": "1.0.0", "license": "MIT", @@ -19279,6 +19428,14 @@ "async-limiter": "~1.0.0" } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "4.0.3", "license": "ISC" @@ -19373,6 +19530,7 @@ "version": "0.25.0-dev", "license": "AGPL-3.0", "dependencies": { + "@joeattardi/emoji-button": "^4.6.0", "@zeitiger/appendaround": "^1.0.0", "axios": "^0.21.1", "bootstrap-tagsinput": "^0.7.1", @@ -19507,7 +19665,7 @@ "postcss-import": "^12.0.1", "postcss-loader": "^5.2.0", "postcss-preset-env": "^6.7.0", - "postcss-scss": "^3.0.5", + "postcss-scss": "^2.1.1", "sass": "^1.32.8", "sass-loader": "^11.0.1", "source-map-loader": "^0.2.4", @@ -19722,6 +19880,17 @@ "postcss": "^7.0.6" } }, + "packages/webpacker/node_modules/postcss-scss": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.1.1.tgz", + "integrity": "sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA==", + "dependencies": { + "postcss": "^7.0.6" + }, + "engines": { + "node": ">=6.0.0" + } + }, "packages/webpacker/node_modules/schema-utils": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", @@ -20748,6 +20917,7 @@ "@decidim/core": { "version": "file:packages/core", "requires": { + "@joeattardi/emoji-button": "^4.6.0", "@zeitiger/appendaround": "^1.0.0", "axios": "^0.21.1", "bootstrap-tagsinput": "^0.7.1", @@ -20837,7 +21007,7 @@ "postcss-import": "^12.0.1", "postcss-loader": "^5.2.0", "postcss-preset-env": "^6.7.0", - "postcss-scss": "^3.0.5", + "postcss-scss": "^2.1.1", "sass": "^1.32.8", "sass-loader": "^11.0.1", "source-map-loader": "^0.2.4", @@ -20998,6 +21168,14 @@ "postcss": "^7.0.6" } }, + "postcss-scss": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.1.1.tgz", + "integrity": "sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA==", + "requires": { + "postcss": "^7.0.6" + } + }, "schema-utils": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", @@ -21075,6 +21253,35 @@ } } }, + "@fortawesome/fontawesome-common-types": { + "version": "0.2.35", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.35.tgz", + "integrity": "sha512-IHUfxSEDS9dDGqYwIW7wTN6tn/O8E0n5PcAHz9cAaBoZw6UpG20IG/YM3NNLaGPwPqgjBAFjIURzqoQs3rrtuw==" + }, + "@fortawesome/fontawesome-svg-core": { + "version": "1.2.35", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.35.tgz", + "integrity": "sha512-uLEXifXIL7hnh2sNZQrIJWNol7cTVIzwI+4qcBIq9QWaZqUblm0IDrtSqbNg+3SQf8SMGHkiSigD++rHmCHjBg==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.35" + } + }, + "@fortawesome/free-regular-svg-icons": { + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.3.tgz", + "integrity": "sha512-q4/p8Xehy9qiVTdDWHL4Z+o5PCLRChePGZRTXkl+/Z7erDVL8VcZUuqzJjs6gUz6czss4VIPBRdCz6wP37/zMQ==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.35" + } + }, + "@fortawesome/free-solid-svg-icons": { + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.3.tgz", + "integrity": "sha512-XPeeu1IlGYqz4VWGRAT5ukNMd4VHUEEJ7ysZ7pSSgaEtNvSo+FLurybGJVmiqkQdK50OkSja2bfZXOeyMGRD8Q==", + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.35" + } + }, "@graphiql/toolkit": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@graphiql/toolkit/-/toolkit-0.2.2.tgz", @@ -21092,6 +21299,30 @@ "integrity": "sha512-wYn6r8zVZyQJ6rQaALBEln5B1pzxb9shV5Ef97kTvn6yVGrqyXVnDqnU24MXnFubR+rZjBY9NWuxX3FB2sTsjg==", "requires": {} }, + "@joeattardi/emoji-button": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@joeattardi/emoji-button/-/emoji-button-4.6.0.tgz", + "integrity": "sha512-KwOE1j+YxX47JmT0pXNCa+9Ai4Wf2fmABtvuxy6JBJ5QV0HdoThRKjL6CxAreVwwLbNQ/PDoR36xpc5QJjLXPA==", + "requires": { + "@fortawesome/fontawesome-svg-core": "^1.2.28", + "@fortawesome/free-regular-svg-icons": "^5.13.0", + "@fortawesome/free-solid-svg-icons": "^5.13.0", + "@popperjs/core": "^2.4.0", + "@types/twemoji": "^12.1.1", + "focus-trap": "^5.1.0", + "fuzzysort": "^1.1.4", + "tiny-emitter": "^2.1.0", + "tslib": "^2.0.0", + "twemoji": "^13.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, "@n1ru4l/push-pull-async-iterable-iterator": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@n1ru4l/push-pull-async-iterable-iterator/-/push-pull-async-iterable-iterator-2.1.4.tgz", @@ -21150,6 +21381,11 @@ } } }, + "@popperjs/core": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.2.tgz", + "integrity": "sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q==" + }, "@rails/ujs": { "version": "6.1.3", "resolved": "https://registry.npmjs.org/@rails/ujs/-/ujs-6.1.3.tgz", @@ -21274,6 +21510,11 @@ "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" }, + "@types/twemoji": { + "version": "12.1.2", + "resolved": "https://registry.npmjs.org/@types/twemoji/-/twemoji-12.1.2.tgz", + "integrity": "sha512-3eMyKenMi0R1CeKzBYtk/Z2JIHsTMQrIrTah0q54o45pHTpWVNofU2oHx0jS8tqsDRhis2TbB6238WP9oh2l2w==" + }, "@types/unist": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", @@ -24790,6 +25031,15 @@ "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==" }, + "focus-trap": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-5.1.0.tgz", + "integrity": "sha512-CkB/nrO55069QAUjWFBpX6oc+9V90Qhgpe6fBWApzruMq5gnlh90Oo7iSSDK7pKiV5ugG6OY2AXM5mxcmL3lwQ==", + "requires": { + "tabbable": "^4.0.0", + "xtend": "^4.0.1" + } + }, "follow-redirects": { "version": "1.14.1" }, @@ -24824,6 +25074,26 @@ "fresh": { "version": "0.5.2" }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "dependencies": { + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + } + } + }, "fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -24857,6 +25127,11 @@ "resolved": "https://registry.npmjs.org/fuzzy/-/fuzzy-0.1.3.tgz", "integrity": "sha1-THbsL/CsGjap3M+aAN+GIweNTtg=" }, + "fuzzysort": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-1.1.4.tgz", + "integrity": "sha512-JzK/lHjVZ6joAg3OnCjylwYXYVjRiwTY6Yb25LvfpJHK8bjisfnZJ5bY8aVWwTwCXgxPNgLAtmHL+Hs5q1ddLQ==" + }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -26055,6 +26330,15 @@ "minimist": "^1.2.5" } }, + "jsonfile": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz", + "integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^0.1.2" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -26812,7 +27096,8 @@ "nanoid": { "version": "3.1.23", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", - "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==" + "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", + "peer": true }, "nanomatch": { "version": "1.2.13", @@ -27488,6 +27773,7 @@ "version": "8.3.4", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.4.tgz", "integrity": "sha512-/tZY0PXExXXnNhKv3TOvZAOUYRyuqcCbBm2c17YMDK0PlVII3K7/LKdt3ScHL+hhouddjUWi+1sKDf9xXW+8YA==", + "peer": true, "requires": { "colorette": "^1.2.2", "nanoid": "^3.1.23", @@ -30451,14 +30737,6 @@ } } }, - "postcss-scss": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-3.0.5.tgz", - "integrity": "sha512-3e0qYk87eczfzg5P73ZVuuxEGCBfatRhPze6KrSaIbEKVtmnFI1RYp1Fv+AyZi+w8kcNRSPeNX6ap4b65zEkiA==", - "requires": { - "postcss": "^8.2.7" - } - }, "postcss-selector-matches": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-selector-matches/-/postcss-selector-matches-4.0.0.tgz", @@ -31822,7 +32100,8 @@ "source-map-js": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", - "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==" + "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", + "peer": true }, "source-map-loader": { "version": "0.2.4", @@ -32906,6 +33185,11 @@ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==" }, + "tabbable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-4.0.0.tgz", + "integrity": "sha512-H1XoH1URcBOa/rZZWxLxHCtOdVUEev+9vo5YdYhC9tCY4wnybX+VQrCYuy9ubkg69fCBxCONJOSLGfw0DWMffQ==" + }, "table": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", @@ -33053,6 +33337,11 @@ "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=" }, + "tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" + }, "to-fast-properties": { "version": "2.0.0" }, @@ -33214,6 +33503,22 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "twemoji": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/twemoji/-/twemoji-13.1.0.tgz", + "integrity": "sha512-e3fZRl2S9UQQdBFLYXtTBT6o4vidJMnpWUAhJA+yLGR+kaUTZAt3PixC0cGvvxWSuq2MSz/o0rJraOXrWw/4Ew==", + "requires": { + "fs-extra": "^8.0.1", + "jsonfile": "^5.0.0", + "twemoji-parser": "13.1.0", + "universalify": "^0.1.2" + } + }, + "twemoji-parser": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-13.1.0.tgz", + "integrity": "sha512-AQOzLJpYlpWMy8n+0ATyKKZzWlZBJN+G0C+5lhX7Ftc2PeEVdUU/7ns2Pn2vVje26AIZ/OHwFoUbdv6YYD/wGg==" + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -33368,6 +33673,11 @@ "@types/unist": "^2.0.2" } }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, "unpipe": { "version": "1.0.0" }, @@ -33912,6 +34222,11 @@ "async-limiter": "~1.0.0" } }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, "y18n": { "version": "4.0.3" }, diff --git a/packages/core/package.json b/packages/core/package.json index 52b9ef59..33b81242 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -14,6 +14,7 @@ "npm": "^7.7.2" }, "dependencies": { + "@joeattardi/emoji-button": "^4.6.0", "@zeitiger/appendaround": "^1.0.0", "axios": "^0.21.1", "bootstrap-tagsinput": "^0.7.1", @@ -49,4 +50,4 @@ "unfetch": "^3.0.0", "uuid": "^3.2.1" } -} \ No newline at end of file +} diff --git a/packages/webpacker/package.json b/packages/webpacker/package.json index 7e46ecd4..93f0dde6 100644 --- a/packages/webpacker/package.json +++ b/packages/webpacker/package.json @@ -41,7 +41,7 @@ "postcss-import": "^12.0.1", "postcss-loader": "^5.2.0", "postcss-preset-env": "^6.7.0", - "postcss-scss": "^3.0.5", + "postcss-scss": "^2.1.1", "sass": "^1.32.8", "sass-loader": "^11.0.1", "source-map-loader": "^0.2.4", From 14ab34497bc3e9eae486a9d8cb2daafee2e6b147 Mon Sep 17 00:00:00 2001 From: Leonardo Diez Date: Tue, 20 Jul 2021 16:29:52 +0200 Subject: [PATCH 7/9] chore: update decidim --- Gemfile.lock | 4 ++-- packages/webpacker/index.js | 2 +- packages/webpacker/src/override-config.js | 15 ++++++++------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 76466cfe..5ee248e3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/decidim/decidim - revision: 9405466f2b5c9b6a53c9255a5c3f89e381ba4191 + revision: 088c28c203a811b7975f097292394ab87e398278 branch: active_storage_migrations_service specs: decidim (0.25.0.dev) @@ -435,7 +435,7 @@ GEM fog-json (1.2.0) fog-core multi_json (~> 1.10) - fog-local (0.6.0) + fog-local (0.7.0) fog-core (>= 1.27, < 3.0) fog-xml (0.1.3) fog-core diff --git a/packages/webpacker/index.js b/packages/webpacker/index.js index eef2817a..4b8d8bfd 100644 --- a/packages/webpacker/index.js +++ b/packages/webpacker/index.js @@ -1,6 +1,6 @@ const webpacker = require("@rails/webpacker"); const overrideConfig = require("./src/override-config"); -module.exports = Object.assign(webpacker, { +module.exports = Object.assign(webpacker, { // eslint-disable-line webpackConfig: overrideConfig(webpacker.webpackConfig) }); diff --git a/packages/webpacker/src/override-config.js b/packages/webpacker/src/override-config.js index 5b98c47a..493ec88f 100644 --- a/packages/webpacker/src/override-config.js +++ b/packages/webpacker/src/override-config.js @@ -8,7 +8,7 @@ const overrideSassRule = (modifyConfig) => { return modifyConfig; } - const sassLoader = sassRule.use.find(use => use.loader.match(/sass-loader/)); + const sassLoader = sassRule.use.find((use) => use.loader.match(/sass-loader/)); if (!sassLoader) { return modifyConfig; } @@ -21,21 +21,22 @@ const overrideSassRule = (modifyConfig) => { // Add the extra importer to the sass-loader to load the import statements for // Decidim modules. sassLoader.options.sassOptions.importer = [ - (url, _prev) => { - const matches = url.match(/^\!decidim-style-imports\[([^\]]+)\]$/); + (url) => { + const matches = url.match(/^!decidim-style-([^[]+)\[([^\]]+)\]$/); if (!matches) { return null; } - const group = matches[1]; - if (!imports[group]) { + const type = matches[1]; + const group = matches[2]; + if (!imports[type] || !imports[type][group]) { // If the group is not defined, return an empty configuration because // otherwise the importer would continue finding the asset through // paths which obviously fails. return { contents: "" }; } - const statements = imports[group].map((style) => `@import "${style}";`); + const statements = imports[type][group].map((style) => `@import "${style}";`); return { contents: statements.join("\n") }; } @@ -44,6 +45,6 @@ const overrideSassRule = (modifyConfig) => { return modifyConfig; } -module.exports = (originalConfig) => { +module.exports = (originalConfig) => { // eslint-disable-line return overrideSassRule(originalConfig); }; From 43ff634f9319eefe2005244d691124fc21ba44b1 Mon Sep 17 00:00:00 2001 From: Leonardo Diez Date: Tue, 20 Jul 2021 18:04:15 +0200 Subject: [PATCH 8/9] fix: recover carrierwave settings --- config/initializers/carrierwave.rb | 33 ++++++++++++++++++++++++++++++ config/secrets.yml | 5 +++++ 2 files changed, 38 insertions(+) create mode 100644 config/initializers/carrierwave.rb diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb new file mode 100644 index 00000000..75916c05 --- /dev/null +++ b/config/initializers/carrierwave.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +# Default CarrierWave setup. +# +CarrierWave.configure do |config| + config.permissions = 0o666 + config.directory_permissions = 0o777 + config.storage = :file + config.enable_processing = !Rails.env.test? +end + +# Setup CarrierWave to use Amazon S3. Add `gem "fog-aws" to your Gemfile. +# +if Rails.application.secrets.aws_access_key_id.present? + require "carrierwave/storage/fog" + CarrierWave.configure do |config| + config.storage = :fog + config.fog_provider = 'fog/aws' # required + config.fog_credentials = { + provider: 'AWS', # required + aws_access_key_id: Rails.application.secrets.aws_access_key_id, # required + aws_secret_access_key: Rails.application.secrets.aws_secret_access_key, # required + region: Rails.application.secrets.aws_region, + host: Rails.application.secrets.aws_host, + } + config.fog_directory = Rails.application.secrets.aws_bucket + config.fog_public = true + config.fog_attributes = { + 'Cache-Control' => "max-age=#{365.day.to_i}", + 'X-Content-Type-Options' => "nosniff" + } + end +end diff --git a/config/secrets.yml b/config/secrets.yml index 353e2a38..3e1724af 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -12,6 +12,11 @@ default: &default sentry_enabled: false + aws_access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %> + aws_secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %> + aws_region: <%= ENV["AWS_REGION"] %> + aws_bucket: <%= ENV["AWS_BUCKET_NAME"] %> + aws_host: <%= ENV["AWS_HOST"] %> omniauth: facebook: # It must be a boolean. Remember ENV variables doesn't support booleans. From 3f66a22ee49e349582ecded173d38bb4e9b010f7 Mon Sep 17 00:00:00 2001 From: Leonardo Diez Date: Wed, 21 Jul 2021 16:25:35 +0200 Subject: [PATCH 9/9] chore: bump AS migration branch --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5ee248e3..874f30fa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/decidim/decidim - revision: 088c28c203a811b7975f097292394ab87e398278 + revision: c0c237dd0c41bb818fe3cd1f5314cced8f1a493e branch: active_storage_migrations_service specs: decidim (0.25.0.dev)