pi-runline 0.7.1 → 0.7.2
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.
|
@@ -51,12 +51,6 @@ function connectionFor(
|
|
|
51
51
|
return connections.find((c) => c.plugin === plugin);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
function isSchemaEmpty(
|
|
55
|
-
schema: PluginSummary["connectionConfigSchema"],
|
|
56
|
-
): boolean {
|
|
57
|
-
return !schema || Object.keys(schema).length === 0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
54
|
function envOrSchemaDefault(field: ConnectionSchemaField): string | undefined {
|
|
61
55
|
if (field.env && process.env[field.env]) return process.env[field.env];
|
|
62
56
|
if (field.default !== undefined) return String(field.default);
|
|
@@ -87,15 +81,13 @@ export async function promptForCredentials(
|
|
|
87
81
|
if (!plugin) continue;
|
|
88
82
|
|
|
89
83
|
const schema = plugin.connectionConfigSchema;
|
|
90
|
-
if (
|
|
84
|
+
if (!schema || Object.keys(schema).length === 0) continue; // no creds needed
|
|
91
85
|
|
|
92
86
|
if (!force && connectionFor(connections, name)) continue; // already configured
|
|
93
87
|
|
|
94
88
|
// Check env — if every required field has an env var set, skip the prompt.
|
|
95
89
|
// Skipped on `force` (the user explicitly asked to re-enter values).
|
|
96
|
-
const requiredFields = Object.entries(schema
|
|
97
|
-
([, f]) => f.required,
|
|
98
|
-
);
|
|
90
|
+
const requiredFields = Object.entries(schema).filter(([, f]) => f.required);
|
|
99
91
|
const allFromEnv = requiredFields.every(
|
|
100
92
|
([, f]) => f.env && process.env[f.env],
|
|
101
93
|
);
|
|
@@ -109,7 +101,7 @@ export async function promptForCredentials(
|
|
|
109
101
|
|
|
110
102
|
const values: Record<string, unknown> = {};
|
|
111
103
|
let cancelled = false;
|
|
112
|
-
for (const [key, field] of Object.entries(schema
|
|
104
|
+
for (const [key, field] of Object.entries(schema)) {
|
|
113
105
|
const placeholder = field.env
|
|
114
106
|
? `${field.description ?? key} (env: ${field.env})`
|
|
115
107
|
: (field.description ?? key);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-runline",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Code mode for pi",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"keywords": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"lint:fix": "biome check --write extensions/"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"runline": "^0.7.
|
|
25
|
+
"runline": "^0.7.2"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@mariozechner/pi-coding-agent": "*",
|