@rebasepro/cli 0.18.1 → 0.19.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebasepro/cli",
3
- "version": "0.18.1",
3
+ "version": "0.19.0",
4
4
  "description": "Developer tools for Rebase projects",
5
5
  "keywords": [
6
6
  "cli",
@@ -43,12 +43,12 @@
43
43
  "inquirer": "14.0.2",
44
44
  "jiti": "^2.7.0",
45
45
  "pg": "^8.22.0",
46
- "@rebasepro/agent-skills": "0.18.1",
47
- "@rebasepro/codegen": "0.18.1",
48
- "@rebasepro/client": "0.18.1",
49
- "@rebasepro/server-postgres": "0.18.1",
50
- "@rebasepro/types": "0.18.1",
51
- "@rebasepro/server": "0.18.1"
46
+ "@rebasepro/agent-skills": "0.19.0",
47
+ "@rebasepro/client": "0.19.0",
48
+ "@rebasepro/codegen": "0.19.0",
49
+ "@rebasepro/types": "0.19.0",
50
+ "@rebasepro/server": "0.19.0",
51
+ "@rebasepro/server-postgres": "0.19.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^26.1.2",
@@ -23,14 +23,14 @@ import {
23
23
  import { declaredDataSources, declaredStorageSources } from "@rebasepro/types";
24
24
  // Side-effect import: declaring is what registers, so anything that dropped
25
25
  // this as "unused" would leave the backend with no buckets — silently.
26
- import "../../config/resources.js";
26
+ import "../../config/resources";
27
27
  // {{#collections}}
28
- import { enums, relations, tables } from "./schema.generated.js";
28
+ import { enums, relations, tables } from "./schema.generated";
29
29
  // {{/collections}}
30
- import { storageAuthorize } from "../../config/storage.js";
31
- import { env } from "./env.js";
30
+ import { storageAuthorize } from "../../config/storage";
31
+ import { env } from "./env";
32
32
  // {{#collections}}
33
- import usersCollection from "../../config/collections/users.js";
33
+ import usersCollection from "../../config/collections/users";
34
34
  // {{/collections}}
35
35
 
36
36
  const __filename = fileURLToPath(import.meta.url);
@@ -4,7 +4,7 @@
4
4
  "description": "Rebase BaaS — headless PostgreSQL API",
5
5
  "type": "module",
6
6
  "scripts": {
7
- "build": "tsc"
7
+ "build": "tsc && rebase normalize-imports dist"
8
8
  },
9
9
  "dependencies": {
10
10
  "@rebasepro/server": "workspace:*",
@@ -12,15 +12,19 @@
12
12
  "forceConsistentCasingInFileNames": true,
13
13
  "resolveJsonModule": true,
14
14
  "declaration": true,
15
- "sourceMap": true
15
+ "sourceMap": true,
16
+ "rootDir": ".."
16
17
  },
17
18
  // `functions/` as well as `src/`, because this flavour has nothing in src:
18
19
  // it declares no collections, so there is no generated schema, and the server
19
20
  // entrypoint lives behind `rebase eject`. An include matching only an empty
20
21
  // directory is TS18003 — tsc reports "no inputs" as an error, not a no-op.
21
22
  //
22
- // No `rootDir`: it would have to be `.` for both, and letting tsc infer the
23
- // common root gets there without a second place to keep in sync.
23
+ // `rootDir` is `..`, not `.`: `rebase eject` writes an entrypoint that imports
24
+ // `../../config/resources`, and tsc emits every file it pulls into the
25
+ // program — so the common source directory is the project root and the emit
26
+ // lands at `dist/backend/src/…`, which is what `scripts.start` runs. Inferring
27
+ // it stopped being an option in TypeScript 6 (TS5011).
24
28
  //
25
29
  // `crons/` too: `rebase build` compiles it through a generated tsconfig, but
26
30
  // an ejected project builds with *this* file, so leaving it out meant an
@@ -21,4 +21,4 @@
21
21
  * admin surface and no React.
22
22
  */
23
23
 
24
- export { storageAuthorize } from "./storage.js";
24
+ export { storageAuthorize } from "./storage";
@@ -7,7 +7,7 @@
7
7
  "type": "module",
8
8
  "private": true,
9
9
  "scripts": {
10
- "build": "tsc",
10
+ "build": "tsc && rebase normalize-imports dist",
11
11
  "dev": "tsc --watch",
12
12
  "clean": "rm -rf dist"
13
13
  },
@@ -4,7 +4,7 @@
4
4
  "description": "Rebase backend with PostgreSQL",
5
5
  "type": "module",
6
6
  "scripts": {
7
- "build": "rebase schema generate --collections ../config/collections && tsc"
7
+ "build": "rebase schema generate --collections ../config/collections && tsc && rebase normalize-imports dist"
8
8
  },
9
9
  "dependencies": {
10
10
  "{{PROJECT_NAME}}-config": "*",
@@ -5,6 +5,12 @@
5
5
  "moduleResolution": "bundler",
6
6
  "lib": ["ES2022"],
7
7
  "outDir": "./dist",
8
+ // The program includes `../config/**`, so tsc's common source directory is
9
+ // the project root and the emit already lands at `dist/backend/src/…` —
10
+ // which is what `scripts.start` runs. Saying so explicitly is required from
11
+ // TypeScript 6, which refuses to infer it (TS5011), and changes nothing
12
+ // about the layout.
13
+ "rootDir": "..",
8
14
  "strict": true,
9
15
  "esModuleInterop": true,
10
16
  "allowSyntheticDefaultImports": true,
@@ -1,7 +1,7 @@
1
- import postsCollection from "./posts.js";
2
- import authorsCollection from "./authors.js";
3
- import tagsCollection from "./tags.js";
4
- import usersCollection from "./users.js";
1
+ import postsCollection from "./posts";
2
+ import authorsCollection from "./authors";
3
+ import tagsCollection from "./tags";
4
+ import usersCollection from "./users";
5
5
  import type { SecurityRule } from "@rebasepro/types";
6
6
 
7
7
  export const collections = [postsCollection, authorsCollection, tagsCollection, usersCollection];
@@ -1,6 +1,6 @@
1
1
  import { defineCollection } from "@rebasepro/cms-types";
2
- import authorsCollection from "./authors.js";
3
- import tagsCollection from "./tags.js";
2
+ import authorsCollection from "./authors";
3
+ import tagsCollection from "./tags";
4
4
 
5
5
  const postsCollection = defineCollection({
6
6
  name: "Posts",
@@ -1,5 +1,5 @@
1
1
  // Resolves after `rebase init` copies this file into config/collections/,
2
2
  // next to the shared users.ts — not from inside presets/, which never runs.
3
- import usersCollection from "./users.js";
3
+ import usersCollection from "./users";
4
4
 
5
5
  export const collections = [usersCollection];
@@ -1,8 +1,8 @@
1
- import productsCollection from "./products.js";
2
- import categoriesCollection from "./categories.js";
3
- import ordersCollection from "./orders.js";
1
+ import productsCollection from "./products";
2
+ import categoriesCollection from "./categories";
3
+ import ordersCollection from "./orders";
4
4
  // Resolves after `rebase init` copies this file into config/collections/,
5
5
  // next to the shared users.ts — not from inside presets/, which never runs.
6
- import usersCollection from "./users.js";
6
+ import usersCollection from "./users";
7
7
 
8
8
  export const collections = [productsCollection, categoriesCollection, ordersCollection, usersCollection];
@@ -1,5 +1,5 @@
1
1
  import { defineCollection } from "@rebasepro/cms-types";
2
- import categoriesCollection from "./categories.js";
2
+ import categoriesCollection from "./categories";
3
3
 
4
4
  const productsCollection = defineCollection({
5
5
  name: "Products",
@@ -3,10 +3,10 @@
3
3
  * Collections defined here are used by both the frontend and backend
4
4
  */
5
5
 
6
- export { collections } from "./collections/index.js";
6
+ export { collections } from "./collections/index";
7
7
 
8
8
  // Who may read, write, delete and list files in storage. Exported from here
9
9
  // because that is where the runtime and `rebase cloud deploy` look for it — the
10
10
  // bundle manifest records whether this export exists, so a managed deploy can be
11
11
  // refused with a readable message instead of turning into a boot crash-loop.
12
- export { storageAuthorize } from "./storage.js";
12
+ export { storageAuthorize } from "./storage";
@@ -7,7 +7,7 @@
7
7
  "type": "module",
8
8
  "private": true,
9
9
  "scripts": {
10
- "build": "tsc",
10
+ "build": "tsc && rebase normalize-imports dist",
11
11
  "dev": "tsc --watch",
12
12
  "clean": "rm -rf dist"
13
13
  },