From ef76ee4a5c7c899e554278af9bc0e7e5795440bd Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Mon, 13 May 2024 17:58:03 -1000 Subject: [PATCH] feat(docs): :memo: Add initial README and docs --- .vscode/settings.json | 3 ++ README.md | 95 ++++++++++++++++++++++++++++++++++++++++ bun.lockb | Bin 0 -> 5092 bytes federation/biome.json | 20 +++++++++ federation/package.json | 63 ++++++++++++++++++++++++++ package.json | 9 ++++ 6 files changed, 190 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 README.md create mode 100755 bun.lockb create mode 100644 federation/biome.json create mode 100644 federation/package.json create mode 100644 package.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2679899 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "conventionalCommits.scopes": ["docs"] +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..9d60b2e --- /dev/null +++ b/README.md @@ -0,0 +1,95 @@ +

+ Lysand Logo +

+ +

Lysand API

+ +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. \ No newline at end of file diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..363a67f80c5064d9d8c457e4e50f3cc309a31b68 GIT binary patch literal 5092 zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_p){#v4<& z{TEsI6k%2)LNOJ&bX(0UpC@uk{Z$Z@^1k#c~{wg3X4x}eRdLf z=)Vcn?@NJxHDH8M;{Q^hescT|N+X~&1H+*70LrDH^aujv(jdJsGeI=<%>Bpz4`d)U z0nj`~28g*-H5$oWkpE$TWf5b5^7EImzq5b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BMA9PNFi0Xs4mTtb za*abc4W363MnUp714Frgk#})GqO*VyL_`8g19QHaiJgK4JnJJ039v#~d7A)LKLM@} zx#EJBJz=Ru#lZ3bSmod}54pbra~nST0Mxz{aC?b!uK;x9Ndih^Eh}MVB*L{wH4em8 fuv(@hs5H35)g>hWY94H4i%=a4s+I8hZy@9Vmy@k= literal 0 HcmV?d00001 diff --git a/federation/biome.json b/federation/biome.json new file mode 100644 index 0000000..536d532 --- /dev/null +++ b/federation/biome.json @@ -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"] + } +} diff --git a/federation/package.json b/federation/package.json new file mode 100644 index 0000000..0330d27 --- /dev/null +++ b/federation/package.json @@ -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"] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..d4883b9 --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "name": "lysand-api", + "private": true, + "workspaces": ["federation"], + "scripts": { + "lint": "bunx @biomejs/biome check .", + "build": "echo 'Not implemented :(' && exit 1" + } +}