@bemoje/fs 0.4.1 → 1.0.1
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/README.md +116 -20
- package/index.d.ts +113 -0
- package/index.mjs +168 -0
- package/package.json +24 -19
- package/LICENSE +0 -21
- package/cjs/index.d.ts +0 -82
- package/cjs/index.d.ts.map +0 -1
- package/cjs/index.js +0 -85
- package/cjs/index.js.map +0 -1
- package/cjs/lib/FSPathFilter.d.ts +0 -84
- package/cjs/lib/FSPathFilter.d.ts.map +0 -1
- package/cjs/lib/FSPathFilter.js +0 -174
- package/cjs/lib/FSPathFilter.js.map +0 -1
- package/cjs/lib/appendFile.d.ts +0 -10
- package/cjs/lib/appendFile.d.ts.map +0 -1
- package/cjs/lib/appendFile.js +0 -23
- package/cjs/lib/appendFile.js.map +0 -1
- package/cjs/lib/appendFileLine.d.ts +0 -7
- package/cjs/lib/appendFileLine.d.ts.map +0 -1
- package/cjs/lib/appendFileLine.js +0 -16
- package/cjs/lib/appendFileLine.js.map +0 -1
- package/cjs/lib/appendFileLineSync.d.ts +0 -7
- package/cjs/lib/appendFileLineSync.d.ts.map +0 -1
- package/cjs/lib/appendFileLineSync.js +0 -16
- package/cjs/lib/appendFileLineSync.js.map +0 -1
- package/cjs/lib/appendFileSync.d.ts +0 -10
- package/cjs/lib/appendFileSync.d.ts.map +0 -1
- package/cjs/lib/appendFileSync.js +0 -23
- package/cjs/lib/appendFileSync.js.map +0 -1
- package/cjs/lib/createDirectory.d.ts +0 -9
- package/cjs/lib/createDirectory.d.ts.map +0 -1
- package/cjs/lib/createDirectory.js +0 -18
- package/cjs/lib/createDirectory.js.map +0 -1
- package/cjs/lib/createDirectorySync.d.ts +0 -8
- package/cjs/lib/createDirectorySync.d.ts.map +0 -1
- package/cjs/lib/createDirectorySync.js +0 -17
- package/cjs/lib/createDirectorySync.js.map +0 -1
- package/cjs/lib/emptyDirectory.d.ts +0 -17
- package/cjs/lib/emptyDirectory.d.ts.map +0 -1
- package/cjs/lib/emptyDirectory.js +0 -26
- package/cjs/lib/emptyDirectory.js.map +0 -1
- package/cjs/lib/emptyDirectorySync.d.ts +0 -17
- package/cjs/lib/emptyDirectorySync.d.ts.map +0 -1
- package/cjs/lib/emptyDirectorySync.js +0 -29
- package/cjs/lib/emptyDirectorySync.js.map +0 -1
- package/cjs/lib/getJsonIndentation.d.ts +0 -7
- package/cjs/lib/getJsonIndentation.d.ts.map +0 -1
- package/cjs/lib/getJsonIndentation.js +0 -17
- package/cjs/lib/getJsonIndentation.js.map +0 -1
- package/cjs/lib/getLastMofifiedFileIn.d.ts +0 -2
- package/cjs/lib/getLastMofifiedFileIn.d.ts.map +0 -1
- package/cjs/lib/getLastMofifiedFileIn.js +0 -20
- package/cjs/lib/getLastMofifiedFileIn.js.map +0 -1
- package/cjs/lib/promptUserEditInTextEditor.d.ts +0 -10
- package/cjs/lib/promptUserEditInTextEditor.d.ts.map +0 -1
- package/cjs/lib/promptUserEditInTextEditor.js +0 -30
- package/cjs/lib/promptUserEditInTextEditor.js.map +0 -1
- package/cjs/lib/promptUserEditInTextEditorSync.d.ts +0 -10
- package/cjs/lib/promptUserEditInTextEditorSync.d.ts.map +0 -1
- package/cjs/lib/promptUserEditInTextEditorSync.js +0 -27
- package/cjs/lib/promptUserEditInTextEditorSync.js.map +0 -1
- package/cjs/lib/promptUserEditJsonInTextEditor.d.ts +0 -13
- package/cjs/lib/promptUserEditJsonInTextEditor.d.ts.map +0 -1
- package/cjs/lib/promptUserEditJsonInTextEditor.js +0 -25
- package/cjs/lib/promptUserEditJsonInTextEditor.js.map +0 -1
- package/cjs/lib/promptUserEditJsonInTextEditorSync.d.ts +0 -13
- package/cjs/lib/promptUserEditJsonInTextEditorSync.d.ts.map +0 -1
- package/cjs/lib/promptUserEditJsonInTextEditorSync.js +0 -25
- package/cjs/lib/promptUserEditJsonInTextEditorSync.js.map +0 -1
- package/cjs/lib/readDirectoryDirents.d.ts +0 -11
- package/cjs/lib/readDirectoryDirents.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirents.js +0 -17
- package/cjs/lib/readDirectoryDirents.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsPaths.d.ts +0 -14
- package/cjs/lib/readDirectoryDirentsPaths.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsPaths.js +0 -27
- package/cjs/lib/readDirectoryDirentsPaths.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSafe.d.ts +0 -15
- package/cjs/lib/readDirectoryDirentsPathsSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSafe.js +0 -22
- package/cjs/lib/readDirectoryDirentsPathsSafe.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.d.ts +0 -15
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.js +0 -22
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSync.d.ts +0 -14
- package/cjs/lib/readDirectoryDirentsPathsSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSync.js +0 -27
- package/cjs/lib/readDirectoryDirentsPathsSync.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsSafe.d.ts +0 -12
- package/cjs/lib/readDirectoryDirentsSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsSafe.js +0 -20
- package/cjs/lib/readDirectoryDirentsSafe.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsSafeSync.d.ts +0 -12
- package/cjs/lib/readDirectoryDirentsSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsSafeSync.js +0 -20
- package/cjs/lib/readDirectoryDirentsSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsSync.d.ts +0 -11
- package/cjs/lib/readDirectoryDirentsSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsSync.js +0 -17
- package/cjs/lib/readDirectoryDirentsSync.js.map +0 -1
- package/cjs/lib/readDirectoryNames.d.ts +0 -7
- package/cjs/lib/readDirectoryNames.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNames.js +0 -15
- package/cjs/lib/readDirectoryNames.js.map +0 -1
- package/cjs/lib/readDirectoryNamesPaths.d.ts +0 -11
- package/cjs/lib/readDirectoryNamesPaths.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesPaths.js +0 -24
- package/cjs/lib/readDirectoryNamesPaths.js.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSafe.d.ts +0 -12
- package/cjs/lib/readDirectoryNamesPathsSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSafe.js +0 -20
- package/cjs/lib/readDirectoryNamesPathsSafe.js.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSafeSync.d.ts +0 -12
- package/cjs/lib/readDirectoryNamesPathsSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSafeSync.js +0 -20
- package/cjs/lib/readDirectoryNamesPathsSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSync.d.ts +0 -11
- package/cjs/lib/readDirectoryNamesPathsSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSync.js +0 -24
- package/cjs/lib/readDirectoryNamesPathsSync.js.map +0 -1
- package/cjs/lib/readDirectoryNamesSafe.d.ts +0 -8
- package/cjs/lib/readDirectoryNamesSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesSafe.js +0 -18
- package/cjs/lib/readDirectoryNamesSafe.js.map +0 -1
- package/cjs/lib/readDirectoryNamesSafeSync.d.ts +0 -8
- package/cjs/lib/readDirectoryNamesSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesSafeSync.js +0 -18
- package/cjs/lib/readDirectoryNamesSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryNamesSync.d.ts +0 -7
- package/cjs/lib/readDirectoryNamesSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesSync.js +0 -15
- package/cjs/lib/readDirectoryNamesSync.js.map +0 -1
- package/cjs/lib/readDirectoryPaths.d.ts +0 -7
- package/cjs/lib/readDirectoryPaths.d.ts.map +0 -1
- package/cjs/lib/readDirectoryPaths.js +0 -18
- package/cjs/lib/readDirectoryPaths.js.map +0 -1
- package/cjs/lib/readDirectoryPathsSafe.d.ts +0 -8
- package/cjs/lib/readDirectoryPathsSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryPathsSafe.js +0 -19
- package/cjs/lib/readDirectoryPathsSafe.js.map +0 -1
- package/cjs/lib/readDirectoryPathsSafeSync.d.ts +0 -8
- package/cjs/lib/readDirectoryPathsSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryPathsSafeSync.js +0 -19
- package/cjs/lib/readDirectoryPathsSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryPathsSync.d.ts +0 -7
- package/cjs/lib/readDirectoryPathsSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryPathsSync.js +0 -18
- package/cjs/lib/readDirectoryPathsSync.js.map +0 -1
- package/cjs/lib/readDirectoryStats.d.ts +0 -13
- package/cjs/lib/readDirectoryStats.d.ts.map +0 -1
- package/cjs/lib/readDirectoryStats.js +0 -33
- package/cjs/lib/readDirectoryStats.js.map +0 -1
- package/cjs/lib/readDirectoryStatsSafe.d.ts +0 -14
- package/cjs/lib/readDirectoryStatsSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryStatsSafe.js +0 -20
- package/cjs/lib/readDirectoryStatsSafe.js.map +0 -1
- package/cjs/lib/readDirectoryStatsSafeSync.d.ts +0 -14
- package/cjs/lib/readDirectoryStatsSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryStatsSafeSync.js +0 -20
- package/cjs/lib/readDirectoryStatsSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryStatsSync.d.ts +0 -13
- package/cjs/lib/readDirectoryStatsSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryStatsSync.js +0 -32
- package/cjs/lib/readDirectoryStatsSync.js.map +0 -1
- package/cjs/lib/readFile.d.ts +0 -22
- package/cjs/lib/readFile.d.ts.map +0 -1
- package/cjs/lib/readFile.js +0 -21
- package/cjs/lib/readFile.js.map +0 -1
- package/cjs/lib/readFileBuffer.d.ts +0 -20
- package/cjs/lib/readFileBuffer.d.ts.map +0 -1
- package/cjs/lib/readFileBuffer.js +0 -20
- package/cjs/lib/readFileBuffer.js.map +0 -1
- package/cjs/lib/readFileBufferSafe.d.ts +0 -12
- package/cjs/lib/readFileBufferSafe.d.ts.map +0 -1
- package/cjs/lib/readFileBufferSafe.js +0 -24
- package/cjs/lib/readFileBufferSafe.js.map +0 -1
- package/cjs/lib/readFileBufferSafeSync.d.ts +0 -12
- package/cjs/lib/readFileBufferSafeSync.d.ts.map +0 -1
- package/cjs/lib/readFileBufferSafeSync.js +0 -24
- package/cjs/lib/readFileBufferSafeSync.js.map +0 -1
- package/cjs/lib/readFileBufferSync.d.ts +0 -10
- package/cjs/lib/readFileBufferSync.d.ts.map +0 -1
- package/cjs/lib/readFileBufferSync.js +0 -17
- package/cjs/lib/readFileBufferSync.js.map +0 -1
- package/cjs/lib/readFileFirstLine.d.ts +0 -5
- package/cjs/lib/readFileFirstLine.d.ts.map +0 -1
- package/cjs/lib/readFileFirstLine.js +0 -21
- package/cjs/lib/readFileFirstLine.js.map +0 -1
- package/cjs/lib/readFileSafe.d.ts +0 -14
- package/cjs/lib/readFileSafe.d.ts.map +0 -1
- package/cjs/lib/readFileSafe.js +0 -26
- package/cjs/lib/readFileSafe.js.map +0 -1
- package/cjs/lib/readFileSafeSync.d.ts +0 -14
- package/cjs/lib/readFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/readFileSafeSync.js +0 -26
- package/cjs/lib/readFileSafeSync.js.map +0 -1
- package/cjs/lib/readFileSync.d.ts +0 -11
- package/cjs/lib/readFileSync.d.ts.map +0 -1
- package/cjs/lib/readFileSync.js +0 -18
- package/cjs/lib/readFileSync.js.map +0 -1
- package/cjs/lib/readJsonFile.d.ts +0 -2
- package/cjs/lib/readJsonFile.d.ts.map +0 -1
- package/cjs/lib/readJsonFile.js +0 -6
- package/cjs/lib/readJsonFile.js.map +0 -1
- package/cjs/lib/readJsonFileSafe.d.ts +0 -10
- package/cjs/lib/readJsonFileSafe.d.ts.map +0 -1
- package/cjs/lib/readJsonFileSafe.js +0 -22
- package/cjs/lib/readJsonFileSafe.js.map +0 -1
- package/cjs/lib/readJsonFileSafeSync.d.ts +0 -10
- package/cjs/lib/readJsonFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/readJsonFileSafeSync.js +0 -22
- package/cjs/lib/readJsonFileSafeSync.js.map +0 -1
- package/cjs/lib/readJsonFileSync.d.ts +0 -2
- package/cjs/lib/readJsonFileSync.d.ts.map +0 -1
- package/cjs/lib/readJsonFileSync.js +0 -6
- package/cjs/lib/readJsonFileSync.js.map +0 -1
- package/cjs/lib/removeDirectory.d.ts +0 -2
- package/cjs/lib/removeDirectory.d.ts.map +0 -1
- package/cjs/lib/removeDirectory.js +0 -6
- package/cjs/lib/removeDirectory.js.map +0 -1
- package/cjs/lib/removeDirectorySync.d.ts +0 -2
- package/cjs/lib/removeDirectorySync.d.ts.map +0 -1
- package/cjs/lib/removeDirectorySync.js +0 -6
- package/cjs/lib/removeDirectorySync.js.map +0 -1
- package/cjs/lib/removeFile.d.ts +0 -2
- package/cjs/lib/removeFile.d.ts.map +0 -1
- package/cjs/lib/removeFile.js +0 -6
- package/cjs/lib/removeFile.js.map +0 -1
- package/cjs/lib/removeFileSync.d.ts +0 -2
- package/cjs/lib/removeFileSync.d.ts.map +0 -1
- package/cjs/lib/removeFileSync.js +0 -6
- package/cjs/lib/removeFileSync.js.map +0 -1
- package/cjs/lib/tempFile.d.ts +0 -7
- package/cjs/lib/tempFile.d.ts.map +0 -1
- package/cjs/lib/tempFile.js +0 -27
- package/cjs/lib/tempFile.js.map +0 -1
- package/cjs/lib/tempFileSync.d.ts +0 -7
- package/cjs/lib/tempFileSync.d.ts.map +0 -1
- package/cjs/lib/tempFileSync.js +0 -27
- package/cjs/lib/tempFileSync.js.map +0 -1
- package/cjs/lib/types/IGetUserInputFromEditorOptions.d.ts +0 -16
- package/cjs/lib/types/IGetUserInputFromEditorOptions.d.ts.map +0 -1
- package/cjs/lib/types/IGetUserInputFromEditorOptions.js +0 -3
- package/cjs/lib/types/IGetUserInputFromEditorOptions.js.map +0 -1
- package/cjs/lib/types/IJFReadOptions.d.ts +0 -2
- package/cjs/lib/types/IJFReadOptions.d.ts.map +0 -1
- package/cjs/lib/types/IJFReadOptions.js +0 -3
- package/cjs/lib/types/IJFReadOptions.js.map +0 -1
- package/cjs/lib/types/IJFWriteOptions.d.ts +0 -2
- package/cjs/lib/types/IJFWriteOptions.d.ts.map +0 -1
- package/cjs/lib/types/IJFWriteOptions.js +0 -3
- package/cjs/lib/types/IJFWriteOptions.js.map +0 -1
- package/cjs/lib/types/IJsonOutputOptions.d.ts +0 -2
- package/cjs/lib/types/IJsonOutputOptions.d.ts.map +0 -1
- package/cjs/lib/types/IJsonOutputOptions.js +0 -3
- package/cjs/lib/types/IJsonOutputOptions.js.map +0 -1
- package/cjs/lib/types/ILogFileData.d.ts +0 -6
- package/cjs/lib/types/ILogFileData.d.ts.map +0 -1
- package/cjs/lib/types/ILogFileData.js +0 -3
- package/cjs/lib/types/ILogFileData.js.map +0 -1
- package/cjs/lib/types/IReadJsonFileOptions.d.ts +0 -2
- package/cjs/lib/types/IReadJsonFileOptions.d.ts.map +0 -1
- package/cjs/lib/types/IReadJsonFileOptions.js +0 -3
- package/cjs/lib/types/IReadJsonFileOptions.js.map +0 -1
- package/cjs/lib/types/JsonReplacerReviver.d.ts +0 -2
- package/cjs/lib/types/JsonReplacerReviver.d.ts.map +0 -1
- package/cjs/lib/types/JsonReplacerReviver.js +0 -3
- package/cjs/lib/types/JsonReplacerReviver.js.map +0 -1
- package/cjs/lib/updateFile.d.ts +0 -11
- package/cjs/lib/updateFile.d.ts.map +0 -1
- package/cjs/lib/updateFile.js +0 -20
- package/cjs/lib/updateFile.js.map +0 -1
- package/cjs/lib/updateFileSafe.d.ts +0 -13
- package/cjs/lib/updateFileSafe.d.ts.map +0 -1
- package/cjs/lib/updateFileSafe.js +0 -28
- package/cjs/lib/updateFileSafe.js.map +0 -1
- package/cjs/lib/updateFileSafeSync.d.ts +0 -13
- package/cjs/lib/updateFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/updateFileSafeSync.js +0 -28
- package/cjs/lib/updateFileSafeSync.js.map +0 -1
- package/cjs/lib/updateFileSync.d.ts +0 -11
- package/cjs/lib/updateFileSync.d.ts.map +0 -1
- package/cjs/lib/updateFileSync.js +0 -20
- package/cjs/lib/updateFileSync.js.map +0 -1
- package/cjs/lib/updateJsonFile.d.ts +0 -15
- package/cjs/lib/updateJsonFile.d.ts.map +0 -1
- package/cjs/lib/updateJsonFile.js +0 -20
- package/cjs/lib/updateJsonFile.js.map +0 -1
- package/cjs/lib/updateJsonFileSafe.d.ts +0 -17
- package/cjs/lib/updateJsonFileSafe.d.ts.map +0 -1
- package/cjs/lib/updateJsonFileSafe.js +0 -28
- package/cjs/lib/updateJsonFileSafe.js.map +0 -1
- package/cjs/lib/updateJsonFileSafeSync.d.ts +0 -17
- package/cjs/lib/updateJsonFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/updateJsonFileSafeSync.js +0 -28
- package/cjs/lib/updateJsonFileSafeSync.js.map +0 -1
- package/cjs/lib/updateJsonFileSync.d.ts +0 -15
- package/cjs/lib/updateJsonFileSync.d.ts.map +0 -1
- package/cjs/lib/updateJsonFileSync.js +0 -20
- package/cjs/lib/updateJsonFileSync.js.map +0 -1
- package/cjs/lib/writeFile.d.ts +0 -2
- package/cjs/lib/writeFile.d.ts.map +0 -1
- package/cjs/lib/writeFile.js +0 -6
- package/cjs/lib/writeFile.js.map +0 -1
- package/cjs/lib/writeFileSafe.d.ts +0 -2
- package/cjs/lib/writeFileSafe.d.ts.map +0 -1
- package/cjs/lib/writeFileSafe.js +0 -6
- package/cjs/lib/writeFileSafe.js.map +0 -1
- package/cjs/lib/writeFileSafeSync.d.ts +0 -2
- package/cjs/lib/writeFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/writeFileSafeSync.js +0 -6
- package/cjs/lib/writeFileSafeSync.js.map +0 -1
- package/cjs/lib/writeFileSync.d.ts +0 -2
- package/cjs/lib/writeFileSync.d.ts.map +0 -1
- package/cjs/lib/writeFileSync.js +0 -6
- package/cjs/lib/writeFileSync.js.map +0 -1
- package/cjs/lib/writeJsonFile.d.ts +0 -2
- package/cjs/lib/writeJsonFile.d.ts.map +0 -1
- package/cjs/lib/writeJsonFile.js +0 -6
- package/cjs/lib/writeJsonFile.js.map +0 -1
- package/cjs/lib/writeJsonFileSafe.d.ts +0 -2
- package/cjs/lib/writeJsonFileSafe.d.ts.map +0 -1
- package/cjs/lib/writeJsonFileSafe.js +0 -6
- package/cjs/lib/writeJsonFileSafe.js.map +0 -1
- package/cjs/lib/writeJsonFileSafeSync.d.ts +0 -2
- package/cjs/lib/writeJsonFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/writeJsonFileSafeSync.js +0 -6
- package/cjs/lib/writeJsonFileSafeSync.js.map +0 -1
- package/cjs/lib/writeJsonFileSync.d.ts +0 -2
- package/cjs/lib/writeJsonFileSync.d.ts.map +0 -1
- package/cjs/lib/writeJsonFileSync.js +0 -6
- package/cjs/lib/writeJsonFileSync.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDirectory.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/emptyDirectory.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,6DAAyD;AAEzD;;;;;;;;;GASG;AACI,KAAK,UAAU,cAAc,CAClC,OAAe,EACf,SAAkG;IAElG,IAAI,CAAC,SAAS;QAAE,OAAO,MAAM,kBAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACjD,KAAK,MAAM,KAAK,IAAI,MAAM,IAAA,uCAAkB,EAAC,OAAO,CAAC,EAAE;QACrD,IAAI,MAAM,SAAS,CAAC,KAAK,CAAC;YAAE,MAAM,kBAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;KACxD;AACH,CAAC;AARD,wCAQC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
/**
|
|
4
|
-
* Ensures that a directory is empty. Deletes directory contents if the directory is not empty.
|
|
5
|
-
* If the directory does not exist, it is created.
|
|
6
|
-
* The directory itself is not deleted.
|
|
7
|
-
*
|
|
8
|
-
* Pass a predicate function to remove only certain files from the directory.
|
|
9
|
-
*
|
|
10
|
-
* @param dirpath - The path of the directory to wipe.
|
|
11
|
-
* @param predicate - If the function returns true for a file, that file is removed from the directory.
|
|
12
|
-
*/
|
|
13
|
-
export declare function emptyDirectorySync(dirpath: string, predicate?: (stats: fs.Stats & {
|
|
14
|
-
name: string;
|
|
15
|
-
path: string;
|
|
16
|
-
}) => boolean): void;
|
|
17
|
-
//# sourceMappingURL=emptyDirectorySync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDirectorySync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/emptyDirectorySync.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,GACxE,IAAI,CASN"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyDirectorySync = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
-
/**
|
|
8
|
-
* Ensures that a directory is empty. Deletes directory contents if the directory is not empty.
|
|
9
|
-
* If the directory does not exist, it is created.
|
|
10
|
-
* The directory itself is not deleted.
|
|
11
|
-
*
|
|
12
|
-
* Pass a predicate function to remove only certain files from the directory.
|
|
13
|
-
*
|
|
14
|
-
* @param dirpath - The path of the directory to wipe.
|
|
15
|
-
* @param predicate - If the function returns true for a file, that file is removed from the directory.
|
|
16
|
-
*/
|
|
17
|
-
function emptyDirectorySync(dirpath, predicate) {
|
|
18
|
-
if (!predicate)
|
|
19
|
-
return fs_extra_1.default.emptyDirSync(dirpath);
|
|
20
|
-
for (const name of fs_extra_1.default.readdirSync(dirpath)) {
|
|
21
|
-
const fspath = path_1.default.join(dirpath, name);
|
|
22
|
-
const stats = fs_extra_1.default.statSync(fspath);
|
|
23
|
-
if (predicate(Object.assign(stats, { name, path: fspath }))) {
|
|
24
|
-
fs_extra_1.default.removeSync(fspath);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.emptyDirectorySync = emptyDirectorySync;
|
|
29
|
-
//# sourceMappingURL=emptyDirectorySync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDirectorySync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/emptyDirectorySync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAChC,OAAe,EACf,SAAyE;IAEzE,IAAI,CAAC,SAAS;QAAE,OAAO,kBAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;IAC/C,KAAK,MAAM,IAAI,IAAI,kBAAE,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;QAC1C,MAAM,MAAM,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACvC,MAAM,KAAK,GAAG,kBAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QACjC,IAAI,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE;YAC3D,kBAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;SACtB;KACF;AACH,CAAC;AAZD,gDAYC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This function calculates the indentation level of a JSON string.
|
|
3
|
-
* @param json - The JSON string whose indentation level is to be calculated.
|
|
4
|
-
* @returns The number of leading spaces on the second line of the JSON string, or 0 if the JSON string has less than two lines or if the second line does not start with any spaces.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getJsonIndentation(json: string): number;
|
|
7
|
-
//# sourceMappingURL=getJsonIndentation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getJsonIndentation.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/getJsonIndentation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKvD"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getJsonIndentation = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* This function calculates the indentation level of a JSON string.
|
|
6
|
-
* @param json - The JSON string whose indentation level is to be calculated.
|
|
7
|
-
* @returns The number of leading spaces on the second line of the JSON string, or 0 if the JSON string has less than two lines or if the second line does not start with any spaces.
|
|
8
|
-
*/
|
|
9
|
-
function getJsonIndentation(json) {
|
|
10
|
-
const lines = json.split('\n');
|
|
11
|
-
if (lines.length < 2)
|
|
12
|
-
return 0;
|
|
13
|
-
const leadingSpaces = lines[1].match(/^(\s+)/);
|
|
14
|
-
return leadingSpaces ? leadingSpaces[0].length : 0;
|
|
15
|
-
}
|
|
16
|
-
exports.getJsonIndentation = getJsonIndentation;
|
|
17
|
-
//# sourceMappingURL=getJsonIndentation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getJsonIndentation.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/getJsonIndentation.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC9B,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,CAAA;IAC9B,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC9C,OAAO,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AACpD,CAAC;AALD,gDAKC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLastMofifiedFileIn.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/getLastMofifiedFileIn.ts"],"names":[],"mappings":"AAGA,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAW5E"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLastMofifiedFileIn = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
-
async function getLastMofifiedFileIn(dirpath) {
|
|
8
|
-
const children = await fs_extra_1.default.readdir(dirpath);
|
|
9
|
-
const filtered = children
|
|
10
|
-
.map((fname) => {
|
|
11
|
-
const fpath = path_1.default.join(dirpath, fname);
|
|
12
|
-
const stat = fs_extra_1.default.statSync(fpath);
|
|
13
|
-
return [fpath, stat.mtimeMs, stat.isFile()];
|
|
14
|
-
})
|
|
15
|
-
.filter((a) => a[2]);
|
|
16
|
-
const sorted = filtered.sort((a, b) => b[1] - a[1]);
|
|
17
|
-
return sorted[0][0];
|
|
18
|
-
}
|
|
19
|
-
exports.getLastMofifiedFileIn = getLastMofifiedFileIn;
|
|
20
|
-
//# sourceMappingURL=getLastMofifiedFileIn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLastMofifiedFileIn.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/getLastMofifiedFileIn.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEhB,KAAK,UAAU,qBAAqB,CAAC,OAAe;IACzD,MAAM,QAAQ,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAC1C,MAAM,QAAQ,GAAG,QAAQ;SACtB,GAAG,CAAC,CAAC,KAAa,EAAE,EAAE;QACrB,MAAM,KAAK,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACvC,MAAM,IAAI,GAAG,kBAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC/B,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IAC7C,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAgC,CAAA;IACrD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACnD,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACrB,CAAC;AAXD,sDAWC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IGetUserInputFromEditorOptions } from './types/IGetUserInputFromEditorOptions';
|
|
2
|
-
/**
|
|
3
|
-
* Prompts the user to edit a string in the user's text editor.
|
|
4
|
-
*
|
|
5
|
-
* @example ```ts
|
|
6
|
-
* promptUserEditInTextEditor({ editor: 'notepad' }).then(console.log)
|
|
7
|
-
* ```
|
|
8
|
-
*/
|
|
9
|
-
export declare function promptUserEditInTextEditor(options?: IGetUserInputFromEditorOptions): Promise<string>;
|
|
10
|
-
//# sourceMappingURL=promptUserEditInTextEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptUserEditInTextEditor.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditInTextEditor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAA;AAKvF;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,GAAE,8BAAmC,GAAG,OAAO,CAAC,MAAM,CAAC,CAU9G"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.promptUserEditInTextEditor = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const util_1 = tslib_1.__importDefault(require("util"));
|
|
6
|
-
const os_1 = require("@bemoje/os");
|
|
7
|
-
const child_process_1 = require("child_process");
|
|
8
|
-
const readFile_1 = require("./readFile");
|
|
9
|
-
const tempFile_1 = require("./tempFile");
|
|
10
|
-
const writeFile_1 = require("./writeFile");
|
|
11
|
-
/**
|
|
12
|
-
* Prompts the user to edit a string in the user's text editor.
|
|
13
|
-
*
|
|
14
|
-
* @example ```ts
|
|
15
|
-
* promptUserEditInTextEditor({ editor: 'notepad' }).then(console.log)
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
async function promptUserEditInTextEditor(options = {}) {
|
|
19
|
-
const content = options.content ?? '';
|
|
20
|
-
let extension = options.extension ?? '.txt';
|
|
21
|
-
extension = extension.startsWith('.') ? extension : '.' + extension;
|
|
22
|
-
const editor = options.editor ?? (0, os_1.defaultOpenInEditorCommand)();
|
|
23
|
-
return await (0, tempFile_1.tempFile)(extension, async (tempfile) => {
|
|
24
|
-
await (0, writeFile_1.writeFile)(tempfile, content);
|
|
25
|
-
await util_1.default.promisify(child_process_1.exec)(`${editor} ${tempfile}`);
|
|
26
|
-
return await (0, readFile_1.readFile)(tempfile);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
exports.promptUserEditInTextEditor = promptUserEditInTextEditor;
|
|
30
|
-
//# sourceMappingURL=promptUserEditInTextEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptUserEditInTextEditor.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditInTextEditor.ts"],"names":[],"mappings":";;;;AAAA,wDAAuB;AACvB,mCAAuD;AACvD,iDAAoC;AAEpC,yCAAqC;AACrC,yCAAqC;AACrC,2CAAuC;AAEvC;;;;;;GAMG;AACI,KAAK,UAAU,0BAA0B,CAAC,UAA0C,EAAE;IAC3F,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAA;IACrC,IAAI,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,MAAM,CAAA;IAC3C,SAAS,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAA;IACnE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAA,+BAA0B,GAAE,CAAA;IAC7D,OAAO,MAAM,IAAA,mBAAQ,EAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;QAClD,MAAM,IAAA,qBAAS,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QAClC,MAAM,cAAI,CAAC,SAAS,CAAC,oBAAI,CAAC,CAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC,CAAA;QACnD,OAAO,MAAM,IAAA,mBAAQ,EAAC,QAAQ,CAAC,CAAA;IACjC,CAAC,CAAC,CAAA;AACJ,CAAC;AAVD,gEAUC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IGetUserInputFromEditorOptions } from './types/IGetUserInputFromEditorOptions';
|
|
2
|
-
/**
|
|
3
|
-
* Prompts the user to edit a string in the user's text editor.
|
|
4
|
-
*
|
|
5
|
-
* @example ```ts
|
|
6
|
-
* promptUserEditInTextEditor({ editor: 'notepad' })
|
|
7
|
-
* ```
|
|
8
|
-
*/
|
|
9
|
-
export declare function promptUserEditInTextEditorSync(options?: IGetUserInputFromEditorOptions): string;
|
|
10
|
-
//# sourceMappingURL=promptUserEditInTextEditorSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptUserEditInTextEditorSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditInTextEditorSync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAA;AAKvF;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,8BAAmC,GAAG,MAAM,CAUnG"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.promptUserEditInTextEditorSync = void 0;
|
|
4
|
-
const child_process_1 = require("child_process");
|
|
5
|
-
const readFileSync_1 = require("./readFileSync");
|
|
6
|
-
const tempFileSync_1 = require("./tempFileSync");
|
|
7
|
-
const writeFileSync_1 = require("./writeFileSync");
|
|
8
|
-
/**
|
|
9
|
-
* Prompts the user to edit a string in the user's text editor.
|
|
10
|
-
*
|
|
11
|
-
* @example ```ts
|
|
12
|
-
* promptUserEditInTextEditor({ editor: 'notepad' })
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
function promptUserEditInTextEditorSync(options = {}) {
|
|
16
|
-
const content = options.content ?? '';
|
|
17
|
-
let extension = options.extension ?? '.txt';
|
|
18
|
-
extension = extension.startsWith('.') ? extension : '.' + extension;
|
|
19
|
-
const editor = options.editor ?? 'code -w'; //defaultOpenInEditorCommand()
|
|
20
|
-
return (0, tempFileSync_1.tempFileSync)(extension, (tempfile) => {
|
|
21
|
-
(0, writeFileSync_1.writeFileSync)(tempfile, content);
|
|
22
|
-
(0, child_process_1.execSync)(`${editor} ${tempfile}`, { stdio: 'inherit' });
|
|
23
|
-
return (0, readFileSync_1.readFileSync)(tempfile);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
exports.promptUserEditInTextEditorSync = promptUserEditInTextEditorSync;
|
|
27
|
-
//# sourceMappingURL=promptUserEditInTextEditorSync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptUserEditInTextEditorSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditInTextEditorSync.ts"],"names":[],"mappings":";;;AAAA,iDAAwC;AAExC,iDAA6C;AAC7C,iDAA6C;AAC7C,mDAA+C;AAE/C;;;;;;GAMG;AACH,SAAgB,8BAA8B,CAAC,UAA0C,EAAE;IACzF,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAA;IACrC,IAAI,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,MAAM,CAAA;IAC3C,SAAS,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAA;IACnE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,SAAS,CAAA,CAAC,8BAA8B;IACzE,OAAO,IAAA,2BAAY,EAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE;QAC1C,IAAA,6BAAa,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QAChC,IAAA,wBAAQ,EAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAA;QACvD,OAAO,IAAA,2BAAY,EAAC,QAAQ,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;AACJ,CAAC;AAVD,wEAUC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Edit a JSON-stringify-compatible value in the user's editor and return the (JSON.parse'd) result.
|
|
3
|
-
*
|
|
4
|
-
* @param value - The value to edit (NOT a json string). Defaults to an empty object.
|
|
5
|
-
* @param editor - Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).
|
|
6
|
-
* - Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'
|
|
7
|
-
*
|
|
8
|
-
* @example ```ts
|
|
9
|
-
* promptUserEditJsonInTextEditor([1, 2]).then(console.log)
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
export declare function promptUserEditJsonInTextEditor<T = any, R extends T = T>(value?: T, editor?: string): Promise<R>;
|
|
13
|
-
//# sourceMappingURL=promptUserEditJsonInTextEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptUserEditJsonInTextEditor.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditJsonInTextEditor.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAsB,8BAA8B,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAC3E,KAAK,GAAE,CAAW,EAClB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,CAAC,CAAC,CAOZ"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.promptUserEditJsonInTextEditor = void 0;
|
|
4
|
-
const promptUserEditInTextEditor_1 = require("./promptUserEditInTextEditor");
|
|
5
|
-
/**
|
|
6
|
-
* Edit a JSON-stringify-compatible value in the user's editor and return the (JSON.parse'd) result.
|
|
7
|
-
*
|
|
8
|
-
* @param value - The value to edit (NOT a json string). Defaults to an empty object.
|
|
9
|
-
* @param editor - Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).
|
|
10
|
-
* - Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'
|
|
11
|
-
*
|
|
12
|
-
* @example ```ts
|
|
13
|
-
* promptUserEditJsonInTextEditor([1, 2]).then(console.log)
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
async function promptUserEditJsonInTextEditor(value = {}, editor) {
|
|
17
|
-
const json = await (0, promptUserEditInTextEditor_1.promptUserEditInTextEditor)({
|
|
18
|
-
editor,
|
|
19
|
-
content: JSON.stringify(value, null, 2),
|
|
20
|
-
extension: '.json',
|
|
21
|
-
});
|
|
22
|
-
return JSON.parse(json);
|
|
23
|
-
}
|
|
24
|
-
exports.promptUserEditJsonInTextEditor = promptUserEditJsonInTextEditor;
|
|
25
|
-
//# sourceMappingURL=promptUserEditJsonInTextEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptUserEditJsonInTextEditor.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditJsonInTextEditor.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE;;;;;;;;;;GAUG;AACI,KAAK,UAAU,8BAA8B,CAClD,QAAW,EAAO,EAClB,MAAe;IAEf,MAAM,IAAI,GAAG,MAAM,IAAA,uDAA0B,EAAC;QAC5C,MAAM;QACN,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACvC,SAAS,EAAE,OAAO;KACnB,CAAC,CAAA;IACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAA;AAC9B,CAAC;AAVD,wEAUC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Edit a JSON-stringify-compatible value in the user's editor and return the (JSON.parse'd) result.
|
|
3
|
-
*
|
|
4
|
-
* @param value - The value to edit (NOT a json string). Defaults to an empty object.
|
|
5
|
-
* @param editor - Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).
|
|
6
|
-
* - Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'
|
|
7
|
-
*
|
|
8
|
-
* @example ```ts
|
|
9
|
-
* promptUserEditJsonInTextEditorSync([1, 2])
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
export declare function promptUserEditJsonInTextEditorSync<T = any, R extends T = T>(value?: T, editor?: string): R;
|
|
13
|
-
//# sourceMappingURL=promptUserEditJsonInTextEditorSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptUserEditJsonInTextEditorSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditJsonInTextEditorSync.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,kCAAkC,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,KAAK,GAAE,CAAW,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAOnH"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.promptUserEditJsonInTextEditorSync = void 0;
|
|
4
|
-
const promptUserEditInTextEditorSync_1 = require("./promptUserEditInTextEditorSync");
|
|
5
|
-
/**
|
|
6
|
-
* Edit a JSON-stringify-compatible value in the user's editor and return the (JSON.parse'd) result.
|
|
7
|
-
*
|
|
8
|
-
* @param value - The value to edit (NOT a json string). Defaults to an empty object.
|
|
9
|
-
* @param editor - Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).
|
|
10
|
-
* - Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'
|
|
11
|
-
*
|
|
12
|
-
* @example ```ts
|
|
13
|
-
* promptUserEditJsonInTextEditorSync([1, 2])
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
function promptUserEditJsonInTextEditorSync(value = {}, editor) {
|
|
17
|
-
const json = (0, promptUserEditInTextEditorSync_1.promptUserEditInTextEditorSync)({
|
|
18
|
-
editor,
|
|
19
|
-
content: JSON.stringify(value, null, 2),
|
|
20
|
-
extension: '.json',
|
|
21
|
-
});
|
|
22
|
-
return JSON.parse(json);
|
|
23
|
-
}
|
|
24
|
-
exports.promptUserEditJsonInTextEditorSync = promptUserEditJsonInTextEditorSync;
|
|
25
|
-
//# sourceMappingURL=promptUserEditJsonInTextEditorSync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptUserEditJsonInTextEditorSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditJsonInTextEditorSync.ts"],"names":[],"mappings":";;;AAAA,qFAAiF;AAEjF;;;;;;;;;;GAUG;AACH,SAAgB,kCAAkC,CAA2B,QAAW,EAAO,EAAE,MAAe;IAC9G,MAAM,IAAI,GAAG,IAAA,+DAA8B,EAAC;QAC1C,MAAM;QACN,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACvC,SAAS,EAAE,OAAO;KACnB,CAAC,CAAA;IACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAA;AAC9B,CAAC;AAPD,gFAOC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
/**
|
|
4
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
-
*
|
|
6
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
7
|
-
*
|
|
8
|
-
* @param dirpath - The path of the directory to read.
|
|
9
|
-
*/
|
|
10
|
-
export declare function readDirectoryDirents(dirpath: string): Promise<fs.Dirent[]>;
|
|
11
|
-
//# sourceMappingURL=readDirectoryDirents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirents.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirents.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAEzB;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAEhF"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readDirectoryDirents = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
/**
|
|
7
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
8
|
-
*
|
|
9
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
10
|
-
*
|
|
11
|
-
* @param dirpath - The path of the directory to read.
|
|
12
|
-
*/
|
|
13
|
-
async function readDirectoryDirents(dirpath) {
|
|
14
|
-
return await fs_extra_1.default.readdir(dirpath, { withFileTypes: true });
|
|
15
|
-
}
|
|
16
|
-
exports.readDirectoryDirents = readDirectoryDirents;
|
|
17
|
-
//# sourceMappingURL=readDirectoryDirents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirents.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirents.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;;GAMG;AACI,KAAK,UAAU,oBAAoB,CAAC,OAAe;IACxD,OAAO,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AAC3D,CAAC;AAFD,oDAEC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
/**
|
|
4
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
-
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
6
|
-
*
|
|
7
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
8
|
-
*
|
|
9
|
-
* @param dirpath - The path of the directory to read.
|
|
10
|
-
*/
|
|
11
|
-
export declare function readDirectoryDirentsPaths(dirpath: string): Promise<Array<fs.Dirent & {
|
|
12
|
-
get path(): string;
|
|
13
|
-
}>>;
|
|
14
|
-
//# sourceMappingURL=readDirectoryDirentsPaths.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirentsPaths.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPaths.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;GAOG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG;IAAE,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,CAAC,CAUnH"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readDirectoryDirentsPaths = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
-
/**
|
|
8
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
-
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
10
|
-
*
|
|
11
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
12
|
-
*
|
|
13
|
-
* @param dirpath - The path of the directory to read.
|
|
14
|
-
*/
|
|
15
|
-
async function readDirectoryDirentsPaths(dirpath) {
|
|
16
|
-
const dirents = await fs_extra_1.default.readdir(dirpath, { withFileTypes: true });
|
|
17
|
-
return dirents.map((dirent) => {
|
|
18
|
-
return Object.defineProperty(dirent, 'path', {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get() {
|
|
21
|
-
return path_1.default.join(dirpath, this.name);
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
exports.readDirectoryDirentsPaths = readDirectoryDirentsPaths;
|
|
27
|
-
//# sourceMappingURL=readDirectoryDirentsPaths.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirentsPaths.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPaths.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;;;;GAOG;AACI,KAAK,UAAU,yBAAyB,CAAC,OAAe;IAC7D,MAAM,OAAO,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;IAClE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,OAAO,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;YAC3C,UAAU,EAAE,IAAI;YAChB,GAAG;gBACD,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;YACtC,CAAC;SACF,CAAuC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACJ,CAAC;AAVD,8DAUC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
/**
|
|
4
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
-
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
6
|
-
* If the directory does not exist, returns undefined-
|
|
7
|
-
*
|
|
8
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
9
|
-
*
|
|
10
|
-
* @param dirpath - The path of the directory to read.
|
|
11
|
-
*/
|
|
12
|
-
export declare function readDirectoryDirentsPathsSafe(dirpath: string): Promise<Array<fs.Dirent & {
|
|
13
|
-
get path(): string;
|
|
14
|
-
}> | undefined>;
|
|
15
|
-
//# sourceMappingURL=readDirectoryDirentsPathsSafe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirentsPathsSafe.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSafe.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;;GAQG;AAEH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG;IAAE,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAAC,CAGhE"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readDirectoryDirentsPathsSafe = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
const readDirectoryDirentsPaths_1 = require("./readDirectoryDirentsPaths");
|
|
7
|
-
/**
|
|
8
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
-
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
10
|
-
* If the directory does not exist, returns undefined-
|
|
11
|
-
*
|
|
12
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
13
|
-
*
|
|
14
|
-
* @param dirpath - The path of the directory to read.
|
|
15
|
-
*/
|
|
16
|
-
async function readDirectoryDirentsPathsSafe(dirpath) {
|
|
17
|
-
if (!(await fs_extra_1.default.pathExists(dirpath)))
|
|
18
|
-
return undefined;
|
|
19
|
-
return await (0, readDirectoryDirentsPaths_1.readDirectoryDirentsPaths)(dirpath);
|
|
20
|
-
}
|
|
21
|
-
exports.readDirectoryDirentsPathsSafe = readDirectoryDirentsPathsSafe;
|
|
22
|
-
//# sourceMappingURL=readDirectoryDirentsPathsSafe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirentsPathsSafe.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSafe.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,2EAAuE;AAEvE;;;;;;;;GAQG;AAEI,KAAK,UAAU,6BAA6B,CACjD,OAAe;IAEf,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IACrD,OAAO,MAAM,IAAA,qDAAyB,EAAC,OAAO,CAAC,CAAA;AACjD,CAAC;AALD,sEAKC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
/**
|
|
4
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
-
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
6
|
-
* If the directory does not exist, returns undefined.
|
|
7
|
-
*
|
|
8
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
9
|
-
*
|
|
10
|
-
* @param dirpath - The path of the directory to read.
|
|
11
|
-
*/
|
|
12
|
-
export declare function readDirectoryDirentsPathsSafeSync(dirpath: string): Array<fs.Dirent & {
|
|
13
|
-
get path(): string;
|
|
14
|
-
}> | undefined;
|
|
15
|
-
//# sourceMappingURL=readDirectoryDirentsPathsSafeSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirentsPathsSafeSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSafeSync.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;;GAQG;AAEH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,MAAM,GACd,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG;IAAE,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAGvD"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readDirectoryDirentsPathsSafeSync = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
const readDirectoryDirentsPathsSync_1 = require("./readDirectoryDirentsPathsSync");
|
|
7
|
-
/**
|
|
8
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
-
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
10
|
-
* If the directory does not exist, returns undefined.
|
|
11
|
-
*
|
|
12
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
13
|
-
*
|
|
14
|
-
* @param dirpath - The path of the directory to read.
|
|
15
|
-
*/
|
|
16
|
-
function readDirectoryDirentsPathsSafeSync(dirpath) {
|
|
17
|
-
if (!fs_extra_1.default.pathExistsSync(dirpath))
|
|
18
|
-
return undefined;
|
|
19
|
-
return (0, readDirectoryDirentsPathsSync_1.readDirectoryDirentsPathsSync)(dirpath);
|
|
20
|
-
}
|
|
21
|
-
exports.readDirectoryDirentsPathsSafeSync = readDirectoryDirentsPathsSafeSync;
|
|
22
|
-
//# sourceMappingURL=readDirectoryDirentsPathsSafeSync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirentsPathsSafeSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSafeSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,mFAA+E;AAE/E;;;;;;;;GAQG;AAEH,SAAgB,iCAAiC,CAC/C,OAAe;IAEf,IAAI,CAAC,kBAAE,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAA;IACjD,OAAO,IAAA,6DAA6B,EAAC,OAAO,CAAC,CAAA;AAC/C,CAAC;AALD,8EAKC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
/**
|
|
4
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
-
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
6
|
-
*
|
|
7
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
8
|
-
*
|
|
9
|
-
* @param dirpath - The path of the directory to read.
|
|
10
|
-
*/
|
|
11
|
-
export declare function readDirectoryDirentsPathsSync(dirpath: string): Array<fs.Dirent & {
|
|
12
|
-
get path(): string;
|
|
13
|
-
}>;
|
|
14
|
-
//# sourceMappingURL=readDirectoryDirentsPathsSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirentsPathsSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSync.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG;IAAE,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,CAUxG"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readDirectoryDirentsPathsSync = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
-
/**
|
|
8
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
-
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
10
|
-
*
|
|
11
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
12
|
-
*
|
|
13
|
-
* @param dirpath - The path of the directory to read.
|
|
14
|
-
*/
|
|
15
|
-
function readDirectoryDirentsPathsSync(dirpath) {
|
|
16
|
-
const dirents = fs_extra_1.default.readdirSync(dirpath, { withFileTypes: true });
|
|
17
|
-
return dirents.map((dirent) => {
|
|
18
|
-
return Object.defineProperty(dirent, 'path', {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get() {
|
|
21
|
-
return path_1.default.join(dirpath, this.name);
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
exports.readDirectoryDirentsPathsSync = readDirectoryDirentsPathsSync;
|
|
27
|
-
//# sourceMappingURL=readDirectoryDirentsPathsSync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirentsPathsSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;;;;GAOG;AACH,SAAgB,6BAA6B,CAAC,OAAe;IAC3D,MAAM,OAAO,GAAG,kBAAE,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,OAAO,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;YAC3C,UAAU,EAAE,IAAI;YAChB,GAAG;gBACD,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;YACtC,CAAC;SACF,CAAuC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACJ,CAAC;AAVD,sEAUC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
/**
|
|
4
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
-
* If the directory does not exist, returns undefined.
|
|
6
|
-
*
|
|
7
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
8
|
-
*
|
|
9
|
-
* @param dirpath - The path of the directory to read.
|
|
10
|
-
*/
|
|
11
|
-
export declare function readDirectoryDirentsSafe(dirpath: string): Promise<fs.Dirent[] | undefined>;
|
|
12
|
-
//# sourceMappingURL=readDirectoryDirentsSafe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirentsSafe.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsSafe.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAEzB;;;;;;;GAOG;AAEH,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAGhG"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readDirectoryDirentsSafe = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
/**
|
|
7
|
-
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
8
|
-
* If the directory does not exist, returns undefined.
|
|
9
|
-
*
|
|
10
|
-
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
11
|
-
*
|
|
12
|
-
* @param dirpath - The path of the directory to read.
|
|
13
|
-
*/
|
|
14
|
-
async function readDirectoryDirentsSafe(dirpath) {
|
|
15
|
-
if (!(await fs_extra_1.default.pathExists(dirpath)))
|
|
16
|
-
return undefined;
|
|
17
|
-
return await fs_extra_1.default.readdir(dirpath, { withFileTypes: true });
|
|
18
|
-
}
|
|
19
|
-
exports.readDirectoryDirentsSafe = readDirectoryDirentsSafe;
|
|
20
|
-
//# sourceMappingURL=readDirectoryDirentsSafe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readDirectoryDirentsSafe.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsSafe.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;;;GAOG;AAEI,KAAK,UAAU,wBAAwB,CAAC,OAAe;IAC5D,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IACrD,OAAO,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AAC3D,CAAC;AAHD,4DAGC"}
|