{"id":21500491,"url":"https://github.com/node-libraries/cloudflare-exec","last_synced_at":"2026-03-08T18:35:16.356Z","repository":{"id":229291100,"uuid":"776353146","full_name":"node-libraries/cloudflare-exec","owner":"node-libraries","description":"Running Scripts on Cloudflare","archived":false,"fork":false,"pushed_at":"2024-07-14T13:12:25.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T00:10:19.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/node-libraries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-23T09:10:15.000Z","updated_at":"2024-07-14T13:12:28.000Z","dependencies_parsed_at":"2024-10-22T04:04:45.957Z","dependency_job_id":"ce3c35cb-9ab2-47ae-a919-b6858df24ecd","html_url":"https://github.com/node-libraries/cloudflare-exec","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"9eed93b24426168127204b27c1b9006a9ae65c07"},"previous_names":["node-libraries/cloudflare-exec"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-libraries%2Fcloudflare-exec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-libraries%2Fcloudflare-exec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-libraries%2Fcloudflare-exec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-libraries%2Fcloudflare-exec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-libraries","download_url":"https://codeload.github.com/node-libraries/cloudflare-exec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242847827,"owners_count":20194969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T17:41:56.710Z","updated_at":"2026-03-08T18:35:16.315Z","avatar_url":"https://github.com/node-libraries.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloudflare-exec\n\nRunning Scripts on Cloudflare Workers\n\n## usage\n\n```text\nUSAGE\n        command [options] \u003cpath\u003e\nARGUMENTS\n        \u003cpath\u003e Path to the script file\nOPTIONS\n        -r, --remote Run remotely(Default is local)\n        -c, --config \u003cpath\u003e Path to the wrangler config file(Default is wrangler.toml)\n        -e, --env \u003cenvironment\u003e Environment\n        -l, --log \u003clogLevel\u003e \"log\" | \"none\" | \"info\" | \"error\" | \"warn\" | \"debug\"\n```\n\n## example\n\n- wrangler.toml\n\n```toml\nname = \"xxxx\"\nmain = \"src/index.ts\"\ncompatibility_date = \"2024-03-14\"\nnode_compat = true\nminify = true\n\n[[d1_databases]]\nbinding = \"DB\"\ndatabase_name = \"test-db\"\ndatabase_id =\"xxxxxx\"\n\n[env.local]\nd1_databases=[\n  {binding = \"DB\",database_name = \"test-db\",database_id =\"test-db\"}\n]\n\n```\n\n- prisma/seed.ts\n\n```ts\nimport { PrismaD1 } from '@prisma/adapter-d1';\nimport { PrismaClient } from '@prisma/client';\nimport { WorkersFunction } from 'cloudflare-exec';\n\ntype Env = {\n  DB: D1Database;\n};\n\nconst main: WorkersFunction\u003cEnv\u003e = async ({ env }) =\u003e {\n  const adapter = new PrismaD1(env.DB);\n  const prisma = new PrismaClient({ adapter });\n\n  // seed data\n};\n\nexport default main;\n```\n\n### local execution\n\n```sh\ncloudflare-exec --e local prisma/seed\n```\n\n### remote execution\n\n```sh\ncloudflare-exec -r prisma/seed\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-libraries%2Fcloudflare-exec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-libraries%2Fcloudflare-exec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-libraries%2Fcloudflare-exec/lists"}