mirror of
https://github.com/deployflare/resend.git
synced 2026-01-13 16:18:02 +00:00
Initial commit
This commit is contained in:
17
.github/workflows/auto-name.yml
vendored
Normal file
17
.github/workflows/auto-name.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
on: push
|
||||||
|
permissions: write-all
|
||||||
|
jobs:
|
||||||
|
j:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: |
|
||||||
|
n=${GITHUB_REPOSITORY#*/};n=$(echo $n|tr A-Z a-z)
|
||||||
|
jq ".name=\"$n\"" package.json>p.json && mv p.json package.json
|
||||||
|
sed -i "s/^name *=.*$/name = \"$n\"/" wrangler.toml
|
||||||
|
git diff --quiet || {
|
||||||
|
git config user.email a@a.a
|
||||||
|
git config user.name a
|
||||||
|
git commit -am update
|
||||||
|
git push
|
||||||
|
}
|
||||||
11
.github/workflows/deep.yml
vendored
Normal file
11
.github/workflows/deep.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
jobs:
|
||||||
|
deploy-cloudflare:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: cloudflare/wrangler-action@v3
|
||||||
|
with:
|
||||||
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log
|
||||||
|
.pnpm-debug.log
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
.npm
|
||||||
|
.eslintcache
|
||||||
|
.stylelintcache
|
||||||
|
.node_repl_history
|
||||||
|
*.tgz
|
||||||
|
.cache
|
||||||
|
out
|
||||||
|
dist
|
||||||
|
.temp
|
||||||
|
.cache
|
||||||
|
.pnp.*
|
||||||
|
.dev.vars
|
||||||
|
!.dev.vars.example
|
||||||
|
.env
|
||||||
|
!.env.example
|
||||||
|
.wrangler/
|
||||||
11
index.js
Normal file
11
index.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
async function fetch(request) {
|
||||||
|
if (request.method === 'OPTIONS') {
|
||||||
|
const headers = new Headers()
|
||||||
|
headers.set('Access-Control-Allow-Origin', '*')
|
||||||
|
headers.set('Access-Control-Allow-Headers', 'Authorization, Content-Type')
|
||||||
|
return new Response(null, { headers })
|
||||||
|
}
|
||||||
|
return new Response('OK')
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { fetch }
|
||||||
15
package.json
Normal file
15
package.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "workertemplate",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"deploy": "wrangler deploy",
|
||||||
|
"dev": "wrangler dev",
|
||||||
|
"start": "wrangler dev"
|
||||||
|
},
|
||||||
|
"dependencies": {},
|
||||||
|
"devDependencies": {
|
||||||
|
"wrangler": "4.33.*"
|
||||||
|
}
|
||||||
|
}
|
||||||
44
wrangler.toml
Normal file
44
wrangler.toml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
name = "workertemplate"
|
||||||
|
main = "index.js"
|
||||||
|
compatibility_date = "2025-09-09"
|
||||||
|
# compatibility_flags = []
|
||||||
|
# node_compat = true
|
||||||
|
# keep_vars = true
|
||||||
|
|
||||||
|
# [triggers]
|
||||||
|
# crons = ["*/5 * * * *"]
|
||||||
|
|
||||||
|
# [vars]
|
||||||
|
|
||||||
|
# [assets]
|
||||||
|
# directory = "./public"
|
||||||
|
# binding = "ASSETS"
|
||||||
|
|
||||||
|
# [wasm_modules]
|
||||||
|
# WASM_PARSER = "./wasm/parser.wasm"
|
||||||
|
|
||||||
|
# [text_blobs]
|
||||||
|
# EMAIL_TEMPLATE = "./templates/welcome.txt"
|
||||||
|
|
||||||
|
# [data_blobs]
|
||||||
|
# BINARY_CHUNK = "./assets/blob.bin"
|
||||||
|
|
||||||
|
# [[kv_namespaces]]
|
||||||
|
# binding = "MY_KV"
|
||||||
|
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||||
|
|
||||||
|
# [[r2_buckets]]
|
||||||
|
# binding = "MY_BUCKET"
|
||||||
|
# bucket_name = "my-bucket"
|
||||||
|
|
||||||
|
# [[d1_databases]]
|
||||||
|
# binding = "DB"
|
||||||
|
# database_name = "my-db"
|
||||||
|
# database_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||||
|
|
||||||
|
# [durable_objects]
|
||||||
|
# bindings = [{ name = "MY_DO", class_name = "MyDurableObject" }]
|
||||||
|
|
||||||
|
# [[migrations]]
|
||||||
|
# tag = "v1"
|
||||||
|
# new_classes = ["MyDurableObject"]
|
||||||
Reference in New Issue
Block a user