@tomflow/proflow-platform-cli 0.1.6 → 0.1.7
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 +6 -0
- package/dist/deployment/adapter.d.ts +5 -5
- package/dist/deployment/descriptor.d.ts +1 -1
- package/dist/deployment/descriptor.js +1 -1
- package/dist/src/apply/current.d.ts +2 -1
- package/dist/src/apply/current.js +10 -2
- package/dist/src/cli.js +2 -2
- package/package.json +1 -1
- package/proflow.module.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @tomflow/proflow-platform-cli
|
|
2
2
|
|
|
3
|
+
## 0.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Rebuild upgrade apply staleness from the current persisted Workspace configuration so unchanged config remains fresh while configuration drift becomes PLAN_STALE instead of being misreported as missing required config.
|
|
8
|
+
|
|
3
9
|
## 0.1.6
|
|
4
10
|
|
|
5
11
|
### 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.
|
|
8
|
+
moduleVersion: "0.1.7";
|
|
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.
|
|
19
|
+
moduleVersion: "0.1.7";
|
|
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.
|
|
30
|
+
moduleVersion: "0.1.7";
|
|
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.
|
|
41
|
+
moduleVersion: "0.1.7";
|
|
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.
|
|
52
|
+
moduleVersion: "0.1.7";
|
|
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.
|
|
6
|
+
readonly moduleVersion: "0.1.7";
|
|
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.
|
|
6
|
+
moduleVersion: "0.1.7",
|
|
7
7
|
kind: "cli",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DeploymentPlan } from "../contracts.ts";
|
|
2
2
|
import type { ModuleCatalog } from "../modules.ts";
|
|
3
|
+
import type { WorkspacePaths } from "../paths.ts";
|
|
3
4
|
import type { PlanInput } from "../planner/plan.ts";
|
|
4
|
-
export declare function rebuildCurrentAssumptions(catalog: ModuleCatalog, plan: DeploymentPlan): Promise<PlanInput>;
|
|
5
|
+
export declare function rebuildCurrentAssumptions(catalog: ModuleCatalog, plan: DeploymentPlan, paths: WorkspacePaths): Promise<PlanInput>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { parseModuleDescriptor, } from "@tomflow/proflow-module-contract";
|
|
2
2
|
import { discoverModules } from "../discovery/index.js";
|
|
3
3
|
import { doctorModules } from "../doctor/index.js";
|
|
4
|
+
import { mergeEffectiveConfig } from "../persistence/effective-config.js";
|
|
4
5
|
import { diagnoseRepair } from "../planner/repair.js";
|
|
5
6
|
function moduleSourceOf(module) {
|
|
6
7
|
if (module.source.type === "registry") {
|
|
@@ -27,7 +28,7 @@ async function loadDescriptors(catalog, modules) {
|
|
|
27
28
|
// are re-discovered and re-parsed so descriptor drift reaches the staleness
|
|
28
29
|
// gate. Upgrade additionally re-discovers current descriptors and reuses the
|
|
29
30
|
// plan's frozen target descriptors; repair re-runs doctor for fresh facts.
|
|
30
|
-
export async function rebuildCurrentAssumptions(catalog, plan) {
|
|
31
|
+
export async function rebuildCurrentAssumptions(catalog, plan, paths) {
|
|
31
32
|
if ((plan.intent === "install" || plan.intent === "upgrade") &&
|
|
32
33
|
plan.resolvedModules.every((module) => module.source.type === "registry")) {
|
|
33
34
|
return {
|
|
@@ -46,12 +47,19 @@ export async function rebuildCurrentAssumptions(catalog, plan) {
|
|
|
46
47
|
}
|
|
47
48
|
if (plan.intent === "upgrade") {
|
|
48
49
|
const currentDescriptors = await loadDescriptors(catalog, modules);
|
|
50
|
+
const config = await mergeEffectiveConfig(paths, modules, {});
|
|
49
51
|
if (plan.targetDescriptors === undefined)
|
|
50
|
-
return {
|
|
52
|
+
return {
|
|
53
|
+
intent: plan.intent,
|
|
54
|
+
modules,
|
|
55
|
+
targets: plan.moduleTargets,
|
|
56
|
+
config,
|
|
57
|
+
};
|
|
51
58
|
return {
|
|
52
59
|
intent: plan.intent,
|
|
53
60
|
modules,
|
|
54
61
|
targets: plan.moduleTargets,
|
|
62
|
+
config,
|
|
55
63
|
currentDescriptors,
|
|
56
64
|
targetDescriptors: plan.targetDescriptors,
|
|
57
65
|
};
|
package/dist/src/cli.js
CHANGED
|
@@ -483,7 +483,7 @@ async function handleApply(ctx, args) {
|
|
|
483
483
|
if (plan === undefined) {
|
|
484
484
|
throw new PlatformError("PLAN_NOT_FOUND", `plan ${planRef} not found`);
|
|
485
485
|
}
|
|
486
|
-
const current = await rebuildCurrentAssumptions(ctx.catalog, plan);
|
|
486
|
+
const current = await rebuildCurrentAssumptions(ctx.catalog, plan, ctx.paths);
|
|
487
487
|
const result = await applyPlan({
|
|
488
488
|
paths: ctx.paths,
|
|
489
489
|
planRef,
|
|
@@ -825,7 +825,7 @@ async function handlePlatformInstanceUninstall(args, runtime) {
|
|
|
825
825
|
uninstallScope: "platform-instance",
|
|
826
826
|
});
|
|
827
827
|
await savePlan(ctx.paths, plan);
|
|
828
|
-
const current = await rebuildCurrentAssumptions(ctx.catalog, plan);
|
|
828
|
+
const current = await rebuildCurrentAssumptions(ctx.catalog, plan, ctx.paths);
|
|
829
829
|
const applied = await applyPlan({
|
|
830
830
|
paths: ctx.paths,
|
|
831
831
|
planRef: plan.planRef,
|
package/package.json
CHANGED
package/proflow.module.json
CHANGED