Index

libs/ngx-pfe/schematics/ng-update/utils/ng-module/add-import.ts

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 /src/cdk/schematics/utils/ast.ts

Differences:

  • Usage of the fileSystem instead of the tree directly. This ensures reuse of the cached recorders.
  • Do not commit the changes directly. This is handled by the migration.
Parameters :
Name Type Optional
fileSystem FileSystem No
sourceFile SourceFile No
moduleName string No
src string No

libs/ngx-pfe/schematics/ng-update/v50-pfe-devtools-provider/add-pfe-devtools-provider.ts

addPfeDevtoolsProvider
addPfeDevtoolsProvider(filePath: string, fileContent: string)

Adds the new ngx-devtools-plugin provider pattern to TypeScript files that import from @allianz/ngx-pfe-devtools.

The migration performs the following changes:

  1. Adds provideDevTools({}, withPfePlugin()) to NgModule providers array
  2. Adds import { provideDevTools } from '@allianz/ngx-devtools'
  3. Ensures withPfePlugin is imported from @allianz/ngx-pfe-devtools
Parameters :
Name Type Optional
filePath string No
fileContent string No
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 provideDevTools({}, withPfePlugin()) to its providers array. If provideDevTools already exists but does not include withPfePlugin(), adds withPfePlugin() as an argument to the existing call. Returns true if any change was made.

Parameters :
Name Type Optional
sourceFile SourceFile No
decoratorName string No
Returns : boolean
getDecoratorMetadataObject
getDecoratorMetadataObject(decorator: Decorator)

Gets the object literal expression from a decorator's first argument.

Parameters :
Name Type Optional
decorator Decorator No
Returns : ObjectLiteralExpression | undefined

libs/ngx-pfe/schematics/ng-update/v48-add-prefix-pfe/add-prefix-pfe-migration.ts

addPrefixPfeMigration
addPrefixPfeMigration(tree: Tree)
Parameters :
Name Type Optional
tree Tree No
Returns : void

libs/ngx-pfe/schematics/ng-update/v51-input-signal-reads/template-migration.ts

applyPatches
applyPatches(templateText: string, patches)

Point insertions are order-independent with appendLeft, so no right-to-left sort is needed.

Parameters :
Name Type Optional
templateText string No
patches No
Returns : string
collectTargetRefVars
collectTargetRefVars(nodes)

Maps each ref-var name bound to a target element onto that element's members — <pfe-error-message #err> binds err to {hideError, message, hideClose}.

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 :
Name Optional
nodes No
Returns : ReadonlyMap<string, ReadonlySet<string>>
isAssignment
isAssignment(operation: string)

Angular parses =, +=, ??=, … as Binary nodes, alongside comparisons ending in =.

Parameters :
Name Type Optional
operation string No
Returns : boolean
isTwoWayBinding
isTwoWayBinding(attribute: TmplAstBoundAttribute)
Parameters :
Name Type Optional
attribute TmplAstBoundAttribute No
Returns : boolean
isTwoWayEvent
isTwoWayEvent(event: TmplAstBoundEvent)
Parameters :
Name Type Optional
event TmplAstBoundEvent No
Returns : boolean
migrateTemplate
migrateTemplate(templateText: string, hostMembers: TemplateMemberSet)

Rewrites signal-input member reads inside an Angular template (null when nothing changed).

hostMembers are the inputs the backing component inherits from a target and drive the implicit-receiver / this.x reads; it is empty for a plain consumer template, whose ref-var reads resolve from the template itself.

Reads on template-locals (*ngFor="let x of ...", @for, @if ... as x, @let x = ...) shadow the component member and are skipped — the template analogue of the subclass member-shadowing rule on the TypeScript side.

Parameters :
Name Type Optional
templateText string No
hostMembers TemplateMemberSet No
resolveManualItems
resolveManualItems(templateText: string, offsets)
Parameters :
Name Type Optional
templateText string No
offsets No
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 { yields both an "unexpected EOF" and an "invalid ICU").

Parameters :
Name Type Optional
error ParseError No
Returns : TemplateManualItem

libs/ngx-pfe/schematics/ng-update/v51-input-signal-reads/update-input-signal-reads.ts

classifyAccess
classifyAccess(access: PropertyAccessExpression)
Parameters :
Name Type Optional
access PropertyAccessExpression No
Returns : MemberAction
collectDirectExtenders
collectDirectExtenders(sourceFiles: Map)

Registry of class name -> the target that class DIRECTLY extends.

Parameters :
Name Type Optional
sourceFiles Map No
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 (ndbx.PfeErrorMessageComponent), which is what keeps it from bleeding into a named import: an unrelated other.PfeErrorMessageComponent never matches, because only the exact <namespace>.<className> pair is registered.

Parameters :
Name Type Optional
sourceFile SourceFile No
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 :
// local-barrel.ts
export { PfeErrorMessageComponent } from '@allianz/ngx-pfe-ndbx';
// consumer.ts — NOT migrated
import { PfeErrorMessageComponent } from './local-barrel';

collectLocalTargetReferences matches an import's module specifier against the entry point verbatim, so './local-barrel' never matches, and following the chain across N hops is a much bigger surface than the case is worth. Reporting matters because an un-unwrapped read does not fail loudly: the member is now a getter function, so it silently evaluates as always-truthy. Only the barrel is reported — the set of files importing from it is unbounded.

Parameters :
Name Type Optional
sourceFile SourceFile No
filePath string No
Returns : ManualReviewItem[]
collectTypeReferenceNames
collectTypeReferenceNames(typeNode: Node)

A name is returned exactly as written, so a qualified ns.Foo stays qualified. It must NOT be reduced to its right-most segment: other.PfeErrorMessageComponent, from an unrelated module that happens to export the same class name, would then match a PfeErrorMessageComponent imported elsewhere in the file and be wrongly rewritten.

Parameters :
Name Type Optional
typeNode Node No
Returns : string[]
getComponentDecoratorObject
getComponentDecoratorObject(classDecl: ClassDeclaration)
Parameters :
Name Type Optional
classDecl ClassDeclaration No
getDirectlyExtendedTarget
getDirectlyExtendedTarget(classDecl: ClassDeclaration, localNameToTarget: Map)
Parameters :
Name Type Optional
classDecl ClassDeclaration No
localNameToTarget Map No
getReceiverDeclaration
getReceiverDeclaration(access: PropertyAccessExpression)

Resolves the declaration a receiver binds to — foo.member (the identifier foo) or this.bar.member (the this.bar property access); undefined for anything more complex. Resolving via the symbol rather than the identifier text is what makes the pass scope-aware.

Parameters :
Name Type Optional
access PropertyAccessExpression No
Returns : Node | undefined
getStringLikeInitializer
getStringLikeInitializer(objectLiteral: ReturnType, propertyName: string)

A plain string or no-substitution template literal (both expose getLiteralText / setLiteralValue). Substitution template literals (\...${x}...``) are skipped — an inline template that interpolates TS values cannot be rewritten as a single literal.

Parameters :
Name Type Optional
objectLiteral ReturnType No
propertyName string No
indexDirectlyExtendingComponent
indexDirectlyExtendingComponent(classDecl: ClassDeclaration, target: TargetComponent, filePath: string, owners: Map, manualItems)
Parameters :
Name Type Optional
classDecl ClassDeclaration No
target TargetComponent No
filePath string No
owners Map No
manualItems No
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 @allianz/* packages are typically not resolvable.

Parameters :
Name Type Optional
sourceFiles Map No
directExtenders Map No
manualItems No
Returns : Map<string, Set<string>>
isDestructuringAssignmentTarget
isDestructuringAssignmentTarget(access: PropertyAccessExpression)

True when access is the assignment target of a destructuring pattern — [this.x] = arr or ({ a: this.x } = obj). Such an access sits (directly, or via nested patterns / a leading spread) inside an array/object literal that is the LHS of an =.

Parameters :
Name Type Optional
access PropertyAccessExpression No
Returns : boolean
isThisMemberAccess
isThisMemberAccess(access: PropertyAccessExpression, members: Set)
Parameters :
Name Type Optional
access PropertyAccessExpression No
members Set No
Returns : boolean
mightBeAffected
mightBeAffected(fileContent: string)

A barrel is admitted via RE_EXPORT_PATTERN because export * names no target class of its own and would otherwise be filtered out.

Parameters :
Name Type Optional
fileContent string No
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 <pfe-error-message #err> — so the import-based filter above would drop it.

Parameters :
Name Type Optional
fileContent string No
Returns : boolean
normalizePath
normalizePath(filePath: string)

Normalizes a path so index keys and lookup keys compare equal.

Parameters :
Name Type Optional
filePath string No
Returns : string
processInlineTemplate
processInlineTemplate(classDecl: ClassDeclaration, members: Set, filePath: string, manualItems)
Parameters :
Name Type Optional
classDecl ClassDeclaration No
members Set No
filePath string No
manualItems No
Returns : void
processInstanceAccess
processInstanceAccess(sourceFile: SourceFile, localNameToTarget: Map, filePath: string, manualItems)

Rewrites ref.<member> accesses where ref is a variable, parameter or property typed as a target component. Matching is resolved per access against the receiver's actual declaration in scope (via its symbol), not by identifier name — so two references that share a name but are typed differently are handled independently.

Parameters :
Name Type Optional
sourceFile SourceFile No
localNameToTarget Map No
filePath string No
manualItems No
Returns : void
processSubclass
processSubclass(classDecl: ClassDeclaration, target: TargetComponent, filePath: string, manualItems)
Parameters :
Name Type Optional
classDecl ClassDeclaration No
target TargetComponent No
filePath string No
manualItems No
Returns : void
processTypeScriptFile
processTypeScriptFile(sourceFile: SourceFile, filePath: string, manualItems)
Parameters :
Name Type Optional
sourceFile SourceFile No
filePath string No
manualItems No
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:

  • PfeErrorMessageComponent — a plain type reference
  • PfeErrorMessageComponent | null | undefined — a union (each member checked)
  • (PfeErrorMessageComponent | null) — parenthesized (unwrapped)
  • A & PfeErrorMessageComponent — an intersection (each member checked)
  • ndbx.PfeErrorMessageComponent — qualified via a namespace import

Types with no explicit annotation (inferred) cannot be matched textually and return null.

Parameters :
Name Type Optional
declaration Node No
localNameToTarget Map No
resolveSubclassMembers
resolveSubclassMembers(classDecl: ClassDeclaration, target: TargetComponent)

A member re-declared in the subclass shadows the base-class input — as a property, an accessor (override get message()) or a method, any of which returns something other than the base signal — so this.member must NOT be unwrapped and the name is filtered out.

Parameters :
Name Type Optional
classDecl ClassDeclaration No
target TargetComponent No
Returns : Set<string>
resolveTemplatePath
resolveTemplatePath(componentFilePath: string, templateUrl: string)
Parameters :
Name Type Optional
componentFilePath string No
templateUrl string No
Returns : string
transformAccesses
transformAccesses(container: Node, matches, filePath: string, manualItems)

Records the accesses that cannot be migrated automatically, then repeatedly unwraps the remaining reads (x -> x()), re-querying the AST after each mutation so no stale ts-morph node is touched.

Termination relies on an unwrapped access classifying as none afterwards, which is why a function-valued member is handled by marking the new call node as visited rather than by re-classifying it: this.nxNextAction() is a legitimate migration target (it must become this.nxNextAction()()), so it can never be recognised as already-migrated without looping forever.

Parameters :
Name Type Optional
container Node No
matches No
filePath string No
manualItems No
Returns : void
updateInputSignalReads
updateInputSignalReads(tsSources, htmlSources)

Rewrites reads of the inputs that changed from @Input to signal input(), so every read of a migrated member gains a (). Three consumer pathways are covered:

  • subclass access — this.<member> inside a class that extends a target, plus that class's own template (inline and external);
  • instance access — ref.<member> where ref is a variable, parameter or property whose declared type is a target component;
  • template ref-var access — {{ err.message }} where err is a reference variable bound to a target element, in any template.

tsSources must contain every .ts file in scope and htmlSources every .html file: external templates are attributed to their component in a pre-pass over the TypeScript files.

Parameters :
Name Optional
tsSources No
htmlSources No
Returns : MigrationResult

libs/ngx-pfe/schematics/ng-update/v48-add-prefix-pfe/cli-add-prefix-pfe-migration.ts

cliAddPrefixPfeMigration
cliAddPrefixPfeMigration(route: string)
Parameters :
Name Type Optional
route string No

libs/ngx-pfe/schematics/ng-update/v51-input-signal-reads/cli-input-signal-reads-migration.ts

cliInputSignalReadsMigration
cliInputSignalReadsMigration(route: string)
Parameters :
Name Type Optional
route string No
Returns : void

libs/ngx-pfe/schematics/ng-update/v49-on-page-x-service-activators/cli-on-page-x-service-activators-migration.ts

cliOnPageXServiceActivatorsMigration
cliOnPageXServiceActivatorsMigration(route: string)
Parameters :
Name Type Optional
route string No

libs/ngx-pfe/schematics/ng-update/v49-path-query-params/cli-path-query-params.ts

cliPathQueryParams
cliPathQueryParams(route: string)
Parameters :
Name Type Optional
route string No

libs/ngx-pfe/schematics/ng-update/v50-pfe-devtools-provider/cli-pfe-devtools-provider-migration.ts

cliPfeDevtoolsProviderMigration
cliPfeDevtoolsProviderMigration(route: string)
Parameters :
Name Type Optional
route string No

libs/ngx-pfe/util/clone.ts

clone
clone<S>(data: S)
Type parameters :
  • S
Parameters :
Name Type Optional
data S No
Returns : S

libs/ngx-pfe/util/convert-http-response-headers.ts

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 :
Name Optional
errorResponse No

libs/ngx-pfe/schematics/ng-update/utils/files/file-crawler.ts

crawlDirectoryAndCollectPaths
crawlDirectoryAndCollectPaths(basePath: string, extensions)
Parameters :
Name Type Optional
basePath string No
extensions No
Returns : string[]

libs/ngx-pfe/schematics/ng-update/v48-add-prefix-pfe/update-add-prefix-pfe.ts

crawlJsonc
crawlJsonc(data: JsonValue)
Parameters :
Name Type Optional
data JsonValue No
Returns : { transformed: JsonValue; hasChanges: boolean }
transformObject
transformObject(obj: JsonObject)
Parameters :
Name Type Optional
obj JsonObject No
Returns : { transformed: JsonObject; hasChanges: boolean }
updateAddPrefixPfe
updateAddPrefixPfe(filePath: string, fileContent: string)
Parameters :
Name Type Optional
filePath string No
fileContent string No
Returns : { needsUpdate: boolean; content: string }

libs/ngx-pfe/schematics/ng-update/v49-on-page-x-service-activators/update-on-page-x-service-activators.ts

crawlJsonc
crawlJsonc(data: any)
Parameters :
Name Type Optional
data any No
Returns : { transformed: any; hasChanges: boolean }
transformObject
transformObject(obj: any)
Parameters :
Name Type Optional
obj any No
Returns : { transformed: any; hasChanges: boolean }
updateOnPageXServiceActivators
updateOnPageXServiceActivators(filePath: string, fileContent: string)
Parameters :
Name Type Optional
filePath string No
fileContent string No
Returns : { needsUpdate: boolean; content: string }

libs/ngx-pfe/schematics/ng-update/v49-path-query-params/update-path-query-params.ts

crawlJsonc
crawlJsonc(data: JsonValue)
Parameters :
Name Type Optional
data JsonValue No
Returns : { transformed: JsonValue; hasChanges: boolean }
stripStateKeyExpression
stripStateKeyExpression(requestDataExpression: string)
Parameters :
Name Type Optional
requestDataExpression string No
transformObject
transformObject(obj: JsonObject)
Parameters :
Name Type Optional
obj JsonObject No
Returns : { transformed: JsonObject; hasChanges: boolean }
updatePathQueryParams
updatePathQueryParams(filePath: string, fileContent: string)
Parameters :
Name Type Optional
filePath string No
fileContent string No
Returns : { needsUpdate: boolean; content: string }

libs/ngx-pfe-devtools/src/pfe/actions/actions.component.ts

createActionsValidator
createActionsValidator(knownActions)
Parameters :
Name Optional
knownActions No

libs/ngx-pfe/schematics/ng-update/utils/testing/test-setup.ts

createApp
createApp(runner: SchematicTestRunner, options: object, tree: Tree)
Parameters :
Name Type Optional Default value
runner SchematicTestRunner No
options object No {}
tree Tree No
createTestApp
createTestApp(runner: SchematicTestRunner, appOptions: object, tree?: Tree)
Parameters :
Name Type Optional Default value
runner SchematicTestRunner No
appOptions object No {}
tree Tree Yes
Returns : Promise<UnitTestTree>
createWorkspace
createWorkspace(runner: SchematicTestRunner, tree?: Tree)
Parameters :
Name Type Optional
runner SchematicTestRunner No
tree Tree Yes

libs/ngx-pfe/schematics/ng-update/v46-error-page-id-migration/cli-error-page-id-migration.ts

errorPageMigration
errorPageMigration(path: string)
Parameters :
Name Type Optional
path string No

libs/ngx-pfe/schematics/ng-update/v46-error-page-id-migration/error-page-id-migration.ts

errorPageMigration
errorPageMigration(tree: Tree)
Parameters :
Name Type Optional
tree Tree No
Returns : void
updateNestedErrorPageID
updateNestedErrorPageID(fileContent: string)
Parameters :
Name Type Optional
fileContent string No

libs/ngx-pfe/util/tests/expect-observable.ts

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 :
Name Type Optional
observable$ Observable No
expectedValues No
doneFn Yes

libs/ngx-pfe/services/pfe-routing/utils/extract-query-params.ts

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 :
Name Type Optional Description
path string No

the path to extract the query parameters from

Returns : { path: string; queryParams: Params }

libs/ngx-pfe/schematics/ng-update/utils/cherry-picked/ng-module.ts

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 :
Name Optional
rootNode No
Returns : ts.ObjectLiteralExpression | null
isNgModuleCallExpression
isNgModuleCallExpression(callExpression)

Whether the specified call expression is referring to a NgModule definition.

Parameters :
Name Optional
callExpression No
Returns : boolean
ngModuleHasDeclaration
ngModuleHasDeclaration(moduleMetadata, className: string)
Parameters :
Name Type Optional
moduleMetadata No
className string No
ngModuleHasImport
ngModuleHasImport(moduleMetadata, className: string)
Parameters :
Name Type Optional
moduleMetadata No
className string No
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 :
Name Optional
expression No
Returns : ts.Identifier | null

libs/ngx-pfe/schematics/ng-update/v47-value-x-expression/update-value-x-expression.ts

formatValue
formatValue(value: JsonValue)
Parameters :
Name Type Optional
value JsonValue No
Returns : JsonValue
transformObject
transformObject(obj: JsonValue)
Parameters :
Name Type Optional
obj JsonValue No
Returns : { transformed: JsonValue; hasChanges: boolean }
updateNestedValueXExpression
updateNestedValueXExpression(filePath: string, fileContent: string)
Parameters :
Name Type Optional
filePath string No
fileContent string No
Returns : { needsUpdate: boolean; content: string }

libs/ngx-pfe-devtools/src/pfe/navigation/navigation-graph/graph-generator/navigation-graph-generator.ts

generateConnection
generateConnection(sourcePageId: string, navigation: NavOptionConfig, type: NavigationEdgeType, index: number, showIndex: boolean, duplicateExternalNavigations: boolean)
Parameters :
Name Type Optional
sourcePageId string No
navigation NavOptionConfig No
type NavigationEdgeType No
index number No
showIndex boolean No
duplicateExternalNavigations boolean No
generateConnectionsFromNavOptionList
generateConnectionsFromNavOptionList(sourcePageId: string, optionList, navigationType: NavigationEdgeType, duplicateExternalNavigations: boolean)
Parameters :
Name Type Optional
sourcePageId string No
optionList No
navigationType NavigationEdgeType No
duplicateExternalNavigations boolean No
generateEntryPointConnections
generateEntryPointConnections(navConfig: PfeNavigationConfiguration, duplicateExternalNavigations: boolean)
Parameters :
Name Type Optional
navConfig PfeNavigationConfiguration No
duplicateExternalNavigations boolean No
generateErrorConnections
generateErrorConnections(navConfig: PfeNavigationConfiguration, duplicateExternalNavigations: boolean)
Parameters :
Name Type Optional
navConfig PfeNavigationConfiguration No
duplicateExternalNavigations boolean No
generateNavigationGraph
generateNavigationGraph(navConfig: PfeNavigationConfiguration, duplicateExternalNavigations: boolean)
Parameters :
Name Type Optional
navConfig PfeNavigationConfiguration No
duplicateExternalNavigations boolean No
generatePageNode
generatePageNode(page: PageNavigationConfiguration)
Parameters :
Name Type Optional
page PageNavigationConfiguration No
Returns : NavigationNodeData
generateUniqueId
generateUniqueId()
getNodeTooltip
getNodeTooltip(type: NavigationNodeType)
Parameters :
Name Type Optional
type NavigationNodeType No
Returns : string
mergeEdgesWithoutDuplicates
mergeEdgesWithoutDuplicates(source, edges)
Parameters :
Name Optional
source No
edges No
removeDuplicatedNodes
removeDuplicatedNodes(nodes)
Parameters :
Name Optional
nodes No

libs/ngx-pfe/services/pfe-routing/utils/page-id-from-route-snapshot.ts

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 :
Name Type Optional
snapshot ActivatedRouteSnapshot No
Returns : string | undefined

libs/ngx-pfe-devtools/src/ngx-devtools-plugin/views/trace/state-diff.util.ts

getStateDiff
getStateDiff(previous, next, basePath: string)

Diff two values and return changes as JSONPath-addressed entries.

  • added: path exists only in next
  • removed: path exists only in previous
  • modified: leaf value differs (including type changes)
Parameters :
Name Type Optional Default value
previous No
next No
basePath string No '$'
Returns : DiffEntry[]
isJsonObject
isJsonObject(value)
Parameters :
Name Optional
value No
Returns : Record<string | unknown>
isSimpleIdentifier
isSimpleIdentifier(key: string)
Parameters :
Name Type Optional
key string No
Returns : boolean
jsonPathProp
jsonPathProp(base: string, key: string)
Parameters :
Name Type Optional
base string No
key string No
Returns : string

libs/ngx-pfe/schematics/ng-update/utils/cherry-picked/project-tsconfig-paths.ts

getTargetTsconfigPath
getTargetTsconfigPath(project: ProjectDefinition, targetName: string)

Gets the tsconfig path from the given target within the specified project.

Parameters :
Name Type Optional
project ProjectDefinition No
targetName string No
Returns : WorkspacePath | null
getWorkspaceConfigGracefully
getWorkspaceConfigGracefully(tree: Tree)

Resolve the workspace configuration of the specified tree gracefully.

Parameters :
Name Type Optional
tree Tree No

libs/ngx-pfe/schematics/ng-update/utils/ng-module/has-forroot-import.ts

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.

Parameters :
Name Type Optional
tree Tree No
modulePath string No
className string No
Returns : boolean

libs/ngx-pfe/schematics/ng-update/utils/pfe/has-pfe-module-import.ts

hasPFEModuleImport
hasPFEModuleImport(namedBindings: NamedImports)
Parameters :
Name Type Optional
namedBindings NamedImports No
Returns : boolean

libs/ngx-pfe/schematics/ng-update/v51-input-signal-reads/input-signal-reads-migration.ts

inputSignalReadsMigration
inputSignalReadsMigration(tree: Tree, context: SchematicContext)
Parameters :
Name Type Optional
tree Tree No
context SchematicContext No
Returns : void
logInputSignalReadsMigrationDescription
logInputSignalReadsMigrationDescription()

libs/ngx-pfe/schematics/ng-update/v45-pfe-ndbx-migration/pfe-ndbx-migration.ts

isIgnoredByGit
isIgnoredByGit(filePath: string)
Parameters :
Name Type Optional
filePath string No
updatePfeNdbxImport
updatePfeNdbxImport(tree: Tree)
Parameters :
Name Type Optional
tree Tree No
Returns : void

libs/ngx-pfe/schematics/ng-update/v44-pfe-devtools-migration/pfe-devtools-migration.ts

isIgnoredByGit
isIgnoredByGit(filePath: string)
Parameters :
Name Type Optional
filePath string No
isStylesheetFile
isStylesheetFile(filePath: string)
Parameters :
Name Type Optional
filePath string No
updatePfeDevtoolsImport
updatePfeDevtoolsImport(tree: Tree)
Parameters :
Name Type Optional
tree Tree No
Returns : void

libs/ngx-pfe/models/navigation-config.model.ts

isNavigationNode
isNavigationNode(pageConfig?)
Parameters :
Name Optional
pageConfig Yes

libs/ngx-pfe/util/type-checks.ts

isObject
isObject(value)
Parameters :
Name Optional
value No
Returns : UnknownObject
isString
isString(value)
Parameters :
Name Optional
value No
Returns : string

libs/ngx-pfe/schematics/ng-update/utils/typescript/module-specifiers.ts

isPFEDeclaration
isPFEDeclaration(declaration)
Parameters :
Name Optional
declaration No
isPFEImportDeclaration
isPFEImportDeclaration(node)
Parameters :
Name Optional
node No

libs/ngx-pfe/schematics/ng-update/v49-on-page-x-service-activators/on-page-x-service-activators-migration.ts

onPageXServiceActivatorsMigration
onPageXServiceActivatorsMigration(tree: Tree)
Parameters :
Name Type Optional
tree Tree No
Returns : void

libs/ngx-pfe/schematics/ng-update/v49-path-query-params/path-query-params-migation.ts

pathQueryParamsMigration
pathQueryParamsMigration(tree: Tree)
Parameters :
Name Type Optional
tree Tree No
Returns : void

libs/ngx-pfe/pfe-conditions/and/and.factory.ts

pfeAndConditionEvaluator
pfeAndConditionEvaluator(pfeConditionsService: PfeConditionsService)
Parameters :
Name Type Optional
pfeConditionsService PfeConditionsService No

libs/ngx-pfe/models/pfe-logger.model.ts

pfeDefaultLoggerFactory
pfeDefaultLoggerFactory()
Returns : PfeLogger

libs/ngx-pfe/schematics/ng-update/v50-pfe-devtools-provider/pfe-devtools-provider-migration.ts

pfeDevtoolsProviderMigration
pfeDevtoolsProviderMigration(tree: Tree)
Parameters :
Name Type Optional
tree Tree No
Returns : void

libs/ngx-pfe/pfe-conditions/expression/expression.factory.ts

pfeExpressionEvaluator
pfeExpressionEvaluator()

libs/ngx-pfe/pfe-conditions/or/or.factory.ts

pfeOrConditionEvaluator
pfeOrConditionEvaluator(pfeConditionsService: PfeConditionsService)
Parameters :
Name Type Optional
pfeConditionsService PfeConditionsService No

libs/ngx-pfe/pfe-actions/reload-page/reload-page-action.ts

reloadPageAction
reloadPageAction(_actionConfig: PfeBaseActionConfig, location: Pick)
Parameters :
Name Type Optional Default value
_actionConfig PfeBaseActionConfig No
location Pick No window.location
Returns : Promise<boolean>

libs/ngx-pfe/schematics/ng-update/utils/ng-module/remove-import.ts

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 :
Name Type Optional
sourceFile SourceFile No
symbolName string No
fileSystem FileSystem No
Returns : RemovalChange[]

libs/ngx-pfe/schematics/ng-update/v51-input-signal-reads/manual-review.ts

reportManualReviewItems
reportManualReviewItems(items, report: ReportSink)
Parameters :
Name Type Optional
items No
report ReportSink No
Returns : void
toSnippet
toSnippet(text: string)
Parameters :
Name Type Optional
text string No
Returns : string

libs/ngx-pfe/schematics/ng-update/index.ts

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

libs/ngx-pfe/schematics/ng-update/v47-value-x-expression/cli-value-x-expression-migration.ts

valueXExpressionCliMigration
valueXExpressionCliMigration(route: string)
Parameters :
Name Type Optional
route string No

libs/ngx-pfe/schematics/ng-update/v47-value-x-expression/value-x-expression-migration.ts

valueXExpressionMigration
valueXExpressionMigration(tree: Tree)
Parameters :
Name Type Optional
tree Tree No
Returns : void

libs/ngx-pfe-devtools/src/ngx-devtools-plugin/provider.ts

withPfePlugin
withPfePlugin()
Returns : DevToolsPlugin

results matching ""

    No results matching ""