@bendyline/docblocks-cli 2.6.1 → 2.7.0
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 +27 -15
- package/THIRD_PARTY_NOTICES.txt +3865 -3409
- package/dist/bin.js +794 -118
- package/dist/index.d.ts +56 -1
- package/dist/index.js +706 -46
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -3,11 +3,19 @@ import { ContentContainer } from '@bendyline/squisq/storage';
|
|
|
3
3
|
import * as _bendyline_squisq_cli_api from '@bendyline/squisq-cli/api';
|
|
4
4
|
import { FormatRegistry } from '@bendyline/squisq-cli/api';
|
|
5
5
|
import { VideoQuality, VideoOrientation } from '@bendyline/squisq-video';
|
|
6
|
+
import { WorkspaceOutputLimits, WorkspaceOutputResult } from '@bendyline/docblocks/workspace-settings';
|
|
6
7
|
|
|
7
8
|
interface BuildOptions {
|
|
8
9
|
input: string;
|
|
9
10
|
output: string;
|
|
10
11
|
theme?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Skip `<input>/.docblocks/workspace.json`. Otherwise, when `theme` is
|
|
14
|
+
* unset, its `documents.defaultTheme` styles documents that name no theme.
|
|
15
|
+
*/
|
|
16
|
+
ignoreWorkspaceSettings?: boolean;
|
|
17
|
+
/** Receives non-fatal warnings; defaults to stderr. */
|
|
18
|
+
onWarning?: (message: string) => void;
|
|
11
19
|
/** Programmatic traversal budget; CLI callers use the safe default. */
|
|
12
20
|
maxEntries?: number;
|
|
13
21
|
/** Programmatic directory-depth budget; CLI callers use the safe default. */
|
|
@@ -140,6 +148,53 @@ interface ParseOptions {
|
|
|
140
148
|
}
|
|
141
149
|
declare function runParse(inputPath: string, options?: ParseOptions): Promise<string>;
|
|
142
150
|
|
|
151
|
+
/**
|
|
152
|
+
* workspace command — maintain the outputs a workspace opts into through
|
|
153
|
+
* `<workspace root>/.docblocks/workspace.json`.
|
|
154
|
+
*
|
|
155
|
+
* `workspace refresh` runs the same filesystem-agnostic catalog refresh the
|
|
156
|
+
* editor shell runs (`@bendyline/docblocks/workspace-settings`) over a Node
|
|
157
|
+
* adapter, so CI and scripts produce byte-identical `index.html` /
|
|
158
|
+
* `catalog.json` outputs. Only enabled outputs are written, only files that
|
|
159
|
+
* carry the DocBlocks catalog marker are replaced, and unchanged bytes are
|
|
160
|
+
* never rewritten.
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
interface WorkspaceRefreshOptions {
|
|
164
|
+
/** Workspace root; defaults to the current directory. */
|
|
165
|
+
readonly dir?: string;
|
|
166
|
+
/** Rewrite the catalog page even when its inputs digest is unchanged. */
|
|
167
|
+
readonly force?: boolean;
|
|
168
|
+
/** Compute every output and report what would change; write nothing. */
|
|
169
|
+
readonly dryRun?: boolean;
|
|
170
|
+
readonly signal?: AbortSignal;
|
|
171
|
+
/** Receives non-fatal warnings; defaults to stderr. */
|
|
172
|
+
readonly onWarning?: (message: string) => void;
|
|
173
|
+
/** Programmatic budget overrides for the catalog walk. */
|
|
174
|
+
readonly limits?: Partial<WorkspaceOutputLimits>;
|
|
175
|
+
}
|
|
176
|
+
interface WorkspaceRefreshResult {
|
|
177
|
+
/** Physical workspace root. */
|
|
178
|
+
readonly root: string;
|
|
179
|
+
/**
|
|
180
|
+
* `missing` when the workspace has no settings file, `disabled` when its
|
|
181
|
+
* settings enable no output, otherwise `refreshed`.
|
|
182
|
+
*/
|
|
183
|
+
readonly status: 'missing' | 'disabled' | 'refreshed';
|
|
184
|
+
readonly documentCount: number;
|
|
185
|
+
readonly outputs: readonly WorkspaceOutputResult[];
|
|
186
|
+
readonly dryRun: boolean;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Regenerate the catalog outputs a workspace enables. Throws when the
|
|
190
|
+
* settings file is invalid or from a newer DocBlocks, when the walk exceeds
|
|
191
|
+
* its budget, and on storage failures. A blocked output (a hand-written file
|
|
192
|
+
* at the configured path) is reported in `outputs`, not thrown.
|
|
193
|
+
*/
|
|
194
|
+
declare function runWorkspaceRefresh(options?: WorkspaceRefreshOptions): Promise<WorkspaceRefreshResult>;
|
|
195
|
+
/** One human-readable status line per output, as printed by the command. */
|
|
196
|
+
declare function describeWorkspaceOutput(output: WorkspaceOutputResult): string;
|
|
197
|
+
|
|
143
198
|
declare function getPackageVersion(): string;
|
|
144
199
|
|
|
145
|
-
export { type BuildOptions, type BuildResult, type ConvertOptions, type ConvertResult, type ParseOptions, type VideoOptions, type VideoResult, type VideoRunDependencies, applyTransformToMarkdown, assertCliVideoRenderBudget, getPackageVersion, runBuild, runConvert, runParse, runVideo };
|
|
200
|
+
export { type BuildOptions, type BuildResult, type ConvertOptions, type ConvertResult, type ParseOptions, type VideoOptions, type VideoResult, type VideoRunDependencies, type WorkspaceRefreshOptions, type WorkspaceRefreshResult, applyTransformToMarkdown, assertCliVideoRenderBudget, describeWorkspaceOutput, getPackageVersion, runBuild, runConvert, runParse, runVideo, runWorkspaceRefresh };
|