-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace creating handle with new adapters (#205)
* refactor: replace creating handle with new adapters * chore: update example apps to use new adapters * chore: update documentation with new adapters * chore: remove some headings * chore: add description to fetch adapter page * fix: small url tweaks * ci: re-combine ci files --------- Co-authored-by: Shadow <[email protected]>
- Loading branch information
1 parent
309db77
commit 626f3c3
Showing
40 changed files
with
751 additions
and
609 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@buape/carbon": minor | ||
"create-carbon": minor | ||
--- | ||
|
||
refactor: replace creating handle with new adapters |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { ExecutionContext, Request } from "@cloudflare/workers-types" | ||
|
||
declare global { | ||
namespace NodeJS { | ||
interface ProcessEnv extends Record<string, string | undefined> {} | ||
interface Process { | ||
env: ProcessEnv | ||
} | ||
} | ||
var process: NodeJS.Process | ||
} | ||
|
||
export default { | ||
async fetch(req: Request, env: NodeJS.ProcessEnv, ctx: ExecutionContext) { | ||
Reflect.set(globalThis, "process", { env }) | ||
const mod = await import("./index.js") | ||
return mod.default.fetch(req, ctx) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
name = "cloudo" | ||
main = "src/index.ts" | ||
main = "src/entry.ts" | ||
compatibility_date = "2024-10-18" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import { Command, CommandInteraction } from "@buape/carbon"; | ||
import { Command, type CommandInteraction } from "@buape/carbon" | ||
|
||
export default class MentionsCommand extends Command { | ||
name = "mention" | ||
description = "Allowed Mentions Test" | ||
defer = true | ||
name = "mention" | ||
description = "Allowed Mentions Test" | ||
defer = true | ||
|
||
async run(interaction: CommandInteraction) { | ||
await interaction.reply({content: `<@${interaction.userId}>`, allowedMentions: {parse: []}}) | ||
} | ||
} | ||
async run(interaction: CommandInteraction) { | ||
await interaction.reply({ | ||
content: `<@${interaction.userId}>`, | ||
allowedMentions: { parse: [] } | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.