@@ -13,6 +13,47 @@ export { default as inspect } from './lib/inspect';
1313export { isTesting , setTesting } from './lib/testing' ;
1414export { default as captureRenderTree } from './lib/capture-render-tree' ;
1515
16+ // required for inspector
17+ import { _backburner , cancel , debounce , join , later , scheduleOnce } from '@ember/runloop' ;
18+ import { cacheFor , guidFor } from '@ember/object/internals' ;
19+ import { default as MutableArray } from '@ember/array/mutable' ;
20+ import { default as Namespace } from '@ember/application/namespace' ;
21+ import { default as MutableEnumerable } from '@ember/enumerable/mutable' ;
22+ import { NativeArray } from '@ember/array' ;
23+ import { ControllerMixin } from '@ember/controller' ;
24+ import { default as CoreObject } from '@ember/object/core' ;
25+ import { default as Application } from '@ember/application' ;
26+ import { default as EmberComponent } from '@ember/component' ;
27+ import { default as Observable } from '@ember/object/observable' ;
28+ import { default as Evented } from '@ember/object/evented' ;
29+ import { default as PromiseProxyMixin } from '@ember/object/promise-proxy-mixin' ;
30+ import { default as EmberObject } from '@ember/object' ;
31+ import { default as VERSION } from 'ember/version' ;
32+ import { ComputedProperty , isComputed , descriptorForProperty , descriptorForDecorator , tagForProperty } from '@ember/-internals/metal' ;
33+ import { isMandatorySetter } from '@ember/-internals/utils'
34+ import { meta } from '@ember/-internals/meta' ;
35+ import { TargetActionSupport } from '@ember/-internals/runtime' ;
36+ import {
37+ ViewStateSupport ,
38+ ViewMixin ,
39+ ActionSupport ,
40+ ClassNamesSupport ,
41+ ChildViewsSupport ,
42+ CoreView
43+ } from '@ember/-internals/views' ;
44+ import { set , get } from '@ember/object' ;
45+ import { isTrackedProperty } from '@ember/-internals/metal/lib/tracked' ;
46+ import { isCachedProperty } from '@ember/-internals/metal/lib/cached' ;
47+ import { default as inspect } from './lib/inspect' ;
48+ import { subscribe } from '../instrumentation' ;
49+ import { default as captureRenderTree } from './lib/capture-render-tree' ;
50+ import { registerHandler as registerDeprecationHandler } from './lib/deprecate' ;
51+ import * as GlimmerValidator from '@glimmer/validator' ;
52+ import * as GlimmerRuntime from '@glimmer/runtime' ;
53+ import { getOwner } from '@glimmer/owner' ;
54+ import RSVP from 'rsvp' ;
55+
56+
1657export type DebugFunctionType =
1758 | 'assert'
1859 | 'info'
@@ -342,6 +383,78 @@ if (DEBUG && !isTesting()) {
342383 } ,
343384 false
344385 ) ;
386+ window . addEventListener (
387+ 'ember-inspector-debug-request' ,
388+ ( ) => {
389+ const event = new CustomEvent ( "ember-inspector-debug-response" , { detail : {
390+ runloop : {
391+ _backburner,
392+ cancel,
393+ debounce,
394+ join,
395+ later,
396+ scheduleOnce,
397+ } ,
398+ object : {
399+ cacheFor,
400+ guidFor,
401+ getOwner,
402+ set,
403+ get,
404+ meta
405+ } ,
406+ debug : {
407+ isComputed,
408+ isTrackedProperty,
409+ isCachedProperty,
410+ descriptorForProperty,
411+ descriptorForDecorator,
412+ isMandatorySetter,
413+ meta,
414+ captureRenderTree,
415+ isTesting,
416+ inspect,
417+ registerDeprecationHandler,
418+ tagForProperty,
419+ ComputedProperty,
420+ infoForTag : GlimmerValidator . infoForTag
421+ } ,
422+ classes : {
423+ EmberObject,
424+ MutableArray,
425+ Namespace,
426+ MutableEnumerable,
427+ NativeArray,
428+ TargetActionSupport,
429+ ControllerMixin,
430+ CoreObject,
431+ Application,
432+ EmberComponent,
433+ Observable,
434+ Evented,
435+ PromiseProxyMixin,
436+ } ,
437+ VERSION ,
438+ instrumentation : {
439+ subscribe
440+ } ,
441+ Views : {
442+ ViewStateSupport,
443+ ViewMixin,
444+ ActionSupport,
445+ ClassNamesSupport,
446+ ChildViewsSupport,
447+ CoreView
448+ } ,
449+ GlimmerValidator,
450+ GlimmerRuntime,
451+ RSVP
452+ }
453+ } ) ;
454+ window . dispatchEvent ( event ) ;
455+ } ,
456+ false
457+ ) ;
345458 }
346459}
347460
0 commit comments