@tomflow/proflow-platform-cli 0.1.31 → 0.1.33

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @tomflow/proflow-platform-cli
2
2
 
3
+ ## 0.1.33
4
+
5
+ ### Patch Changes
6
+
7
+ - Keep lifecycle summary totals mutually exclusive when a no-effect external runtime is skipped.
8
+
9
+ ## 0.1.32
10
+
11
+ ### Patch Changes
12
+
13
+ - Report successful lifecycle calls with no owned stop effect as skipped instead of claiming an external runtime was stopped.
14
+
3
15
  ## 0.1.31
4
16
 
5
17
  ### Patch Changes
@@ -6,7 +6,7 @@ export declare const behaviorAdapter: {
6
6
  readonly ok: true;
7
7
  readonly status: "SUCCEEDED";
8
8
  readonly moduleRef: "platform-cli";
9
- readonly moduleVersion: "0.1.31";
9
+ readonly moduleVersion: "0.1.33";
10
10
  };
11
11
  observedEffects: never[];
12
12
  }>;
@@ -16,7 +16,7 @@ export declare const behaviorAdapter: {
16
16
  readonly ok: true;
17
17
  readonly status: "SUCCEEDED";
18
18
  readonly moduleRef: "platform-cli";
19
- readonly moduleVersion: "0.1.31";
19
+ readonly moduleVersion: "0.1.33";
20
20
  };
21
21
  observedEffects: never[];
22
22
  }>;
@@ -26,7 +26,7 @@ export declare const behaviorAdapter: {
26
26
  ok: true;
27
27
  status: "SUCCEEDED";
28
28
  moduleRef: "platform-cli";
29
- moduleVersion: "0.1.31";
29
+ moduleVersion: "0.1.33";
30
30
  data: {
31
31
  readonly setupStatus: "READY";
32
32
  readonly runtimeStatus: "NOT_APPLICABLE";
@@ -40,7 +40,7 @@ export declare const behaviorAdapter: {
40
40
  readonly ok: true;
41
41
  readonly status: "SUCCEEDED";
42
42
  readonly moduleRef: "platform-cli";
43
- readonly moduleVersion: "0.1.31";
43
+ readonly moduleVersion: "0.1.33";
44
44
  };
45
45
  observedEffects: never[];
46
46
  }>;
@@ -50,7 +50,7 @@ export declare const behaviorAdapter: {
50
50
  ok: true;
51
51
  status: "SUCCEEDED";
52
52
  moduleRef: "platform-cli";
53
- moduleVersion: "0.1.31";
53
+ moduleVersion: "0.1.33";
54
54
  data: {
55
55
  docs: string;
56
56
  };
@@ -63,7 +63,7 @@ export declare const behaviorAdapter: {
63
63
  readonly ok: true;
64
64
  readonly status: "SUCCEEDED";
65
65
  readonly moduleRef: "platform-cli";
66
- readonly moduleVersion: "0.1.31";
66
+ readonly moduleVersion: "0.1.33";
67
67
  };
68
68
  observedEffects: never[];
69
69
  }>;
@@ -73,7 +73,7 @@ export declare const behaviorAdapter: {
73
73
  readonly ok: true;
74
74
  readonly status: "SUCCEEDED";
75
75
  readonly moduleRef: "platform-cli";
76
- readonly moduleVersion: "0.1.31";
76
+ readonly moduleVersion: "0.1.33";
77
77
  };
78
78
  observedEffects: never[];
79
79
  }>;
@@ -3,7 +3,7 @@ export declare const descriptor: {
3
3
  readonly contractVersion: "1.0.0";
4
4
  readonly moduleRef: "platform-cli";
5
5
  readonly packageName: "@tomflow/proflow-platform-cli";
6
- readonly moduleVersion: "0.1.31";
6
+ readonly moduleVersion: "0.1.33";
7
7
  readonly kind: "cli";
8
8
  readonly templateVersion: "1.0.0";
9
9
  readonly platformCompatibility: ">=1.0.0 <2.0.0";
@@ -3,7 +3,7 @@ export const descriptor = {
3
3
  contractVersion: "1.0.0",
4
4
  moduleRef: "platform-cli",
5
5
  packageName: "@tomflow/proflow-platform-cli",
6
- moduleVersion: "0.1.31",
6
+ moduleVersion: "0.1.33",
7
7
  kind: "cli",
8
8
  templateVersion: "1.0.0",
9
9
  platformCompatibility: ">=1.0.0 <2.0.0",
package/dist/src/cli.js CHANGED
@@ -670,14 +670,18 @@ export function renderHumanResult(result) {
670
670
  return renderDocs(result.data);
671
671
  if ((result.command === "start" || result.command === "stop") &&
672
672
  isRecord(result.data)) {
673
- const skipped = Array.isArray(result.data.skipped)
674
- ? result.data.skipped.length
675
- : 0;
673
+ const skippedItems = Array.isArray(result.data.skipped)
674
+ ? result.data.skipped.filter(isRecord)
675
+ : [];
676
+ const skippedRefs = new Set(skippedItems.map((item) => String(item.moduleRef)));
677
+ const skipped = skippedItems.length;
676
678
  const results = Array.isArray(result.data.results)
677
679
  ? result.data.results.filter(isRecord)
678
680
  : [];
679
681
  const operations = results.filter((item) => item.command === result.command);
680
- const succeeded = operations.filter((item) => isRecord(item.result) && item.result.status === "SUCCEEDED").length;
682
+ const succeeded = operations.filter((item) => isRecord(item.result) &&
683
+ item.result.status === "SUCCEEDED" &&
684
+ !skippedRefs.has(String(item.moduleRef))).length;
681
685
  const failed = operations.find((item) => isRecord(item.result) && item.result.status !== "SUCCEEDED");
682
686
  return [
683
687
  `平台${result.command === "start" ? "启动" : "停止"}${failed ? "未完成" : "完成"}`,
@@ -17,7 +17,7 @@ export interface ModuleBatchResult {
17
17
  }>;
18
18
  skipped?: Array<{
19
19
  moduleRef: string;
20
- reason: "READY" | "RUNNING" | "STOPPED" | "NOT_APPLICABLE";
20
+ reason: "READY" | "RUNNING" | "STOPPED" | "NOT_APPLICABLE" | "NO_EFFECT";
21
21
  }>;
22
22
  }
23
23
  export declare function observeStatuses(catalog: ModuleCatalog, modules: readonly ResolvedModule[], workspaceRoot: string, reporter?: PlatformProgressReporter): Promise<ModuleDispatchResult[]>;
@@ -136,13 +136,20 @@ export async function stopModulesThin(catalog, modules, workspaceRoot, reporter)
136
136
  }
137
137
  const stopped = await dispatchModuleCommand(catalog, module, "stop", context(workspaceRoot));
138
138
  results.push(stopped);
139
+ const noOwnedEffect = succeeded(stopped.result) && stopped.observedEffects.length === 0;
140
+ if (noOwnedEffect)
141
+ skipped.push({ moduleRef: module.moduleRef, reason: "NO_EFFECT" });
139
142
  reportProgress(reporter, {
140
143
  command: "stop",
141
144
  phase: "stop",
142
145
  current: index + 1,
143
146
  total: modulesInOrder.length,
144
147
  moduleRef: module.moduleRef,
145
- status: succeeded(stopped.result) ? "SUCCEEDED" : "FAILED",
148
+ status: noOwnedEffect
149
+ ? "SKIPPED"
150
+ : succeeded(stopped.result)
151
+ ? "SUCCEEDED"
152
+ : "FAILED",
146
153
  message: `${module.moduleRef}`,
147
154
  });
148
155
  if (!succeeded(stopped.result))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/proflow-platform-cli",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,8 +27,8 @@
27
27
  "@tomflow/proflow-module-contract": "^0.1.10"
28
28
  },
29
29
  "devDependencies": {
30
- "@tomflow/proflow-deployment-conformance": "^0.1.8",
31
- "@tomflow/proflow-module-template": "^0.1.8"
30
+ "@tomflow/proflow-module-template": "^0.1.8",
31
+ "@tomflow/proflow-deployment-conformance": "^0.1.8"
32
32
  },
33
33
  "description": "Thin Platform CLI for Module discovery, documentation, package synchronization and lifecycle orchestration.",
34
34
  "keywords": [
@@ -3,7 +3,7 @@
3
3
  "contractVersion": "1.0.0",
4
4
  "moduleRef": "platform-cli",
5
5
  "packageName": "@tomflow/proflow-platform-cli",
6
- "moduleVersion": "0.1.31",
6
+ "moduleVersion": "0.1.33",
7
7
  "kind": "cli",
8
8
  "templateVersion": "1.0.0",
9
9
  "platformCompatibility": ">=1.0.0 <2.0.0",