go-duck-cli 1.4.6 → 1.4.8

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.
@@ -130,7 +130,7 @@ type StatusStats struct {
130
130
  }
131
131
 
132
132
  type AppMetrics struct {
133
- mu sync.RWMutex
133
+ Mu sync.RWMutex
134
134
  StartTime time.Time
135
135
  Endpoints map[string]*EndpointStats
136
136
  StatusCodes map[int]*StatusStats
@@ -157,8 +157,8 @@ func MetricsTrackingMiddleware(cfg *config.Config) gin.HandlerFunc {
157
157
  }
158
158
  endpointKey := method + " " + path
159
159
 
160
- globalMetrics.mu.Lock()
161
- defer globalMetrics.mu.Unlock()
160
+ globalMetrics.Mu.Lock()
161
+ defer globalMetrics.Mu.Unlock()
162
162
 
163
163
  // Status Code tracking
164
164
  if _, exists := globalMetrics.StatusCodes[status]; !exists {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "go-duck-cli",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "The Ultimate Evolutionary Go Microservice Scaffolder.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -185,8 +185,8 @@ func SetupRouter(appConfig *config.Config) *gin.Engine {
185
185
  sysMetrics := telemetry.CollectSystemMetrics()
186
186
  appMetrics := telemetry.GetGlobalMetrics()
187
187
 
188
- appMetrics.mu.RLock()
189
- defer appMetrics.mu.RUnlock()
188
+ appMetrics.Mu.RLock()
189
+ defer appMetrics.Mu.RUnlock()
190
190
 
191
191
  c.JSON(http.StatusOK, gin.H{
192
192
  "system": sysMetrics,
@@ -1053,14 +1053,14 @@ func SetupRouter(appConfig *config.Config) *gin.Engine {
1053
1053
  .replace(/([{}[\]:,])/g, '<span class="syntax-punct">$1</span>');
1054
1054
 
1055
1055
  // Inject buttons next to topics (Only if authenticated)
1056
- highlighted = highlighted.replace(/"([^"]+)"(<span class="syntax-punct">.*?<\\/span>)/g, (match, topic, punct) => {
1056
+ highlighted = highlighted.replace(/"([^"]+)"(<span class="syntax-punct">.*?<\/span>)/g, (match, topic, punct) => {
1057
1057
  if (topic.includes('/')) {
1058
1058
  let btnHtml = "";
1059
1059
  if (keycloak && keycloak.authenticated) {
1060
1060
  const isSend = /patch|put|post|create|update/i.test(topic);
1061
1061
  const btnLabel = isSend ? "SEND" : "SUBSCRIBE";
1062
1062
  const btnColor = isSend ? "#e74c3c" : "#3498db";
1063
- btnHtml = ' <button class="mqtt-action-btn" style="background:' + btnColor + '" onclick="openMqttAction(\\'' + topic + '\\', \\'' + btnLabel + '\\')">' + btnLabel + '</button>';
1063
+ btnHtml = " <button class=\"mqtt-action-btn\" style=\"background:" + btnColor + "\" onclick=\"openMqttAction('" + topic + "', '" + btnLabel + "')\">" + btnLabel + "</button>";
1064
1064
  }
1065
1065
  return '"' + topic + '"' + punct + btnHtml;
1066
1066
  }