Skip to content

Commit 72de44c

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore: rebuild project due to codegen change (#513)
1 parent 281b74c commit 72de44c

File tree

6 files changed

+26
-28
lines changed

6 files changed

+26
-28
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ yarn-error.log
44
codegen.log
55
Brewfile.lock.json
66
dist
7-
/deno
7+
dist-deno
88
/*.tgz
99
.idea/
1010

src/core.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ export abstract class APIClient {
382382
error: Object | undefined,
383383
message: string | undefined,
384384
headers: Headers | undefined,
385-
) {
385+
): APIError {
386386
return APIError.generate(status, error, message, headers);
387387
}
388388

@@ -654,17 +654,17 @@ export abstract class AbstractPage<Item> implements AsyncIterable<Item> {
654654
return await this.#client.requestAPIList(this.constructor as any, nextOptions);
655655
}
656656

657-
async *iterPages() {
657+
async *iterPages(): AsyncGenerator<this> {
658658
// eslint-disable-next-line @typescript-eslint/no-this-alias
659-
let page: AbstractPage<Item> = this;
659+
let page: this = this;
660660
yield page;
661661
while (page.hasNextPage()) {
662662
page = await page.getNextPage();
663663
yield page;
664664
}
665665
}
666666

667-
async *[Symbol.asyncIterator]() {
667+
async *[Symbol.asyncIterator](): AsyncGenerator<Item> {
668668
for await (const page of this.iterPages()) {
669669
for (const item of page.getPaginatedItems()) {
670670
yield item;
@@ -707,7 +707,7 @@ export class PagePromise<
707707
* console.log(item)
708708
* }
709709
*/
710-
async *[Symbol.asyncIterator]() {
710+
async *[Symbol.asyncIterator](): AsyncGenerator<Item> {
711711
const page = await this;
712712
for await (const item of page) {
713713
yield item;

src/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class APIError extends MuxError {
4747
errorResponse: Object | undefined,
4848
message: string | undefined,
4949
headers: Headers | undefined,
50-
) {
50+
): APIError {
5151
if (!status) {
5252
return new APIConnectionError({ message, cause: castToError(errorResponse) });
5353
}

src/index.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -232,19 +232,21 @@ export class Mux extends Core.APIClient {
232232
static fileFromPath = Uploads.fileFromPath;
233233
}
234234

235-
export const MuxError = Errors.MuxError;
236-
export const APIError = Errors.APIError;
237-
export const APIConnectionError = Errors.APIConnectionError;
238-
export const APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
239-
export const APIUserAbortError = Errors.APIUserAbortError;
240-
export const NotFoundError = Errors.NotFoundError;
241-
export const ConflictError = Errors.ConflictError;
242-
export const RateLimitError = Errors.RateLimitError;
243-
export const BadRequestError = Errors.BadRequestError;
244-
export const AuthenticationError = Errors.AuthenticationError;
245-
export const InternalServerError = Errors.InternalServerError;
246-
export const PermissionDeniedError = Errors.PermissionDeniedError;
247-
export const UnprocessableEntityError = Errors.UnprocessableEntityError;
235+
export {
236+
MuxError,
237+
APIError,
238+
APIConnectionError,
239+
APIConnectionTimeoutError,
240+
APIUserAbortError,
241+
NotFoundError,
242+
ConflictError,
243+
RateLimitError,
244+
BadRequestError,
245+
AuthenticationError,
246+
InternalServerError,
247+
PermissionDeniedError,
248+
UnprocessableEntityError,
249+
} from './error';
248250

249251
export import toFile = Uploads.toFile;
250252
export import fileFromPath = Uploads.fileFromPath;

tsconfig.deno.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
{
22
"extends": "./tsconfig.json",
3-
"include": ["deno"],
3+
"include": ["dist-deno"],
44
"exclude": [],
55
"compilerOptions": {
6-
"rootDir": "./deno",
6+
"rootDir": "./dist-deno",
77
"lib": ["es2020", "DOM"],
8-
"paths": {
9-
"@mux/mux-node/_shims/auto/*": ["deno/_shims/auto/*-deno"],
10-
"@mux/mux-node/*": ["deno/*"],
11-
"@mux/mux-node": ["deno/index.ts"],
12-
},
138
"noEmit": true,
149
"declaration": true,
1510
"declarationMap": true,
16-
"outDir": "deno",
11+
"outDir": "dist-deno",
1712
"pretty": true,
1813
"sourceMap": true
1914
}

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"noUncheckedIndexedAccess": true,
3333
"noImplicitOverride": true,
3434
"noPropertyAccessFromIndexSignature": true,
35+
"isolatedModules": false,
3536

3637
"skipLibCheck": true
3738
}

0 commit comments

Comments
 (0)