@tomflow/proflow-platform-cli 0.1.9 → 0.1.11
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 +12 -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/driver.js +1 -1
- package/dist/src/persistence/config.d.ts +1 -1
- package/dist/src/persistence/config.js +30 -5
- package/package.json +3 -3
- package/proflow.module.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tomflow/proflow-platform-cli
|
|
2
2
|
|
|
3
|
+
## 0.1.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Use pnpm's global config form to disable scripts during package removal so Workspace uninstall works on pnpm 11.
|
|
8
|
+
|
|
9
|
+
## 0.1.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fail closed on malformed persisted module config instead of treating it as missing configuration.
|
|
14
|
+
|
|
3
15
|
## 0.1.9
|
|
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.
|
|
8
|
+
moduleVersion: "0.1.11";
|
|
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.11";
|
|
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.11";
|
|
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.11";
|
|
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.11";
|
|
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.11";
|
|
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.11",
|
|
7
7
|
kind: "cli",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
package/dist/src/apply/driver.js
CHANGED
|
@@ -51,7 +51,7 @@ async function mutatePackage(runner, manager, workspaceRoot, operation, packageS
|
|
|
51
51
|
async function packageManagerArgs(runner, manager, workspaceRoot, operation, packageSpec) {
|
|
52
52
|
if (manager.name === "pnpm") {
|
|
53
53
|
return operation === "remove"
|
|
54
|
-
? ["
|
|
54
|
+
? ["--config.ignore-scripts=true", "remove", packageSpec]
|
|
55
55
|
: ["add", "--save-exact", "--ignore-scripts", packageSpec];
|
|
56
56
|
}
|
|
57
57
|
if (manager.name === "npm") {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
1
2
|
import { join } from "node:path";
|
|
2
|
-
import {
|
|
3
|
+
import { PlatformError } from "../errors.js";
|
|
3
4
|
import { writeJsonAtomic } from "./atomic.js";
|
|
4
5
|
import { assertSafeFileName } from "./guards.js";
|
|
5
6
|
function configFilePath(paths, moduleRef) {
|
|
@@ -16,6 +17,32 @@ function isStringMap(value) {
|
|
|
16
17
|
}
|
|
17
18
|
return Object.values(value).every((item) => typeof item === "string");
|
|
18
19
|
}
|
|
20
|
+
function isMissingFile(error) {
|
|
21
|
+
return (typeof error === "object" &&
|
|
22
|
+
error !== null &&
|
|
23
|
+
"code" in error &&
|
|
24
|
+
error.code === "ENOENT");
|
|
25
|
+
}
|
|
26
|
+
async function readConfigValues(file, moduleRef, kind) {
|
|
27
|
+
let raw;
|
|
28
|
+
try {
|
|
29
|
+
raw = await readFile(file, "utf8");
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (isMissingFile(error))
|
|
33
|
+
return undefined;
|
|
34
|
+
throw new PlatformError("CONFIG_INVALID", `cannot read ${kind} config for ${moduleRef}: ${error instanceof Error ? error.message : String(error)}`);
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
const parsed = JSON.parse(raw);
|
|
38
|
+
if (!isStringMap(parsed))
|
|
39
|
+
throw new TypeError("expected a JSON object whose values are strings");
|
|
40
|
+
return parsed;
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
throw new PlatformError("CONFIG_INVALID", `${kind} config for ${moduleRef} is invalid JSON/config: ${error instanceof Error ? error.message : String(error)}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
19
46
|
// secretRef config values are opaque reference identities (e.g.
|
|
20
47
|
// `secret://model-provider/default`), not raw secrets, so they materialize to
|
|
21
48
|
// the public config file verbatim. A raw secret would go to the separate 0o600
|
|
@@ -30,10 +57,8 @@ export async function materializeConfig(paths, config) {
|
|
|
30
57
|
await writeJsonAtomic(secretsFilePath(paths, config.moduleRef), {}, 0o600);
|
|
31
58
|
}
|
|
32
59
|
export async function loadConfig(paths, moduleRef) {
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const publicValues = isStringMap(publicRaw) ? publicRaw : undefined;
|
|
36
|
-
const secretValues = isStringMap(secretRaw) ? secretRaw : undefined;
|
|
60
|
+
const publicValues = await readConfigValues(configFilePath(paths, moduleRef), moduleRef, "public");
|
|
61
|
+
const secretValues = await readConfigValues(secretsFilePath(paths, moduleRef), moduleRef, "secret");
|
|
37
62
|
if (publicValues === undefined && secretValues === undefined)
|
|
38
63
|
return undefined;
|
|
39
64
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomflow/proflow-platform-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@tomflow/proflow-module-contract": "^0.1.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@tomflow/proflow-
|
|
28
|
-
"@tomflow/proflow-
|
|
27
|
+
"@tomflow/proflow-deployment-conformance": "^0.1.2",
|
|
28
|
+
"@tomflow/proflow-module-template": "^0.1.2"
|
|
29
29
|
},
|
|
30
30
|
"description": "Deterministic platform-level deployment discovery, planning, lifecycle and verification CLI.",
|
|
31
31
|
"keywords": [
|
package/proflow.module.json
CHANGED