kavoru 0.3.0 → 0.4.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/README.md CHANGED
@@ -14,6 +14,13 @@ bun run dev
14
14
 
15
15
  Equivalent to `bunx --bun kavoru` (Bun runs the `kavoru` binary from the npm package).
16
16
 
17
+ **Stale UI after upgrade?** Bun caches `bunx` installs under `%TEMP%\bunx-*-kavoru@latest` and does not auto-refresh when a new version is published. Clear it or pin a version:
18
+
19
+ ```powershell
20
+ Remove-Item -Recurse -Force "$env:TEMP\bunx-*-kavoru*"
21
+ bunx kavoru@0.3.0 my-api
22
+ ```
23
+
17
24
  ### Options
18
25
 
19
26
  | Flag | Description |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kavoru",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Scaffold a new Kavoru (Elysia + Bun) backend from the official template",
5
5
  "type": "module",
6
6
  "bin": {
package/src/constants.ts CHANGED
@@ -1,4 +1,6 @@
1
- export const PACKAGE_VERSION = "0.1.0";
1
+ import pkg from "../package.json";
2
+
3
+ export const PACKAGE_VERSION = pkg.version;
2
4
 
3
5
  export const TEMPLATE_REPO = "mertthesamael/Kavoru";
4
6
  export const TEMPLATE_BRANCH = "master";
package/src/features.ts CHANGED
@@ -504,9 +504,14 @@ async function patchDockerfile(projectDir: string, selection: FeatureSelection)
504
504
  let content = current;
505
505
  if (!selection.prisma) {
506
506
  content = content.replace(/^\s*COPY prisma\.config\.ts \.\/.*\n/m, "");
507
- content = content.replace(/^\s*ENV DATABASE_URL=\$\{DATABASE_URL\}\n/m, "");
508
- content = content.replace(/^\s*RUN bunx prisma db pull\n/m, "");
509
- content = content.replace(/^\s*RUN bunx prisma generate\n/m, "");
507
+ content = content.replace(
508
+ /^\s*# generate only needs the schema on disk, not a live database\n/m,
509
+ "",
510
+ );
511
+ content = content.replace(
512
+ /^\s*RUN if \[ -f src\/infra\/prisma\/schemas\/schema\.prisma \]; then bunx prisma generate; fi\n/m,
513
+ "",
514
+ );
510
515
  }
511
516
 
512
517
  await writeText(projectDir, relativePath, content);
@@ -525,19 +530,24 @@ function generateDockerCompose(selection: FeatureSelection): string {
525
530
  const kafkaService = selection.kafka
526
531
  ? `
527
532
  kafka:
528
- image: bitnami/kafka:3.9
533
+ image: confluentinc/cp-kafka:7.6.1
534
+ hostname: kafka
529
535
  ports:
530
536
  - "9094:9094"
531
537
  environment:
532
- KAFKA_CFG_NODE_ID: "0"
533
- KAFKA_CFG_PROCESS_ROLES: controller,broker
534
- KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
535
- KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094
536
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT
537
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093
538
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
539
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT
540
- ALLOW_PLAINTEXT_LISTENER: "yes"
538
+ CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk
539
+ KAFKA_NODE_ID: "0"
540
+ KAFKA_PROCESS_ROLES: broker,controller
541
+ KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
542
+ KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094
543
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT
544
+ KAFKA_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093
545
+ KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
546
+ KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
547
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
548
+ KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
549
+ KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
550
+ KAFKA_LOG_DIRS: /tmp/kraft-combined-logs
541
551
  networks:
542
552
  - app_network
543
553
  restart: unless-stopped
@@ -547,7 +557,7 @@ function generateDockerCompose(selection: FeatureSelection): string {
547
557
  const jaegerService = selection.otel
548
558
  ? `
549
559
  jaeger:
550
- image: jaegertracing/all-in-one:1.62
560
+ image: jaegertracing/all-in-one:1.62.0
551
561
  ports:
552
562
  - "16686:16686"
553
563
  - "4318:4318"