@tomflow/proflow-platform-cli 0.1.4 → 0.1.6

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.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Carry persisted workspace configuration into Registry-backed upgrade planning, with explicit --config values overlaying stored values, so newly published descriptors cannot falsely report existing required configuration as missing before package mutation.
8
+
9
+ ## 0.1.5
10
+
11
+ ### Patch Changes
12
+
13
+ - Preserve module-provided ACTION_REQUIRED descriptions in startup preflight findings so missing Role readiness tells the user the missing registration fact, next action, and revalidation command.
14
+
3
15
  ## 0.1.4
4
16
 
5
17
  ### Patch Changes
@@ -5,7 +5,7 @@ export declare const behaviorAdapter: {
5
5
  ok: boolean;
6
6
  status: "SUCCEEDED";
7
7
  moduleRef: "platform-cli";
8
- moduleVersion: "0.1.4";
8
+ moduleVersion: "0.1.6";
9
9
  data?: {} | null;
10
10
  };
11
11
  observedEffects: never[];
@@ -16,7 +16,7 @@ export declare const behaviorAdapter: {
16
16
  ok: boolean;
17
17
  status: "SUCCEEDED";
18
18
  moduleRef: "platform-cli";
19
- moduleVersion: "0.1.4";
19
+ moduleVersion: "0.1.6";
20
20
  data?: {} | null;
21
21
  };
22
22
  observedEffects: never[];
@@ -27,7 +27,7 @@ export declare const behaviorAdapter: {
27
27
  ok: boolean;
28
28
  status: "SUCCEEDED";
29
29
  moduleRef: "platform-cli";
30
- moduleVersion: "0.1.4";
30
+ moduleVersion: "0.1.6";
31
31
  data?: {} | null;
32
32
  };
33
33
  observedEffects: never[];
@@ -38,7 +38,7 @@ export declare const behaviorAdapter: {
38
38
  ok: boolean;
39
39
  status: "SUCCEEDED";
40
40
  moduleRef: "platform-cli";
41
- moduleVersion: "0.1.4";
41
+ moduleVersion: "0.1.6";
42
42
  data?: {} | null;
43
43
  };
44
44
  observedEffects: never[];
@@ -49,7 +49,7 @@ export declare const behaviorAdapter: {
49
49
  ok: boolean;
50
50
  status: "SUCCEEDED";
51
51
  moduleRef: "platform-cli";
52
- moduleVersion: "0.1.4";
52
+ moduleVersion: "0.1.6";
53
53
  data?: {} | null;
54
54
  };
55
55
  observedEffects: never[];
@@ -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.4";
6
+ readonly moduleVersion: "0.1.6";
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.4",
6
+ moduleVersion: "0.1.6",
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
@@ -20,6 +20,7 @@ import { buildManifest } from "./manifest/manifest.js";
20
20
  import { writeDeploymentObserverSummary } from "./observer/deployment-summary.js";
21
21
  import { workspacePaths } from "./paths.js";
22
22
  import { loadConfig } from "./persistence/config.js";
23
+ import { mergeEffectiveConfig } from "./persistence/effective-config.js";
23
24
  import { loadPlan, savePlan } from "./persistence/plans.js";
24
25
  import { planDeployment } from "./planner/plan.js";
25
26
  import { diagnoseRepair } from "./planner/repair.js";
@@ -309,30 +310,13 @@ async function handleInstallerPreflight(root) {
309
310
  : "BLOCKED";
310
311
  return outcome("preflight", status, result);
311
312
  }
312
- async function loadEffectiveConfig(ctx, modules, configFile) {
313
- const effective = {};
314
- for (const module of modules) {
315
- const stored = await loadConfig(ctx.paths, module.moduleRef);
316
- if (stored === undefined)
317
- continue;
318
- effective[module.moduleRef] = {
319
- ...stored.publicValues,
320
- ...stored.secretValues,
321
- };
322
- }
323
- const provided = await loadConfigFile(configFile);
324
- for (const [moduleRef, values] of Object.entries(provided)) {
325
- effective[moduleRef] = {
326
- ...(effective[moduleRef] ?? {}),
327
- ...values,
328
- };
329
- }
330
- return effective;
313
+ async function loadEffectiveConfig(paths, modules, configFile) {
314
+ return mergeEffectiveConfig(paths, modules, await loadConfigFile(configFile));
331
315
  }
332
316
  async function handlePreflight(ctx, args) {
333
317
  const modules = await discoverModules({ catalog: ctx.catalog });
334
318
  const selected = selectModules(modules, args.positional[0]);
335
- const config = await loadEffectiveConfig(ctx, selected, args.configFile);
319
+ const config = await loadEffectiveConfig(ctx.paths, selected, args.configFile);
336
320
  const result = await runPreflight(selected, {
337
321
  config,
338
322
  catalog: ctx.catalog,
@@ -381,7 +365,9 @@ async function handlePlan(ctx, args) {
381
365
  }
382
366
  const modules = await discoverModules({ catalog: ctx.catalog });
383
367
  const selected = selectModules(modules, args.positional[0]);
384
- const config = await loadConfigFile(args.configFile);
368
+ const config = args.intent === "upgrade"
369
+ ? await loadEffectiveConfig(ctx.paths, selected, args.configFile)
370
+ : await loadConfigFile(args.configFile);
385
371
  if (intent === "uninstall") {
386
372
  if (args.positional[0] === undefined) {
387
373
  throw new PlatformError("INVALID_REQUEST", "uninstall plan requires <moduleRef|packageName>");
@@ -959,7 +945,7 @@ async function handleDoctor(ctx, args) {
959
945
  async function handleManifest(ctx, args) {
960
946
  const modules = await discoverModules({ catalog: ctx.catalog });
961
947
  const selected = selectModules(modules, args.positional[0]);
962
- const config = await loadEffectiveConfig(ctx, selected, args.configFile);
948
+ const config = await loadEffectiveConfig(ctx.paths, selected, args.configFile);
963
949
  const manifest = await buildManifest({
964
950
  catalog: ctx.catalog,
965
951
  modules: selected,
@@ -0,0 +1,3 @@
1
+ import type { ResolvedModule } from "../contracts.ts";
2
+ import type { WorkspacePaths } from "../paths.ts";
3
+ export declare function mergeEffectiveConfig(paths: WorkspacePaths, modules: readonly ResolvedModule[], provided: Record<string, Record<string, string>>): Promise<Record<string, Record<string, string>>>;
@@ -0,0 +1,20 @@
1
+ import { loadConfig } from "./config.js";
2
+ export async function mergeEffectiveConfig(paths, modules, provided) {
3
+ const effective = {};
4
+ for (const module of modules) {
5
+ const stored = await loadConfig(paths, module.moduleRef);
6
+ if (stored === undefined)
7
+ continue;
8
+ effective[module.moduleRef] = {
9
+ ...stored.publicValues,
10
+ ...stored.secretValues,
11
+ };
12
+ }
13
+ for (const [moduleRef, values] of Object.entries(provided)) {
14
+ effective[moduleRef] = {
15
+ ...(effective[moduleRef] ?? {}),
16
+ ...values,
17
+ };
18
+ }
19
+ return effective;
20
+ }
@@ -119,7 +119,7 @@ function modulePreflightMessage(moduleRef, result) {
119
119
  case "ACTION_REQUIRED": {
120
120
  const action = result.actionRequired;
121
121
  return action !== undefined
122
- ? `module ${moduleRef} preflight requires action "${action.action}"`
122
+ ? `module ${moduleRef} preflight requires action "${action.action}": ${action.description}`
123
123
  : `module ${moduleRef} preflight requires an unspecified human action`;
124
124
  }
125
125
  case "BLOCKED":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/proflow-platform-cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -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.4",
6
+ "moduleVersion": "0.1.6",
7
7
  "kind": "cli",
8
8
  "templateVersion": "1.0.0",
9
9
  "platformCompatibility": ">=1.0.0 <2.0.0",