releasebird-javascript-sdk 1.0.62 β†’ 1.0.63

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.
@@ -35,7 +35,8 @@
35
35
  "Read(//Users/christianzillmann/IdeaProjects/releasebook-backend/**)",
36
36
  "Bash(node test-full-flow.js:*)",
37
37
  "Bash(node test-emoji-simple.js:*)",
38
- "Bash(node:*)"
38
+ "Bash(node:*)",
39
+ "WebFetch(domain:app.raisenext.de)"
39
40
  ],
40
41
  "deny": [],
41
42
  "ask": []
@@ -3,7 +3,7 @@
3
3
  ## 🎯 Deine Environment
4
4
 
5
5
  - **Application:** `releasebird-image-service`
6
- - **Environment:** `Releasebird-image-service-env-1`
6
+ - **Environment:** `Releasebird-image-service-env`
7
7
  - **Region:** `eu-central-1` (Standard)
8
8
 
9
9
  ## πŸš€ Quick Deployment (Empfohlen)
@@ -19,7 +19,7 @@ Das Script:
19
19
  - βœ… Baut Docker Image
20
20
  - βœ… Erstellt Deployment Package
21
21
  - βœ… Uploaded zu S3
22
- - βœ… Deployed zu `Releasebird-image-service-env-1`
22
+ - βœ… Deployed zu `Releasebird-image-service-env`
23
23
  - βœ… Wartet auf Completion
24
24
  - βœ… Testet Health Endpoint
25
25
 
@@ -34,7 +34,7 @@ Mit Standard Script (mit Prompts):
34
34
  ./deploy-to-eb.sh
35
35
 
36
36
  # Oder explizit:
37
- ./deploy-to-eb.sh Releasebird-image-service-env-1
37
+ ./deploy-to-eb.sh Releasebird-image-service-env
38
38
  ```
39
39
 
40
40
  ## πŸ§ͺ Vor dem Deployment testen
@@ -58,7 +58,7 @@ curl http://localhost:3000/health
58
58
 
59
59
  ```bash
60
60
  aws elasticbeanstalk describe-environments \
61
- --environment-names Releasebird-image-service-env-1 \
61
+ --environment-names Releasebird-image-service-env \
62
62
  --query 'Environments[0].[EnvironmentName,Status,Health,CNAME]' \
63
63
  --output table
64
64
  ```
@@ -68,10 +68,10 @@ aws elasticbeanstalk describe-environments \
68
68
  ```bash
69
69
  # Aktuelle Logs
70
70
  aws elasticbeanstalk logs \
71
- --environment-name Releasebird-image-service-env-1
71
+ --environment-name Releasebird-image-service-env
72
72
 
73
73
  # Logs streamen (mit EB CLI)
74
- eb logs --stream -e Releasebird-image-service-env-1
74
+ eb logs --stream -e Releasebird-image-service-env
75
75
  ```
76
76
 
77
77
  ### Health Check
@@ -79,7 +79,7 @@ eb logs --stream -e Releasebird-image-service-env-1
79
79
  ```bash
80
80
  # Environment URL holen
81
81
  ENV_URL=$(aws elasticbeanstalk describe-environments \
82
- --environment-names Releasebird-image-service-env-1 \
82
+ --environment-names Releasebird-image-service-env \
83
83
  --query 'Environments[0].CNAME' \
84
84
  --output text)
85
85
 
@@ -103,19 +103,19 @@ curl -X POST http://$ENV_URL/render \
103
103
  ```bash
104
104
  # Environment Events anschauen
105
105
  aws elasticbeanstalk describe-events \
106
- --environment-name Releasebird-image-service-env-1 \
106
+ --environment-name Releasebird-image-service-env \
107
107
  --max-items 20
108
108
 
109
109
  # Logs holen
110
110
  aws elasticbeanstalk logs \
111
- --environment-name Releasebird-image-service-env-1
111
+ --environment-name Releasebird-image-service-env
112
112
  ```
113
113
 
114
114
  ### Health Check schlΓ€gt fehl
115
115
 
116
116
  ```bash
117
117
  # SSH in Instance (mit EB CLI)
118
- eb ssh -e Releasebird-image-service-env-1
118
+ eb ssh -e Releasebird-image-service-env
119
119
 
120
120
  # Docker Logs anschauen
121
121
  sudo docker logs $(sudo docker ps -q)
@@ -137,7 +137,7 @@ aws elasticbeanstalk describe-application-versions \
137
137
  # Zu Version rollback
138
138
  aws elasticbeanstalk update-environment \
139
139
  --application-name releasebird-image-service \
140
- --environment-name Releasebird-image-service-env-1 \
140
+ --environment-name Releasebird-image-service-env \
141
141
  --version-label v20251028-143000 # Ersetze mit gewΓΌnschter Version
142
142
  ```
143
143
 
@@ -168,19 +168,19 @@ Nach dem Deployment:
168
168
 
169
169
  # Status
170
170
  aws elasticbeanstalk describe-environments \
171
- --environment-names Releasebird-image-service-env-1
171
+ --environment-names Releasebird-image-service-env
172
172
 
173
173
  # Logs
174
174
  aws elasticbeanstalk logs \
175
- --environment-name Releasebird-image-service-env-1
175
+ --environment-name Releasebird-image-service-env
176
176
 
177
177
  # Restart Environment
178
178
  aws elasticbeanstalk restart-app-server \
179
- --environment-name Releasebird-image-service-env-1
179
+ --environment-name Releasebird-image-service-env
180
180
 
181
181
  # Health
182
182
  curl http://$(aws elasticbeanstalk describe-environments \
183
- --environment-names Releasebird-image-service-env-1 \
183
+ --environment-names Releasebird-image-service-env \
184
184
  --query 'Environments[0].CNAME' \
185
185
  --output text)/health
186
186
  ```
@@ -13,7 +13,7 @@
13
13
  Name: releasebird-image-service
14
14
 
15
15
  🌍 ENVIRONMENT
16
- Name: Releasebird-image-service-env-1
16
+ Name: Releasebird-image-service-env
17
17
  Region: eu-central-1 ⭐
18
18
 
19
19
  πŸš€ QUICK DEPLOYMENT
@@ -31,7 +31,7 @@
31
31
  2. Creates deployment package (.zip)
32
32
  3. Uploads to S3 (eu-central-1)
33
33
  4. Creates new application version
34
- 5. Deploys to Releasebird-image-service-env-1
34
+ 5. Deploys to Releasebird-image-service-env
35
35
  6. Waits for deployment completion
36
36
  7. Tests health endpoint
37
37
 
@@ -40,7 +40,7 @@
40
40
  βœ“ AWS CLI installed (aws configure done)
41
41
  βœ“ Docker running
42
42
  βœ“ Region: eu-central-1
43
- βœ“ Environment exists: Releasebird-image-service-env-1
43
+ βœ“ Environment exists: Releasebird-image-service-env
44
44
  βœ“ Application exists: releasebird-image-service
45
45
 
46
46
  πŸ§ͺ TEST LOCALLY FIRST
@@ -52,7 +52,7 @@
52
52
 
53
53
  # Check Environment Status
54
54
  aws elasticbeanstalk describe-environments \
55
- --environment-names Releasebird-image-service-env-1 \
55
+ --environment-names Releasebird-image-service-env \
56
56
  --region eu-central-1 \
57
57
  --query 'Environments[0].[Status,Health,HealthStatus]'
58
58
 
@@ -66,7 +66,7 @@
66
66
 
67
67
  # View Logs
68
68
  aws elasticbeanstalk logs \
69
- --environment-name Releasebird-image-service-env-1 \
69
+ --environment-name Releasebird-image-service-env \
70
70
  --region eu-central-1
71
71
 
72
72
  πŸ”§ ECR (Docker Registry)
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Simulates the payload size when inlining all resources
3
+ */
4
+
5
+ // Example: A typical web app might have:
6
+ const assumptions = {
7
+ htmlSize: 50000, // 50 KB base HTML
8
+ cssFiles: 3, // 3 external CSS files
9
+ avgCssSize: 100000, // 100 KB per CSS file
10
+ images: 10, // 10 images
11
+ avgImageSize: 50000, // 50 KB per image
12
+ fonts: 2, // 2 web fonts
13
+ avgFontSize: 100000, // 100 KB per font
14
+ backgroundImages: 5, // 5 background images in CSS
15
+ avgBgImageSize: 30000 // 30 KB per background image
16
+ };
17
+
18
+ // Calculate base64 overhead (33% increase)
19
+ const base64Overhead = 1.33;
20
+
21
+ const totalCSS = assumptions.cssFiles * assumptions.avgCssSize;
22
+ const totalImages = assumptions.images * assumptions.avgImageSize;
23
+ const totalFonts = assumptions.fonts * assumptions.avgFontSize;
24
+ const totalBgImages = assumptions.backgroundImages * assumptions.avgBgImageSize;
25
+
26
+ const totalBinaryData = totalImages + totalFonts + totalBgImages;
27
+ const totalBinaryDataBase64 = totalBinaryData * base64Overhead;
28
+
29
+ const totalPayload = assumptions.htmlSize + totalCSS + totalBinaryDataBase64;
30
+
31
+ console.log('=== Payload Size Estimation ===\n');
32
+ console.log('Base HTML:', (assumptions.htmlSize / 1024).toFixed(1), 'KB');
33
+ console.log('CSS files:', assumptions.cssFiles, 'x', (assumptions.avgCssSize / 1024).toFixed(1), 'KB =', (totalCSS / 1024).toFixed(1), 'KB');
34
+ console.log('Images:', assumptions.images, 'x', (assumptions.avgImageSize / 1024).toFixed(1), 'KB =', (totalImages / 1024).toFixed(1), 'KB');
35
+ console.log('Fonts:', assumptions.fonts, 'x', (assumptions.avgFontSize / 1024).toFixed(1), 'KB =', (totalFonts / 1024).toFixed(1), 'KB');
36
+ console.log('Background images:', assumptions.backgroundImages, 'x', (assumptions.avgBgImageSize / 1024).toFixed(1), 'KB =', (totalBgImages / 1024).toFixed(1), 'KB');
37
+ console.log('\nBase64 overhead (33%):', ((totalBinaryDataBase64 - totalBinaryData) / 1024).toFixed(1), 'KB');
38
+ console.log('\n--- TOTAL UNCOMPRESSED ---');
39
+ console.log('Total payload:', (totalPayload / 1024).toFixed(1), 'KB');
40
+ console.log('Total payload:', (totalPayload / 1024 / 1024).toFixed(2), 'MB');
41
+
42
+ // With gzip compression (typically 70-90% for HTML/CSS, 0% for already compressed images)
43
+ const htmlCssCompression = 0.3; // 70% reduction
44
+ const htmlCssSize = assumptions.htmlSize + totalCSS;
45
+ const htmlCssCompressed = htmlCssSize * htmlCssCompression;
46
+ const imagesNoCompression = totalBinaryDataBase64; // Already base64, minimal compression
47
+
48
+ const totalCompressed = htmlCssCompressed + imagesNoCompression;
49
+
50
+ console.log('\n--- WITH GZIP COMPRESSION ---');
51
+ console.log('HTML+CSS compressed (70%):', (htmlCssCompressed / 1024).toFixed(1), 'KB');
52
+ console.log('Images (no compression):', (imagesNoCompression / 1024).toFixed(1), 'KB');
53
+ console.log('Total compressed:', (totalCompressed / 1024).toFixed(1), 'KB');
54
+ console.log('Total compressed:', (totalCompressed / 1024 / 1024).toFixed(2), 'MB');
55
+
56
+ console.log('\n--- COMPARISON ---');
57
+ if (totalCompressed < 50 * 1024 * 1024) {
58
+ console.log('βœ… Fits within 50MB nginx limit');
59
+ } else {
60
+ console.log('❌ EXCEEDS 50MB nginx limit!');
61
+ }
62
+
63
+ if (totalCompressed < 10 * 1024 * 1024) {
64
+ console.log('βœ… Reasonable payload size (< 10MB)');
65
+ } else if (totalCompressed < 25 * 1024 * 1024) {
66
+ console.log('⚠️ Large payload (10-25MB) - may be slow');
67
+ } else {
68
+ console.log('❌ Very large payload (> 25MB) - will be very slow!');
69
+ }
@@ -5,7 +5,7 @@
5
5
 
6
6
  set -e # Exit on error
7
7
 
8
- ENVIRONMENT_NAME=${1:-Releasebird-image-service-env-1}
8
+ ENVIRONMENT_NAME=${1:-Releasebird-image-service-env}
9
9
  APPLICATION_NAME="releasebird-image-service"
10
10
  REGION=${AWS_REGION:-eu-central-1}
11
11
  VERSION_LABEL="v$(date +%Y%m%d-%H%M%S)"
@@ -5,7 +5,7 @@
5
5
 
6
6
  set -e # Exit on error
7
7
 
8
- ENVIRONMENT_NAME="Releasebird-image-service-env-1"
8
+ ENVIRONMENT_NAME="Releasebird-image-service-env"
9
9
  APPLICATION_NAME="releasebird-image-service"
10
10
  REGION=${AWS_REGION:-eu-central-1}
11
11
  VERSION_LABEL="v$(date +%Y%m%d-%H%M%S)"