From d817b774e492dce34f8b69edee189763137ef9ba Mon Sep 17 00:00:00 2001 From: matthewrgourd Date: Wed, 10 Jun 2026 08:33:14 +0100 Subject: [PATCH 1/8] fix: scaffold missing sidebars.ts and add npm run alternatives to docs The docify new command generated a docusaurus.config.ts referencing ./sidebars.ts but never created the file, causing every scaffolded project to fail on build. This commit: - Adds sidebars.ts (autogenerated sidebar) to the scaffold output - Replaces the deprecated onBrokenMarkdownLinks location with markdown.hooks.onBrokenMarkdownLinks - Changes the scaffolded routeBasePath from /docs to / so the docs index serves as the homepage (avoids a broken-link error on /) - Adds npm run alternatives to the quick-start, add-docset, and add-playground guides for users without the CLI installed - Adds local npm link instructions to the quick-start since @devdocify/cli is not yet published to npm - Lists sidebars.ts in the CLI reference docify new output Co-Authored-By: Claude Opus 4.6 --- docs/devdocify/how-to/add-docset.md | 13 +++++++++++++ docs/devdocify/how-to/add-playground.md | 10 ++++++++-- docs/devdocify/reference/cli.md | 1 + docs/devdocify/tutorials/quick-start.md | 22 +++++++++++++++------- packages/cli/src/commands/new.js | 23 +++++++++++++++++++---- 5 files changed, 56 insertions(+), 13 deletions(-) diff --git a/docs/devdocify/how-to/add-docset.md b/docs/devdocify/how-to/add-docset.md index d420e36..cbb4491 100644 --- a/docs/devdocify/how-to/add-docset.md +++ b/docs/devdocify/how-to/add-docset.md @@ -103,6 +103,13 @@ docify validate docify build ``` +Without the CLI, use `npm run` directly: + +```bash +npm run lint-content +npm run build +``` + ## 8. Verify in the browser Run the dev server and verify the new docset route and sidebar: @@ -111,4 +118,10 @@ Run the dev server and verify the new docset route and sidebar: docify dev ``` +Or without the CLI: + +```bash +npm start +``` + Open `http://localhost:3000/myproduct/getting-started` and confirm the sidebar loads your `navigation.json` entries. diff --git a/docs/devdocify/how-to/add-playground.md b/docs/devdocify/how-to/add-playground.md index 2fb4d27..4eb183a 100644 --- a/docs/devdocify/how-to/add-playground.md +++ b/docs/devdocify/how-to/add-playground.md @@ -87,10 +87,10 @@ Run: docify build ``` -If you only want to check link integrity: +Without the CLI, use `npm run` directly: ```bash -docify broken-links +npm run build ``` ## 7. Verify behavior @@ -101,4 +101,10 @@ Start local dev and test at least one request in the playground UI: docify dev ``` +Or without the CLI: + +```bash +npm start +``` + Confirm the route loads and the sample requests return expected responses. diff --git a/docs/devdocify/reference/cli.md b/docs/devdocify/reference/cli.md index 0c16b92..a7c0145 100644 --- a/docs/devdocify/reference/cli.md +++ b/docs/devdocify/reference/cli.md @@ -86,6 +86,7 @@ Scaffolds a new DevDocify project in ``. Creates the directory and wr - `package.json` - `docusaurus.config.ts` +- `sidebars.ts` - `docs/index.md` - `src/css/custom.css` - `.gitignore` diff --git a/docs/devdocify/tutorials/quick-start.md b/docs/devdocify/tutorials/quick-start.md index f6ffa45..884307b 100644 --- a/docs/devdocify/tutorials/quick-start.md +++ b/docs/devdocify/tutorials/quick-start.md @@ -23,13 +23,19 @@ A new documentation site running locally, with content validation and broken-lin ## Step 1: Install the CLI -Install the Docify CLI globally: +If `@devdocify/cli` is published to npm, install it globally: ```bash npm install -g @devdocify/cli ``` -Confirm it's available: +If you are working from a local clone of the `doc-platform` repository, link the CLI instead: + +```bash +cd packages/cli && npm install && npm link +``` + +Confirm it is available: ```bash docify --version @@ -60,6 +66,8 @@ npm install docify dev ``` +Or without the CLI: `npm start`. + Open [http://localhost:3000](http://localhost:3000) in your browser. You should see your new docs site. Edit `docs/index.md` and save. The browser should reload automatically. @@ -76,11 +84,9 @@ Run the content linter to catch common issues before you build: docify validate ``` -If your `package.json` doesn't have a `lint-content` script yet, add one: +Or without the CLI: `npm run lint-content`. -```json -"lint-content": "echo \"No linter configured\"" -``` +The scaffolded project includes a placeholder `lint-content` script. Replace it with a real linter when you are ready. --- @@ -92,7 +98,7 @@ Build the site and check every internal link: docify broken-links ``` -Fix any broken links reported before continuing. +Without the CLI, `npm run build` catches broken links because the scaffolded config sets `onBrokenLinks: 'throw'`. Fix any broken links reported before continuing. --- @@ -104,6 +110,8 @@ Build a production bundle: docify build ``` +Or without the CLI: `npm run build`. + Deploy to Vercel: 1. Push your project to a GitHub repository. diff --git a/packages/cli/src/commands/new.js b/packages/cli/src/commands/new.js index 229e830..db9878a 100644 --- a/packages/cli/src/commands/new.js +++ b/packages/cli/src/commands/new.js @@ -68,7 +68,12 @@ const config: Config = { baseUrl: '/', onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', + + markdown: { + hooks: { + onBrokenMarkdownLinks: 'warn', + }, + }, i18n: { defaultLocale: 'en', @@ -81,7 +86,7 @@ const config: Config = { { docs: { sidebarPath: './sidebars.ts', - routeBasePath: 'docs', + routeBasePath: '/', }, blog: false, theme: { @@ -96,8 +101,8 @@ const config: Config = { title: '${name}', items: [ { - type: 'docSidebar', - sidebarId: 'docs', + type: 'doc', + docId: 'index', position: 'left', label: 'Docs', }, @@ -134,6 +139,15 @@ docify dev \`\`\` `; +const SIDEBARS = `import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'; + +const sidebars: SidebarsConfig = { + docs: [{ type: 'autogenerated', dirName: '.' }], +}; + +export default sidebars; +`; + const CUSTOM_CSS = `/** * Custom CSS for this DevDocify project. * Add your overrides here. @@ -159,6 +173,7 @@ export async function newCommand(directory) { writeFileSync(join(target, 'package.json'), PACKAGE_JSON(name)); writeFileSync(join(target, 'docusaurus.config.ts'), DOCUSAURUS_CONFIG(name)); writeFileSync(join(target, 'docs', 'index.md'), DOCS_INDEX(name)); + writeFileSync(join(target, 'sidebars.ts'), SIDEBARS); writeFileSync(join(target, 'src', 'css', 'custom.css'), CUSTOM_CSS); writeFileSync(join(target, '.gitignore'), GITIGNORE); From 0908616a1d2da4784101283f886c1c68839b237d Mon Sep 17 00:00:00 2001 From: matthewrgourd Date: Wed, 10 Jun 2026 08:51:58 +0100 Subject: [PATCH 2/8] fix: scaffold missing sidebars.ts, fix deprecated config, and add npm run alternatives to docs --- packages/cli/node_modules/.package-lock.json | 260 ++ .../cli/node_modules/ansi-regex/index.d.ts | 33 + packages/cli/node_modules/ansi-regex/index.js | 14 + packages/cli/node_modules/ansi-regex/license | 9 + .../cli/node_modules/ansi-regex/package.json | 61 + .../cli/node_modules/ansi-regex/readme.md | 66 + packages/cli/node_modules/chalk/license | 9 + packages/cli/node_modules/chalk/package.json | 83 + packages/cli/node_modules/chalk/readme.md | 297 ++ .../cli/node_modules/chalk/source/index.d.ts | 325 +++ .../cli/node_modules/chalk/source/index.js | 225 ++ .../node_modules/chalk/source/utilities.js | 33 + .../source/vendor/ansi-styles/index.d.ts | 236 ++ .../chalk/source/vendor/ansi-styles/index.js | 223 ++ .../source/vendor/supports-color/browser.d.ts | 1 + .../source/vendor/supports-color/browser.js | 34 + .../source/vendor/supports-color/index.d.ts | 55 + .../source/vendor/supports-color/index.js | 190 ++ .../cli/node_modules/cli-cursor/index.d.ts | 47 + packages/cli/node_modules/cli-cursor/index.js | 39 + packages/cli/node_modules/cli-cursor/license | 9 + .../cli/node_modules/cli-cursor/package.json | 56 + .../cli/node_modules/cli-cursor/readme.md | 39 + .../cli/node_modules/cli-spinners/index.d.ts | 128 + .../cli/node_modules/cli-spinners/index.js | 15 + .../cli/node_modules/cli-spinners/license | 9 + .../node_modules/cli-spinners/package.json | 50 + .../cli/node_modules/cli-spinners/readme.md | 54 + .../node_modules/cli-spinners/spinners.json | 1622 +++++++++++ packages/cli/node_modules/commander/LICENSE | 22 + packages/cli/node_modules/commander/Readme.md | 1157 ++++++++ packages/cli/node_modules/commander/esm.mjs | 16 + packages/cli/node_modules/commander/index.js | 24 + .../node_modules/commander/lib/argument.js | 149 + .../cli/node_modules/commander/lib/command.js | 2509 +++++++++++++++++ .../cli/node_modules/commander/lib/error.js | 39 + .../cli/node_modules/commander/lib/help.js | 520 ++++ .../cli/node_modules/commander/lib/option.js | 330 +++ .../commander/lib/suggestSimilar.js | 101 + .../commander/package-support.json | 16 + .../cli/node_modules/commander/package.json | 84 + .../node_modules/commander/typings/esm.d.mts | 3 + .../node_modules/commander/typings/index.d.ts | 969 +++++++ .../node_modules/emoji-regex/LICENSE-MIT.txt | 20 + .../cli/node_modules/emoji-regex/README.md | 107 + .../cli/node_modules/emoji-regex/index.d.ts | 3 + .../cli/node_modules/emoji-regex/index.js | 4 + .../cli/node_modules/emoji-regex/index.mjs | 4 + .../cli/node_modules/emoji-regex/package.json | 45 + .../get-east-asian-width/index.d.ts | 60 + .../get-east-asian-width/index.js | 30 + .../node_modules/get-east-asian-width/license | 9 + .../get-east-asian-width/lookup-data.js | 21 + .../get-east-asian-width/lookup.js | 138 + .../get-east-asian-width/package.json | 71 + .../get-east-asian-width/readme.md | 65 + .../get-east-asian-width/utilities.js | 24 + .../node_modules/is-interactive/index.d.ts | 25 + .../cli/node_modules/is-interactive/index.js | 7 + .../cli/node_modules/is-interactive/license | 9 + .../node_modules/is-interactive/package.json | 41 + .../cli/node_modules/is-interactive/readme.md | 52 + .../is-unicode-supported/index.d.ts | 12 + .../is-unicode-supported/index.js | 21 + .../node_modules/is-unicode-supported/license | 9 + .../is-unicode-supported/package.json | 47 + .../is-unicode-supported/readme.md | 35 + .../cli/node_modules/log-symbols/browser.js | 8 + .../cli/node_modules/log-symbols/index.d.ts | 22 + .../cli/node_modules/log-symbols/index.js | 20 + packages/cli/node_modules/log-symbols/license | 9 + .../is-unicode-supported/index.d.ts | 12 + .../is-unicode-supported/index.js | 17 + .../node_modules/is-unicode-supported/license | 9 + .../is-unicode-supported/package.json | 43 + .../is-unicode-supported/readme.md | 35 + .../cli/node_modules/log-symbols/package.json | 57 + .../cli/node_modules/log-symbols/readme.md | 39 + .../node_modules/mimic-function/index.d.ts | 52 + .../cli/node_modules/mimic-function/index.js | 72 + .../cli/node_modules/mimic-function/license | 9 + .../node_modules/mimic-function/package.json | 49 + .../cli/node_modules/mimic-function/readme.md | 80 + packages/cli/node_modules/onetime/index.d.ts | 59 + packages/cli/node_modules/onetime/index.js | 41 + packages/cli/node_modules/onetime/license | 9 + .../cli/node_modules/onetime/package.json | 49 + packages/cli/node_modules/onetime/readme.md | 88 + packages/cli/node_modules/ora/index.d.ts | 332 +++ packages/cli/node_modules/ora/index.js | 424 +++ packages/cli/node_modules/ora/license | 9 + packages/cli/node_modules/ora/package.json | 64 + packages/cli/node_modules/ora/readme.md | 329 +++ .../node_modules/restore-cursor/index.d.ts | 15 + .../cli/node_modules/restore-cursor/index.js | 15 + .../cli/node_modules/restore-cursor/license | 9 + .../node_modules/restore-cursor/package.json | 57 + .../cli/node_modules/restore-cursor/readme.md | 21 + .../cli/node_modules/signal-exit/LICENSE.txt | 16 + .../cli/node_modules/signal-exit/README.md | 74 + .../signal-exit/dist/cjs/browser.d.ts | 12 + .../signal-exit/dist/cjs/browser.d.ts.map | 1 + .../signal-exit/dist/cjs/browser.js | 10 + .../signal-exit/dist/cjs/browser.js.map | 1 + .../signal-exit/dist/cjs/index.d.ts | 48 + .../signal-exit/dist/cjs/index.d.ts.map | 1 + .../signal-exit/dist/cjs/index.js | 279 ++ .../signal-exit/dist/cjs/index.js.map | 1 + .../signal-exit/dist/cjs/package.json | 3 + .../signal-exit/dist/cjs/signals.d.ts | 29 + .../signal-exit/dist/cjs/signals.d.ts.map | 1 + .../signal-exit/dist/cjs/signals.js | 42 + .../signal-exit/dist/cjs/signals.js.map | 1 + .../signal-exit/dist/mjs/browser.d.ts | 12 + .../signal-exit/dist/mjs/browser.d.ts.map | 1 + .../signal-exit/dist/mjs/browser.js | 4 + .../signal-exit/dist/mjs/browser.js.map | 1 + .../signal-exit/dist/mjs/index.d.ts | 48 + .../signal-exit/dist/mjs/index.d.ts.map | 1 + .../signal-exit/dist/mjs/index.js | 275 ++ .../signal-exit/dist/mjs/index.js.map | 1 + .../signal-exit/dist/mjs/package.json | 3 + .../signal-exit/dist/mjs/signals.d.ts | 29 + .../signal-exit/dist/mjs/signals.d.ts.map | 1 + .../signal-exit/dist/mjs/signals.js | 39 + .../signal-exit/dist/mjs/signals.js.map | 1 + .../cli/node_modules/signal-exit/package.json | 106 + .../node_modules/stdin-discarder/index.d.ts | 13 + .../cli/node_modules/stdin-discarder/index.js | 59 + .../cli/node_modules/stdin-discarder/license | 9 + .../node_modules/stdin-discarder/package.json | 42 + .../node_modules/stdin-discarder/readme.md | 37 + .../cli/node_modules/string-width/index.d.ts | 39 + .../cli/node_modules/string-width/index.js | 82 + .../cli/node_modules/string-width/license | 9 + .../node_modules/string-width/package.json | 64 + .../cli/node_modules/string-width/readme.md | 66 + .../cli/node_modules/strip-ansi/index.d.ts | 15 + packages/cli/node_modules/strip-ansi/index.js | 19 + packages/cli/node_modules/strip-ansi/license | 9 + .../cli/node_modules/strip-ansi/package.json | 59 + .../cli/node_modules/strip-ansi/readme.md | 37 + packages/cli/package-lock.json | 276 ++ 143 files changed, 14950 insertions(+) create mode 100644 packages/cli/node_modules/.package-lock.json create mode 100644 packages/cli/node_modules/ansi-regex/index.d.ts create mode 100644 packages/cli/node_modules/ansi-regex/index.js create mode 100644 packages/cli/node_modules/ansi-regex/license create mode 100644 packages/cli/node_modules/ansi-regex/package.json create mode 100644 packages/cli/node_modules/ansi-regex/readme.md create mode 100644 packages/cli/node_modules/chalk/license create mode 100644 packages/cli/node_modules/chalk/package.json create mode 100644 packages/cli/node_modules/chalk/readme.md create mode 100644 packages/cli/node_modules/chalk/source/index.d.ts create mode 100644 packages/cli/node_modules/chalk/source/index.js create mode 100644 packages/cli/node_modules/chalk/source/utilities.js create mode 100644 packages/cli/node_modules/chalk/source/vendor/ansi-styles/index.d.ts create mode 100644 packages/cli/node_modules/chalk/source/vendor/ansi-styles/index.js create mode 100644 packages/cli/node_modules/chalk/source/vendor/supports-color/browser.d.ts create mode 100644 packages/cli/node_modules/chalk/source/vendor/supports-color/browser.js create mode 100644 packages/cli/node_modules/chalk/source/vendor/supports-color/index.d.ts create mode 100644 packages/cli/node_modules/chalk/source/vendor/supports-color/index.js create mode 100644 packages/cli/node_modules/cli-cursor/index.d.ts create mode 100644 packages/cli/node_modules/cli-cursor/index.js create mode 100644 packages/cli/node_modules/cli-cursor/license create mode 100644 packages/cli/node_modules/cli-cursor/package.json create mode 100644 packages/cli/node_modules/cli-cursor/readme.md create mode 100644 packages/cli/node_modules/cli-spinners/index.d.ts create mode 100644 packages/cli/node_modules/cli-spinners/index.js create mode 100644 packages/cli/node_modules/cli-spinners/license create mode 100644 packages/cli/node_modules/cli-spinners/package.json create mode 100644 packages/cli/node_modules/cli-spinners/readme.md create mode 100644 packages/cli/node_modules/cli-spinners/spinners.json create mode 100644 packages/cli/node_modules/commander/LICENSE create mode 100644 packages/cli/node_modules/commander/Readme.md create mode 100644 packages/cli/node_modules/commander/esm.mjs create mode 100644 packages/cli/node_modules/commander/index.js create mode 100644 packages/cli/node_modules/commander/lib/argument.js create mode 100644 packages/cli/node_modules/commander/lib/command.js create mode 100644 packages/cli/node_modules/commander/lib/error.js create mode 100644 packages/cli/node_modules/commander/lib/help.js create mode 100644 packages/cli/node_modules/commander/lib/option.js create mode 100644 packages/cli/node_modules/commander/lib/suggestSimilar.js create mode 100644 packages/cli/node_modules/commander/package-support.json create mode 100644 packages/cli/node_modules/commander/package.json create mode 100644 packages/cli/node_modules/commander/typings/esm.d.mts create mode 100644 packages/cli/node_modules/commander/typings/index.d.ts create mode 100644 packages/cli/node_modules/emoji-regex/LICENSE-MIT.txt create mode 100644 packages/cli/node_modules/emoji-regex/README.md create mode 100644 packages/cli/node_modules/emoji-regex/index.d.ts create mode 100644 packages/cli/node_modules/emoji-regex/index.js create mode 100644 packages/cli/node_modules/emoji-regex/index.mjs create mode 100644 packages/cli/node_modules/emoji-regex/package.json create mode 100644 packages/cli/node_modules/get-east-asian-width/index.d.ts create mode 100644 packages/cli/node_modules/get-east-asian-width/index.js create mode 100644 packages/cli/node_modules/get-east-asian-width/license create mode 100644 packages/cli/node_modules/get-east-asian-width/lookup-data.js create mode 100644 packages/cli/node_modules/get-east-asian-width/lookup.js create mode 100644 packages/cli/node_modules/get-east-asian-width/package.json create mode 100644 packages/cli/node_modules/get-east-asian-width/readme.md create mode 100644 packages/cli/node_modules/get-east-asian-width/utilities.js create mode 100644 packages/cli/node_modules/is-interactive/index.d.ts create mode 100644 packages/cli/node_modules/is-interactive/index.js create mode 100644 packages/cli/node_modules/is-interactive/license create mode 100644 packages/cli/node_modules/is-interactive/package.json create mode 100644 packages/cli/node_modules/is-interactive/readme.md create mode 100644 packages/cli/node_modules/is-unicode-supported/index.d.ts create mode 100644 packages/cli/node_modules/is-unicode-supported/index.js create mode 100644 packages/cli/node_modules/is-unicode-supported/license create mode 100644 packages/cli/node_modules/is-unicode-supported/package.json create mode 100644 packages/cli/node_modules/is-unicode-supported/readme.md create mode 100644 packages/cli/node_modules/log-symbols/browser.js create mode 100644 packages/cli/node_modules/log-symbols/index.d.ts create mode 100644 packages/cli/node_modules/log-symbols/index.js create mode 100644 packages/cli/node_modules/log-symbols/license create mode 100644 packages/cli/node_modules/log-symbols/node_modules/is-unicode-supported/index.d.ts create mode 100644 packages/cli/node_modules/log-symbols/node_modules/is-unicode-supported/index.js create mode 100644 packages/cli/node_modules/log-symbols/node_modules/is-unicode-supported/license create mode 100644 packages/cli/node_modules/log-symbols/node_modules/is-unicode-supported/package.json create mode 100644 packages/cli/node_modules/log-symbols/node_modules/is-unicode-supported/readme.md create mode 100644 packages/cli/node_modules/log-symbols/package.json create mode 100644 packages/cli/node_modules/log-symbols/readme.md create mode 100644 packages/cli/node_modules/mimic-function/index.d.ts create mode 100644 packages/cli/node_modules/mimic-function/index.js create mode 100644 packages/cli/node_modules/mimic-function/license create mode 100644 packages/cli/node_modules/mimic-function/package.json create mode 100644 packages/cli/node_modules/mimic-function/readme.md create mode 100644 packages/cli/node_modules/onetime/index.d.ts create mode 100644 packages/cli/node_modules/onetime/index.js create mode 100644 packages/cli/node_modules/onetime/license create mode 100644 packages/cli/node_modules/onetime/package.json create mode 100644 packages/cli/node_modules/onetime/readme.md create mode 100644 packages/cli/node_modules/ora/index.d.ts create mode 100644 packages/cli/node_modules/ora/index.js create mode 100644 packages/cli/node_modules/ora/license create mode 100644 packages/cli/node_modules/ora/package.json create mode 100644 packages/cli/node_modules/ora/readme.md create mode 100644 packages/cli/node_modules/restore-cursor/index.d.ts create mode 100644 packages/cli/node_modules/restore-cursor/index.js create mode 100644 packages/cli/node_modules/restore-cursor/license create mode 100644 packages/cli/node_modules/restore-cursor/package.json create mode 100644 packages/cli/node_modules/restore-cursor/readme.md create mode 100644 packages/cli/node_modules/signal-exit/LICENSE.txt create mode 100644 packages/cli/node_modules/signal-exit/README.md create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/browser.d.ts create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/browser.d.ts.map create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/browser.js create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/browser.js.map create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/index.d.ts create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/index.d.ts.map create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/index.js create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/index.js.map create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/package.json create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/signals.d.ts create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/signals.d.ts.map create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/signals.js create mode 100644 packages/cli/node_modules/signal-exit/dist/cjs/signals.js.map create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/browser.d.ts create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/browser.d.ts.map create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/browser.js create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/browser.js.map create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/index.d.ts create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/index.d.ts.map create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/index.js create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/index.js.map create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/package.json create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/signals.d.ts create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/signals.d.ts.map create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/signals.js create mode 100644 packages/cli/node_modules/signal-exit/dist/mjs/signals.js.map create mode 100644 packages/cli/node_modules/signal-exit/package.json create mode 100644 packages/cli/node_modules/stdin-discarder/index.d.ts create mode 100644 packages/cli/node_modules/stdin-discarder/index.js create mode 100644 packages/cli/node_modules/stdin-discarder/license create mode 100644 packages/cli/node_modules/stdin-discarder/package.json create mode 100644 packages/cli/node_modules/stdin-discarder/readme.md create mode 100644 packages/cli/node_modules/string-width/index.d.ts create mode 100644 packages/cli/node_modules/string-width/index.js create mode 100644 packages/cli/node_modules/string-width/license create mode 100644 packages/cli/node_modules/string-width/package.json create mode 100644 packages/cli/node_modules/string-width/readme.md create mode 100644 packages/cli/node_modules/strip-ansi/index.d.ts create mode 100644 packages/cli/node_modules/strip-ansi/index.js create mode 100644 packages/cli/node_modules/strip-ansi/license create mode 100644 packages/cli/node_modules/strip-ansi/package.json create mode 100644 packages/cli/node_modules/strip-ansi/readme.md create mode 100644 packages/cli/package-lock.json diff --git a/packages/cli/node_modules/.package-lock.json b/packages/cli/node_modules/.package-lock.json new file mode 100644 index 0000000..51f42a4 --- /dev/null +++ b/packages/cli/node_modules/.package-lock.json @@ -0,0 +1,260 @@ +{ + "name": "@devdocify/cli", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "license": "MIT" + }, + "node_modules/get-east-asian-width": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", + "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", + "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz", + "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/stdin-discarder": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", + "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + } + } +} diff --git a/packages/cli/node_modules/ansi-regex/index.d.ts b/packages/cli/node_modules/ansi-regex/index.d.ts new file mode 100644 index 0000000..7d562e9 --- /dev/null +++ b/packages/cli/node_modules/ansi-regex/index.d.ts @@ -0,0 +1,33 @@ +export type Options = { + /** + Match only the first ANSI escape. + + @default false + */ + readonly onlyFirst: boolean; +}; + +/** +Regular expression for matching ANSI escape codes. + +@example +``` +import ansiRegex from 'ansi-regex'; + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` +*/ +export default function ansiRegex(options?: Options): RegExp; diff --git a/packages/cli/node_modules/ansi-regex/index.js b/packages/cli/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..2cc5ca2 --- /dev/null +++ b/packages/cli/node_modules/ansi-regex/index.js @@ -0,0 +1,14 @@ +export default function ansiRegex({onlyFirst = false} = {}) { + // Valid string terminator sequences are BEL, ESC\, and 0x9c + const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)'; + + // OSC sequences only: ESC ] ... ST (non-greedy until the first ST) + const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`; + + // CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte + const csi = '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]'; + + const pattern = `${osc}|${csi}`; + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +} diff --git a/packages/cli/node_modules/ansi-regex/license b/packages/cli/node_modules/ansi-regex/license new file mode 100644 index 0000000..fa7ceba --- /dev/null +++ b/packages/cli/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/node_modules/ansi-regex/package.json b/packages/cli/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..2efe9eb --- /dev/null +++ b/packages/cli/node_modules/ansi-regex/package.json @@ -0,0 +1,61 @@ +{ + "name": "ansi-regex", + "version": "6.2.2", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "funding": "https://github.com/chalk/ansi-regex?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "type": "module", + "exports": "./index.js", + "types": "./index.d.ts", + "sideEffects": false, + "engines": { + "node": ">=12" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ansi-escapes": "^5.0.0", + "ava": "^3.15.0", + "tsd": "^0.21.0", + "xo": "^0.54.2" + } +} diff --git a/packages/cli/node_modules/ansi-regex/readme.md b/packages/cli/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..4d3c415 --- /dev/null +++ b/packages/cli/node_modules/ansi-regex/readme.md @@ -0,0 +1,66 @@ +# ansi-regex + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + +## Install + +```sh +npm install ansi-regex +``` + +## Usage + +```js +import ansiRegex from 'ansi-regex'; + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` + +## API + +### ansiRegex(options?) + +Returns a regex for matching ANSI escape codes. + +#### options + +Type: `object` + +##### onlyFirst + +Type: `boolean`\ +Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + +## Important + +If you run the regex against untrusted user input in a server context, you should [give it a timeout](https://github.com/sindresorhus/super-regex). + +**I do not consider [ReDoS](https://blog.yossarian.net/2022/12/28/ReDoS-vulnerabilities-and-misaligned-incentives) a valid vulnerability for this package.** + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) diff --git a/packages/cli/node_modules/chalk/license b/packages/cli/node_modules/chalk/license new file mode 100644 index 0000000..fa7ceba --- /dev/null +++ b/packages/cli/node_modules/chalk/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/cli/node_modules/chalk/package.json b/packages/cli/node_modules/chalk/package.json new file mode 100644 index 0000000..c9e0dc5 --- /dev/null +++ b/packages/cli/node_modules/chalk/package.json @@ -0,0 +1,83 @@ +{ + "name": "chalk", + "version": "5.6.2", + "description": "Terminal string styling done right", + "license": "MIT", + "repository": "chalk/chalk", + "funding": "https://github.com/chalk/chalk?sponsor=1", + "type": "module", + "main": "./source/index.js", + "exports": "./source/index.js", + "imports": { + "#ansi-styles": "./source/vendor/ansi-styles/index.js", + "#supports-color": { + "node": "./source/vendor/supports-color/index.js", + "default": "./source/vendor/supports-color/browser.js" + } + }, + "types": "./source/index.d.ts", + "sideEffects": false, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "scripts": { + "test": "xo && c8 ava && tsd", + "bench": "matcha benchmark.js" + }, + "files": [ + "source", + "!source/index.test-d.ts" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "devDependencies": { + "@types/node": "^16.11.10", + "ava": "^3.15.0", + "c8": "^7.10.0", + "color-convert": "^2.0.1", + "execa": "^6.0.0", + "log-update": "^5.0.0", + "matcha": "^0.7.0", + "tsd": "^0.19.0", + "xo": "^0.57.0", + "yoctodelay": "^2.0.0" + }, + "xo": { + "rules": { + "unicorn/prefer-string-slice": "off", + "@typescript-eslint/consistent-type-imports": "off", + "@typescript-eslint/consistent-type-exports": "off", + "@typescript-eslint/consistent-type-definitions": "off", + "unicorn/expiring-todo-comments": "off" + } + }, + "c8": { + "reporter": [ + "text", + "lcov" + ], + "exclude": [ + "source/vendor" + ] + } +} diff --git a/packages/cli/node_modules/chalk/readme.md b/packages/cli/node_modules/chalk/readme.md new file mode 100644 index 0000000..5754e7c --- /dev/null +++ b/packages/cli/node_modules/chalk/readme.md @@ -0,0 +1,297 @@ +

+
+
+ Chalk +
+
+
+

+ +> Terminal string styling done right + +[![Coverage Status](https://codecov.io/gh/chalk/chalk/branch/main/graph/badge.svg)](https://codecov.io/gh/chalk/chalk) +[![npm dependents](https://badgen.net/npm/dependents/chalk)](https://www.npmjs.com/package/chalk?activeTab=dependents) +[![Downloads](https://badgen.net/npm/dt/chalk)](https://www.npmjs.com/package/chalk) + +![](media/screenshot.png) + +## Info + +- [Why not switch to a smaller coloring package?](https://github.com/chalk/chalk?tab=readme-ov-file#why-not-switch-to-a-smaller-coloring-package) +- See [yoctocolors](https://github.com/sindresorhus/yoctocolors) for a smaller alternative + +## Highlights + +- Expressive API +- Highly performant +- No dependencies +- Ability to nest styles +- [256/Truecolor color support](#256-and-truecolor-color-support) +- Auto-detects color support +- Doesn't extend `String.prototype` +- Clean and focused +- Actively maintained +- [Used by ~115,000 packages](https://www.npmjs.com/browse/depended/chalk) as of July 4, 2024 + +## Install + +```sh +npm install chalk +``` + +**IMPORTANT:** Chalk 5 is ESM. If you want to use Chalk with TypeScript or a build tool, you will probably want to use Chalk 4 for now. [Read more.](https://github.com/chalk/chalk/releases/tag/v5.0.0) + +## Usage + +```js +import chalk from 'chalk'; + +console.log(chalk.blue('Hello world!')); +``` + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +import chalk from 'chalk'; + +const log = console.log; + +// Combine styled and normal strings +log(chalk.blue('Hello') + ' World' + chalk.red('!')); + +// Compose multiple styles using the chainable API +log(chalk.blue.bgRed.bold('Hello world!')); + +// Pass in multiple arguments +log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); + +// Nest styles +log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); + +// Nest styles of the same type even (color, underline, background) +log(chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +)); + +// ES2015 template literal +log(` +CPU: ${chalk.red('90%')} +RAM: ${chalk.green('40%')} +DISK: ${chalk.yellow('70%')} +`); + +// Use RGB colors in terminal emulators that support it. +log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); +log(chalk.hex('#DEADED').bold('Bold gray!')); +``` + +Easily define your own themes: + +```js +import chalk from 'chalk'; + +const error = chalk.bold.red; +const warning = chalk.hex('#FFA500'); // Orange color + +console.log(error('Error!')); +console.log(warning('Warning!')); +``` + +Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): + +```js +import chalk from 'chalk'; + +const name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> 'Hello Sindre' +``` + +## API + +### chalk.`