@oussema_mili/test-pkg-123 1.1.33 → 1.1.35

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.
@@ -772,19 +772,10 @@ async function transformFenwaveApp(fenwaveApp) {
772
772
  const componentTypes = nodes.map((n) => n?.data?.type).filter(Boolean);
773
773
  const language = componentTypes[0] || "Unknown";
774
774
 
775
- // Check if THIS specific version is the one currently running locally
775
+ // Check if THIS specific version is the one running (or: that has ran) locally
776
776
  const isThisVersionRunning =
777
777
  runningVersion && version.version === runningVersion;
778
-
779
- // Check if THIS specific version has EVER been run locally
780
- // A version has been run if:
781
- // 1. It's currently running (has containers), OR
782
- // 2. It has a registered workspace (was run at some point in the past)
783
- const versionKey = version.version || "1.0.0";
784
- const registeredWorkspace = getRegisteredWorkspace(fwId, versionKey);
785
- const hasBeenRunBefore = !!registeredWorkspace;
786
- const versionHasRun =
787
- (isThisVersionRunning && containerCount > 0) || hasBeenRunBefore;
778
+ const versionHasRun = isThisVersionRunning && containerCount > 0;
788
779
 
789
780
  return {
790
781
  id: version.id,
@@ -798,18 +789,12 @@ async function transformFenwaveApp(fenwaveApp) {
798
789
  language: language,
799
790
  created_at: version.created_at,
800
791
  created_by: version.created_by,
801
- // Mark if THIS SPECIFIC version has ran locally (currently or in the past)
792
+ // Mark if THIS SPECIFIC version has ran locally
802
793
  hasRanLocally: versionHasRun,
803
- containers: isThisVersionRunning ? containerCount : 0,
804
- firstRun: versionHasRun
805
- ? isThisVersionRunning
806
- ? firstRunTime
807
- : registeredWorkspace?.registeredAt
808
- ? "Previously"
809
- : "Never"
810
- : "Never",
811
- lastRun: isThisVersionRunning ? lastRunTime : versionHasRun ? "Previously" : "Never",
812
- appStatus: isThisVersionRunning ? appStatus : "stopped",
794
+ containers: versionHasRun ? containerCount : 0,
795
+ firstRun: versionHasRun ? firstRunTime : "Never",
796
+ lastRun: versionHasRun ? lastRunTime : "Never",
797
+ appStatus: versionHasRun ? appStatus : "stopped",
813
798
  };
814
799
  });
815
800
 
@@ -1101,24 +1086,15 @@ async function handleFetchAppVersions(ws, payload) {
1101
1086
  const versions = rawVersions.map((version) => {
1102
1087
  const isThisVersionRunning =
1103
1088
  runningVersion && version.version === runningVersion;
1104
-
1105
- // Check if THIS specific version has EVER been run locally
1106
- // A version has been run if:
1107
- // 1. It's currently running (has containers), OR
1108
- // 2. It has a registered workspace (was run at some point in the past)
1109
- const versionKey = version.version || "1.0.0";
1110
- const registeredWorkspace = getRegisteredWorkspace(fwId, versionKey);
1111
- const hasBeenRunBefore = !!registeredWorkspace;
1112
- const versionHasRun =
1113
- (isThisVersionRunning && containers.length > 0) || hasBeenRunBefore;
1089
+ const versionHasRun = isThisVersionRunning && containers.length > 0;
1114
1090
 
1115
1091
  return {
1116
1092
  ...version,
1117
1093
  hasRanLocally: versionHasRun,
1118
- containers: isThisVersionRunning ? containers.length : 0,
1119
- firstRun: versionHasRun ? (isThisVersionRunning ? "Yes" : "Previously") : "Never",
1120
- lastRun: versionHasRun ? (isThisVersionRunning ? "Yes" : "Previously") : "Never",
1121
- appStatus: isThisVersionRunning
1094
+ containers: versionHasRun ? containers.length : 0,
1095
+ firstRun: versionHasRun ? "Yes" : "Never",
1096
+ lastRun: versionHasRun ? "Yes" : "Never",
1097
+ appStatus: versionHasRun
1122
1098
  ? containers.some((c) => c.State === "running")
1123
1099
  ? "running"
1124
1100
  : "stopped"
@@ -3934,4 +3910,4 @@ async function handleChangeVersion(ws, payload = {}) {
3934
3910
 
3935
3911
  export default { handleAppAction, checkAppHasBeenRun };
3936
3912
 
3937
- export { handleAppAction, checkAppHasBeenRun };
3913
+ export { handleAppAction, checkAppHasBeenRun };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oussema_mili/test-pkg-123",
3
- "version": "1.1.33",
3
+ "version": "1.1.35",
4
4
  "description": "Fenwave Docker Agent and CLI",
5
5
  "keywords": [
6
6
  "fenwave",