belt 0.3.8 → 0.3.10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20fce17142b2c69d75437a4c0a1c74f430674a5d68d1ca8e5e26a2f29a801d04
4
- data.tar.gz: 4238c56a47ec43f5816f3abf1a8d5a85457a0216fa59940d42a773bdb13e8965
3
+ metadata.gz: b159c6faf59bf1961bf61d4b69af8ebc3a017cceccb88d74b53c74fc12c62796
4
+ data.tar.gz: c9f414838a3a51bf70a923f4e76de53eeb040a2f685716047ccbcda49962dfa9
5
5
  SHA512:
6
- metadata.gz: aacc4008ae9096011385a7cebf597a1a96b68cdaa14ca3119e659fcbdac06b095cdb946116463d75885acefe84ecca0dd3ae7c60390462c5631701f5577c70e9
7
- data.tar.gz: 917bbc217bc7573bc37a45990867dafff8ba91e3a6b3788b98b6ff2db7e6543e09a20ac9bb8209cdbb97fc80241ba74ce5c53f4d1dcc2cb3c22eb6652a89f3a4
6
+ metadata.gz: 56d43f40d8fc593eab6f9051737a5e9fa757841b4f72f7af672ae50e6bfdb8da6cea5f8cf13bbf67982596eb19897b747c68adbd40a7ab23cf7c578b8cff8783
7
+ data.tar.gz: c7eed2a059fd4c42dd2a004d55f904f4c9a0399f402f0b73ec7f65a7e4907846a4ced15e05bcab74cd92d86ef3d4b82d5b6660efbc42c85e456214c3e3437e1d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.10
4
+
5
+ ### Bug Fix
6
+
7
+ - **`api_url` output missing base path for custom domains**: When a custom domain is
8
+ configured (e.g. `api.dev.example.com`), the `api_url` terraform output was missing
9
+ the gateway's base path segment. Conveyor-belt maps each gateway to a base path
10
+ (gateway "api" → path `/api`), so the correct URL is
11
+ `https://api.dev.example.com/api` not `https://api.dev.example.com`. The frontend
12
+ would get the wrong `VITE_API_URL` and hit a 403 on the custom domain root.
13
+
14
+ ## 0.3.9
15
+
16
+ ### Bug Fix
17
+
18
+ - **`belt setup frontend` with underscored app names**: The 0.3.8 fix placed
19
+ `local.s3_safe_name` in `dns.tf` but `belt setup frontend` only regenerates
20
+ `frontend.tf`, causing an "undeclared local value" error on existing apps.
21
+ The bucket name now uses inline `replace(var.app_name, "_", "-")` directly in
22
+ `frontend.tf`, making it fully self-contained with no cross-file dependency.
23
+
3
24
  ## 0.3.8
4
25
 
5
26
  ### Bug Fix
data/lib/belt/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Belt
4
- VERSION = '0.3.8'
4
+ VERSION = '0.3.10'
5
5
  end
@@ -2,10 +2,6 @@
2
2
  # Convention: prod → mydomain.com, other envs → <env>.mydomain.com
3
3
 
4
4
  locals {
5
- # S3 bucket names follow DNS rules — underscores are not allowed.
6
- # App names often use underscores (Ruby conventions); replace for S3/resource naming.
7
- s3_safe_name = replace(var.app_name, "_", "-")
8
-
9
5
  # Determine the domain for this environment
10
6
  app_domain = var.domain != "" ? (
11
7
  var.environment == "prod" ? var.domain : "${var.environment}.${var.domain}"
@@ -11,7 +11,7 @@ resource "random_string" "<%= @tf_name %>_suffix" {
11
11
 
12
12
  # S3 bucket for frontend static assets
13
13
  resource "aws_s3_bucket" "<%= @tf_name %>" {
14
- bucket = "${local.s3_safe_name}-<%= @bucket_slug %>-${var.environment}-${random_string.<%= @tf_name %>_suffix.result}"
14
+ bucket = "${replace(var.app_name, "_", "-")}-<%= @bucket_slug %>-${var.environment}-${random_string.<%= @tf_name %>_suffix.result}"
15
15
  force_destroy = true
16
16
 
17
17
  lifecycle {
@@ -1,6 +1,6 @@
1
1
  output "api_url" {
2
2
  description = "API Gateway base URL (custom domain if configured, otherwise default)"
3
- value = var.domain != "" ? "https://${local.api_domain}" : values(conveyor_belt.main.api_gateway_urls)[0]
3
+ value = var.domain != "" ? "https://${local.api_domain}/${keys(conveyor_belt.main.api_gateway_urls)[0]}" : values(conveyor_belt.main.api_gateway_urls)[0]
4
4
  }
5
5
 
6
6
  output "api_urls" {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: belt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stowzilla