ember-inspector 4.13.1-alpha.2025.7.29 → 4.13.1-alpha.2025.7.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/app/index.html +1 -1
  2. package/app/styles/app.scss +1 -0
  3. package/dist/bookmarklet/load_inspector.js +1 -0
  4. package/dist/bookmarklet/panes-3-16-0/assets/{chunk.524.4d9a488d82e60abd83d3.js → chunk.524.984a16186ec2ee340140.js} +4 -4
  5. package/dist/{firefox/panes-3-16-0/assets/chunk.582.688907397cfa1358668e.js → bookmarklet/panes-3-16-0/assets/chunk.582.866bd83d4661b3b843fd.js} +5 -5
  6. package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.css +835 -0
  7. package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.js +42 -4
  8. package/dist/bookmarklet/panes-3-16-0/assets/vendor.css +0 -836
  9. package/dist/bookmarklet/panes-3-16-0/assets/vendor.js +3967 -4019
  10. package/dist/bookmarklet/panes-3-16-0/base-object-HAEdWjmg.js +59 -0
  11. package/dist/bookmarklet/panes-3-16-0/basic-DfbgtngO.js +144 -0
  12. package/dist/bookmarklet/panes-3-16-0/basic-debug.js +6 -0
  13. package/dist/bookmarklet/panes-3-16-0/bookmarklet-debug.js +34 -0
  14. package/dist/bookmarklet/panes-3-16-0/chrome-debug.js +12 -0
  15. package/dist/bookmarklet/panes-3-16-0/ember.js +108 -0
  16. package/dist/bookmarklet/panes-3-16-0/ember_debug.js +22 -10556
  17. package/dist/bookmarklet/panes-3-16-0/evented-BCTya3yE.js +62 -0
  18. package/dist/bookmarklet/panes-3-16-0/firefox-debug.js +32 -0
  19. package/dist/bookmarklet/panes-3-16-0/index.html +3 -3
  20. package/dist/bookmarklet/panes-3-16-0/internals-CRmXMEzb.js +12 -0
  21. package/dist/bookmarklet/panes-3-16-0/main.js +7642 -0
  22. package/dist/bookmarklet/panes-3-16-0/port.js +108 -0
  23. package/dist/bookmarklet/panes-3-16-0/profile-node.js +60 -0
  24. package/dist/bookmarklet/panes-3-16-0/promise-assembler.js +218 -0
  25. package/dist/bookmarklet/panes-3-16-0/runloop-CF-Qpqgy.js +1138 -0
  26. package/dist/bookmarklet/panes-3-16-0/start-inspector-BPAW_WLv.js +376 -0
  27. package/dist/bookmarklet/panes-3-16-0/type-check.js +119 -0
  28. package/dist/bookmarklet/panes-3-16-0/version.js +90 -0
  29. package/dist/bookmarklet/panes-3-16-0/versions.js +4 -0
  30. package/dist/bookmarklet/panes-3-16-0/web-extension-C3pMNVSY.js +144 -0
  31. package/dist/bookmarklet/panes-3-16-0/websocket-debug.js +60 -0
  32. package/dist/chrome/content-script.js +1 -0
  33. package/dist/chrome/manifest.json +3 -3
  34. package/dist/{firefox/panes-3-16-0/assets/chunk.524.4d9a488d82e60abd83d3.js → chrome/panes-3-16-0/assets/chunk.524.984a16186ec2ee340140.js} +4 -4
  35. package/dist/{bookmarklet/panes-3-16-0/assets/chunk.582.688907397cfa1358668e.js → chrome/panes-3-16-0/assets/chunk.582.866bd83d4661b3b843fd.js} +5 -5
  36. package/dist/chrome/panes-3-16-0/assets/ember-inspector.css +835 -0
  37. package/dist/chrome/panes-3-16-0/assets/ember-inspector.js +42 -4
  38. package/dist/chrome/panes-3-16-0/assets/vendor.css +0 -836
  39. package/dist/chrome/panes-3-16-0/assets/vendor.js +3967 -4019
  40. package/dist/chrome/panes-3-16-0/base-object-HAEdWjmg.js +59 -0
  41. package/dist/chrome/panes-3-16-0/basic-DfbgtngO.js +144 -0
  42. package/dist/chrome/panes-3-16-0/basic-debug.js +6 -0
  43. package/dist/chrome/panes-3-16-0/bookmarklet-debug.js +34 -0
  44. package/dist/chrome/panes-3-16-0/chrome-debug.js +12 -0
  45. package/dist/chrome/panes-3-16-0/ember.js +108 -0
  46. package/dist/chrome/panes-3-16-0/ember_debug.js +12 -10568
  47. package/dist/chrome/panes-3-16-0/evented-BCTya3yE.js +62 -0
  48. package/dist/chrome/panes-3-16-0/firefox-debug.js +32 -0
  49. package/dist/chrome/panes-3-16-0/index.html +3 -3
  50. package/dist/chrome/panes-3-16-0/internals-CRmXMEzb.js +12 -0
  51. package/dist/chrome/panes-3-16-0/main.js +7642 -0
  52. package/dist/chrome/panes-3-16-0/port.js +108 -0
  53. package/dist/chrome/panes-3-16-0/profile-node.js +60 -0
  54. package/dist/chrome/panes-3-16-0/promise-assembler.js +218 -0
  55. package/dist/chrome/panes-3-16-0/runloop-CF-Qpqgy.js +1138 -0
  56. package/dist/chrome/panes-3-16-0/start-inspector-BPAW_WLv.js +376 -0
  57. package/dist/chrome/panes-3-16-0/type-check.js +119 -0
  58. package/dist/chrome/panes-3-16-0/version.js +90 -0
  59. package/dist/chrome/panes-3-16-0/versions.js +4 -0
  60. package/dist/chrome/panes-3-16-0/web-extension-C3pMNVSY.js +144 -0
  61. package/dist/chrome/panes-3-16-0/websocket-debug.js +60 -0
  62. package/dist/firefox/content-script.js +1 -0
  63. package/dist/firefox/manifest.json +3 -3
  64. package/dist/{chrome/panes-3-16-0/assets/chunk.524.4d9a488d82e60abd83d3.js → firefox/panes-3-16-0/assets/chunk.524.984a16186ec2ee340140.js} +4 -4
  65. package/dist/{websocket/assets/chunk.582.688907397cfa1358668e.js → firefox/panes-3-16-0/assets/chunk.582.866bd83d4661b3b843fd.js} +5 -5
  66. package/dist/firefox/panes-3-16-0/assets/ember-inspector.css +835 -0
  67. package/dist/firefox/panes-3-16-0/assets/ember-inspector.js +42 -4
  68. package/dist/firefox/panes-3-16-0/assets/vendor.css +0 -836
  69. package/dist/firefox/panes-3-16-0/assets/vendor.js +3967 -4019
  70. package/dist/firefox/panes-3-16-0/base-object-HAEdWjmg.js +59 -0
  71. package/dist/firefox/panes-3-16-0/basic-DfbgtngO.js +144 -0
  72. package/dist/firefox/panes-3-16-0/basic-debug.js +6 -0
  73. package/dist/firefox/panes-3-16-0/bookmarklet-debug.js +34 -0
  74. package/dist/firefox/panes-3-16-0/chrome-debug.js +12 -0
  75. package/dist/firefox/panes-3-16-0/ember.js +108 -0
  76. package/dist/firefox/panes-3-16-0/ember_debug.js +28 -10564
  77. package/dist/firefox/panes-3-16-0/evented-BCTya3yE.js +62 -0
  78. package/dist/firefox/panes-3-16-0/firefox-debug.js +32 -0
  79. package/dist/firefox/panes-3-16-0/index.html +3 -3
  80. package/dist/firefox/panes-3-16-0/internals-CRmXMEzb.js +12 -0
  81. package/dist/firefox/panes-3-16-0/main.js +7642 -0
  82. package/dist/firefox/panes-3-16-0/port.js +108 -0
  83. package/dist/firefox/panes-3-16-0/profile-node.js +60 -0
  84. package/dist/firefox/panes-3-16-0/promise-assembler.js +218 -0
  85. package/dist/firefox/panes-3-16-0/runloop-CF-Qpqgy.js +1138 -0
  86. package/dist/firefox/panes-3-16-0/start-inspector-BPAW_WLv.js +376 -0
  87. package/dist/firefox/panes-3-16-0/type-check.js +119 -0
  88. package/dist/firefox/panes-3-16-0/version.js +90 -0
  89. package/dist/firefox/panes-3-16-0/versions.js +4 -0
  90. package/dist/firefox/panes-3-16-0/web-extension-C3pMNVSY.js +144 -0
  91. package/dist/firefox/panes-3-16-0/websocket-debug.js +60 -0
  92. package/dist/websocket/assets/{chunk.524.4d9a488d82e60abd83d3.js → chunk.524.984a16186ec2ee340140.js} +4 -4
  93. package/dist/{chrome/panes-3-16-0/assets/chunk.582.688907397cfa1358668e.js → websocket/assets/chunk.582.866bd83d4661b3b843fd.js} +5 -5
  94. package/dist/websocket/assets/ember-inspector.css +835 -0
  95. package/dist/websocket/assets/ember-inspector.js +42 -4
  96. package/dist/websocket/assets/vendor.css +0 -836
  97. package/dist/websocket/assets/vendor.js +3967 -4019
  98. package/dist/websocket/base-object-HAEdWjmg.js +59 -0
  99. package/dist/websocket/basic-DfbgtngO.js +144 -0
  100. package/dist/websocket/basic-debug.js +6 -0
  101. package/dist/websocket/bookmarklet-debug.js +34 -0
  102. package/dist/websocket/chrome-debug.js +12 -0
  103. package/dist/websocket/ember.js +108 -0
  104. package/dist/websocket/ember_debug.js +36 -10544
  105. package/dist/websocket/evented-BCTya3yE.js +62 -0
  106. package/dist/websocket/firefox-debug.js +32 -0
  107. package/dist/websocket/index.html +3 -3
  108. package/dist/websocket/internals-CRmXMEzb.js +12 -0
  109. package/dist/websocket/main.js +7642 -0
  110. package/dist/websocket/port.js +108 -0
  111. package/dist/websocket/profile-node.js +60 -0
  112. package/dist/websocket/promise-assembler.js +218 -0
  113. package/dist/websocket/runloop-CF-Qpqgy.js +1138 -0
  114. package/dist/websocket/start-inspector-BPAW_WLv.js +376 -0
  115. package/dist/websocket/type-check.js +119 -0
  116. package/dist/websocket/version.js +90 -0
  117. package/dist/websocket/versions.js +4 -0
  118. package/dist/websocket/web-extension-C3pMNVSY.js +144 -0
  119. package/dist/websocket/websocket-debug.js +60 -0
  120. package/ember-cli-build.js +28 -91
  121. package/ember_debug/entrypoints/basic-debug.js +6 -0
  122. package/ember_debug/entrypoints/bookmarklet-debug.js +6 -0
  123. package/ember_debug/entrypoints/chrome-debug.js +6 -0
  124. package/ember_debug/entrypoints/firefox-debug.js +6 -0
  125. package/ember_debug/entrypoints/websocket-debug.js +6 -0
  126. package/ember_debug/lib/boot-ember-inspector.js +9 -0
  127. package/ember_debug/lib/get-applications.js +27 -0
  128. package/ember_debug/lib/load-ember-debug-in-webpage.js +30 -0
  129. package/ember_debug/lib/send-apps.js +14 -0
  130. package/ember_debug/lib/send-version-miss.js +39 -0
  131. package/ember_debug/lib/setup-instance-initializer.js +16 -0
  132. package/ember_debug/lib/start-inspector.js +211 -0
  133. package/ember_debug/lib/version-test.js +73 -0
  134. package/ember_debug/lib/versions.js +3 -0
  135. package/ember_debug/package.json +2 -0
  136. package/ember_debug/rollup.config.js +5 -29
  137. package/package.json +5 -9
  138. package/skeletons/bookmarklet/load_inspector.js +1 -0
  139. package/skeletons/web-extension/content-script.js +1 -0
  140. package/skeletons/web-extension/manifest.json +3 -3
  141. package/tests/index.html +1 -2
  142. package/tests/integration/injection-test.js +3 -3
  143. package/tests/test-helper.js +0 -3
  144. package/ember_debug/vendor/loader.js +0 -54
  145. package/ember_debug/vendor/startup-wrapper.js +0 -390
  146. package/lib/ui/app/components/ui/disclosure-triangle.js +0 -1
  147. package/lib/ui/app/components/ui/disclosure.js +0 -1
  148. package/lib/ui/app/components/ui/drag-handle.js +0 -1
  149. package/lib/ui/app/components/ui/draggable-column.js +0 -1
  150. package/lib/ui/app/components/ui/empty-message.js +0 -1
  151. package/lib/ui/app/components/ui/error-page.js +0 -1
  152. package/lib/ui/app/components/ui/open-links-in-new-window.js +0 -1
  153. package/lib/ui/app/components/ui/resizable-column.js +0 -1
  154. package/lib/ui/app/components/ui/send-to-console.js +0 -1
  155. package/lib/ui/app/components/ui/toolbar-clear-button.js +0 -1
  156. package/lib/ui/app/components/ui/toolbar-divider.js +0 -1
  157. package/lib/ui/app/components/ui/toolbar-reload-button.js +0 -1
  158. package/lib/ui/app/components/ui/toolbar-search-field.js +0 -1
  159. package/lib/ui/app/components/ui/warning-message.js +0 -1
  160. package/lib/ui/index.js +0 -34
  161. package/lib/ui/package.json +0 -13
  162. /package/{lib/ui/addon/components → app/components/ui}/disclosure-triangle.hbs +0 -0
  163. /package/{lib/ui/addon/components → app/components/ui}/disclosure.hbs +0 -0
  164. /package/{lib/ui/addon/components → app/components/ui}/disclosure.js +0 -0
  165. /package/{lib/ui/addon/components → app/components/ui}/drag-handle.hbs +0 -0
  166. /package/{lib/ui/addon/components → app/components/ui}/drag-handle.js +0 -0
  167. /package/{lib/ui/addon/components → app/components/ui}/draggable-column.hbs +0 -0
  168. /package/{lib/ui/addon/components → app/components/ui}/draggable-column.js +0 -0
  169. /package/{lib/ui/addon/components → app/components/ui}/empty-message.hbs +0 -0
  170. /package/{lib/ui/addon/components → app/components/ui}/error-page.hbs +0 -0
  171. /package/{lib/ui/addon/components → app/components/ui}/open-links-in-new-window.hbs +0 -0
  172. /package/{lib/ui/addon/components → app/components/ui}/open-links-in-new-window.js +0 -0
  173. /package/{lib/ui/addon/components → app/components/ui}/resizable-column.hbs +0 -0
  174. /package/{lib/ui/addon/components → app/components/ui}/resizable-column.js +0 -0
  175. /package/{lib/ui/addon/components → app/components/ui}/send-to-console.hbs +0 -0
  176. /package/{lib/ui/addon/components → app/components/ui}/toolbar-clear-button.hbs +0 -0
  177. /package/{lib/ui/addon/components → app/components/ui}/toolbar-divider.hbs +0 -0
  178. /package/{lib/ui/addon/components → app/components/ui}/toolbar-reload-button.hbs +0 -0
  179. /package/{lib/ui/addon/components → app/components/ui}/toolbar-search-field.hbs +0 -0
  180. /package/{lib/ui/addon/components → app/components/ui}/toolbar-search-field.js +0 -0
  181. /package/{lib/ui/addon/components → app/components/ui}/warning-message.hbs +0 -0
  182. /package/{lib/ui/addon/styles → app/styles/ui}/_disclosure-triangle.scss +0 -0
  183. /package/{lib/ui/addon/styles → app/styles/ui}/_drag-handle.scss +0 -0
  184. /package/{lib/ui/addon/styles → app/styles/ui}/_empty-message.scss +0 -0
  185. /package/{lib/ui/addon/styles → app/styles/ui}/_error-page.scss +0 -0
  186. /package/{lib/ui/addon/styles → app/styles/ui}/_goto-source.scss +0 -0
  187. /package/{lib/ui/addon/styles → app/styles/ui}/_list.scss +0 -0
  188. /package/{lib/ui/addon/styles → app/styles/ui}/_nav.scss +0 -0
  189. /package/{lib/ui/addon/styles → app/styles/ui}/_object-inspector-toggle.scss +0 -0
  190. /package/{lib/ui/addon/styles → app/styles/ui}/_pill.scss +0 -0
  191. /package/{lib/ui/addon/styles → app/styles/ui}/_send-to-console.scss +0 -0
  192. /package/{lib/ui/addon/styles → app/styles/ui}/_split.scss +0 -0
  193. /package/{lib/ui/addon/styles/addon.scss → app/styles/ui/_ui.scss} +0 -0
  194. /package/{lib/ui/addon/styles → app/styles/ui}/_warning.scss +0 -0
  195. /package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_checkbox.scss +0 -0
  196. /package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_divider.scss +0 -0
  197. /package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_icon-button.scss +0 -0
  198. /package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_index.scss +0 -0
  199. /package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_radio.scss +0 -0
  200. /package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_search.scss +0 -0
@@ -1,390 +0,0 @@
1
- let Ember;
2
-
3
- /* eslint camelcase:0 */
4
- /**
5
- This is a wrapper for `ember-debug.js`
6
- Wraps the script in a function,
7
- and ensures that the script is executed
8
- only after the dom is ready
9
- and the application has initialized.
10
-
11
- Also responsible for sending the first tree.
12
- **/
13
- /*eslint prefer-spread: 0 */
14
- /* globals adapter */
15
- var currentAdapter = 'basic';
16
- if (typeof adapter !== 'undefined') {
17
- currentAdapter = adapter;
18
- }
19
-
20
- // @formatter:off
21
- var EMBER_VERSIONS_SUPPORTED = {{EMBER_VERSIONS_SUPPORTED}};
22
- // @formatter:on
23
-
24
- (function(adapter) {
25
- onEmberReady(function() {
26
- // global to prevent injection
27
- if (window.NO_EMBER_DEBUG) {
28
- return;
29
- }
30
-
31
- // If Ember doesn't exist, we should stop here to avoid issues with accessing `Ember.VERSION`
32
- if (!Ember) {
33
- return;
34
- }
35
-
36
- if (!versionTest(Ember.VERSION, EMBER_VERSIONS_SUPPORTED)) {
37
- // Wrong inspector version. Redirect to the correct version.
38
- sendVersionMiss();
39
- return;
40
- }
41
-
42
- // prevent from injecting twice
43
- if (!window.EmberInspector) {
44
-
45
- let emberDebugMainModule = requireModule('ember-debug/main');
46
- if (!emberDebugMainModule) {
47
- return;
48
- }
49
- window.EmberInspector = emberDebugMainModule;
50
- window.EmberInspector.Adapter = requireModule('ember-debug/' + adapter);
51
-
52
- onApplicationStart(function appStarted(instance) {
53
- let app = instance.application;
54
- if (!('__inspector__booted' in app)) {
55
- // Watch for app reset/destroy
56
- app.reopen({
57
- reset: function() {
58
- this.__inspector__booted = false;
59
- this._super.apply(this, arguments);
60
- }
61
- });
62
- }
63
-
64
- if (instance && !('__inspector__booted' in instance)) {
65
- instance.reopen({
66
- // Clean up on instance destruction
67
- willDestroy() {
68
- if (window.EmberInspector.owner === instance) {
69
- window.EmberInspector.destroyContainer();
70
- window.EmberInspector.clear();
71
- }
72
- return this._super.apply(this, arguments);
73
- }
74
- });
75
-
76
- if (!window.EmberInspector._application) {
77
- setTimeout(() => bootEmberInspector(instance), 0);
78
- }
79
- }
80
- });
81
- }
82
- });
83
-
84
- function bootEmberInspector(appInstance) {
85
- appInstance.application.__inspector__booted = true;
86
- appInstance.__inspector__booted = true;
87
-
88
- // Boot the inspector (or re-boot if already booted, for example in tests)
89
- window.EmberInspector._application = appInstance.application;
90
- window.EmberInspector.owner = appInstance;
91
- window.EmberInspector.start(true);
92
- }
93
-
94
- function onEmberReady(callback) {
95
- var triggered = false;
96
- var triggerOnce = function(string) {
97
- if (triggered) {
98
- return;
99
- }
100
-
101
- if (!Ember) {
102
- try {
103
- Ember = requireModule('ember/barrel')['default'];
104
- } catch {}
105
- try {
106
- Ember = Ember || requireModule('ember')['default'];
107
- } catch {
108
- Ember = window.Ember;
109
- }
110
- }
111
-
112
- if (!Ember) {
113
- return;
114
- }
115
- // `Ember.Application` load hook triggers before all of Ember is ready.
116
- // In this case we ignore and wait for the `Ember` load hook.
117
- if (!Ember.RSVP) {
118
- return;
119
- }
120
- triggered = true;
121
- callback();
122
- };
123
-
124
- // Newest Ember versions >= 1.10
125
-
126
- const later = () => setTimeout(triggerOnce, 0);
127
- window.addEventListener('Ember', later, { once: true });
128
- // Oldest Ember versions or if this was injected after Ember has loaded.
129
- onReady(triggerOnce);
130
- }
131
-
132
- // There's probably a better way
133
- // to determine when the application starts
134
- // but this definitely works
135
- function onApplicationStart(callback) {
136
- if (typeof Ember === 'undefined') {
137
- return;
138
- }
139
-
140
- const adapterInstance = new (requireModule('ember-debug/' + currentAdapter));
141
-
142
- adapterInstance.onMessageReceived(function(message) {
143
- if (message.type === 'app-picker-loaded') {
144
- sendApps(adapterInstance, getApplications());
145
- }
146
-
147
- if (message.type === 'app-selected') {
148
- let current = window.EmberInspector._application;
149
- let selected = getApplications().find(app => Ember.guidFor(app) === message.applicationId);
150
-
151
- if (selected && current !== selected && selected.__deprecatedInstance__) {
152
- bootEmberInspector(selected.__deprecatedInstance__);
153
- }
154
- }
155
- });
156
-
157
- var apps = getApplications();
158
-
159
- sendApps(adapterInstance, apps);
160
-
161
- function loadInstance(app) {
162
- const applicationInstances = app._applicationInstances && [...app._applicationInstances]
163
- let instance = app.__deprecatedInstance__ || applicationInstances[0];
164
- if (instance) {
165
- // App started
166
- setupInstanceInitializer(app, callback);
167
- callback(instance);
168
- return true
169
- }
170
- }
171
-
172
- var app;
173
- for (var i = 0, l = apps.length; i < l; i++) {
174
- app = apps[i];
175
- // We check for the existance of an application instance because
176
- // in Ember > 3 tests don't destroy the app when they're done but the app has no booted instances.
177
- if (app._readinessDeferrals === 0) {
178
- if (loadInstance(app)) {
179
- break;
180
- }
181
- }
182
-
183
- // app already run initializers, but no instance, use _bootPromise and didBecomeReady
184
- if(app._bootPromise) {
185
- app._bootPromise.then((app) => {
186
- loadInstance(app);
187
- });
188
- }
189
-
190
- app.reopen({
191
- didBecomeReady() {
192
- this._super.apply(this, arguments);
193
- setTimeout(() => loadInstance(app), 0)
194
- }
195
- });
196
-
197
- }
198
- Ember.Application.initializer({
199
- name: 'ember-inspector-booted',
200
- initialize: function(app) {
201
- setupInstanceInitializer(app, callback);
202
- }
203
- });
204
- }
205
-
206
- function setupInstanceInitializer(app, callback) {
207
- if (!app.__inspector__setup) {
208
- app.__inspector__setup = true;
209
-
210
- // We include the app's guid in the initializer name because in Ember versions < 3
211
- // registering an instance initializer with the same name, even if on a different app,
212
- // triggers an error because instance initializers seem to be global instead of per app.
213
- app.instanceInitializer({
214
- name: 'ember-inspector-app-instance-booted-' + Ember.guidFor(app),
215
- initialize: function(instance) {
216
- callback(instance);
217
- }
218
- });
219
- }
220
- }
221
-
222
- /**
223
- * Get all the Ember.Application instances from Ember.Namespace.NAMESPACES
224
- * and add our own applicationId and applicationName to them
225
- * @return {*}
226
- */
227
- function getApplications() {
228
- var namespaces = Ember.A(Ember.Namespace.NAMESPACES);
229
-
230
- var apps = namespaces.filter(function(namespace) {
231
- return namespace instanceof Ember.Application;
232
- });
233
-
234
- return apps.map(function(app) {
235
- // Add applicationId and applicationName to the app
236
- var applicationId = Ember.guidFor(app);
237
- var applicationName = app.name || app.modulePrefix || `(unknown app - ${applicationId})`;
238
-
239
- Object.assign(app, {
240
- applicationId,
241
- applicationName
242
- });
243
-
244
- return app;
245
- });
246
- }
247
-
248
- let channel = new MessageChannel();
249
- let port = channel.port1;
250
- window.postMessage('debugger-client', '*', [channel.port2]);
251
-
252
- let registeredMiss = false;
253
-
254
- /**
255
- * This function is called if the app's Ember version
256
- * is not supported by this version of the inspector.
257
- *
258
- * It sends a message to the inspector app to redirect
259
- * to an inspector version that supports this Ember version.
260
- */
261
- function sendVersionMiss() {
262
- if (registeredMiss) {
263
- return;
264
- }
265
-
266
- registeredMiss = true;
267
-
268
- port.addEventListener('message', message => {
269
- if (message.type === 'check-version') {
270
- sendVersionMismatch();
271
- }
272
- });
273
-
274
- sendVersionMismatch();
275
-
276
- port.start();
277
-
278
- function sendVersionMismatch() {
279
- port.postMessage({
280
- name: 'version-mismatch',
281
- version: Ember.VERSION,
282
- from: 'inspectedWindow'
283
- });
284
- }
285
- }
286
-
287
- function sendApps(adapter, apps) {
288
- const serializedApps = apps.map(app => {
289
- return {
290
- applicationName: app.applicationName,
291
- applicationId: app.applicationId
292
- }
293
- });
294
-
295
- adapter.sendMessage({
296
- type: 'apps-loaded',
297
- apps: serializedApps,
298
- from: 'inspectedWindow'
299
- });
300
- }
301
-
302
- /**
303
- * Checks if a version is between two different versions.
304
- * version should be >= left side, < right side
305
- *
306
- * @param {String} version1
307
- * @param {String} version2
308
- * @return {Boolean}
309
- */
310
- function versionTest(version, between) {
311
- var fromVersion = between[0];
312
- var toVersion = between[1];
313
-
314
- if (compareVersion(version, fromVersion) === -1) {
315
- return false;
316
- }
317
- return !toVersion || compareVersion(version, toVersion) === -1;
318
- }
319
-
320
- function onReady(callback) {
321
- if (document.readyState === 'complete' || document.readyState === 'interactive') {
322
- setTimeout(completed);
323
- } else {
324
- document.addEventListener("DOMContentLoaded", completed, false);
325
- // For some reason DOMContentLoaded doesn't always work
326
- window.addEventListener("load", completed, false);
327
- }
328
-
329
- function completed() {
330
- document.removeEventListener("DOMContentLoaded", completed, false);
331
- window.removeEventListener("load", completed, false);
332
- callback();
333
- }
334
- }
335
-
336
- /**
337
- * Compares two Ember versions.
338
- *
339
- * Returns:
340
- * `-1` if version1 < version
341
- * 0 if version1 == version2
342
- * 1 if version1 > version2
343
- *
344
- * @param {String} version1
345
- * @param {String} version2
346
- * @return {Boolean} result of the comparison
347
- */
348
- function compareVersion(version1, version2) {
349
- let compared, i;
350
- version1 = cleanupVersion(version1).split('.');
351
- version2 = cleanupVersion(version2).split('.');
352
- for (i = 0; i < 3; i++) {
353
- compared = compare(+version1[i], +version2[i]);
354
- if (compared !== 0) {
355
- return compared;
356
- }
357
- }
358
- return 0;
359
- }
360
-
361
- /**
362
- * Remove -alpha, -beta, etc from versions
363
- *
364
- * @param {String} version
365
- * @return {String} The cleaned up version
366
- */
367
- function cleanupVersion(version) {
368
- return version.replace(/-.*/g, '');
369
- }
370
-
371
- /**
372
- * @method compare
373
- * @param {Number} val
374
- * @param {Number} number
375
- * @return {Number}
376
- * 0: same
377
- * -1: <
378
- * 1: >
379
- */
380
- function compare(val, number) {
381
- if (val === number) {
382
- return 0;
383
- } else if (val < number) {
384
- return -1;
385
- } else if (val > number) {
386
- return 1;
387
- }
388
- }
389
-
390
- }(currentAdapter));
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/disclosure-triangle';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/disclosure';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/drag-handle';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/draggable-column';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/empty-message';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/error-page';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/open-links-in-new-window';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/resizable-column';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/send-to-console';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/toolbar-clear-button';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/toolbar-divider';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/toolbar-reload-button';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/toolbar-search-field';
@@ -1 +0,0 @@
1
- export { default } from 'ui/components/warning-message';
package/lib/ui/index.js DELETED
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- const VersionChecker = require('ember-cli-version-checker');
4
-
5
- module.exports = {
6
- name: require('./package').name,
7
-
8
- // When running ember-try on Ember < 3.13, colocation support is
9
- // disabled in ember-cli-htmlbars and causes a build error. When
10
- // running ember-try, we actually don't care about the "app" side
11
- // at all – all we do is run the ember_debug tests (via a --filter
12
- // option to ember test in the ember-try config). The only reason
13
- // we are even building the app is to get the test harness (qunit
14
- // and friends) to work. In the long run, we should split up the
15
- // build and not run the app build in ember-try, but in the mean
16
- // time, this drops all the addon files (since we don't need them)
17
- // to avoid the problem. The app will of course not work correctly
18
- // at runtime, but it was never meant to work on old ember versions
19
- // in the first place.
20
- treeForAddon() {
21
- let checker = new VersionChecker(this.project);
22
- let emberChecker = checker.for('ember-source');
23
-
24
- if (emberChecker.gte('3.13.0')) {
25
- return this._super.treeForAddon.apply(this, arguments);
26
- } else {
27
- return null;
28
- }
29
- },
30
-
31
- isDevelopingAddon() {
32
- return true;
33
- },
34
- };
@@ -1,13 +0,0 @@
1
- {
2
- "name": "ui",
3
- "keywords": [
4
- "ember-addon"
5
- ],
6
- "dependencies": {
7
- "ember-cli-babel": "*",
8
- "ember-cli-htmlbars": "*",
9
- "ember-cli-sass": "*",
10
- "ember-cli-version-checker": "*",
11
- "ember-svg-jar": "*"
12
- }
13
- }