Skip to content

Commit e3c8d39

Browse files
authored
Merge pull request #1 from squarecloudofc/dev
#
2 parents dceab5d + 63eb473 commit e3c8d39

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
},
3232
"homepage": "https://github.com/squarecloudofc/wrapper-api-js#readme",
3333
"dependencies": {
34-
"@discordjs/collection": "^1.2.0",
3534
"axios": "^1.1.3",
3635
"form-data": "^4.0.0",
3736
"zod": "^3.19.1"

src/Assertions.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export function validateCommitLike(
1313
value: any
1414
): asserts value is string | ReadStream {
1515
z.string()
16-
.or(z.custom((value) => value instanceof ReadStream))
16+
.or(
17+
z
18+
.custom((value) => value instanceof ReadStream)
19+
.or(z.custom((value) => value instanceof Buffer))
20+
)
1721
.parse(value);
1822
}

src/structures/Application.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ export class Application {
139139
*
140140
* @param file - The absolute file path or a ReadStream
141141
*/
142-
async commit(file: string | ReadStream): Promise<boolean> {
142+
// async commit(file: string | ReadStream): Promise<boolean>
143+
// async commit(file: Buffer, fileName: string, fileExtension: string): Promise<boolean>
144+
async commit(file: string | ReadStream | Buffer, fileName?: string, fileExtension?: string): Promise<boolean> {
143145
validateCommitLike(file);
144146

145147
const formData = new FormData();

src/structures/User.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { AccountPlan, RawUserData } from '../typings';
2-
import { Collection } from '@discordjs/collection';
32
import { Application } from './Application';
43
import { APIManager } from '../APIManager';
54

@@ -48,7 +47,7 @@ export class FullUser extends User {
4847
/** The user's registered email */
4948
email: string;
5049
/** The user's registered applications Map */
51-
applications = new Collection<string, Application>();
50+
applications = new Map<string, Application>();
5251

5352
constructor(apiManager: APIManager, data: RawUserData) {
5453
super(apiManager, data);

src/typings.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { Application } from './structures/Application';
2-
31
/**
42
* USER
53
*/

0 commit comments

Comments
 (0)