@webiny/stdlib 0.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/LICENSE +21 -0
- package/README.md +60 -0
- package/dist/LICENSE +21 -0
- package/dist/README.md +60 -0
- package/dist/browser/features/LocalStorageCache/LocalStorageCache.d.ts +26 -0
- package/dist/browser/features/LocalStorageCache/LocalStorageCache.d.ts.map +1 -0
- package/dist/browser/features/LocalStorageCache/LocalStorageCache.js +159 -0
- package/dist/browser/features/LocalStorageCache/LocalStorageCache.js.map +1 -0
- package/dist/browser/features/LocalStorageCache/errors.d.ts +26 -0
- package/dist/browser/features/LocalStorageCache/errors.d.ts.map +1 -0
- package/dist/browser/features/LocalStorageCache/errors.js +23 -0
- package/dist/browser/features/LocalStorageCache/errors.js.map +1 -0
- package/dist/browser/features/LocalStorageCache/feature.d.ts +6 -0
- package/dist/browser/features/LocalStorageCache/feature.d.ts.map +1 -0
- package/dist/browser/features/LocalStorageCache/feature.js +10 -0
- package/dist/browser/features/LocalStorageCache/feature.js.map +1 -0
- package/dist/browser/features/LocalStorageCache/index.d.ts +4 -0
- package/dist/browser/features/LocalStorageCache/index.d.ts.map +1 -0
- package/dist/browser/features/LocalStorageCache/index.js +4 -0
- package/dist/browser/features/LocalStorageCache/index.js.map +1 -0
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/common/core/BaseError.d.ts +13 -0
- package/dist/common/core/BaseError.d.ts.map +1 -0
- package/dist/common/core/BaseError.js +8 -0
- package/dist/common/core/BaseError.js.map +1 -0
- package/dist/common/core/Result.d.ts +103 -0
- package/dist/common/core/Result.d.ts.map +1 -0
- package/dist/common/core/Result.js +127 -0
- package/dist/common/core/Result.js.map +1 -0
- package/dist/common/core/ResultAsync.d.ts +17 -0
- package/dist/common/core/ResultAsync.d.ts.map +1 -0
- package/dist/common/core/ResultAsync.js +62 -0
- package/dist/common/core/ResultAsync.js.map +1 -0
- package/dist/common/core/createAbstraction.d.ts +4 -0
- package/dist/common/core/createAbstraction.d.ts.map +1 -0
- package/dist/common/core/createAbstraction.js +5 -0
- package/dist/common/core/createAbstraction.js.map +1 -0
- package/dist/common/core/createFeature.d.ts +10 -0
- package/dist/common/core/createFeature.d.ts.map +1 -0
- package/dist/common/core/createFeature.js +9 -0
- package/dist/common/core/createFeature.js.map +1 -0
- package/dist/common/core/index.d.ts +7 -0
- package/dist/common/core/index.d.ts.map +1 -0
- package/dist/common/core/index.js +6 -0
- package/dist/common/core/index.js.map +1 -0
- package/dist/common/features/Cache/AsyncMemoryCache.d.ts +23 -0
- package/dist/common/features/Cache/AsyncMemoryCache.d.ts.map +1 -0
- package/dist/common/features/Cache/AsyncMemoryCache.js +90 -0
- package/dist/common/features/Cache/AsyncMemoryCache.js.map +1 -0
- package/dist/common/features/Cache/AsyncMemoryCacheFeature.d.ts +6 -0
- package/dist/common/features/Cache/AsyncMemoryCacheFeature.d.ts.map +1 -0
- package/dist/common/features/Cache/AsyncMemoryCacheFeature.js +10 -0
- package/dist/common/features/Cache/AsyncMemoryCacheFeature.js.map +1 -0
- package/dist/common/features/Cache/MemoryCache.d.ts +23 -0
- package/dist/common/features/Cache/MemoryCache.d.ts.map +1 -0
- package/dist/common/features/Cache/MemoryCache.js +75 -0
- package/dist/common/features/Cache/MemoryCache.js.map +1 -0
- package/dist/common/features/Cache/MemoryCacheFeature.d.ts +6 -0
- package/dist/common/features/Cache/MemoryCacheFeature.d.ts.map +1 -0
- package/dist/common/features/Cache/MemoryCacheFeature.js +10 -0
- package/dist/common/features/Cache/MemoryCacheFeature.js.map +1 -0
- package/dist/common/features/Cache/abstractions/AsyncCache.d.ts +39 -0
- package/dist/common/features/Cache/abstractions/AsyncCache.d.ts.map +1 -0
- package/dist/common/features/Cache/abstractions/AsyncCache.js +3 -0
- package/dist/common/features/Cache/abstractions/AsyncCache.js.map +1 -0
- package/dist/common/features/Cache/abstractions/Cache.d.ts +39 -0
- package/dist/common/features/Cache/abstractions/Cache.d.ts.map +1 -0
- package/dist/common/features/Cache/abstractions/Cache.js +3 -0
- package/dist/common/features/Cache/abstractions/Cache.js.map +1 -0
- package/dist/common/features/Cache/abstractions/CacheError.d.ts +5 -0
- package/dist/common/features/Cache/abstractions/CacheError.d.ts.map +1 -0
- package/dist/common/features/Cache/abstractions/CacheError.js +5 -0
- package/dist/common/features/Cache/abstractions/CacheError.js.map +1 -0
- package/dist/common/features/Cache/abstractions/index.d.ts +4 -0
- package/dist/common/features/Cache/abstractions/index.d.ts.map +1 -0
- package/dist/common/features/Cache/abstractions/index.js +4 -0
- package/dist/common/features/Cache/abstractions/index.js.map +1 -0
- package/dist/common/features/Cache/index.d.ts +8 -0
- package/dist/common/features/Cache/index.d.ts.map +1 -0
- package/dist/common/features/Cache/index.js +6 -0
- package/dist/common/features/Cache/index.js.map +1 -0
- package/dist/common/features/Logger/ConsoleLogger.d.ts +28 -0
- package/dist/common/features/Logger/ConsoleLogger.d.ts.map +1 -0
- package/dist/common/features/Logger/ConsoleLogger.js +84 -0
- package/dist/common/features/Logger/ConsoleLogger.js.map +1 -0
- package/dist/common/features/Logger/abstractions/ConsoleLoggerConfig.d.ts +27 -0
- package/dist/common/features/Logger/abstractions/ConsoleLoggerConfig.d.ts.map +1 -0
- package/dist/common/features/Logger/abstractions/ConsoleLoggerConfig.js +3 -0
- package/dist/common/features/Logger/abstractions/ConsoleLoggerConfig.js.map +1 -0
- package/dist/common/features/Logger/abstractions/Logger.d.ts +20 -0
- package/dist/common/features/Logger/abstractions/Logger.d.ts.map +1 -0
- package/dist/common/features/Logger/abstractions/Logger.js +3 -0
- package/dist/common/features/Logger/abstractions/Logger.js.map +1 -0
- package/dist/common/features/Logger/abstractions/index.d.ts +3 -0
- package/dist/common/features/Logger/abstractions/index.d.ts.map +1 -0
- package/dist/common/features/Logger/abstractions/index.js +3 -0
- package/dist/common/features/Logger/abstractions/index.js.map +1 -0
- package/dist/common/features/Logger/feature.d.ts +9 -0
- package/dist/common/features/Logger/feature.d.ts.map +1 -0
- package/dist/common/features/Logger/feature.js +13 -0
- package/dist/common/features/Logger/feature.js.map +1 -0
- package/dist/common/features/Logger/index.d.ts +5 -0
- package/dist/common/features/Logger/index.d.ts.map +1 -0
- package/dist/common/features/Logger/index.js +5 -0
- package/dist/common/features/Logger/index.js.map +1 -0
- package/dist/common/index.d.ts +11 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +9 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/utils/boolean.d.ts +7 -0
- package/dist/common/utils/boolean.d.ts.map +1 -0
- package/dist/common/utils/boolean.js +22 -0
- package/dist/common/utils/boolean.js.map +1 -0
- package/dist/common/utils/dotProp.d.ts +23 -0
- package/dist/common/utils/dotProp.d.ts.map +1 -0
- package/dist/common/utils/dotProp.js +45 -0
- package/dist/common/utils/dotProp.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/node/features/DirectoryTool/DirectoryTool.d.ts +24 -0
- package/dist/node/features/DirectoryTool/DirectoryTool.d.ts.map +1 -0
- package/dist/node/features/DirectoryTool/DirectoryTool.js +83 -0
- package/dist/node/features/DirectoryTool/DirectoryTool.js.map +1 -0
- package/dist/node/features/DirectoryTool/abstractions/DirectoryTool.d.ts +32 -0
- package/dist/node/features/DirectoryTool/abstractions/DirectoryTool.d.ts.map +1 -0
- package/dist/node/features/DirectoryTool/abstractions/DirectoryTool.js +3 -0
- package/dist/node/features/DirectoryTool/abstractions/DirectoryTool.js.map +1 -0
- package/dist/node/features/DirectoryTool/abstractions/index.d.ts +2 -0
- package/dist/node/features/DirectoryTool/abstractions/index.d.ts.map +1 -0
- package/dist/node/features/DirectoryTool/abstractions/index.js +2 -0
- package/dist/node/features/DirectoryTool/abstractions/index.js.map +1 -0
- package/dist/node/features/DirectoryTool/feature.d.ts +5 -0
- package/dist/node/features/DirectoryTool/feature.d.ts.map +1 -0
- package/dist/node/features/DirectoryTool/feature.js +9 -0
- package/dist/node/features/DirectoryTool/feature.js.map +1 -0
- package/dist/node/features/DirectoryTool/index.d.ts +4 -0
- package/dist/node/features/DirectoryTool/index.d.ts.map +1 -0
- package/dist/node/features/DirectoryTool/index.js +4 -0
- package/dist/node/features/DirectoryTool/index.js.map +1 -0
- package/dist/node/features/FileTool/FileTool.d.ts +26 -0
- package/dist/node/features/FileTool/FileTool.d.ts.map +1 -0
- package/dist/node/features/FileTool/FileTool.js +71 -0
- package/dist/node/features/FileTool/FileTool.js.map +1 -0
- package/dist/node/features/FileTool/abstractions/FileTool.d.ts +15 -0
- package/dist/node/features/FileTool/abstractions/FileTool.d.ts.map +1 -0
- package/dist/node/features/FileTool/abstractions/FileTool.js +3 -0
- package/dist/node/features/FileTool/abstractions/FileTool.js.map +1 -0
- package/dist/node/features/FileTool/abstractions/index.d.ts +2 -0
- package/dist/node/features/FileTool/abstractions/index.d.ts.map +1 -0
- package/dist/node/features/FileTool/abstractions/index.js +2 -0
- package/dist/node/features/FileTool/abstractions/index.js.map +1 -0
- package/dist/node/features/FileTool/feature.d.ts +5 -0
- package/dist/node/features/FileTool/feature.d.ts.map +1 -0
- package/dist/node/features/FileTool/feature.js +9 -0
- package/dist/node/features/FileTool/feature.js.map +1 -0
- package/dist/node/features/FileTool/index.d.ts +4 -0
- package/dist/node/features/FileTool/index.d.ts.map +1 -0
- package/dist/node/features/FileTool/index.js +4 -0
- package/dist/node/features/FileTool/index.js.map +1 -0
- package/dist/node/features/JsonFileTool/JsonFileTool.d.ts +19 -0
- package/dist/node/features/JsonFileTool/JsonFileTool.d.ts.map +1 -0
- package/dist/node/features/JsonFileTool/JsonFileTool.js +43 -0
- package/dist/node/features/JsonFileTool/JsonFileTool.js.map +1 -0
- package/dist/node/features/JsonFileTool/abstractions/JsonFileTool.d.ts +17 -0
- package/dist/node/features/JsonFileTool/abstractions/JsonFileTool.d.ts.map +1 -0
- package/dist/node/features/JsonFileTool/abstractions/JsonFileTool.js +3 -0
- package/dist/node/features/JsonFileTool/abstractions/JsonFileTool.js.map +1 -0
- package/dist/node/features/JsonFileTool/abstractions/index.d.ts +2 -0
- package/dist/node/features/JsonFileTool/abstractions/index.d.ts.map +1 -0
- package/dist/node/features/JsonFileTool/abstractions/index.js +2 -0
- package/dist/node/features/JsonFileTool/abstractions/index.js.map +1 -0
- package/dist/node/features/JsonFileTool/feature.d.ts +5 -0
- package/dist/node/features/JsonFileTool/feature.d.ts.map +1 -0
- package/dist/node/features/JsonFileTool/feature.js +9 -0
- package/dist/node/features/JsonFileTool/feature.js.map +1 -0
- package/dist/node/features/JsonFileTool/index.d.ts +4 -0
- package/dist/node/features/JsonFileTool/index.d.ts.map +1 -0
- package/dist/node/features/JsonFileTool/index.js +4 -0
- package/dist/node/features/JsonFileTool/index.js.map +1 -0
- package/dist/node/features/NdJsonReaderTool/LineAccumulator.d.ts +13 -0
- package/dist/node/features/NdJsonReaderTool/LineAccumulator.d.ts.map +1 -0
- package/dist/node/features/NdJsonReaderTool/LineAccumulator.js +68 -0
- package/dist/node/features/NdJsonReaderTool/LineAccumulator.js.map +1 -0
- package/dist/node/features/NdJsonReaderTool/NdJsonReaderTool.d.ts +22 -0
- package/dist/node/features/NdJsonReaderTool/NdJsonReaderTool.d.ts.map +1 -0
- package/dist/node/features/NdJsonReaderTool/NdJsonReaderTool.js +73 -0
- package/dist/node/features/NdJsonReaderTool/NdJsonReaderTool.js.map +1 -0
- package/dist/node/features/NdJsonReaderTool/abstractions/NdJsonReaderTool.d.ts +41 -0
- package/dist/node/features/NdJsonReaderTool/abstractions/NdJsonReaderTool.d.ts.map +1 -0
- package/dist/node/features/NdJsonReaderTool/abstractions/NdJsonReaderTool.js +3 -0
- package/dist/node/features/NdJsonReaderTool/abstractions/NdJsonReaderTool.js.map +1 -0
- package/dist/node/features/NdJsonReaderTool/abstractions/index.d.ts +2 -0
- package/dist/node/features/NdJsonReaderTool/abstractions/index.d.ts.map +1 -0
- package/dist/node/features/NdJsonReaderTool/abstractions/index.js +2 -0
- package/dist/node/features/NdJsonReaderTool/abstractions/index.js.map +1 -0
- package/dist/node/features/NdJsonReaderTool/feature.d.ts +5 -0
- package/dist/node/features/NdJsonReaderTool/feature.d.ts.map +1 -0
- package/dist/node/features/NdJsonReaderTool/feature.js +9 -0
- package/dist/node/features/NdJsonReaderTool/feature.js.map +1 -0
- package/dist/node/features/NdJsonReaderTool/index.d.ts +4 -0
- package/dist/node/features/NdJsonReaderTool/index.d.ts.map +1 -0
- package/dist/node/features/NdJsonReaderTool/index.js +4 -0
- package/dist/node/features/NdJsonReaderTool/index.js.map +1 -0
- package/dist/node/features/PackageJsonFileTool/PackageJsonFile.d.ts +67 -0
- package/dist/node/features/PackageJsonFileTool/PackageJsonFile.d.ts.map +1 -0
- package/dist/node/features/PackageJsonFileTool/PackageJsonFile.js +91 -0
- package/dist/node/features/PackageJsonFileTool/PackageJsonFile.js.map +1 -0
- package/dist/node/features/PackageJsonFileTool/PackageJsonFileTool.d.ts +23 -0
- package/dist/node/features/PackageJsonFileTool/PackageJsonFileTool.d.ts.map +1 -0
- package/dist/node/features/PackageJsonFileTool/PackageJsonFileTool.js +75 -0
- package/dist/node/features/PackageJsonFileTool/PackageJsonFileTool.js.map +1 -0
- package/dist/node/features/PackageJsonFileTool/abstractions/PackageJsonFileTool.d.ts +40 -0
- package/dist/node/features/PackageJsonFileTool/abstractions/PackageJsonFileTool.d.ts.map +1 -0
- package/dist/node/features/PackageJsonFileTool/abstractions/PackageJsonFileTool.js +3 -0
- package/dist/node/features/PackageJsonFileTool/abstractions/PackageJsonFileTool.js.map +1 -0
- package/dist/node/features/PackageJsonFileTool/abstractions/index.d.ts +2 -0
- package/dist/node/features/PackageJsonFileTool/abstractions/index.d.ts.map +1 -0
- package/dist/node/features/PackageJsonFileTool/abstractions/index.js +2 -0
- package/dist/node/features/PackageJsonFileTool/abstractions/index.js.map +1 -0
- package/dist/node/features/PackageJsonFileTool/feature.d.ts +5 -0
- package/dist/node/features/PackageJsonFileTool/feature.d.ts.map +1 -0
- package/dist/node/features/PackageJsonFileTool/feature.js +9 -0
- package/dist/node/features/PackageJsonFileTool/feature.js.map +1 -0
- package/dist/node/features/PackageJsonFileTool/index.d.ts +5 -0
- package/dist/node/features/PackageJsonFileTool/index.d.ts.map +1 -0
- package/dist/node/features/PackageJsonFileTool/index.js +5 -0
- package/dist/node/features/PackageJsonFileTool/index.js.map +1 -0
- package/dist/node/features/PathTool/PathTool.d.ts +14 -0
- package/dist/node/features/PathTool/PathTool.d.ts.map +1 -0
- package/dist/node/features/PathTool/PathTool.js +38 -0
- package/dist/node/features/PathTool/PathTool.js.map +1 -0
- package/dist/node/features/PathTool/abstractions/PathTool.d.ts +23 -0
- package/dist/node/features/PathTool/abstractions/PathTool.d.ts.map +1 -0
- package/dist/node/features/PathTool/abstractions/PathTool.js +3 -0
- package/dist/node/features/PathTool/abstractions/PathTool.js.map +1 -0
- package/dist/node/features/PathTool/abstractions/index.d.ts +2 -0
- package/dist/node/features/PathTool/abstractions/index.d.ts.map +1 -0
- package/dist/node/features/PathTool/abstractions/index.js +2 -0
- package/dist/node/features/PathTool/abstractions/index.js.map +1 -0
- package/dist/node/features/PathTool/errors.d.ts +12 -0
- package/dist/node/features/PathTool/errors.d.ts.map +1 -0
- package/dist/node/features/PathTool/errors.js +9 -0
- package/dist/node/features/PathTool/errors.js.map +1 -0
- package/dist/node/features/PathTool/feature.d.ts +5 -0
- package/dist/node/features/PathTool/feature.d.ts.map +1 -0
- package/dist/node/features/PathTool/feature.js +9 -0
- package/dist/node/features/PathTool/feature.js.map +1 -0
- package/dist/node/features/PathTool/index.d.ts +5 -0
- package/dist/node/features/PathTool/index.d.ts.map +1 -0
- package/dist/node/features/PathTool/index.js +5 -0
- package/dist/node/features/PathTool/index.js.map +1 -0
- package/dist/node/features/PinoLogger/PinoLogger.d.ts +27 -0
- package/dist/node/features/PinoLogger/PinoLogger.d.ts.map +1 -0
- package/dist/node/features/PinoLogger/PinoLogger.js +152 -0
- package/dist/node/features/PinoLogger/PinoLogger.js.map +1 -0
- package/dist/node/features/PinoLogger/abstractions/PinoLoggerConfig.d.ts +24 -0
- package/dist/node/features/PinoLogger/abstractions/PinoLoggerConfig.d.ts.map +1 -0
- package/dist/node/features/PinoLogger/abstractions/PinoLoggerConfig.js +3 -0
- package/dist/node/features/PinoLogger/abstractions/PinoLoggerConfig.js.map +1 -0
- package/dist/node/features/PinoLogger/abstractions/index.d.ts +2 -0
- package/dist/node/features/PinoLogger/abstractions/index.d.ts.map +1 -0
- package/dist/node/features/PinoLogger/abstractions/index.js +2 -0
- package/dist/node/features/PinoLogger/abstractions/index.js.map +1 -0
- package/dist/node/features/PinoLogger/feature.d.ts +9 -0
- package/dist/node/features/PinoLogger/feature.d.ts.map +1 -0
- package/dist/node/features/PinoLogger/feature.js +13 -0
- package/dist/node/features/PinoLogger/feature.js.map +1 -0
- package/dist/node/features/PinoLogger/index.d.ts +4 -0
- package/dist/node/features/PinoLogger/index.d.ts.map +1 -0
- package/dist/node/features/PinoLogger/index.js +4 -0
- package/dist/node/features/PinoLogger/index.js.map +1 -0
- package/dist/node/features/ReadStreamFactory/ReadStreamFactory.d.ts +11 -0
- package/dist/node/features/ReadStreamFactory/ReadStreamFactory.d.ts.map +1 -0
- package/dist/node/features/ReadStreamFactory/ReadStreamFactory.js +27 -0
- package/dist/node/features/ReadStreamFactory/ReadStreamFactory.js.map +1 -0
- package/dist/node/features/ReadStreamFactory/abstractions/ReadStreamFactory.d.ts +21 -0
- package/dist/node/features/ReadStreamFactory/abstractions/ReadStreamFactory.d.ts.map +1 -0
- package/dist/node/features/ReadStreamFactory/abstractions/ReadStreamFactory.js +3 -0
- package/dist/node/features/ReadStreamFactory/abstractions/ReadStreamFactory.js.map +1 -0
- package/dist/node/features/ReadStreamFactory/abstractions/index.d.ts +2 -0
- package/dist/node/features/ReadStreamFactory/abstractions/index.d.ts.map +1 -0
- package/dist/node/features/ReadStreamFactory/abstractions/index.js +2 -0
- package/dist/node/features/ReadStreamFactory/abstractions/index.js.map +1 -0
- package/dist/node/features/ReadStreamFactory/feature.d.ts +5 -0
- package/dist/node/features/ReadStreamFactory/feature.d.ts.map +1 -0
- package/dist/node/features/ReadStreamFactory/feature.js +9 -0
- package/dist/node/features/ReadStreamFactory/feature.js.map +1 -0
- package/dist/node/features/ReadStreamFactory/index.d.ts +4 -0
- package/dist/node/features/ReadStreamFactory/index.d.ts.map +1 -0
- package/dist/node/features/ReadStreamFactory/index.js +4 -0
- package/dist/node/features/ReadStreamFactory/index.js.map +1 -0
- package/dist/node/index.d.ts +9 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +9 -0
- package/dist/node/index.js.map +1 -0
- package/dist/package.json +58 -0
- package/package.json +61 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PathLike, ReadStreamOptions } from "node:fs";
|
|
2
|
+
import { ReadStreamFactory as ReadStreamFactoryAbstraction } from "./abstractions/ReadStreamFactory.js";
|
|
3
|
+
declare class ReadStreamFactoryImpl implements ReadStreamFactoryAbstraction.Interface {
|
|
4
|
+
create(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStreamFactoryAbstraction.Stream;
|
|
5
|
+
}
|
|
6
|
+
export declare const ReadStreamFactory: typeof ReadStreamFactoryImpl & {
|
|
7
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/ReadStreamFactory.js").IReadStreamFactory>;
|
|
8
|
+
};
|
|
9
|
+
export declare function createReadStreamFactory(): ReadStreamFactoryAbstraction.Interface;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ReadStreamFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadStreamFactory.d.ts","sourceRoot":"","sources":["../../../../src/node/features/ReadStreamFactory/ReadStreamFactory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE3D,OAAO,EAAE,iBAAiB,IAAI,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAcxG,cAAM,qBAAsB,YAAW,4BAA4B,CAAC,SAAS;IAClE,MAAM,CACT,IAAI,EAAE,QAAQ,EACd,OAAO,CAAC,EAAE,cAAc,GAAG,iBAAiB,GAC7C,4BAA4B,CAAC,MAAM,CAErC;CACJ;AAED,eAAO,MAAM,iBAAiB;;CAG5B,CAAC;AAEH,wBAAgB,uBAAuB,IAAI,4BAA4B,CAAC,SAAS,CAEhF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createReadStream } from "node:fs";
|
|
2
|
+
import { ReadStreamFactory as ReadStreamFactoryAbstraction } from "./abstractions/ReadStreamFactory.js";
|
|
3
|
+
class ReadStreamImpl {
|
|
4
|
+
stream;
|
|
5
|
+
constructor(stream) {
|
|
6
|
+
this.stream = stream;
|
|
7
|
+
}
|
|
8
|
+
getStream() {
|
|
9
|
+
return this.stream;
|
|
10
|
+
}
|
|
11
|
+
async [Symbol.asyncDispose]() {
|
|
12
|
+
this.stream.destroy();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
class ReadStreamFactoryImpl {
|
|
16
|
+
create(path, options) {
|
|
17
|
+
return new ReadStreamImpl(createReadStream(path, options));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export const ReadStreamFactory = ReadStreamFactoryAbstraction.createImplementation({
|
|
21
|
+
implementation: ReadStreamFactoryImpl,
|
|
22
|
+
dependencies: []
|
|
23
|
+
});
|
|
24
|
+
export function createReadStreamFactory() {
|
|
25
|
+
return new ReadStreamFactoryImpl();
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=ReadStreamFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadStreamFactory.js","sourceRoot":"","sources":["../../../../src/node/features/ReadStreamFactory/ReadStreamFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG3C,OAAO,EAAE,iBAAiB,IAAI,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAExG,MAAM,cAAc;IACoB,MAAM;IAA1C,YAAoC,MAAgB;sBAAhB,MAAM;IAAa,CAAC;IAEjD,SAAS;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAEM,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACJ;AAED,MAAM,qBAAqB;IAChB,MAAM,CACT,IAAc,EACd,OAA4C;QAE5C,OAAO,IAAI,cAAc,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAC/D,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,4BAA4B,CAAC,oBAAoB,CAAC;IAC/E,cAAc,EAAE,qBAAqB;IACrC,YAAY,EAAE,EAAE;CACnB,CAAC,CAAC;AAEH,MAAM,UAAU,uBAAuB;IACnC,OAAO,IAAI,qBAAqB,EAAE,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Readable } from "node:stream";
|
|
2
|
+
import type { PathLike, ReadStreamOptions } from "node:fs";
|
|
3
|
+
export interface IReadStream extends AsyncDisposable {
|
|
4
|
+
/** Returns the underlying Node.js Readable stream. */
|
|
5
|
+
getStream(): Readable;
|
|
6
|
+
}
|
|
7
|
+
export interface IReadStreamFactory {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a disposable read stream for the given path.
|
|
10
|
+
* Mirrors node:fs createReadStream exactly — all native options are supported.
|
|
11
|
+
* Use `await using` to guarantee the stream is destroyed on scope exit.
|
|
12
|
+
*/
|
|
13
|
+
create(path: PathLike, options?: BufferEncoding | ReadStreamOptions): IReadStream;
|
|
14
|
+
}
|
|
15
|
+
export declare const ReadStreamFactory: import("@webiny/di").Abstraction<IReadStreamFactory>;
|
|
16
|
+
export declare namespace ReadStreamFactory {
|
|
17
|
+
type Interface = IReadStreamFactory;
|
|
18
|
+
/** The disposable stream handle returned by `create()`. */
|
|
19
|
+
type Stream = IReadStream;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=ReadStreamFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadStreamFactory.d.ts","sourceRoot":"","sources":["../../../../../src/node/features/ReadStreamFactory/abstractions/ReadStreamFactory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE3D,MAAM,WAAW,WAAY,SAAQ,eAAe;IAChD,sDAAsD;IACtD,SAAS,IAAI,QAAQ,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,iBAAiB,GAAG,WAAW,CAAC;CACrF;AAED,eAAO,MAAM,iBAAiB,sDAAkE,CAAC;AAEjG,yBAAiB,iBAAiB,CAAC;IAC/B,KAAY,SAAS,GAAG,kBAAkB,CAAC;IAC3C,2DAA2D;IAC3D,KAAY,MAAM,GAAG,WAAW,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadStreamFactory.js","sourceRoot":"","sources":["../../../../../src/node/features/ReadStreamFactory/abstractions/ReadStreamFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAkBtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAqB,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/node/features/ReadStreamFactory/abstractions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/node/features/ReadStreamFactory/abstractions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../../src/node/features/ReadStreamFactory/feature.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB;;;CAKnC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createFeature } from "../../../common/index.js";
|
|
2
|
+
import { ReadStreamFactory } from "./ReadStreamFactory.js";
|
|
3
|
+
export const ReadStreamFactoryFeature = createFeature({
|
|
4
|
+
name: "Node/ReadStreamFactoryFeature",
|
|
5
|
+
register(container) {
|
|
6
|
+
container.register(ReadStreamFactory).inSingletonScope();
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/node/features/ReadStreamFactory/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAC;IAClD,IAAI,EAAE,+BAA+B;IACrC,QAAQ,CAAC,SAAS;QACd,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC7D,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/features/ReadStreamFactory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/node/features/ReadStreamFactory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { FileTool, FileToolFeature, createFileTool, type CreateFileToolParams } from "./features/FileTool/index.js";
|
|
2
|
+
export { DirectoryTool, DirectoryToolFeature, createDirectoryTool, type CreateDirectoryToolParams, type GlobOptions } from "./features/DirectoryTool/index.js";
|
|
3
|
+
export { JsonFileTool, JsonFileToolFeature, createJsonFileTool, type JsonSchema, type ReadJsonParams, type CreateJsonFileToolParams } from "./features/JsonFileTool/index.js";
|
|
4
|
+
export { PinoLoggerConfig, PinoLoggerFeature, createPinoLogger, type CreatePinoLoggerParams } from "./features/PinoLogger/index.js";
|
|
5
|
+
export { PathTool, PathToolFeature, createPathTool, PackageNotFoundError } from "./features/PathTool/index.js";
|
|
6
|
+
export { NdJsonReaderTool, NdJsonReaderToolFeature, createNdJsonReaderTool, type CreateNdJsonReaderToolParams, type NdJsonRow, type NdJsonReaderOptions } from "./features/NdJsonReaderTool/index.js";
|
|
7
|
+
export { ReadStreamFactory, ReadStreamFactoryFeature, createReadStreamFactory } from "./features/ReadStreamFactory/index.js";
|
|
8
|
+
export { PackageJsonFileTool, PackageJsonFileToolFeature, createPackageJsonFileTool, type CreatePackageJsonFileToolParams, PackageJsonFile } from "./features/PackageJsonFileTool/index.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,eAAe,EACf,cAAc,EACd,KAAK,oBAAoB,EAC5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACH,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACH,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAChC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACH,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,sBAAsB,EAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACH,QAAQ,EACR,eAAe,EACf,cAAc,EACd,oBAAoB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACH,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,KAAK,SAAS,EACd,KAAK,mBAAmB,EAC3B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACH,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EAC1B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACH,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,KAAK,+BAA+B,EACpC,eAAe,EAClB,MAAM,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { FileTool, FileToolFeature, createFileTool } from "./features/FileTool/index.js";
|
|
2
|
+
export { DirectoryTool, DirectoryToolFeature, createDirectoryTool } from "./features/DirectoryTool/index.js";
|
|
3
|
+
export { JsonFileTool, JsonFileToolFeature, createJsonFileTool } from "./features/JsonFileTool/index.js";
|
|
4
|
+
export { PinoLoggerConfig, PinoLoggerFeature, createPinoLogger } from "./features/PinoLogger/index.js";
|
|
5
|
+
export { PathTool, PathToolFeature, createPathTool, PackageNotFoundError } from "./features/PathTool/index.js";
|
|
6
|
+
export { NdJsonReaderTool, NdJsonReaderToolFeature, createNdJsonReaderTool } from "./features/NdJsonReaderTool/index.js";
|
|
7
|
+
export { ReadStreamFactory, ReadStreamFactoryFeature, createReadStreamFactory } from "./features/ReadStreamFactory/index.js";
|
|
8
|
+
export { PackageJsonFileTool, PackageJsonFileToolFeature, createPackageJsonFileTool, PackageJsonFile } from "./features/PackageJsonFileTool/index.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,eAAe,EACf,cAAc,EAEjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACH,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EAGtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACH,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAIrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACH,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAEnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACH,QAAQ,EACR,eAAe,EACf,cAAc,EACd,oBAAoB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACH,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EAIzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACH,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EAC1B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACH,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EAEzB,eAAe,EAClB,MAAM,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webiny/stdlib",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Standard library for Webiny — platform-agnostic, Node.js, and browser utilities",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./index.js",
|
|
10
|
+
"types": "./index.d.ts"
|
|
11
|
+
},
|
|
12
|
+
"./node": {
|
|
13
|
+
"import": "./node/index.js",
|
|
14
|
+
"types": "./node/index.d.ts"
|
|
15
|
+
},
|
|
16
|
+
"./browser": {
|
|
17
|
+
"import": "./browser/index.js",
|
|
18
|
+
"types": "./browser/index.d.ts"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"main": "./index.js",
|
|
22
|
+
"types": "./index.d.ts",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@webiny/di": "^1.0.1",
|
|
25
|
+
"dot-prop": "^10.1.0",
|
|
26
|
+
"fast-glob": "^3.3.3",
|
|
27
|
+
"pino": "^10.3.1",
|
|
28
|
+
"pino-pretty": "^13.1.3",
|
|
29
|
+
"type-fest": "^5.6.0",
|
|
30
|
+
"zod": "^4.4.3"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@changesets/cli": "^2.31.0",
|
|
34
|
+
"@types/node": ">=24",
|
|
35
|
+
"@typescript/native-preview": "^7.0.0-dev.20260519.1",
|
|
36
|
+
"@vitest/coverage-v8": "^4.1.6",
|
|
37
|
+
"adio": "^3.0.0",
|
|
38
|
+
"happy-dom": "^20.9.0",
|
|
39
|
+
"oxfmt": "^0.51.0",
|
|
40
|
+
"oxlint": "^1.66.0",
|
|
41
|
+
"vitest": "^4.1.6"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"clean": "rm -rf dist",
|
|
45
|
+
"build": "node scripts/buildPackages.ts",
|
|
46
|
+
"pack:packages": "node scripts/packPackages.ts",
|
|
47
|
+
"release": "yarn build && changeset publish",
|
|
48
|
+
"test": "vitest run --config testing/vitest.config.ts",
|
|
49
|
+
"test:coverage": "vitest run --coverage --config testing/vitest.config.ts",
|
|
50
|
+
"format": "oxfmt",
|
|
51
|
+
"format:fix": "oxfmt",
|
|
52
|
+
"format:check": "oxfmt --check",
|
|
53
|
+
"lint": "oxlint --deny-warnings",
|
|
54
|
+
"lint:fix": "oxlint --fix",
|
|
55
|
+
"check:imports": "adio",
|
|
56
|
+
"typecheck": "tsgo -p config/tsconfig.check.common.json && tsgo -p config/tsconfig.check.node.json && tsgo -p config/tsconfig.check.browser.json && tsgo -p config/tsconfig.check.scripts.json"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webiny/stdlib",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Standard library for Webiny — platform-agnostic, Node.js, and browser utilities",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts"
|
|
11
|
+
},
|
|
12
|
+
"./node": {
|
|
13
|
+
"import": "./dist/node/index.js",
|
|
14
|
+
"types": "./dist/node/index.d.ts"
|
|
15
|
+
},
|
|
16
|
+
"./browser": {
|
|
17
|
+
"import": "./dist/browser/index.js",
|
|
18
|
+
"types": "./dist/browser/index.d.ts"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@webiny/di": "^1.0.1",
|
|
28
|
+
"dot-prop": "^10.1.0",
|
|
29
|
+
"fast-glob": "^3.3.3",
|
|
30
|
+
"pino": "^10.3.1",
|
|
31
|
+
"pino-pretty": "^13.1.3",
|
|
32
|
+
"type-fest": "^5.6.0",
|
|
33
|
+
"zod": "^4.4.3"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@changesets/cli": "^2.31.0",
|
|
37
|
+
"@types/node": ">=24",
|
|
38
|
+
"@typescript/native-preview": "^7.0.0-dev.20260519.1",
|
|
39
|
+
"@vitest/coverage-v8": "^4.1.6",
|
|
40
|
+
"adio": "^3.0.0",
|
|
41
|
+
"happy-dom": "^20.9.0",
|
|
42
|
+
"oxfmt": "^0.51.0",
|
|
43
|
+
"oxlint": "^1.66.0",
|
|
44
|
+
"vitest": "^4.1.6"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"clean": "rm -rf dist",
|
|
48
|
+
"build": "node scripts/buildPackages.ts",
|
|
49
|
+
"pack:packages": "node scripts/packPackages.ts",
|
|
50
|
+
"release": "yarn build && changeset publish",
|
|
51
|
+
"test": "vitest run --config testing/vitest.config.ts",
|
|
52
|
+
"test:coverage": "vitest run --coverage --config testing/vitest.config.ts",
|
|
53
|
+
"format": "oxfmt",
|
|
54
|
+
"format:fix": "oxfmt",
|
|
55
|
+
"format:check": "oxfmt --check",
|
|
56
|
+
"lint": "oxlint --deny-warnings",
|
|
57
|
+
"lint:fix": "oxlint --fix",
|
|
58
|
+
"check:imports": "adio",
|
|
59
|
+
"typecheck": "tsgo -p config/tsconfig.check.common.json && tsgo -p config/tsconfig.check.node.json && tsgo -p config/tsconfig.check.browser.json && tsgo -p config/tsconfig.check.scripts.json"
|
|
60
|
+
}
|
|
61
|
+
}
|