mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 16:38:20 +01:00
feat(docs): 📝 Add initial README and docs
This commit is contained in:
parent
0cb9aa1e35
commit
ef76ee4a5c
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"conventionalCommits.scopes": ["docs"]
|
||||||
|
}
|
||||||
95
README.md
Normal file
95
README.md
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://lysand.org"><img src="https://cdn.lysand.org/logo-long-dark.webp" alt="Lysand Logo" height="110"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<center><h1>Lysand API</h1></center>
|
||||||
|
|
||||||
|
Set of NPM packages written in TypeScript to interact with Lysand-compatible services.
|
||||||
|
|
||||||
|
## Packages
|
||||||
|
|
||||||
|
- **`@lysand-org/federation`**: Federation types and validators for Lysand server implementations.
|
||||||
|
- **`@lysand-org/client`**: Client for the reference Lysand Server implementation.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> These packages are not even published on NPM yet. They are still in development and are not ready for production use.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
#### For Usage
|
||||||
|
|
||||||
|
See the [**Compatibility**](#compatibility) section for the supported environments. Any package manager can be used to install the packages.
|
||||||
|
|
||||||
|
#### For Development
|
||||||
|
|
||||||
|
- [**Bun**](https://bun.sh) version `1.1.8` or higher.
|
||||||
|
- Either the [**Linux**](https://www.linux.org) or [**macOS**](https://www.apple.com/macos) operating systems. ([**Windows**](https://www.microsoft.com/windows) will work, but is not officially supported.)
|
||||||
|
|
||||||
|
### Compatibility
|
||||||
|
|
||||||
|
This library is built for JavaScript runtimes with the support for:
|
||||||
|
|
||||||
|
- [**ES Modules**](https://nodejs.org/api/esm.html)
|
||||||
|
- [**ECMAScript 2020**](https://www.ecma-international.org/ecma-262/11.0/index.html)
|
||||||
|
|
||||||
|
#### Runtimes
|
||||||
|
|
||||||
|
- **Node.js**: 14.0+ is the minimum, but only Node.js 20.0+ (LTS) is officially supported.
|
||||||
|
- **Deno**: Support is unknown. 1.0+ is expected to work.
|
||||||
|
- **Bun**: Bun 1.1.8 is the minimum-supported version. As Bun is rapidly evolving, this may change. Previous versions may also work.
|
||||||
|
|
||||||
|
#### Browsers
|
||||||
|
|
||||||
|
Consequently, this library is compatible without any bundling in the following browser versions:
|
||||||
|
|
||||||
|
- **Chrome**: 80+
|
||||||
|
- **Edge**: 80+
|
||||||
|
- **Firefox**: 74+
|
||||||
|
- **Safari**: 13.1+
|
||||||
|
- **Opera**: 67+
|
||||||
|
- **Internet Explorer**: None
|
||||||
|
|
||||||
|
If you are targeting older browsers, please don't, you are doing yourself a disservice.
|
||||||
|
|
||||||
|
Transpilation to non-ES Module environments is not officially supported, but should be simple with the use of a bundler like [**Parcel**](https://parceljs.org) or [**Rollup**](https://rollupjs.org).
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
Both packages are distributed as a scoped package on the NPM registry.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install @lysand-org/federation @lysand-org/client # For NPM
|
||||||
|
yarn add @lysand-org/federation @lysand-org/client # For Yarn
|
||||||
|
pnpm add @lysand-org/federation @lysand-org/client # For PNPM
|
||||||
|
bun add @lysand-org/federation @lysand-org/client # For Bun
|
||||||
|
```
|
||||||
|
|
||||||
|
#### From Source
|
||||||
|
|
||||||
|
If you want to install from source, you can clone this repository and run the following commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bun install # Install dependencies
|
||||||
|
|
||||||
|
bun run build # Build the packages
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||||
|
|
||||||
|
## Acknowledgments
|
||||||
|
|
||||||
|
### Projects
|
||||||
|
|
||||||
|
- [**Bun**](https://bun.sh): Thanks to the Bun team for creating an amazing JavaScript runtime.
|
||||||
|
- [**TypeScript**](https://www.typescriptlang.org): TypeScript is the backbone of this project.
|
||||||
|
- [**Node.js**](https://nodejs.org): Node.js created the idea of JavaScript on the server.
|
||||||
|
|
||||||
|
### People
|
||||||
|
|
||||||
|
- [**April John**](https://github.com/cutestnekoaqua): Creator and maintainer of the Lysand Server ActivityPub bridge.
|
||||||
20
federation/biome.json
Normal file
20
federation/biome.json
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
|
||||||
|
"organizeImports": {
|
||||||
|
"enabled": true,
|
||||||
|
"ignore": ["node_modules", "dist"]
|
||||||
|
},
|
||||||
|
"linter": {
|
||||||
|
"enabled": true,
|
||||||
|
"rules": {
|
||||||
|
"recommended": true
|
||||||
|
},
|
||||||
|
"ignore": ["node_modules", "dist"]
|
||||||
|
},
|
||||||
|
"formatter": {
|
||||||
|
"enabled": true,
|
||||||
|
"indentStyle": "space",
|
||||||
|
"indentWidth": 4,
|
||||||
|
"ignore": ["node_modules", "dist"]
|
||||||
|
}
|
||||||
|
}
|
||||||
63
federation/package.json
Normal file
63
federation/package.json
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
{
|
||||||
|
"name": "@lysand-org/federation",
|
||||||
|
"displayName": "Lysand Federation",
|
||||||
|
"version": "3.0.0",
|
||||||
|
"author": {
|
||||||
|
"email": "jesse.wierzbinski@lysand.org",
|
||||||
|
"name": "Jesse Wierzbinski (CPlusPatch)",
|
||||||
|
"url": "https://cpluspatch.com"
|
||||||
|
},
|
||||||
|
"readme": "README.md",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/lysand-org/api.git",
|
||||||
|
"directory": "federation"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/lysand-org/api/issues"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "Jesse Wierzbinski",
|
||||||
|
"email": "jesse.wierzbinski@lysand.org",
|
||||||
|
"url": "https://cpluspatch.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"maintainers": [
|
||||||
|
{
|
||||||
|
"name": "Jesse Wierzbinski",
|
||||||
|
"email": "jesse.wierzbinski@lysand.org",
|
||||||
|
"url": "https://cpluspatch.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Type definitions for Lysand Federation, with validators.",
|
||||||
|
"categories": ["Other"],
|
||||||
|
"type": "module",
|
||||||
|
"engines": {
|
||||||
|
"bun": ">=1.1.8"
|
||||||
|
},
|
||||||
|
"exports": {
|
||||||
|
"import": "./dist/index.js",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"default": "./dist/index.js"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/lysand"
|
||||||
|
},
|
||||||
|
"homepage": "https://lysand.org",
|
||||||
|
"keywords": [
|
||||||
|
"lysand",
|
||||||
|
"federation",
|
||||||
|
"api",
|
||||||
|
"typescript",
|
||||||
|
"zod",
|
||||||
|
"validation"
|
||||||
|
],
|
||||||
|
"packageManager": "bun@1.1.8",
|
||||||
|
"devDependencies": {
|
||||||
|
"@biomejs/biome": "^1.7.3"
|
||||||
|
},
|
||||||
|
"trustedDependencies": ["@biomejs/biome"]
|
||||||
|
}
|
||||||
9
package.json
Normal file
9
package.json
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"name": "lysand-api",
|
||||||
|
"private": true,
|
||||||
|
"workspaces": ["federation"],
|
||||||
|
"scripts": {
|
||||||
|
"lint": "bunx @biomejs/biome check .",
|
||||||
|
"build": "echo 'Not implemented :(' && exit 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue