@rebasepro/cli 0.0.1-canary.2 → 0.0.1-canary.4829d6e
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/LICENSE +17 -196
- package/README.md +57 -33
- package/dist/commands/api-keys.d.ts +1 -0
- package/dist/commands/auth.d.ts +1 -0
- package/dist/commands/build.d.ts +1 -0
- package/dist/commands/cloud/auth.d.ts +3 -0
- package/dist/commands/cloud/context.d.ts +61 -0
- package/dist/commands/cloud/databases.d.ts +1 -0
- package/dist/commands/cloud/deploy.d.ts +2 -0
- package/dist/commands/cloud/index.d.ts +1 -0
- package/dist/commands/cloud/link.d.ts +5 -0
- package/dist/commands/cloud/orgs.d.ts +1 -0
- package/dist/commands/cloud/projects.d.ts +13 -0
- package/dist/commands/cloud/resources.d.ts +6 -0
- package/dist/commands/db.d.ts +1 -0
- package/dist/commands/dev.d.ts +1 -0
- package/dist/commands/doctor.d.ts +1 -0
- package/dist/commands/generate_sdk.d.ts +18 -0
- package/dist/commands/init.d.ts +40 -0
- package/dist/commands/schema.d.ts +1 -0
- package/dist/commands/skills.d.ts +1 -0
- package/dist/commands/start.d.ts +1 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.es.js +3952 -245
- package/dist/index.es.js.map +1 -1
- package/dist/utils/package-manager.d.ts +33 -0
- package/dist/utils/project.d.ts +60 -0
- package/package.json +35 -23
- package/templates/overlays/baas/README.md +37 -0
- package/templates/overlays/baas/backend/package.json +31 -0
- package/templates/overlays/baas/backend/src/index.ts +172 -0
- package/templates/overlays/baas/backend/tsconfig.json +18 -0
- package/templates/overlays/baas/package.json +42 -0
- package/templates/overlays/baas/pnpm-workspace.yaml +9 -0
- package/templates/template/.cursorrules +2 -0
- package/templates/template/.dockerignore +28 -0
- package/templates/template/.env.example +120 -0
- package/templates/template/.github/copilot-instructions.md +2 -0
- package/templates/template/.windsurfrules +2 -0
- package/templates/template/AGENTS.md +2 -0
- package/templates/template/CLAUDE.md +2 -0
- package/templates/template/README.md +88 -21
- package/templates/template/ai-instructions.md +17 -0
- package/templates/template/backend/Dockerfile +57 -11
- package/templates/template/backend/functions/hello.ts +56 -0
- package/templates/template/backend/package.json +30 -34
- package/templates/template/backend/src/env.ts +23 -0
- package/templates/template/backend/src/index.ts +140 -100
- package/templates/template/backend/tsconfig.json +1 -1
- package/templates/template/config/collections/authors.ts +45 -0
- package/templates/template/config/collections/index.ts +26 -0
- package/templates/template/{shared → config}/collections/posts.ts +28 -10
- package/templates/template/config/collections/presets/blank/index.ts +3 -0
- package/templates/template/config/collections/presets/ecommerce/categories.ts +40 -0
- package/templates/template/config/collections/presets/ecommerce/index.ts +6 -0
- package/templates/template/config/collections/presets/ecommerce/orders.ts +66 -0
- package/templates/template/config/collections/presets/ecommerce/products.ts +64 -0
- package/templates/template/config/collections/tags.ts +25 -0
- package/templates/template/config/collections/users.ts +142 -0
- package/templates/template/{shared → config}/index.ts +1 -1
- package/templates/template/config/package.json +28 -0
- package/templates/template/docker-compose.yml +50 -14
- package/templates/template/frontend/Dockerfile +39 -15
- package/templates/template/frontend/nginx.conf +40 -0
- package/templates/template/frontend/package.json +13 -13
- package/templates/template/frontend/src/App.tsx +30 -116
- package/templates/template/frontend/src/index.css +15 -1
- package/templates/template/frontend/src/main.tsx +6 -2
- package/templates/template/frontend/src/virtual.d.ts +6 -0
- package/templates/template/frontend/tsconfig.json +3 -2
- package/templates/template/frontend/vite.config.ts +48 -5
- package/templates/template/package.json +21 -12
- package/templates/template/pnpm-workspace.yaml +13 -0
- package/templates/template/scripts/example.ts +94 -0
- package/dist/auth.d.ts +0 -5
- package/dist/index.cjs +0 -293
- package/dist/index.cjs.map +0 -1
- package/templates/template/.env.template +0 -31
- package/templates/template/backend/drizzle.config.ts +0 -22
- package/templates/template/backend/scripts/db-generate.ts +0 -60
- package/templates/template/shared/collections/index.ts +0 -3
- package/templates/template/shared/package.json +0 -28
- /package/templates/template/{shared → config}/tsconfig.json +0 -0
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { spawn } from "child_process";
|
|
3
|
-
|
|
4
|
-
// --- Helper Functions ---
|
|
5
|
-
const formatTerminalText = (text: string, options: {
|
|
6
|
-
bold?: boolean;
|
|
7
|
-
backgroundColor?: "blue" | "green" | "red" | "yellow" | "cyan" | "magenta";
|
|
8
|
-
textColor?: "white" | "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan";
|
|
9
|
-
} = {}): string => {
|
|
10
|
-
let codes = "";
|
|
11
|
-
if (options.bold) codes += "\x1b[1m";
|
|
12
|
-
if (options.backgroundColor) {
|
|
13
|
-
const bgColors = {
|
|
14
|
-
blue: "\x1b[44m",
|
|
15
|
-
green: "\x1b[42m",
|
|
16
|
-
red: "\x1b[41m",
|
|
17
|
-
yellow: "\x1b[43m",
|
|
18
|
-
cyan: "\x1b[46m",
|
|
19
|
-
magenta: "\x1b[45m"
|
|
20
|
-
} as const;
|
|
21
|
-
codes += bgColors[options.backgroundColor];
|
|
22
|
-
}
|
|
23
|
-
if (options.textColor) {
|
|
24
|
-
const textColors = {
|
|
25
|
-
white: "\x1b[37m",
|
|
26
|
-
black: "\x1b[30m",
|
|
27
|
-
red: "\x1b[31m",
|
|
28
|
-
green: "\x1b[32m",
|
|
29
|
-
yellow: "\x1b[33m",
|
|
30
|
-
blue: "\x1b[34m",
|
|
31
|
-
magenta: "\x1b[35m",
|
|
32
|
-
cyan: "\x1b[36m"
|
|
33
|
-
} as const;
|
|
34
|
-
codes += textColors[options.textColor];
|
|
35
|
-
}
|
|
36
|
-
return `${codes}${text}\x1b[0m`;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// Run drizzle-kit generate with the correct env path
|
|
40
|
-
const child = spawn("npx", ["drizzle-kit", "generate"], {
|
|
41
|
-
stdio: "inherit",
|
|
42
|
-
env: {
|
|
43
|
-
...process.env,
|
|
44
|
-
DOTENV_CONFIG_PATH: "../.env"
|
|
45
|
-
},
|
|
46
|
-
shell: true
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
child.on("close", (code) => {
|
|
50
|
-
if (code === 0) {
|
|
51
|
-
console.log("");
|
|
52
|
-
console.log(`You can now run ${formatTerminalText("pnpm db:migrate", {
|
|
53
|
-
bold: true,
|
|
54
|
-
backgroundColor: "green",
|
|
55
|
-
textColor: "black"
|
|
56
|
-
})} to apply the migrations to your database.`);
|
|
57
|
-
console.log("");
|
|
58
|
-
}
|
|
59
|
-
process.exit(code ?? 0);
|
|
60
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{PROJECT_NAME}}-shared",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Shared collections for frontend and backend",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"private": true,
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "tsc",
|
|
11
|
-
"dev": "tsc --watch",
|
|
12
|
-
"clean": "rm -rf dist"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@rebasepro/types": "^4.0.0"
|
|
16
|
-
},
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
"typescript": "^5.9.2"
|
|
19
|
-
},
|
|
20
|
-
"exports": {
|
|
21
|
-
".": {
|
|
22
|
-
"import": "./dist/index.js",
|
|
23
|
-
"types": "./dist/index.d.ts",
|
|
24
|
-
"default": "./dist/index.js"
|
|
25
|
-
},
|
|
26
|
-
"./package.json": "./package.json"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
File without changes
|