Redocly / Redocly/redocly-cli

Deno support

Open
#1,040 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Idea
Dominant language
TypeScript
Stars
1.5k
Forks
228
Avg merge
1d 14h
Merged PRs (30d)
48

Description

Is your feature request related to a problem? Please describe.
Currently, most of @redocly/cli works within Deno using the compatibility mode. Though, when using the preview-docs command, it appears that @redocly/cli hangs and does nothing. For example, attempt to invoke with deno run --unstable --allow-all npm:@redocly/cli preview-docs your-openapi-schema.json using any openapi schema as the input. Running the equivalent command with npx would spawn a working live server.

Describe the solution you'd like
Support for running @redocly/cli using Deno as the runtime instead of Node.

Describe alternatives you've considered
I have considered just writing a wrapper that manually invokes deno run -A npm:@redocly/cli build-docs via Deno script and emulates the preview-docs functionality, but would prefer a solution that isn't so involved.

Additional context
Deno is awesome, and it has Node.js API support out of the box. Perhaps this could be a simple code change, without having to import any Deno awareness into the @redocly/cli codebase.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing deno run --unstable --allow-all npm:@redocly/cli preview-docs your-openapi-schema.json and compare it with the working npx invocation. Investigate the preview-docs command and its live-server behavior; done means the command runs successfully under Deno and serves the documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, typescript
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.