replicas-cli 0.3.637 → 0.3.638

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.
Files changed (2) hide show
  1. package/dist/index.cjs +9 -5
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -28288,6 +28288,8 @@ The user gets a form above the chat composer in Replicas, where they can paste a
28288
28288
 
28289
28289
  In workspaces started from Slack, Linear, or an automation, nobody may be watching Replicas, so the command returns right away with a link to the form; share it where you are talking with the user. If the values don't arrive in time, the request stays open. Either way you get a message when the user saves; run the same command again then. If a saved value is wrong, for example the service rejects it, add \`--replace\` to ask for a new one.
28290
28290
 
28291
+ A value that starts with \`replicas_ph_\` is a proxied secret. Use it as the real key: Replicas swaps in the real value on HTTPS requests to the hosts the user bound it to, and it works nowhere else, including inside Docker containers.
28292
+
28291
28293
  ### Environment files
28292
28294
 
28293
28295
  Files materialize on the workspace filesystem when a workspace starts, at the destination path you specify. Use this for things like \`.env\` files at the repo root, dotfiles in \`~\`, prompt files for agents, etc.
@@ -43147,7 +43149,7 @@ var CLI_VERSION;
43147
43149
  var init_cli_version = __esm({
43148
43150
  "../shared/src/cli-version.ts"() {
43149
43151
  "use strict";
43150
- CLI_VERSION = "0.3.637";
43152
+ CLI_VERSION = "0.3.638";
43151
43153
  }
43152
43154
  });
43153
43155
 
@@ -57296,6 +57298,7 @@ function printVariable(v2) {
57296
57298
  console.log(import_chalk21.default.white(` ${v2.key}`));
57297
57299
  console.log(import_chalk21.default.gray(` ID: ${v2.id}`));
57298
57300
  console.log(import_chalk21.default.gray(` Value: ${v2.value}`));
57301
+ if (v2.proxy_hosts.length > 0) console.log(import_chalk21.default.gray(` Proxied to: ${v2.proxy_hosts.join(", ")}`));
57299
57302
  console.log(import_chalk21.default.gray(` Updated: ${formatDate(v2.updated_at)}`));
57300
57303
  console.log();
57301
57304
  }
@@ -57320,7 +57323,7 @@ Variables (${environment_variables.length}):
57320
57323
  for (const v2 of environment_variables) printVariable(v2);
57321
57324
  });
57322
57325
  }
57323
- async function envVarsSetCommand(envIdOrName, key2, value) {
57326
+ async function envVarsSetCommand(envIdOrName, key2, value, options) {
57324
57327
  ensureOrgApiAuthenticated();
57325
57328
  const id = await resolveEnvironmentId(envIdOrName);
57326
57329
  const existing = await orgAuthenticatedFetch(
@@ -57328,7 +57331,7 @@ async function envVarsSetCommand(envIdOrName, key2, value) {
57328
57331
  );
57329
57332
  const match = existing.environment_variables.find((v2) => v2.key === key2);
57330
57333
  if (match) {
57331
- const body3 = { value };
57334
+ const body3 = { value, proxy_hosts: options.proxyHost };
57332
57335
  const response2 = await orgAuthenticatedFetch(
57333
57336
  `/v1/environments/${id}/variables/${match.id}`,
57334
57337
  { method: "PATCH", body: body3 }
@@ -57341,7 +57344,8 @@ Updated variable ${environment_variable.key}.
57341
57344
  const body2 = {
57342
57345
  environment_id: id,
57343
57346
  key: key2,
57344
- value
57347
+ value,
57348
+ proxy_hosts: options.proxyHost
57345
57349
  };
57346
57350
  const response = await orgAuthenticatedFetch(
57347
57351
  `/v1/environments/${id}/variables`,
@@ -62248,7 +62252,7 @@ var init_src2 = __esm({
62248
62252
  envConfig.command("disconnect <env>").description("Disconnect Git configuration and preserve current settings").option("-y, --yes", "Disconnect without a confirmation prompt").action(run(environmentConfigDisconnectCommand));
62249
62253
  envVars = environment.command("vars").description("Manage environment variables");
62250
62254
  envVars.command("list <env>").description("List variables in an environment (values masked by default)").option("--reveal", "Show full variable values instead of masking them").action(run(envVarsListCommand));
62251
- envVars.command("set <env> <key> <value>").description("Create or update a variable").action(run(envVarsSetCommand));
62255
+ envVars.command("set <env> <key> <value>").description("Create or update a variable").option("--proxy-host <hosts...>", "Keep the value out of workspaces: they get a placeholder, swapped for the value only on HTTPS requests to these hosts").action(run(envVarsSetCommand));
62252
62256
  envVars.command("delete <env> <key-or-id>").description("Delete a variable by key or ID").option("-f, --force", "Skip confirmation prompt").action(run(envVarsDeleteCommand));
62253
62257
  if (isAgentMode()) {
62254
62258
  envVars.command("request [keys...]").description("Ask the user for variables and load them into this workspace").option("-r, --reason <text>", "One sentence on what the values are for, shown to the user").option("--optional <keys>", "Comma-separated keys to ask for that the user may leave empty (repeatable)", (value, previous) => [...previous, value], []).option("--replace", "Ask for new values even if the keys are already set, for example when a saved key is rejected").option("-t, --timeout <duration>", "How long to wait for the user, for example 90s or 10m (default 10m)").option("--no-wait", "Return right after asking instead of waiting for the user").action(run(envVarsRequestCommand));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.637",
3
+ "version": "0.3.638",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {