@khotan/cli 0.5.0 → 0.6.0
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/dist/khotan.js +38 -12
- package/package.json +1 -1
package/dist/khotan.js
CHANGED
|
@@ -19,7 +19,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
19
19
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
20
|
|
|
21
21
|
// ../khotan-core/src/version.ts
|
|
22
|
-
var CATALOG_SCHEMA_VERSION = 1, CATALOG_VERSION = "2026-06-23", KHOTAN_ADAPTER_NAME = "khotan", KHOTAN_ADAPTER_VERSION = "0.
|
|
22
|
+
var CATALOG_SCHEMA_VERSION = 1, CATALOG_VERSION = "2026-06-23", KHOTAN_ADAPTER_NAME = "khotan", KHOTAN_ADAPTER_VERSION = "0.6.0", SUPPORTED_CATALOG_SCHEMA_VERSIONS;
|
|
23
23
|
var init_version = __esm(() => {
|
|
24
24
|
SUPPORTED_CATALOG_SCHEMA_VERSIONS = [
|
|
25
25
|
CATALOG_SCHEMA_VERSION
|
|
@@ -115,6 +115,12 @@ function platformDomain(config) {
|
|
|
115
115
|
const idArg = idField(resourceParam, `The ${noun} id.`);
|
|
116
116
|
const cap = domain;
|
|
117
117
|
const a = article(noun);
|
|
118
|
+
const envWriteTargetField = {
|
|
119
|
+
name: "target",
|
|
120
|
+
location: "body",
|
|
121
|
+
type: "string[]",
|
|
122
|
+
description: "Environments to write, any of: production, preview, development (comma-separated or repeatable). Omit to write all environments."
|
|
123
|
+
};
|
|
118
124
|
const tool = (suffix) => `khotan_${domain}_${suffix}`;
|
|
119
125
|
const operations = [
|
|
120
126
|
{
|
|
@@ -220,14 +226,15 @@ function platformDomain(config) {
|
|
|
220
226
|
safety: "write",
|
|
221
227
|
auth: true,
|
|
222
228
|
title: `Bulk upsert ${noun} environment variables`,
|
|
223
|
-
description: `Create or update many env vars in one request.`,
|
|
229
|
+
description: `Create or update many env vars in one request. Writes every environment unless you pass target.`,
|
|
224
230
|
input: [
|
|
225
231
|
idArg,
|
|
226
|
-
{ name: "variables", location: "body", type: "json", required: true, description: "Array of { key, value } to upsert." }
|
|
232
|
+
{ name: "variables", location: "body", type: "json", required: true, description: "Array of { key, value } to upsert." },
|
|
233
|
+
envWriteTargetField
|
|
227
234
|
],
|
|
228
235
|
http: { method: "POST", path: `${base}/{${resourceParam}}/env`, operationId: operationIds.envBulkSet, bodyMode: "json" },
|
|
229
236
|
cli: { command: [domain, "env", "bulk-set"], summary: "Bulk upsert env vars" },
|
|
230
|
-
mcp: { tool: { name: tool("env_bulk_set"), title: "Bulk upsert env vars", description: "Create or update many env vars in one request." } }
|
|
237
|
+
mcp: { tool: { name: tool("env_bulk_set"), title: "Bulk upsert env vars", description: "Create or update many env vars in one request. Writes every environment unless target is provided." } }
|
|
231
238
|
},
|
|
232
239
|
{
|
|
233
240
|
id: `${cap}.env.reveal`,
|
|
@@ -236,8 +243,17 @@ function platformDomain(config) {
|
|
|
236
243
|
safety: "secret",
|
|
237
244
|
auth: true,
|
|
238
245
|
title: `Reveal one ${noun} environment variable value`,
|
|
239
|
-
description: `Reveal a single decrypted env var value. Secret-bearing; explicit-only.`,
|
|
240
|
-
input: [
|
|
246
|
+
description: `Reveal a single decrypted env var value for one environment. Secret-bearing; explicit-only.`,
|
|
247
|
+
input: [
|
|
248
|
+
idArg,
|
|
249
|
+
idField("key", "The env var key to reveal."),
|
|
250
|
+
{
|
|
251
|
+
name: "target",
|
|
252
|
+
location: "query",
|
|
253
|
+
type: "string",
|
|
254
|
+
description: "Environment to read: production, preview, or development. Omit to default to production."
|
|
255
|
+
}
|
|
256
|
+
],
|
|
241
257
|
http: { method: "GET", path: `${base}/{${resourceParam}}/env/{key}`, operationId: operationIds.envReveal },
|
|
242
258
|
cli: { command: [domain, "env", "reveal"], summary: "Reveal one env var value (secret)", defaultOutput: "raw" },
|
|
243
259
|
mcp: { tool: { name: tool("env_reveal"), title: "Reveal one env var value (secret)", description: "Reveal one decrypted env var value. Secret-bearing — returns a credential, not a list." } }
|
|
@@ -249,15 +265,16 @@ function platformDomain(config) {
|
|
|
249
265
|
safety: "write",
|
|
250
266
|
auth: true,
|
|
251
267
|
title: `Set one ${noun} environment variable`,
|
|
252
|
-
description: `Create or update one env var
|
|
268
|
+
description: `Create or update one env var. Writes every environment unless you pass target.`,
|
|
253
269
|
input: [
|
|
254
270
|
idArg,
|
|
255
271
|
idField("key", "The env var key."),
|
|
256
|
-
{ name: "value", location: "body", type: "string", required: true, secret: true, description: "The env var value." }
|
|
272
|
+
{ name: "value", location: "body", type: "string", required: true, secret: true, description: "The env var value." },
|
|
273
|
+
envWriteTargetField
|
|
257
274
|
],
|
|
258
275
|
http: { method: "PUT", path: `${base}/{${resourceParam}}/env/{key}`, operationId: operationIds.envSet, bodyMode: "json" },
|
|
259
276
|
cli: { command: [domain, "env", "set"], summary: "Set one env var" },
|
|
260
|
-
mcp: { tool: { name: tool("env_set"), title: "Set one env var", description: "Create or update one env var
|
|
277
|
+
mcp: { tool: { name: tool("env_set"), title: "Set one env var", description: "Create or update one env var. Writes every environment unless target is provided." } }
|
|
261
278
|
},
|
|
262
279
|
{
|
|
263
280
|
id: `${cap}.env.unset`,
|
|
@@ -266,11 +283,20 @@ function platformDomain(config) {
|
|
|
266
283
|
safety: "destructive",
|
|
267
284
|
auth: true,
|
|
268
285
|
title: `Unset one ${noun} environment variable`,
|
|
269
|
-
description: `Delete one env var
|
|
270
|
-
input: [
|
|
286
|
+
description: `Delete one env var. Removes it from every environment unless you pass target.`,
|
|
287
|
+
input: [
|
|
288
|
+
idArg,
|
|
289
|
+
idField("key", "The env var key to delete."),
|
|
290
|
+
{
|
|
291
|
+
name: "target",
|
|
292
|
+
location: "query",
|
|
293
|
+
type: "string",
|
|
294
|
+
description: "Environment to remove from: production, preview, or development. Omit to remove from all environments."
|
|
295
|
+
}
|
|
296
|
+
],
|
|
271
297
|
http: { method: "DELETE", path: `${base}/{${resourceParam}}/env/{key}`, operationId: operationIds.envDelete },
|
|
272
298
|
cli: { command: [domain, "env", "unset"], summary: "Unset one env var" },
|
|
273
|
-
mcp: { tool: { name: tool("env_unset"), title: "Unset one env var", description: "Delete one env var
|
|
299
|
+
mcp: { tool: { name: tool("env_unset"), title: "Unset one env var", description: "Delete one env var. Removes it from every environment unless target is provided. Requires confirmation." } }
|
|
274
300
|
}
|
|
275
301
|
];
|
|
276
302
|
const resource = {
|
package/package.json
CHANGED