@gitpagedocs/cli 1.1.61 → 1.1.63
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 +193 -191
- package/ai/application/ai-command.ts +24 -24
- package/ai/application/ai-provider-factory.ts +22 -22
- package/ai/application/docs-pattern.ts +68 -68
- package/ai/application/run-ai-cli-command.ts +167 -167
- package/ai/config.ts +50 -50
- package/ai/core/models/ai-cli-config.ts +33 -33
- package/ai/core/models/parse-ai-cli-config.ts +78 -78
- package/ai/core/ports/illm-provider.ts +32 -32
- package/ai/infrastructure/ai-config-file.ts +101 -101
- package/ai/infrastructure/file-system-adapter.ts +85 -85
- package/ai/infrastructure/llm/tools-llm-provider.ts +54 -54
- package/ai/infrastructure/version-docs-writer.ts +143 -143
- package/ai/presentation/ai-prompts.ts +239 -239
- package/application/config-only/handler.mjs +2 -0
- package/application/home/handler.mjs +2 -0
- package/application/ports/cli-runtime-ports.ts +91 -87
- package/application/report/config-only-reporter.mjs +64 -63
- package/application/use-cases/dispatch-mode.ts +18 -18
- package/builders/config-orchestrator.mjs +34 -34
- package/builders/project-links.mjs +50 -26
- package/builders/root-config-builder.d.mts +16 -0
- package/builders/root-config-builder.mjs +61 -53
- package/builders/route-builders.mjs +136 -136
- package/builders/theme-template.mjs +76 -76
- package/builders/version-config-builder.mjs +186 -186
- package/content/docs-en.mjs +549 -545
- package/content/docs-es.mjs +462 -460
- package/content/docs-pt.mjs +462 -460
- package/contracts/doc-versions.mjs +3 -3
- package/contracts/index.mjs +10 -0
- package/contracts/layouts-paths.d.mts +17 -0
- package/contracts/layouts-paths.mjs +68 -0
- package/data/default-site-config.mjs +321 -321
- package/data/i18n-langmenu.mjs +347 -347
- package/data/layouts.mjs +436 -436
- package/data/path-mappings.mjs +26 -26
- package/data/route-metas.mjs +93 -93
- package/data/theme-colors.mjs +443 -443
- package/data/urls.mjs +12 -12
- package/domain/models/cli-options.ts +33 -18
- package/domain/services/layouts-migration.d.mts +15 -0
- package/domain/services/layouts-migration.mjs +60 -0
- package/home/constants.mjs +4 -4
- package/index.mjs +37 -37
- package/infrastructure/gitpagedocs-config-file.ts +47 -47
- package/infrastructure/home/runtime.mjs +37 -37
- package/package.json +3 -3
- package/presentation/commands/ai-info.ts +57 -57
- package/presentation/commands/config-clear.ts +23 -23
- package/presentation/commands/config-info.ts +24 -24
- package/presentation/commands/diagnostics.ts +164 -164
- package/presentation/commands/docs.ts +37 -37
- package/presentation/commands/mcp.ts +20 -20
- package/presentation/commands/pages.ts +101 -101
- package/presentation/commands/password.ts +62 -62
- package/presentation/commands/run-command.ts +70 -70
- package/presentation/index.ts +124 -116
- package/presentation/options/parser.ts +119 -104
- package/presentation/options/resolver.ts +46 -48
- package/presentation/options/schema.ts +4 -0
- package/presentation/ui/clack.ts +91 -91
- package/presentation/ui/layouts-prompts.ts +124 -0
- package/presentation/ui/prompts.ts +146 -138
- package/presentation/ui/tty.ts +37 -0
- package/runtime/git-ops.mjs +110 -110
- package/runtime/layouts-migrator.d.mts +11 -0
- package/runtime/layouts-migrator.mjs +103 -0
- package/runtime/output.mjs +159 -146
- package/runtime/workflow.mjs +129 -129
- package/start.mjs +12 -12
- package/ui/logger.mjs +9 -9
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = "1.1.
|
|
2
|
-
|
|
3
|
-
export const DOC_VERSIONS = [PACKAGE_VERSION];
|
|
1
|
+
export const PACKAGE_VERSION = "1.1.63";
|
|
2
|
+
|
|
3
|
+
export const DOC_VERSIONS = [PACKAGE_VERSION];
|
package/contracts/index.mjs
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
1
|
export { DOC_VERSIONS } from "./doc-versions.mjs";
|
|
2
|
+
export {
|
|
3
|
+
DEFAULT_LAYOUTS_DIR,
|
|
4
|
+
LAYOUTS_CONFIG_FILENAME,
|
|
5
|
+
LAYOUTS_FALLBACK_CONFIG_FILENAME,
|
|
6
|
+
LAYOUTS_TEMPLATES_DIRNAME,
|
|
7
|
+
LEGACY_LAYOUTS_SUBDIR,
|
|
8
|
+
normalizeLayoutsDir,
|
|
9
|
+
legacyLayoutsDir,
|
|
10
|
+
layoutsArtifactPaths,
|
|
11
|
+
} from "./layouts-paths.mjs";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Repo-relative paths owned by a layouts folder. */
|
|
2
|
+
export interface LayoutsArtifactPaths {
|
|
3
|
+
root: string;
|
|
4
|
+
config: string;
|
|
5
|
+
fallbackConfig: string;
|
|
6
|
+
templates: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export declare const DEFAULT_LAYOUTS_DIR: string;
|
|
10
|
+
export declare const LAYOUTS_CONFIG_FILENAME: string;
|
|
11
|
+
export declare const LAYOUTS_FALLBACK_CONFIG_FILENAME: string;
|
|
12
|
+
export declare const LAYOUTS_TEMPLATES_DIRNAME: string;
|
|
13
|
+
export declare const LEGACY_LAYOUTS_SUBDIR: string;
|
|
14
|
+
|
|
15
|
+
export declare function normalizeLayoutsDir(dir: string): string;
|
|
16
|
+
export declare function legacyLayoutsDir(outputDir: string): string;
|
|
17
|
+
export declare function layoutsArtifactPaths(layoutsDir: string): LayoutsArtifactPaths;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical locations for layout artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Local layouts are generated into the standalone `gitpagelayouts/` home at the
|
|
5
|
+
* project root. `<outputDir>/layouts/` is the legacy location that earlier
|
|
6
|
+
* versions wrote: the viewer still reads it, and the CLI offers to migrate it,
|
|
7
|
+
* but nothing is generated there any more.
|
|
8
|
+
*
|
|
9
|
+
* Every consumer derives its paths from here so the folder name exists in one
|
|
10
|
+
* place only.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/** Standalone layouts home, relative to the project root. */
|
|
14
|
+
export const DEFAULT_LAYOUTS_DIR = "gitpagelayouts";
|
|
15
|
+
|
|
16
|
+
/** Index file listing every layout, inside a layouts folder. */
|
|
17
|
+
export const LAYOUTS_CONFIG_FILENAME = "layoutsConfig.json";
|
|
18
|
+
|
|
19
|
+
/** Fallback index used when a layout id cannot be resolved. */
|
|
20
|
+
export const LAYOUTS_FALLBACK_CONFIG_FILENAME = "layoutsFallbackConfig.json";
|
|
21
|
+
|
|
22
|
+
/** Folder holding one JSON template per layout, inside a layouts folder. */
|
|
23
|
+
export const LAYOUTS_TEMPLATES_DIRNAME = "templates";
|
|
24
|
+
|
|
25
|
+
/** Sub-folder of the docs output dir that older versions generated into. */
|
|
26
|
+
export const LEGACY_LAYOUTS_SUBDIR = "layouts";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Normalize a user-supplied folder name to a repo-relative POSIX path with no
|
|
30
|
+
* leading/trailing separators, so it can be joined and stored in config.json
|
|
31
|
+
* identically on every platform.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} dir Raw folder name (may use either separator).
|
|
34
|
+
* @returns {string} Normalized path, or `DEFAULT_LAYOUTS_DIR` when empty.
|
|
35
|
+
*/
|
|
36
|
+
export function normalizeLayoutsDir(dir) {
|
|
37
|
+
const normalized = String(dir ?? "")
|
|
38
|
+
.replace(/[\\/]+/g, "/")
|
|
39
|
+
.replace(/^\/+|\/+$/g, "")
|
|
40
|
+
.trim();
|
|
41
|
+
return normalized || DEFAULT_LAYOUTS_DIR;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Legacy layouts folder for a given docs output dir.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} outputDir Docs output dir (e.g. `gitpagedocs`).
|
|
48
|
+
* @returns {string} Repo-relative POSIX path (e.g. `gitpagedocs/layouts`).
|
|
49
|
+
*/
|
|
50
|
+
export function legacyLayoutsDir(outputDir) {
|
|
51
|
+
return `${normalizeLayoutsDir(outputDir)}/${LEGACY_LAYOUTS_SUBDIR}`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Repo-relative paths of every artifact a layouts folder owns.
|
|
56
|
+
*
|
|
57
|
+
* @param {string} layoutsDir Layouts folder, repo-relative.
|
|
58
|
+
* @returns {{ root: string, config: string, fallbackConfig: string, templates: string }}
|
|
59
|
+
*/
|
|
60
|
+
export function layoutsArtifactPaths(layoutsDir) {
|
|
61
|
+
const root = normalizeLayoutsDir(layoutsDir);
|
|
62
|
+
return {
|
|
63
|
+
root,
|
|
64
|
+
config: `${root}/${LAYOUTS_CONFIG_FILENAME}`,
|
|
65
|
+
fallbackConfig: `${root}/${LAYOUTS_FALLBACK_CONFIG_FILENAME}`,
|
|
66
|
+
templates: `${root}/${LAYOUTS_TEMPLATES_DIRNAME}`,
|
|
67
|
+
};
|
|
68
|
+
}
|