Skip to content

Commit

Permalink
chore: crlf -> lf & formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
devnote-dev committed Nov 27, 2022
1 parent 2ce5d4d commit af85a47
Show file tree
Hide file tree
Showing 6 changed files with 339 additions and 281 deletions.
22 changes: 11 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/node_modules
/dist
/docs
/test
/types

*.cmd
*.sh
*.test.*

package-lock.json
/node_modules
/dist
/docs
/test
/types

*.cmd
*.sh
*.test.*

package-lock.json
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

136 changes: 68 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
<h1 align="center">PteroJSLite</h1>
<h3 align="center"><strong>A lightweight alternative to PteroJS</strong></h3>
<p align="center"><a href="https://discord.com/invite/dwcfTjgn7S" type="_blank"><img src="https://img.shields.io/badge/discord-join-5865f2?style=for-the-badge&logo=discord&logoColor=white"></a> <img src="https://img.shields.io/badge/version-1.0.0-3572A5?style=for-the-badge"> <img src="https://img.shields.io/github/issues/PteroPackages/PteroJSLite.svg?style=for-the-badge"> <!--<a href="https://pteropackages.github.io/PteroJS/" type="_blank"><img src="https://img.shields.io/badge/docs-typedoc-e67e22?style=for-the-badge"></a>--></p>

## About

PteroJSLite is a lightweight alternative to [PteroJS](https://github.com/PteroPackages/PteroJS) using only objects and functions - absolutely no classes! This package is ideal if you want a high-level package without the abstractions and helper methods of larger libraries, while still getting same amount of functionality.

## Installing

You must have NodeJS v14 or above to use this package.

```
npm install @devnote-dev/pterojslite
yarn add @devnote-dev/pterojslite
```

## Compatibility

PteroJSLite supports version 1.7+ of the panel, and version 1.6+ of Wings.

## Getting Started

Application and Client API instances can be created using the `createApp` and `createClient` functions respectively. Both application keys (`ptla`) and client keys (`ptlc`) are currently supported.

```js
const { createApp } = require('@devnote-dev/pterojslite');

const app = createApp('https://your.panel.domain', 'ptla_your_api_key');

app.getServers().then(console.log);

(async () => {
const users = await app.getUsers(); // returns an array of user objects
console.log(users.filter(u => u.rootAdmin)); // filters out non-admin users
})();
```

```js
const { createClient } = require('@devnote-dev/pterojslite');

const client = createClient('https://your.panel.domain', 'ptlc_your_api_key');

client.getAccount().then(console.log);

(async () => {
const activities = await app.getActivities(); // returns an array of activity logs
console.log(activities.filter(a => a.isAPI)); // filters out non-API activities
})();
```

## Contributing

Please [create an issue](https://github.com/PteroPackages/PteroJSLite/issues) for issues or feature requests for the package.

1. [Fork this repo](https://github.com/PteroPackages/PteroJSLite/fork)!
2. Make a branch from `main` (`git branch -b <new-feature>`)
3. Commit your changes (`git commit -am "..."`)
4. Open a PR here (`git push origin <new-feature>`)

## Contributors

- [Devonte](https://github.com/devnote-dev) - Owner, maintainer
- [Tlkh40](https://github.com/tlkh40) - Code contributor

This repository is managed under the MIT license.

© 2021-2022 PteroPackages
<h1 align="center">PteroJSLite</h1>
<h3 align="center"><strong>A lightweight alternative to PteroJS</strong></h3>
<p align="center"><a href="https://discord.com/invite/dwcfTjgn7S" type="_blank"><img src="https://img.shields.io/badge/discord-join-5865f2?style=for-the-badge&logo=discord&logoColor=white"></a> <img src="https://img.shields.io/badge/version-1.0.0-3572A5?style=for-the-badge"> <img src="https://img.shields.io/github/issues/PteroPackages/PteroJSLite.svg?style=for-the-badge"> <!--<a href="https://pteropackages.github.io/PteroJS/" type="_blank"><img src="https://img.shields.io/badge/docs-typedoc-e67e22?style=for-the-badge"></a>--></p>

## About

PteroJSLite is a lightweight alternative to [PteroJS](https://github.com/PteroPackages/PteroJS) using only objects and functions - absolutely no classes! This package is ideal if you want a high-level package without the abstractions and helper methods of larger libraries, while still getting same amount of functionality.

## Installing

You must have NodeJS v14 or above to use this package.

```
npm install @devnote-dev/pterojslite
yarn add @devnote-dev/pterojslite
```

## Compatibility

PteroJSLite supports version 1.7+ of the panel, and version 1.6+ of Wings.

## Getting Started

Application and Client API instances can be created using the `createApp` and `createClient` functions respectively. Both application keys (`ptla`) and client keys (`ptlc`) are currently supported.

```js
const { createApp } = require('@devnote-dev/pterojslite');

const app = createApp('https://your.panel.domain', 'ptla_your_api_key');

app.getServers().then(console.log);

(async () => {
const users = await app.getUsers(); // returns an array of user objects
console.log(users.filter(u => u.rootAdmin)); // filters out non-admin users
})();
```

```js
const { createClient } = require('@devnote-dev/pterojslite');

const client = createClient('https://your.panel.domain', 'ptlc_your_api_key');

client.getAccount().then(console.log);

(async () => {
const activities = await app.getActivities(); // returns an array of activity logs
console.log(activities.filter(a => a.isAPI)); // filters out non-API activities
})();
```

## Contributing

Please [create an issue](https://github.com/PteroPackages/PteroJSLite/issues) for issues or feature requests for the package.

1. [Fork this repo](https://github.com/PteroPackages/PteroJSLite/fork)!
2. Make a branch from `main` (`git branch -b <new-feature>`)
3. Commit your changes (`git commit -am "..."`)
4. Open a PR here (`git push origin <new-feature>`)

## Contributors

- [Devonte](https://github.com/devnote-dev) - Owner, maintainer
- [Tlkh40](https://github.com/tlkh40) - Code contributor

This repository is managed under the MIT license.

© 2021-2022 PteroPackages
152 changes: 79 additions & 73 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,79 @@
{
"name": "@devnote-dev/pterojslite",
"version": "1.0.0",
"description": "A lightweight version of the PteroJS package",
"author": "Devonte W <https://github.com/devnote-dev>",
"license": "MIT",
"bugs": {
"url": "https://github.com/PteroPackages/PteroJSLite/issues"
},
"homepage": "https://github.com/PteroPackages/PteroJSLite#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/PteroPackages/PteroJSLite.git"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"default": "./dist/index.mjs"
},
"files": [
"dist",
"CHANGELOG.md",
"LICENSE",
"README.md"
],
"engines": {
"node": ">=14.16"
},
"scripts": {
"prepublish": "tsup",
"build": "tsup",
"docs": "typedoc --out docs src/index.ts",
"format": "prettier --write src/**/**.ts"
},
"tsup": {
"bundle": true,
"clean": true,
"dts": true,
"entryPoints": [
"src/index.ts"
],
"format": [
"cjs",
"esm"
],
"target": "esnext"
},
"keywords": [
"api",
"nodejs",
"pterojs",
"wrapper",
"javascript",
"typescript",
"pterojslite",
"pterodactyl",
"pterodactyl-api"
],
"dependencies": {
"axios": "^0.27.2",
"ws": "^8.11.0"
},
"devDependencies": {
"@types/node": "^18.6.4",
"@types/ws": "^8.5.3",
"prettier": "^2.7.1",
"tsup": "^6.3.0",
"typedoc": "^0.23.19",
"typescript": "^4.8.4"
}
}
{
"name": "@devnote-dev/pterojslite",
"version": "1.0.0",
"description": "A lightweight version of the PteroJS package",
"author": "Devonte W <https://github.com/devnote-dev>",
"license": "MIT",
"bugs": {
"url": "https://github.com/PteroPackages/PteroJSLite/issues"
},
"homepage": "https://github.com/PteroPackages/PteroJSLite#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/PteroPackages/PteroJSLite.git"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"default": "./dist/index.mjs"
},
"files": [
"dist",
"CHANGELOG.md",
"LICENSE",
"README.md"
],
"engines": {
"node": ">=14.16"
},
"scripts": {
"prepublish": "tsup",
"build": "tsup",
"docs": "typedoc --out docs src/index.ts",
"format": "prettier --write src/**/**.ts"
},
"prettier": {
"arrowParens": "avoid",
"bracketSpacing": true,
"singleQuote": true,
"tabWidth": 4
},
"tsup": {
"bundle": true,
"clean": true,
"dts": true,
"entryPoints": [
"src/index.ts"
],
"format": [
"cjs",
"esm"
],
"target": "esnext"
},
"keywords": [
"api",
"nodejs",
"pterojs",
"wrapper",
"javascript",
"typescript",
"pterojslite",
"pterodactyl",
"pterodactyl-api"
],
"dependencies": {
"axios": "^0.27.2",
"ws": "^8.11.0"
},
"devDependencies": {
"@types/node": "^18.6.4",
"@types/ws": "^8.5.3",
"prettier": "^2.7.1",
"tsup": "^6.3.0",
"typedoc": "^0.23.19",
"typescript": "^4.8.4"
}
}
Loading

0 comments on commit af85a47

Please sign in to comment.