util.d.ts 2.9KB

1234567891011121314151617181920212223242526
  1. import { CallExpression, SourceFile, TransformationContext, TransformerFactory } from 'typescript';
  2. import { FileCache } from '../util/file-cache';
  3. import { BuildContext, ChangedFile, DeepLinkConfigEntry, DeepLinkDecoratorAndClass, DeepLinkPathInfo, File } from '../util/interfaces';
  4. export declare function getDeepLinkData(appNgModuleFilePath: string, fileCache: FileCache, isAot: boolean): Map<string, DeepLinkConfigEntry>;
  5. export declare function filterTypescriptFilesForDeepLinks(fileCache: FileCache): File[];
  6. export declare function isDeepLinkingFile(filePath: string): boolean;
  7. export declare function getNgModulePathFromCorrespondingPage(filePath: string): string;
  8. export declare function getRelativePathToPageNgModuleFromAppNgModule(pathToAppNgModule: string, pathToPageNgModule: string): string;
  9. export declare function getNgModuleDataFromPage(appNgModuleFilePath: string, filePath: string, className: string, fileCache: FileCache, isAot: boolean): DeepLinkPathInfo;
  10. export declare function getDeepLinkDecoratorContentForSourceFile(sourceFile: SourceFile): DeepLinkDecoratorAndClass;
  11. export declare function hasExistingDeepLinkConfig(appNgModuleFilePath: string, appNgModuleFileContent: string): boolean;
  12. export declare function convertDeepLinkConfigEntriesToString(entries: Map<string, DeepLinkConfigEntry>): string;
  13. export declare function convertDeepLinkEntryToJsObjectString(entry: DeepLinkConfigEntry): string;
  14. export declare function updateAppNgModuleWithDeepLinkConfig(context: BuildContext, deepLinkString: string, changedFiles: ChangedFile[]): void;
  15. export declare function getUpdatedAppNgModuleContentWithDeepLinkConfig(appNgModuleFilePath: string, appNgModuleFileContent: string, deepLinkStringContent: string): string;
  16. export declare function getUpdatedAppNgModuleFactoryContentWithDeepLinksConfig(appNgModuleFactoryFileContent: string, deepLinkStringContent: string): string;
  17. export declare function addDefaultSecondArgumentToAppNgModule(appNgModuleFileContent: string, ionicModuleForRoot: CallExpression): string;
  18. export declare function addDeepLinkArgumentToAppNgModule(appNgModuleFileContent: string, ionicModuleForRoot: CallExpression, deepLinkString: string): string;
  19. export declare function generateDefaultDeepLinkNgModuleContent(pageFilePath: string, className: string): string;
  20. export declare function purgeDeepLinkDecoratorTSTransform(): TransformerFactory<SourceFile>;
  21. export declare function purgeDeepLinkDecoratorTSTransformImpl(transformContext: TransformationContext): (sourceFile: SourceFile) => SourceFile;
  22. export declare function purgeDeepLinkDecorator(inputText: string): string;
  23. export declare function purgeDeepLinkImport(inputText: string): string;
  24. export declare function getInjectDeepLinkConfigTypescriptTransform(): TransformerFactory<SourceFile>;
  25. export declare function injectDeepLinkConfigTypescriptTransform(deepLinkString: string, appNgModuleFilePath: string): TransformerFactory<SourceFile>;