@diagc/cli 1.1.6 → 1.1.7

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.
Files changed (81) hide show
  1. package/dist/api/assets.d.ts +8 -0
  2. package/dist/api/assets.js +54 -0
  3. package/dist/api/diagrams.d.ts +27 -0
  4. package/dist/api/diagrams.js +269 -0
  5. package/dist/api/files.d.ts +7 -0
  6. package/dist/api/files.js +30 -0
  7. package/dist/api/handlers.d.ts +7 -62
  8. package/dist/api/handlers.js +10 -488
  9. package/dist/api/library.d.ts +5 -0
  10. package/dist/api/library.js +88 -0
  11. package/dist/api/result.d.ts +8 -0
  12. package/dist/api/result.js +5 -0
  13. package/dist/api/sidecars.d.ts +13 -0
  14. package/dist/api/sidecars.js +78 -0
  15. package/dist/cli/command.d.ts +26 -0
  16. package/dist/cli/command.js +1 -0
  17. package/dist/cli/io.d.ts +13 -0
  18. package/dist/cli/io.js +7 -0
  19. package/dist/cli/parse.d.ts +51 -0
  20. package/dist/cli/parse.js +109 -0
  21. package/dist/cli/run.d.ts +10 -0
  22. package/dist/cli/run.js +67 -0
  23. package/dist/cli.d.ts +1 -52
  24. package/dist/cli.js +5 -475
  25. package/dist/commands/compile.d.ts +3 -0
  26. package/dist/commands/compile.js +38 -0
  27. package/dist/commands/diff.d.ts +10 -0
  28. package/dist/commands/diff.js +96 -0
  29. package/dist/commands/eject.d.ts +3 -0
  30. package/dist/commands/eject.js +32 -0
  31. package/dist/commands/guide.d.ts +3 -0
  32. package/dist/commands/guide.js +13 -0
  33. package/dist/commands/init.d.ts +3 -0
  34. package/dist/commands/init.js +23 -0
  35. package/dist/commands/lint.d.ts +3 -0
  36. package/dist/commands/lint.js +27 -0
  37. package/dist/commands/publish.d.ts +11 -0
  38. package/dist/commands/publish.js +83 -0
  39. package/dist/commands/shared.d.ts +19 -0
  40. package/dist/commands/shared.js +34 -0
  41. package/dist/commands/studio.d.ts +3 -0
  42. package/dist/commands/studio.js +14 -0
  43. package/dist/commands/watch.d.ts +8 -0
  44. package/dist/commands/watch.js +45 -0
  45. package/dist/compile.d.ts +4 -1
  46. package/dist/compile.js +8 -13
  47. package/dist/diff/compare.d.ts +36 -0
  48. package/dist/diff/compare.js +36 -0
  49. package/dist/diff/describe.d.ts +8 -0
  50. package/dist/diff/describe.js +70 -0
  51. package/dist/diff/index.d.ts +4 -0
  52. package/dist/diff/index.js +6 -0
  53. package/dist/diff/load.d.ts +22 -0
  54. package/dist/diff/load.js +62 -0
  55. package/dist/diff/overview.d.ts +17 -0
  56. package/dist/diff/overview.js +86 -0
  57. package/dist/diff/pages.d.ts +27 -0
  58. package/dist/diff/pages.js +55 -0
  59. package/dist/diff/summary.d.ts +18 -0
  60. package/dist/diff/summary.js +26 -0
  61. package/dist/eject.js +2 -6
  62. package/dist/git-ref.js +21 -3
  63. package/dist/glob.d.ts +5 -0
  64. package/dist/glob.js +7 -0
  65. package/dist/init.d.ts +0 -3
  66. package/dist/init.js +14 -15
  67. package/dist/names.d.ts +3 -0
  68. package/dist/names.js +8 -0
  69. package/dist/paths.d.ts +29 -0
  70. package/dist/paths.js +25 -0
  71. package/dist/publish/discover.js +2 -1
  72. package/dist/publish/publish.d.ts +6 -4
  73. package/dist/publish/publish.js +11 -7
  74. package/dist/snapshots.d.ts +11 -0
  75. package/dist/snapshots.js +20 -3
  76. package/dist/studio.js +8 -8
  77. package/package.json +2 -2
  78. package/dist/command-args.d.ts +0 -9
  79. package/dist/command-args.js +0 -56
  80. package/dist/diff.d.ts +0 -61
  81. package/dist/diff.js +0 -244
@@ -0,0 +1,78 @@
1
+ import { mkdir, readFile, unlink } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { isDrawings, isLayoutOverlay } from '@diagc/core/internal';
4
+ import { writeFileAtomic } from '../atomic-write.js';
5
+ import { isSafeName } from '../names.js';
6
+ import { walkFiles } from './files.js';
7
+ import { refuse } from './result.js';
8
+ /** All layout overlays under `diagramsDir`, keyed by diagram name. Corrupt
9
+ * overlays are skipped, never fatal. */
10
+ export async function listLayouts(diagramsDir) {
11
+ const layouts = {};
12
+ for (const name of await walkFiles(diagramsDir, '.layout.json')) {
13
+ try {
14
+ layouts[name] = JSON.parse(await readFile(path.join(diagramsDir, `${name}.layout.json`), 'utf8'));
15
+ }
16
+ catch {
17
+ /* skip corrupt overlay */
18
+ }
19
+ }
20
+ return { status: 200, body: { layouts } };
21
+ }
22
+ /** All drawings sidecars under `diagramsDir`, keyed by diagram name. Corrupt
23
+ * files are skipped, never fatal — same contract as listLayouts. */
24
+ export async function listDrawings(diagramsDir) {
25
+ const drawings = {};
26
+ for (const name of await walkFiles(diagramsDir, '.drawings.json')) {
27
+ try {
28
+ drawings[name] = JSON.parse(await readFile(path.join(diagramsDir, `${name}.drawings.json`), 'utf8'));
29
+ }
30
+ catch {
31
+ /* skip corrupt sidecar */
32
+ }
33
+ }
34
+ return { status: 200, body: { drawings } };
35
+ }
36
+ export async function saveLayout(diagramsDir, name, payload) {
37
+ if (!isSafeName(name))
38
+ return refuse(400, `Unsafe name '${name}'`);
39
+ // Core's structural guard mirrors the old inline checks (version 1, nested
40
+ // numeric x/y planes, optional positive-finite sizes) — one source of truth
41
+ // shared with the client-side artifact loader.
42
+ if (!isLayoutOverlay(payload))
43
+ return refuse(400, 'Not a version-1 layout overlay');
44
+ const target = path.join(diagramsDir, `${name}.layout.json`);
45
+ await mkdir(path.dirname(target), { recursive: true });
46
+ await writeFileAtomic(target, `${JSON.stringify(payload, null, 2)}\n`);
47
+ return { status: 200, body: { ok: true } };
48
+ }
49
+ /** Persist the drawings sidecar. An overlay in which no bucket holds a stroke
50
+ * DELETES the file instead of writing it: a diagram that never had drawings
51
+ * must never grow an empty `<name>.drawings.json`, and erasing the last stroke
52
+ * should leave the tree as it was. */
53
+ export async function saveDrawings(diagramsDir, name, payload) {
54
+ if (!isSafeName(name))
55
+ return refuse(400, `Unsafe name '${name}'`);
56
+ if (!isDrawings(payload))
57
+ return refuse(400, 'Not a version-1 drawings overlay');
58
+ const target = path.join(diagramsDir, `${name}.drawings.json`);
59
+ const hasStrokes = Object.values(payload.planes).some((bucket) => bucket.length > 0);
60
+ if (!hasStrokes) {
61
+ try {
62
+ await unlink(target);
63
+ }
64
+ catch (e) {
65
+ // ENOENT only: there was nothing to delete, which is the ordinary case for
66
+ // a diagram that never had ink. Anything else (EACCES, EPERM, EISDIR) means
67
+ // the strokes are still on disk — rethrow so dispatch turns it into a 500
68
+ // and useEditor.save surfaces it, instead of answering `{ ok: true }` and
69
+ // letting the erased strokes resurrect on the next boot.
70
+ if (e.code !== 'ENOENT')
71
+ throw e;
72
+ }
73
+ return { status: 200, body: { ok: true } };
74
+ }
75
+ await mkdir(path.dirname(target), { recursive: true });
76
+ await writeFileAtomic(target, `${JSON.stringify(payload, null, 2)}\n`);
77
+ return { status: 200, body: { ok: true } };
78
+ }
@@ -0,0 +1,26 @@
1
+ import type { HomePaths } from '../home.js';
2
+ import type { SnapshotSession } from '../snapshots.js';
3
+ import type { CliIo } from './io.js';
4
+ import type { Flag, FlagValues, Takes } from './parse.js';
5
+ /** A command's arguments: its positional arguments, and the flags given of those it takes. */
6
+ export interface CommandArgs<F extends Flag> {
7
+ positionals: string[];
8
+ flags: Partial<Pick<FlagValues, F>>;
9
+ }
10
+ /** What a command runs with. */
11
+ export interface Context {
12
+ io: CliIo;
13
+ /** the usage, for a command that prints it after a missing argument */
14
+ usage: string;
15
+ home: HomePaths;
16
+ /** The run's one include-snapshot session: the in-memory lock and the set of includes
17
+ * it touched must span the whole run for its prune to see everything a full-tree
18
+ * compile resolved. It resolves locked unless the run was given --update-includes. */
19
+ snapshots: SnapshotSession;
20
+ }
21
+ /** One `diagc <command>`: what it takes, typed so that it reads only the flags it lists,
22
+ * and what it does. */
23
+ export interface Command<F extends Flag = Flag> extends Takes<F> {
24
+ /** Run, and settle with the exit code once the command is done. */
25
+ run(args: CommandArgs<F>, ctx: Context): Promise<number>;
26
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ /** Where the CLI writes. A command writes through this and never to the console, so a
2
+ * test can run it in process and read what it wrote. */
3
+ export interface CliIo {
4
+ /** a line on stdout, as console.log writes it */
5
+ out: (line: string) => void;
6
+ /** a line on stderr, as console.error writes it */
7
+ err: (line: string) => void;
8
+ /** text on stdout as it is */
9
+ write: (text: string) => void;
10
+ }
11
+ /** The process's own streams. `write` is a plain write, which, unlike console.log's, does
12
+ * not swallow the error of a reader that has closed the pipe. */
13
+ export declare const processIo: CliIo;
package/dist/cli/io.js ADDED
@@ -0,0 +1,7 @@
1
+ /** The process's own streams. `write` is a plain write, which, unlike console.log's, does
2
+ * not swallow the error of a reader that has closed the pipe. */
3
+ export const processIo = {
4
+ out: (line) => console.log(line),
5
+ err: (line) => console.error(line),
6
+ write: (text) => void process.stdout.write(text),
7
+ };
@@ -0,0 +1,51 @@
1
+ /** What each flag holds once read: its value, or `true` for a flag that takes none. */
2
+ export interface FlagValues {
3
+ '--out': string;
4
+ '--no-images': true;
5
+ '--link': string;
6
+ '--json': true;
7
+ '--labels': [string, string];
8
+ '--image-url': string;
9
+ '--update-includes': true;
10
+ '--type': string;
11
+ '--agents': true;
12
+ }
13
+ export type Flag = keyof FlagValues;
14
+ /** What a command takes, as the parser checks it before the command runs. */
15
+ export interface Takes<F extends Flag = Flag> {
16
+ /** its flags: any other is refused */
17
+ readonly flags: readonly F[];
18
+ /** a cap on positional arguments, and how the refusal of one more names them;
19
+ * absent where the command takes any number, or has its own message for extra ones */
20
+ readonly positionals?: {
21
+ readonly max: number;
22
+ readonly what: string;
23
+ };
24
+ /** why a flag other commands take means nothing here */
25
+ readonly whyNot?: Partial<Record<Flag, string>>;
26
+ }
27
+ /** argv as read: the command, its positional arguments and the flags given. */
28
+ export interface ParsedArgv {
29
+ /** the first argument that is neither a flag nor a flag's value; `compile` when there is none */
30
+ command: string;
31
+ positionals: string[];
32
+ flags: Partial<FlagValues>;
33
+ }
34
+ /** A mistake in argv, or `--help`. Either way the usage is printed and the run ends with
35
+ * `exitCode`: 0 for help, the usage on stdout; 1 for a mistake, on stderr after the message. */
36
+ export declare class UsageError extends Error {
37
+ readonly exitCode: number;
38
+ constructor(message: string, exitCode: number);
39
+ }
40
+ /** Read argv against every flag there is, whichever command it names: which arguments
41
+ * are values depends on the flags alone, and the command may come after its flags. The
42
+ * first mistake in argv's order is thrown as a {@link UsageError}. An unknown flag is an
43
+ * error rather than a file path, so a typo surfaces loudly instead of quietly skewing
44
+ * the file set. */
45
+ export declare function parseArgv(argv: readonly string[]): ParsedArgv;
46
+ /** Refuse a flag or an argument the command does not take. Ignored, it would be a wrong
47
+ * file set or an output the user never sees (`init --out build`). The flag refused is
48
+ * the first given in {@link FLAGS}' order, and the message names the commands in
49
+ * `commands` that take it. An unknown command is left to the dispatch, which has its
50
+ * own message. */
51
+ export declare function checkTaken(parsed: ParsedArgv, commands: Readonly<Record<string, Takes>>): void;
@@ -0,0 +1,109 @@
1
+ import { errMessage } from '@diagc/core/internal';
2
+ import { galleryLink } from '../publish/gallery.js';
3
+ /** A mistake in argv, or `--help`. Either way the usage is printed and the run ends with
4
+ * `exitCode`: 0 for help, the usage on stdout; 1 for a mistake, on stderr after the message. */
5
+ export class UsageError extends Error {
6
+ exitCode;
7
+ constructor(message, exitCode) {
8
+ super(message);
9
+ this.exitCode = exitCode;
10
+ this.name = 'UsageError';
11
+ }
12
+ }
13
+ const badValue = (flag, why) => new UsageError(`${flag}: ${why}`, 1);
14
+ /** Every flag, in the order the refusal of one a command does not take goes through them:
15
+ * how it reads its value, or null for a flag that takes none. */
16
+ const FLAGS = {
17
+ '--out': (next) => {
18
+ // No fallback to the default: a trailing --out would quietly write somewhere the
19
+ // user did not ask for, and a missing value would swallow the next flag as the dir.
20
+ if (next === undefined || next.startsWith('--'))
21
+ throw badValue('--out', 'needs a directory, e.g. --out build/artifacts');
22
+ return next;
23
+ },
24
+ '--no-images': null,
25
+ '--link': (next = '') => {
26
+ // No fallback for a missing value: there is no default address, and the URL
27
+ // check is also what stops the next flag being swallowed as one.
28
+ try {
29
+ galleryLink(next);
30
+ }
31
+ catch (e) {
32
+ throw badValue('--link', errMessage(e));
33
+ }
34
+ return next;
35
+ },
36
+ '--json': null,
37
+ '--labels': (next = '') => {
38
+ const parts = next.split(',');
39
+ if (parts.length !== 2 || parts.some((p) => p.trim() === ''))
40
+ throw badValue('--labels', 'takes two names, before and after: --labels main,#12');
41
+ return [parts[0].trim(), parts[1].trim()];
42
+ },
43
+ '--image-url': (next = '') => {
44
+ if (!next.includes('{path}'))
45
+ throw badValue('--image-url', 'needs a {path} placeholder, e.g. https://host/pr-1/{path}');
46
+ return next;
47
+ },
48
+ '--update-includes': null,
49
+ '--type': (next) => {
50
+ // No fallback: a missing value would otherwise swallow the next flag as the type.
51
+ if (next === undefined || next.startsWith('--'))
52
+ throw badValue('--type', "needs a diagram type, e.g. --type c4 ('diagc guide' lists them)");
53
+ return next;
54
+ },
55
+ '--agents': null,
56
+ };
57
+ const isFlag = (arg) => Object.hasOwn(FLAGS, arg);
58
+ /** Read argv against every flag there is, whichever command it names: which arguments
59
+ * are values depends on the flags alone, and the command may come after its flags. The
60
+ * first mistake in argv's order is thrown as a {@link UsageError}. An unknown flag is an
61
+ * error rather than a file path, so a typo surfaces loudly instead of quietly skewing
62
+ * the file set. */
63
+ export function parseArgv(argv) {
64
+ let command;
65
+ const positionals = [];
66
+ const flags = {};
67
+ for (let i = 0; i < argv.length; i++) {
68
+ const arg = argv[i];
69
+ if (isFlag(arg)) {
70
+ const read = FLAGS[arg];
71
+ flags[arg] = read === null ? true : read(argv[++i]);
72
+ continue;
73
+ }
74
+ if (arg === '--help' || arg === '-h')
75
+ throw new UsageError('help requested', 0);
76
+ if (arg.startsWith('--'))
77
+ throw new UsageError(`Unknown flag '${arg}'`, 1);
78
+ // The first argument that is not a flag names the command; anything after it is
79
+ // the command's (flags may appear before or after the command).
80
+ if (command === undefined)
81
+ command = arg;
82
+ else
83
+ positionals.push(arg);
84
+ }
85
+ return { command: command ?? 'compile', positionals, flags: flags };
86
+ }
87
+ /** "a", "a and b", "a, b and c" */
88
+ const listed = (names) => names.length === 1 ? names[0] : `${names.slice(0, -1).join(', ')} and ${names.at(-1)}`;
89
+ /** Refuse a flag or an argument the command does not take. Ignored, it would be a wrong
90
+ * file set or an output the user never sees (`init --out build`). The flag refused is
91
+ * the first given in {@link FLAGS}' order, and the message names the commands in
92
+ * `commands` that take it. An unknown command is left to the dispatch, which has its
93
+ * own message. */
94
+ export function checkTaken(parsed, commands) {
95
+ const takes = commands[parsed.command];
96
+ if (takes === undefined)
97
+ return;
98
+ for (const flag of Object.keys(FLAGS)) {
99
+ if (parsed.flags[flag] === undefined || takes.flags.includes(flag))
100
+ continue;
101
+ const takers = Object.keys(commands).filter((c) => commands[c].flags.includes(flag));
102
+ const why = takes.whyNot?.[flag] === undefined ? '' : ` (${takes.whyNot[flag]})`;
103
+ throw new UsageError(`${parsed.command} does not take ${flag}${why}; ${listed(takers)} ${takers.length === 1 ? 'does' : 'do'}.`, 1);
104
+ }
105
+ const cap = takes.positionals;
106
+ const extra = cap === undefined ? undefined : parsed.positionals[cap.max];
107
+ if (extra !== undefined)
108
+ throw new UsageError(`${parsed.command} takes ${cap.what}; '${extra}' is one too many.`, 1);
109
+ }
@@ -0,0 +1,10 @@
1
+ import type { Command } from './command.js';
2
+ import type { CliIo } from './io.js';
3
+ /** Every command by name, in the order the refusal of a flag names the commands that
4
+ * take it. */
5
+ export declare const COMMANDS: Readonly<Record<string, Command>>;
6
+ /** `diagc <argv>`: run the command argv names, writing through `io`, and settle with its
7
+ * exit code; watch, which runs until the process is stopped, never settles. A mistake
8
+ * in argv prints the usage; an error no command answers itself is one line on stderr
9
+ * and exit 1. */
10
+ export declare function run(argv: readonly string[], io: CliIo, usage: string): Promise<number>;
@@ -0,0 +1,67 @@
1
+ import { fileURLToPath } from 'node:url';
2
+ import { errMessage } from '@diagc/core/internal';
3
+ import { compile } from '../commands/compile.js';
4
+ import { diff } from '../commands/diff.js';
5
+ import { eject } from '../commands/eject.js';
6
+ import { guide } from '../commands/guide.js';
7
+ import { init } from '../commands/init.js';
8
+ import { lint } from '../commands/lint.js';
9
+ import { publish } from '../commands/publish.js';
10
+ import { studio } from '../commands/studio.js';
11
+ import { watch } from '../commands/watch.js';
12
+ import { findHome, homePaths } from '../home.js';
13
+ import { resolveInclude } from '../includes.js';
14
+ import { RELATIVE_PATHS } from '../paths.js';
15
+ import { snapshotSession } from '../snapshots.js';
16
+ import { checkTaken, parseArgv, UsageError } from './parse.js';
17
+ /** Every command by name, in the order the refusal of a flag names the commands that
18
+ * take it. */
19
+ export const COMMANDS = {
20
+ compile,
21
+ lint,
22
+ watch,
23
+ publish,
24
+ studio,
25
+ eject,
26
+ diff,
27
+ guide,
28
+ init,
29
+ };
30
+ /** The command argv names, run with what it runs with. */
31
+ async function dispatch(parsed, io, usage) {
32
+ const home = homePaths(findHome(fileURLToPath(import.meta.url)));
33
+ // One session per run, shared by whatever compiles in it (see Context.snapshots).
34
+ // Watch, the studio and eject resolve through locked resolvers of their own.
35
+ const snapshots = snapshotSession(resolveInclude, RELATIVE_PATHS.diagramsDir, parsed.flags['--update-includes'] === true ? 'update' : 'locked');
36
+ const command = Object.hasOwn(COMMANDS, parsed.command) ? COMMANDS[parsed.command] : undefined;
37
+ if (command === undefined) {
38
+ io.err(`diagc: Unknown command '${parsed.command}'.`);
39
+ io.err(usage);
40
+ return 1;
41
+ }
42
+ return command.run(parsed, { io, usage, home, snapshots });
43
+ }
44
+ /** `diagc <argv>`: run the command argv names, writing through `io`, and settle with its
45
+ * exit code; watch, which runs until the process is stopped, never settles. A mistake
46
+ * in argv prints the usage; an error no command answers itself is one line on stderr
47
+ * and exit 1. */
48
+ export async function run(argv, io, usage) {
49
+ try {
50
+ const parsed = parseArgv(argv);
51
+ checkTaken(parsed, COMMANDS);
52
+ return await dispatch(parsed, io, usage);
53
+ }
54
+ catch (e) {
55
+ if (!(e instanceof UsageError)) {
56
+ io.err(errMessage(e));
57
+ return 1;
58
+ }
59
+ if (e.exitCode === 0)
60
+ io.out(usage);
61
+ else {
62
+ io.err(`diagc: ${e.message}\n`);
63
+ io.err(usage);
64
+ }
65
+ return e.exitCode;
66
+ }
67
+ }
package/dist/cli.d.ts CHANGED
@@ -1,52 +1 @@
1
- import { type PublishOptions } from './publish/publish.js';
2
- export interface Args {
3
- command: string;
4
- files: string[];
5
- out: string;
6
- /** `--out` was passed: diff only defaults its own directory when it was not */
7
- outGiven: boolean;
8
- images: boolean;
9
- updateIncludes: boolean;
10
- /** `--json`: lint's findings as one JSON array on stdout */
11
- json: boolean;
12
- /** `--link`: validated here, so a bad address fails before anything is compiled */
13
- link?: string;
14
- /** diff `--image-url`: a URL template for summary.md's images, `{path}` per PNG */
15
- imageUrl?: string;
16
- /** diff `--labels before,after`: names for the two sides in place of the refs */
17
- labels?: [string, string];
18
- /** init `--type`: which starter to copy */
19
- type?: string;
20
- /** init `--agents`: write the coding-agent block and the Claude Code skill */
21
- agents: boolean;
22
- }
23
- /** Parse argv into command + flags. Unknown flags (anything `--…` that is not
24
- * recognized) are an error rather than being silently treated as a file path,
25
- * so a typo surfaces loudly instead of quietly skewing the file set. */
26
- export declare function parseArgs(argv: string[]): Args;
27
- /** Thrown by {@link parseArgs} for `--help`/`-h`; `main` prints usage and exits 0. */
28
- export declare class HelpRequested extends Error {
29
- constructor();
30
- }
31
- /** Thrown by {@link parseArgs} for an unrecognized flag; `main` prints the
32
- * offending flag plus usage and exits 1. */
33
- export declare class UnknownFlagError extends Error {
34
- constructor(flag: string);
35
- }
36
- /** Thrown by {@link parseArgs} for a flag whose value is missing or unusable; `main`
37
- * reports it the same way as an unknown flag. */
38
- export declare class BadFlagValueError extends Error {
39
- constructor(flag: string, why: string);
40
- }
41
- /** Where `publish` compiles to and builds pages from. One object for both steps, so
42
- * the pages are always made from the artifacts this run just wrote. `--out` moves the
43
- * artifacts only: the pages and PNGs stay where `.gitignore`, the docs and the READMEs
44
- * that embed them expect to find them. */
45
- export declare function publishDirs(args: Pick<Args, 'out'>): Pick<PublishOptions, 'srcDir' | 'artifactsDir' | 'htmlDir' | 'staticDir' | 'assetsDir'>;
46
- /** `A..B` or `A` (against the working tree). */
47
- export declare function parseRange(range: string): {
48
- from: string;
49
- to?: string;
50
- };
51
- /** A ref as a directory name: `v1.0..feature/x` -> `v1.0..feature-x`. */
52
- export declare function diffOutDir(from: string, to: string | undefined): string;
1
+ export {};