@rebasepro/cli 0.2.1 → 0.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebasepro/cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.4",
4
4
  "description": "Developer tools for Rebase projects",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.es.js",
@@ -31,9 +31,10 @@
31
31
  "execa": "^9.6.1",
32
32
  "inquirer": "12.11.1",
33
33
  "jiti": "^2.7.0",
34
- "@rebasepro/sdk-generator": "0.2.1",
35
- "@rebasepro/server-core": "0.2.1",
36
- "@rebasepro/types": "0.2.1"
34
+ "@rebasepro/server-core": "0.2.4",
35
+ "@rebasepro/sdk-generator": "0.2.4",
36
+ "@rebasepro/server-postgresql": "0.2.4",
37
+ "@rebasepro/types": "0.2.4"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@types/node": "^20.19.41",
@@ -55,11 +56,11 @@
55
56
  "require": "./dist/index.cjs"
56
57
  }
57
58
  },
58
- "exclude": [
59
- "node_modules",
60
- "templates/template/node_modules"
61
- ],
62
- "gitHead": "d935eefa5aa8d1009a2398cfac2c1e4ee9aeb6b6",
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "https://github.com/rebasepro/rebase.git",
62
+ "directory": "packages/cli"
63
+ },
63
64
  "scripts": {
64
65
  "test": "vitest run",
65
66
  "test:e2e": "vitest run --config vitest.e2e.config.ts",
@@ -7,7 +7,7 @@
7
7
  # Database connection string (required)
8
8
  # You can use PostgreSQL (postgresql://) or MongoDB (mongodb:// or mongodb+srv://).
9
9
  # The backend will automatically detect the database type.
10
- DATABASE_URL=postgresql://rebase:changeme@localhost:5432/rebase
10
+ DATABASE_URL=postgresql://rebase:changeme@localhost:5432/rebase?options=-c%20search_path=public
11
11
  # DATABASE_URL=mongodb://localhost:27017/rebase
12
12
 
13
13
  # Separate admin connection string for migrations and schema operations (optional)
@@ -24,7 +24,7 @@ That's it. Your app is running:
24
24
 
25
25
  - [Node.js](https://nodejs.org) >= 18
26
26
  - [pnpm](https://pnpm.io) or [npm](https://www.npmjs.com) (v7+)
27
- - A PostgreSQL database
27
+ - A PostgreSQL database (you can start the included database container via `docker compose up -d db`)
28
28
 
29
29
  #### Setup
30
30
 
@@ -53,23 +53,17 @@ const postsCollection: EntityCollection = {
53
53
  name: "Author",
54
54
  type: "relation",
55
55
  relationName: "author",
56
- relation: {
57
- relationName: "author",
58
- cardinality: "one",
59
- direction: "owning",
60
- target: () => authorsCollection
61
- }
56
+ target: () => authorsCollection,
57
+ cardinality: "one",
58
+ direction: "owning"
62
59
  },
63
60
  tags: {
64
61
  name: "Tags",
65
62
  type: "relation",
66
63
  relationName: "tags",
67
- relation: {
68
- relationName: "tags",
69
- cardinality: "many",
70
- direction: "owning",
71
- target: () => tagsCollection
72
- }
64
+ target: () => tagsCollection,
65
+ cardinality: "many",
66
+ direction: "owning"
73
67
  }
74
68
  }
75
69
  };
@@ -45,16 +45,6 @@ const rolesCollection: PostgresCollection = {
45
45
  name: "Collection Permissions",
46
46
  type: "map",
47
47
  columnName: "collection_permissions"
48
- },
49
- config: {
50
- name: "Config",
51
- type: "map",
52
- columnName: "config",
53
- properties: {
54
- createCollections: { name: "Create Collections", type: "boolean" },
55
- editCollections: { name: "Edit Collections", type: "string" },
56
- deleteCollections: { name: "Delete Collections", type: "string" }
57
- }
58
48
  }
59
49
  }
60
50
  };
@@ -15,7 +15,7 @@
15
15
  services:
16
16
  # ── PostgreSQL ───────────────────────────────────────────────────────
17
17
  db:
18
- image: postgres:16-alpine
18
+ image: postgres:18-alpine
19
19
  restart: unless-stopped
20
20
  environment:
21
21
  POSTGRES_USER: rebase
@@ -56,8 +56,8 @@ services:
56
56
  env_file: .env
57
57
  environment:
58
58
  # Override DATABASE_URL to point to the Docker network service
59
- DATABASE_URL: postgresql://rebase:${DATABASE_PASSWORD:-changeme}@db:5432/rebase
60
- ADMIN_CONNECTION_STRING: postgresql://rebase:${DATABASE_PASSWORD:-changeme}@db:5432/rebase
59
+ DATABASE_URL: postgresql://rebase:${DATABASE_PASSWORD:-changeme}@db:5432/rebase?options=-c%20search_path=public
60
+ ADMIN_CONNECTION_STRING: postgresql://rebase:${DATABASE_PASSWORD:-changeme}@db:5432/rebase?options=-c%20search_path=public
61
61
  NODE_ENV: production
62
62
  PORT: "3001"
63
63
  depends_on:
@@ -6,6 +6,7 @@ import "@fontsource/rubik";
6
6
  import { useRebaseAuthController, useBackendUserManagement } from "@rebasepro/auth";
7
7
  import { Rebase, RebaseAuth } from "@rebasepro/core";
8
8
  import { RebaseCMS, RebaseShell } from "@rebasepro/admin";
9
+ import { ErrorBoundary } from "@rebasepro/ui";
9
10
  import { RebaseStudio } from "@rebasepro/studio";
10
11
  import { createRebaseClient } from "@rebasepro/client";
11
12
  import { collections } from "virtual:rebase-collections";
@@ -30,17 +31,19 @@ export function App() {
30
31
  });
31
32
 
32
33
  return (
33
- <Rebase
34
- client={rebaseClient}
35
- authController={authController}
36
- userManagement={userManagement}
37
- >
38
- <RebaseAuth />
39
- <RebaseCMS
40
- collections={collections}
41
- />
42
- <RebaseStudio/>
43
- <RebaseShell title="Rebase"/>
44
- </Rebase>
34
+ <ErrorBoundary fullPage>
35
+ <Rebase
36
+ client={rebaseClient}
37
+ authController={authController}
38
+ userManagement={userManagement}
39
+ >
40
+ <RebaseAuth />
41
+ <RebaseCMS
42
+ collections={collections}
43
+ />
44
+ <RebaseStudio/>
45
+ <RebaseShell title="Rebase"/>
46
+ </Rebase>
47
+ </ErrorBoundary>
45
48
  );
46
49
  }
@@ -4,6 +4,10 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom";
4
4
  import { App } from "./App";
5
5
  import "./index.css";
6
6
 
7
+ window.addEventListener("unhandledrejection", (event: PromiseRejectionEvent) => {
8
+ console.error("[Rebase] Unhandled promise rejection:", event.reason);
9
+ });
10
+
7
11
  const router = createBrowserRouter([
8
12
  {
9
13
  path: "/*",
@@ -7,4 +7,5 @@ blockExoticSubdeps: false
7
7
  minimumReleaseAge: 0
8
8
  allowBuilds:
9
9
  esbuild: true
10
+ "{{PROJECT_NAME}}-config": true
10
11
 
package/dist/auth.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export declare function getTokens(env: "prod" | "dev", _debug?: boolean): Promise<object | null>;
2
- export declare function parseJwt(token: string): object;
3
- export declare function refreshCredentials(env: "dev" | "prod", credentials?: object | null, _onErr?: (e: unknown) => void): Promise<object | null>;
4
- export declare function login(env: "prod" | "dev", _debug?: boolean): Promise<void>;
5
- export declare function logout(env: "prod" | "dev", _debug?: boolean): Promise<void>;