@rebasepro/cli 0.2.3 → 0.2.5

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.3",
3
+ "version": "0.2.5",
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/server-core": "0.2.3",
35
- "@rebasepro/sdk-generator": "0.2.3",
36
- "@rebasepro/types": "0.2.3"
34
+ "@rebasepro/sdk-generator": "0.2.5",
35
+ "@rebasepro/server-core": "0.2.5",
36
+ "@rebasepro/types": "0.2.5",
37
+ "@rebasepro/server-postgresql": "0.2.5"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@types/node": "^20.19.41",
@@ -55,11 +56,6 @@
55
56
  "require": "./dist/index.cjs"
56
57
  }
57
58
  },
58
- "exclude": [
59
- "node_modules",
60
- "templates/template/node_modules"
61
- ],
62
- "gitHead": "d935eefa5aa8d1009a2398cfac2c1e4ee9aeb6b6",
63
59
  "repository": {
64
60
  "type": "git",
65
61
  "url": "https://github.com/rebasepro/rebase.git",
@@ -2,6 +2,5 @@ import postsCollection from "./posts.js";
2
2
  import authorsCollection from "./authors.js";
3
3
  import tagsCollection from "./tags.js";
4
4
  import usersCollection from "./users.js";
5
- import rolesCollection from "./roles.js";
6
5
 
7
- export const collections = [postsCollection, authorsCollection, tagsCollection, usersCollection, rolesCollection];
6
+ export const collections = [postsCollection, authorsCollection, tagsCollection, usersCollection];
@@ -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
  };
@@ -1,6 +1,5 @@
1
- import { EntityCollection } from "@rebasepro/types";
2
- import { resetPasswordAction, deleteEntityAction, RolesFilterSelect, UserRolesSelectField } from "@rebasepro/admin";
3
- import rolesCollection from "./roles.js";
1
+ import type { EntityCollection } from "@rebasepro/types";
2
+ import { resetPasswordAction, deleteEntityAction } from "@rebasepro/admin";
4
3
 
5
4
  const usersCollection: EntityCollection = {
6
5
  name: "Users",
@@ -12,7 +11,6 @@ const usersCollection: EntityCollection = {
12
11
  group: "Settings",
13
12
  openEntityMode: "dialog",
14
13
  disableDefaultActions: ["copy"],
15
- Actions: [RolesFilterSelect],
16
14
  entityActions: [
17
15
  resetPasswordAction,
18
16
  {
@@ -41,6 +39,7 @@ const usersCollection: EntityCollection = {
41
39
  displayName: {
42
40
  name: "Name",
43
41
  type: "string",
42
+ columnName: "display_name",
44
43
  validation: {
45
44
  required: true
46
45
  }
@@ -48,21 +47,20 @@ const usersCollection: EntityCollection = {
48
47
  photoURL: {
49
48
  name: "Photo URL",
50
49
  type: "string",
50
+ columnName: "photo_url",
51
51
  url: "image"
52
52
  },
53
53
  roles: {
54
54
  name: "Roles",
55
- type: "relation",
56
- target: () => rolesCollection,
57
- cardinality: "many",
58
- direction: "owning",
59
- through: {
60
- table: "user_roles",
61
- sourceColumn: "user_id",
62
- targetColumn: "role_id"
63
- },
64
- ui: {
65
- Field: UserRolesSelectField
55
+ type: "array",
56
+ of: {
57
+ name: "Role",
58
+ type: "string",
59
+ enum: {
60
+ admin: "Admin",
61
+ editor: "Editor",
62
+ viewer: "Viewer"
63
+ }
66
64
  }
67
65
  },
68
66
  passwordHash: {
@@ -114,6 +112,7 @@ const usersCollection: EntityCollection = {
114
112
  createdAt: {
115
113
  name: "Created At",
116
114
  type: "date",
115
+ columnName: "created_at",
117
116
  ui: {
118
117
  readOnly: true
119
118
  }
@@ -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
@@ -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: "/*",
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>;