baasix 0.1.0 → 0.1.1
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/README.md +7 -7
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
- package/src/commands/init.ts +5 -5
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Baasix CLI
|
|
2
2
|
|
|
3
3
|
Command-line interface for [Baasix](https://baasix.com) Backend-as-a-Service.
|
|
4
4
|
|
|
@@ -6,10 +6,10 @@ Command-line interface for [Baasix](https://baasix.com) Backend-as-a-Service.
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# Global installation
|
|
9
|
-
npm install -g
|
|
9
|
+
npm install -g baasix
|
|
10
10
|
|
|
11
11
|
# Or use npx
|
|
12
|
-
npx
|
|
12
|
+
npx baasix <command>
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Commands
|
|
@@ -48,10 +48,10 @@ baasix init --name my-app --template api -y
|
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
# Create API server
|
|
51
|
-
npx
|
|
51
|
+
npx baasix init --template api my-api
|
|
52
52
|
|
|
53
53
|
# Create Next.js frontend (separate from API)
|
|
54
|
-
npx
|
|
54
|
+
npx baasix init --template nextjs-app my-frontend
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
### `baasix generate`
|
|
@@ -341,10 +341,10 @@ my-frontend/
|
|
|
341
341
|
```yaml
|
|
342
342
|
# .github/workflows/deploy.yml
|
|
343
343
|
- name: Generate Types
|
|
344
|
-
run: npx
|
|
344
|
+
run: npx baasix generate --url ${{ secrets.BAASIX_URL }} -o ./src/types/baasix.d.ts -y
|
|
345
345
|
|
|
346
346
|
- name: Run Migrations
|
|
347
|
-
run: npx
|
|
347
|
+
run: npx baasix migrate run --url ${{ secrets.BAASIX_URL }} -y
|
|
348
348
|
|
|
349
349
|
- name: Build
|
|
350
350
|
run: npm run build
|
package/dist/index.mjs
CHANGED
|
@@ -184,7 +184,7 @@ async function initAction(opts) {
|
|
|
184
184
|
console.log(` ${chalk.cyan(`${packageManager} run dev`)} ${chalk.dim("# Start Next.js frontend")}`);
|
|
185
185
|
console.log();
|
|
186
186
|
console.log(chalk.dim(" Note: This is a frontend-only project. You need a separate Baasix API."));
|
|
187
|
-
console.log(chalk.dim(` To create an API: ${chalk.cyan("npx
|
|
187
|
+
console.log(chalk.dim(` To create an API: ${chalk.cyan("npx baasix init --template api")}`));
|
|
188
188
|
}
|
|
189
189
|
console.log();
|
|
190
190
|
} catch (error) {
|
|
@@ -682,7 +682,7 @@ function generateNextJsEnvContent(config) {
|
|
|
682
682
|
lines.push("NEXT_PUBLIC_BAASIX_URL=http://localhost:8056");
|
|
683
683
|
lines.push("");
|
|
684
684
|
lines.push("# Note: Create a separate Baasix API project using:");
|
|
685
|
-
lines.push("# npx
|
|
685
|
+
lines.push("# npx baasix init --template api");
|
|
686
686
|
lines.push("");
|
|
687
687
|
return lines.join("\n");
|
|
688
688
|
}
|
|
@@ -918,7 +918,7 @@ export default function Home() {
|
|
|
918
918
|
This is a frontend-only Next.js app. You need a separate Baasix API server.
|
|
919
919
|
</p>
|
|
920
920
|
<ol style={{ paddingLeft: "1.5rem", lineHeight: "1.8" }}>
|
|
921
|
-
<li>Create a Baasix API project: <code>npx
|
|
921
|
+
<li>Create a Baasix API project: <code>npx baasix init --template api</code></li>
|
|
922
922
|
<li>Start the API server: <code>cd your-api && npm run dev</code></li>
|
|
923
923
|
<li>Update <code>.env.local</code> with your API URL if needed</li>
|
|
924
924
|
<li>Start this Next.js app: <code>npm run dev</code></li>
|
|
@@ -1088,7 +1088,7 @@ export default function Home() {
|
|
|
1088
1088
|
This is a frontend-only Next.js app. You need a separate Baasix API server.
|
|
1089
1089
|
</p>
|
|
1090
1090
|
<ol style={{ paddingLeft: "1.5rem", lineHeight: "1.8" }}>
|
|
1091
|
-
<li>Create a Baasix API project: <code>npx
|
|
1091
|
+
<li>Create a Baasix API project: <code>npx baasix init --template api</code></li>
|
|
1092
1092
|
<li>Start the API server: <code>cd your-api && npm run dev</code></li>
|
|
1093
1093
|
<li>Update <code>.env.local</code> with your API URL if needed</li>
|
|
1094
1094
|
<li>Start this Next.js app: <code>npm run dev</code></li>
|
|
@@ -1165,7 +1165,7 @@ This is a **frontend-only** project. You need a separate Baasix API server runni
|
|
|
1165
1165
|
If you don't have a Baasix API project yet, create one:
|
|
1166
1166
|
|
|
1167
1167
|
\`\`\`bash
|
|
1168
|
-
npx
|
|
1168
|
+
npx baasix init --template api my-api
|
|
1169
1169
|
cd my-api
|
|
1170
1170
|
npm install
|
|
1171
1171
|
npm run dev
|
package/package.json
CHANGED
package/src/commands/init.ts
CHANGED
|
@@ -192,7 +192,7 @@ async function initAction(opts: InitOptions) {
|
|
|
192
192
|
console.log(` ${chalk.cyan(`${packageManager} run dev`)} ${chalk.dim("# Start Next.js frontend")}`);
|
|
193
193
|
console.log();
|
|
194
194
|
console.log(chalk.dim(" Note: This is a frontend-only project. You need a separate Baasix API."));
|
|
195
|
-
console.log(chalk.dim(` To create an API: ${chalk.cyan("npx
|
|
195
|
+
console.log(chalk.dim(` To create an API: ${chalk.cyan("npx baasix init --template api")}`));
|
|
196
196
|
}
|
|
197
197
|
console.log();
|
|
198
198
|
|
|
@@ -791,7 +791,7 @@ function generateNextJsEnvContent(config: ProjectConfig): string {
|
|
|
791
791
|
lines.push("NEXT_PUBLIC_BAASIX_URL=http://localhost:8056");
|
|
792
792
|
lines.push("");
|
|
793
793
|
lines.push("# Note: Create a separate Baasix API project using:");
|
|
794
|
-
lines.push("# npx
|
|
794
|
+
lines.push("# npx baasix init --template api");
|
|
795
795
|
lines.push("");
|
|
796
796
|
|
|
797
797
|
return lines.join("\n");
|
|
@@ -1052,7 +1052,7 @@ export default function Home() {
|
|
|
1052
1052
|
This is a frontend-only Next.js app. You need a separate Baasix API server.
|
|
1053
1053
|
</p>
|
|
1054
1054
|
<ol style={{ paddingLeft: "1.5rem", lineHeight: "1.8" }}>
|
|
1055
|
-
<li>Create a Baasix API project: <code>npx
|
|
1055
|
+
<li>Create a Baasix API project: <code>npx baasix init --template api</code></li>
|
|
1056
1056
|
<li>Start the API server: <code>cd your-api && npm run dev</code></li>
|
|
1057
1057
|
<li>Update <code>.env.local</code> with your API URL if needed</li>
|
|
1058
1058
|
<li>Start this Next.js app: <code>npm run dev</code></li>
|
|
@@ -1236,7 +1236,7 @@ export default function Home() {
|
|
|
1236
1236
|
This is a frontend-only Next.js app. You need a separate Baasix API server.
|
|
1237
1237
|
</p>
|
|
1238
1238
|
<ol style={{ paddingLeft: "1.5rem", lineHeight: "1.8" }}>
|
|
1239
|
-
<li>Create a Baasix API project: <code>npx
|
|
1239
|
+
<li>Create a Baasix API project: <code>npx baasix init --template api</code></li>
|
|
1240
1240
|
<li>Start the API server: <code>cd your-api && npm run dev</code></li>
|
|
1241
1241
|
<li>Update <code>.env.local</code> with your API URL if needed</li>
|
|
1242
1242
|
<li>Start this Next.js app: <code>npm run dev</code></li>
|
|
@@ -1319,7 +1319,7 @@ This is a **frontend-only** project. You need a separate Baasix API server runni
|
|
|
1319
1319
|
If you don't have a Baasix API project yet, create one:
|
|
1320
1320
|
|
|
1321
1321
|
\`\`\`bash
|
|
1322
|
-
npx
|
|
1322
|
+
npx baasix init --template api my-api
|
|
1323
1323
|
cd my-api
|
|
1324
1324
|
npm install
|
|
1325
1325
|
npm run dev
|