@oussema_mili/test-pkg-123 1.1.30 → 1.1.31

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.

Potentially problematic release.


This version of @oussema_mili/test-pkg-123 might be problematic. Click here for more details.

@@ -278,33 +278,13 @@ function filterContainersByApp(containers, fwId, isDraft, appVersion) {
278
278
  * Filter containers for any version of a published app (ignores version label)
279
279
  * @param {Array} containers - List of Docker containers
280
280
  * @param {string} fwId - The Fenwave entity ID
281
- * @param {string} appName - The normalized app name (optional fallback)
282
281
  * @returns {Array} - Filtered containers belonging to this app (any version)
283
282
  */
284
- function filterContainersAnyVersion(containers, fwId, appName = null) {
283
+ function filterContainersAnyVersion(containers, fwId) {
285
284
  return containers.filter((container) => {
286
285
  const containerFwId = container.Labels["app.fwId"];
287
286
  const containerIsDraft = container.Labels["app.isDraft"];
288
-
289
- // Primary match: by fwId label
290
- if (containerFwId === fwId && containerIsDraft !== "true") {
291
- return true;
292
- }
293
-
294
- // Fallback match: by docker-compose project name (for legacy containers without fwId label)
295
- if (appName && !containerFwId) {
296
- const projectLabel = container.Labels["com.docker.compose.project"];
297
- const containerName = container.Names[0]?.replace(/^\//, "") || "";
298
-
299
- // Match by project label or container name prefix
300
- if (projectLabel === appName ||
301
- projectLabel?.startsWith(`${appName}-`) ||
302
- containerName.startsWith(`${appName}-`)) {
303
- return containerIsDraft !== "true";
304
- }
305
- }
306
-
307
- return false;
287
+ return containerFwId === fwId && containerIsDraft !== "true";
308
288
  });
309
289
  }
310
290
 
@@ -701,8 +681,7 @@ async function transformFenwaveApp(fenwaveApp) {
701
681
  );
702
682
  } else {
703
683
  // For published apps, filter by fwId only, not by version (use shared helper)
704
- // Also pass app name as fallback for legacy containers
705
- appContainers = filterContainersAnyVersion(allContainers, fwId, appName);
684
+ appContainers = filterContainersAnyVersion(allContainers, fwId);
706
685
  }
707
686
 
708
687
  // Try to determine the running version from container labels (deterministically)
@@ -794,17 +773,9 @@ async function transformFenwaveApp(fenwaveApp) {
794
773
  const language = componentTypes[0] || "Unknown";
795
774
 
796
775
  // Check if THIS specific version is the one running (or: that has ran) locally
797
- // Case 1: Container has app.version label that matches this version
798
776
  const isThisVersionRunning =
799
777
  runningVersion && version.version === runningVersion;
800
-
801
- // Case 2: Containers exist but no version label - fall back to the latest published version
802
- // This handles legacy containers created before version labels were added
803
- const isLatestPublished = version.status === "published" &&
804
- allVersions.filter(v => v.status === "published").indexOf(version) === 0;
805
- const fallbackToLatest = containerCount > 0 && !runningVersion && isLatestPublished;
806
-
807
- const versionHasRun = (isThisVersionRunning || fallbackToLatest) && containerCount > 0;
778
+ const versionHasRun = isThisVersionRunning && containerCount > 0;
808
779
 
809
780
  return {
810
781
  id: version.id,
package/index.html CHANGED
@@ -23,7 +23,7 @@
23
23
  if (wsToken) {
24
24
  localStorage.setItem("fenwave-ws-token", wsToken);
25
25
  localStorage.setItem("fenwave-ws-port", wsPort || "3001");
26
- localStorage.setItem("fenwave-container-port", containerPort || "3006");
26
+ localStorage.setItem("fenwave-container-port", containerPort || "3003");
27
27
  }
28
28
  </script>
29
29
  <style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oussema_mili/test-pkg-123",
3
- "version": "1.1.30",
3
+ "version": "1.1.31",
4
4
  "description": "Fenwave Docker Agent and CLI",
5
5
  "keywords": [
6
6
  "fenwave",