Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b580a8d
Implement Cloudflare Workers exports in adapter-cloudflare
thomasfosterau Dec 20, 2024
a7c9854
Update implementation to correctly resolve paths.
thomasfosterau Dec 20, 2024
2337ab4
Add additional exports functionality to adapter-cloudflare-workers.
thomasfosterau Dec 20, 2024
05b8ad9
Rename 'exports' to 'handlers'.
thomasfosterau Dec 20, 2024
2d15411
Add changeset.
thomasfosterau Dec 20, 2024
8a418d9
Remove handlers from adapter-cloudflare
thomasfosterau Dec 23, 2024
69c2ff0
Export named exports as well as default export form handlers file.
thomasfosterau Dec 23, 2024
4989a48
Document `handlers` option.
thomasfosterau Dec 23, 2024
b9333f3
Fix missing semicolon and linebreaks.
thomasfosterau Dec 23, 2024
c5c3a99
Update changeset
thomasfosterau Dec 29, 2024
78a6177
Add handlers option to the example config
thomasfosterau Dec 29, 2024
5596bec
Update 70-adapter-cloudflare-workers.md
thomasfosterau Dec 31, 2024
33f0fab
Add missing backtick.
thomasfosterau Dec 31, 2024
615909a
Update documentation/docs/25-build-and-deploy/70-adapter-cloudflare-w…
teemingc Dec 31, 2024
d6bdb75
Correctly add fetch method to Cloudflare RPC workers.
thomasfosterau Jan 14, 2025
14ca427
Merge branch 'main' into pr/thomasfosterau/13207
teemingc Jan 21, 2025
3c6b08e
Merge branch 'main' into cloudflare-exports
thomasfosterau Feb 27, 2025
4cb65d1
Fix lint errors
thomasfosterau Feb 27, 2025
641c8fc
Remove Durable Objects support.
thomasfosterau Feb 27, 2025
497d1dd
Clarify documentation.
thomasfosterau Feb 27, 2025
e71366e
Make documentation more concise.
thomasfosterau Feb 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/adapter-cloudflare-workers/files/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { manifest, prerendered, base_path } from 'MANIFEST';
import handlers from 'HANDLERS';
import { getAssetFromKV, mapRequestToAsset } from '@cloudflare/kv-asset-handler';
import static_asset_manifest_json from '__STATIC_CONTENT_MANIFEST';

export * from 'HANDLERS';

const static_asset_manifest = JSON.parse(static_asset_manifest_json);

const server = new Server(manifest);
Expand Down
5 changes: 4 additions & 1 deletion packages/adapter-cloudflare-workers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ export default function ({ config = 'wrangler.toml', platformProxy = {}, handler
);

if (handlers) {
const handlers_file = resolve(cwd(), handlers);
writeFileSync(
`${tmp}/_handlers.js`,
`import handlers from "${resolve(cwd(), handlers)}";\n\n` + 'export default handlers;'
`import handlers from "${handlers_file}";\n\n` +
`export * from "${handlers_file}"` +
'export default handlers;'
);
} else {
writeFileSync(`${tmp}/_handlers.js`, 'export default {};');
Expand Down
Loading