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