@protobase/cli 0.79.2 → 0.79.3

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.
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.79.2";
2
+ var version = "0.79.3";
3
3
  //#endregion
4
4
  export { version };
package/dist/main.js CHANGED
@@ -152,6 +152,8 @@ program.command("build-serve").description("Bundle the serve runtime into one fi
152
152
  program.command("serve").description("Serve a bundle written by `protobase build` until SIGTERM or SIGINT: a folder as a host serves it, a config module as its API alone").argument("<bundle>", "the bundle folder, e.g. dist, or its dist/protobase.config.js").action(async (bundle) => {
153
153
  loadNearestEnvFile(process.cwd());
154
154
  warn(placeholderSecretWarning(process.env));
155
+ const { provideHostModules } = await import("./serve/host-modules.js");
156
+ provideHostModules();
155
157
  if (statSync(bundle).isDirectory()) await (await import("./serve/serve-dir.js")).serveBundleDir(bundle, process.env, out);
156
158
  else await (await import("./serve/serve-bundle.js")).serveBundle(bundle, process.env, out);
157
159
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.79.2",
3
+ "version": "0.79.3",
4
4
  "description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -43,13 +43,13 @@
43
43
  "dependencies": {
44
44
  "@better-auth/core": "^1.7.12",
45
45
  "@hono/node-server": "^2.1.3",
46
- "@protobase/config": "0.79.2",
47
- "@protobase/layout": "0.79.2",
48
- "@protobase/query": "0.79.2",
49
- "@protobase/schema": "0.79.2",
50
- "@protobase/server": "0.79.2",
51
- "@protobase/ui": "0.79.2",
52
- "@protobase/workflows": "0.79.2",
46
+ "@protobase/config": "0.79.3",
47
+ "@protobase/layout": "0.79.3",
48
+ "@protobase/query": "0.79.3",
49
+ "@protobase/schema": "0.79.3",
50
+ "@protobase/server": "0.79.3",
51
+ "@protobase/ui": "0.79.3",
52
+ "@protobase/workflows": "0.79.3",
53
53
  "@react-email/render": "^2.1.0",
54
54
  "@scalar/hono-api-reference": "^0.12.10",
55
55
  "@sentry/vite-plugin": "^11.10.0",
@@ -466,7 +466,7 @@ The app's address and secret are `PROTOBASE_URL` and `PROTOBASE_SECRET` unless i
466
466
  - **Startup:** a config module that `protobase build` did not write, a config with an `apiPath` other than `/api/v1`, or one with sign-in on and no secret or URL, stops startup with a one-line error and exit code 1, as does a missing `DATABASE_URL`, an auth store that has not applied every migration of this version, or has a newer one (see [`auth migration`](#auth-migration)), a resource over a table of the auth store, a resource whose [events](events.md) or [history](history.md) lack their triggers or have out-of-date ones, or a missing history or [comments](comments.md#the-table) table, a [rollup or formula field](data-config.md#rollups-and-formulas) whose column or trigger is missing or out of date, a jobs schema that is missing or behind for a config with [jobs](jobs.md#the-jobs-schema) (see [`migration`](#migration)), an [AI field or action](ai.md#the-model) without a model key, [encrypted fields](data-config.md#encrypted-fields) without a key, or another resource over their column, or a taken port; `PROTOBASE_STARTUP_CHECKS=false` skips the checks of those schemas and the key. `protobase serve listening on port <port>` means it is ready.
467
467
  - **Jobs:** with [jobs](jobs.md) in the config it runs them beside the API, unless `PROTOBASE_JOBS=false`, and with `PROTOBASE_JOBS_DRAIN_TOKEN` it answers `POST /api/jobs/drain` for the operator.
468
468
  - **Shutdown:** the first SIGTERM or SIGINT stops accepting connections, closes open WebSockets with 1001 (dropping any still open after 5 seconds), waits for open requests, gives running jobs 30 seconds to finish, drains the pool `serve` created and exits with 0.
469
- - **Host modules:** under Bun, the runtime registers [the modules it supplies](#the-config-module) as virtual modules, so the bundle needs no `node_modules` for them. `protobase serve`, on Node or Bun, resolves them from the `node_modules` next to the bundle, so keep the bundle inside the project. Native packages load from the bundle's own `node_modules/` under both.
469
+ - **Host modules:** under Bun, the runtime registers [the modules it supplies](#the-config-module) as virtual modules, so the bundle needs no `node_modules` for them. `protobase serve` under Bun does the same with the CLI's own copies, whatever the project installed, so a bundle runs on the copies of the CLI that serves it. <gap>`protobase serve` on Node cannot give a bundle the CLI's own host modules because a module hook for Node is not implemented.</gap> On Node it resolves them from the `node_modules` next to the bundle, so there keep the bundle inside the project, whose installed versions it then runs on. Native packages load from the bundle's own `node_modules/` under both.
470
470
  - **Read-only hosts:** nothing is written: no install (`--no-install`), and for a bundle built with `--bun` no transpiling and so no transpiler cache. A bundle with `node_modules/` needs its folder mounted without `noexec`, since its add-ons are mapped as executable code.
471
471
 
472
472
  ### Mobile releases