@pelican.ts/sdk 0.4.8 → 0.4.10
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 +2 -3
- package/biome.json +42 -32
- package/bun.lock +3 -0
- package/dist/api/index.d.mts +5 -5
- package/dist/api/index.d.ts +5 -5
- package/dist/api/index.js +168 -102
- package/dist/api/index.mjs +168 -102
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +124 -70
- package/dist/index.mjs +124 -70
- package/dist/types.d.ts +1 -1
- package/package.json +60 -59
- package/scripts/create-types.ts +4 -4
- package/src/api/application/client.ts +26 -19
- package/src/api/application/database_hosts.ts +15 -20
- package/src/api/application/eggs.ts +14 -7
- package/src/api/application/mounts.ts +29 -16
- package/src/api/application/nodes.ts +34 -32
- package/src/api/application/nodes_allocations.ts +15 -11
- package/src/api/application/roles.ts +13 -27
- package/src/api/application/servers.ts +36 -27
- package/src/api/application/servers_databases.ts +11 -7
- package/src/api/application/types/container.ts +7 -8
- package/src/api/application/types/database_host.ts +8 -8
- package/src/api/application/types/egg.ts +47 -54
- package/src/api/application/types/location.ts +5 -7
- package/src/api/application/types/mount.ts +9 -9
- package/src/api/application/types/node.ts +49 -59
- package/src/api/application/types/role.ts +4 -6
- package/src/api/application/types/server.ts +21 -22
- package/src/api/application/types/server_allocation.ts +11 -12
- package/src/api/application/types/user.ts +25 -25
- package/src/api/application/users.ts +38 -27
- package/src/api/base/request.ts +28 -17
- package/src/api/base/types.ts +16 -23
- package/src/api/client/account.ts +20 -15
- package/src/api/client/client.ts +17 -18
- package/src/api/client/server.ts +24 -20
- package/src/api/client/server_activity.ts +10 -11
- package/src/api/client/server_allocations.ts +11 -6
- package/src/api/client/server_backups.ts +21 -17
- package/src/api/client/server_databases.ts +14 -8
- package/src/api/client/server_files.ts +56 -42
- package/src/api/client/server_schedules.ts +43 -19
- package/src/api/client/server_settings.ts +11 -8
- package/src/api/client/server_startup.ts +16 -8
- package/src/api/client/server_users.ts +22 -13
- package/src/api/client/server_websocket.ts +79 -33
- package/src/api/client/types/server.ts +8 -18
- package/src/api/client/types/server_allocation.ts +7 -8
- package/src/api/client/types/server_subuser.ts +10 -11
- package/src/api/client/types/user.ts +2 -5
- package/src/api/client/types/websocket.ts +12 -24
- package/src/api/common/types/egg.ts +7 -7
- package/src/api/common/types/enums.ts +1 -1
- package/src/api/common/types/server_backup.ts +4 -5
- package/src/api/common/types/server_database.ts +9 -12
- package/src/api/common/types/server_files.ts +9 -9
- package/src/api/common/types/server_limits.ts +11 -12
- package/src/api/common/types/server_power.ts +1 -1
- package/src/api/common/types/server_schedule.ts +27 -25
- package/src/api/common/types/server_startup.ts +7 -12
- package/src/api/index.ts +3 -3
- package/src/humane/Account.ts +2 -2
- package/src/humane/Client.ts +6 -6
- package/src/humane/Server.ts +31 -43
- package/src/humane/ServerAllocation.ts +3 -3
- package/src/humane/ServerBackup.ts +6 -9
- package/src/humane/ServerDatabase.ts +2 -2
- package/src/humane/ServerFile.ts +17 -11
- package/src/humane/ServerSchedule.ts +6 -6
- package/src/humane/ServerUser.ts +2 -2
- package/src/index.ts +3 -3
- package/src/utils/sized.ts +1 -1
- package/src/utils/transform.ts +5 -10
- package/src/utils/types.ts +6 -8
- package/tsconfig.json +0 -1
package/.husky/pre-commit
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
#git update-index --again
|
|
1
|
+
echo "🙄 Nonchalantly saving you from big commit deltas due to formatting..."
|
|
2
|
+
git-format-staged --formatter 'biome format --no-errors-on-unmatched --files-ignore-unknown=true --write .' .
|
package/biome.json
CHANGED
|
@@ -1,36 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.3.6/schema.json",
|
|
3
|
+
"vcs": {
|
|
4
|
+
"enabled": true,
|
|
5
|
+
"clientKind": "git",
|
|
6
|
+
"useIgnoreFile": true
|
|
7
|
+
},
|
|
8
|
+
"files": {
|
|
9
|
+
"includes": ["**", "!!**/dist", "!src/api/common/types/enums.ts"]
|
|
10
|
+
},
|
|
11
|
+
"formatter": {
|
|
12
|
+
"enabled": true,
|
|
13
|
+
"indentStyle": "space",
|
|
14
|
+
"indentWidth": 4
|
|
15
|
+
},
|
|
16
|
+
"linter": {
|
|
17
|
+
"enabled": true,
|
|
18
|
+
"rules": {
|
|
19
|
+
"recommended": true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"javascript": {
|
|
23
|
+
"formatter": {
|
|
24
|
+
"quoteStyle": "double",
|
|
25
|
+
"semicolons": "asNeeded",
|
|
26
|
+
"bracketSpacing": false,
|
|
27
|
+
"arrowParentheses": "asNeeded",
|
|
28
|
+
"operatorLinebreak": "before",
|
|
29
|
+
"expand": "never",
|
|
30
|
+
"trailingCommas": "none"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"json": {
|
|
11
34
|
"formatter": {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
"javascript": {
|
|
23
|
-
"formatter": {
|
|
24
|
-
"quoteStyle": "double",
|
|
25
|
-
"semicolons": "asNeeded"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"assist": {
|
|
29
|
-
"enabled": true,
|
|
30
|
-
"actions": {
|
|
31
|
-
"source": {
|
|
32
|
-
"organizeImports": "on"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
+
"indentWidth": 2
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"assist": {
|
|
39
|
+
"enabled": true,
|
|
40
|
+
"actions": {
|
|
41
|
+
"source": {
|
|
42
|
+
"organizeImports": "on"
|
|
43
|
+
}
|
|
35
44
|
}
|
|
45
|
+
}
|
|
36
46
|
}
|
package/bun.lock
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"@biomejs/biome": "2.3.6",
|
|
15
15
|
"@types/node": "^22.18.12",
|
|
16
16
|
"@types/strip-color": "^0.1.2",
|
|
17
|
+
"git-format-staged": "^3.1.1",
|
|
17
18
|
"husky": "^9.1.7",
|
|
18
19
|
"tsc-alias": "^1.8.16",
|
|
19
20
|
"tsup": "^8.5.0",
|
|
@@ -254,6 +255,8 @@
|
|
|
254
255
|
|
|
255
256
|
"get-tsconfig": ["get-tsconfig@4.13.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ=="],
|
|
256
257
|
|
|
258
|
+
"git-format-staged": ["git-format-staged@3.1.1", "", { "bin": { "git-format-staged": "git-format-staged" } }, "sha512-P749fkktaiAchFZKR7bgdvruzhvbcIDr1uRBrS9/Wdimb7wH1Twchz9gOixj8tUaHVMuXY/ckDojfOwV6AxgPA=="],
|
|
259
|
+
|
|
257
260
|
"glob": ["glob@10.4.5", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg=="],
|
|
258
261
|
|
|
259
262
|
"glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
|
package/dist/api/index.d.mts
CHANGED
|
@@ -217,7 +217,7 @@ declare class ServerDatabases {
|
|
|
217
217
|
private readonly r;
|
|
218
218
|
private readonly id;
|
|
219
219
|
constructor(requester: AxiosInstance, id: string);
|
|
220
|
-
list: (include?:
|
|
220
|
+
list: (include?: "password"[], page?: number) => Promise<ServerDatabase[]>;
|
|
221
221
|
create: (database: string, remote: string) => Promise<ServerDatabase>;
|
|
222
222
|
rotatePassword: (database_id: string) => Promise<ServerDatabase>;
|
|
223
223
|
delete: (database_id: string) => Promise<void>;
|
|
@@ -460,7 +460,7 @@ type StatsWsJson = {
|
|
|
460
460
|
disk_bytes: number;
|
|
461
461
|
};
|
|
462
462
|
|
|
463
|
-
type ServerSignalOption =
|
|
463
|
+
type ServerSignalOption = "start" | "stop" | "restart" | "kill";
|
|
464
464
|
|
|
465
465
|
type SocketEventPayloadMap = {
|
|
466
466
|
[SOCKET_EVENT.AUTH_SUCCESS]: undefined;
|
|
@@ -621,10 +621,10 @@ declare class Users {
|
|
|
621
621
|
constructor(requester: AxiosInstance);
|
|
622
622
|
list: (opts: ListType, page?: number) => Promise<ApplicationUser[]>;
|
|
623
623
|
info: (id: number, { include }: {
|
|
624
|
-
include?:
|
|
624
|
+
include?: "servers"[];
|
|
625
625
|
}) => Promise<ApplicationUser>;
|
|
626
626
|
infoByExternal: (external_id: string, { include }: {
|
|
627
|
-
include?:
|
|
627
|
+
include?: "servers"[];
|
|
628
628
|
}) => Promise<ApplicationUser>;
|
|
629
629
|
create: (user: z.infer<typeof CreateSchema>) => Promise<ApplicationUser>;
|
|
630
630
|
update: (id: number, user: z.infer<typeof CreateSchema>) => Promise<ApplicationUser>;
|
|
@@ -640,7 +640,7 @@ declare class Users {
|
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
642
|
type ListType = {
|
|
643
|
-
include?:
|
|
643
|
+
include?: "servers"[];
|
|
644
644
|
filters?: ListFilters;
|
|
645
645
|
sort?: ListSort;
|
|
646
646
|
};
|
package/dist/api/index.d.ts
CHANGED
|
@@ -217,7 +217,7 @@ declare class ServerDatabases {
|
|
|
217
217
|
private readonly r;
|
|
218
218
|
private readonly id;
|
|
219
219
|
constructor(requester: AxiosInstance, id: string);
|
|
220
|
-
list: (include?:
|
|
220
|
+
list: (include?: "password"[], page?: number) => Promise<ServerDatabase[]>;
|
|
221
221
|
create: (database: string, remote: string) => Promise<ServerDatabase>;
|
|
222
222
|
rotatePassword: (database_id: string) => Promise<ServerDatabase>;
|
|
223
223
|
delete: (database_id: string) => Promise<void>;
|
|
@@ -460,7 +460,7 @@ type StatsWsJson = {
|
|
|
460
460
|
disk_bytes: number;
|
|
461
461
|
};
|
|
462
462
|
|
|
463
|
-
type ServerSignalOption =
|
|
463
|
+
type ServerSignalOption = "start" | "stop" | "restart" | "kill";
|
|
464
464
|
|
|
465
465
|
type SocketEventPayloadMap = {
|
|
466
466
|
[SOCKET_EVENT.AUTH_SUCCESS]: undefined;
|
|
@@ -621,10 +621,10 @@ declare class Users {
|
|
|
621
621
|
constructor(requester: AxiosInstance);
|
|
622
622
|
list: (opts: ListType, page?: number) => Promise<ApplicationUser[]>;
|
|
623
623
|
info: (id: number, { include }: {
|
|
624
|
-
include?:
|
|
624
|
+
include?: "servers"[];
|
|
625
625
|
}) => Promise<ApplicationUser>;
|
|
626
626
|
infoByExternal: (external_id: string, { include }: {
|
|
627
|
-
include?:
|
|
627
|
+
include?: "servers"[];
|
|
628
628
|
}) => Promise<ApplicationUser>;
|
|
629
629
|
create: (user: z.infer<typeof CreateSchema>) => Promise<ApplicationUser>;
|
|
630
630
|
update: (id: number, user: z.infer<typeof CreateSchema>) => Promise<ApplicationUser>;
|
|
@@ -640,7 +640,7 @@ declare class Users {
|
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
642
|
type ListType = {
|
|
643
|
-
include?:
|
|
643
|
+
include?: "servers"[];
|
|
644
644
|
filters?: ListFilters;
|
|
645
645
|
sort?: ListSort;
|
|
646
646
|
};
|