@breadstone-infrastructure/utilities 0.0.12-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cli/Abstracts/ProgramCommandBase.d.ts +60 -0
- package/Cli/Abstracts/ProgramCommandBase.d.ts.map +1 -0
- package/Cli/Abstracts/ProgramCommandBase.js +64 -0
- package/Cli/Abstracts/ProgramCommandBase.js.map +1 -0
- package/Cli/Builders/ProgramBuilder.d.ts +39 -0
- package/Cli/Builders/ProgramBuilder.d.ts.map +1 -0
- package/Cli/Builders/ProgramBuilder.js +73 -0
- package/Cli/Builders/ProgramBuilder.js.map +1 -0
- package/Cli/Builders/ProgramCommandBuilder.d.ts +78 -0
- package/Cli/Builders/ProgramCommandBuilder.d.ts.map +1 -0
- package/Cli/Builders/ProgramCommandBuilder.js +147 -0
- package/Cli/Builders/ProgramCommandBuilder.js.map +1 -0
- package/Cli/Interfaces/IProgramArg.d.ts +11 -0
- package/Cli/Interfaces/IProgramArg.d.ts.map +1 -0
- package/Cli/Interfaces/IProgramArg.js +4 -0
- package/Cli/Interfaces/IProgramArg.js.map +1 -0
- package/Cli/Interfaces/IProgramArgOptions.d.ts +9 -0
- package/Cli/Interfaces/IProgramArgOptions.d.ts.map +1 -0
- package/Cli/Interfaces/IProgramArgOptions.js +4 -0
- package/Cli/Interfaces/IProgramArgOptions.js.map +1 -0
- package/Cli/Interfaces/IProgramArgs.d.ts +27 -0
- package/Cli/Interfaces/IProgramArgs.d.ts.map +1 -0
- package/Cli/Interfaces/IProgramArgs.js +4 -0
- package/Cli/Interfaces/IProgramArgs.js.map +1 -0
- package/Cli/Interfaces/IProgramCommand.d.ts +53 -0
- package/Cli/Interfaces/IProgramCommand.d.ts.map +1 -0
- package/Cli/Interfaces/IProgramCommand.js +4 -0
- package/Cli/Interfaces/IProgramCommand.js.map +1 -0
- package/Cli/Interfaces/IProgramCommands.d.ts +47 -0
- package/Cli/Interfaces/IProgramCommands.d.ts.map +1 -0
- package/Cli/Interfaces/IProgramCommands.js +4 -0
- package/Cli/Interfaces/IProgramCommands.js.map +1 -0
- package/Cli/Interfaces/IProgramConfig.d.ts +10 -0
- package/Cli/Interfaces/IProgramConfig.d.ts.map +1 -0
- package/Cli/Interfaces/IProgramConfig.js +3 -0
- package/Cli/Interfaces/IProgramConfig.js.map +1 -0
- package/Cli/Interfaces/IProgramInit.d.ts +14 -0
- package/Cli/Interfaces/IProgramInit.d.ts.map +1 -0
- package/Cli/Interfaces/IProgramInit.js +3 -0
- package/Cli/Interfaces/IProgramInit.js.map +1 -0
- package/Cli/Program.d.ts +97 -0
- package/Cli/Program.d.ts.map +1 -0
- package/Cli/Program.js +217 -0
- package/Cli/Program.js.map +1 -0
- package/Cli/ProgramArgs.d.ts +39 -0
- package/Cli/ProgramArgs.d.ts.map +1 -0
- package/Cli/ProgramArgs.js +83 -0
- package/Cli/ProgramArgs.js.map +1 -0
- package/Cli/ProgramCommandResult.d.ts +13 -0
- package/Cli/ProgramCommandResult.d.ts.map +1 -0
- package/Cli/ProgramCommandResult.js +3 -0
- package/Cli/ProgramCommandResult.js.map +1 -0
- package/Cli/ProgramCommands.d.ts +66 -0
- package/Cli/ProgramCommands.d.ts.map +1 -0
- package/Cli/ProgramCommands.js +173 -0
- package/Cli/ProgramCommands.js.map +1 -0
- package/Cli/ProgramConfig.d.ts +24 -0
- package/Cli/ProgramConfig.d.ts.map +1 -0
- package/Cli/ProgramConfig.js +51 -0
- package/Cli/ProgramConfig.js.map +1 -0
- package/Cli/ProgramDoneFn.d.ts +5 -0
- package/Cli/ProgramDoneFn.d.ts.map +1 -0
- package/Cli/ProgramDoneFn.js +3 -0
- package/Cli/ProgramDoneFn.js.map +1 -0
- package/Compiler/TypeScript.d.ts +19 -0
- package/Compiler/TypeScript.d.ts.map +1 -0
- package/Compiler/TypeScript.js +166 -0
- package/Compiler/TypeScript.js.map +1 -0
- package/DI/Container.d.ts +73 -0
- package/DI/Container.d.ts.map +1 -0
- package/DI/Container.js +143 -0
- package/DI/Container.js.map +1 -0
- package/DI/Inject.d.ts +11 -0
- package/DI/Inject.d.ts.map +1 -0
- package/DI/Inject.js +18 -0
- package/DI/Inject.js.map +1 -0
- package/Decorators/EnumerableDecorator.d.ts +6 -0
- package/Decorators/EnumerableDecorator.d.ts.map +1 -0
- package/Decorators/EnumerableDecorator.js +18 -0
- package/Decorators/EnumerableDecorator.js.map +1 -0
- package/Events/AsyncEventEmitter.d.ts +8 -0
- package/Events/AsyncEventEmitter.d.ts.map +1 -0
- package/Events/AsyncEventEmitter.js +37 -0
- package/Events/AsyncEventEmitter.js.map +1 -0
- package/IO/CustomElementManifest.d.ts +254 -0
- package/IO/CustomElementManifest.d.ts.map +1 -0
- package/IO/CustomElementManifest.js +56 -0
- package/IO/CustomElementManifest.js.map +1 -0
- package/IO/Directory.d.ts +78 -0
- package/IO/Directory.d.ts.map +1 -0
- package/IO/Directory.js +184 -0
- package/IO/Directory.js.map +1 -0
- package/IO/Encoding.d.ts +2 -0
- package/IO/Encoding.d.ts.map +1 -0
- package/IO/Encoding.js +3 -0
- package/IO/Encoding.js.map +1 -0
- package/IO/File.d.ts +148 -0
- package/IO/File.d.ts.map +1 -0
- package/IO/File.js +314 -0
- package/IO/File.js.map +1 -0
- package/IO/FileSystemInfo.d.ts +46 -0
- package/IO/FileSystemInfo.d.ts.map +1 -0
- package/IO/FileSystemInfo.js +129 -0
- package/IO/FileSystemInfo.js.map +1 -0
- package/IO/FileSystemWatcher.d.ts +49 -0
- package/IO/FileSystemWatcher.d.ts.map +1 -0
- package/IO/FileSystemWatcher.js +93 -0
- package/IO/FileSystemWatcher.js.map +1 -0
- package/IO/Glob.d.ts +35 -0
- package/IO/Glob.d.ts.map +1 -0
- package/IO/Glob.js +152 -0
- package/IO/Glob.js.map +1 -0
- package/IO/Json.d.ts +84 -0
- package/IO/Json.d.ts.map +1 -0
- package/IO/Json.js +114 -0
- package/IO/Json.js.map +1 -0
- package/IO/Path.d.ts +125 -0
- package/IO/Path.d.ts.map +1 -0
- package/IO/Path.js +283 -0
- package/IO/Path.js.map +1 -0
- package/IO/PcfControlManifest.d.ts +79 -0
- package/IO/PcfControlManifest.d.ts.map +1 -0
- package/IO/PcfControlManifest.js +93 -0
- package/IO/PcfControlManifest.js.map +1 -0
- package/IO/Reader/Interfaces/IFileReader.d.ts +30 -0
- package/IO/Reader/Interfaces/IFileReader.d.ts.map +1 -0
- package/IO/Reader/Interfaces/IFileReader.js +3 -0
- package/IO/Reader/Interfaces/IFileReader.js.map +1 -0
- package/IO/Reader/TextFileReader.d.ts +53 -0
- package/IO/Reader/TextFileReader.d.ts.map +1 -0
- package/IO/Reader/TextFileReader.js +167 -0
- package/IO/Reader/TextFileReader.js.map +1 -0
- package/IO/Resx.d.ts +49 -0
- package/IO/Resx.d.ts.map +1 -0
- package/IO/Resx.js +95 -0
- package/IO/Resx.js.map +1 -0
- package/IO/SymbolikLink.d.ts +6 -0
- package/IO/SymbolikLink.d.ts.map +1 -0
- package/IO/SymbolikLink.js +10 -0
- package/IO/SymbolikLink.js.map +1 -0
- package/IO/Template.d.ts +41 -0
- package/IO/Template.d.ts.map +1 -0
- package/IO/Template.js +71 -0
- package/IO/Template.js.map +1 -0
- package/IO/TemporaryDirectory.d.ts +28 -0
- package/IO/TemporaryDirectory.d.ts.map +1 -0
- package/IO/TemporaryDirectory.js +76 -0
- package/IO/TemporaryDirectory.js.map +1 -0
- package/IO/TemporaryFile.d.ts +28 -0
- package/IO/TemporaryFile.d.ts.map +1 -0
- package/IO/TemporaryFile.js +77 -0
- package/IO/TemporaryFile.js.map +1 -0
- package/IO/Writer/Interfaces/IFileWriter.d.ts +31 -0
- package/IO/Writer/Interfaces/IFileWriter.d.ts.map +1 -0
- package/IO/Writer/Interfaces/IFileWriter.js +4 -0
- package/IO/Writer/Interfaces/IFileWriter.js.map +1 -0
- package/IO/Writer/TextFileWriter.d.ts +56 -0
- package/IO/Writer/TextFileWriter.d.ts.map +1 -0
- package/IO/Writer/TextFileWriter.js +129 -0
- package/IO/Writer/TextFileWriter.js.map +1 -0
- package/IO/vNext/FileCache.d.ts +46 -0
- package/IO/vNext/FileCache.d.ts.map +1 -0
- package/IO/vNext/FileCache.js +94 -0
- package/IO/vNext/FileCache.js.map +1 -0
- package/IO/vNext/FileSystem.d.ts +107 -0
- package/IO/vNext/FileSystem.d.ts.map +1 -0
- package/IO/vNext/FileSystem.js +148 -0
- package/IO/vNext/FileSystem.js.map +1 -0
- package/IO/vNext/Interfaces/IFileCache.d.ts +56 -0
- package/IO/vNext/Interfaces/IFileCache.d.ts.map +1 -0
- package/IO/vNext/Interfaces/IFileCache.js +3 -0
- package/IO/vNext/Interfaces/IFileCache.js.map +1 -0
- package/IO/vNext/Interfaces/IFileSystem.d.ts +102 -0
- package/IO/vNext/Interfaces/IFileSystem.d.ts.map +1 -0
- package/IO/vNext/Interfaces/IFileSystem.js +4 -0
- package/IO/vNext/Interfaces/IFileSystem.js.map +1 -0
- package/Index.d.ts +62 -0
- package/Index.d.ts.map +1 -0
- package/Index.js +132 -0
- package/Index.js.map +1 -0
- package/Intl/Languages.d.ts +12 -0
- package/Intl/Languages.d.ts.map +1 -0
- package/Intl/Languages.js +865 -0
- package/Intl/Languages.js.map +1 -0
- package/LICENSE +21 -0
- package/Logging/Appenders/Abstracts/Appender.d.ts +21 -0
- package/Logging/Appenders/Abstracts/Appender.d.ts.map +1 -0
- package/Logging/Appenders/Abstracts/Appender.js +78 -0
- package/Logging/Appenders/Abstracts/Appender.js.map +1 -0
- package/Logging/Appenders/Interfaces/IAppender.d.ts +13 -0
- package/Logging/Appenders/Interfaces/IAppender.d.ts.map +1 -0
- package/Logging/Appenders/Interfaces/IAppender.js +4 -0
- package/Logging/Appenders/Interfaces/IAppender.js.map +1 -0
- package/Logging/Appenders/Interfaces/IAppenderConfig.d.ts +9 -0
- package/Logging/Appenders/Interfaces/IAppenderConfig.d.ts.map +1 -0
- package/Logging/Appenders/Interfaces/IAppenderConfig.js +3 -0
- package/Logging/Appenders/Interfaces/IAppenderConfig.js.map +1 -0
- package/Logging/Appenders/LogLevelAppender.d.ts +29 -0
- package/Logging/Appenders/LogLevelAppender.d.ts.map +1 -0
- package/Logging/Appenders/LogLevelAppender.js +102 -0
- package/Logging/Appenders/LogLevelAppender.js.map +1 -0
- package/Logging/Appenders/MessageAppender.d.ts +26 -0
- package/Logging/Appenders/MessageAppender.d.ts.map +1 -0
- package/Logging/Appenders/MessageAppender.js +91 -0
- package/Logging/Appenders/MessageAppender.js.map +1 -0
- package/Logging/Appenders/Styles/AppenderTerminalColors.d.ts +20 -0
- package/Logging/Appenders/Styles/AppenderTerminalColors.d.ts.map +1 -0
- package/Logging/Appenders/Styles/AppenderTerminalColors.js +4 -0
- package/Logging/Appenders/Styles/AppenderTerminalColors.js.map +1 -0
- package/Logging/Appenders/Styles/LogLevelAppenderStyle.d.ts +5 -0
- package/Logging/Appenders/Styles/LogLevelAppenderStyle.d.ts.map +1 -0
- package/Logging/Appenders/Styles/LogLevelAppenderStyle.js +3 -0
- package/Logging/Appenders/Styles/LogLevelAppenderStyle.js.map +1 -0
- package/Logging/Appenders/TagAppender.d.ts +25 -0
- package/Logging/Appenders/TagAppender.d.ts.map +1 -0
- package/Logging/Appenders/TagAppender.js +49 -0
- package/Logging/Appenders/TagAppender.js.map +1 -0
- package/Logging/Appenders/TimeStampAppender.d.ts +22 -0
- package/Logging/Appenders/TimeStampAppender.d.ts.map +1 -0
- package/Logging/Appenders/TimeStampAppender.js +44 -0
- package/Logging/Appenders/TimeStampAppender.js.map +1 -0
- package/Logging/Interfaces/ILogEntry.d.ts +13 -0
- package/Logging/Interfaces/ILogEntry.d.ts.map +1 -0
- package/Logging/Interfaces/ILogEntry.js +4 -0
- package/Logging/Interfaces/ILogEntry.js.map +1 -0
- package/Logging/Interfaces/ILogOptions.d.ts +17 -0
- package/Logging/Interfaces/ILogOptions.d.ts.map +1 -0
- package/Logging/Interfaces/ILogOptions.js +4 -0
- package/Logging/Interfaces/ILogOptions.js.map +1 -0
- package/Logging/Interfaces/ILoggerScope.d.ts +7 -0
- package/Logging/Interfaces/ILoggerScope.d.ts.map +1 -0
- package/Logging/Interfaces/ILoggerScope.js +3 -0
- package/Logging/Interfaces/ILoggerScope.js.map +1 -0
- package/Logging/Interfaces/ILoggerScopeConfig.d.ts +9 -0
- package/Logging/Interfaces/ILoggerScopeConfig.d.ts.map +1 -0
- package/Logging/Interfaces/ILoggerScopeConfig.js +4 -0
- package/Logging/Interfaces/ILoggerScopeConfig.js.map +1 -0
- package/Logging/LogLevel.d.ts +5 -0
- package/Logging/LogLevel.d.ts.map +1 -0
- package/Logging/LogLevel.js +3 -0
- package/Logging/LogLevel.js.map +1 -0
- package/Logging/Logger.d.ts +148 -0
- package/Logging/Logger.d.ts.map +1 -0
- package/Logging/Logger.js +326 -0
- package/Logging/Logger.js.map +1 -0
- package/Logging/LoggerConfig.d.ts +45 -0
- package/Logging/LoggerConfig.d.ts.map +1 -0
- package/Logging/LoggerConfig.js +83 -0
- package/Logging/LoggerConfig.js.map +1 -0
- package/Logging/LoggerScope.d.ts +16 -0
- package/Logging/LoggerScope.d.ts.map +1 -0
- package/Logging/LoggerScope.js +81 -0
- package/Logging/LoggerScope.js.map +1 -0
- package/Logging/LoggerSuppressor.d.ts +10 -0
- package/Logging/LoggerSuppressor.d.ts.map +1 -0
- package/Logging/LoggerSuppressor.js +43 -0
- package/Logging/LoggerSuppressor.js.map +1 -0
- package/Logging/LoggerUtils.d.ts +47 -0
- package/Logging/LoggerUtils.d.ts.map +1 -0
- package/Logging/LoggerUtils.js +102 -0
- package/Logging/LoggerUtils.js.map +1 -0
- package/Logging/vNext/ConsoleLogger.d.ts +56 -0
- package/Logging/vNext/ConsoleLogger.d.ts.map +1 -0
- package/Logging/vNext/ConsoleLogger.js +76 -0
- package/Logging/vNext/ConsoleLogger.js.map +1 -0
- package/Logging/vNext/Interfaces/ILogger.d.ts +38 -0
- package/Logging/vNext/Interfaces/ILogger.d.ts.map +1 -0
- package/Logging/vNext/Interfaces/ILogger.js +3 -0
- package/Logging/vNext/Interfaces/ILogger.js.map +1 -0
- package/Logging/vNext/LoggerExtensions.d.ts +79 -0
- package/Logging/vNext/LoggerExtensions.d.ts.map +1 -0
- package/Logging/vNext/LoggerExtensions.js +175 -0
- package/Logging/vNext/LoggerExtensions.js.map +1 -0
- package/Logging/vNext/Styles/Style.d.ts +9 -0
- package/Logging/vNext/Styles/Style.d.ts.map +1 -0
- package/Logging/vNext/Styles/Style.js +17 -0
- package/Logging/vNext/Styles/Style.js.map +1 -0
- package/Logging/vNext/Styles/StyleDirectives.d.ts +61 -0
- package/Logging/vNext/Styles/StyleDirectives.d.ts.map +1 -0
- package/Logging/vNext/Styles/StyleDirectives.js +118 -0
- package/Logging/vNext/Styles/StyleDirectives.js.map +1 -0
- package/System/Args.d.ts +20 -0
- package/System/Args.d.ts.map +1 -0
- package/System/Args.js +45 -0
- package/System/Args.js.map +1 -0
- package/System/Array.d.ts +41 -0
- package/System/Array.d.ts.map +1 -0
- package/System/Array.js +91 -0
- package/System/Array.js.map +1 -0
- package/System/Assign.d.ts +12 -0
- package/System/Assign.d.ts.map +1 -0
- package/System/Assign.js +40 -0
- package/System/Assign.js.map +1 -0
- package/System/Boolean.d.ts +20 -0
- package/System/Boolean.d.ts.map +1 -0
- package/System/Boolean.js +52 -0
- package/System/Boolean.js.map +1 -0
- package/System/Error.d.ts +9 -0
- package/System/Error.d.ts.map +1 -0
- package/System/Error.js +20 -0
- package/System/Error.js.map +1 -0
- package/System/Errors.d.ts +7 -0
- package/System/Errors.d.ts.map +1 -0
- package/System/Errors.js +18 -0
- package/System/Errors.js.map +1 -0
- package/System/Formatter.d.ts +4 -0
- package/System/Formatter.d.ts.map +1 -0
- package/System/Formatter.js +17 -0
- package/System/Formatter.js.map +1 -0
- package/System/Guard.d.ts +5 -0
- package/System/Guard.d.ts.map +1 -0
- package/System/Guard.js +29 -0
- package/System/Guard.js.map +1 -0
- package/System/Interfaces/IType.d.ts +7 -0
- package/System/Interfaces/IType.d.ts.map +1 -0
- package/System/Interfaces/IType.js +3 -0
- package/System/Interfaces/IType.js.map +1 -0
- package/System/Interfaces/IUnknown.d.ts +7 -0
- package/System/Interfaces/IUnknown.d.ts.map +1 -0
- package/System/Interfaces/IUnknown.js +3 -0
- package/System/Interfaces/IUnknown.js.map +1 -0
- package/System/List.d.ts +27 -0
- package/System/List.d.ts.map +1 -0
- package/System/List.js +84 -0
- package/System/List.js.map +1 -0
- package/System/Number.d.ts +10 -0
- package/System/Number.d.ts.map +1 -0
- package/System/Number.js +28 -0
- package/System/Number.js.map +1 -0
- package/System/Process.d.ts +30 -0
- package/System/Process.d.ts.map +1 -0
- package/System/Process.js +167 -0
- package/System/Process.js.map +1 -0
- package/System/Require.d.ts +8 -0
- package/System/Require.d.ts.map +1 -0
- package/System/Require.js +20 -0
- package/System/Require.js.map +1 -0
- package/System/Stopwatch.d.ts +19 -0
- package/System/Stopwatch.d.ts.map +1 -0
- package/System/Stopwatch.js +73 -0
- package/System/Stopwatch.js.map +1 -0
- package/System/String.d.ts +19 -0
- package/System/String.d.ts.map +1 -0
- package/System/String.js +177 -0
- package/System/String.js.map +1 -0
- package/System/Time.d.ts +7 -0
- package/System/Time.d.ts.map +1 -0
- package/System/Time.js +16 -0
- package/System/Time.js.map +1 -0
- package/System/Version.d.ts +20 -0
- package/System/Version.d.ts.map +1 -0
- package/System/Version.js +135 -0
- package/System/Version.js.map +1 -0
- package/Terminal/Terminal.d.ts +7 -0
- package/Terminal/Terminal.d.ts.map +1 -0
- package/Terminal/Terminal.js +21 -0
- package/Terminal/Terminal.js.map +1 -0
- package/Terminal/TerminalColorType.d.ts +2 -0
- package/Terminal/TerminalColorType.d.ts.map +1 -0
- package/Terminal/TerminalColorType.js +3 -0
- package/Terminal/TerminalColorType.js.map +1 -0
- package/Terminal/TerminalColors.d.ts +38 -0
- package/Terminal/TerminalColors.d.ts.map +1 -0
- package/Terminal/TerminalColors.js +151 -0
- package/Terminal/TerminalColors.js.map +1 -0
- package/Terminal/TerminalSymbolType.d.ts +2 -0
- package/Terminal/TerminalSymbolType.d.ts.map +1 -0
- package/Terminal/TerminalSymbolType.js +3 -0
- package/Terminal/TerminalSymbolType.js.map +1 -0
- package/Terminal/TerminalSymbols.d.ts +7 -0
- package/Terminal/TerminalSymbols.d.ts.map +1 -0
- package/Terminal/TerminalSymbols.js +30 -0
- package/Terminal/TerminalSymbols.js.map +1 -0
- package/package.json +26 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exposes static methods for creating, moving, and enumerating through directories and subdirectories.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export declare class Directory {
|
|
6
|
+
/**
|
|
7
|
+
* Creates all directories and subdirectories in the specified path unless they already exist.
|
|
8
|
+
* @public
|
|
9
|
+
* @static
|
|
10
|
+
* @param {string} path The directory to create.
|
|
11
|
+
* @returns {void}
|
|
12
|
+
*/
|
|
13
|
+
static create(path: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Deletes an empty directory from a specified path.
|
|
16
|
+
* @param {string} path The name of the directory to remove.
|
|
17
|
+
*/
|
|
18
|
+
static delete(path: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* Determines whether the given path refers to an existing directory on disk.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
* @static
|
|
24
|
+
* @param {string} path The path to test.
|
|
25
|
+
* @returns {boolean} true if path refers to an existing directory; false if the directory does not exist or an error occurs when trying to determine if the specified directory exists.
|
|
26
|
+
*/
|
|
27
|
+
static exists(path: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Determines the total count of files and folders.
|
|
30
|
+
*
|
|
31
|
+
* @public
|
|
32
|
+
* @static
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
static count(path: string): number;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the size of a direcory.
|
|
38
|
+
* @public
|
|
39
|
+
* @static
|
|
40
|
+
* @param {string} path The path.
|
|
41
|
+
* @returns {number} The direcory size.
|
|
42
|
+
*/
|
|
43
|
+
static size(path: string): number;
|
|
44
|
+
/**
|
|
45
|
+
* Retrieves the parent directory of the specified path, including both absolute and relative paths.
|
|
46
|
+
* @public
|
|
47
|
+
* @static
|
|
48
|
+
* @param {string} path The path for which to retrieve the parent directory.
|
|
49
|
+
* @returns {string} The parent directory path.
|
|
50
|
+
*/
|
|
51
|
+
static getParent(path: string): string | null;
|
|
52
|
+
/**
|
|
53
|
+
* List all files in a directory recursively in a synchronous fashion.
|
|
54
|
+
*
|
|
55
|
+
* @param {String} path
|
|
56
|
+
* @returns {IterableIterator<String>}
|
|
57
|
+
*/
|
|
58
|
+
static walk(path: string): IterableIterator<string>;
|
|
59
|
+
/**
|
|
60
|
+
* Find directories using glob patterns.
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
* @static
|
|
64
|
+
* @param {string | string[]} pattern - The globbing pattern
|
|
65
|
+
* @returns {string[]} The Files
|
|
66
|
+
*/
|
|
67
|
+
static glob(pattern: string | Array<string>): Array<string>;
|
|
68
|
+
/**
|
|
69
|
+
* Copy a directory.
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
* @static
|
|
73
|
+
* @param {string} sourcePath The source path.
|
|
74
|
+
* @param {string} targetPath The target path.
|
|
75
|
+
*/
|
|
76
|
+
static copy(sourcePath: string, targetPath: string): void;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=Directory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Directory.d.ts","sourceRoot":"","sources":["../../src/IO/Directory.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,qBAAa,SAAS;IAIlB;;;;;;OAMG;WACW,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIxC;;;OAGG;WACW,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIxC;;;;;;;OAOG;WACW,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI3C;;;;;;OAMG;WACW,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIzC;;;;;;OAMG;WACW,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAuCxC;;;;;;OAMG;WACW,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAQpD;;;;;OAKG;WACW,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAI1D;;;;;;;OAOG;WACW,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAIlE;;;;;;;OAOG;WACW,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;CAMnE"}
|
package/IO/Directory.js
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// #region Imports
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.Directory = void 0;
|
|
28
|
+
const fse = __importStar(require("fs-extra"));
|
|
29
|
+
const Path_1 = require("./Path");
|
|
30
|
+
// #endregion
|
|
31
|
+
/**
|
|
32
|
+
* Exposes static methods for creating, moving, and enumerating through directories and subdirectories.
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
class Directory {
|
|
36
|
+
// #region Methods
|
|
37
|
+
/**
|
|
38
|
+
* Creates all directories and subdirectories in the specified path unless they already exist.
|
|
39
|
+
* @public
|
|
40
|
+
* @static
|
|
41
|
+
* @param {string} path The directory to create.
|
|
42
|
+
* @returns {void}
|
|
43
|
+
*/
|
|
44
|
+
static create(path) {
|
|
45
|
+
fse.mkdirsSync(path);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Deletes an empty directory from a specified path.
|
|
49
|
+
* @param {string} path The name of the directory to remove.
|
|
50
|
+
*/
|
|
51
|
+
static delete(path) {
|
|
52
|
+
fse.removeSync(path);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Determines whether the given path refers to an existing directory on disk.
|
|
56
|
+
*
|
|
57
|
+
* @public
|
|
58
|
+
* @static
|
|
59
|
+
* @param {string} path The path to test.
|
|
60
|
+
* @returns {boolean} true if path refers to an existing directory; false if the directory does not exist or an error occurs when trying to determine if the specified directory exists.
|
|
61
|
+
*/
|
|
62
|
+
static exists(path) {
|
|
63
|
+
return fse.existsSync(path);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Determines the total count of files and folders.
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
* @static
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
static count(path) {
|
|
73
|
+
return fse.readdirSync(path).length;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Gets the size of a direcory.
|
|
77
|
+
* @public
|
|
78
|
+
* @static
|
|
79
|
+
* @param {string} path The path.
|
|
80
|
+
* @returns {number} The direcory size.
|
|
81
|
+
*/
|
|
82
|
+
static size(path) {
|
|
83
|
+
const { separator } = Path_1.Path;
|
|
84
|
+
let size = 0;
|
|
85
|
+
const next = (path) => {
|
|
86
|
+
if (path) {
|
|
87
|
+
let err;
|
|
88
|
+
let stats;
|
|
89
|
+
try {
|
|
90
|
+
stats = fse.statSync(path);
|
|
91
|
+
}
|
|
92
|
+
catch (er) {
|
|
93
|
+
err = er;
|
|
94
|
+
}
|
|
95
|
+
if (stats) {
|
|
96
|
+
size += stats.size;
|
|
97
|
+
err = undefined;
|
|
98
|
+
let files;
|
|
99
|
+
try {
|
|
100
|
+
files = fse.readdirSync(path);
|
|
101
|
+
}
|
|
102
|
+
catch (er) {
|
|
103
|
+
err = er;
|
|
104
|
+
}
|
|
105
|
+
if (err) {
|
|
106
|
+
next();
|
|
107
|
+
}
|
|
108
|
+
else if (Array.isArray(files)) {
|
|
109
|
+
files.forEach((file) => {
|
|
110
|
+
next(path + separator + String(file));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
next(path);
|
|
117
|
+
return size;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Retrieves the parent directory of the specified path, including both absolute and relative paths.
|
|
121
|
+
* @public
|
|
122
|
+
* @static
|
|
123
|
+
* @param {string} path The path for which to retrieve the parent directory.
|
|
124
|
+
* @returns {string} The parent directory path.
|
|
125
|
+
*/
|
|
126
|
+
static getParent(path) {
|
|
127
|
+
if (path.length === 0) {
|
|
128
|
+
throw new Error('path');
|
|
129
|
+
}
|
|
130
|
+
return Path_1.Path.getDirectoryName(path);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* List all files in a directory recursively in a synchronous fashion.
|
|
134
|
+
*
|
|
135
|
+
* @param {String} path
|
|
136
|
+
* @returns {IterableIterator<String>}
|
|
137
|
+
*/
|
|
138
|
+
static walk(path) {
|
|
139
|
+
return walkSync(path);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Find directories using glob patterns.
|
|
143
|
+
*
|
|
144
|
+
* @public
|
|
145
|
+
* @static
|
|
146
|
+
* @param {string | string[]} pattern - The globbing pattern
|
|
147
|
+
* @returns {string[]} The Files
|
|
148
|
+
*/
|
|
149
|
+
static glob(pattern) {
|
|
150
|
+
return Path_1.Path.glob(pattern, { onlyDirectories: true });
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Copy a directory.
|
|
154
|
+
*
|
|
155
|
+
* @public
|
|
156
|
+
* @static
|
|
157
|
+
* @param {string} sourcePath The source path.
|
|
158
|
+
* @param {string} targetPath The target path.
|
|
159
|
+
*/
|
|
160
|
+
static copy(sourcePath, targetPath) {
|
|
161
|
+
fse.copySync(sourcePath, targetPath, { overwrite: true });
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
exports.Directory = Directory;
|
|
165
|
+
/**
|
|
166
|
+
* List all files in a directory recursively in a synchronous fashion.
|
|
167
|
+
*
|
|
168
|
+
* @param {String} dir
|
|
169
|
+
* @returns {IterableIterator<string>}
|
|
170
|
+
*/
|
|
171
|
+
function* walkSync(dir) {
|
|
172
|
+
const files = fse.readdirSync(dir);
|
|
173
|
+
for (const file of files) {
|
|
174
|
+
const pathToFile = Path_1.Path.combine(dir, file);
|
|
175
|
+
const isDirectory = fse.statSync(pathToFile).isDirectory();
|
|
176
|
+
if (isDirectory) {
|
|
177
|
+
yield* walkSync(pathToFile);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
yield pathToFile;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=Directory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Directory.js","sourceRoot":"","sources":["../../src/IO/Directory.ts"],"names":[],"mappings":"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"}
|
package/IO/Encoding.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Encoding.d.ts","sourceRoot":"","sources":["../../src/IO/Encoding.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC"}
|
package/IO/Encoding.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Encoding.js","sourceRoot":"","sources":["../../src/IO/Encoding.ts"],"names":[],"mappings":""}
|
package/IO/File.d.ts
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type { Encoding } from './Encoding';
|
|
2
|
+
import type { IResxEntry } from './Resx';
|
|
3
|
+
import type { SymbolicLink } from './SymbolikLink';
|
|
4
|
+
import { type JSONObject } from './Json';
|
|
5
|
+
export declare class File {
|
|
6
|
+
/**
|
|
7
|
+
* Determines whether the specified file exists.
|
|
8
|
+
* @public
|
|
9
|
+
* @static
|
|
10
|
+
* @param {string} path The file to check.
|
|
11
|
+
* @returns {boolean} `true` if the caller has the required permissions and path contains the name of an existing file; otherwise, `false`. This method also returns `false` if `path` is `null`, an invalid path, or a zero-length string. If the caller does not have sufficient permissions to read the specified file, no exception is thrown and the method returns `false` regardless of the existence of `path`.
|
|
12
|
+
*/
|
|
13
|
+
static exists(path: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Copies an existing file to a new file.
|
|
16
|
+
* @public
|
|
17
|
+
* @static
|
|
18
|
+
* @param {string} sourceFileName The file to copy.
|
|
19
|
+
* @param {string} destFileName The name of the destination file.
|
|
20
|
+
* @param {boolean} overwrite `true` if the destination file can be overwritten. Otherwise, `false`.
|
|
21
|
+
* @returns {void}
|
|
22
|
+
*/
|
|
23
|
+
static copy(sourceFileName: string, destFileName: string, overwrite?: boolean): void;
|
|
24
|
+
/**
|
|
25
|
+
* Opens a file, reads all text in the file with the specified encoding, and then closes the file.
|
|
26
|
+
* @public
|
|
27
|
+
* @static
|
|
28
|
+
* @param {string} path The file to open for reading.
|
|
29
|
+
* @param {Encoding} encoding The encoding applied to the contents of the file.
|
|
30
|
+
* @returns {string} A string containing all text in the file.
|
|
31
|
+
*/
|
|
32
|
+
static readAllText(path: string, encoding?: Encoding): string;
|
|
33
|
+
/**
|
|
34
|
+
* Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
|
|
35
|
+
* @public
|
|
36
|
+
* @static
|
|
37
|
+
* @param {string} path - The file to open for reading.
|
|
38
|
+
* @returns {Buffer} A buffer containing the contents of the file.
|
|
39
|
+
*/
|
|
40
|
+
static readAllBytes(path: string): Buffer;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.
|
|
43
|
+
* @public
|
|
44
|
+
* @static
|
|
45
|
+
* @param {string} path The file to write to.
|
|
46
|
+
* @param {string} contents The string to write to the file.
|
|
47
|
+
* @param {Encoding} encoding The encoding to apply to the string.
|
|
48
|
+
* @returns {void}
|
|
49
|
+
*/
|
|
50
|
+
static writeAllText(path: string, contents: string, encoding?: Encoding): void;
|
|
51
|
+
/**
|
|
52
|
+
* Creates a new file, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.
|
|
53
|
+
* @public
|
|
54
|
+
* @static
|
|
55
|
+
* @param {string} path The file to write to.
|
|
56
|
+
* @param {unknown} data The json data to write
|
|
57
|
+
* @param {Encoding} encoding The encoding to apply to the string.
|
|
58
|
+
* @returns {void}
|
|
59
|
+
*/
|
|
60
|
+
static writeAllJson(path: string, data: unknown, encoding?: Encoding): void;
|
|
61
|
+
/**
|
|
62
|
+
* Deletes the specified file.
|
|
63
|
+
* @public
|
|
64
|
+
* @static
|
|
65
|
+
* @param {string} path The name of the file to be deleted. Wildcard characters are not supported.
|
|
66
|
+
* @returns {void}
|
|
67
|
+
*/
|
|
68
|
+
static delete(path: string): void;
|
|
69
|
+
/**
|
|
70
|
+
* Moves a specified file to a new location, providing the option to specify a new file name.
|
|
71
|
+
* @public
|
|
72
|
+
* @static
|
|
73
|
+
* @param {string} sourceFileName The name of the file to move. Can include a relative or absolute path.
|
|
74
|
+
* @param {string} destFileName The new path and name for the file.
|
|
75
|
+
* @returns {void}
|
|
76
|
+
*/
|
|
77
|
+
static move(sourceFileName: string, destFileName: string): void;
|
|
78
|
+
/**
|
|
79
|
+
* @public
|
|
80
|
+
* @static
|
|
81
|
+
* @param {string} file The json file to read
|
|
82
|
+
* @returns {object} a json object
|
|
83
|
+
*/
|
|
84
|
+
static readAllJson(file: string): JSONObject;
|
|
85
|
+
/**
|
|
86
|
+
* @public
|
|
87
|
+
* @static
|
|
88
|
+
* @param {string} file The resx file to read
|
|
89
|
+
* @returns {Array<IResxEntry>} a resx object
|
|
90
|
+
*/
|
|
91
|
+
static readAllResx(file: string): Array<IResxEntry>;
|
|
92
|
+
/**
|
|
93
|
+
* @public
|
|
94
|
+
* @static
|
|
95
|
+
* @param {string} file The xml file to read
|
|
96
|
+
* @returns {T} a xml object
|
|
97
|
+
*/
|
|
98
|
+
static readAllXml<T = unknown>(file: string): T;
|
|
99
|
+
/**
|
|
100
|
+
* @public
|
|
101
|
+
* @static
|
|
102
|
+
* @param {string} file The file to hash
|
|
103
|
+
* @param {string} algorithm The crypto hash algorithm
|
|
104
|
+
* @param {string} encoding The crypto hash encoding
|
|
105
|
+
* @description Creates a hash from a file.
|
|
106
|
+
* @returns {Promise<string | Buffer>} A promise with hash object as string or buffer
|
|
107
|
+
*/
|
|
108
|
+
static hash(file: string, algorithm?: 'sha1' | 'md5', encoding?: 'hex' | 'binary'): Promise<string | Buffer>;
|
|
109
|
+
/**
|
|
110
|
+
* Find files using glob patterns.
|
|
111
|
+
*
|
|
112
|
+
* @public
|
|
113
|
+
* @static
|
|
114
|
+
* @param {string | string[]} pattern - The globbing pattern
|
|
115
|
+
* @returns {string[]} The Files
|
|
116
|
+
*/
|
|
117
|
+
static glob(pattern: string | Array<string>): Array<string>;
|
|
118
|
+
/**
|
|
119
|
+
* Extracts the local from a file.
|
|
120
|
+
*
|
|
121
|
+
* @public
|
|
122
|
+
* @static
|
|
123
|
+
* @param {string} file The file
|
|
124
|
+
* @param {string} defaultLocale The default locale
|
|
125
|
+
* @returns {string[]} The Files
|
|
126
|
+
*/
|
|
127
|
+
static getLocale(file: string, defaultLocale?: string): string;
|
|
128
|
+
/**
|
|
129
|
+
* Gets the size of a file.
|
|
130
|
+
*
|
|
131
|
+
* @public
|
|
132
|
+
* @static
|
|
133
|
+
* @param {string} file The file
|
|
134
|
+
* @returns {number} The file size.
|
|
135
|
+
*/
|
|
136
|
+
static size(file: string): number;
|
|
137
|
+
/**
|
|
138
|
+
* Create a new symbolic link to an existing file, directory or junction.
|
|
139
|
+
*
|
|
140
|
+
* @public
|
|
141
|
+
* @static
|
|
142
|
+
* @param {string} src The source file or directory.
|
|
143
|
+
* @param {string} dest The destination file or directory.
|
|
144
|
+
* @param {SymbolicLink} symbolicLink The type of symbolic should create.
|
|
145
|
+
*/
|
|
146
|
+
static createSymbolicLink(src: string, dest: string, symbolicLink: SymbolicLink): void;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=File.d.ts.map
|
package/IO/File.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../src/IO/File.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAC;AAI/C,qBAAa,IAAI;IAIb;;;;;;OAMG;WACW,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAO3C;;;;;;;;OAQG;WACW,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,GAAE,OAAe,GAAG,IAAI;IAIlG;;;;;;;OAOG;WACW,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,QAAiB,GAAG,MAAM;IAW5E;;;;;;OAMG;WACW,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIhD;;;;;;;;OAQG;WACW,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAE,QAAiB,GAAG,IAAI;IAkB7F;;;;;;;;OAQG;WACW,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,GAAE,QAAiB,GAAG,IAAI;IAQ1F;;;;;;OAMG;WACW,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAOxC;;;;;;;OAOG;WACW,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI;IAMtE;;;;;OAKG;WACW,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IASnD;;;;;OAKG;WACW,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC;IAuB1D;;;;;OAKG;WACW,UAAU,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;IAmBtD;;;;;;;;OAQG;WACW,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,GAAE,MAAM,GAAG,KAAa,EAAE,QAAQ,GAAE,KAAK,GAAG,QAAgB,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IAcjI;;;;;;;OAOG;WACW,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAIlE;;;;;;;;OAQG;WACW,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,GAAE,MAAa,GAAG,MAAM;IAiB3E;;;;;;;OAOG;WACW,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKxC;;;;;;;;OAQG;WACW,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,IAAI;CAYhG"}
|