Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate back to Cloudflare Workers #147

Merged
merged 2 commits into from
Jan 16, 2025
Merged

Migrate back to Cloudflare Workers #147

merged 2 commits into from
Jan 16, 2025

Conversation

benvinegar
Copy link
Owner

@benvinegar benvinegar commented Jan 16, 2025

Closes #134.

This would introduce breaking changes because it deploys to a Cloudflare Worker instead of a Pages project – you would need to create the Worker. But the good news is the data (Analytics Engine) will be unaffected.

Not sure I want to introduce another major version (3.x) for this though.

@benvinegar benvinegar changed the base branch from main to v3 January 16, 2025 21:06
@benvinegar benvinegar changed the title Migrate back to Cloudflare Workers [WIP] Migrate back to Cloudflare Workers Jan 16, 2025
@benvinegar benvinegar merged commit e2d5578 into v3 Jan 16, 2025
1 check passed
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 32 lines in your changes missing coverage. Please review.

Project coverage is 86.47%. Comparing base (7c28341) to head (ea8f759).
Report is 1 commits behind head on v3.

Files with missing lines Patch % Lines
packages/server/workers/app.ts 0.00% 31 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               v3     #147      +/-   ##
==========================================
- Coverage   87.00%   86.47%   -0.54%     
==========================================
  Files          38       37       -1     
  Lines        2439     2454      +15     
  Branches      302      301       -1     
==========================================
  Hits         2122     2122              
- Misses        309      325      +16     
+ Partials        8        7       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

benvinegar added a commit that referenced this pull request Jan 24, 2025
* Migrate back to Cloudflare Workers

* Delete deprecated CF pages files
benvinegar added a commit that referenced this pull request Jan 25, 2025
* Migrate back to Cloudflare Workers

* Delete deprecated CF pages files
benvinegar added a commit that referenced this pull request Jan 26, 2025
* Migrate back to Cloudflare Workers

* Delete deprecated CF pages files
benvinegar added a commit that referenced this pull request Feb 6, 2025
* Migrate back to Cloudflare Workers (#147)

* Migrate back to Cloudflare Workers

* Delete deprecated CF pages files

* First attempt at CLI

* CLI checks if env variables already set first

* Add loading spinner (ora pkg) to CLI

* Create .counterscale dir

* Update commands for new Turbo layout

* Put CLI colors in constant

* Create db in home dir

* Get account id

* Store worker in db, pass as wrangler CLI param

* Use shell exec variable substitution

* More messin around

* Remove sqlite/db code

* Dont prompt for Cloudflare account id, fix errors not emitting

* Fix a host of issues

* Add cli package

* Add inquirer types

* Fix parsing account id

* Try to figure out where @counterscale/server is located

* Add missing package.json fields and LICENSE

* Fix bad dep

* More package/dist fixes for CLI install

* alpha 4

* Back to wrangler.json

* alpha 5

* alpha 6

* fix paths + alpha 7

* alpha 8

* bundle app w/ server pkg, alpha 9

* Get default names from wrangler.json

* Better styling + colors

* Tick out output so it looks more natural

* Remove test boilerplate from cli (no tests yet)

* Fix tests, lint, typecheck

* Add basic test suite for CLI

* Add more tests

* Make wrangler a peerdep

* Switch to pnpm to solve subdep issues

* Fix missing ora dep

* Add npmrc, link workspace packages, add node types

* Fix tests

* Fix eslint

* Fix path resolution

* alpha 12

* Fix relative path in import
benvinegar added a commit that referenced this pull request Feb 6, 2025
* Migrate back to Cloudflare Workers (#147)

* Migrate back to Cloudflare Workers

* Delete deprecated CF pages files

* First attempt at CLI

* CLI checks if env variables already set first

* Add loading spinner (ora pkg) to CLI

* Create .counterscale dir

* Update commands for new Turbo layout

* Put CLI colors in constant

* Create db in home dir

* Get account id

* Store worker in db, pass as wrangler CLI param

* Use shell exec variable substitution

* More messin around

* Remove sqlite/db code

* Dont prompt for Cloudflare account id, fix errors not emitting

* Fix a host of issues

* Add cli package

* Add inquirer types

* Fix parsing account id

* Try to figure out where @counterscale/server is located

* Add missing package.json fields and LICENSE

* Fix bad dep

* More package/dist fixes for CLI install

* alpha 4

* Back to wrangler.json

* alpha 5

* alpha 6

* fix paths + alpha 7

* alpha 8

* bundle app w/ server pkg, alpha 9

* Get default names from wrangler.json

* Better styling + colors

* Tick out output so it looks more natural

* Remove test boilerplate from cli (no tests yet)

* Fix tests, lint, typecheck

* Add basic test suite for CLI

* Add more tests

* Make wrangler a peerdep

* Switch to pnpm to solve subdep issues

* Fix missing ora dep

* Add npmrc, link workspace packages, add node types

* Fix tests

* Fix eslint

* Fix path resolution

* alpha 12

* Fix relative path in import
benvinegar added a commit that referenced this pull request Feb 6, 2025
* Migrate back to Cloudflare Workers

* Delete deprecated CF pages files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert project back to Cloudflare Workers (vs. Pages)
1 participant