@pelican.ts/sdk 0.3.4-next.4 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-commit +3 -0
- package/README.md +1 -5
- package/biome.json +36 -0
- package/bun.lock +24 -1
- package/dist/api/index.d.mts +1641 -0
- package/dist/api/index.d.ts +1641 -0
- package/dist/api/index.js +2100 -0
- package/dist/api/index.mjs +2062 -0
- package/dist/index.d.mts +607 -1415
- package/dist/index.d.ts +607 -1415
- package/dist/index.js +569 -444
- package/dist/index.mjs +559 -442
- package/dist/types.d.ts +10 -10
- package/package.json +60 -49
- package/src/api/client/types/server.ts +64 -51
- package/src/api/client/types/user.ts +18 -19
- package/src/api/client/types/websocket.ts +76 -76
- package/src/api/index.ts +17 -0
- package/src/humane/Account.ts +73 -0
- package/src/humane/Client.ts +44 -0
- package/src/humane/Server.ts +206 -0
- package/src/humane/ServerAllocation.ts +41 -0
- package/src/humane/ServerBackup.ts +37 -0
- package/src/humane/ServerDatabase.ts +37 -0
- package/src/humane/ServerFile.ts +88 -0
- package/src/humane/ServerSchedule.ts +160 -0
- package/src/humane/ServerUser.ts +44 -0
- package/src/index.ts +18 -14
- package/src/utils/sized.ts +3 -6
package/src/utils/sized.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
1
|
export const SIZES = {
|
|
4
2
|
B: 1,
|
|
5
3
|
KB: 1024,
|
|
6
4
|
MB: 1024 * 1024,
|
|
7
5
|
GB: 1024 * 1024 * 1024,
|
|
8
|
-
TB: 1024 * 1024 * 1024 * 1024
|
|
6
|
+
TB: 1024 * 1024 * 1024 * 1024,
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
const sized = (bytes: number, unit: keyof typeof SIZES): number => {
|
|
12
|
-
return parseInt((bytes / SIZES[unit]).toFixed(3))
|
|
10
|
+
return parseInt((bytes / SIZES[unit]).toFixed(3), 10)
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
export default sized
|
|
13
|
+
export default sized
|