honotan 0.6.0 → 0.6.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/dist/index.mjs +13 -10
- package/package.json +9 -1
package/dist/index.mjs
CHANGED
|
@@ -6101,11 +6101,11 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
6101
6101
|
//#region src/templates/monorepo/apps/web/src-lib-auth-client.template.ts
|
|
6102
6102
|
function generateLibAuthClientTs(data) {
|
|
6103
6103
|
const { scope } = data;
|
|
6104
|
-
return `import { env } from "${scope}/env/
|
|
6104
|
+
return `import { env } from "${scope}/env/client";
|
|
6105
6105
|
import { createAuthClient } from "better-auth/react";
|
|
6106
6106
|
|
|
6107
6107
|
export const authClient = createAuthClient({
|
|
6108
|
-
baseURL: env.
|
|
6108
|
+
baseURL: env.VITE_API_URL,
|
|
6109
6109
|
});
|
|
6110
6110
|
`;
|
|
6111
6111
|
}
|
|
@@ -6677,6 +6677,14 @@ export { Toaster };
|
|
|
6677
6677
|
`;
|
|
6678
6678
|
}
|
|
6679
6679
|
|
|
6680
|
+
//#endregion
|
|
6681
|
+
//#region src/templates/monorepo/apps/web/env-example.template.ts
|
|
6682
|
+
function generateWebEnvExample(data) {
|
|
6683
|
+
const lines = ["# Client", "VITE_API_URL=http://localhost:3000"];
|
|
6684
|
+
if (data.hasAuth) lines.push("VITE_AUTH_URL=http://localhost:3000");
|
|
6685
|
+
return lines.join("\n") + "\n";
|
|
6686
|
+
}
|
|
6687
|
+
|
|
6680
6688
|
//#endregion
|
|
6681
6689
|
//#region src/templates/monorepo/root/package-json.template.ts
|
|
6682
6690
|
function generateRootPackageJson(data) {
|
|
@@ -6793,7 +6801,7 @@ function generateEnvExample(data) {
|
|
|
6793
6801
|
"CORS_ORIGIN=http://localhost:3000"
|
|
6794
6802
|
];
|
|
6795
6803
|
if (data.hasDb) lines.push("", "# Database", `DATABASE_URL=postgresql://${data.kebabName}:${data.kebabName}_password@localhost:5432/${data.kebabName}`);
|
|
6796
|
-
if (data.hasDbTurso) lines.push("", "# Database (Turso SQLite)", "# For local development you can use:
|
|
6804
|
+
if (data.hasDbTurso) lines.push("", "# Database (Turso SQLite)", "# For local development you can use: DATABASE_URL=file:local.db", "DATABASE_URL=libsql://your-db-name.turso.io", "DATABASE_AUTH_TOKEN=your-turso-auth-token");
|
|
6797
6805
|
if (data.hasCache) lines.push("", "# Cache", "REDIS_URL=redis://localhost:6379");
|
|
6798
6806
|
if (data.hasEventDriven) lines.push("", "# Event-Driven", `RABBITMQ_URL=amqp://${data.kebabName}:${data.kebabName}_password@localhost:5672`);
|
|
6799
6807
|
if (data.hasAuth) lines.push("", "# Auth (better-auth)", "BETTER_AUTH_SECRET=your-secret-key-at-least-32-characters-long", "BETTER_AUTH_URL=http://localhost:3000");
|
|
@@ -7340,7 +7348,7 @@ docker-compose up -d
|
|
|
7340
7348
|
|
|
7341
7349
|
Remember to set production environment variables:
|
|
7342
7350
|
|
|
7343
|
-
${hasDb ? `- \`DATABASE_URL\`: PostgreSQL connection string\n` : ""}${hasDbTurso ? `- \`
|
|
7351
|
+
${hasDb ? `- \`DATABASE_URL\`: PostgreSQL connection string\n` : ""}${hasDbTurso ? `- \`DATABASE_URL\`: Turso database URL (e.g. libsql://your-db.turso.io)\n- \`TURSO_AUTH_TOKEN\`: Turso auth token\n` : ""}${hasCache ? `- \`REDIS_URL\`: Redis connection string\n` : ""}${hasEventDriven ? `- \`RABBITMQ_URL\`: RabbitMQ connection string\n` : ""}- \`PORT\`: Server port (default: 3000)
|
|
7344
7352
|
- \`NODE_ENV\`: Set to \`production\`
|
|
7345
7353
|
|
|
7346
7354
|
## 📖 Learn More
|
|
@@ -7854,7 +7862,6 @@ function generateEnvPackageJson(data) {
|
|
|
7854
7862
|
},
|
|
7855
7863
|
devDependencies: {
|
|
7856
7864
|
[`${data.scope}/config`]: "workspace:*",
|
|
7857
|
-
"@types/node": "catalog:",
|
|
7858
7865
|
typescript: "catalog:"
|
|
7859
7866
|
}
|
|
7860
7867
|
};
|
|
@@ -7947,7 +7954,6 @@ function generateDbPackageJson(data) {
|
|
|
7947
7954
|
},
|
|
7948
7955
|
devDependencies: {
|
|
7949
7956
|
[`${data.scope}/config`]: "workspace:*",
|
|
7950
|
-
"@types/node": "catalog:",
|
|
7951
7957
|
typescript: "catalog:"
|
|
7952
7958
|
}
|
|
7953
7959
|
};
|
|
@@ -8008,7 +8014,6 @@ function generateCachePackageJson(data) {
|
|
|
8008
8014
|
},
|
|
8009
8015
|
devDependencies: {
|
|
8010
8016
|
[`${data.scope}/config`]: "workspace:*",
|
|
8011
|
-
"@types/node": "catalog:",
|
|
8012
8017
|
typescript: "catalog:"
|
|
8013
8018
|
}
|
|
8014
8019
|
};
|
|
@@ -8111,7 +8116,6 @@ function generateEventDrivenPackageJson(data) {
|
|
|
8111
8116
|
devDependencies: {
|
|
8112
8117
|
[`${data.scope}/config`]: "workspace:*",
|
|
8113
8118
|
"@types/amqplib": "^0.10.5",
|
|
8114
|
-
"@types/node": "catalog:",
|
|
8115
8119
|
typescript: "catalog:"
|
|
8116
8120
|
}
|
|
8117
8121
|
};
|
|
@@ -8696,7 +8700,6 @@ function generateAuthPackageJson(data) {
|
|
|
8696
8700
|
},
|
|
8697
8701
|
devDependencies: {
|
|
8698
8702
|
[`${data.scope}/config`]: "workspace:*",
|
|
8699
|
-
"@types/node": "catalog:",
|
|
8700
8703
|
typescript: "catalog:"
|
|
8701
8704
|
}
|
|
8702
8705
|
};
|
|
@@ -8799,7 +8802,6 @@ function generateS3PackageJson(data) {
|
|
|
8799
8802
|
dependencies: { "aws4fetch": "catalog:" },
|
|
8800
8803
|
devDependencies: {
|
|
8801
8804
|
[`${data.scope}/config`]: "workspace:*",
|
|
8802
|
-
"@types/node": "catalog:",
|
|
8803
8805
|
typescript: "catalog:"
|
|
8804
8806
|
}
|
|
8805
8807
|
};
|
|
@@ -9224,6 +9226,7 @@ function collectWebFiles(data) {
|
|
|
9224
9226
|
w("src/components/ui/sonner.tsx", generateUiSonnerTsx(data))
|
|
9225
9227
|
];
|
|
9226
9228
|
if (data.hasAuth) files.push(w("src/lib/auth-client.ts", generateLibAuthClientTs(data)), w("src/components/user-menu.tsx", generateUserMenuTsx(data)));
|
|
9229
|
+
files.push(w(".env.example", generateWebEnvExample(data)));
|
|
9227
9230
|
return files;
|
|
9228
9231
|
}
|
|
9229
9232
|
function collectFiles$1(data) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "honotan",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "CLI toolkit for generating Hexagonal & Vertical Slice architecture in turbo monorepo",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
],
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"author": "rifkyputra",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/rifkyputra/honotan-cli.git"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/rifkyputra/honotan-cli#readme",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/rifkyputra/honotan-cli/issues"
|
|
26
|
+
},
|
|
19
27
|
"type": "module",
|
|
20
28
|
"bin": {
|
|
21
29
|
"honotan": "./dist/index.mjs"
|