diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f354ba..6a0f6f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,7 @@
# Changelog
Tracking changes for PteroJSLite (using [SemVer 2](https://semver.org)).
-## 1.0.0 - 26-10-2022
+## 1.0.0 - 27-10-2022
First official release, using only objects/structures, interfaces and functions - no classes!
## 0.1.0 - 08-2022
diff --git a/README.md b/README.md
index 835a651..71a148c 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
PteroJSLite
A lightweight alternative to PteroJS
-
+
## 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.
+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 and above to use this package.
+You must have NodeJS v14 or above to use this package.
```
npm install @devnote-dev/pterojslite
@@ -21,7 +21,7 @@ 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.
+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');
@@ -29,6 +29,11 @@ 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
@@ -37,6 +42,11 @@ 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
diff --git a/package.json b/package.json
index ab8b67e..acfa93b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@devnote-dev/pterojslite",
- "version": "0.0.1",
+ "version": "1.0.0",
"description": "A lightweight version of the PteroJS package",
"author": "Devonte W ",
"license": "MIT",
@@ -13,7 +13,7 @@
"url": "git+https://github.com/PteroPackages/PteroJSLite.git"
},
"main": "./dist/src/index.js",
- "types": "./dist/src/types",
+ "types": "./dist/src/types/index.d.ts",
"files": [
"dist",
"CHANGELOG.md",
@@ -24,21 +24,26 @@
"node": ">=14.16"
},
"scripts": {
+ "prepublish": "tsc",
"build": "tsc",
"lint": "prettier --write src/**/**.ts"
},
"keywords": [
+ "api",
+ "nodejs",
"pterojs",
+ "wrapper",
+ "javascript",
+ "typescript",
+ "pterojslite",
"pterodactyl",
- "pterodactyl-api",
- "wrapper"
+ "pterodactyl-api"
],
"dependencies": {
"axios": "^0.27.2"
},
"devDependencies": {
"@types/node": "^18.6.4",
- "prettier": "^2.7.1",
- "typedoc": "^0.23.17"
+ "prettier": "^2.7.1"
}
}
diff --git a/src/index.ts b/src/index.ts
index b82aff6..edad60e 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,6 +1,4 @@
-import { version as v } from '../package.json';
-
-export const version = v;
+export { version } from '../package.json';
// Application API
export * from './app';