@protobase/cli 0.96.8 → 0.96.9
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/dist/cli/package.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { pathToFileURL } from "node:url";
|
|
2
|
+
//#region src/dev/dev-module-url.ts
|
|
3
|
+
const devModuleUrl = (file) => {
|
|
4
|
+
const posix = file.replaceAll("\\", "/");
|
|
5
|
+
if (posix.split("/").includes("node_modules")) return pathToFileURL(file).href;
|
|
6
|
+
return posix.startsWith("/") ? `/@fs${posix}` : `/@fs/${posix}`;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { devModuleUrl };
|
package/dist/dev/project.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { serverPackage } from "./server-package.js";
|
|
2
2
|
import { loadSourceConfig } from "../config/source-config.js";
|
|
3
3
|
import { sharedDb } from "./create-db.js";
|
|
4
|
-
import {
|
|
4
|
+
import { devModuleUrl } from "./dev-module-url.js";
|
|
5
5
|
//#region src/dev/project.ts
|
|
6
|
-
const load = (file) =>
|
|
6
|
+
const load = (file) => import(
|
|
7
7
|
/* @vite-ignore */
|
|
8
|
-
|
|
9
|
-
) : import(
|
|
10
|
-
/* @vite-ignore */
|
|
11
|
-
`/@fs${file}`
|
|
8
|
+
devModuleUrl(file)
|
|
12
9
|
);
|
|
13
10
|
const importModules = async (files) => {
|
|
14
11
|
const modules = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.96.
|
|
3
|
+
"version": "0.96.9",
|
|
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.96.
|
|
47
|
-
"@protobase/layout": "0.96.
|
|
48
|
-
"@protobase/query": "0.96.
|
|
49
|
-
"@protobase/schema": "0.96.
|
|
50
|
-
"@protobase/server": "0.96.
|
|
51
|
-
"@protobase/ui": "0.96.
|
|
52
|
-
"@protobase/workflows": "0.96.
|
|
46
|
+
"@protobase/config": "0.96.9",
|
|
47
|
+
"@protobase/layout": "0.96.9",
|
|
48
|
+
"@protobase/query": "0.96.9",
|
|
49
|
+
"@protobase/schema": "0.96.9",
|
|
50
|
+
"@protobase/server": "0.96.9",
|
|
51
|
+
"@protobase/ui": "0.96.9",
|
|
52
|
+
"@protobase/workflows": "0.96.9",
|
|
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",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Start a new app, or an admin over an existing Postgres database, and keep the config in step with it.
|
|
6
6
|
|
|
7
|
-
- [Project starter](../getting-started.md#start-an-app): `npm create protobase` (also `bun create` and `pnpm create`) starts a new app from the scratch, ERP, property portal or real estate preset, with its own Postgres in Docker for development, and prints the next steps. Each preset has an `AGENTS.md` with rules for coding agents.
|
|
7
|
+
- [Project starter](../getting-started.md#start-an-app): `npm create protobase` (also `bun create` and `pnpm create`) starts a new app from the scratch, automations (workflows on), ERP, property portal or real estate preset, with its own Postgres in Docker for development, and prints the next steps. Each preset has an `AGENTS.md` with rules for coding agents.
|
|
8
8
|
- [Start on an existing database](../getting-started.md#on-an-existing-database): `npm create protobase <database-url>` makes a project on a Postgres database you already have and asks which of its tables become resources, only reading the database.
|
|
9
9
|
- [Example apps](../getting-started.md#run-the-erp-example): Seeded example apps on Postgres: an ERP, real estate property management and a public property portal.
|
|
10
10
|
- [One config](../reference/config.md): The whole app is one object of data in `protobase.config.ts`, typed with `defineConfig`, with a sensible default for every key.
|
|
@@ -10,7 +10,7 @@ An app's own React code, its components, field types and actions, is a [plugin](
|
|
|
10
10
|
|
|
11
11
|
## Start an app
|
|
12
12
|
|
|
13
|
-
`npm create protobase my-app` asks which preset to start from, scratch (the default), the ERP, the property portal or real estate, writes the project into `my-app`, with the `@protobase` packages in `devDependencies` at the caret range of the latest release, so it is [bundled](reference/versioning.md#bundled-and-locked-projects): dev, the build and its scripts run the CLI's own copies, and a newer CLI in that range updates it with no change to its files. It prints the next steps. Without a folder it asks for one too. `--preset <name>` picks the preset without asking; without a terminal it takes scratch. `bun create protobase` and `pnpm create protobase` do the same, and take `--preset` without the `--` that npm needs. It needs Node 22.12 or later. Each preset has an `AGENTS.md` with the rules for a coding agent that changes the app, such as a new migration file for every schema change.
|
|
13
|
+
`npm create protobase my-app` asks which preset to start from, scratch (the default), automations (scratch with [workflows](reference/workflows.md) on), the ERP, the property portal or real estate, writes the project into `my-app`, with the `@protobase` packages in `devDependencies` at the caret range of the latest release, so it is [bundled](reference/versioning.md#bundled-and-locked-projects): dev, the build and its scripts run the CLI's own copies, and a newer CLI in that range updates it with no change to its files. It prints the next steps. Without a folder it asks for one too. `--preset <name>` picks the preset without asking; without a terminal it takes scratch. `bun create protobase` and `pnpm create protobase` do the same, and take `--preset` without the `--` that npm needs. It needs Node 22.12 or later. Each preset has an `AGENTS.md` with the rules for a coding agent that changes the app, such as a new migration file for every schema change.
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
16
|
npm create protobase my-app
|