ember-inspector 4.13.1-alpha.2024.8.9 → 4.13.1-alpha.2025.10.1
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/PRIVACY.md +3 -0
- package/README.md +10 -2
- package/app/components/app-picker.hbs +2 -2
- package/app/components/component-tree-item.hbs +14 -14
- package/app/components/component-tree-toolbar.hbs +17 -3
- package/app/components/{date-property-field.js → date-property-field.ts} +6 -5
- package/app/components/deprecation-item-source.hbs +1 -1
- package/app/components/deprecation-item.hbs +1 -1
- package/app/components/deprecations-toolbar.hbs +1 -1
- package/app/components/item-types.hbs +7 -7
- package/app/components/list-cell.hbs +3 -3
- package/app/components/list-content.hbs +4 -3
- package/app/components/list-content.ts +96 -0
- package/app/components/list.hbs +3 -3
- package/app/components/list.js +7 -7
- package/app/components/model-types-toolbar.hbs +3 -3
- package/app/components/object-inspector/component-parents.hbs +33 -0
- package/app/components/object-inspector/component-parents.js +43 -0
- package/app/components/object-inspector/dependent-keys.hbs +4 -4
- package/app/components/object-inspector/errors.hbs +4 -4
- package/app/components/object-inspector/properties-all.hbs +1 -1
- package/app/components/object-inspector/properties-base.js +2 -0
- package/app/components/object-inspector/properties-grouped.hbs +5 -5
- package/app/components/object-inspector/property.hbs +36 -34
- package/app/components/object-inspector/property.ts +34 -17
- package/app/components/object-inspector/sort-properties.js +12 -4
- package/app/components/object-inspector/toggle.hbs +9 -0
- package/app/components/object-inspector/toggle.js +6 -0
- package/app/components/object-inspector.hbs +11 -9
- package/app/components/object-inspector.js +1 -1
- package/app/components/promise-item.hbs +11 -11
- package/app/components/promise-item.js +8 -6
- package/app/components/promise-tree-toolbar.hbs +5 -5
- package/app/components/records-toolbar.hbs +2 -2
- package/app/components/render-item.hbs +4 -4
- package/app/components/render-item.ts +12 -9
- package/app/components/render-tree-toolbar.hbs +1 -1
- package/app/components/route-cell-name.hbs +1 -1
- package/app/components/route-cell-name.js +3 -2
- package/app/components/route-tree-toolbar.hbs +2 -2
- package/app/components/scroll-container.js +2 -0
- package/app/components/side-nav.hbs +5 -5
- package/app/components/side-nav.js +1 -1
- package/{lib/ui/addon/components → app/components/ui}/drag-handle.hbs +4 -4
- package/{lib/ui/addon/components → app/components/ui}/drag-handle.js +3 -1
- package/{lib/ui/addon/components → app/components/ui}/empty-message.hbs +1 -1
- package/{lib/ui/addon/components → app/components/ui}/error-page.hbs +3 -3
- package/{lib/ui/addon/components → app/components/ui}/resizable-column.js +1 -1
- package/{lib/ui/addon/components → app/components/ui}/toolbar-clear-button.hbs +1 -1
- package/{lib/ui/addon/components → app/components/ui}/toolbar-reload-button.hbs +1 -1
- package/{lib/ui/addon/components → app/components/ui}/toolbar-search-field.hbs +2 -2
- package/app/computed/{debounce.js → debounce.ts} +7 -5
- package/app/config/environment.d.ts +5 -2
- package/app/controllers/app-config.js +1 -0
- package/app/controllers/application.js +36 -71
- package/app/controllers/component-tree.js +26 -7
- package/app/controllers/container-type.js +2 -1
- package/app/controllers/container-types/{index.js → index.ts} +5 -2
- package/app/controllers/container-types.js +3 -6
- package/app/controllers/deprecations.js +16 -11
- package/app/controllers/libraries.js +1 -0
- package/app/controllers/model-types.js +1 -0
- package/app/controllers/promise-tree.ts +149 -0
- package/app/controllers/records.js +18 -26
- package/app/controllers/{render-tree.js → render-tree.ts} +54 -45
- package/app/controllers/route-tree.js +7 -5
- package/app/helpers/build-style.js +1 -1
- package/app/index.html +1 -19
- package/app/initializers/setup.js +1 -1
- package/app/libs/promise-assembler.ts +249 -0
- package/app/libs/resizable-columns.js +10 -10
- package/app/models/{promise.js → promise.ts} +72 -69
- package/app/{router.js → router.ts} +1 -1
- package/app/routes/app-detected.js +3 -5
- package/app/routes/application.js +9 -13
- package/app/routes/deprecations.js +7 -16
- package/app/routes/launch.js +2 -1
- package/app/routes/libraries.js +2 -1
- package/app/routes/model-type.js +2 -3
- package/app/routes/model-types.ts +57 -0
- package/app/routes/promise-tree.ts +63 -0
- package/app/routes/records.ts +78 -0
- package/app/routes/render-tree.ts +93 -0
- package/app/routes/route-tree.js +0 -1
- package/app/routes/{tab.js → tab.ts} +9 -2
- package/app/routes/whats-new.js +2 -2
- package/app/services/adapters/{basic.js → basic.ts} +36 -30
- package/app/services/adapters/{bookmarklet.js → bookmarklet.ts} +17 -24
- package/app/services/adapters/{chrome.js → chrome.ts} +1 -2
- package/app/services/adapters/{web-extension.js → web-extension.ts} +46 -46
- package/app/services/adapters/websocket.ts +40 -0
- package/app/services/layout.ts +124 -0
- package/app/services/port.ts +195 -0
- package/app/services/storage/{local.js → local.ts} +7 -20
- package/app/services/storage/{memory.js → memory.ts} +6 -21
- package/app/services/{storage.js → storage.ts} +9 -20
- package/app/styles/app.scss +1 -0
- package/app/styles/base.scss +6 -2
- package/app/styles/colors.scss +33 -31
- package/app/styles/component_tree.scss +56 -51
- package/app/styles/dropdown.scss +2 -2
- package/app/styles/ember-table.scss +3 -3
- package/app/styles/mixin.scss +26 -26
- package/app/styles/object_inspector.scss +30 -21
- package/{lib/ui/addon/styles → app/styles/ui}/_disclosure-triangle.scss +3 -1
- package/{lib/ui/addon/styles → app/styles/ui}/_drag-handle.scss +7 -7
- package/{lib/ui/addon/styles → app/styles/ui}/_empty-message.scss +1 -1
- package/{lib/ui/addon/styles → app/styles/ui}/_error-page.scss +8 -7
- package/{lib/ui/addon/styles → app/styles/ui}/_list.scss +46 -45
- package/{lib/ui/addon/styles → app/styles/ui}/_nav.scss +29 -27
- package/app/styles/ui/_object-inspector-toggle.scss +4 -0
- package/{lib/ui/addon/styles → app/styles/ui}/_pill.scss +4 -4
- package/{lib/ui/addon/styles → app/styles/ui}/_send-to-console.scss +1 -1
- package/{lib/ui/addon/styles → app/styles/ui}/_split.scss +26 -20
- package/app/styles/ui/_ui.scss +13 -0
- package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_checkbox.scss +5 -5
- package/app/styles/ui/toolbar/_icon-button.scss +80 -0
- package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_index.scss +6 -5
- package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_radio.scss +10 -10
- package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_search.scss +5 -3
- package/app/styles/utils.scss +408 -122
- package/app/templates/application.hbs +21 -19
- package/app/templates/component-tree.hbs +4 -1
- package/app/templates/deprecations.hbs +2 -3
- package/app/templates/info.hbs +10 -10
- package/app/templates/promise-tree.hbs +1 -1
- package/app/templates/render-tree.hbs +1 -1
- package/app/templates/route-tree.hbs +1 -1
- package/app/utils/escape-reg-exp.ts +3 -2
- package/app/utils/nullish.ts +7 -0
- package/app/utils/parse-text.ts +4 -5
- package/app/utils/truncate.js +0 -1
- package/config/ember-cli-update.json +5 -3
- package/config/ember-try.js +117 -72
- package/config/environment.js +1 -1
- package/config/optional-features.json +2 -1
- package/dist/bookmarklet/load_inspector.js +31 -11
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.524.3530526ca8a0822af855.js +40 -0
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.582.0ae94a39ca88591dff80.js +42 -0
- package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.css +997 -156
- package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.js +557 -609
- package/dist/bookmarklet/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
- package/dist/bookmarklet/panes-3-16-0/assets/svg/focus-point-round.svg +9 -0
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-components.svg +2 -2
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-container.svg +1 -1
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-data.svg +1 -1
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-info.svg +3 -3
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
- package/dist/bookmarklet/panes-3-16-0/assets/svg/sidebar-toggle-trailing.svg +9 -0
- package/dist/bookmarklet/panes-3-16-0/assets/vendor.css +4 -841
- package/dist/bookmarklet/panes-3-16-0/assets/vendor.js +4277 -5152
- 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 +115 -0
- package/dist/bookmarklet/panes-3-16-0/ember_debug.js +24 -11011
- 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 +4 -23
- package/dist/bookmarklet/panes-3-16-0/internals-CRmXMEzb.js +12 -0
- package/dist/bookmarklet/panes-3-16-0/main.js +7663 -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/background.js +26 -21
- package/dist/chrome/boot.js +1 -1
- package/dist/chrome/content-script.js +12 -11
- package/dist/chrome/devtools.js +12 -3
- package/dist/chrome/manifest.json +3 -3
- package/dist/chrome/options.js +17 -12
- package/dist/chrome/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.524.3530526ca8a0822af855.js +40 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.582.0ae94a39ca88591dff80.js +42 -0
- package/dist/chrome/panes-3-16-0/assets/ember-inspector.css +997 -156
- package/dist/chrome/panes-3-16-0/assets/ember-inspector.js +557 -609
- package/dist/chrome/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
- package/dist/chrome/panes-3-16-0/assets/svg/focus-point-round.svg +9 -0
- package/dist/chrome/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
- package/dist/chrome/panes-3-16-0/assets/svg/nav-components.svg +2 -2
- package/dist/chrome/panes-3-16-0/assets/svg/nav-container.svg +1 -1
- package/dist/chrome/panes-3-16-0/assets/svg/nav-data.svg +1 -1
- package/dist/chrome/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
- package/dist/chrome/panes-3-16-0/assets/svg/nav-info.svg +3 -3
- package/dist/chrome/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
- package/dist/chrome/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
- package/dist/chrome/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
- package/dist/chrome/panes-3-16-0/assets/svg/sidebar-toggle-trailing.svg +9 -0
- package/dist/chrome/panes-3-16-0/assets/vendor.css +4 -841
- package/dist/chrome/panes-3-16-0/assets/vendor.js +4277 -5152
- 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 +115 -0
- package/dist/chrome/panes-3-16-0/ember_debug.js +12 -11021
- 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 +4 -23
- package/dist/chrome/panes-3-16-0/internals-CRmXMEzb.js +12 -0
- package/dist/chrome/panes-3-16-0/main.js +7663 -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/chrome/scripts/in-page-script.js +19 -13
- package/dist/firefox/background.js +26 -21
- package/dist/firefox/boot.js +1 -1
- package/dist/firefox/content-script.js +12 -11
- package/dist/firefox/devtools.js +12 -3
- package/dist/firefox/manifest.json +3 -3
- package/dist/firefox/options.js +17 -12
- package/dist/firefox/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.524.3530526ca8a0822af855.js +40 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.582.0ae94a39ca88591dff80.js +42 -0
- package/dist/firefox/panes-3-16-0/assets/ember-inspector.css +997 -156
- package/dist/firefox/panes-3-16-0/assets/ember-inspector.js +557 -609
- package/dist/firefox/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
- package/dist/firefox/panes-3-16-0/assets/svg/focus-point-round.svg +9 -0
- package/dist/firefox/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
- package/dist/firefox/panes-3-16-0/assets/svg/nav-components.svg +2 -2
- package/dist/firefox/panes-3-16-0/assets/svg/nav-container.svg +1 -1
- package/dist/firefox/panes-3-16-0/assets/svg/nav-data.svg +1 -1
- package/dist/firefox/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
- package/dist/firefox/panes-3-16-0/assets/svg/nav-info.svg +3 -3
- package/dist/firefox/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
- package/dist/firefox/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
- package/dist/firefox/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
- package/dist/firefox/panes-3-16-0/assets/svg/sidebar-toggle-trailing.svg +9 -0
- package/dist/firefox/panes-3-16-0/assets/vendor.css +4 -841
- package/dist/firefox/panes-3-16-0/assets/vendor.js +4277 -5152
- 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 +115 -0
- package/dist/firefox/panes-3-16-0/ember_debug.js +27 -11016
- 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 +4 -23
- package/dist/firefox/panes-3-16-0/internals-CRmXMEzb.js +12 -0
- package/dist/firefox/panes-3-16-0/main.js +7663 -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/firefox/scripts/in-page-script.js +19 -13
- package/dist/websocket/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/websocket/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/websocket/assets/chunk.524.3530526ca8a0822af855.js +40 -0
- package/dist/websocket/assets/chunk.582.0ae94a39ca88591dff80.js +42 -0
- package/dist/websocket/assets/ember-inspector.css +997 -156
- package/dist/websocket/assets/ember-inspector.js +557 -609
- package/dist/websocket/assets/svg/ellipsis.svg +3 -3
- package/dist/websocket/assets/svg/focus-point-round.svg +9 -0
- package/dist/websocket/assets/svg/nav-bug.svg +1 -1
- package/dist/websocket/assets/svg/nav-components.svg +2 -2
- package/dist/websocket/assets/svg/nav-container.svg +1 -1
- package/dist/websocket/assets/svg/nav-data.svg +1 -1
- package/dist/websocket/assets/svg/nav-deprecations.svg +3 -3
- package/dist/websocket/assets/svg/nav-info.svg +3 -3
- package/dist/websocket/assets/svg/nav-promises.svg +2 -2
- package/dist/websocket/assets/svg/nav-render-performance.svg +2 -2
- package/dist/websocket/assets/svg/nav-route-tree.svg +7 -7
- package/dist/websocket/assets/svg/sidebar-toggle-trailing.svg +9 -0
- package/dist/websocket/assets/vendor.css +4 -841
- package/dist/websocket/assets/vendor.js +4277 -5152
- 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 +115 -0
- package/dist/websocket/ember_debug.js +48 -11009
- package/dist/websocket/evented-BCTya3yE.js +62 -0
- package/dist/websocket/firefox-debug.js +32 -0
- package/dist/websocket/index.html +4 -23
- package/dist/websocket/internals-CRmXMEzb.js +12 -0
- package/dist/websocket/main.js +7663 -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 +31 -140
- package/ember_debug/adapters/basic.js +10 -29
- package/ember_debug/adapters/bookmarklet.js +1 -0
- package/ember_debug/adapters/firefox.js +3 -3
- package/ember_debug/adapters/web-extension.js +6 -5
- package/ember_debug/adapters/websocket.js +2 -2
- package/ember_debug/babel.config.cjs +11 -0
- package/ember_debug/container-debug.js +1 -1
- package/ember_debug/data-debug.js +7 -8
- package/ember_debug/debug-port.js +1 -1
- package/ember_debug/deprecation-debug.js +14 -14
- 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 +4 -4
- 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 -2
- package/ember_debug/libs/promise-assembler.js +5 -4
- package/ember_debug/libs/render-tree.js +37 -44
- package/ember_debug/libs/source-map.js +7 -6
- package/ember_debug/libs/view-inspection.js +25 -17
- package/ember_debug/main.js +18 -21
- package/ember_debug/models/profile-manager.js +6 -6
- package/ember_debug/models/profile-node.js +1 -1
- package/ember_debug/models/promise.js +2 -2
- package/ember_debug/object-inspector.js +71 -65
- package/ember_debug/package.json +27 -0
- package/ember_debug/port.js +5 -4
- package/ember_debug/promise-debug.js +5 -5
- package/ember_debug/render-debug.js +5 -5
- package/ember_debug/rollup.config.js +24 -0
- package/ember_debug/route-debug.js +10 -9
- package/ember_debug/services/session.js +2 -2
- package/ember_debug/utils/classify.js +1 -1
- package/ember_debug/utils/ember/object/internals.js +1 -11
- package/ember_debug/utils/ember/own-runloop.js +1 -1
- package/ember_debug/utils/ember/runloop.js +7 -10
- package/ember_debug/utils/ember-object-names.js +7 -8
- package/ember_debug/utils/ember.js +120 -14
- package/ember_debug/utils/evented.js +1 -1
- package/ember_debug/utils/get-object-name.js +3 -3
- package/ember_debug/utils/type-check.js +9 -5
- package/ember_debug/view-debug.js +12 -6
- package/eslint.config.mjs +173 -0
- package/gulpfile.js +1 -1
- package/package.json +97 -95
- package/pnpm-workspace.yaml +3 -0
- package/public/assets/svg/ellipsis.svg +3 -3
- package/public/assets/svg/focus-point-round.svg +9 -0
- package/public/assets/svg/nav-bug.svg +1 -1
- package/public/assets/svg/nav-components.svg +2 -2
- package/public/assets/svg/nav-container.svg +1 -1
- package/public/assets/svg/nav-data.svg +1 -1
- package/public/assets/svg/nav-deprecations.svg +3 -3
- package/public/assets/svg/nav-info.svg +3 -3
- package/public/assets/svg/nav-promises.svg +2 -2
- package/public/assets/svg/nav-render-performance.svg +2 -2
- package/public/assets/svg/nav-route-tree.svg +7 -7
- package/public/assets/svg/sidebar-toggle-trailing.svg +9 -0
- package/scripts/download-panes.js +1 -1
- package/skeletons/bookmarklet/load_inspector.js +31 -11
- package/skeletons/web-extension/background.js +26 -21
- package/skeletons/web-extension/boot.js +1 -1
- package/skeletons/web-extension/content-script.js +12 -11
- package/skeletons/web-extension/devtools.js +12 -3
- package/skeletons/web-extension/manifest.json +3 -3
- package/skeletons/web-extension/options.js +17 -12
- package/skeletons/web-extension/scripts/in-page-script.js +19 -13
- package/testem.js +0 -1
- package/tests/acceptance/app-picker-test.js +4 -4
- package/tests/acceptance/component-tree-test.js +96 -57
- package/tests/acceptance/container-test.js +0 -2
- package/tests/acceptance/data-test.js +8 -10
- package/tests/acceptance/deprecation-test.js +8 -12
- package/tests/acceptance/info-test.js +2 -2
- package/tests/acceptance/object-inspector-test.js +62 -110
- package/tests/acceptance/promise-test.js +1 -11
- package/tests/acceptance/render-tree-test.js +2 -2
- package/tests/acceptance/route-tree-test.js +12 -14
- package/tests/acceptance/whats-new-test.js +4 -4
- package/tests/ember_debug/container-debug-test.js +4 -4
- package/tests/ember_debug/deprecation-debug-test.js +8 -5
- package/tests/ember_debug/ember-debug-test.js +1 -4
- package/tests/ember_debug/object-inspector-test.js +108 -49
- package/tests/ember_debug/profile-manager-test.js +142 -169
- package/tests/ember_debug/profile-node-test.js +4 -4
- package/tests/ember_debug/promise-assembler-test.js +13 -10
- package/tests/ember_debug/promise-debug-test.js +5 -6
- package/tests/ember_debug/route-debug-test.js +8 -7
- package/tests/ember_debug/view-debug-test.js +257 -182
- package/tests/helpers/{index.js → index.ts} +6 -5
- package/tests/helpers/setup-ember-debug-test.js +14 -0
- package/tests/index.html +1 -2
- package/tests/integration/injection-test.js +14 -15
- package/tests/test-adapter.js +15 -15
- package/tests/test-helper.js +6 -4
- package/tests/unit/check-current-route-test.js +0 -4
- package/tests/unit/resizable-columns-test.js +53 -51
- package/tests/unit/utils/parse-text-test.js +3 -3
- package/tests/unit/utils/search-match-test.js +5 -5
- package/tests/unit/utils/type-check-test.js +22 -0
- package/tsconfig.json +3 -1
- package/types/ember-inspector/index.d.ts +2 -1
- package/types/global.d.ts +1 -7
- package/.editorconfig +0 -19
- package/.ember-cli +0 -15
- package/.eslintignore +0 -33
- package/.eslintrc.js +0 -86
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -30
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/dependabot.yml +0 -14
- package/.github/pull_request_template.md +0 -4
- package/.github/workflows/build.yml +0 -339
- package/.github/workflows/plan-release.yml +0 -83
- package/.github/workflows/publish.yml +0 -60
- package/.prettierignore +0 -25
- package/.prettierrc.js +0 -14
- package/.release-plan.json +0 -17
- package/.stylelintrc.js +0 -3
- package/.template-lintrc.js +0 -12
- package/.tool-versions +0 -2
- package/.watchmanconfig +0 -3
- package/app/components/.gitkeep +0 -0
- package/app/components/list-content.js +0 -130
- package/app/controllers/.gitkeep +0 -0
- package/app/controllers/promise-tree.js +0 -130
- package/app/helpers/.gitkeep +0 -0
- package/app/libs/promise-assembler.js +0 -169
- package/app/models/.gitkeep +0 -0
- package/app/routes/.gitkeep +0 -0
- package/app/routes/model-types.js +0 -47
- package/app/routes/promise-tree.js +0 -48
- package/app/routes/records.js +0 -55
- package/app/routes/render-tree.js +0 -66
- package/app/services/adapters/websocket.js +0 -31
- package/app/services/layout.js +0 -39
- package/app/services/port.js +0 -90
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.143.143ca772b0b28102c74a.js +0 -28
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.178.b50e140d1ed8777b583e.js +0 -9
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Bold.woff +0 -0
- package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Bold.woff2 +0 -0
- package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Regular.woff +0 -0
- package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Regular.woff2 +0 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.143.143ca772b0b28102c74a.js +0 -28
- package/dist/chrome/panes-3-16-0/assets/chunk.178.b50e140d1ed8777b583e.js +0 -9
- package/dist/chrome/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/chrome/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Bold.woff +0 -0
- package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Bold.woff2 +0 -0
- package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Regular.woff +0 -0
- package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Regular.woff2 +0 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.143.143ca772b0b28102c74a.js +0 -28
- package/dist/firefox/panes-3-16-0/assets/chunk.178.b50e140d1ed8777b583e.js +0 -9
- package/dist/firefox/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/firefox/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Bold.woff +0 -0
- package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Bold.woff2 +0 -0
- package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Regular.woff +0 -0
- package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Regular.woff2 +0 -0
- package/dist/websocket/assets/chunk.143.143ca772b0b28102c74a.js +0 -28
- package/dist/websocket/assets/chunk.178.b50e140d1ed8777b583e.js +0 -9
- package/dist/websocket/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/websocket/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/websocket/assets/fonts/Inter-Bold.woff +0 -0
- package/dist/websocket/assets/fonts/Inter-Bold.woff2 +0 -0
- package/dist/websocket/assets/fonts/Inter-Regular.woff +0 -0
- package/dist/websocket/assets/fonts/Inter-Regular.woff2 +0 -0
- package/ember_debug/.eslintrc.js +0 -13
- package/ember_debug/utils/ember/debug.js +0 -20
- package/ember_debug/utils/ember/instrumentation.js +0 -11
- package/ember_debug/utils/ember/loader.js +0 -22
- package/ember_debug/utils/rsvp.js +0 -20
- package/ember_debug/vendor/loader.js +0 -54
- package/ember_debug/vendor/startup-wrapper.js +0 -399
- package/lib/ui/addon/styles/_object-inspector-toggle.scss +0 -12
- package/lib/ui/addon/styles/addon.scss +0 -13
- package/lib/ui/addon/styles/toolbar/_icon-button.scss +0 -61
- 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/public/assets/fonts/Inter-Bold.woff +0 -0
- package/public/assets/fonts/Inter-Bold.woff2 +0 -0
- package/public/assets/fonts/Inter-Regular.woff +0 -0
- package/public/assets/fonts/Inter-Regular.woff2 +0 -0
- package/tests/helpers/trigger-port.js +0 -6
- package/tests/unit/.gitkeep +0 -0
- /package/app/{app.js → app.ts} +0 -0
- /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}/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}/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}/send-to-console.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-search-field.js +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/warning-message.hbs +0 -0
- /package/app/controllers/{info.js → info.ts} +0 -0
- /package/app/services/adapters/{firefox.js → firefox.ts} +0 -0
- /package/{lib/ui/addon/styles → app/styles/ui}/_goto-source.scss +0 -0
- /package/{lib/ui/addon/styles → app/styles/ui}/_warning.scss +0 -0
- /package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_divider.scss +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/* globals chrome */
|
|
2
|
-
import { computed } from '@ember/object';
|
|
3
1
|
import { tracked } from '@glimmer/tracking';
|
|
4
2
|
|
|
5
3
|
import BasicAdapter from './basic';
|
|
6
4
|
import config from 'ember-inspector/config/environment';
|
|
5
|
+
import type { Message } from '../port';
|
|
7
6
|
|
|
8
|
-
let emberDebug = null;
|
|
7
|
+
let emberDebug: string | null = null;
|
|
9
8
|
|
|
10
9
|
export default class WebExtension extends BasicAdapter {
|
|
11
10
|
@tracked canOpenResource = false;
|
|
@@ -13,27 +12,30 @@ export default class WebExtension extends BasicAdapter {
|
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Called when the adapter is created.
|
|
16
|
-
*
|
|
17
|
-
* @method init
|
|
18
15
|
*/
|
|
19
|
-
|
|
16
|
+
constructor(...args: unknown[]) {
|
|
17
|
+
// @ts-expect-error ignore
|
|
18
|
+
super(...args);
|
|
19
|
+
|
|
20
20
|
this._connect();
|
|
21
21
|
this._handleReload();
|
|
22
22
|
this._setThemeColors();
|
|
23
23
|
|
|
24
|
-
Promise.resolve().then(() => this._sendEmberDebug());
|
|
25
|
-
|
|
26
|
-
return super.init(...arguments);
|
|
24
|
+
void Promise.resolve().then(() => this._sendEmberDebug());
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
sendMessage(
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
sendMessage(message?: Partial<Message>) {
|
|
28
|
+
if (message) {
|
|
29
|
+
message.tabId = chrome.devtools.inspectedWindow.tabId;
|
|
30
|
+
}
|
|
31
|
+
this._chromePort.postMessage(message ?? {});
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
_sendEmberDebug() {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
const minimumVersion = config.emberVersionsSupported[0].replace(/\./g, '-');
|
|
36
|
+
const url = chrome.runtime.getURL(
|
|
37
|
+
`/panes-${minimumVersion}/ember_debug.js`,
|
|
38
|
+
);
|
|
37
39
|
// first send to all frames in current tab
|
|
38
40
|
this.sendMessage({
|
|
39
41
|
from: 'devtools',
|
|
@@ -44,23 +46,23 @@ export default class WebExtension extends BasicAdapter {
|
|
|
44
46
|
this.onMessageReceived((message, sender) => {
|
|
45
47
|
if (message === 'ember-content-script-ready') {
|
|
46
48
|
this.sendMessage({
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
|
|
50
|
+
frameId: sender.frameId,
|
|
47
51
|
from: 'devtools',
|
|
52
|
+
tabId: chrome.devtools.inspectedWindow.tabId,
|
|
48
53
|
type: 'inject-ember-debug',
|
|
49
54
|
value: url,
|
|
50
|
-
tabId: chrome.devtools.inspectedWindow.tabId,
|
|
51
|
-
frameId: sender.frameId,
|
|
52
55
|
});
|
|
53
56
|
}
|
|
54
57
|
});
|
|
55
58
|
}
|
|
56
59
|
|
|
57
|
-
@computed
|
|
58
60
|
get _chromePort() {
|
|
59
61
|
return chrome.runtime.connect();
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
_connect() {
|
|
63
|
-
|
|
65
|
+
const chromePort = this._chromePort;
|
|
64
66
|
chromePort.postMessage({ appId: chrome.devtools.inspectedWindow.tabId });
|
|
65
67
|
|
|
66
68
|
chromePort.onMessage.addListener((...args) => {
|
|
@@ -68,36 +70,38 @@ export default class WebExtension extends BasicAdapter {
|
|
|
68
70
|
});
|
|
69
71
|
|
|
70
72
|
chromePort.onDisconnect.addListener(() => {
|
|
71
|
-
this.notifyPropertyChange('_chromePort');
|
|
72
73
|
this._connect();
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
_handleReload() {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
location.reload(true);
|
|
78
|
+
chrome.devtools.network.onNavigated.addListener(() => {
|
|
79
|
+
this._injectDebugger();
|
|
80
|
+
location.reload();
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
_injectDebugger() {
|
|
85
|
-
loadEmberDebug().then((emberDebug) => {
|
|
86
|
-
chrome.devtools.inspectedWindow.eval(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
void loadEmberDebug().then((emberDebug) => {
|
|
86
|
+
chrome.devtools.inspectedWindow.eval(
|
|
87
|
+
emberDebug as string,
|
|
88
|
+
(success, error) => {
|
|
89
|
+
if (success === undefined && error) {
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
);
|
|
91
95
|
});
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
_setThemeColors() {
|
|
95
99
|
// Remove old theme colors to ensure switching themes works
|
|
96
|
-
document.body.classList.remove('theme
|
|
100
|
+
document.body.classList.remove('theme-light', 'theme-dark');
|
|
97
101
|
|
|
98
|
-
let theme = 'theme
|
|
102
|
+
let theme = 'theme-light';
|
|
99
103
|
if (chrome.devtools.panels.themeName === 'dark') {
|
|
100
|
-
theme = 'theme
|
|
104
|
+
theme = 'theme-dark';
|
|
101
105
|
}
|
|
102
106
|
document.body.classList.add(theme);
|
|
103
107
|
}
|
|
@@ -108,11 +112,8 @@ export default class WebExtension extends BasicAdapter {
|
|
|
108
112
|
|
|
109
113
|
/**
|
|
110
114
|
* Open the devtools "Elements" or "Sources" tab and select a specific DOM node or function.
|
|
111
|
-
*
|
|
112
|
-
* @method inspectJSValue
|
|
113
|
-
* @param {String} name
|
|
114
115
|
*/
|
|
115
|
-
inspectJSValue(name) {
|
|
116
|
+
inspectJSValue(name: string) {
|
|
116
117
|
chrome.devtools.inspectedWindow.eval(`
|
|
117
118
|
inspect(window[${JSON.stringify(name)}]);
|
|
118
119
|
delete window[${JSON.stringify(name)}];
|
|
@@ -121,14 +122,11 @@ export default class WebExtension extends BasicAdapter {
|
|
|
121
122
|
|
|
122
123
|
/**
|
|
123
124
|
* Redirect to the correct inspector version.
|
|
124
|
-
*
|
|
125
|
-
* @method onVersionMismatch
|
|
126
|
-
* @param {String} goToVersion
|
|
127
125
|
*/
|
|
128
|
-
onVersionMismatch(goToVersion) {
|
|
126
|
+
onVersionMismatch(goToVersion: string) {
|
|
129
127
|
window.location.href = `../panes-${goToVersion.replace(
|
|
130
128
|
/\./g,
|
|
131
|
-
'-'
|
|
129
|
+
'-',
|
|
132
130
|
)}/index.html`;
|
|
133
131
|
}
|
|
134
132
|
|
|
@@ -137,22 +135,24 @@ export default class WebExtension extends BasicAdapter {
|
|
|
137
135
|
scripts as soon as possible into the new page.
|
|
138
136
|
*/
|
|
139
137
|
reloadTab() {
|
|
140
|
-
loadEmberDebug().then((emberDebug) => {
|
|
141
|
-
chrome.devtools.inspectedWindow.reload({
|
|
138
|
+
void loadEmberDebug().then((emberDebug) => {
|
|
139
|
+
chrome.devtools.inspectedWindow.reload({
|
|
140
|
+
injectedScript: emberDebug as string,
|
|
141
|
+
});
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
function loadEmberDebug() {
|
|
147
|
-
|
|
148
|
-
let xhr;
|
|
147
|
+
const minimumVersion = config.emberVersionsSupported[0].replace(/\./g, '-');
|
|
148
|
+
let xhr: XMLHttpRequest;
|
|
149
149
|
|
|
150
150
|
return new Promise((resolve) => {
|
|
151
151
|
if (!emberDebug) {
|
|
152
152
|
xhr = new XMLHttpRequest();
|
|
153
153
|
xhr.open(
|
|
154
154
|
'GET',
|
|
155
|
-
chrome.runtime.getURL(`/panes-${minimumVersion}/ember_debug.js`)
|
|
155
|
+
chrome.runtime.getURL(`/panes-${minimumVersion}/ember_debug.js`),
|
|
156
156
|
);
|
|
157
157
|
xhr.onload = function () {
|
|
158
158
|
if (xhr.readyState === 4) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access */
|
|
2
|
+
import { run } from '@ember/runloop';
|
|
3
|
+
import BasicAdapter from './basic';
|
|
4
|
+
import type { Message } from '../port';
|
|
5
|
+
|
|
6
|
+
export default class Websocket extends BasicAdapter {
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
|
+
socket: any;
|
|
9
|
+
|
|
10
|
+
constructor() {
|
|
11
|
+
// @ts-expect-error Using ...arguments is fine.
|
|
12
|
+
// eslint-disable-next-line prefer-rest-params
|
|
13
|
+
super(...arguments);
|
|
14
|
+
// @ts-expect-error TODO: figure out how to type this stuff
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
16
|
+
this.socket = window.EMBER_INSPECTOR_CONFIG.remoteDebugSocket;
|
|
17
|
+
this._connect();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
sendMessage(message?: Partial<Message>) {
|
|
21
|
+
this.socket.emit('emberInspectorMessage', message ?? {});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_connect() {
|
|
25
|
+
this.socket.on('emberInspectorMessage', (message: Message) => {
|
|
26
|
+
// eslint-disable-next-line ember/no-runloop
|
|
27
|
+
run(() => {
|
|
28
|
+
this._messageReceived(message);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
_disconnect() {
|
|
34
|
+
this.socket.removeAllListeners('emberInspectorMessage');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
willDestroy() {
|
|
38
|
+
this._disconnect();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout service used to broadcast changes to the application's
|
|
3
|
+
* layout due to resizing of the main nav or the object inspector toggling.
|
|
4
|
+
*
|
|
5
|
+
* Whenever something resizes it triggers an event on this service. For example
|
|
6
|
+
* when the main nav is resized.
|
|
7
|
+
* Elements dependant on the app's layout listen to events on this service. For
|
|
8
|
+
* example the `list` component.
|
|
9
|
+
*/
|
|
10
|
+
import Service from '@ember/service';
|
|
11
|
+
import { action } from '@ember/object';
|
|
12
|
+
import { tracked } from '@glimmer/tracking';
|
|
13
|
+
import { addListener, removeListener, sendEvent } from '@ember/object/events';
|
|
14
|
+
import type { AnyFn } from '@ember/-internals/utility-types';
|
|
15
|
+
import { schedule } from '@ember/runloop';
|
|
16
|
+
|
|
17
|
+
export default class LayoutService extends Service {
|
|
18
|
+
@tracked inspectorExpanded = false;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Stores the app's content height. This property is kept up-to-date
|
|
22
|
+
* by the `monitor-content-height` component.
|
|
23
|
+
*/
|
|
24
|
+
@tracked contentHeight: number | null = null;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* This is called by `monitor-content-height` whenever a window resize is detected
|
|
28
|
+
* and the app's content height has changed. We therefore update the
|
|
29
|
+
* `contentHeight` property and notify all listeners (mostly lists).
|
|
30
|
+
*
|
|
31
|
+
* @param height The new app content height
|
|
32
|
+
*/
|
|
33
|
+
updateContentHeight(height: number) {
|
|
34
|
+
this.contentHeight = height;
|
|
35
|
+
this.trigger('content-height-update', height);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Manually implement Evented functionality, so we can move away from the mixin
|
|
39
|
+
|
|
40
|
+
on(eventName: string, method: AnyFn): void;
|
|
41
|
+
on(eventName: string, target: unknown, method: AnyFn): void;
|
|
42
|
+
|
|
43
|
+
@action
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
45
|
+
on(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn): void {
|
|
46
|
+
if (typeof targetOrMethod === 'function') {
|
|
47
|
+
// If we did not pass a target, default to `this`
|
|
48
|
+
addListener(this, eventName, this, targetOrMethod as AnyFn);
|
|
49
|
+
} else {
|
|
50
|
+
addListener(this, eventName, targetOrMethod as object, method);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
one(eventName: string, method: AnyFn): void;
|
|
55
|
+
one(eventName: string, target: unknown, method: AnyFn): void;
|
|
56
|
+
|
|
57
|
+
@action
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
59
|
+
one(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn) {
|
|
60
|
+
if (typeof targetOrMethod === 'function') {
|
|
61
|
+
// If we did not pass a target, default to `this`
|
|
62
|
+
addListener(this, eventName, this, targetOrMethod as AnyFn, true);
|
|
63
|
+
} else {
|
|
64
|
+
addListener(this, eventName, targetOrMethod as object, method, true);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
off(eventName: string, method: AnyFn): void;
|
|
69
|
+
off(eventName: string, target: unknown, method: AnyFn): void;
|
|
70
|
+
|
|
71
|
+
@action
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
73
|
+
off(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn) {
|
|
74
|
+
try {
|
|
75
|
+
if (typeof targetOrMethod === 'function') {
|
|
76
|
+
// If we did not pass a target, default to `this`
|
|
77
|
+
removeListener(this, eventName, this, targetOrMethod as AnyFn);
|
|
78
|
+
} else {
|
|
79
|
+
removeListener(this, eventName, targetOrMethod as object, method);
|
|
80
|
+
}
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.error(e);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@action
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
88
|
+
trigger(eventName: string, ...args: Array<any>) {
|
|
89
|
+
sendEvent(this, eventName, args);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@action
|
|
93
|
+
showInspector() {
|
|
94
|
+
if (this.inspectorExpanded === false) {
|
|
95
|
+
this.inspectorExpanded = true;
|
|
96
|
+
// Broadcast that tables have been resized (used by `x-list`).
|
|
97
|
+
// eslint-disable-next-line ember/no-runloop
|
|
98
|
+
schedule('afterRender', () => {
|
|
99
|
+
this.trigger('resize', { source: 'object-inspector' });
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@action
|
|
105
|
+
hideInspector() {
|
|
106
|
+
if (this.inspectorExpanded === true) {
|
|
107
|
+
this.inspectorExpanded = false;
|
|
108
|
+
// Broadcast that tables have been resized (used by `x-list`).
|
|
109
|
+
// eslint-disable-next-line ember/no-runloop
|
|
110
|
+
schedule('afterRender', () => {
|
|
111
|
+
this.trigger('resize', { source: 'object-inspector' });
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@action
|
|
117
|
+
toggleInspector() {
|
|
118
|
+
if (this.inspectorExpanded) {
|
|
119
|
+
this.hideInspector();
|
|
120
|
+
} else {
|
|
121
|
+
this.showInspector();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { action, set, setProperties } from '@ember/object';
|
|
2
|
+
import { addListener, removeListener, sendEvent } from '@ember/object/events';
|
|
3
|
+
import { hasListeners } from '@ember/-internals/metal';
|
|
4
|
+
import Service, { inject as service } from '@ember/service';
|
|
5
|
+
import type RouterService from '@ember/routing/router-service';
|
|
6
|
+
|
|
7
|
+
import type WebExtension from './adapters/web-extension';
|
|
8
|
+
import type { AnyFn } from '@ember/-internals/utility-types';
|
|
9
|
+
|
|
10
|
+
export interface ModelType {
|
|
11
|
+
columns: Array<{ name: string; desc: string }>;
|
|
12
|
+
count: number;
|
|
13
|
+
name: string;
|
|
14
|
+
objectId: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface RecordType {
|
|
18
|
+
color: string;
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
columnValues: any;
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
+
filterValues: any;
|
|
23
|
+
objectId: string;
|
|
24
|
+
searchIndex: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This interface is a catch-all of a bunch of things we
|
|
29
|
+
* pass around via messages.
|
|
30
|
+
*/
|
|
31
|
+
export interface Message {
|
|
32
|
+
applicationId: string;
|
|
33
|
+
applicationName: string;
|
|
34
|
+
count: number;
|
|
35
|
+
filters: Array<unknown>;
|
|
36
|
+
frameId?: string;
|
|
37
|
+
from: string;
|
|
38
|
+
index: number;
|
|
39
|
+
instrumentWithStack?: boolean;
|
|
40
|
+
modelTypes: Array<ModelType>;
|
|
41
|
+
name?: string;
|
|
42
|
+
objectId?: string;
|
|
43
|
+
promiseId?: string;
|
|
44
|
+
records: Array<RecordType>;
|
|
45
|
+
shouldHighlightRender?: boolean;
|
|
46
|
+
tabId?: number;
|
|
47
|
+
type: string;
|
|
48
|
+
unloading?: boolean;
|
|
49
|
+
value: string;
|
|
50
|
+
version?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default class PortService extends Service {
|
|
54
|
+
@service declare adapter: WebExtension;
|
|
55
|
+
@service declare router: RouterService;
|
|
56
|
+
|
|
57
|
+
applicationId?: string;
|
|
58
|
+
applicationName?: string;
|
|
59
|
+
detectedApplications: { [key: string]: string };
|
|
60
|
+
|
|
61
|
+
constructor() {
|
|
62
|
+
// eslint-disable-next-line prefer-rest-params
|
|
63
|
+
super(...arguments);
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
* A dictionary of the form:
|
|
67
|
+
* { applicationId: applicationName }
|
|
68
|
+
*/
|
|
69
|
+
this.detectedApplications = {};
|
|
70
|
+
this.applicationId = undefined;
|
|
71
|
+
this.applicationName = undefined;
|
|
72
|
+
|
|
73
|
+
this.adapter.onMessageReceived(
|
|
74
|
+
(message: Message & { apps: Array<Message> }) => {
|
|
75
|
+
if (message.type === 'apps-loaded') {
|
|
76
|
+
message.apps.forEach(
|
|
77
|
+
({ applicationId, applicationName }: Message) => {
|
|
78
|
+
set(this.detectedApplications, applicationId, applicationName);
|
|
79
|
+
},
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const { applicationId, applicationName } = message;
|
|
86
|
+
|
|
87
|
+
if (!applicationId) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// save the application, in case we haven't seen it yet
|
|
92
|
+
set(this.detectedApplications, applicationId, applicationName);
|
|
93
|
+
|
|
94
|
+
if (!this.applicationId) {
|
|
95
|
+
this.selectApplication(applicationId);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (this.applicationId === applicationId) {
|
|
99
|
+
if (!hasListeners(this, message.type)) {
|
|
100
|
+
throw new Error('unknown message type ' + message.type);
|
|
101
|
+
}
|
|
102
|
+
this.trigger(message.type, message, applicationId);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
addListener(
|
|
108
|
+
this,
|
|
109
|
+
'view:inspectJSValue',
|
|
110
|
+
this,
|
|
111
|
+
({ name }: { name: string }) => this.adapter.inspectJSValue(name),
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
selectApplication(applicationId: string) {
|
|
116
|
+
if (
|
|
117
|
+
applicationId in this.detectedApplications &&
|
|
118
|
+
applicationId !== this.applicationId
|
|
119
|
+
) {
|
|
120
|
+
const applicationName = this.detectedApplications[
|
|
121
|
+
applicationId
|
|
122
|
+
] as string;
|
|
123
|
+
const currentApplication = this.applicationId;
|
|
124
|
+
setProperties(this, { applicationId, applicationName });
|
|
125
|
+
if (currentApplication) {
|
|
126
|
+
// this is only required when switching apps
|
|
127
|
+
this.router.transitionTo('app-detected');
|
|
128
|
+
}
|
|
129
|
+
this.send('app-selected', { applicationId, applicationName });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@action
|
|
134
|
+
send(type: string, message?: Partial<Message>) {
|
|
135
|
+
message = message || {};
|
|
136
|
+
message.type = type;
|
|
137
|
+
message.from = 'devtools';
|
|
138
|
+
message.applicationId = this.applicationId as string;
|
|
139
|
+
message.applicationName = this.applicationName as string;
|
|
140
|
+
this.adapter.sendMessage(message);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Manually implement Evented functionality, so we can move away from the mixin
|
|
144
|
+
|
|
145
|
+
on(eventName: string, method: AnyFn): void;
|
|
146
|
+
on(eventName: string, target: unknown, method: AnyFn): void;
|
|
147
|
+
|
|
148
|
+
@action
|
|
149
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
150
|
+
on(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn): void {
|
|
151
|
+
if (typeof targetOrMethod === 'function') {
|
|
152
|
+
// If we did not pass a target, default to `this`
|
|
153
|
+
addListener(this, eventName, this, targetOrMethod as AnyFn);
|
|
154
|
+
} else {
|
|
155
|
+
addListener(this, eventName, targetOrMethod as object, method);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
one(eventName: string, method: AnyFn): void;
|
|
160
|
+
one(eventName: string, target: unknown, method: AnyFn): void;
|
|
161
|
+
|
|
162
|
+
@action
|
|
163
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
164
|
+
one(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn) {
|
|
165
|
+
if (typeof targetOrMethod === 'function') {
|
|
166
|
+
// If we did not pass a target, default to `this`
|
|
167
|
+
addListener(this, eventName, this, targetOrMethod as AnyFn, true);
|
|
168
|
+
} else {
|
|
169
|
+
addListener(this, eventName, targetOrMethod as object, method, true);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
off(eventName: string, method: AnyFn): void;
|
|
174
|
+
off(eventName: string, target: unknown, method: AnyFn): void;
|
|
175
|
+
|
|
176
|
+
@action
|
|
177
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
178
|
+
off(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn) {
|
|
179
|
+
try {
|
|
180
|
+
if (typeof targetOrMethod === 'function') {
|
|
181
|
+
// If we did not pass a target, default to `this`
|
|
182
|
+
removeListener(this, eventName, this, targetOrMethod as AnyFn);
|
|
183
|
+
} else {
|
|
184
|
+
removeListener(this, eventName, targetOrMethod as object, method);
|
|
185
|
+
}
|
|
186
|
+
} catch (e) {
|
|
187
|
+
console.error(e);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@action
|
|
192
|
+
trigger(eventName: string, ...args: Array<unknown>) {
|
|
193
|
+
sendEvent(this, eventName, args);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -6,51 +6,38 @@ export let LOCAL_STORAGE_SUPPORTED = false;
|
|
|
6
6
|
* Service that wraps local storage. Only store strings. This
|
|
7
7
|
* is not intended to be used directly, use StorageServeice
|
|
8
8
|
* instead.
|
|
9
|
-
*
|
|
10
|
-
* @class LocalStorageService
|
|
11
|
-
* @extends Service
|
|
12
9
|
*/
|
|
13
10
|
export default class LocalStorageService extends Service {
|
|
14
11
|
/**
|
|
15
12
|
* Reads a stored string for a give key, if any.
|
|
16
13
|
*
|
|
17
|
-
* @method getItem
|
|
18
|
-
* @param {String} key
|
|
19
14
|
* @return {Option<String>} The value, if found
|
|
20
15
|
*/
|
|
21
|
-
getItem(key) {
|
|
16
|
+
getItem(key: string) {
|
|
22
17
|
return localStorage.getItem(key);
|
|
23
18
|
}
|
|
24
19
|
|
|
25
20
|
/**
|
|
26
21
|
* Store a string for a given key.
|
|
27
|
-
*
|
|
28
|
-
* @method setItem
|
|
29
|
-
* @param {String} key
|
|
30
|
-
* @param {String} value
|
|
31
22
|
*/
|
|
32
|
-
setItem(key, value) {
|
|
23
|
+
setItem(key: string, value: string) {
|
|
33
24
|
localStorage.setItem(key, value);
|
|
34
25
|
}
|
|
35
26
|
|
|
36
27
|
/**
|
|
37
28
|
* Deletes the stored string for a given key.
|
|
38
|
-
*
|
|
39
|
-
* @method removeItem
|
|
40
|
-
* @param {String} key
|
|
41
29
|
*/
|
|
42
|
-
removeItem(key) {
|
|
30
|
+
removeItem(key: string) {
|
|
43
31
|
localStorage.removeItem(key);
|
|
44
32
|
}
|
|
45
33
|
|
|
46
34
|
/**
|
|
47
35
|
* Returns the list of stored keys.
|
|
48
36
|
*
|
|
49
|
-
* @
|
|
50
|
-
* @return {Array<String>} The array of keys
|
|
37
|
+
* @return The array of keys
|
|
51
38
|
*/
|
|
52
39
|
keys() {
|
|
53
|
-
|
|
40
|
+
const keys = [];
|
|
54
41
|
for (let i = 0; i < localStorage.length; i++) {
|
|
55
42
|
keys.push(localStorage.key(i));
|
|
56
43
|
}
|
|
@@ -61,12 +48,12 @@ export default class LocalStorageService extends Service {
|
|
|
61
48
|
try {
|
|
62
49
|
localStorage.setItem('test', 'testing');
|
|
63
50
|
LOCAL_STORAGE_SUPPORTED = localStorage.getItem('test') === 'testing';
|
|
64
|
-
} catch
|
|
51
|
+
} catch {
|
|
65
52
|
// ignore
|
|
66
53
|
} finally {
|
|
67
54
|
try {
|
|
68
55
|
localStorage.removeItem('test');
|
|
69
|
-
} catch
|
|
56
|
+
} catch {
|
|
70
57
|
// ignore
|
|
71
58
|
}
|
|
72
59
|
}
|
|
@@ -4,29 +4,22 @@ import Service from '@ember/service';
|
|
|
4
4
|
* Service that wraps an in-memory object with the same APIs as
|
|
5
5
|
* the LocalStorageService, usually as a fallback. Only store
|
|
6
6
|
* strings. This is not intended to be used directly, use
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @class MemoryStorageService
|
|
10
|
-
* @extends Service
|
|
7
|
+
* StorageService instead.
|
|
11
8
|
*/
|
|
12
9
|
export default class MemoryStorageService extends Service {
|
|
13
10
|
/**
|
|
14
11
|
* Where data is stored.
|
|
15
12
|
*
|
|
16
|
-
* @property store
|
|
17
|
-
* @type {Object}
|
|
18
13
|
* @private
|
|
19
14
|
*/
|
|
20
|
-
store = Object.create(null)
|
|
15
|
+
store = Object.create(null) as Record<string, unknown>;
|
|
21
16
|
|
|
22
17
|
/**
|
|
23
18
|
* Reads a stored string for a give key, if any.
|
|
24
19
|
*
|
|
25
|
-
* @method getItem
|
|
26
|
-
* @param {String} key
|
|
27
20
|
* @return {Option<String>} The value, if found
|
|
28
21
|
*/
|
|
29
|
-
getItem(key) {
|
|
22
|
+
getItem(key: keyof object) {
|
|
30
23
|
if (key in this.store) {
|
|
31
24
|
return this.store[key];
|
|
32
25
|
} else {
|
|
@@ -36,30 +29,22 @@ export default class MemoryStorageService extends Service {
|
|
|
36
29
|
|
|
37
30
|
/**
|
|
38
31
|
* Store a string for a given key.
|
|
39
|
-
*
|
|
40
|
-
* @method setItem
|
|
41
|
-
* @param {String} key
|
|
42
|
-
* @param {String} value
|
|
43
32
|
*/
|
|
44
|
-
setItem(key, value) {
|
|
33
|
+
setItem(key: keyof object, value: unknown) {
|
|
45
34
|
this.store[key] = value;
|
|
46
35
|
}
|
|
47
36
|
|
|
48
37
|
/**
|
|
49
38
|
* Deletes the stored string for a given key.
|
|
50
|
-
*
|
|
51
|
-
* @method removeItem
|
|
52
|
-
* @param {String} key
|
|
53
39
|
*/
|
|
54
|
-
removeItem(key) {
|
|
40
|
+
removeItem(key: keyof object) {
|
|
55
41
|
delete this.store[key];
|
|
56
42
|
}
|
|
57
43
|
|
|
58
44
|
/**
|
|
59
45
|
* Returns the list of stored keys.
|
|
60
46
|
*
|
|
61
|
-
* @
|
|
62
|
-
* @return {Array<String>} The array of keys
|
|
47
|
+
* @return The array of keys
|
|
63
48
|
*/
|
|
64
49
|
keys() {
|
|
65
50
|
return Object.keys(this.store);
|