git ci/cd, gitops, automatic builds, build on cloud, on wrangler?
git ci/cd, gitops, automatic builds, build on cloud, on wrangler?
index.js file and its sourcemap are huge (too big for the upload sourcemap option too)wrangler
@cloudflare/vite-plugin's readme i see a section titled "migrating from wrangler dev". now, does that mean that, going forward, one should aim to use this?--remote npx wrangler dev --test-scheduled -c path/wranglerA/wrangler.toml -c path/wranglerB/wrangler.toml to run multiple workers at the same time with a single command, is it possible to have the scheduled handler executed on all workers? As it operates now, it seems as though using /__scheduled is only executed on the primary worker (i.e., the first one in the command chain).wrangler r2 bucket create my-terraform-state but I can't create the access tokens in a similiar manner..wrangler artifacts on the local environment that a worker connects to?.wrangler/state/v3 in their corresponding directories, I need only one to be used and the other worker to connect to the first worker artifacts, so that when I push an object to R2 from the first, I can delete it from the second.getPlatformProxi() but I'd like to have something configurable within wrangler.tomlwrangler dev --persist-to <PATH_HERE> but damn, it took me lots of searches to find itwrangler dev after a build (to test prod like setup locally), is there something I need to do so that error messages use the sourcemap that sits next to worker.js?fetch handler. My sample request works fine from a simple Node env using NodeJS.fetch , but when called from the Workers fetch I get a 403: Forbidden. It's a fairly old service endpoint. Can anyone suggest anything I need to take into account? [edit] I should add that this is using wrangler dev locally to hit the fetch endpoint from a browser. [edit] Apologies for posting in the wrong chat.npx wrangler dev --test-scheduled -c path/wranglerA/wrangler.toml -c path/wranglerB/wrangler.tomlscheduled/__scheduledwrangler r2 bucket create my-terraform-statenpx wrangler pages devng build --output-path localdist.wrangler.wrangler/state/v3getPlatformProxi()wrangler.tomlwrangler dev --persist-to <PATH_HERE>worker.jsNodeJS.fetch403: Forbiddenexport type OAuth2TokenResponse = {
access_token: string;
token_type: string;
expires_in: number;
refresh_token: string;
scope: string;
created_at: number;
};
export default {
async fetch(request, env, ctx): Promise<Response> {
const endpoint = `${env.ETP_ROOT}/oauth/token`;
const headers = new Headers();
headers.append("Content-Type", "application/json");
const raw = JSON.stringify({
"grant_type": "password",
"username": env.ETP_USERNAME,
"password": env.ETP_PASSWORD,
"client_id": env.ETP_CLIENT_ID,
"client_secret": env.ETP_CLIENT_SECRET
});
const requestOptions = {
method: "POST",
headers: headers,
body: raw,
redirect: "follow"
} as RequestInit;
const response = await fetch(endpoint, requestOptions)
console.log(response.status);
const tokenResponse = await response.json() as unknown as OAuth2TokenResponse;
console.log(JSON.stringify(tokenResponse));
console.log(`Response token issued: expires in: ${tokenResponse.expires_in}`);
return new Response(`Response token issued: expires in: ${tokenResponse.expires_in}`);
},
} satisfies ExportedHandler<Env>;