@whop/cli 1.0.0-beta.1 → 1.0.0-beta.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.
package/README.md CHANGED
@@ -42,7 +42,7 @@ brew install whopio/tap/whop
42
42
  npm install -g @whop/cli
43
43
  ```
44
44
 
45
- Prebuilt binaries cover macOS, Linux (glibc and musl) and Windows, on arm64 and x64 ([releases](https://github.com/whopio/whop-public-cli/releases)). The installers put `whop` in `~/.local/bin` (`%USERPROFILE%\.local\bin` on Windows; set `WHOP_INSTALL_DIR` to choose another directory) and do not edit your shell profile. If `whop` is not found after installing, add that directory to your `PATH`:
45
+ Prebuilt binaries cover macOS, Linux (glibc and musl) and Windows, on arm64 and x64. On Alpine and other musl distributions, install `libstdc++` and `libgcc` first (`apk add libstdc++ libgcc`) ([releases](https://github.com/whopio/whop-public-cli/releases)). The installers put `whop` in `~/.local/bin` (`%USERPROFILE%\.local\bin` on Windows; set `WHOP_INSTALL_DIR` to choose another directory) and do not edit your shell profile. If `whop` is not found after installing, add that directory to your `PATH`:
46
46
 
47
47
  ```bash
48
48
  export PATH="$HOME/.local/bin:$PATH"
@@ -277,7 +277,7 @@ WHOP_CLI_AUDIT_LOG=0 whop … # disable logging
277
277
 
278
278
  ## Updating
279
279
 
280
- Standalone installs on macOS and Linux check GitHub hourly and replace themselves with the verified release in the background; set `WHOP_CLI_AUTO_UPDATE=0` to get only a notice. Elsewhere, an interactive terminal tells you when a newer release is out. `whop --update` installs it now: standalone installs replace themselves with the verified GitHub release, and npm installs run your package manager's global install. Homebrew installs update with `brew upgrade whop`. Set `NO_UPDATE_NOTIFIER=1` to turn off update checks.
280
+ Standalone installs on macOS and Linux check GitHub hourly and replace themselves with the verified release in the background; set `WHOP_CLI_AUTO_UPDATE=0` to get only a notice. Elsewhere, an interactive terminal tells you when a newer release is out. `whop --update` (or `whop upgrade`) installs it now, and exits 0 when you are already up to date: standalone installs replace themselves with the verified GitHub release, and npm installs run your package manager's global install. Homebrew installs update with `brew upgrade whop`. Set `NO_UPDATE_NOTIFIER=1` to turn off update checks.
281
281
 
282
282
  `whop --version` prints the installed version; `whop --help` also shows the API version the CLI speaks. A standalone 0.x install updates itself to 1.x.
283
283
 
@@ -51,7 +51,7 @@ import {
51
51
  upsertProfile,
52
52
  validateApiKey,
53
53
  whopApiFetch
54
- } from "./chunk-FE7JREX4.js";
54
+ } from "./chunk-CD4COZVJ.js";
55
55
  import {
56
56
  external_exports
57
57
  } from "./chunk-EDYYHINV.js";
@@ -5312,4 +5312,4 @@ export {
5312
5312
  performLogin,
5313
5313
  cli_default
5314
5314
  };
5315
- //# sourceMappingURL=chunk-5BVHPPST.js.map
5315
+ //# sourceMappingURL=chunk-63Z4GX2Q.js.map
@@ -7,7 +7,7 @@ import {
7
7
  __export
8
8
  } from "./chunk-M2N2M5EJ.js";
9
9
 
10
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Errors.ts
10
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Errors.ts
11
11
  var Errors_exports = {};
12
12
  __export(Errors_exports, {
13
13
  BaseError: () => BaseError,
@@ -89,7 +89,7 @@ function walk(error, fn) {
89
89
  return current;
90
90
  }
91
91
 
92
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Openapi.ts
92
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Openapi.ts
93
93
  var Openapi_exports = {};
94
94
  __export(Openapi_exports, {
95
95
  coerceIfNeeded: () => coerceIfNeeded,
@@ -99,7 +99,7 @@ __export(Openapi_exports, {
99
99
  toZod: () => toZod
100
100
  });
101
101
 
102
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Cli.ts
102
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Cli.ts
103
103
  var Cli_exports = {};
104
104
  __export(Cli_exports, {
105
105
  collectSkillCommands: () => collectSkillCommands,
@@ -204,7 +204,7 @@ function extractSegmentPart(segment, segmentTokenStart, segmentTokenCount, targe
204
204
  return segment.slice(charStart, charEnd);
205
205
  }
206
206
 
207
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Binary.ts
207
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Binary.ts
208
208
  var Binary_exports = {};
209
209
  __export(Binary_exports, {
210
210
  applyFlag: () => applyFlag,
@@ -221,13 +221,13 @@ import * as path2 from "path";
221
221
  import * as util from "util";
222
222
  import * as zlib from "zlib";
223
223
 
224
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/update.ts
224
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/update.ts
225
225
  import * as childProcess from "child_process";
226
226
  import * as fs2 from "fs";
227
227
  import * as os from "os";
228
228
  import * as path from "path";
229
229
 
230
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/pm.ts
230
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/pm.ts
231
231
  import * as fs from "fs";
232
232
  function detectPackageManager() {
233
233
  const userAgent = process.env.npm_config_user_agent ?? "";
@@ -265,7 +265,7 @@ function globalInstall(name2) {
265
265
  return { args: ["install", "--global", `${name2}@latest`], command: "npm" };
266
266
  }
267
267
 
268
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/update.ts
268
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/update.ts
269
269
  var defaultInterval = 24 * 60 * 60 * 1e3;
270
270
  var checkFlag = "--incur-update-check";
271
271
  function check(name2, options = {}) {
@@ -299,6 +299,21 @@ async function refresh(name2, options = {}) {
299
299
  async function install(name2, options = {}) {
300
300
  const provider = resolveProvider(name2, options);
301
301
  if (!provider?.install) throw new Error(`No update installer is configured for '${name2}'.`);
302
+ if (provider.check && provider.current) {
303
+ let latest;
304
+ let checked = true;
305
+ try {
306
+ latest = await provider.check({
307
+ current: provider.current,
308
+ name: name2,
309
+ ...provider.package ? { package: provider.package } : void 0
310
+ });
311
+ } catch {
312
+ checked = false;
313
+ }
314
+ if (checked && (!latest || !isNewerVersion(latest, provider.current)))
315
+ return { current: provider.current, name: provider.name, upToDate: true };
316
+ }
302
317
  const cached2 = readCache(cachePath(provider.key));
303
318
  await provider.install({
304
319
  ...provider.current ? { current: provider.current } : void 0,
@@ -490,10 +505,11 @@ function notificationsDisabled() {
490
505
  return Boolean(process.env.CI && process.env.CI !== "false");
491
506
  }
492
507
 
493
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Binary.ts
508
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Binary.ts
494
509
  var githubApi = "https://api.github.com";
495
510
  var requestTimeout = 1e4;
496
511
  var downloadTimeout = 12e4;
512
+ var staleArtifactAge = 10 * 60 * 1e3;
497
513
  var handoffTimeout = 6e4;
498
514
  var gunzip2 = util.promisify(zlib.gunzip);
499
515
  var applyFlag = "--incur-binary-apply";
@@ -525,8 +541,7 @@ function github(options) {
525
541
  }
526
542
  async function handleArgv(argv = process.argv.slice(2)) {
527
543
  if (argv[0] !== applyFlag) {
528
- if (process.platform === "win32" && name && target && version)
529
- await cleanupArtifacts(process.execPath);
544
+ if (name && target && version) await cleanupArtifacts(process.execPath);
530
545
  return false;
531
546
  }
532
547
  if (process.platform !== "win32") throw new Error(`${applyFlag} is only supported on Windows.`);
@@ -787,19 +802,27 @@ function delay(duration) {
787
802
  }
788
803
  async function cleanupArtifacts(executable) {
789
804
  const directory = path2.dirname(executable);
790
- const prefix = `${path2.basename(executable)}.incur-handoff-`;
805
+ const base = path2.basename(executable);
806
+ const id = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
807
+ const handoff = new RegExp(`^${escapeRegExp(base)}\\.incur-handoff-${id}\\.exe$`, "i");
808
+ const staged = new RegExp(`^${escapeRegExp(base)}\\.incur-new-${id}(?:\\.exe)?$`, "i");
809
+ const staleBefore = Date.now() - staleArtifactAge;
791
810
  try {
792
811
  const entries = await fs3.promises.readdir(directory);
793
812
  await Promise.all(
794
- entries.filter(
795
- (entry) => entry.startsWith(prefix) && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.exe$/i.test(
796
- entry.slice(prefix.length)
797
- )
798
- ).map((entry) => remove(path2.join(directory, entry)))
813
+ entries.map(async (entry) => {
814
+ const file = path2.join(directory, entry);
815
+ if (process.platform === "win32" && handoff.test(entry)) return remove(file);
816
+ if (staged.test(entry) && (await fs3.promises.stat(file)).mtimeMs < staleBefore)
817
+ return remove(file);
818
+ })
799
819
  );
800
820
  } catch {
801
821
  }
802
822
  }
823
+ function escapeRegExp(value) {
824
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
825
+ }
803
826
  async function writeError(state, error, recovery) {
804
827
  const body = [
805
828
  `Binary update failed: ${message(error)}`,
@@ -826,7 +849,7 @@ function message(error) {
826
849
  return error instanceof Error ? error.message : String(error);
827
850
  }
828
851
 
829
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/helpers.ts
852
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/helpers.ts
830
853
  function isRecord(value) {
831
854
  return typeof value === "object" && value !== null && !Array.isArray(value);
832
855
  }
@@ -878,7 +901,7 @@ function suggest(input, candidates) {
878
901
  return best;
879
902
  }
880
903
 
881
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Completions.ts
904
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Completions.ts
882
905
  function register(shell, name2) {
883
906
  switch (shell) {
884
907
  case "bash":
@@ -1118,7 +1141,7 @@ let _incur_complete_${id} = {|spans|
1118
1141
  }`;
1119
1142
  }
1120
1143
 
1121
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Fetch.ts
1144
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Fetch.ts
1122
1145
  var Fetch_exports = {};
1123
1146
  __export(Fetch_exports, {
1124
1147
  buildRequest: () => buildRequest,
@@ -1286,7 +1309,7 @@ function parseError(output) {
1286
1309
  return { code, message: message2 };
1287
1310
  }
1288
1311
 
1289
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Filter.ts
1312
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Filter.ts
1290
1313
  function parse(expression) {
1291
1314
  const paths = [];
1292
1315
  const tokens = [];
@@ -1779,7 +1802,7 @@ function resolveOptions(options) {
1779
1802
  };
1780
1803
  }
1781
1804
 
1782
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/json.ts
1805
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/json.ts
1783
1806
  function stringify(value, space) {
1784
1807
  return JSON.stringify(
1785
1808
  value,
@@ -1794,7 +1817,7 @@ function normalize(value) {
1794
1817
  return JSON.parse(stringify(value));
1795
1818
  }
1796
1819
 
1797
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/yaml.ts
1820
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/yaml.ts
1798
1821
  import { createRequire } from "module";
1799
1822
  var cached;
1800
1823
  async function load() {
@@ -1806,7 +1829,7 @@ function loadSync() {
1806
1829
  return cached;
1807
1830
  }
1808
1831
 
1809
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Formatter.ts
1832
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Formatter.ts
1810
1833
  function format2(value, fmt = "toon") {
1811
1834
  if (value == null) return "";
1812
1835
  if (fmt === "json") {
@@ -1910,14 +1933,14 @@ ${String(val)}`;
1910
1933
  return kvTable(obj);
1911
1934
  }
1912
1935
 
1913
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Help.ts
1936
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Help.ts
1914
1937
  var Help_exports = {};
1915
1938
  __export(Help_exports, {
1916
1939
  formatCommand: () => formatCommand,
1917
1940
  formatRoot: () => formatRoot
1918
1941
  });
1919
1942
 
1920
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Parser.ts
1943
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Parser.ts
1921
1944
  function parse2(argv, options = {}) {
1922
1945
  const { args: argsSchema, options: optionsSchema, alias, defaults } = options;
1923
1946
  const optionNames = createOptionNames(optionsSchema, alias);
@@ -2339,7 +2362,7 @@ function defaultEnvSource() {
2339
2362
  return {};
2340
2363
  }
2341
2364
 
2342
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/command.ts
2365
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/command.ts
2343
2366
  var sentinel = Symbol.for("incur.sentinel");
2344
2367
  async function execute(command3, options) {
2345
2368
  const {
@@ -2598,7 +2621,7 @@ function findBuiltinSubcommand(builtin, token) {
2598
2621
  return builtin.subcommands?.find((sub) => sub.name === token || sub.aliases?.includes(token));
2599
2622
  }
2600
2623
 
2601
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Help.ts
2624
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Help.ts
2602
2625
  function formatRoot(name2, options = {}) {
2603
2626
  const {
2604
2627
  aliases,
@@ -2897,7 +2920,7 @@ function redact(value) {
2897
2920
  return `****${value.slice(-4)}`;
2898
2921
  }
2899
2922
 
2900
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/cta.ts
2923
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/cta.ts
2901
2924
  function formatCtaBlock(name2, block) {
2902
2925
  if (!block || block.commands.length === 0) return void 0;
2903
2926
  return {
@@ -2925,7 +2948,7 @@ function formatCta(name2, cta) {
2925
2948
  return { command: cmd, ...cta.description ? { description: cta.description } : void 0 };
2926
2949
  }
2927
2950
 
2928
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/fsCommands.ts
2951
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/fsCommands.ts
2929
2952
  import * as fs4 from "fs/promises";
2930
2953
  import * as path3 from "path";
2931
2954
  var extensions = [".cts", ".cjs", ".mts", ".mjs", ".ts", ".js"];
@@ -2993,7 +3016,7 @@ function assertSegment(segment, source) {
2993
3016
  );
2994
3017
  }
2995
3018
 
2996
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Schema.ts
3019
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Schema.ts
2997
3020
  function toJsonSchema(schema) {
2998
3021
  const result = external_exports.toJSONSchema(schema, {
2999
3022
  unrepresentable: "any",
@@ -3006,7 +3029,7 @@ function toJsonSchema(schema) {
3006
3029
  return result;
3007
3030
  }
3008
3031
 
3009
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Mcp.ts
3032
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Mcp.ts
3010
3033
  async function serve(name2, version2, commands, options = {}) {
3011
3034
  const stdio = importStdioModule();
3012
3035
  const mcp = await import("./dist-VUZCDJVO.js");
@@ -3409,7 +3432,7 @@ function buildToolSchema(args, options, globals) {
3409
3432
  return { type: "object", properties };
3410
3433
  }
3411
3434
 
3412
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/McpSource.ts
3435
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/McpSource.ts
3413
3436
  var protocolVersion = "2025-06-18";
3414
3437
  async function resolve3(source, options = {}) {
3415
3438
  const session = sourceSession(source);
@@ -3563,7 +3586,7 @@ function resultValue(result) {
3563
3586
  return textItems;
3564
3587
  }
3565
3588
 
3566
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Skill.ts
3589
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Skill.ts
3567
3590
  import { createHash as createHash2 } from "crypto";
3568
3591
  function index(name2, commands, description) {
3569
3592
  const lines = [`# ${name2}`];
@@ -3812,7 +3835,7 @@ function resolveTypeName2(prop) {
3812
3835
  return "unknown";
3813
3836
  }
3814
3837
 
3815
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/SyncMcp.ts
3838
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/SyncMcp.ts
3816
3839
  import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
3817
3840
  import { homedir as homedir2 } from "os";
3818
3841
  import { dirname as dirname3, join as join4 } from "path";
@@ -3949,13 +3972,13 @@ function splitCommand(input) {
3949
3972
  return tokens;
3950
3973
  }
3951
3974
 
3952
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/SyncSkills.ts
3975
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/SyncSkills.ts
3953
3976
  import fsSync from "fs";
3954
3977
  import fs6 from "fs/promises";
3955
3978
  import os3 from "os";
3956
3979
  import path5 from "path";
3957
3980
 
3958
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/agents.ts
3981
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/agents.ts
3959
3982
  import * as fs5 from "fs";
3960
3983
  import * as os2 from "os";
3961
3984
  import * as path4 from "path";
@@ -4226,7 +4249,7 @@ function resolveParent(dir) {
4226
4249
  }
4227
4250
  }
4228
4251
 
4229
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/SyncSkills.ts
4252
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/SyncSkills.ts
4230
4253
  async function sync(name2, commands, options = {}) {
4231
4254
  const { depth = 1, description, global = true } = options;
4232
4255
  const cwd = options.cwd ?? (global ? resolvePackageRoot() : process.cwd());
@@ -4393,7 +4416,7 @@ function readHash(name2) {
4393
4416
  return readMeta(name2)?.hash;
4394
4417
  }
4395
4418
 
4396
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Cli.ts
4419
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Cli.ts
4397
4420
  var destructiveCommandHint = "Confirm with the user before executing this destructive command.";
4398
4421
  var fileCommandSymbol = Symbol.for("incur.fileCommand");
4399
4422
  function command(definition) {
@@ -4788,7 +4811,8 @@ async function serveImpl(name2, commands, argv, options = {}) {
4788
4811
  if (update2 && !help) {
4789
4812
  try {
4790
4813
  const result2 = await install(name2, updateOptions);
4791
- if (human) {
4814
+ if (human && result2.upToDate) writeln(`\u2713 ${result2.name} is up to date (${result2.current})`);
4815
+ else if (human) {
4792
4816
  const lines = [
4793
4817
  result2.deferred ? `\u2713 Update staged for ${result2.name}` : `\u2713 Updated ${result2.name}`
4794
4818
  ];
@@ -7012,7 +7036,7 @@ function resolveDisplayName(name2, aliases) {
7012
7036
  return name2;
7013
7037
  }
7014
7038
 
7015
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/internal/dereference.ts
7039
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/internal/dereference.ts
7016
7040
  function dereference(root) {
7017
7041
  const cache = /* @__PURE__ */ new Map();
7018
7042
  return walk2(root, root, cache);
@@ -7059,7 +7083,7 @@ function resolvePointer(root, pointer) {
7059
7083
  return current;
7060
7084
  }
7061
7085
 
7062
- // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+8f27e32b4978d02d49324fddbc06de1d44352351/node_modules/incur/src/Openapi.ts
7086
+ // ../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+e5a1a4b395f89de026f374594652c2e9d9865fbf/node_modules/incur/src/Openapi.ts
7063
7087
  function fromCli(cli, options = {}) {
7064
7088
  const commands = toCommands.get(cli);
7065
7089
  if (!commands) throw new Error("No commands registered on this CLI instance");
@@ -7642,7 +7666,7 @@ function coerceIfNeeded(schema) {
7642
7666
  // package.json
7643
7667
  var package_default = {
7644
7668
  name: "@whop/cli",
7645
- version: "1.0.0-beta.1",
7669
+ version: "1.0.0-beta.2",
7646
7670
  description: "The Whop CLI \u2014 build and manage Whop apps from your terminal. Human and agent friendly.",
7647
7671
  keywords: [
7648
7672
  "agent",
@@ -7697,7 +7721,7 @@ var package_default = {
7697
7721
  devDependencies: {
7698
7722
  "@types/node": "25.3.5",
7699
7723
  fflate: "0.8.3",
7700
- incur: "github:whopio/incur#8f27e32b4978d02d49324fddbc06de1d44352351",
7724
+ incur: "github:whopio/incur#e5a1a4b395f89de026f374594652c2e9d9865fbf",
7701
7725
  oxfmt: "0.42.0",
7702
7726
  tsup: "8.5.0",
7703
7727
  tsx: "4.19.4",
@@ -8768,7 +8792,7 @@ function switchProfile(name2) {
8768
8792
  import fs10 from "fs";
8769
8793
  import path9 from "path";
8770
8794
  var DEFAULT_RETENTION_DAYS = 7;
8771
- var SENSITIVE_FLAG = /(api[-_]?key|tokens?|secrets?|passwords?|credentials?|founders?|business[-_]?(address|phone)|ssn|date[-_]?of[-_]?birth)$/i;
8795
+ var SENSITIVE_NAME = /(api[-_]?key|tokens?|secrets?|passwords?|credentials?|founders?|business[-_]?(address|phone)|ssn|date[-_]?of[-_]?birth|(?:^|[-_])pin|tax[-_]?ids?)$/i;
8772
8796
  var SECRET_VALUE = /whop_[A-Za-z0-9_-]{8,}/g;
8773
8797
  var LOG_FILE = /^audit-(\d{4}-\d{2}-\d{2})\.jsonl$/;
8774
8798
  function auditLogDir(env = process.env) {
@@ -8798,7 +8822,7 @@ function redactArgv(argv) {
8798
8822
  if (arg.startsWith("--")) {
8799
8823
  const eq = arg.indexOf("=");
8800
8824
  const flag = eq === -1 ? arg : arg.slice(0, eq);
8801
- if (SENSITIVE_FLAG.test(flag)) {
8825
+ if (SENSITIVE_NAME.test(flag)) {
8802
8826
  if (eq === -1) {
8803
8827
  redactNext = true;
8804
8828
  redacted.push(arg);
@@ -8808,10 +8832,32 @@ function redactArgv(argv) {
8808
8832
  continue;
8809
8833
  }
8810
8834
  }
8811
- redacted.push(arg.replace(SECRET_VALUE, "[redacted]"));
8835
+ redacted.push(redactValue(arg));
8812
8836
  }
8813
8837
  return redacted;
8814
8838
  }
8839
+ function redactValue(arg) {
8840
+ const trimmed = arg.trim();
8841
+ if (trimmed.startsWith("{") || trimmed.startsWith("[")) {
8842
+ try {
8843
+ return JSON.stringify(redactJson(JSON.parse(trimmed)));
8844
+ } catch {
8845
+ }
8846
+ }
8847
+ return arg.replace(SECRET_VALUE, "[redacted]");
8848
+ }
8849
+ function redactJson(value) {
8850
+ if (typeof value === "string")
8851
+ return value.replace(SECRET_VALUE, "[redacted]");
8852
+ if (Array.isArray(value)) return value.map(redactJson);
8853
+ if (value === null || typeof value !== "object") return value;
8854
+ return Object.fromEntries(
8855
+ Object.entries(value).map(([key, item]) => [
8856
+ key,
8857
+ SENSITIVE_NAME.test(key) ? "[redacted]" : redactJson(item)
8858
+ ])
8859
+ );
8860
+ }
8815
8861
  function pruneAuditLogs(env = process.env, now = /* @__PURE__ */ new Date()) {
8816
8862
  const dir = auditLogDir(env);
8817
8863
  let entries;
@@ -9760,6 +9806,7 @@ function isNpx(moduleUrl = import.meta.url) {
9760
9806
  return moduleUrl.includes("/_npx/");
9761
9807
  }
9762
9808
  var homebrew = Binary_exports.target !== void 0 && /[/\\](Cellar|homebrew|linuxbrew)[/\\]/.test(process.execPath);
9809
+ var BACKGROUND_CHECK_FLAG = "--incur-update-check";
9763
9810
  function autoUpdating(provider) {
9764
9811
  const { check: check2, install: install3 } = provider;
9765
9812
  if (!check2 || !install3 || process.platform === "win32" || process.env.WHOP_CLI_AUTO_UPDATE === "0") {
@@ -9770,7 +9817,7 @@ function autoUpdating(provider) {
9770
9817
  interval: 60 * 60 * 1e3,
9771
9818
  async check(context) {
9772
9819
  const latest = await check2(context);
9773
- if (latest) {
9820
+ if (latest && process.argv.includes(BACKGROUND_CHECK_FLAG)) {
9774
9821
  try {
9775
9822
  await install3({ ...context, latest });
9776
9823
  } catch {
@@ -9923,4 +9970,4 @@ export {
9923
9970
  CLI_DESCRIPTION,
9924
9971
  groupedHelp
9925
9972
  };
9926
- //# sourceMappingURL=chunk-FE7JREX4.js.map
9973
+ //# sourceMappingURL=chunk-CD4COZVJ.js.map