Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Sep 29, 2023
1 parent a13def3 commit 4d2ad56
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions Source/Index.ts → Source/Object/Worker.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import type { Request, ResponseInit } from "@cloudflare/workers-types";

export const { default: Environment } = await import("./Object/Environment.js");

export const { Response } = await import("@cloudflare/workers-types");

class JSONResponse extends Response {
constructor(
// rome-ignore lint/suspicious/noExplicitAny:
Expand Down Expand Up @@ -89,3 +83,9 @@ export default {
return (await import("itty-router")).Router().handle(request);
},
};

import type { Request, ResponseInit } from "@cloudflare/workers-types";

export const { default: Environment } = await import("./Environment.js");

export const { Response } = await import("@cloudflare/workers-types");
1 change: 0 additions & 1 deletion Target/Index.js

This file was deleted.

20 changes: 10 additions & 10 deletions Target/Index.d.ts → Target/Object/Worker.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
declare const _default: {
fetch(request: Request, { DISCORD_PUBLIC_KEY }?: {
DISCORD_APPLICATION_ID: string;
DISCORD_CLIENT_ID: string;
DISCORD_CLIENT_SECRET: string;
DISCORD_PUBLIC_KEY: string;
DISCORD_TOKENS: string;
}): Promise<any>;
};
export default _default;
import type { Request } from "@cloudflare/workers-types";
export declare const Environment: import("zod").ZodObject<{
DISCORD_APPLICATION_ID: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
Expand All @@ -19,13 +29,3 @@ export declare const Environment: import("zod").ZodObject<{
DISCORD_TOKENS?: string | undefined;
}>;
export declare const Response: typeof import("@cloudflare/workers-types").Response;
declare const _default: {
fetch(request: Request, { DISCORD_PUBLIC_KEY }?: {
DISCORD_APPLICATION_ID: string;
DISCORD_CLIENT_ID: string;
DISCORD_CLIENT_SECRET: string;
DISCORD_PUBLIC_KEY: string;
DISCORD_TOKENS: string;
}): Promise<any>;
};
export default _default;
1 change: 1 addition & 0 deletions Target/Object/Worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"url": "https://nikolahristov.tech"
},
"type": "module",
"main": "./Target/Index.js",
"types": "./Target/Index.d.ts",
"main": "./Target/Object/Worker.js",
"types": "./Target/Object/Worker.d.ts",
"scripts": {
"dev": "wrangler dev",
"prepublishOnly": "TypeScriptESBuild 'Source/**/*.ts'"
Expand Down
2 changes: 1 addition & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "api"
main = "Source/Index.ts"
main = "./Target/Object/Worker.js"
compatibility_date = "2023-02-24"
send_metrics = false

0 comments on commit 4d2ad56

Please sign in to comment.