Files
kaitranntt 126cffc6dc refactor: remove deprecated native shell installers
- Remove installers/ directory (install.sh, install.ps1, uninstall.sh, uninstall.ps1)
- Update CloudFlare worker to 301 redirect /install* to npm docs
- Remove detectInstallationMethod() - npm is now only install method
- Simplify update-command.ts to npm-only updates
- Clean up tests to remove direct install references

BREAKING CHANGE: Native shell installers (curl/irm) no longer work.
Use `npm install -g @kaitranntt/ccs` instead.
2025-12-18 16:52:57 -05:00

26 lines
808 B
JavaScript

/**
* CCS CloudFlare Worker - Redirect to npm Installation
*
* Legacy shell installers are deprecated. This worker now redirects
* all /install* and /uninstall* requests to the npm installation docs.
*/
export default {
async fetch(request) {
const url = new URL(request.url);
const docsUrl = 'https://docs.ccs.kaitran.ca/getting-started/installation';
// Redirect all install/uninstall paths to npm installation docs
if (
url.pathname === '/install' ||
url.pathname === '/install.sh' ||
url.pathname === '/install.ps1' ||
url.pathname === '/uninstall' ||
url.pathname === '/uninstall.sh' ||
url.pathname === '/uninstall.ps1'
) {
return Response.redirect(docsUrl, 301);
}
return new Response('Not Found', { status: 404 });
}
};