| addModuleImportToModuleMigration | |||||||||||||||
addModuleImportToModuleMigration(fileSystem: FileSystem, sourceFile: SourceFile, moduleName: string, src: string)
|
|||||||||||||||
|
Import and add module to specific module path. This is based on the original in Differences:
Parameters :
|
| addPfeDevtoolsProvider |
addPfeDevtoolsProvider(filePath: string, fileContent: string)
|
|
Adds the new ngx-devtools-plugin provider pattern to TypeScript files
that import from The migration performs the following changes:
Returns :
{ needsUpdate: boolean; content: string }
|
| addProviderToDecorator | |||||||||
addProviderToDecorator(sourceFile: SourceFile, decoratorName: string)
|
|||||||||
|
Finds a decorator by name on any class in the source file and adds
Parameters :
Returns :
boolean
|
| addPrefixPfeMigration | ||||||
addPrefixPfeMigration(tree: Tree)
|
||||||
|
Parameters :
Returns :
void
|
| applyPatches | |||||||||
applyPatches(templateText: string, patches)
|
|||||||||
|
Point insertions are order-independent with
Parameters :
Returns :
string
|
| collectTargetRefVars | ||||
collectTargetRefVars(nodes)
|
||||
|
Maps each ref-var name bound to a target element onto that element's members —
The whole node tree is scanned up front (rather than per-scope) because a ref var is visible to its siblings and their descendants, so a read can legitimately precede the declaration in document order. A name declared on both a target and a non-target element is dropped: which element a read resolves to depends on view scoping we do not model.
Parameters :
Returns :
ReadonlyMap<string, ReadonlySet<string>>
|
| isAssignment | ||||||
isAssignment(operation: string)
|
||||||
|
Angular parses
Parameters :
Returns :
boolean
|
| isTwoWayBinding | ||||||
isTwoWayBinding(attribute: TmplAstBoundAttribute)
|
||||||
|
Parameters :
Returns :
boolean
|
| isTwoWayEvent | ||||||
isTwoWayEvent(event: TmplAstBoundEvent)
|
||||||
|
Parameters :
Returns :
boolean
|
| migrateTemplate | |||||||||
migrateTemplate(templateText: string, hostMembers: TemplateMemberSet)
|
|||||||||
|
Rewrites signal-input member reads inside an Angular template (
Reads on template-locals (
Parameters :
Returns :
TemplateMigrationResult
|
| resolveManualItems | |||||||||
resolveManualItems(templateText: string, offsets)
|
|||||||||
|
Parameters :
Returns :
TemplateManualItem[]
|
| toParseErrorItem | ||||||
toParseErrorItem(error: ParseError)
|
||||||
|
Only the first error of a template is reported: the later ones are usually cascade noise from
the same root cause (one unescaped
Parameters :
Returns :
TemplateManualItem
|
| classifyAccess | ||||||
classifyAccess(access: PropertyAccessExpression)
|
||||||
|
Parameters :
Returns :
MemberAction
|
| collectDirectExtenders | ||||||
collectDirectExtenders(sourceFiles: Map)
|
||||||
|
Registry of class name -> the target that class DIRECTLY extends.
Parameters :
Returns :
Map<string, TargetComponent>
|
| collectLocalTargetReferences | ||||||
collectLocalTargetReferences(sourceFile: SourceFile)
|
||||||
|
Maps every local name that refers to a target component onto that component. A namespace
import is keyed on the qualified name (
Parameters :
Returns :
Map<string, TargetComponent>
|
| collectReExportReviewItems | |||||||||
collectReExportReviewItems(sourceFile: SourceFile, filePath: string)
|
|||||||||
|
Reports every re-export of a target component, so the one shape this migration knowingly cannot follow is visible instead of silent. Example :collectLocalTargetReferences matches an import's module specifier against the entry
point verbatim, so
Parameters :
Returns :
ManualReviewItem[]
|
| collectTypeReferenceNames | ||||||
collectTypeReferenceNames(typeNode: Node)
|
||||||
|
A name is returned exactly as written, so a qualified
Parameters :
Returns :
string[]
|
| getComponentDecoratorObject | ||||||
getComponentDecoratorObject(classDecl: ClassDeclaration)
|
||||||
|
Parameters :
|
| getDirectlyExtendedTarget | |||||||||
getDirectlyExtendedTarget(classDecl: ClassDeclaration, localNameToTarget: Map)
|
|||||||||
|
Parameters :
Returns :
TargetComponent | undefined
|
| getReceiverDeclaration | ||||||
getReceiverDeclaration(access: PropertyAccessExpression)
|
||||||
|
Resolves the declaration a receiver binds to —
Parameters :
Returns :
Node | undefined
|
| getStringLikeInitializer | |||||||||
getStringLikeInitializer(objectLiteral: ReturnType, propertyName: string)
|
|||||||||
|
A plain string or no-substitution template literal (both expose
Parameters :
|
| indexDirectlyExtendingComponent | ||||||||||||||||||
indexDirectlyExtendingComponent(classDecl: ClassDeclaration, target: TargetComponent, filePath: string, owners: Map, manualItems)
|
||||||||||||||||||
|
Parameters :
Returns :
void
|
| indexExternalTemplates | ||||||||||||
indexExternalTemplates(sourceFiles: Map, directExtenders: Map, manualItems)
|
||||||||||||
|
Maps each external template path onto the migrated members its component inherits from a target: unlike a ref-var read, such a template carries no clue in the HTML about its owner. Resolution is deliberately shallow — only a class that directly extends an import-gated
target is indexed. A deeper chain is reported rather than guessed at, because following it
would mean resolving base classes across files in a virtual tree where the
Parameters :
Returns :
Map<string, Set<string>>
|
| isDestructuringAssignmentTarget | ||||||
isDestructuringAssignmentTarget(access: PropertyAccessExpression)
|
||||||
|
True when
Parameters :
Returns :
boolean
|
| isThisMemberAccess | |||||||||
isThisMemberAccess(access: PropertyAccessExpression, members: Set)
|
|||||||||
|
Parameters :
Returns :
boolean
|
| mightBeAffected | ||||||
mightBeAffected(fileContent: string)
|
||||||
|
A barrel is admitted via RE_EXPORT_PATTERN because
Parameters :
Returns :
boolean
|
| mightContainTemplateRefVarRead | ||||||
mightContainTemplateRefVarRead(fileContent: string)
|
||||||
|
A file with such an inline template need not import anything from a target entry point — in
an NgModule consumer the module is imported by the NgModule, not by the component using
Parameters :
Returns :
boolean
|
| normalizePath | ||||||
normalizePath(filePath: string)
|
||||||
|
Normalizes a path so index keys and lookup keys compare equal.
Parameters :
Returns :
string
|
| processInlineTemplate | |||||||||||||||
processInlineTemplate(classDecl: ClassDeclaration, members: Set, filePath: string, manualItems)
|
|||||||||||||||
|
Parameters :
Returns :
void
|
| processInstanceAccess | |||||||||||||||
processInstanceAccess(sourceFile: SourceFile, localNameToTarget: Map, filePath: string, manualItems)
|
|||||||||||||||
|
Rewrites
Parameters :
Returns :
void
|
| processSubclass | |||||||||||||||
processSubclass(classDecl: ClassDeclaration, target: TargetComponent, filePath: string, manualItems)
|
|||||||||||||||
|
Parameters :
Returns :
void
|
| processTypeScriptFile | ||||||||||||
processTypeScriptFile(sourceFile: SourceFile, filePath: string, manualItems)
|
||||||||||||
|
Parameters :
Returns :
void
|
| resolveDeclarationTarget | |||||||||
resolveDeclarationTarget(declaration: Node, localNameToTarget: Map)
|
|||||||||
|
Resolves the target a declaration's explicit type annotation refers to. The annotation is decomposed structurally so any class-name constituent is considered:
Types with no explicit annotation (inferred) cannot be matched textually and return
Parameters :
Returns :
TargetComponent | null
|
| resolveSubclassMembers | |||||||||
resolveSubclassMembers(classDecl: ClassDeclaration, target: TargetComponent)
|
|||||||||
|
A member re-declared in the subclass shadows the base-class input — as a property, an
accessor (
Parameters :
Returns :
Set<string>
|
| resolveTemplatePath |
resolveTemplatePath(componentFilePath: string, templateUrl: string)
|
|
Returns :
string
|
| transformAccesses |
transformAccesses(container: Node, matches, filePath: string, manualItems)
|
|
Records the accesses that cannot be migrated automatically, then repeatedly unwraps the
remaining reads ( Termination relies on an unwrapped access classifying as
Returns :
void
|
| updateInputSignalReads | ||||||
updateInputSignalReads(tsSources, htmlSources)
|
||||||
|
Rewrites reads of the inputs that changed from
Parameters :
Returns :
MigrationResult
|
| cliAddPrefixPfeMigration | ||||||
cliAddPrefixPfeMigration(route: string)
|
||||||
|
Parameters :
|
| cliInputSignalReadsMigration | ||||||
cliInputSignalReadsMigration(route: string)
|
||||||
|
Parameters :
Returns :
void
|
| cliOnPageXServiceActivatorsMigration | ||||||
cliOnPageXServiceActivatorsMigration(route: string)
|
||||||
|
Parameters :
|
| cliPathQueryParams | ||||||
cliPathQueryParams(route: string)
|
||||||
|
Parameters :
|
| cliPfeDevtoolsProviderMigration | ||||||
cliPfeDevtoolsProviderMigration(route: string)
|
||||||
|
Parameters :
|
| clone | ||||||
clone<S>(data: S)
|
||||||
Type parameters :
|
||||||
|
Parameters :
Returns :
S
|
| convertHTTPHeaders | ||||
convertHTTPHeaders(errorResponse)
|
||||
|
The headers of an HttpErrorResponse are stored as a map. This function converts them to an object so that JSONPath expressions can be used against them.
Parameters :
Returns :
HTTPResponseHeaders
|
| crawlDirectoryAndCollectPaths | |||||||||
crawlDirectoryAndCollectPaths(basePath: string, extensions)
|
|||||||||
|
Parameters :
Returns :
string[]
|
| crawlJsonc | ||||||
crawlJsonc(data: JsonValue)
|
||||||
|
Parameters :
Returns :
{ transformed: JsonValue; hasChanges: boolean }
|
| transformObject | ||||||
transformObject(obj: JsonObject)
|
||||||
|
Parameters :
Returns :
{ transformed: JsonObject; hasChanges: boolean }
|
| updateAddPrefixPfe |
updateAddPrefixPfe(filePath: string, fileContent: string)
|
|
Returns :
{ needsUpdate: boolean; content: string }
|
| crawlJsonc | ||||||
crawlJsonc(data: any)
|
||||||
|
Parameters :
Returns :
{ transformed: any; hasChanges: boolean }
|
| transformObject | ||||||
transformObject(obj: any)
|
||||||
|
Parameters :
Returns :
{ transformed: any; hasChanges: boolean }
|
| updateOnPageXServiceActivators |
updateOnPageXServiceActivators(filePath: string, fileContent: string)
|
|
Returns :
{ needsUpdate: boolean; content: string }
|
| crawlJsonc | ||||||
crawlJsonc(data: JsonValue)
|
||||||
|
Parameters :
Returns :
{ transformed: JsonValue; hasChanges: boolean }
|
| stripStateKeyExpression | ||||||
stripStateKeyExpression(requestDataExpression: string)
|
||||||
|
Parameters :
|
| transformObject | ||||||
transformObject(obj: JsonObject)
|
||||||
|
Parameters :
Returns :
{ transformed: JsonObject; hasChanges: boolean }
|
| updatePathQueryParams |
updatePathQueryParams(filePath: string, fileContent: string)
|
|
Returns :
{ needsUpdate: boolean; content: string }
|
| createActionsValidator | ||||
createActionsValidator(knownActions)
|
||||
|
Parameters :
|
| createApp |
createApp(runner: SchematicTestRunner, options: object, tree: Tree)
|
| createTestApp | ||||||||||||||||
createTestApp(runner: SchematicTestRunner, appOptions: object, tree?: Tree)
|
||||||||||||||||
|
Parameters :
Returns :
Promise<UnitTestTree>
|
| createWorkspace | |||||||||
createWorkspace(runner: SchematicTestRunner, tree?: Tree)
|
|||||||||
|
Parameters :
|
| errorPageMigration | ||||||
errorPageMigration(path: string)
|
||||||
|
Parameters :
|
| errorPageMigration | ||||||
errorPageMigration(tree: Tree)
|
||||||
|
Parameters :
Returns :
void
|
| updateNestedErrorPageID | ||||||
updateNestedErrorPageID(fileContent: string)
|
||||||
|
Parameters :
|
| expectObservable | ||||||||||||
expectObservable(observable$: Observable, expectedValues, doneFn?)
|
||||||||||||
|
Helper to check the emitted values of an observable. Checks that the expected values are emitted. Also checks that no more than the expected number of values is emitted.
Parameters :
|
| extractQueryParams | ||||||||
extractQueryParams(path: string)
|
||||||||
|
Takes a path segment and extracts the query parameters from it. Returns the stripped path as well as the extracted query parameters. Paths that don't contain any query parameters will be left unchanged.
Parameters :
Returns :
{ path: string; queryParams: Params }
|
| findNgModuleMetadata | ||||
findNgModuleMetadata(rootNode)
|
||||
|
Finds a NgModule declaration within the specified TypeScript node and returns the corresponding metadata for it. This function searches breadth first because NgModule's are usually not nested within other expressions or declarations.
Parameters :
Returns :
ts.ObjectLiteralExpression | null
|
| isNgModuleCallExpression | ||||
isNgModuleCallExpression(callExpression)
|
||||
|
Whether the specified call expression is referring to a NgModule definition.
Parameters :
Returns :
boolean
|
| ngModuleHasDeclaration | |||||||||
ngModuleHasDeclaration(moduleMetadata, className: string)
|
|||||||||
|
Parameters :
|
| ngModuleHasImport | |||||||||
ngModuleHasImport(moduleMetadata, className: string)
|
|||||||||
|
Parameters :
|
| resolveIdentifierOfExpression | ||||
resolveIdentifierOfExpression(expression)
|
||||
|
Resolves the last identifier that is part of the given expression. This helps resolving identifiers of nested property access expressions (e.g. myNamespace.core.NgModule).
Parameters :
Returns :
ts.Identifier | null
|
| formatValue | ||||||
formatValue(value: JsonValue)
|
||||||
|
Parameters :
Returns :
JsonValue
|
| transformObject | ||||||
transformObject(obj: JsonValue)
|
||||||
|
Parameters :
Returns :
{ transformed: JsonValue; hasChanges: boolean }
|
| updateNestedValueXExpression |
updateNestedValueXExpression(filePath: string, fileContent: string)
|
|
Returns :
{ needsUpdate: boolean; content: string }
|
| generateConnection | |||||||||||||||||||||
generateConnection(sourcePageId: string, navigation: NavOptionConfig, type: NavigationEdgeType, index: number, showIndex: boolean, duplicateExternalNavigations: boolean)
|
|||||||||||||||||||||
|
Parameters :
|
| generateConnectionsFromNavOptionList | |||||||||||||||
generateConnectionsFromNavOptionList(sourcePageId: string, optionList, navigationType: NavigationEdgeType, duplicateExternalNavigations: boolean)
|
|||||||||||||||
|
Parameters :
Returns :
NavigationGraphData
|
| generateEntryPointConnections | |||||||||
generateEntryPointConnections(navConfig: PfeNavigationConfiguration, duplicateExternalNavigations: boolean)
|
|||||||||
|
Parameters :
Returns :
NavigationGraphData
|
| generateErrorConnections | |||||||||
generateErrorConnections(navConfig: PfeNavigationConfiguration, duplicateExternalNavigations: boolean)
|
|||||||||
|
Parameters :
Returns :
NavigationGraphData
|
| generateNavigationGraph | |||||||||
generateNavigationGraph(navConfig: PfeNavigationConfiguration, duplicateExternalNavigations: boolean)
|
|||||||||
|
Parameters :
Returns :
NavigationGraphData
|
| generatePageNode | ||||||
generatePageNode(page: PageNavigationConfiguration)
|
||||||
|
Parameters :
Returns :
NavigationNodeData
|
| generateUniqueId |
generateUniqueId()
|
| getNodeTooltip | ||||||
getNodeTooltip(type: NavigationNodeType)
|
||||||
|
Parameters :
Returns :
string
|
| mergeEdgesWithoutDuplicates | ||||||
mergeEdgesWithoutDuplicates(source, edges)
|
||||||
|
Parameters :
Returns :
NavigationEdgeData[]
|
| removeDuplicatedNodes | ||||
removeDuplicatedNodes(nodes)
|
||||
|
Parameters :
|
| getPageIDFromRouteSnapshot | ||||||
getPageIDFromRouteSnapshot(snapshot: ActivatedRouteSnapshot)
|
||||||
|
Get the pfe page ID from any ActivatedRouteSnapshot. This can be from the root or anywhere lower in the tree.
Parameters :
Returns :
string | undefined
|
| getStateDiff | ||||||||||||||||
getStateDiff(previous, next, basePath: string)
|
||||||||||||||||
|
Diff two values and return changes as JSONPath-addressed entries.
Parameters :
Returns :
DiffEntry[]
|
| isJsonObject | ||||
isJsonObject(value)
|
||||
|
Parameters :
Returns :
Record<string | unknown>
|
| isSimpleIdentifier | ||||||
isSimpleIdentifier(key: string)
|
||||||
|
Parameters :
Returns :
boolean
|
| jsonPathProp |
jsonPathProp(base: string, key: string)
|
|
Returns :
string
|
| getTargetTsconfigPath | |||||||||
getTargetTsconfigPath(project: ProjectDefinition, targetName: string)
|
|||||||||
|
Gets the tsconfig path from the given target within the specified project.
Parameters :
Returns :
WorkspacePath | null
|
| getWorkspaceConfigGracefully | ||||||
getWorkspaceConfigGracefully(tree: Tree)
|
||||||
|
Resolve the workspace configuration of the specified tree gracefully.
Parameters :
Returns :
Promise<WorkspaceDefinition | null>
|
| hasNgModuleForRootImport |
hasNgModuleForRootImport(tree: Tree, modulePath: string, className: string)
|
|
Whether the Angular module in the given path imports the specified module class name with a forRoot call.
Returns :
boolean
|
| hasPFEModuleImport | ||||||
hasPFEModuleImport(namedBindings: NamedImports)
|
||||||
|
Parameters :
Returns :
boolean
|
| inputSignalReadsMigration | |||||||||
inputSignalReadsMigration(tree: Tree, context: SchematicContext)
|
|||||||||
|
Parameters :
Returns :
void
|
| logInputSignalReadsMigrationDescription |
logInputSignalReadsMigrationDescription()
|
| isIgnoredByGit | ||||||
isIgnoredByGit(filePath: string)
|
||||||
|
Parameters :
|
| updatePfeNdbxImport | ||||||
updatePfeNdbxImport(tree: Tree)
|
||||||
|
Parameters :
Returns :
void
|
| isIgnoredByGit | ||||||
isIgnoredByGit(filePath: string)
|
||||||
|
Parameters :
|
| isStylesheetFile | ||||||
isStylesheetFile(filePath: string)
|
||||||
|
Parameters :
|
| updatePfeDevtoolsImport | ||||||
updatePfeDevtoolsImport(tree: Tree)
|
||||||
|
Parameters :
Returns :
void
|
| isNavigationNode | ||||
isNavigationNode(pageConfig?)
|
||||
|
Parameters :
Returns :
NavigationNodeConfiguration
|
| isObject | ||||
isObject(value)
|
||||
|
Parameters :
Returns :
UnknownObject
|
| isString | ||||
isString(value)
|
||||
|
Parameters :
Returns :
string
|
| isPFEDeclaration | ||||
isPFEDeclaration(declaration)
|
||||
|
Parameters :
|
| isPFEImportDeclaration | ||||
isPFEImportDeclaration(node)
|
||||
|
Parameters :
|
| onPageXServiceActivatorsMigration | ||||||
onPageXServiceActivatorsMigration(tree: Tree)
|
||||||
|
Parameters :
Returns :
void
|
| pathQueryParamsMigration | ||||||
pathQueryParamsMigration(tree: Tree)
|
||||||
|
Parameters :
Returns :
void
|
| pfeAndConditionEvaluator | ||||||
pfeAndConditionEvaluator(pfeConditionsService: PfeConditionsService)
|
||||||
|
Parameters :
|
| pfeDefaultLoggerFactory |
pfeDefaultLoggerFactory()
|
|
Returns :
PfeLogger
|
| pfeDevtoolsProviderMigration | ||||||
pfeDevtoolsProviderMigration(tree: Tree)
|
||||||
|
Parameters :
Returns :
void
|
| pfeExpressionEvaluator |
pfeExpressionEvaluator()
|
| pfeOrConditionEvaluator | ||||||
pfeOrConditionEvaluator(pfeConditionsService: PfeConditionsService)
|
||||||
|
Parameters :
|
| reloadPageAction | ||||||||||||
reloadPageAction(_actionConfig: PfeBaseActionConfig, location: Pick)
|
||||||||||||
|
Parameters :
Returns :
Promise<boolean>
|
| removeSymbolFromNgModuleImports | ||||||||||||
removeSymbolFromNgModuleImports(sourceFile: SourceFile, symbolName: string, fileSystem: FileSystem)
|
||||||||||||
|
This is a rather basic implementation of a ngModule import removal. It collects the necessary changes and returns them. If the NgModule or the import was not found an empty changes array is returned. It currently does not handle edge cases, like it being the only import. (Which simply leaves an empty array of imports)
Parameters :
Returns :
RemovalChange[]
|
| reportManualReviewItems | |||||||||
reportManualReviewItems(items, report: ReportSink)
|
|||||||||
|
Parameters :
Returns :
void
|
| toSnippet | ||||||
toSnippet(text: string)
|
||||||
|
Parameters :
Returns :
string
|
| v44PfeDevtoolsMigration |
v44PfeDevtoolsMigration()
|
|
Returns :
Rule
|
| v45PfeNdbxMigration |
v45PfeNdbxMigration()
|
|
Returns :
Rule
|
| v46ErrorPageIdMigration |
v46ErrorPageIdMigration()
|
|
Returns :
Rule
|
| v47ValueXExpressionMigration |
v47ValueXExpressionMigration()
|
|
Returns :
Rule
|
| v48AddPFEPrefixMigration |
v48AddPFEPrefixMigration()
|
|
Returns :
Rule
|
| v49OnPageXServiceActivatorsMigration |
v49OnPageXServiceActivatorsMigration()
|
|
Returns :
Rule
|
| v49UpdatePathQueryParams |
v49UpdatePathQueryParams()
|
|
Returns :
Rule
|
| v50PfeDevtoolsProviderMigration |
v50PfeDevtoolsProviderMigration()
|
|
Returns :
Rule
|
| v51InputSignalReadsMigration |
v51InputSignalReadsMigration()
|
|
Returns :
Rule
|
| valueXExpressionCliMigration | ||||||
valueXExpressionCliMigration(route: string)
|
||||||
|
Parameters :
|
| valueXExpressionMigration | ||||||
valueXExpressionMigration(tree: Tree)
|
||||||
|
Parameters :
Returns :
void
|
| withPfePlugin |
withPfePlugin()
|
|
Returns :
DevToolsPlugin
|