import { Tree as NgTree } from '@angular-devkit/schematics'; import { PlatformTypes, FrameworkTypes, ITargetPlatforms } from '@nstudio/xplat-utils'; import type { Mode } from 'fs'; import { FileChange, Tree as DevKitTree } from '@nx/devkit'; export interface NodeDependency { name: string; version: string; type: 'dependency' | 'devDependency'; } export interface IXplatSettings { prefix?: string; groupByName?: boolean; framework?: FrameworkTypes; platforms?: string; } export declare const supportedHelpers: string[]; export declare const supportedSandboxPlatforms: Array; /** * Check if the platform is frontend (some could be backend only) * * Useful for deciding which dependencies or files should be added * * @param targetPlatforms */ export declare function hasFrontendPlatform(targetPlatforms: ITargetPlatforms): boolean; /** * Check if the platform will need a web app to be generated. * * Useful for deciding which dependencies or files should be added * * @param targetPlatforms */ export declare function hasWebPlatform(targetPlatforms: ITargetPlatforms): boolean; export declare function updatePackageForNgrx(tree: NgTree, packagePath?: string): import("@angular-devkit/schematics/src/tree/interface").Tree; export declare function updateTsConfig(tree: NgTree, callback: (data: any) => void, targetSuffix?: string, prefixPath?: string): import("@angular-devkit/schematics/src/tree/interface").Tree; export declare function updatePackageScripts(tree: NgTree, scripts: any): import("@angular-devkit/schematics/src/tree/interface").Tree; export declare function readWorkspaceJson(tree: NgTree): any; export declare function getPrefixWarning(prefix: string): string; export declare function getDefaultTemplateOptions(): { tmpl: string; utils: { decamelize(str: string): string; dasherize(str?: string): string; camelize(str: string): string; classify(str: string): string; underscore(str: string): string; capitalize(str: string): string; group(name: string, group: string | undefined): string; featurePath(group: boolean | undefined, flat: boolean | undefined, path: string, name: string): string; sanitize: (str: string) => string; }; npmScope: string; prefix: string; dot: string; }; /** * Sanitizes a given string by removing all characters that * are not letters or digits. * ```javascript sanitize('nativescript-app'); // 'nativescriptapp' sanitize('action_name'); // 'actioname' sanitize('css-class-name'); // 'cssclassname' sanitize('my favorite items'); // 'myfavoriteitems' ``` @method sanitize @param {String} str The string to sanitize. @return {String} the sanitized string. */ export declare const sanitize: (str: string) => string; export declare const stringUtils: { decamelize(str: string): string; dasherize(str?: string): string; camelize(str: string): string; classify(str: string): string; underscore(str: string): string; capitalize(str: string): string; group(name: string, group: string | undefined): string; featurePath(group: boolean | undefined, flat: boolean | undefined, path: string, name: string): string; sanitize: (str: string) => string; }; export declare const toComponentClassName: (name: string) => string; export declare const toNgModuleClassName: (name: string) => string; export declare const actionToFileChangeMap: { c: string; o: string; d: string; }; export declare function convertNgTreeToDevKit(tree: NgTree, context: any): DevkitTreeFromAngularDevkitTree; export declare class DevkitTreeFromAngularDevkitTree implements DevKitTree { tree: NgTree; private _root; private skipWritingConfigInOldFormat?; private configFileName; constructor(tree: NgTree, _root: any, skipWritingConfigInOldFormat?: boolean); get root(): any; children(dirPath: string): string[]; delete(filePath: string): void; exists(filePath: string): boolean; isFile(filePath: string): boolean; listChanges(): FileChange[]; private normalize; read(filePath: string): Buffer; read(filePath: string, encoding: BufferEncoding): string; rename(from: string, to: string): void; write(filePath: string, content: Buffer | string, options?: Parameters[2]): void; changePermissions(filePath: string, mode: Mode): void; private warnUnsupportedFilePermissionsChange; }