@sanoma-ai/connector-cloudflare 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/worker/sites.js DELETED
@@ -1,17 +0,0 @@
1
- // The company's Worker when it serves public sites: the main module `cloudflare.container`
2
- // uploads in place of `index.js` once the container built the sites bundle (`sites/index.js`,
3
- // `buildWorker` in `@sanoma-ai/app/build`). A request the bundle serves (a page of a public site
4
- // without a login, on its domain) is answered here, on the Worker, and never waits for the
5
- // container; everything else goes to the one object, as `index.js` sends it. A run a page starts
6
- // has the object start the container (`startNow`), which runs it.
7
- import { instanceOf, worker } from "./instance.js";
8
- import sites from "./sites/index.js";
9
-
10
- export { SanomaInstance } from "./index.js";
11
-
12
- export default {
13
- fetch(request, env, ctx) {
14
- if (!sites.serves(request, env)) return worker.fetch(request, env);
15
- return sites.fetch(request, env, ctx, { startNow: () => instanceOf(env).startNow() });
16
- },
17
- };