onl-schema-tools v0.0.4
onl-schema-tools (onst) for on-lang
Helper package for on-lang. Provides sample schema and example objects.
This CLI package is designed to fetch relevant schema from onl-schema-tools GitHub repository based on specified criteria. It leverages the GitHub Octokit API for repository interaction and provides a convenient command-line interface for users to customize their file-fetching experience.
This project lives with on-lang
Table of Contents
- Prerequisites
- Installation
- Usage
- Current Available Schemas
- Architecture
- Contributing
- Code of Conduct
- License
Prerequisites
Before using the package, ensure you have the following set up:
- Node.js 14+ or higher https://nodejs.org/en/
- npm
Installation
Install the package using npm:
npm install -g onl-schema-tools
Usage
Show help:
onst h
Fetch schema files from the onl-schema-tools GitHub repository:
onst f
Show schema list in the onl-schema-tools GitHub repository:
onst s
Show version of onl-schema-tools package:
onst v
Current Available Schemas
Architecture
Components
GitHub Interaction: Utilizes the GitHub API through the Octokit library for fetching repository content.
User Interaction: Employs the Inquirer library for interactive command-line prompts.
File Operations: Utilizes Node.js File System (fs) for reading, saving, and searching files.
Configuration: Relies on environment variables for GitHub credentials and repository details.
Workflow
- Fetches a schema list from the GitHub repository to enable users to select specific entities.
- Selected entities are used to search for relevant files in the specified repository path.
- Files matching the specified criteria are saved to the user-specified destination path.
Notes
- The script fetches a schema list from the repository to enable users to select specific entities.
- Selected entities are used to search for relevant files in the specified repository path.
- Files matching the specified criteria are saved to the user-specified destination path.
Examples
Contributing
See CONTRIBUTING.md for details on how to contribute.
Code of Conduct
See CODE_OF_CONDUCT.md for details on the code of conduct.
License
See LICENSE.md for details on the license.