@samebase/convex-hosting 0.13.1 → 0.15.0

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +117 -73
  3. package/dist/cli/convex.d.ts +6 -0
  4. package/dist/cli/convex.js +22 -1
  5. package/dist/cli/convex.js.map +1 -1
  6. package/dist/cli/files.js +6 -1
  7. package/dist/cli/files.js.map +1 -1
  8. package/dist/cli/main.js +138 -20
  9. package/dist/cli/main.js.map +1 -1
  10. package/dist/cli/manifest.d.ts +19 -0
  11. package/dist/cli/manifest.js +71 -0
  12. package/dist/cli/manifest.js.map +1 -0
  13. package/dist/cli/site-config.d.ts +32 -0
  14. package/dist/cli/site-config.js +15 -0
  15. package/dist/cli/site-config.js.map +1 -0
  16. package/dist/client/answer.d.ts +16 -0
  17. package/dist/client/answer.js +51 -0
  18. package/dist/client/answer.js.map +1 -0
  19. package/dist/client/index.d.ts +23 -3
  20. package/dist/client/index.js +57 -78
  21. package/dist/client/index.js.map +1 -1
  22. package/dist/client/manifest.d.ts +68 -0
  23. package/dist/client/manifest.js +48 -0
  24. package/dist/client/manifest.js.map +1 -0
  25. package/dist/client/version-module.d.ts +1 -1
  26. package/dist/component/_generated/component.d.ts +2 -18
  27. package/dist/component/lib.d.ts +15 -46
  28. package/dist/component/lib.js +35 -134
  29. package/dist/component/lib.js.map +1 -1
  30. package/dist/component/schema.d.ts +2 -2
  31. package/dist/component/schema.js +2 -2
  32. package/dist/workers-sdk/packages/workers-shared/asset-worker/src/assets-manifest.d.ts +14 -0
  33. package/dist/workers-sdk/packages/workers-shared/asset-worker/src/assets-manifest.js +84 -0
  34. package/dist/workers-sdk/packages/workers-shared/asset-worker/src/assets-manifest.js.map +1 -0
  35. package/package.json +7 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.15.0
4
+
5
+ - A request reads no database. The deploy writes the version's assets into
6
+ `.convex-hosting/version.js` (each path's content hash, content type, and stored file, in the
7
+ layout of Cloudflare's asset manifest), and the HTTP action answers from them. A page, a miss, a
8
+ redirect, a 304, and a session refresh cost one function call, the HTTP action, where they cost
9
+ two; an answer with a body costs two, the action and the download of the file, where it cost
10
+ three. The component's `route` query is gone.
11
+ - Breaking: `routeAll` takes one object, with every input named, and the assets in place of the
12
+ version id:
13
+
14
+ ```ts
15
+ import { assets } from "../.convex-hosting/version.js";
16
+
17
+ routeAll({ http, component: components.hosting, assets, worker: server });
18
+ ```
19
+
20
+ A files-only site leaves `worker` out. `assets` and `worker` are Cloudflare's names: the static
21
+ assets of a Worker, and the Worker script. The file exports only `assets`: the query that reloads
22
+ open tabs reads `assets.versionId` in place of `versionId`. A test that mocks the version module
23
+ adds `assets: { format: 1, versionId: "test", markToken: "test", files: null }`.
24
+
25
+ - After the push, `deploy` sends one request with the version's mark token, and the code that
26
+ answers marks its version live; before, the first request did. `markLive` answers what it did and
27
+ never throws. It takes the time the request arrived and refuses a mark when another version went
28
+ live after it: a mark that was still running when another deploy's push and mark landed deleted
29
+ the entries of the version that serves.
30
+ - A first install pushes twice: once to install the component, and once after the upload, to serve
31
+ the site.
32
+ - A version file uploaded to another deployment, such as production's pushed to development by a
33
+ running `npx convex dev`, answers 404 naming that deployment.
34
+
35
+ ## 0.14.0
36
+
37
+ - The README, which this package ships, starts with what the component is, who it is for, and the
38
+ quick start; the Cloudflare rules, the tests, and the comparisons with Workers and with
39
+ static-hosting have their own sections. It links the directory listing and carries its badge.
40
+ - Releases publish on merge with provenance; no staged approval.
41
+
3
42
  ## 0.13.1
4
43
 
5
44
  - `deploy --preview-name` without a deploy key, and without a login whose project is in
package/README.md CHANGED
@@ -1,43 +1,23 @@
1
1
  # Convex Hosting
2
2
 
3
- Serves a web app from the Convex deployment that runs its backend, at
4
- `https://<deployment>.convex.site`: the files of a build and the pages the app renders. One
5
- deployment, one URL, one deploy command.
3
+ [![Convex Component](https://www.convex.dev/components/badge/samebase/convex-hosting)](https://www.convex.dev/components/samebase/convex-hosting)
6
4
 
7
- The files follow
8
- [Cloudflare Workers rules](https://developers.cloudflare.com/workers/static-assets/). The serving
9
- code is Cloudflare's asset Worker, copied from
10
- [cloudflare/workers-sdk](https://github.com/cloudflare/workers-sdk) at a pinned commit and run
11
- inside a Convex HTTP action, so `_headers`, `_redirects`, `.assetsignore`, `html_handling`, and
12
- `not_found_handling` mean what they mean on Cloudflare. This repository's CI runs Cloudflare's own
13
- tests against it: its
14
- [196 cases](https://github.com/samebase/convex-hosting/blob/main/packages/convex-hosting/src/component/conformance.test.ts)
15
- for `html_handling` and path encoding, and its
16
- [integration test](https://github.com/samebase/convex-hosting/tree/main/packages/convex-hosting/src/workers-sdk/fixtures/workers-with-assets-only)
17
- for a files-only site, with its imports pointed at this package, on a local Convex deployment.
18
-
19
- An app that renders pages takes the place of the Worker script: an object with `fetch(request)` that
20
- answers what no file answers. TanStack Start has
21
- [an adapter](https://github.com/samebase/convex-hosting/tree/main/packages/convex-hosting-tanstack-start),
22
- with streamed pages, server functions, server routes, request middleware, and cookie sessions. The
23
- [TanStack Start example](https://github.com/samebase/convex-hosting/tree/main/examples/tanstack-ssr)
24
- is deployed here and, from the same source, as a real Worker; CI keeps the difference between the
25
- two to a committed patch.
5
+ A [Convex component](https://www.convex.dev/components/samebase/convex-hosting) that serves a web
6
+ app's built files and server-rendered pages from the deployment that runs its backend, at
7
+ `https://<deployment>.convex.site`.
26
8
 
27
- This package exists to run server-rendered frameworks on Convex, with Cloudflare's rules for the
28
- files; Convex's own static-hosting component serves files only
29
- ([how they differ](https://github.com/samebase/convex-hosting/blob/main/docs/from-static-hosting.md)).
30
- Use it when the backend is Convex and a second host for the frontend is one host too many. A Worker
31
- has what Convex does not: the data center nearest the visitor, Node's built-in modules, an edge
32
- cache, and WebSockets. The list, with numbers, is in
33
- [What differs from a Worker](https://github.com/samebase/convex-hosting/blob/main/docs/workers.md).
9
+ Use it when the backend is on Convex and the frontend should be served from the same deployment: a
10
+ [TanStack Start](https://tanstack.com/start) app whose pages render on the server, or a files-only
11
+ site.
34
12
 
35
- ## Use
13
+ ## Quick start
36
14
 
37
- Requires Node 22 or later and `convex` 1.46 or later.
15
+ Requires Node 22 or later and `convex` 1.46 or later. These steps set up a
16
+ [TanStack Start](https://tanstack.com/start) app whose pages render on the server; a site without a
17
+ server skips the three server steps, see [Files only](#files-only).
38
18
 
39
19
  ```sh
40
- npm install @samebase/convex-hosting
20
+ npm install @samebase/convex-hosting @samebase/convex-hosting-tanstack-start
41
21
  ```
42
22
 
43
23
  `convex/convex.config.ts` mounts the component:
@@ -52,18 +32,38 @@ app.use(hosting);
52
32
  export default app;
53
33
  ```
54
34
 
55
- `convex/http.ts` registers the site, every method at every path, as every request reaches a
56
- Cloudflare Worker:
35
+ `vite.config.ts` adds the adapter's plugin before TanStack Start's. It builds `src/server.ts` as the
36
+ server entry and sets the build up for Convex's runtime:
37
+
38
+ ```ts
39
+ import { convexSsr } from "@samebase/convex-hosting-tanstack-start/vite";
40
+
41
+ export default defineConfig({
42
+ plugins: [convexSsr(), tanstackStart(), react()],
43
+ });
44
+ ```
45
+
46
+ `src/server.ts` is that entry. The adapter's handler renders every request that no file answers:
47
+
48
+ ```ts
49
+ export { default } from "@samebase/convex-hosting-tanstack-start/server";
50
+ ```
51
+
52
+ `convex/http.ts` registers the site, every method at every path: a file for a path that has one, the
53
+ server build for every other request, as a Cloudflare Worker with static assets does:
57
54
 
58
55
  ```ts
59
56
  import { httpRouter } from "convex/server";
60
57
  import { routeAll } from "@samebase/convex-hosting";
61
58
  import { components } from "./_generated/api.js";
62
- import { versionId } from "../.convex-hosting/version.js";
59
+ import { assets } from "../.convex-hosting/version.js";
60
+ // Type only, nothing is bundled: the server build imported below.
61
+ import type {} from "@samebase/convex-hosting-tanstack-start/server-build";
62
+ import server from "../dist/server/server.js";
63
63
 
64
64
  const http = httpRouter();
65
65
 
66
- routeAll(http, components.hosting, versionId);
66
+ routeAll({ http, component: components.hosting, assets, worker: server });
67
67
 
68
68
  export default http;
69
69
  ```
@@ -71,49 +71,48 @@ export default http;
71
71
  Deploy:
72
72
 
73
73
  ```sh
74
- npx convex-hosting deploy --build "vite build" --dist dist --not-found-handling single-page-application
74
+ npx convex-hosting deploy --build "vite build" --dist dist/client
75
75
  ```
76
76
 
77
- It builds, uploads `dist`, pushes the functions, and prints
78
- `Deployed version <id> to https://<deployment>.convex.site.` A site with no build omits `--build`.
79
- Deploy production with this command, never with a plain `npx convex deploy`: a plain push names the
80
- version of this checkout's last deploy, often another deployment's, and the site answers 404 until
81
- the next `convex-hosting deploy`.
77
+ It builds, uploads `dist/client`, pushes the functions with the server build, and prints
78
+ `Deployed version <id> to https://<deployment>.convex.site.` Deploy production with this command,
79
+ never with a plain `npx convex deploy`: a plain push names the version of this checkout's last
80
+ deploy, often another deployment's, and the site answers 404 until the next `convex-hosting deploy`.
82
81
 
83
82
  On a fresh clone, the first push of `npx convex dev` fails: `convex/http.ts` imports
84
- `.convex-hosting/version.js`, which only a deploy writes. `npx convex dev` keeps running after that
85
- error, so the first run is two terminals, for a cloud, local, or anonymous deployment alike:
83
+ `.convex-hosting/version.js` and `dist/server/server.js`, which only a deploy writes.
84
+ `npx convex dev` keeps running after that error, so the first run is two terminals, for a cloud,
85
+ local, or anonymous deployment alike:
86
86
 
87
87
  ```sh
88
88
  npx convex dev # creates your dev deployment and .env.local; keep it running
89
89
  ```
90
90
 
91
91
  ```sh
92
- npx convex-hosting deploy --dev --build "vite build" --dist dist --not-found-handling single-page-application
92
+ npx convex-hosting deploy --dev --build "vite build" --dist dist/client
93
93
  ```
94
94
 
95
- The deploy writes the version file and pushes; the watcher in the first terminal shows its error
96
- until the next change under `convex/`, and works as usual from then on.
95
+ The deploy writes the version file, builds, and pushes; the watcher in the first terminal shows its
96
+ error until the next change under `convex/`, and works as usual from then on.
97
97
 
98
- For pages rendered on the server, pass the app's server entry, the object with `fetch(request)`, as
99
- the fourth argument of `routeAll`. The
100
- [adapter](https://github.com/samebase/convex-hosting/tree/main/packages/convex-hosting-tanstack-start)
101
- shows it for TanStack Start.
98
+ The pages get the request's data, such as a session, through a `src/server.ts` that wraps the
99
+ adapter's handler and passes a `context`; the
100
+ [adapter's README](https://github.com/samebase/convex-hosting/tree/main/packages/convex-hosting-tanstack-start)
101
+ has that, the loaders, and the settings. Convex Auth sessions in httpOnly cookies come from
102
+ [`@samebase/convex-auth-tanstack-start`](https://github.com/samebase/convex-hosting/tree/main/packages/convex-auth-tanstack-start),
103
+ which runs on any host; the
104
+ [tanstack-ssr example](https://github.com/samebase/convex-hosting/tree/main/examples/tanstack-ssr)
105
+ wires both.
102
106
 
103
- ## How a deploy switches the site
107
+ ## Files only
104
108
 
105
- On Cloudflare, `wrangler deploy` uploads the files and the Worker code as one version, so the switch
106
- is atomic. Here two systems hold the two halves: the component's storage holds the files, and
107
- `npx convex deploy` pushes the code. `deploy` binds them the same way. It uploads the files as a new
108
- version, writes that version's id to `.convex-hosting/version.js`, and then pushes the code, which
109
- imports the file and asks the component for exactly that version. The push is the switch: no pointer
110
- moves in a second step, so there is no moment when new code serves old files, and no page refers to
111
- a file that is not uploaded yet. The first request the new code serves marks its version live and
112
- deletes the versions that were live before it. A version whose push never came is deleted at a later
113
- switch, once it is a day old; nothing is deleted by the clock alone. The one rule: run one deploy at
114
- a time per deployment. The
115
- [design](https://github.com/samebase/convex-hosting/blob/main/docs/design.md#orderings-and-timing)
116
- works through every interleaving.
109
+ A site without a server leaves `worker` out,
110
+ `routeAll({ http, component: components.hosting, assets })`, needs no adapter package, and deploys
111
+ its build directory: `--dist dist` after a `vite build`, or `--dist public` with no `--build` at
112
+ all. A single-page app adds `--not-found-handling single-page-application`. The
113
+ [tanstack-spa](https://github.com/samebase/convex-hosting/tree/main/examples/tanstack-spa) and
114
+ [hello-world-assets-only](https://github.com/samebase/convex-hosting/tree/main/examples/hello-world-assets-only)
115
+ examples are such sites.
117
116
 
118
117
  ## Examples
119
118
 
@@ -129,9 +128,11 @@ works through every interleaving.
129
128
  - [tanstack-ssr](https://github.com/samebase/convex-hosting/tree/main/examples/tanstack-ssr): pages
130
129
  rendered per request, with cookie sessions, live at
131
130
  [gallant-llama-40.convex.site](https://gallant-llama-40.convex.site). Its
132
- [Worker twin](https://github.com/samebase/convex-hosting/tree/main/examples/tanstack-ssr-workers)
133
- is live at
134
- [convex-hosting-tanstack-ssr-workers.pfp.workers.dev](https://convex-hosting-tanstack-ssr-workers.pfp.workers.dev).
131
+ [Worker twin](https://github.com/samebase/convex-hosting/tree/main/examples/tanstack-ssr-workers),
132
+ live at
133
+ [convex-hosting-tanstack-ssr-workers.pfp.workers.dev](https://convex-hosting-tanstack-ssr-workers.pfp.workers.dev),
134
+ is the same source deployed as a real Worker; CI keeps the difference between the two to a
135
+ [committed patch](https://github.com/samebase/convex-hosting/blob/main/examples/tanstack-ssr-workers.patch).
135
136
 
136
137
  ## Documentation
137
138
 
@@ -150,14 +151,57 @@ works through every interleaving.
150
151
  what it is.
151
152
  - [Changelog](https://github.com/samebase/convex-hosting/blob/main/packages/convex-hosting/CHANGELOG.md).
152
153
 
153
- ## Status
154
+ ## Compared with Cloudflare Workers
155
+
156
+ The files follow
157
+ [Cloudflare Workers rules](https://developers.cloudflare.com/workers/static-assets/). The serving
158
+ code is Cloudflare's asset Worker, copied from
159
+ [cloudflare/workers-sdk](https://github.com/cloudflare/workers-sdk) at a pinned commit and run
160
+ inside a Convex HTTP action, so `_headers`, `_redirects`, `.assetsignore`, `html_handling`, and
161
+ `not_found_handling` mean what they mean on Cloudflare.
162
+
163
+ This repository's CI runs Cloudflare's own tests against it: its
164
+ [196 cases](https://github.com/samebase/convex-hosting/blob/main/packages/convex-hosting/src/client/answer.test.ts)
165
+ for `html_handling` and path encoding, and its
166
+ [integration test](https://github.com/samebase/convex-hosting/tree/main/packages/convex-hosting/src/workers-sdk/fixtures/workers-with-assets-only)
167
+ for a files-only site, with its imports pointed at this package, on a local Convex deployment.
168
+
169
+ A Worker has what Convex does not: the data center nearest the visitor, Node's built-in modules, an
170
+ edge cache, and WebSockets.
171
+ [What differs from a Worker](https://github.com/samebase/convex-hosting/blob/main/docs/workers.md)
172
+ lists each difference, with numbers.
154
173
 
155
- Before 1.0: a minor release can change the API, and the changelog says what changed. It started from
156
- Convex's [static-hosting](https://github.com/convex/static-hosting) component and grew into a
157
- different design around Cloudflare's asset Worker;
174
+ ## Compared with static-hosting
175
+
176
+ Convex's [static-hosting](https://github.com/convex/static-hosting) component serves the files of a
177
+ build. This package started from it and exists for frameworks that render pages on the server, which
178
+ needed a different serving model: Cloudflare's rules for the files, and a deploy that switches code
179
+ and files together.
158
180
  [From static-hosting](https://github.com/samebase/convex-hosting/blob/main/docs/from-static-hosting.md)
159
- lists what differs and how to move. The author's apps run on it, among them
160
- [Scout](https://github.com/samebase/scout) and [chessmerge.com](https://chessmerge.com).
181
+ lists what differs and how to move an app.
182
+
183
+ ## How a deploy switches the site
184
+
185
+ On Cloudflare, `wrangler deploy` uploads the files and the Worker code as one version, so the switch
186
+ is atomic. Here two systems hold the two halves: the component's storage holds the files, and
187
+ `npx convex deploy` pushes the code. `deploy` binds them the same way. It uploads the files as a new
188
+ version, writes that version's id and its files (each path's stored file, in the layout of
189
+ Cloudflare's asset manifest) to `.convex-hosting/version.js`, and then pushes the code, which
190
+ imports the file. The push is the switch: no pointer moves in a second step, so there is no moment
191
+ when new code serves old files, and no page refers to a file that is not uploaded yet. A request
192
+ reads no database: it costs one function call, the HTTP action, and a file adds the download of its
193
+ bytes, which Convex counts as a call too. After the push, `deploy` asks the served code to mark its
194
+ version live, which deletes the versions that were live before it. A version whose push never came
195
+ is deleted at a later switch, once it is a day old; nothing is deleted by the clock alone. The one
196
+ rule: run one deploy at a time per deployment. The
197
+ [design](https://github.com/samebase/convex-hosting/blob/main/docs/design.md#orderings-and-timing)
198
+ works through every interleaving.
199
+
200
+ ## Status
201
+
202
+ Before 1.0: a minor release can change the API, and the changelog says what changed. The author's
203
+ apps run on it, among them [Scout](https://github.com/samebase/scout) and
204
+ [chessmerge.com](https://chessmerge.com).
161
205
 
162
206
  ## License
163
207
 
@@ -66,6 +66,12 @@ export declare function probeComponent(cli: Cli, target: Target): Promise<string
66
66
  * and it is the custom domain when the dashboard's "Override Environment Variables" sets one.
67
67
  */
68
68
  export declare function siteUrl(cli: Cli, flags: string[]): Promise<string>;
69
+ /**
70
+ * Evaluates `code` as an inline query in the component and validates its result. An inline query
71
+ * runs whatever release of this package the component's functions are, so the upload of a new
72
+ * release reads with it before the push has installed the new functions.
73
+ */
74
+ export declare function runComponentQuery<T>(cli: Cli, target: Target, code: string, result: z.ZodType<T>): Promise<T>;
69
75
  /**
70
76
  * Runs a function of the component with `npx convex run` and validates its result. The Convex CLI
71
77
  * prints the result as JSON from another process, so `result` checks it at runtime; its type makes
@@ -14,7 +14,9 @@ export const nodeCli = {
14
14
  cwd: process.cwd(),
15
15
  env: process.env,
16
16
  convex: (args) => new Promise((resolve) => {
17
- execFile(process.execPath, [convexBin(process.cwd()), ...args], { encoding: "utf8" }, (error, stdout, stderr) => {
17
+ execFile(process.execPath, [convexBin(process.cwd()), ...args],
18
+ // A page of storage URLs can pass Node's default of 1 MiB.
19
+ { encoding: "utf8", maxBuffer: 64 * 1024 * 1024 }, (error, stdout, stderr) => {
18
20
  const exitCode = error === null ? 0 : typeof error.code === "number" ? error.code : 1;
19
21
  resolve({ exitCode, stdout, stderr });
20
22
  });
@@ -103,6 +105,25 @@ export async function siteUrl(cli, flags) {
103
105
  }
104
106
  return z.string().parse(JSON.parse(stdout));
105
107
  }
108
+ /**
109
+ * Evaluates `code` as an inline query in the component and validates its result. An inline query
110
+ * runs whatever release of this package the component's functions are, so the upload of a new
111
+ * release reads with it before the push has installed the new functions.
112
+ */
113
+ export async function runComponentQuery(cli, target, code, result) {
114
+ const { exitCode, stdout, stderr } = await cli.convex([
115
+ "run",
116
+ "--component",
117
+ target.component,
118
+ "--inline-query",
119
+ code,
120
+ ...target.flags,
121
+ ]);
122
+ if (exitCode !== 0) {
123
+ throw new Error(stderr.trim() || stdout.trim() || `npx convex run --inline-query exited with ${exitCode}.`);
124
+ }
125
+ return result.parse(JSON.parse(stdout));
126
+ }
106
127
  /**
107
128
  * Runs a function of the component with `npx convex run` and validates its result. The Convex CLI
108
129
  * prints the result as JSON from another process, so `result` checks it at runtime; its type makes
@@ -1 +1 @@
1
- {"version":3,"file":"convex.js","sourceRoot":"","sources":["../../src/cli/convex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EACL,eAAe,GAKhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,8FAA8F;AAC9F,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,cAAc,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC;IAChE,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AACxF,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAQ;IAC1B,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;IAClB,GAAG,EAAE,OAAO,CAAC,GAAG;IAChB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACf,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACtB,QAAQ,CACN,OAAO,CAAC,QAAQ,EAChB,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG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,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACxE,CAAC"}
package/dist/cli/files.js CHANGED
@@ -4,7 +4,7 @@ import { join, relative } from "node:path";
4
4
  import { constructHeaders, constructRedirects, } from "../workers-sdk/packages/workers-shared/utils/configuration/constructConfiguration.js";
5
5
  import { parseHeaders } from "../workers-sdk/packages/workers-shared/utils/configuration/parseHeaders.js";
6
6
  import { parseRedirects } from "../workers-sdk/packages/workers-shared/utils/configuration/parseRedirects.js";
7
- import { HEADERS_FILENAME, MAX_ASSET_SIZE, REDIRECTS_FILENAME, } from "../workers-sdk/packages/workers-shared/utils/constants.js";
7
+ import { HEADERS_FILENAME, MAX_ASSET_COUNT, MAX_ASSET_SIZE, REDIRECTS_FILENAME, } from "../workers-sdk/packages/workers-shared/utils/constants.js";
8
8
  import { createAssetsIgnoreFunction, getContentType, maybeGetFile, normalizeFilePath, } from "../workers-sdk/packages/workers-shared/utils/helpers.js";
9
9
  /**
10
10
  * Convex limits a document to 1 MiB. The version document holds the config next to two short
@@ -45,6 +45,11 @@ export async function readDist(dist, handling, log) {
45
45
  walk(file);
46
46
  }
47
47
  else if (stats.isFile() && !assetsIgnoreFunction(ignorePath)) {
48
+ // Cloudflare's limit per Worker version on its Paid plan, 100,000 files.
49
+ if (entries.length === MAX_ASSET_COUNT) {
50
+ throw new Error(`${dist} has more than ${MAX_ASSET_COUNT.toLocaleString("en-US")} files, Cloudflare's ` +
51
+ "limit per Worker version. List the files that are not served in .assetsignore.");
52
+ }
48
53
  const bytes = readFileSync(file);
49
54
  // Cloudflare's limit per asset, 25 MiB. The HTTP action that serves a file cannot answer
50
55
  // more than Convex's 100 MiB response limit anyway.
@@ -1 +1 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/cli/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA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