@gitpagedocs/cli 1.1.55 → 1.1.56

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.
@@ -1,4 +1,4 @@
1
- export const defaultLangMenu = {
1
+ export const defaultLangMenu = {
2
2
  pt: {
3
3
  pt: "Portugues",
4
4
  en: "Ingles",
@@ -15,23 +15,23 @@ export const defaultLangMenu = {
15
15
  typeToNavigate: "Digite para navegar...",
16
16
  noNavigationResults: "Nenhum resultado de navegacao.",
17
17
  focusMode: "Modo foco",
18
- versionLinksLabel: "Links do repositorio",
19
- titleHeaderMenuMd: "Markdown",
20
- titleHeaderMenuSourceViewer: "Codigo fonte",
21
- titleHeaderMenuVideo: "Vídeo",
22
- titleHeaderMenuAudio: "Áudio",
23
- titleHeaderMenuHtml: "Páginas",
24
- sourceViewerBranchLabel: "Branch",
25
- sourceViewerFilterLabel: "Filtrar arquivos",
26
- sourceViewerClearLabel: "Limpar",
27
- sourceViewerLoadingTree: "Carregando arvore do repositorio...",
28
- sourceViewerLoadingFile: "Carregando arquivo...",
29
- sourceViewerNotFound: "Repositorio, branch ou arvore de codigo nao encontrado.",
30
- sourceViewerFileError: "Nao foi possivel carregar o arquivo.",
31
- sourceViewerEmpty: "Nenhuma entrada encontrada.",
32
- sourceViewerSelectFile: "Selecione um arquivo",
33
- sourceViewerPreview: "Preview",
34
- sourceViewerCode: "Codigo",
18
+ versionLinksLabel: "Links do repositorio",
19
+ titleHeaderMenuMd: "Markdown",
20
+ titleHeaderMenuSourceViewer: "Codigo fonte",
21
+ titleHeaderMenuVideo: "Vídeo",
22
+ titleHeaderMenuAudio: "Áudio",
23
+ titleHeaderMenuHtml: "Páginas",
24
+ sourceViewerBranchLabel: "Branch",
25
+ sourceViewerFilterLabel: "Filtrar arquivos",
26
+ sourceViewerClearLabel: "Limpar",
27
+ sourceViewerLoadingTree: "Carregando arvore do repositorio...",
28
+ sourceViewerLoadingFile: "Carregando arquivo...",
29
+ sourceViewerNotFound: "Repositorio, branch ou arvore de codigo nao encontrado.",
30
+ sourceViewerFileError: "Nao foi possivel carregar o arquivo.",
31
+ sourceViewerEmpty: "Nenhuma entrada encontrada.",
32
+ sourceViewerSelectFile: "Selecione um arquivo",
33
+ sourceViewerPreview: "Preview",
34
+ sourceViewerCode: "Codigo",
35
35
  lastUpdateVersionLabel: "Ultima versao de atualizacao",
36
36
  darkMode: "Modo escuro",
37
37
  lightMode: "Modo claro",
@@ -241,23 +241,23 @@ export const defaultLangMenu = {
241
241
  typeToNavigate: "Escribe para navegar...",
242
242
  noNavigationResults: "Sin resultados de navegacion.",
243
243
  focusMode: "Modo foco",
244
- versionLinksLabel: "Enlaces del repositorio",
245
- titleHeaderMenuMd: "Markdown",
246
- titleHeaderMenuSourceViewer: "Codigo fuente",
247
- titleHeaderMenuVideo: "Vídeo",
248
- titleHeaderMenuAudio: "Áudio",
249
- titleHeaderMenuHtml: "Páginas",
250
- sourceViewerBranchLabel: "Branch",
251
- sourceViewerFilterLabel: "Filtrar archivos",
252
- sourceViewerClearLabel: "Limpiar",
253
- sourceViewerLoadingTree: "Cargando arbol del repositorio...",
254
- sourceViewerLoadingFile: "Cargando archivo...",
255
- sourceViewerNotFound: "Repositorio, branch o arbol de codigo no encontrado.",
256
- sourceViewerFileError: "No se pudo cargar el archivo.",
257
- sourceViewerEmpty: "No se encontraron entradas.",
258
- sourceViewerSelectFile: "Selecciona un archivo",
259
- sourceViewerPreview: "Preview",
260
- sourceViewerCode: "Codigo",
244
+ versionLinksLabel: "Enlaces del repositorio",
245
+ titleHeaderMenuMd: "Markdown",
246
+ titleHeaderMenuSourceViewer: "Codigo fuente",
247
+ titleHeaderMenuVideo: "Vídeo",
248
+ titleHeaderMenuAudio: "Áudio",
249
+ titleHeaderMenuHtml: "Páginas",
250
+ sourceViewerBranchLabel: "Branch",
251
+ sourceViewerFilterLabel: "Filtrar archivos",
252
+ sourceViewerClearLabel: "Limpiar",
253
+ sourceViewerLoadingTree: "Cargando arbol del repositorio...",
254
+ sourceViewerLoadingFile: "Cargando archivo...",
255
+ sourceViewerNotFound: "Repositorio, branch o arbol de codigo no encontrado.",
256
+ sourceViewerFileError: "No se pudo cargar el archivo.",
257
+ sourceViewerEmpty: "No se encontraron entradas.",
258
+ sourceViewerSelectFile: "Selecciona un archivo",
259
+ sourceViewerPreview: "Preview",
260
+ sourceViewerCode: "Codigo",
261
261
  lastUpdateVersionLabel: "Ultima version de actualizacion",
262
262
  darkMode: "Modo oscuro",
263
263
  lightMode: "Modo claro",
@@ -1,26 +1,26 @@
1
- /** Path and media mappings for doc versions */
2
-
3
- export const ROUTE_PATHS = {
4
- 1: { pt: "getting-started.md", en: "getting-started.md", es: "getting-started.md" },
5
- 2: { pt: "project-overview.md", en: "project-overview.md", es: "project-overview.md" },
6
- 3: { pt: "functionalities.md", en: "functionalities.md", es: "functionalities.md" },
7
- 4: { pt: "github-issues-projects.md", en: "github-issues-projects.md", es: "github-issues-projects.md" },
8
- 5: { pt: "git-introduction.md", en: "git-introduction.md", es: "git-introduction.md" },
9
- 6: { pt: "authorized-routes.md", en: "authorized-routes.md", es: "authorized-routes.md" },
10
- };
11
-
12
- export const VIDEO_IDS = ["bdIJkGr2NV0", "c67GaAkf1BE", "N3my6W_Rdwg", "r8jQ9hVA2qs"];
13
- export const AUDIO_IDS = ["0w80F8FffQ4"];
14
-
15
- export const PAGE2_AUDIO = {
16
- enabled: true,
17
- autoPlayOnLoad: true,
18
- loopEnabled: false,
19
- tracks: [
20
- {
21
- url: "https://www.youtube.com/watch?v=0w80F8FffQ4",
22
- type: "youtube",
23
- title: { pt: "Musica pagina 2", en: "Page 2 music", es: "Musica pagina 2" },
24
- },
25
- ],
26
- };
1
+ /** Path and media mappings for doc versions */
2
+
3
+ export const ROUTE_PATHS = {
4
+ 1: { pt: "getting-started.md", en: "getting-started.md", es: "getting-started.md" },
5
+ 2: { pt: "project-overview.md", en: "project-overview.md", es: "project-overview.md" },
6
+ 3: { pt: "functionalities.md", en: "functionalities.md", es: "functionalities.md" },
7
+ 4: { pt: "github-issues-projects.md", en: "github-issues-projects.md", es: "github-issues-projects.md" },
8
+ 5: { pt: "git-introduction.md", en: "git-introduction.md", es: "git-introduction.md" },
9
+ 6: { pt: "authorized-routes.md", en: "authorized-routes.md", es: "authorized-routes.md" },
10
+ };
11
+
12
+ export const VIDEO_IDS = ["bdIJkGr2NV0", "c67GaAkf1BE", "N3my6W_Rdwg", "r8jQ9hVA2qs"];
13
+ export const AUDIO_IDS = ["0w80F8FffQ4"];
14
+
15
+ export const PAGE2_AUDIO = {
16
+ enabled: true,
17
+ autoPlayOnLoad: true,
18
+ loopEnabled: false,
19
+ tracks: [
20
+ {
21
+ url: "https://www.youtube.com/watch?v=0w80F8FffQ4",
22
+ type: "youtube",
23
+ title: { pt: "Musica pagina 2", en: "Page 2 music", es: "Musica pagina 2" },
24
+ },
25
+ ],
26
+ };
@@ -1,93 +1,93 @@
1
- /** Route and video metadata for doc versions */
2
-
3
- export const DEFAULT_HIERARCHY = { md: 0, "source-viewer": 1, html: 2, video: 3, audio: 4 };
4
-
5
- export const ROUTE_META_ID1 = {
6
- titles: { pt: "Primeiros passos", en: "Getting Started", es: "Primeros pasos" },
7
- descriptions: { pt: "Configure o repositório do zero", en: "Configure repository from zero", es: "Configura el repositorio desde cero" },
8
- };
9
-
10
- export const ROUTE_META_ID2 = {
11
- titles: { pt: "Visão geral do projeto", en: "Project overview", es: "Visión general del proyecto" },
12
- descriptions: { pt: "Stack, objetivo e estrutura do Git Page Docs", en: "Stack, goals and structure of Git Page Docs", es: "Stack, objetivos y estructura de Git Page Docs" },
13
- };
14
-
15
- export const ROUTE_META_ID3 = {
16
- titles: { pt: "Funcionalidades", en: "Functionalities", es: "Funcionalidades" },
17
- descriptions: { pt: "CLI, opções, configuração e recursos", en: "CLI, options, configuration and features", es: "CLI, opciones, configuración y funciones" },
18
- };
19
-
20
- export const ROUTE_META_ID4 = {
21
- titles: { pt: "GitHub Issues e Projects", en: "GitHub issues and projects", es: "GitHub issues y projects" },
22
- descriptions: { pt: "Como usar Issues e Projects no GitHub", en: "How to use GitHub Issues and Projects", es: "Cómo usar GitHub Issues y Projects" },
23
- };
24
-
25
- export const ROUTE_META_ID5 = {
26
- titles: { pt: "Introdução ao Git", en: "Introduction to Git", es: "Introducción a Git" },
27
- descriptions: { pt: "Conceitos básicos de Git para iniciantes", en: "Basic Git concepts for beginners", es: "Conceptos básicos de Git para principiantes" },
28
- };
29
-
30
- export const ROUTE_META_ID6 = {
31
- titles: { pt: "Rotas autorizadas", en: "Authorized routes", es: "Rutas autorizadas" },
32
- descriptions: {
33
- pt: "Controle acesso por chave, roles e provedores externos",
34
- en: "Control access by key, roles and external providers",
35
- es: "Controla acceso por clave, roles y proveedores externos",
36
- },
37
- };
38
-
39
- export const SOURCE_VIEWER_META = {
40
- id: 7,
41
- titles: { pt: "Codigo fonte", en: "Source code", es: "Codigo fuente" },
42
- descriptions: {
43
- pt: "Explore a arvore do repositorio, navegue por pastas e visualize arquivos diretamente na documentacao.",
44
- en: "Explore the repository tree, browse folders, and preview files directly inside the documentation.",
45
- es: "Explora el arbol del repositorio, navega por carpetas y previsualiza archivos directamente en la documentacion.",
46
- },
47
- };
48
-
49
- export const AUDIO_META_ID12 = {
50
- id: 12,
51
- title: { pt: "Trilha de audio", en: "Audio track", es: "Pista de audio" },
52
- description: {
53
- pt: "Ouça uma faixa de exemplo diretamente na documentacao.",
54
- en: "Listen to a sample track directly inside the documentation.",
55
- es: "Escucha una pista de ejemplo directamente en la documentacion.",
56
- },
57
- };
58
-
59
- export const VIDEO_META_ID1 = {
60
- title: { pt: "Interactive vs non-interactive modes | Copilot CLI for beginners", en: "Interactive vs non-interactive modes | Copilot CLI for beginners", es: "Interactive vs non-interactive modes | Copilot CLI for beginners" },
61
- description: {
62
- pt: "Quer saber a forma mais rápida de usar o GitHub Copilot no terminal? Neste tutorial, exploramos os dois modos principais do Copilot CLI.",
63
- en: "Want to know the fastest way to prompt GitHub Copilot from your terminal? In this beginner tutorial, we explore the two main modes of the Copilot CLI. Discover how to use the interactive mode to have GitHub Copilot run your project locally or use the non-interactive mode with the -p flag for quick summaries without leaving your shell context.",
64
- es: "¿Quieres conocer la forma más rápida de usar GitHub Copilot desde tu terminal? En este tutorial exploramos los dos modos principales del Copilot CLI.",
65
- },
66
- };
67
-
68
- export const VIDEO_META_ID2 = {
69
- title: { pt: "How to use GitHub issues and projects | GitHub for Beginners", en: "How to use GitHub issues and projects | GitHub for Beginners", es: "How to use GitHub issues and projects | GitHub for Beginners" },
70
- description: {
71
- pt: "Aprenda a usar GitHub Issues e Projects para gerenciar seu trabalho.",
72
- en: "Learn how to use GitHub Issues and Projects to manage your work effectively.",
73
- es: "Aprende a usar GitHub Issues y Projects para gestionar tu trabajo.",
74
- },
75
- };
76
-
77
- export const VIDEO_META_ID3 = {
78
- title: { pt: "How I built an AI Python tutor with the GitHub Copilot SDK", en: "How I built an AI Python tutor with the GitHub Copilot SDK", es: "How I built an AI Python tutor with the GitHub Copilot SDK" },
79
- description: {
80
- pt: "Construindo um tutor de Python com IA usando o GitHub Copilot SDK.",
81
- en: "Building an AI Python tutor using the GitHub Copilot SDK.",
82
- es: "Construyendo un tutor de Python con IA usando el GitHub Copilot SDK.",
83
- },
84
- };
85
-
86
- export const VIDEO_META_ID4 = {
87
- title: { pt: "A brief introduction to Git for beginners | GitHub", en: "A brief introduction to Git for beginners | GitHub", es: "A brief introduction to Git for beginners | GitHub" },
88
- description: {
89
- pt: "Introdução ao Git para iniciantes.",
90
- en: "A brief introduction to Git for beginners.",
91
- es: "Una breve introducción a Git para principiantes.",
92
- },
93
- };
1
+ /** Route and video metadata for doc versions */
2
+
3
+ export const DEFAULT_HIERARCHY = { md: 0, "source-viewer": 1, html: 2, video: 3, audio: 4 };
4
+
5
+ export const ROUTE_META_ID1 = {
6
+ titles: { pt: "Primeiros passos", en: "Getting Started", es: "Primeros pasos" },
7
+ descriptions: { pt: "Configure o repositório do zero", en: "Configure repository from zero", es: "Configura el repositorio desde cero" },
8
+ };
9
+
10
+ export const ROUTE_META_ID2 = {
11
+ titles: { pt: "Visão geral do projeto", en: "Project overview", es: "Visión general del proyecto" },
12
+ descriptions: { pt: "Stack, objetivo e estrutura do Git Page Docs", en: "Stack, goals and structure of Git Page Docs", es: "Stack, objetivos y estructura de Git Page Docs" },
13
+ };
14
+
15
+ export const ROUTE_META_ID3 = {
16
+ titles: { pt: "Funcionalidades", en: "Functionalities", es: "Funcionalidades" },
17
+ descriptions: { pt: "CLI, opções, configuração e recursos", en: "CLI, options, configuration and features", es: "CLI, opciones, configuración y funciones" },
18
+ };
19
+
20
+ export const ROUTE_META_ID4 = {
21
+ titles: { pt: "GitHub Issues e Projects", en: "GitHub issues and projects", es: "GitHub issues y projects" },
22
+ descriptions: { pt: "Como usar Issues e Projects no GitHub", en: "How to use GitHub Issues and Projects", es: "Cómo usar GitHub Issues y Projects" },
23
+ };
24
+
25
+ export const ROUTE_META_ID5 = {
26
+ titles: { pt: "Introdução ao Git", en: "Introduction to Git", es: "Introducción a Git" },
27
+ descriptions: { pt: "Conceitos básicos de Git para iniciantes", en: "Basic Git concepts for beginners", es: "Conceptos básicos de Git para principiantes" },
28
+ };
29
+
30
+ export const ROUTE_META_ID6 = {
31
+ titles: { pt: "Rotas autorizadas", en: "Authorized routes", es: "Rutas autorizadas" },
32
+ descriptions: {
33
+ pt: "Controle acesso por chave, roles e provedores externos",
34
+ en: "Control access by key, roles and external providers",
35
+ es: "Controla acceso por clave, roles y proveedores externos",
36
+ },
37
+ };
38
+
39
+ export const SOURCE_VIEWER_META = {
40
+ id: 7,
41
+ titles: { pt: "Codigo fonte", en: "Source code", es: "Codigo fuente" },
42
+ descriptions: {
43
+ pt: "Explore a arvore do repositorio, navegue por pastas e visualize arquivos diretamente na documentacao.",
44
+ en: "Explore the repository tree, browse folders, and preview files directly inside the documentation.",
45
+ es: "Explora el arbol del repositorio, navega por carpetas y previsualiza archivos directamente en la documentacion.",
46
+ },
47
+ };
48
+
49
+ export const AUDIO_META_ID12 = {
50
+ id: 12,
51
+ title: { pt: "Trilha de audio", en: "Audio track", es: "Pista de audio" },
52
+ description: {
53
+ pt: "Ouça uma faixa de exemplo diretamente na documentacao.",
54
+ en: "Listen to a sample track directly inside the documentation.",
55
+ es: "Escucha una pista de ejemplo directamente en la documentacion.",
56
+ },
57
+ };
58
+
59
+ export const VIDEO_META_ID1 = {
60
+ title: { pt: "Interactive vs non-interactive modes | Copilot CLI for beginners", en: "Interactive vs non-interactive modes | Copilot CLI for beginners", es: "Interactive vs non-interactive modes | Copilot CLI for beginners" },
61
+ description: {
62
+ pt: "Quer saber a forma mais rápida de usar o GitHub Copilot no terminal? Neste tutorial, exploramos os dois modos principais do Copilot CLI.",
63
+ en: "Want to know the fastest way to prompt GitHub Copilot from your terminal? In this beginner tutorial, we explore the two main modes of the Copilot CLI. Discover how to use the interactive mode to have GitHub Copilot run your project locally or use the non-interactive mode with the -p flag for quick summaries without leaving your shell context.",
64
+ es: "¿Quieres conocer la forma más rápida de usar GitHub Copilot desde tu terminal? En este tutorial exploramos los dos modos principales del Copilot CLI.",
65
+ },
66
+ };
67
+
68
+ export const VIDEO_META_ID2 = {
69
+ title: { pt: "How to use GitHub issues and projects | GitHub for Beginners", en: "How to use GitHub issues and projects | GitHub for Beginners", es: "How to use GitHub issues and projects | GitHub for Beginners" },
70
+ description: {
71
+ pt: "Aprenda a usar GitHub Issues e Projects para gerenciar seu trabalho.",
72
+ en: "Learn how to use GitHub Issues and Projects to manage your work effectively.",
73
+ es: "Aprende a usar GitHub Issues y Projects para gestionar tu trabajo.",
74
+ },
75
+ };
76
+
77
+ export const VIDEO_META_ID3 = {
78
+ title: { pt: "How I built an AI Python tutor with the GitHub Copilot SDK", en: "How I built an AI Python tutor with the GitHub Copilot SDK", es: "How I built an AI Python tutor with the GitHub Copilot SDK" },
79
+ description: {
80
+ pt: "Construindo um tutor de Python com IA usando o GitHub Copilot SDK.",
81
+ en: "Building an AI Python tutor using the GitHub Copilot SDK.",
82
+ es: "Construyendo un tutor de Python con IA usando el GitHub Copilot SDK.",
83
+ },
84
+ };
85
+
86
+ export const VIDEO_META_ID4 = {
87
+ title: { pt: "A brief introduction to Git for beginners | GitHub", en: "A brief introduction to Git for beginners | GitHub", es: "A brief introduction to Git for beginners | GitHub" },
88
+ description: {
89
+ pt: "Introdução ao Git para iniciantes.",
90
+ en: "A brief introduction to Git for beginners.",
91
+ es: "Una breve introducción a Git para principiantes.",
92
+ },
93
+ };
package/data/urls.mjs CHANGED
@@ -1,7 +1,12 @@
1
- /** Official layout URLs for git-page-docs repository */
2
-
3
- export const OFFICIAL_LAYOUTS_CONFIG_URL =
4
- "https://github.com/Vidigal-code/git-page-docs/blob/main/gitpagedocs/layouts/layoutsConfig.json";
5
-
6
- export const OFFICIAL_LAYOUTS_TEMPLATES_URL =
7
- "https://github.com/Vidigal-code/git-page-docs/blob/main/gitpagedocs/layouts/templates";
1
+ /** Official layout URLs for git-page-docs repository.
2
+ * The canonical home is the root `gitpagelayouts/` folder; the legacy
3
+ * `gitpagedocs/layouts/` folder stays online for older deployments. */
4
+
5
+ export const OFFICIAL_LAYOUTS_CONFIG_URL =
6
+ "https://github.com/Vidigal-code/git-page-docs/blob/main/gitpagelayouts/layoutsConfig.json";
7
+
8
+ export const OFFICIAL_LAYOUTS_TEMPLATES_URL =
9
+ "https://github.com/Vidigal-code/git-page-docs/blob/main/gitpagelayouts/templates";
10
+
11
+ export const LEGACY_OFFICIAL_LAYOUTS_CONFIG_URL =
12
+ "https://github.com/Vidigal-code/git-page-docs/blob/main/gitpagedocs/layouts/layoutsConfig.json";
package/package.json CHANGED
@@ -1,60 +1,60 @@
1
- {
2
- "name": "@gitpagedocs/cli",
3
- "version": "1.1.55",
4
- "description": "CLI that scaffolds and maintains gitpagedocs documentation, generates docs with AI, configures GitHub Pages, and runs the MCP server.",
5
- "bin": {
6
- "gitpagedocs": "index.mjs"
7
- },
8
- "main": "index.mjs",
9
- "files": [
10
- "index.mjs",
11
- "start.mjs",
12
- "ai",
13
- "application",
14
- "builders",
15
- "content",
16
- "contracts",
17
- "data",
18
- "domain",
19
- "home",
20
- "infrastructure",
21
- "presentation",
22
- "runtime",
23
- "ui",
24
- "prebuilt",
25
- "README.md"
26
- ],
27
- "engines": {
28
- "node": ">=20"
29
- },
30
- "dependencies": {
31
- "@clack/prompts": "^1.5.1",
32
- "@gitpagedocs/mcp": "^1.1.54",
33
- "@gitpagedocs/tools": "^1.1.54",
34
- "tsx": "^4.21.0"
35
- },
36
- "repository": {
37
- "type": "git",
38
- "url": "git+https://github.com/Vidigal-code/git-page-docs.git",
39
- "directory": "cli"
40
- },
41
- "keywords": [
42
- "gitpagedocs",
43
- "documentation",
44
- "markdown",
45
- "spa",
46
- "cli",
47
- "github-pages",
48
- "create-gitpagedocs"
49
- ],
50
- "author": "Vidigal-code",
51
- "license": "ISC",
52
- "bugs": {
53
- "url": "https://github.com/Vidigal-code/git-page-docs/issues"
54
- },
55
- "homepage": "https://vidigal-code.github.io/git-page-docs/",
56
- "publishConfig": {
57
- "registry": "https://registry.npmjs.org/",
58
- "access": "public"
59
- }
60
- }
1
+ {
2
+ "name": "@gitpagedocs/cli",
3
+ "version": "1.1.56",
4
+ "description": "CLI that scaffolds and maintains gitpagedocs documentation, generates docs with AI, configures GitHub Pages, and runs the MCP server.",
5
+ "bin": {
6
+ "gitpagedocs": "index.mjs"
7
+ },
8
+ "main": "index.mjs",
9
+ "files": [
10
+ "index.mjs",
11
+ "start.mjs",
12
+ "ai",
13
+ "application",
14
+ "builders",
15
+ "content",
16
+ "contracts",
17
+ "data",
18
+ "domain",
19
+ "home",
20
+ "infrastructure",
21
+ "presentation",
22
+ "runtime",
23
+ "ui",
24
+ "prebuilt",
25
+ "README.md"
26
+ ],
27
+ "engines": {
28
+ "node": ">=20"
29
+ },
30
+ "dependencies": {
31
+ "@clack/prompts": "^1.5.1",
32
+ "@gitpagedocs/mcp": "^1.1.56",
33
+ "@gitpagedocs/tools": "^1.1.56",
34
+ "tsx": "^4.21.0"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/Vidigal-code/git-page-docs.git",
39
+ "directory": "cli"
40
+ },
41
+ "keywords": [
42
+ "gitpagedocs",
43
+ "documentation",
44
+ "markdown",
45
+ "spa",
46
+ "cli",
47
+ "github-pages",
48
+ "create-gitpagedocs"
49
+ ],
50
+ "author": "Vidigal-code",
51
+ "license": "ISC",
52
+ "bugs": {
53
+ "url": "https://github.com/Vidigal-code/git-page-docs/issues"
54
+ },
55
+ "homepage": "https://vidigal-code.github.io/git-page-docs/",
56
+ "publishConfig": {
57
+ "registry": "https://registry.npmjs.org/",
58
+ "access": "public"
59
+ }
60
+ }
@@ -0,0 +1,23 @@
1
+ import { AiConfigFileRepository } from "../../ai/infrastructure/ai-config-file";
2
+ import type { CommandContext } from "./run-command";
3
+
4
+ /**
5
+ * `gitpagedocs config clear` — delete the stored `.gitpagedocsconfig` from the
6
+ * per-user config directory and any legacy repo-root copy, wiping the saved AI
7
+ * credentials (API key, provider, scan paths).
8
+ */
9
+ export async function runConfigClear(ctx: CommandContext): Promise<void> {
10
+ const repository = new AiConfigFileRepository({ cwd: ctx.cwd });
11
+ const removed = await repository.clear();
12
+
13
+ if (!removed.length) {
14
+ // eslint-disable-next-line no-console
15
+ console.log("\n No stored .gitpagedocsconfig found - nothing to clear.\n");
16
+ return;
17
+ }
18
+
19
+ // eslint-disable-next-line no-console
20
+ console.log(
21
+ ["", " Stored AI configuration removed (credentials wiped):", ...removed.map((p) => ` - ${p}`), ""].join("\n"),
22
+ );
23
+ }
@@ -50,7 +50,7 @@ export async function runDoctor(ctx: CommandContext): Promise<void> {
50
50
  console.log("\n gitpagedocs doctor\n");
51
51
  for (const c of checks) {
52
52
  // eslint-disable-next-line no-console
53
- console.log(` ${c.ok ? "✓" : "✗"} ${c.label.padEnd(22)} ${c.detail}`);
53
+ console.log(` ${c.ok ? "[ok]" : "[x] "} ${c.label.padEnd(22)} ${c.detail}`);
54
54
  }
55
55
  const failed = checks.filter((c) => !c.ok && c.label !== "gh (GitHub CLI)").length;
56
56
  // eslint-disable-next-line no-console
@@ -18,6 +18,7 @@ export type CommandHandler = (ctx: CommandContext) => Promise<void>;
18
18
  import { runVersion, runDoctor, runUpdate } from "./diagnostics";
19
19
  import { runProvider, runModels } from "./ai-info";
20
20
  import { runConfig } from "./config-info";
21
+ import { runConfigClear } from "./config-clear";
21
22
  import { runMcp } from "./mcp";
22
23
  import { runDocs } from "./docs";
23
24
  import { runPagesActions, runPagesDeploy } from "./pages";
@@ -54,6 +55,11 @@ export async function runNewCommand(argv: string[], pkgRoot: string): Promise<bo
54
55
  await runPagesDeploy(ctx);
55
56
  return true;
56
57
  }
58
+ // Wipe the stored AI credentials config: `config clear`.
59
+ if (args[0] === "config" && args[1] === "clear") {
60
+ await runConfigClear(ctx);
61
+ return true;
62
+ }
57
63
 
58
64
  const handler = REGISTRY[args[0] ?? ""];
59
65
  if (!handler) return false;
@@ -100,7 +100,7 @@ async function main(): Promise<void> {
100
100
 
101
101
  const pages = result.summary.pages ?? [];
102
102
  console.log(
103
- `\n🎉 Processo completo! Páginas no padrão gitpagedocs: ${pages.join(", ") || "(nenhuma)"}`,
103
+ `\nProcesso completo. Páginas no padrão gitpagedocs: ${pages.join(", ") || "(nenhuma)"}`,
104
104
  );
105
105
  console.log(
106
106
  `[gitpagedocs:ai] ${result.summary.outputs.length} arquivos markdown gerados e conectados ao config.json da versão mais recente.`,
@@ -1,4 +1,4 @@
1
- import { existsSync, readdirSync, rmSync } from "node:fs";
1
+ import { existsSync, readdirSync, rmSync } from "node:fs";
2
2
  import { mkdir, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import {
@@ -15,37 +15,37 @@ function isWithin(parent, child) {
15
15
  return !rel.startsWith("..") && !path.isAbsolute(rel);
16
16
  }
17
17
 
18
- const DEFAULT_ICON_SVG = `<?xml version="1.0" encoding="utf-8"?>
18
+ const DEFAULT_ICON_SVG = `<?xml version="1.0" encoding="utf-8"?>
19
19
  <svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
20
20
  <path opacity="0.1" fill-rule="evenodd" clip-rule="evenodd" d="M12 3C4.5885 3 3 4.5885 3 12C3 19.4115 4.5885 21 12 21C19.4115 21 21 19.4115 21 12C21 4.5885 19.4115 3 12 3ZM14.2695 9.03471C15.1872 8.34452 15.7204 8.25293 15.9299 8.25017C16.1326 8.86788 16.1588 9.54654 16.0042 10.1835C15.9945 10.2234 15.9842 10.263 15.9731 10.3025C15.941 10.4168 15.9647 10.5393 16.0366 10.6333L16.0377 10.6347C16.0521 10.6537 16.0664 10.6728 16.0805 10.6922C16.5194 11.2949 16.7603 12.0687 16.7497 12.8714L16.7496 12.8747C16.7496 14.5738 16.3076 15.5644 15.6994 16.1583C15.0859 16.7572 14.2627 16.9938 13.4137 17.0968L13.3898 17.0997L13.3777 17.1014C12.443 17.2601 11.5456 17.2688 10.6078 17.1286L10.604 17.1281L10.5687 17.1233C9.72415 17.0085 8.90483 16.7616 8.29455 16.1566C7.68912 15.5564 7.25036 14.5643 7.25038 12.8747L7.25034 12.8714C7.23972 12.0687 7.48056 11.2949 7.91949 10.6922C7.93482 10.6711 7.9504 10.6503 7.96621 10.6297C8.03648 10.538 8.05962 10.4184 8.02812 10.3068L8.02599 10.2993C8.01523 10.2608 8.00513 10.2222 7.99569 10.1834C7.84087 9.54684 7.86561 8.86863 8.0659 8.25016C8.27679 8.2528 8.81228 8.34432 9.73045 9.03473C9.76619 9.0616 9.80249 9.08937 9.83937 9.11807C9.93139 9.19 10.0529 9.21205 10.1644 9.17703L10.1657 9.17661C10.2268 9.15768 10.2882 9.13972 10.3496 9.12272C11.4349 8.82255 12.5651 8.82255 13.6504 9.12272C13.7088 9.13888 13.7671 9.15592 13.8253 9.17382L13.8277 9.17457C13.9431 9.21015 14.0704 9.18836 14.1678 9.11252C14.2022 9.08578 14.2361 9.05985 14.2695 9.03471Z" fill="#323232"/>
21
21
  <path d="M13.717 8.88177C12.5881 8.56954 11.4119 8.56954 10.283 8.88177C10.2637 8.8871 10.2444 8.89254 10.2252 8.89808C10.1067 8.93218 9.97923 8.909 9.8807 8.83491V8.83491C8.69311 7.94193 8.07278 7.98181 7.91927 8.01161V8.01161C7.8946 8.0164 7.87585 8.03481 7.86732 8.05844C7.86516 8.06441 7.86303 8.07038 7.8609 8.07636C7.61639 8.76505 7.57904 9.52813 7.75277 10.2425C7.76289 10.2841 7.77371 10.3255 7.78525 10.3667C7.78601 10.3694 7.78677 10.3721 7.78753 10.3748C7.79754 10.4102 7.7902 10.4483 7.7678 10.4776V10.4776C7.75074 10.4998 7.73394 10.5223 7.71741 10.545C7.24479 11.1939 6.98907 12.0213 7.00036 12.8747C7.00036 16.3399 8.80396 17.1358 10.535 17.3711L10.5708 17.3758C11.5347 17.5199 12.4587 17.511 13.4195 17.3479L13.4438 17.345C15.1832 17.1339 16.9996 16.3587 16.9996 12.8747C17.0109 12.0213 16.7552 11.1939 16.2826 10.545C16.2674 10.5242 16.252 10.5035 16.2364 10.483C16.236 10.4825 16.2356 10.482 16.2352 10.4815C16.211 10.4498 16.203 10.4085 16.2138 10.3701V10.3701C16.2257 10.3277 16.2368 10.2852 16.2471 10.2425C16.421 9.52611 16.3815 8.76076 16.1329 8.07176C16.1313 8.06753 16.1298 8.06331 16.1283 8.05909C16.1195 8.03503 16.1004 8.01628 16.0752 8.01142V8.01142C15.921 7.98164 15.3041 7.94381 14.1193 8.83491V8.83491C14.0208 8.90896 13.8933 8.93197 13.7748 8.89804C13.7556 8.89252 13.7363 8.8871 13.717 8.88177Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
22
22
  <path d="M3 12C3 4.5885 4.5885 3 12 3C19.4115 3 21 4.5885 21 12C21 19.4115 19.4115 21 12 21C4.5885 21 3 19.4115 3 12Z" stroke="#323232" stroke-width="2"/>
23
- </svg>
24
- `;
25
-
26
- function listExistingVersionIds(root, outputDir) {
27
- const versionsRoot = path.join(root, outputDir, "docs", "versions");
28
- if (!existsSync(versionsRoot)) return [];
29
- return readdirSync(versionsRoot, { withFileTypes: true })
30
- .filter((entry) => entry.isDirectory())
31
- .map((entry) => entry.name);
32
- }
33
-
34
- function removeLegacySourceViewerFiles(root, outputDir) {
35
- const versionIds = listExistingVersionIds(root, outputDir);
36
- for (const versionId of versionIds) {
37
- for (const language of ["pt", "en", "es"]) {
38
- for (const fileName of ["source-viewer", "source-viewer.html"]) {
39
- const legacyPath = path.join(root, outputDir, "docs", "versions", versionId, language, fileName);
40
- if (existsSync(legacyPath)) {
41
- rmSync(legacyPath, { force: true });
42
- }
43
- }
44
- }
45
- }
46
- }
47
-
48
- async function writeJson(root, relativePath, data) {
23
+ </svg>
24
+ `;
25
+
26
+ function listExistingVersionIds(root, outputDir) {
27
+ const versionsRoot = path.join(root, outputDir, "docs", "versions");
28
+ if (!existsSync(versionsRoot)) return [];
29
+ return readdirSync(versionsRoot, { withFileTypes: true })
30
+ .filter((entry) => entry.isDirectory())
31
+ .map((entry) => entry.name);
32
+ }
33
+
34
+ function removeLegacySourceViewerFiles(root, outputDir) {
35
+ const versionIds = listExistingVersionIds(root, outputDir);
36
+ for (const versionId of versionIds) {
37
+ for (const language of ["pt", "en", "es"]) {
38
+ for (const fileName of ["source-viewer", "source-viewer.html"]) {
39
+ const legacyPath = path.join(root, outputDir, "docs", "versions", versionId, language, fileName);
40
+ if (existsSync(legacyPath)) {
41
+ rmSync(legacyPath, { force: true });
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+
48
+ async function writeJson(root, relativePath, data) {
49
49
  const absolutePath = path.join(root, relativePath);
50
50
  await mkdir(path.dirname(absolutePath), { recursive: true });
51
51
  await writeFile(absolutePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
@@ -93,13 +93,13 @@ export async function writeConfigOnlyOutput(options) {
93
93
  rmSync(layoutsPath, { recursive: true, force: true });
94
94
  }
95
95
 
96
- for (const [versionId, versionConfig] of Object.entries(artifacts.versionConfigs)) {
97
- await writeJson(root, `${outputDir}/docs/versions/${versionId}/config.json`, versionConfig);
98
- }
99
-
100
- removeLegacySourceViewerFiles(root, outputDir);
101
-
102
- for (const [versionId, versionConfig] of Object.entries(artifacts.versionConfigs)) {
96
+ for (const [versionId, versionConfig] of Object.entries(artifacts.versionConfigs)) {
97
+ await writeJson(root, `${outputDir}/docs/versions/${versionId}/config.json`, versionConfig);
98
+ }
99
+
100
+ removeLegacySourceViewerFiles(root, outputDir);
101
+
102
+ for (const [versionId, versionConfig] of Object.entries(artifacts.versionConfigs)) {
103
103
  const versionRoutesMd = versionConfig["routes-md"] ?? versionConfig.routes ?? [];
104
104
  for (const route of versionRoutesMd) {
105
105
  for (const docPath of Object.values(route.path ?? {})) {