0.0.4 • Published 7 months ago
@cli-upkaran/adapter-filesystem v0.0.4
@cli-upkaran/adapter-filesystem
Filesystem data preparation adapter for cli-upkaran
.
This package provides an adapter for reading and processing files from the local filesystem as part of a data preparation pipeline within cli-upkaran
commands.
Features
- Reads files based on glob patterns.
- Supports ignore patterns (including
.gitignore
style files). - Handles text and potentially binary files.
- Integrates with the
@cli-upkaran/dataprep-core
pipeline.
Installation
This package is intended to be used as a dependency by cli-upkaran
command plugins that need to process local files.
pnpm add @cli-upkaran/adapter-filesystem
Usage
Command plugins can utilize this adapter to configure file inputs.
// Within a command plugin's implementation
import { processFiles } from '@cli-upkaran/adapter-filesystem';
import type { DataPrepAdapterOptions } from '@cli-upkaran/dataprep-core';
async function runMyCommand(options: MyCommandOptions) {
const adapterOptions: DataPrepAdapterOptions = {
match: options.includePatterns || ['**/*'],
ignore: options.ignorePatterns || [],
ignoreFile: options.ignoreFilePath,
useGitignore: options.useGitignore,
// ... other adapter config ...
};
// Use the adapter to get data sources
const dataSources = await processFiles(adapterOptions);
// ... process dataSources ...
}
(Note: The exact API (processFiles
) is illustrative and may differ based on actual implementation.)
Contributing
See the main CONTRIBUTING.md in the root of the repository.
License
MIT - See the main LICENSE file in the root of the repository.
0.0.4
7 months ago
0.0.2
7 months ago
0.0.2-latest.2
7 months ago
0.0.2-beta.1
7 months ago
0.0.2-beta.0
7 months ago