@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.
Files changed (83) hide show
  1. package/LICENSE +17 -196
  2. package/README.md +57 -33
  3. package/dist/commands/api-keys.d.ts +1 -0
  4. package/dist/commands/auth.d.ts +1 -0
  5. package/dist/commands/build.d.ts +1 -0
  6. package/dist/commands/cloud/auth.d.ts +3 -0
  7. package/dist/commands/cloud/context.d.ts +61 -0
  8. package/dist/commands/cloud/databases.d.ts +1 -0
  9. package/dist/commands/cloud/deploy.d.ts +2 -0
  10. package/dist/commands/cloud/index.d.ts +1 -0
  11. package/dist/commands/cloud/link.d.ts +5 -0
  12. package/dist/commands/cloud/orgs.d.ts +1 -0
  13. package/dist/commands/cloud/projects.d.ts +13 -0
  14. package/dist/commands/cloud/resources.d.ts +6 -0
  15. package/dist/commands/db.d.ts +1 -0
  16. package/dist/commands/dev.d.ts +1 -0
  17. package/dist/commands/doctor.d.ts +1 -0
  18. package/dist/commands/generate_sdk.d.ts +18 -0
  19. package/dist/commands/init.d.ts +40 -0
  20. package/dist/commands/schema.d.ts +1 -0
  21. package/dist/commands/skills.d.ts +1 -0
  22. package/dist/commands/start.d.ts +1 -0
  23. package/dist/index.d.ts +11 -1
  24. package/dist/index.es.js +3952 -245
  25. package/dist/index.es.js.map +1 -1
  26. package/dist/utils/package-manager.d.ts +33 -0
  27. package/dist/utils/project.d.ts +60 -0
  28. package/package.json +35 -23
  29. package/templates/overlays/baas/README.md +37 -0
  30. package/templates/overlays/baas/backend/package.json +31 -0
  31. package/templates/overlays/baas/backend/src/index.ts +172 -0
  32. package/templates/overlays/baas/backend/tsconfig.json +18 -0
  33. package/templates/overlays/baas/package.json +42 -0
  34. package/templates/overlays/baas/pnpm-workspace.yaml +9 -0
  35. package/templates/template/.cursorrules +2 -0
  36. package/templates/template/.dockerignore +28 -0
  37. package/templates/template/.env.example +120 -0
  38. package/templates/template/.github/copilot-instructions.md +2 -0
  39. package/templates/template/.windsurfrules +2 -0
  40. package/templates/template/AGENTS.md +2 -0
  41. package/templates/template/CLAUDE.md +2 -0
  42. package/templates/template/README.md +88 -21
  43. package/templates/template/ai-instructions.md +17 -0
  44. package/templates/template/backend/Dockerfile +57 -11
  45. package/templates/template/backend/functions/hello.ts +56 -0
  46. package/templates/template/backend/package.json +30 -34
  47. package/templates/template/backend/src/env.ts +23 -0
  48. package/templates/template/backend/src/index.ts +140 -100
  49. package/templates/template/backend/tsconfig.json +1 -1
  50. package/templates/template/config/collections/authors.ts +45 -0
  51. package/templates/template/config/collections/index.ts +26 -0
  52. package/templates/template/{shared → config}/collections/posts.ts +28 -10
  53. package/templates/template/config/collections/presets/blank/index.ts +3 -0
  54. package/templates/template/config/collections/presets/ecommerce/categories.ts +40 -0
  55. package/templates/template/config/collections/presets/ecommerce/index.ts +6 -0
  56. package/templates/template/config/collections/presets/ecommerce/orders.ts +66 -0
  57. package/templates/template/config/collections/presets/ecommerce/products.ts +64 -0
  58. package/templates/template/config/collections/tags.ts +25 -0
  59. package/templates/template/config/collections/users.ts +142 -0
  60. package/templates/template/{shared → config}/index.ts +1 -1
  61. package/templates/template/config/package.json +28 -0
  62. package/templates/template/docker-compose.yml +50 -14
  63. package/templates/template/frontend/Dockerfile +39 -15
  64. package/templates/template/frontend/nginx.conf +40 -0
  65. package/templates/template/frontend/package.json +13 -13
  66. package/templates/template/frontend/src/App.tsx +30 -116
  67. package/templates/template/frontend/src/index.css +15 -1
  68. package/templates/template/frontend/src/main.tsx +6 -2
  69. package/templates/template/frontend/src/virtual.d.ts +6 -0
  70. package/templates/template/frontend/tsconfig.json +3 -2
  71. package/templates/template/frontend/vite.config.ts +48 -5
  72. package/templates/template/package.json +21 -12
  73. package/templates/template/pnpm-workspace.yaml +13 -0
  74. package/templates/template/scripts/example.ts +94 -0
  75. package/dist/auth.d.ts +0 -5
  76. package/dist/index.cjs +0 -293
  77. package/dist/index.cjs.map +0 -1
  78. package/templates/template/.env.template +0 -31
  79. package/templates/template/backend/drizzle.config.ts +0 -22
  80. package/templates/template/backend/scripts/db-generate.ts +0 -60
  81. package/templates/template/shared/collections/index.ts +0 -3
  82. package/templates/template/shared/package.json +0 -28
  83. /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,3 +0,0 @@
1
- import postsCollection from "./posts";
2
-
3
- export const collections = [postsCollection];
@@ -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
- }