INNER CODE UNIT · TypeScript

passthrough

rit3zh/reacticx · cloudflare/cli/index.ts:117

  const passthrough = separator === -1 ? [] : argv.slice(separator + 1);

  const first = own[0];
  const command = (COMMANDS as string[]).includes(first ?? "")
    ? (first as Command)
    : ("push" as Command);

  const has = (...names: string[]) => names.some((name) => own.includes(name));

  return {
    command,
    flags: {
      dry: has("--dry", "--dry-run", "-n"),
      check: has("--check"),
      force: has("--force", "-f"),
      prune: has("--prune"),
      verify: has("--verify"),
      backend: has("--s3") ? "s3" : has("--wrangler") ? "wrangler" : undefined,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…