askany-protobuf-set
v1.0.1
Published
Define protobuf set for Askany services, including: .proto & ts interfaces
Downloads
3
Readme
Askany Protobuf Set
Define Protobuf sets for Askany services, including .proto
files and TypeScript interfaces.
Installation
You can install this package via npm:
npm install askany-protobuf-set
Usage
To create a service configuration for a specific Protobuf set, you can use the createService function provided by this library.
const { createService, ProtobufSet } = require('askany-protobuf-set');
// Choose the Protobuf set you want to use
const protobufSet = ProtobufSet.Auth;
// Create a service configuration
const serviceConfig = createService(protobufSet);
console.log('Proto Directory:', serviceConfig.protoDir);
console.log('TS Interface Directory:', serviceConfig.tsInterfaceDir);
Available Protobuf Sets
This library provides the following Protobuf sets:
ProtobufSet.Search
: Search service
Configuration
This library assumes that your Protobuf files are located in a directory named protos and your TypeScript interface files are located in a directory named interfaces. Make sure to organize your project structure accordingly.
Contributing
Contributions are welcome! Please read our Contribution Guidelines for more information.
License
This project is licensed under the MIT License - see the LICENSE file for details.