DEV: Remove ember-cli flags from the backend (#17147)

…and other auxiliary code

* Restore `QUNIT_EMBER_CLI` flag warning
* Add `ALLOW_EMBER_CLI_PROXY_BYPASS`
This commit is contained in:
Jarek Radosz
2022-06-20 16:33:05 +02:00
committed by GitHub
parent 6f27c50287
commit 2c1fc28d00
19 changed files with 67 additions and 197 deletions

View File

@ -10,19 +10,6 @@ module EmberCli
vendor.js
)
ALIASES ||= {
"application" => "discourse",
"discourse/tests/test-support-rails" => "test-support",
"discourse/tests/test-helpers-rails" => "test-helpers"
}
def self.enabled?
if !Rails.env.production? && ENV["EMBER_CLI_PROD_ASSETS"] == "0"
STDERR.puts "The 'legacy' ember environment is discontinued. Running with ember-cli assets. Remove the EMBER_CLI_PROD_ASSETS=0 flag."
end
true
end
def self.script_chunks
return @@chunk_infos if defined? @@chunk_infos
@ -40,17 +27,7 @@ module EmberCli
{}
end
# Some assets have changed name following the switch
# to ember-cli. When the switch is complete, we can
# drop this method and update all the references
# to use the new names
def self.transform_name(name)
return name if !enabled?
ALIASES[name] || name
end
def self.is_ember_cli_asset?(name)
return false if !enabled?
ASSETS.include?(name) || name.start_with?("chunk.")
end
end