DEV: Rename `deprecated` to the more appropriate app-boot

DEV: Rename deprecated to the more appropriate app-boot

diff --git a/app/assets/javascripts/app-boot.js b/app/assets/javascripts/app-boot.js
new file mode 100644
index 0000000..d744e7f
--- /dev/null
+++ b/app/assets/javascripts/app-boot.js
@@ -0,0 +1,11 @@
+// discourse-skip-module
+
+(function() {
+  if (window.unsupportedBrowser) {
+    throw "Unsupported browser detected";
+  }
+  let Discourse = requirejs("discourse/app").default;
+
+  // ensure Discourse is added as a global
+  window.Discourse = Discourse;
+})();
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index 489768d..d7f9c0d 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -2,7 +2,7 @@
 //= require ./polyfills
 //= require_tree ./select-kit
 //= require ./discourse/app/app
-//= require ./deprecated
+//= require ./app-boot
 
 // Stuff we need to load first
 //= require ./discourse/app/lib/to-markdown
@@ -97,4 +97,5 @@
 //= require_tree ./discourse/app/pre-initializers
 //= require_tree ./discourse/app/initializers
 //= require_tree ./discourse/app/services
+
 //= require_tree ./discourse/app/widgets
diff --git a/app/assets/javascripts/deprecated.js b/app/assets/javascripts/deprecated.js
deleted file mode 100644
index 4ac91b8..0000000
--- a/app/assets/javascripts/deprecated.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// ensure Discourse is added as a global
-(function() {
-  window.Discourse = requirejs("discourse/app").default;
-})();
diff --git a/app/assets/javascripts/discourse/app/app.js b/app/assets/javascripts/discourse/app/app.js
index 9de7c40..8080da1 100644
--- a/app/assets/javascripts/discourse/app/app.js
+++ b/app/assets/javascripts/discourse/app/app.js
@@ -1,14 +1,9 @@
 /*global Mousetrap:true*/
 import Application from "@ember/application";
-import EmberObject, { computed } from "@ember/object";
+import { computed } from "@ember/object";
 import { buildResolver } from "discourse-common/resolver";
 import discourseComputed, { observes } from "discourse-common/utils/decorators";
 import FocusEvent from "discourse-common/mixins/focus-event";
-import deprecated from "discourse-common/lib/deprecated";
-
-if (window.unsupportedBrowser) {
-  throw "Unsupported browser detected";
-}
 
 const _pluginCallbacks = [];
 
@@ -204,14 +199,4 @@ const Discourse = Application.extend(FocusEvent, {
   })
 }).create();
 
-Object.defineProperty(Discourse, "Model", {
-  get() {
-    deprecated("Use an `@ember/object` instead of Discourse.Model", {
-      since: "2.4.0",
-      dropFrom: "2.5.0"
-    });
-    return EmberObject;
-  }
-});
-
 export default Discourse;
diff --git a/app/assets/javascripts/discourse/app/pre-initializers/inject-discourse-objects.js b/app/assets/javascripts/discourse/app/pre-initializers/inject-discourse-objects.js
index 5838720..b412997 100644
--- a/app/assets/javascripts/discourse/app/pre-initializers/inject-discourse-objects.js
+++ b/app/assets/javascripts/discourse/app/pre-initializers/inject-discourse-objects.js
@@ -2,7 +2,6 @@ import Session from "discourse/models/session";
 import KeyValueStore from "discourse/lib/key-value-store";
 import Store from "discourse/models/store";
 import DiscourseLocation from "discourse/lib/discourse-location";
-import Discourse from "discourse/app";
 import SearchService from "discourse/services/search";
 import TopicTrackingState, {
   startTracking
@@ -33,7 +32,7 @@ export default {
 
     const currentUser = User.current();
     app.register("current-user:main", currentUser, { instantiate: false });
-    Discourse.currentUser = currentUser;
+    app.currentUser = currentUser;
 
     const topicTrackingState = TopicTrackingState.create({
       messageBus,
@@ -46,7 +45,7 @@ export default {
       app.inject(t, "topicTrackingState", "topic-tracking-state:main")
     );
 
-    const siteSettings = Discourse.SiteSettings;
+    const siteSettings = app.SiteSettings;
     app.register("site-settings:main", siteSettings, { instantiate: false });
     ALL_TARGETS.forEach(t =>
       app.inject(t, "siteSettings", "site-settings:main")
diff --git a/lib/discourse_js_processor.rb b/lib/discourse_js_processor.rb
index 08d271e..1aa140a 100644
--- a/lib/discourse_js_processor.rb
+++ b/lib/discourse_js_processor.rb
@@ -57,6 +57,7 @@ class DiscourseJsProcessor
       activate-account
       auto-redirect
       embed-application
+      app-boot
     ).any? { |f| relative_path == "#{js_root}/#{f}.js" }
 
     return true if plugin_transpile_paths.any? { |prefix| relative_path.start_with?(prefix) }

GitHub sha: e57fd283