@skillrecordings/cli 0.14.3 → 0.15.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/index.js CHANGED
@@ -1479,9 +1479,9 @@ var require_url_state_machine = __commonJS({
1479
1479
  url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);
1480
1480
  }
1481
1481
  };
1482
- module.exports.setThePassword = function(url, password) {
1482
+ module.exports.setThePassword = function(url, password2) {
1483
1483
  url.password = "";
1484
- const decoded = punycode.ucs2.decode(password);
1484
+ const decoded = punycode.ucs2.decode(password2);
1485
1485
  for (let i = 0; i < decoded.length; ++i) {
1486
1486
  url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);
1487
1487
  }
@@ -16736,7 +16736,7 @@ var require_proxy_agent = __commonJS({
16736
16736
  const { proxyTunnel = true } = opts;
16737
16737
  super();
16738
16738
  const url = this.#getUrl(opts);
16739
- const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url;
16739
+ const { href, origin, port, protocol, username, password: password2, hostname: proxyHostname } = url;
16740
16740
  this[kProxy] = { uri: href, protocol };
16741
16741
  this[kRequestTls] = opts.requestTls;
16742
16742
  this[kProxyTls] = opts.proxyTls;
@@ -16748,8 +16748,8 @@ var require_proxy_agent = __commonJS({
16748
16748
  this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`;
16749
16749
  } else if (opts.token) {
16750
16750
  this[kProxyHeaders]["proxy-authorization"] = opts.token;
16751
- } else if (username && password) {
16752
- this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`;
16751
+ } else if (username && password2) {
16752
+ this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password2)}`).toString("base64")}`;
16753
16753
  }
16754
16754
  const connect = buildConnector({ ...opts.proxyTls });
16755
16755
  this[kConnectEndpoint] = buildConnector({ ...opts.requestTls });
@@ -26406,8 +26406,8 @@ var require_fetch = __commonJS({
26406
26406
  let authorizationValue = null;
26407
26407
  if (hasAuthenticationEntry(httpRequest) && (httpRequest.useURLCredentials === void 0 || !includesCredentials(requestCurrentURL(httpRequest)))) {
26408
26408
  } else if (includesCredentials(requestCurrentURL(httpRequest)) && isAuthenticationFetch) {
26409
- const { username, password } = requestCurrentURL(httpRequest);
26410
- authorizationValue = `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`;
26409
+ const { username, password: password2 } = requestCurrentURL(httpRequest);
26410
+ authorizationValue = `Basic ${Buffer.from(`${username}:${password2}`).toString("base64")}`;
26411
26411
  }
26412
26412
  if (authorizationValue !== null) {
26413
26413
  httpRequest.headersList.append("Authorization", authorizationValue, false);
@@ -77096,6 +77096,7 @@ Private key saved to: ${keyPath}`);
77096
77096
  // src/commands/config/set.ts
77097
77097
  init_esm_shims();
77098
77098
  import { existsSync as existsSync4, readFileSync as readFileSync2, writeFileSync as writeFileSync4 } from "fs";
77099
+ import { password, select as select2 } from "@inquirer/prompts";
77099
77100
  import { Decrypter, Encrypter, identityToRecipient as identityToRecipient2 } from "age-encryption";
77100
77101
  function getEncryptedConfigPath() {
77101
77102
  return `${getUserConfigDir2()}/.env.user.encrypted`;
@@ -77149,7 +77150,29 @@ async function configSetAction(ctx, keyValue, options = {}) {
77149
77150
  process.exitCode = EXIT_CODES.usage;
77150
77151
  return;
77151
77152
  }
77152
- const parsed = parseKeyValue(keyValue);
77153
+ let finalKeyValue = keyValue;
77154
+ if (!finalKeyValue && process.stdin.isTTY && !outputJson) {
77155
+ try {
77156
+ const selectedKey = await select2({
77157
+ message: "Select a secret key to set:",
77158
+ choices: Object.keys(SECRET_REFS).map((key) => ({
77159
+ name: key,
77160
+ value: key
77161
+ }))
77162
+ });
77163
+ const secretValue = await password({
77164
+ message: `Enter value for ${selectedKey}:`
77165
+ });
77166
+ finalKeyValue = `${selectedKey}=${secretValue}`;
77167
+ } catch (error) {
77168
+ if (error instanceof Error && (error.message.includes("User force closed") || error.message.includes("canceled"))) {
77169
+ ctx.output.data("Cancelled");
77170
+ return;
77171
+ }
77172
+ throw error;
77173
+ }
77174
+ }
77175
+ const parsed = parseKeyValue(finalKeyValue || "");
77153
77176
  if (!parsed) {
77154
77177
  const result = {
77155
77178
  success: false,
@@ -77405,7 +77428,9 @@ function registerConfigCommands(program3) {
77405
77428
  const ctx = await buildContext2(command, options.json);
77406
77429
  await configInitAction(ctx, options);
77407
77430
  });
77408
- config.command("set <key-value>").description("Set encrypted config value (format: KEY=value)").option("--json", "Output as JSON").action(async (keyValue, options, command) => {
77431
+ config.command("set [key-value]").description(
77432
+ "Set encrypted config value (format: KEY=value or interactive)"
77433
+ ).option("--json", "Output as JSON").action(async (keyValue, options, command) => {
77409
77434
  const ctx = await buildContext2(command, options.json);
77410
77435
  await configSetAction(ctx, keyValue, options);
77411
77436
  });
@@ -92604,7 +92629,7 @@ import { spawnSync } from "child_process";
92604
92629
  import { existsSync as existsSync14, readFileSync as readFileSync10, unlinkSync, writeFileSync as writeFileSync10 } from "fs";
92605
92630
  import { tmpdir } from "os";
92606
92631
  import { join as join12 } from "path";
92607
- import { confirm as confirm2, select as select2 } from "@inquirer/prompts";
92632
+ import { confirm as confirm2, select as select3 } from "@inquirer/prompts";
92608
92633
  var COLORS2 = {
92609
92634
  reset: "\x1B[0m",
92610
92635
  green: "\x1B[32m",
@@ -92738,7 +92763,7 @@ ${COLORS2.bold}\u{1F4CB} FAQ Review Session${COLORS2.reset}`);
92738
92763
  for (let i = 0; i < candidates.length; i++) {
92739
92764
  const candidate = candidates[i];
92740
92765
  displayCandidate(ctx, candidate, i, candidates.length);
92741
- const action = await select2({
92766
+ const action = await select3({
92742
92767
  message: "Action:",
92743
92768
  choices: [
92744
92769
  {
@@ -103216,7 +103241,7 @@ var compile3 = wrapCompile(compile2);
103216
103241
  var _compileUnsafe = wrapCompile(compileUnsafe);
103217
103242
  var _compileToken = wrapCompile(compileToken);
103218
103243
  function getSelectorFunc(searchFunc) {
103219
- return function select5(query, elements, options) {
103244
+ return function select6(query, elements, options) {
103220
103245
  const opts = convertOptionFormats(options);
103221
103246
  if (typeof query !== "function") {
103222
103247
  query = compileUnsafe(query, opts, elements);
@@ -103403,7 +103428,7 @@ function filterBySelector(selector, elements, options) {
103403
103428
  }
103404
103429
  return findFilterElements(elements, selector, options, false, elements.length);
103405
103430
  }
103406
- function select3(selector, root2, options = {}, limit2 = Infinity) {
103431
+ function select4(selector, root2, options = {}, limit2 = Infinity) {
103407
103432
  if (typeof selector === "function") {
103408
103433
  return find3(root2, selector);
103409
103434
  }
@@ -103508,7 +103533,7 @@ function _findBySelector(selector, limit2) {
103508
103533
  pseudos: this.options.pseudos,
103509
103534
  quirksMode: this.options.quirksMode
103510
103535
  };
103511
- return this._make(select3(selector, elems, options, limit2));
103536
+ return this._make(select4(selector, elems, options, limit2));
103512
103537
  }
103513
103538
  function _getMatcher(matchMap) {
103514
103539
  return function(fn, ...postFns) {
@@ -119005,7 +119030,7 @@ var DEFAULT_HINT_RULES = [
119005
119030
  {
119006
119031
  id: "onboarding.auth",
119007
119032
  audience: "onboarding",
119008
- message: "Configure credentials with `skill init` to unlock the full CLI.",
119033
+ message: "Set up credentials with `skill auth setup` (requires 1Password).",
119009
119034
  showWhen: (state) => state.totalRuns >= 1 && !hasMilestone(state, "auth_configured"),
119010
119035
  retireWhen: (state) => hasMilestone(state, "auth_configured")
119011
119036
  },
@@ -119843,8 +119868,8 @@ if (!envLoaded && !process.env.DATABASE_URL) {
119843
119868
  process.env.SKIP_ENV_VALIDATION = "1";
119844
119869
  }
119845
119870
  var runtimeTarget = `bun-${process.platform}-${process.arch}`;
119846
- var buildVersion = "0.14.3".length > 0 ? "0.14.3" : "0.0.0-dev";
119847
- var buildCommit = "ba0a512".length > 0 ? "ba0a512" : "dev";
119871
+ var buildVersion = "0.15.0".length > 0 ? "0.15.0" : "0.0.0-dev";
119872
+ var buildCommit = "73ba4fa".length > 0 ? "73ba4fa" : "dev";
119848
119873
  var buildTarget = "node".length > 0 ? "node" : runtimeTarget;
119849
119874
  var isDevBuild = buildVersion.includes("dev") || buildCommit === "dev";
119850
119875
  var versionLabel = `skill v${buildVersion} (${buildCommit}) ${buildTarget}`;
@@ -119889,7 +119914,7 @@ var resolveMilestones = (commandName) => {
119889
119914
  case "wizard":
119890
119915
  return ["wizard_completed"];
119891
119916
  case "auth.setup":
119892
- case "init":
119917
+ case "config.init":
119893
119918
  return ["auth_configured"];
119894
119919
  default:
119895
119920
  return [];