Everything in the wrangler file is safe to expose. The only exception is stuff like API keys which y
Everything in the wrangler file is safe to expose. The only exception is stuff like API keys which you should be using secrets for.
experimental-json-config safe to use with wrangler? or are there some pitfalls that i should know about if i want to use a json config insteadHTTP Only cookies that need to get sent and chrome will not do that unless HTTPS is onwrangler dev --local-protocol https. It should work--ip 0.0.0.0 in the docker containerSocketManager on first deploy, on subsequent deploys I get this error from wrangler: —from-dash option in wrangler init: https://developers.cloudflare.com/workers/wrangler/commands/#init
Assets Uploaded tab show on the deployment logs in Cloudflare?@cloudflare/next-on-pages@1 package. This requires me to add a wrangler.toml file to my project root as it complained about a missing nodejs_compat flag I needed to set, which I have done in the wrangler config. 1a9dcf7c to a commit in my repo? Is there a standard way to do so?// Currently...
[[migrations]]
tag = 'v1'
new_classes = ['StateObject']
[[migrations]]
tag = 'v1'
new_classes = ['SocketManager']npx wrangler dev
✘ [ERROR] service core:user:hello-world: Uncaught LinkError: WebAssembly.Instance(): Import #9 "./index_bg.js" "__wbg_error_53abcd6a461f73d8": function import requires a callable
at null.<anonymous> (shim.js:15:9)
✘ [ERROR] The Workers runtime failed to start. There is likely additional logging output above.[patch.crates-io]
wasm-bindgen = { git = "https://github.com/rustwasm/wasm-bindgen" }name = "<PROJECT_NAME>"
compatibility_date = "2024-11-22"
compatibility_flags = ["nodejs_compat"]
pages_build_output_dir = ".vercel/output/static"21:46:32.059 Found wrangler.toml file. Reading build configuration...
21:46:32.064 pages_build_output_dir: .vercel/output/static
21:46:32.065 Build environment variables: (none found)
21:46:32.162 Successfully read wrangler.toml file.
21:46:32.300 Detected the following tools from environment: npm@9.6.7, nodejs@18.17.1
21:46:32.300 Installing project dependencies: npm clean-install --progress=false
21:46:33.815 npm WARN EBADENGINE Unsupported engine {
21:46:33.815 npm WARN EBADENGINE package: 'next@15.0.3',
21:46:33.815 npm WARN EBADENGINE required: { node: '^18.18.0 || ^19.8.0 || >= 20.0.0' },
21:46:33.816 npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
21:46:33.816 npm WARN EBADENGINE }
...
21:47:03.417 npm WARN EBADENGINE Unsupported engine {
21:46:33.417 npm WARN EBADENGINE package: 'next@15.0.3',
21:46:33.417 npm WARN EBADENGINE required: { node: '^18.18.0 || ^19.8.0 || >= 20.0.0' },
21:46:33.418 npm WARN EBADENGINE current: { node: 'v18.17.1', npm: '9.6.7' }
21:47:04.782 You are using Node.js 18.17.1. For Next.js, Node.js version "^18.18.0 || ^19.8.0 || >= 20.0.0" is required.
21:47:04.798 Error: Command "npm run build" exited with 1import {
defineWorkersConfig,
readD1Migrations
} from '@cloudflare/vitest-pool-workers/config'
export default defineWorkersConfig(async () => {
const migrations = await readD1Migrations('./src/migrations')
return {
test: {
globals: true,
poolOptions: {
workers: {
isolatedStorage: true,
miniflare: {
d1Databases: {
DB: 'db-tests'
},
bindings: {
TEST_MIGRATIONS: migrations
},
compatibilityDate: '2024-11-20',
compatibilityFlags: ['nodejs_compat']
}
}
}
}
}
})name: Deploy Cloudflare Workers
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to Cloudflare Workers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Create wrangler.toml dynamically
run: |
cat <<EOF > wrangler.toml
name = "${{ secrets.PROJECT_NAME }}"
main = "src/index.ts"
compatibility_date = "2024-11-20"
compatibility_flags = ["nodejs_compat"]
[[d1_databases]]
binding = "DB"
database_name = "${{ secrets.D1_DATABASE_NAME }}"
database_id = "${{ secrets.D1_DATABASE_ID }}"
migrations_dir = "./src/migrations"
EOF
- name: Run Tests, Migrations and Deploy using Cloudflare CLI environment
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
preCommands: |
pnpm test
pnpm migration:prod