mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(core): move profile_types.ts to primtives
move profile_types.ts so the types can be used in Wiz code
(cherry picked from commit cf47ce2db9)
This commit is contained in:
parent
6d6fda8610
commit
e69ada4ceb
21 changed files with 47 additions and 16 deletions
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
import {ɵProfilerEvent} from '@angular/core';
|
||||
|
||||
import {getDirectiveHostElement} from '../../directive-forest';
|
||||
import {ngDebugClient} from '../../ng-debug-api/ng-debug-api';
|
||||
import {runOutsideAngular} from '../../utils';
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ ng_project(
|
|||
"//packages/core/primitives/di",
|
||||
"//packages/core/primitives/dom-navigation",
|
||||
"//packages/core/primitives/event-dispatch",
|
||||
"//packages/core/primitives/profiler",
|
||||
"//packages/core/primitives/signals",
|
||||
"//packages/core/src/compiler",
|
||||
"//packages/core/src/di/interface",
|
||||
|
|
|
|||
24
packages/core/primitives/profiler/BUILD.bazel
Normal file
24
packages/core/primitives/profiler/BUILD.bazel
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
load("//tools:defaults.bzl", "ts_project")
|
||||
|
||||
package(default_visibility = [
|
||||
"//packages:__pkg__",
|
||||
"//packages/core:__subpackages__",
|
||||
])
|
||||
|
||||
ts_project(
|
||||
name = "profiler",
|
||||
srcs = glob(
|
||||
[
|
||||
"**/*.ts",
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "files_for_docgen",
|
||||
srcs = glob([
|
||||
"*.ts",
|
||||
"src/**/*.ts",
|
||||
]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
3
packages/core/primitives/profiler/README.md
Normal file
3
packages/core/primitives/profiler/README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Angular Profiler Types
|
||||
|
||||
This directory contains types related to the [Angular Devtools Profiler](https://angular.dev/tools/devtools/profiler). These types are for code that needs to hook into the Angular Devtools Profiler lifecycle.
|
||||
|
|
@ -46,7 +46,7 @@ import {TESTABILITY} from '../testability/testability';
|
|||
import {NgZone} from '../zone/ng_zone';
|
||||
|
||||
import {profiler} from '../render3/profiler';
|
||||
import {ProfilerEvent} from '../render3/profiler_types';
|
||||
import {ProfilerEvent} from '../../primitives/profiler/src/profiler_types';
|
||||
import {EffectScheduler} from '../render3/reactivity/root_effect_scheduler';
|
||||
import {isReactiveLViewConsumer} from '../render3/reactive_lview_consumer';
|
||||
import {ApplicationInitStatus} from './application_init';
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import {ApplicationRef} from './application_ref';
|
|||
import {provideZonelessChangeDetectionInternal} from '../change_detection/scheduling/zoneless_scheduling_impl';
|
||||
import {bootstrap} from '../platform/bootstrap';
|
||||
import {profiler} from '../render3/profiler';
|
||||
import {ProfilerEvent} from '../render3/profiler_types';
|
||||
import {ProfilerEvent} from '../../primitives/profiler/src/profiler_types';
|
||||
import {errorHandlerEnvironmentInitializer} from '../error_handler';
|
||||
import {RuntimeError, RuntimeErrorCode} from '../errors';
|
||||
import {PlatformRef} from '../platform/platform_ref';
|
||||
|
|
|
|||
|
|
@ -273,7 +273,10 @@ export {
|
|||
} from './render3/jit/partial';
|
||||
export {compilePipe as ɵcompilePipe} from './render3/jit/pipe';
|
||||
export {isNgModule as ɵisNgModule} from './render3/jit/util';
|
||||
export {Profiler as ɵProfiler, ProfilerEvent as ɵProfilerEvent} from './render3/profiler_types';
|
||||
export {
|
||||
Profiler as ɵProfiler,
|
||||
ProfilerEvent as ɵProfilerEvent,
|
||||
} from '../primitives/profiler/src/profiler_types';
|
||||
export {
|
||||
FrameworkAgnosticGlobalUtils as ɵFrameworkAgnosticGlobalUtils,
|
||||
GlobalDevModeUtils as ɵGlobalDevModeUtils,
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ import {
|
|||
getTemplateIndexForState,
|
||||
} from './utils';
|
||||
import {profiler} from '../render3/profiler';
|
||||
import {ProfilerEvent} from '../render3/profiler_types';
|
||||
import {ProfilerEvent} from '../../primitives/profiler/src/profiler_types';
|
||||
import {addLViewToLContainer, removeLViewFromLContainer} from '../render3/view/container';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import {type DestroyRef} from '../../linker/destroy_ref';
|
|||
import {NgZone} from '../../zone';
|
||||
import {AFTER_RENDER_SEQUENCES_TO_ADD, FLAGS, LView, LViewFlags} from '../interfaces/view';
|
||||
import {profiler} from '../profiler';
|
||||
import {ProfilerEvent} from '../profiler_types';
|
||||
import {ProfilerEvent} from '../../../primitives/profiler/src/profiler_types';
|
||||
import {markAncestorsForTraversal} from '../util/view_utils';
|
||||
import {AfterRenderPhase, AfterRenderRef} from './api';
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ import {
|
|||
stringifyCSSSelectorList,
|
||||
} from './node_selector_matcher';
|
||||
import {profiler} from './profiler';
|
||||
import {ProfilerEvent} from './profiler_types';
|
||||
import {ProfilerEvent} from '../../primitives/profiler/src/profiler_types';
|
||||
import {executeContentQueries} from './queries/query_execution';
|
||||
import {enterView, leaveView} from './state';
|
||||
import {debugStringifyTypeForError, stringifyForError} from './util/stringify_utils';
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {isTypeProvider} from '../../di/provider_collection';
|
|||
import {assertDefined, assertEqual} from '../../util/assert';
|
||||
import {performanceMarkFeature} from '../../util/performance';
|
||||
import {setProfiler} from '../profiler';
|
||||
import {Profiler, ProfilerEvent} from '../profiler_types';
|
||||
import {Profiler, ProfilerEvent} from '../../../primitives/profiler/src/profiler_types';
|
||||
import {stringifyForError} from '../util/stringify_utils';
|
||||
import {
|
||||
InjectorProfiler,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import {
|
|||
TView,
|
||||
} from './interfaces/view';
|
||||
import {profiler} from './profiler';
|
||||
import {ProfilerEvent} from './profiler_types';
|
||||
import {ProfilerEvent} from '../../primitives/profiler/src/profiler_types';
|
||||
import {isInCheckNoChangesMode} from './state';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ import {
|
|||
|
||||
import {isDestroyed} from '../interfaces/type_checks';
|
||||
import {profiler} from '../profiler';
|
||||
import {ProfilerEvent} from '../profiler_types';
|
||||
import {ProfilerEvent} from '../../../primitives/profiler/src/profiler_types';
|
||||
import {executeViewQueryFn, refreshContentQueries} from '../queries/query_execution';
|
||||
import {runEffectsInView} from '../reactivity/view_effect_runner';
|
||||
import {executeTemplate} from './shared';
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import {
|
|||
TView,
|
||||
} from '../interfaces/view';
|
||||
import {profiler} from '../profiler';
|
||||
import {ProfilerEvent} from '../profiler_types';
|
||||
import {ProfilerEvent} from '../../../primitives/profiler/src/profiler_types';
|
||||
import {executeViewQueryFn, refreshContentQueries} from '../queries/query_execution';
|
||||
import {enterView, leaveView} from '../state';
|
||||
import {getComponentLViewByIndex, isCreationMode} from '../util/view_utils';
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ import {
|
|||
import {assertTNodeType} from '../node_assert';
|
||||
import {isNodeMatchingSelectorList} from '../node_selector_matcher';
|
||||
import {profiler} from '../profiler';
|
||||
import {ProfilerEvent} from '../profiler_types';
|
||||
import {ProfilerEvent} from '../../../primitives/profiler/src/profiler_types';
|
||||
import {
|
||||
getCurrentDirectiveIndex,
|
||||
getCurrentTNode,
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ import {
|
|||
} from './interfaces/view';
|
||||
import {assertTNodeType} from './node_assert';
|
||||
import {profiler} from './profiler';
|
||||
import {ProfilerEvent} from './profiler_types';
|
||||
import {ProfilerEvent} from '../../primitives/profiler/src/profiler_types';
|
||||
import {getLViewParent, getNativeByTNode, unwrapRNode} from './util/view_utils';
|
||||
import {allLeavingAnimations} from '../animation/longest_animation';
|
||||
import {Injector} from '../di';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
|
||||
import {type Profiler} from './profiler_types';
|
||||
import {type Profiler} from '../../primitives/profiler/src/profiler_types';
|
||||
|
||||
const profilerCallbacks: Profiler[] = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import {
|
|||
unwrapRNode,
|
||||
} from '../util/view_utils';
|
||||
import {profiler} from '../profiler';
|
||||
import {ProfilerEvent} from '../profiler_types';
|
||||
import {ProfilerEvent} from '../../../primitives/profiler/src/profiler_types';
|
||||
import {markViewDirty} from '../instructions/mark_view_dirty';
|
||||
import type {RElement} from '../interfaces/renderer_dom';
|
||||
import type {GlobalTargetResolver, Renderer} from '../interfaces/renderer';
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ ts_project(
|
|||
"//packages/common/locales",
|
||||
"//packages/compiler",
|
||||
"//packages/core",
|
||||
"//packages/core/primitives/profiler",
|
||||
"//packages/core/primitives/signals",
|
||||
"//packages/core/src/di/interface",
|
||||
"//packages/core/src/util",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import {setProfiler, profiler} from '../../src/render3/profiler';
|
||||
import {ProfilerEvent} from '../../src/render3/profiler_types';
|
||||
import {ProfilerEvent} from '../../primitives/profiler/src/profiler_types';
|
||||
import {TestBed} from '../../testing';
|
||||
|
||||
import {
|
||||
|
|
|
|||
Loading…
Reference in a new issue