modestbench 0.9.0 → 0.9.2
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/CHANGELOG.md +17 -0
- package/dist/cli/builder.cjs +259 -0
- package/dist/cli/builder.cjs.map +1 -0
- package/dist/cli/builder.d.cts +37 -0
- package/dist/cli/builder.d.cts.map +1 -0
- package/dist/cli/builder.d.ts +37 -0
- package/dist/cli/builder.d.ts.map +1 -0
- package/dist/cli/builder.js +255 -0
- package/dist/cli/builder.js.map +1 -0
- package/dist/cli/commands/baseline.cjs +4 -33
- package/dist/cli/commands/baseline.cjs.map +1 -1
- package/dist/cli/commands/baseline.d.cts.map +1 -1
- package/dist/cli/commands/baseline.d.ts.map +1 -1
- package/dist/cli/commands/baseline.js +2 -31
- package/dist/cli/commands/baseline.js.map +1 -1
- package/dist/cli/commands/history.cjs +2 -14
- package/dist/cli/commands/history.cjs.map +1 -1
- package/dist/cli/commands/history.d.cts.map +1 -1
- package/dist/cli/commands/history.d.ts.map +1 -1
- package/dist/cli/commands/history.js +1 -13
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/init.cjs +2 -2
- package/dist/cli/commands/init.cjs.map +1 -1
- package/dist/cli/commands/init.js +2 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/run.cjs +3 -3
- package/dist/cli/commands/run.cjs.map +1 -1
- package/dist/cli/commands/run.d.cts +0 -13
- package/dist/cli/commands/run.d.cts.map +1 -1
- package/dist/cli/commands/run.d.ts +0 -13
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +1 -1
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/test.cjs +1 -1
- package/dist/cli/commands/test.cjs.map +1 -1
- package/dist/cli/commands/test.js +1 -1
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/context.cjs +60 -0
- package/dist/cli/context.cjs.map +1 -0
- package/dist/cli/context.d.cts +28 -0
- package/dist/cli/context.d.cts.map +1 -0
- package/dist/cli/context.d.ts +28 -0
- package/dist/cli/context.d.ts.map +1 -0
- package/dist/cli/context.js +56 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/handlers.cjs +74 -0
- package/dist/cli/handlers.cjs.map +1 -0
- package/dist/cli/handlers.d.cts +13 -0
- package/dist/cli/handlers.d.cts.map +1 -0
- package/dist/cli/handlers.d.ts +13 -0
- package/dist/cli/handlers.d.ts.map +1 -0
- package/dist/cli/handlers.js +70 -0
- package/dist/cli/handlers.js.map +1 -0
- package/dist/cli/index.cjs +45 -978
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +6 -31
- package/dist/cli/index.d.cts.map +1 -1
- package/dist/cli/index.d.ts +6 -31
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +43 -974
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/parsers/analyze.cjs +54 -0
- package/dist/cli/parsers/analyze.cjs.map +1 -0
- package/dist/cli/parsers/analyze.d.cts +37 -0
- package/dist/cli/parsers/analyze.d.cts.map +1 -0
- package/dist/cli/parsers/analyze.d.ts +37 -0
- package/dist/cli/parsers/analyze.d.ts.map +1 -0
- package/dist/cli/parsers/analyze.js +51 -0
- package/dist/cli/parsers/analyze.js.map +1 -0
- package/dist/cli/parsers/baseline.cjs +75 -0
- package/dist/cli/parsers/baseline.cjs.map +1 -0
- package/dist/cli/parsers/baseline.d.cts +59 -0
- package/dist/cli/parsers/baseline.d.cts.map +1 -0
- package/dist/cli/parsers/baseline.d.ts +59 -0
- package/dist/cli/parsers/baseline.d.ts.map +1 -0
- package/dist/cli/parsers/baseline.js +72 -0
- package/dist/cli/parsers/baseline.js.map +1 -0
- package/dist/cli/parsers/global.cjs +49 -0
- package/dist/cli/parsers/global.cjs.map +1 -0
- package/dist/cli/parsers/global.d.cts +45 -0
- package/dist/cli/parsers/global.d.cts.map +1 -0
- package/dist/cli/parsers/global.d.ts +45 -0
- package/dist/cli/parsers/global.d.ts.map +1 -0
- package/dist/cli/parsers/global.js +46 -0
- package/dist/cli/parsers/global.js.map +1 -0
- package/dist/cli/parsers/history.cjs +138 -0
- package/dist/cli/parsers/history.cjs.map +1 -0
- package/dist/cli/parsers/history.d.cts +108 -0
- package/dist/cli/parsers/history.d.cts.map +1 -0
- package/dist/cli/parsers/history.d.ts +108 -0
- package/dist/cli/parsers/history.d.ts.map +1 -0
- package/dist/cli/parsers/history.js +135 -0
- package/dist/cli/parsers/history.js.map +1 -0
- package/dist/cli/parsers/index.cjs +35 -0
- package/dist/cli/parsers/index.cjs.map +1 -0
- package/dist/cli/parsers/index.d.cts +15 -0
- package/dist/cli/parsers/index.d.cts.map +1 -0
- package/dist/cli/parsers/index.d.ts +15 -0
- package/dist/cli/parsers/index.d.ts.map +1 -0
- package/dist/cli/parsers/index.js +15 -0
- package/dist/cli/parsers/index.js.map +1 -0
- package/dist/cli/parsers/init.cjs +39 -0
- package/dist/cli/parsers/init.cjs.map +1 -0
- package/dist/cli/parsers/init.d.cts +32 -0
- package/dist/cli/parsers/init.d.cts.map +1 -0
- package/dist/cli/parsers/init.d.ts +32 -0
- package/dist/cli/parsers/init.d.ts.map +1 -0
- package/dist/cli/parsers/init.js +36 -0
- package/dist/cli/parsers/init.js.map +1 -0
- package/dist/cli/parsers/run.cjs +99 -0
- package/dist/cli/parsers/run.cjs.map +1 -0
- package/dist/cli/parsers/run.d.cts +62 -0
- package/dist/cli/parsers/run.d.cts.map +1 -0
- package/dist/cli/parsers/run.d.ts +62 -0
- package/dist/cli/parsers/run.d.ts.map +1 -0
- package/dist/cli/parsers/run.js +96 -0
- package/dist/cli/parsers/run.js.map +1 -0
- package/dist/cli/parsers/test.cjs +42 -0
- package/dist/cli/parsers/test.cjs.map +1 -0
- package/dist/cli/parsers/test.d.cts +31 -0
- package/dist/cli/parsers/test.d.cts.map +1 -0
- package/dist/cli/parsers/test.d.ts +31 -0
- package/dist/cli/parsers/test.d.ts.map +1 -0
- package/dist/cli/parsers/test.js +39 -0
- package/dist/cli/parsers/test.js.map +1 -0
- package/dist/cli/theme.cjs +35 -0
- package/dist/cli/theme.cjs.map +1 -0
- package/dist/cli/theme.d.cts +31 -0
- package/dist/cli/theme.d.cts.map +1 -0
- package/dist/cli/theme.d.ts +31 -0
- package/dist/cli/theme.d.ts.map +1 -0
- package/dist/cli/theme.js +32 -0
- package/dist/cli/theme.js.map +1 -0
- package/dist/config/budget-schema.cjs +1 -1
- package/dist/config/budget-schema.cjs.map +1 -1
- package/dist/config/budget-schema.js +1 -1
- package/dist/config/budget-schema.js.map +1 -1
- package/dist/core/engines/accurate-engine.cjs +1 -1
- package/dist/core/engines/accurate-engine.cjs.map +1 -1
- package/dist/core/engines/accurate-engine.d.cts.map +1 -1
- package/dist/core/engines/accurate-engine.d.ts.map +1 -1
- package/dist/core/engines/accurate-engine.js +1 -1
- package/dist/core/engines/accurate-engine.js.map +1 -1
- package/dist/errors/base.cjs +3 -12
- package/dist/errors/base.cjs.map +1 -1
- package/dist/errors/base.d.cts +0 -7
- package/dist/errors/base.d.cts.map +1 -1
- package/dist/errors/base.d.ts +0 -7
- package/dist/errors/base.d.ts.map +1 -1
- package/dist/errors/base.js +1 -9
- package/dist/errors/base.js.map +1 -1
- package/dist/formatters/history/compare.cjs +6 -6
- package/dist/formatters/history/compare.cjs.map +1 -1
- package/dist/formatters/history/compare.js +6 -6
- package/dist/formatters/history/compare.js.map +1 -1
- package/dist/formatters/history/show.cjs +2 -2
- package/dist/formatters/history/show.cjs.map +1 -1
- package/dist/formatters/history/show.js +2 -2
- package/dist/formatters/history/show.js.map +1 -1
- package/dist/formatters/history/trends.cjs +1 -1
- package/dist/formatters/history/trends.cjs.map +1 -1
- package/dist/formatters/history/trends.js +1 -1
- package/dist/formatters/history/trends.js.map +1 -1
- package/dist/reporters/human.cjs +3 -3
- package/dist/reporters/human.cjs.map +1 -1
- package/dist/reporters/human.d.cts.map +1 -1
- package/dist/reporters/human.d.ts.map +1 -1
- package/dist/reporters/human.js +3 -3
- package/dist/reporters/human.js.map +1 -1
- package/dist/reporters/nyan.cjs +1 -1
- package/dist/reporters/nyan.cjs.map +1 -1
- package/dist/reporters/nyan.js +1 -1
- package/dist/reporters/nyan.js.map +1 -1
- package/dist/services/budget-evaluator.cjs +2 -2
- package/dist/services/budget-evaluator.cjs.map +1 -1
- package/dist/services/budget-evaluator.js +2 -2
- package/dist/services/budget-evaluator.js.map +1 -1
- package/dist/services/config-manager.cjs +2 -2
- package/dist/services/config-manager.cjs.map +1 -1
- package/dist/services/config-manager.js +2 -2
- package/dist/services/config-manager.js.map +1 -1
- package/dist/services/profiler/profile-runner.cjs +11 -0
- package/dist/services/profiler/profile-runner.cjs.map +1 -1
- package/dist/services/profiler/profile-runner.d.cts +2 -0
- package/dist/services/profiler/profile-runner.d.cts.map +1 -1
- package/dist/services/profiler/profile-runner.d.ts +2 -0
- package/dist/services/profiler/profile-runner.d.ts.map +1 -1
- package/dist/services/profiler/profile-runner.js +11 -0
- package/dist/services/profiler/profile-runner.js.map +1 -1
- package/dist/services/reporter-registry.cjs +8 -8
- package/dist/services/reporter-registry.cjs.map +1 -1
- package/dist/services/reporter-registry.js +8 -8
- package/dist/services/reporter-registry.js.map +1 -1
- package/package.json +7 -9
- package/src/cli/builder.ts +387 -0
- package/src/cli/commands/baseline.ts +7 -33
- package/src/cli/commands/history.ts +1 -16
- package/src/cli/commands/init.ts +2 -2
- package/src/cli/commands/run.ts +1 -1
- package/src/cli/commands/test.ts +1 -1
- package/src/cli/context.ts +117 -0
- package/src/cli/handlers.ts +76 -0
- package/src/cli/index.ts +49 -1194
- package/src/cli/parsers/analyze.ts +61 -0
- package/src/cli/parsers/baseline.ts +92 -0
- package/src/cli/parsers/global.ts +51 -0
- package/src/cli/parsers/history.ts +168 -0
- package/src/cli/parsers/index.ts +28 -0
- package/src/cli/parsers/init.ts +45 -0
- package/src/cli/parsers/run.ts +118 -0
- package/src/cli/parsers/test.ts +46 -0
- package/src/cli/theme.ts +33 -0
- package/src/config/budget-schema.ts +1 -1
- package/src/core/engines/accurate-engine.ts +1 -1
- package/src/errors/base.ts +1 -10
- package/src/formatters/history/compare.ts +6 -6
- package/src/formatters/history/show.ts +2 -2
- package/src/formatters/history/trends.ts +1 -1
- package/src/reporters/human.ts +5 -3
- package/src/reporters/nyan.ts +1 -1
- package/src/services/budget-evaluator.ts +2 -2
- package/src/services/config-manager.ts +2 -2
- package/src/services/profiler/profile-runner.ts +15 -0
- package/src/services/reporter-registry.ts +8 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/cli/parsers/global.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;iBAwBzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;;;;GAItB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global CLI Options
|
|
3
|
+
*
|
|
4
|
+
* Options shared across all commands (verbose, config, cwd, etc.) and common
|
|
5
|
+
* option fragments used by subcommands.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Global options available to all commands
|
|
11
|
+
*
|
|
12
|
+
* Uses camelCaseValues transform so handlers can use `values.noColor` instead
|
|
13
|
+
* of `values['no-color']`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const globalOptions: import("@boneskull/bargs").Parser<import("@boneskull/bargs").CamelCaseKeys<import("@boneskull/bargs").InferOptions<{
|
|
16
|
+
config: {
|
|
17
|
+
aliases: string[];
|
|
18
|
+
description: string;
|
|
19
|
+
} & import("@boneskull/bargs").StringOption;
|
|
20
|
+
cwd: {
|
|
21
|
+
description: string;
|
|
22
|
+
} & import("@boneskull/bargs").StringOption;
|
|
23
|
+
json: import("@boneskull/bargs").BooleanOption & {
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
'no-color': import("@boneskull/bargs").BooleanOption & {
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
progress: import("@boneskull/bargs").BooleanOption & {
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
verbose: import("@boneskull/bargs").BooleanOption & {
|
|
33
|
+
aliases: string[];
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
}>>, readonly []>;
|
|
37
|
+
/**
|
|
38
|
+
* Additional global options for history and baseline subcommands
|
|
39
|
+
*/
|
|
40
|
+
export declare const quietOption: import("@boneskull/bargs").CallableOptionsParser<import("@boneskull/bargs").InferOptions<{
|
|
41
|
+
quiet: import("@boneskull/bargs").BooleanOption & {
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
}>>;
|
|
45
|
+
//# sourceMappingURL=global.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/cli/parsers/global.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;iBAwBzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;;;;GAItB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global CLI Options
|
|
3
|
+
*
|
|
4
|
+
* Options shared across all commands (verbose, config, cwd, etc.) and common
|
|
5
|
+
* option fragments used by subcommands.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { camelCaseValues, map, opt } from '@boneskull/bargs';
|
|
10
|
+
/**
|
|
11
|
+
* Global options available to all commands
|
|
12
|
+
*
|
|
13
|
+
* Uses camelCaseValues transform so handlers can use `values.noColor` instead
|
|
14
|
+
* of `values['no-color']`.
|
|
15
|
+
*/
|
|
16
|
+
export const globalOptions = map(opt.options({
|
|
17
|
+
config: opt.string({
|
|
18
|
+
aliases: ['c'],
|
|
19
|
+
description: 'Path to configuration file',
|
|
20
|
+
}),
|
|
21
|
+
cwd: opt.string({
|
|
22
|
+
description: 'Working directory',
|
|
23
|
+
}),
|
|
24
|
+
json: opt.boolean({
|
|
25
|
+
description: 'Output results in JSON format',
|
|
26
|
+
}),
|
|
27
|
+
'no-color': opt.boolean({
|
|
28
|
+
description: 'Disable colored output',
|
|
29
|
+
}),
|
|
30
|
+
progress: opt.boolean({
|
|
31
|
+
description: 'Show animated progress bar',
|
|
32
|
+
}),
|
|
33
|
+
verbose: opt.boolean({
|
|
34
|
+
aliases: ['v'],
|
|
35
|
+
description: 'Enable verbose output',
|
|
36
|
+
}),
|
|
37
|
+
}), camelCaseValues);
|
|
38
|
+
/**
|
|
39
|
+
* Additional global options for history and baseline subcommands
|
|
40
|
+
*/
|
|
41
|
+
export const quietOption = opt.options({
|
|
42
|
+
quiet: opt.boolean({
|
|
43
|
+
description: 'Minimal output',
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=global.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/cli/parsers/global.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAC9B,GAAG,CAAC,OAAO,CAAC;IACV,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC;QACjB,OAAO,EAAE,CAAC,GAAG,CAAC;QACd,WAAW,EAAE,4BAA4B;KAC1C,CAAC;IACF,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC;QACd,WAAW,EAAE,mBAAmB;KACjC,CAAC;IACF,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;QAChB,WAAW,EAAE,+BAA+B;KAC7C,CAAC;IACF,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC;QACtB,WAAW,EAAE,wBAAwB;KACtC,CAAC;IACF,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;QACpB,WAAW,EAAE,4BAA4B;KAC1C,CAAC;IACF,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC;QACnB,OAAO,EAAE,CAAC,GAAG,CAAC;QACd,WAAW,EAAE,uBAAuB;KACrC,CAAC;CACH,CAAC,EACF,eAAe,CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC,OAAO,CAAC;IACrC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;QACjB,WAAW,EAAE,gBAAgB;KAC9B,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* History Command Parsers
|
|
4
|
+
*
|
|
5
|
+
* Parsers for the `history` command and its subcommands: list, show, compare,
|
|
6
|
+
* trends, clean, and export.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.historyExportParser = exports.historyCleanParser = exports.historyTrendsParser = exports.historyCompareParser = exports.historyShowParser = exports.historyListParser = void 0;
|
|
12
|
+
const bargs_1 = require("@boneskull/bargs");
|
|
13
|
+
/**
|
|
14
|
+
* Parser for `history list` command
|
|
15
|
+
*/
|
|
16
|
+
exports.historyListParser = bargs_1.opt.options({
|
|
17
|
+
format: bargs_1.opt.enum(['human', 'json', 'csv'], {
|
|
18
|
+
description: 'Output format',
|
|
19
|
+
}),
|
|
20
|
+
limit: bargs_1.opt.number({
|
|
21
|
+
description: 'Maximum number of results',
|
|
22
|
+
}),
|
|
23
|
+
pattern: bargs_1.opt.string({
|
|
24
|
+
description: 'Filter by benchmark name pattern',
|
|
25
|
+
}),
|
|
26
|
+
since: bargs_1.opt.string({
|
|
27
|
+
description: 'Show runs since date (ISO 8601 or relative like "1 week ago")',
|
|
28
|
+
}),
|
|
29
|
+
tag: bargs_1.opt.array('string', {
|
|
30
|
+
aliases: ['t'],
|
|
31
|
+
description: 'Filter by tags',
|
|
32
|
+
}),
|
|
33
|
+
until: bargs_1.opt.string({
|
|
34
|
+
description: 'Show runs until date (ISO 8601 or relative like "1 day ago")',
|
|
35
|
+
}),
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* Parser for `history show` command
|
|
39
|
+
*/
|
|
40
|
+
exports.historyShowParser = (0, bargs_1.merge)(bargs_1.opt.options({
|
|
41
|
+
format: bargs_1.opt.enum(['human', 'json', 'csv'], {
|
|
42
|
+
description: 'Output format',
|
|
43
|
+
}),
|
|
44
|
+
}), bargs_1.pos.positionals(bargs_1.pos.string({
|
|
45
|
+
description: 'ID of the benchmark run to show',
|
|
46
|
+
name: 'run-id',
|
|
47
|
+
required: true,
|
|
48
|
+
})));
|
|
49
|
+
/**
|
|
50
|
+
* Parser for `history compare` command
|
|
51
|
+
*/
|
|
52
|
+
exports.historyCompareParser = (0, bargs_1.merge)(bargs_1.opt.options({
|
|
53
|
+
format: bargs_1.opt.enum(['human', 'json'], {
|
|
54
|
+
description: 'Output format',
|
|
55
|
+
}),
|
|
56
|
+
}), bargs_1.pos.positionals(bargs_1.pos.string({
|
|
57
|
+
description: 'ID of the first benchmark run',
|
|
58
|
+
name: 'run-id1',
|
|
59
|
+
required: true,
|
|
60
|
+
}), bargs_1.pos.string({
|
|
61
|
+
description: 'ID of the second benchmark run',
|
|
62
|
+
name: 'run-id2',
|
|
63
|
+
required: true,
|
|
64
|
+
})));
|
|
65
|
+
/**
|
|
66
|
+
* Parser for `history trends` command
|
|
67
|
+
*/
|
|
68
|
+
exports.historyTrendsParser = (0, bargs_1.merge)(bargs_1.opt.options({
|
|
69
|
+
all: bargs_1.opt.boolean({
|
|
70
|
+
aliases: ['a'],
|
|
71
|
+
description: 'Analyze all runs (ignore limit)',
|
|
72
|
+
}),
|
|
73
|
+
format: bargs_1.opt.enum(['human', 'json'], {
|
|
74
|
+
description: 'Output format',
|
|
75
|
+
}),
|
|
76
|
+
limit: bargs_1.opt.number({
|
|
77
|
+
description: 'Maximum number of runs to analyze',
|
|
78
|
+
}),
|
|
79
|
+
since: bargs_1.opt.string({
|
|
80
|
+
description: 'Show trends since date (ISO 8601 or relative like "1 week ago")',
|
|
81
|
+
}),
|
|
82
|
+
tag: bargs_1.opt.array('string', {
|
|
83
|
+
aliases: ['t'],
|
|
84
|
+
description: 'Filter by tags',
|
|
85
|
+
}),
|
|
86
|
+
until: bargs_1.opt.string({
|
|
87
|
+
description: 'Show trends until date (ISO 8601 or relative like "1 day ago")',
|
|
88
|
+
}),
|
|
89
|
+
}), bargs_1.pos.positionals(bargs_1.pos.string({
|
|
90
|
+
description: 'Filter by benchmark name pattern',
|
|
91
|
+
name: 'pattern',
|
|
92
|
+
})));
|
|
93
|
+
/**
|
|
94
|
+
* Parser for `history clean` command
|
|
95
|
+
*
|
|
96
|
+
* Includes validation requiring at least one cleanup criterion. Uses
|
|
97
|
+
* camelCaseValues transform for cleaner property access.
|
|
98
|
+
*/
|
|
99
|
+
exports.historyCleanParser = (0, bargs_1.map)((0, bargs_1.map)(bargs_1.opt.options({
|
|
100
|
+
'max-age': bargs_1.opt.number({
|
|
101
|
+
description: 'Remove runs older than this many days',
|
|
102
|
+
}),
|
|
103
|
+
'max-runs': bargs_1.opt.number({
|
|
104
|
+
description: 'Keep only this many most recent runs',
|
|
105
|
+
}),
|
|
106
|
+
'max-size': bargs_1.opt.number({
|
|
107
|
+
description: 'Keep history under this size in bytes',
|
|
108
|
+
}),
|
|
109
|
+
yes: bargs_1.opt.boolean({
|
|
110
|
+
aliases: ['y'],
|
|
111
|
+
description: 'Confirm cleanup without prompting',
|
|
112
|
+
}),
|
|
113
|
+
}), ({ positionals, values }) => {
|
|
114
|
+
if (!values['max-age'] && !values['max-runs'] && !values['max-size']) {
|
|
115
|
+
throw new Error('At least one cleanup criterion must be specified (--max-age, --max-runs, or --max-size)');
|
|
116
|
+
}
|
|
117
|
+
return { positionals, values };
|
|
118
|
+
}), bargs_1.camelCaseValues);
|
|
119
|
+
/**
|
|
120
|
+
* Parser for `history export` command
|
|
121
|
+
*/
|
|
122
|
+
exports.historyExportParser = bargs_1.opt.options({
|
|
123
|
+
format: bargs_1.opt.enum(['json', 'csv'], {
|
|
124
|
+
description: 'Export format',
|
|
125
|
+
}),
|
|
126
|
+
output: bargs_1.opt.string({
|
|
127
|
+
aliases: ['o'],
|
|
128
|
+
description: 'Output file path',
|
|
129
|
+
required: true,
|
|
130
|
+
}),
|
|
131
|
+
since: bargs_1.opt.string({
|
|
132
|
+
description: 'Export runs since date',
|
|
133
|
+
}),
|
|
134
|
+
until: bargs_1.opt.string({
|
|
135
|
+
description: 'Export runs until date',
|
|
136
|
+
}),
|
|
137
|
+
});
|
|
138
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.js","sourceRoot":"","sources":["../../../src/cli/parsers/history.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,4CAAyE;AAEzE;;GAEG;AACU,QAAA,iBAAiB,GAAG,WAAG,CAAC,OAAO,CAAC;IAC3C,MAAM,EAAE,WAAG,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAU,EAAE;QAClD,WAAW,EAAE,eAAe;KAC7B,CAAC;IACF,KAAK,EAAE,WAAG,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,2BAA2B;KACzC,CAAC;IACF,OAAO,EAAE,WAAG,CAAC,MAAM,CAAC;QAClB,WAAW,EAAE,kCAAkC;KAChD,CAAC;IACF,KAAK,EAAE,WAAG,CAAC,MAAM,CAAC;QAChB,WAAW,EACT,+DAA+D;KAClE,CAAC;IACF,GAAG,EAAE,WAAG,CAAC,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C,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,CACb,yFAAyF,CAC1F,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;AACjC,CAAC,CACF,EACD,uBAAe,CAChB,CAAC;AAEF;;GAEG;AACU,QAAA,mBAAmB,GAAG,WAAG,CAAC,OAAO,CAAC;IAC7C,MAAM,EAAE,WAAG,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,CAAU,EAAE;QACzC,WAAW,EAAE,eAAe;KAC7B,CAAC;IACF,MAAM,EAAE,WAAG,CAAC,MAAM,CAAC;QACjB,OAAO,EAAE,CAAC,GAAG,CAAC;QACd,WAAW,EAAE,kBAAkB;QAC/B,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,KAAK,EAAE,WAAG,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,wBAAwB;KACtC,CAAC;IACF,KAAK,EAAE,WAAG,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,wBAAwB;KACtC,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* History Command Parsers
|
|
3
|
+
*
|
|
4
|
+
* Parsers for the `history` command and its subcommands: list, show, compare,
|
|
5
|
+
* trends, clean, and export.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Parser for `history list` command
|
|
11
|
+
*/
|
|
12
|
+
export declare const historyListParser: import("@boneskull/bargs").CallableOptionsParser<import("@boneskull/bargs").InferOptions<{
|
|
13
|
+
format: import("@boneskull/bargs").EnumOption<"csv" | "human" | "json"> & {
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
limit: import("@boneskull/bargs").NumberOption & {
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
pattern: {
|
|
20
|
+
description: string;
|
|
21
|
+
} & import("@boneskull/bargs").StringOption;
|
|
22
|
+
since: {
|
|
23
|
+
description: string;
|
|
24
|
+
} & import("@boneskull/bargs").StringOption;
|
|
25
|
+
tag: import("@boneskull/bargs").ArrayOption;
|
|
26
|
+
until: {
|
|
27
|
+
description: string;
|
|
28
|
+
} & import("@boneskull/bargs").StringOption;
|
|
29
|
+
}>>;
|
|
30
|
+
/**
|
|
31
|
+
* Parser for `history show` command
|
|
32
|
+
*/
|
|
33
|
+
export declare const historyShowParser: import("@boneskull/bargs").Parser<import("@boneskull/bargs").InferOptions<{
|
|
34
|
+
format: import("@boneskull/bargs").EnumOption<"csv" | "human" | "json"> & {
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
}> & object, readonly [string]>;
|
|
38
|
+
/**
|
|
39
|
+
* Parser for `history compare` command
|
|
40
|
+
*/
|
|
41
|
+
export declare const historyCompareParser: import("@boneskull/bargs").Parser<import("@boneskull/bargs").InferOptions<{
|
|
42
|
+
format: import("@boneskull/bargs").EnumOption<"human" | "json"> & {
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
}> & object, readonly [string, string]>;
|
|
46
|
+
/**
|
|
47
|
+
* Parser for `history trends` command
|
|
48
|
+
*/
|
|
49
|
+
export declare const historyTrendsParser: import("@boneskull/bargs").Parser<import("@boneskull/bargs").InferOptions<{
|
|
50
|
+
all: import("@boneskull/bargs").BooleanOption & {
|
|
51
|
+
aliases: string[];
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
format: import("@boneskull/bargs").EnumOption<"human" | "json"> & {
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
limit: import("@boneskull/bargs").NumberOption & {
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
since: {
|
|
61
|
+
description: string;
|
|
62
|
+
} & import("@boneskull/bargs").StringOption;
|
|
63
|
+
tag: import("@boneskull/bargs").ArrayOption;
|
|
64
|
+
until: {
|
|
65
|
+
description: string;
|
|
66
|
+
} & import("@boneskull/bargs").StringOption;
|
|
67
|
+
}> & object, readonly [string | undefined]>;
|
|
68
|
+
/**
|
|
69
|
+
* Parser for `history clean` command
|
|
70
|
+
*
|
|
71
|
+
* Includes validation requiring at least one cleanup criterion. Uses
|
|
72
|
+
* camelCaseValues transform for cleaner property access.
|
|
73
|
+
*/
|
|
74
|
+
export declare const historyCleanParser: import("@boneskull/bargs").Parser<import("@boneskull/bargs").CamelCaseKeys<import("@boneskull/bargs").InferOptions<{
|
|
75
|
+
'max-age': import("@boneskull/bargs").NumberOption & {
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
'max-runs': import("@boneskull/bargs").NumberOption & {
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
'max-size': import("@boneskull/bargs").NumberOption & {
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
yes: import("@boneskull/bargs").BooleanOption & {
|
|
85
|
+
aliases: string[];
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
}>>, readonly []>;
|
|
89
|
+
/**
|
|
90
|
+
* Parser for `history export` command
|
|
91
|
+
*/
|
|
92
|
+
export declare const historyExportParser: import("@boneskull/bargs").CallableOptionsParser<import("@boneskull/bargs").InferOptions<{
|
|
93
|
+
format: import("@boneskull/bargs").EnumOption<"csv" | "json"> & {
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
output: {
|
|
97
|
+
aliases: string[];
|
|
98
|
+
description: string;
|
|
99
|
+
required: true;
|
|
100
|
+
} & import("@boneskull/bargs").StringOption;
|
|
101
|
+
since: {
|
|
102
|
+
description: string;
|
|
103
|
+
} & import("@boneskull/bargs").StringOption;
|
|
104
|
+
until: {
|
|
105
|
+
description: string;
|
|
106
|
+
} & import("@boneskull/bargs").StringOption;
|
|
107
|
+
}>>;
|
|
108
|
+
//# sourceMappingURL=history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../src/cli/parsers/history.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;GAqB5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;+BAa7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;uCAkBhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;2CA+B/B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;iBA2B9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;GAe9B,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* History Command Parsers
|
|
3
|
+
*
|
|
4
|
+
* Parsers for the `history` command and its subcommands: list, show, compare,
|
|
5
|
+
* trends, clean, and export.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Parser for `history list` command
|
|
11
|
+
*/
|
|
12
|
+
export declare const historyListParser: import("@boneskull/bargs").CallableOptionsParser<import("@boneskull/bargs").InferOptions<{
|
|
13
|
+
format: import("@boneskull/bargs").EnumOption<"csv" | "human" | "json"> & {
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
limit: import("@boneskull/bargs").NumberOption & {
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
pattern: {
|
|
20
|
+
description: string;
|
|
21
|
+
} & import("@boneskull/bargs").StringOption;
|
|
22
|
+
since: {
|
|
23
|
+
description: string;
|
|
24
|
+
} & import("@boneskull/bargs").StringOption;
|
|
25
|
+
tag: import("@boneskull/bargs").ArrayOption;
|
|
26
|
+
until: {
|
|
27
|
+
description: string;
|
|
28
|
+
} & import("@boneskull/bargs").StringOption;
|
|
29
|
+
}>>;
|
|
30
|
+
/**
|
|
31
|
+
* Parser for `history show` command
|
|
32
|
+
*/
|
|
33
|
+
export declare const historyShowParser: import("@boneskull/bargs").Parser<import("@boneskull/bargs").InferOptions<{
|
|
34
|
+
format: import("@boneskull/bargs").EnumOption<"csv" | "human" | "json"> & {
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
}> & object, readonly [string]>;
|
|
38
|
+
/**
|
|
39
|
+
* Parser for `history compare` command
|
|
40
|
+
*/
|
|
41
|
+
export declare const historyCompareParser: import("@boneskull/bargs").Parser<import("@boneskull/bargs").InferOptions<{
|
|
42
|
+
format: import("@boneskull/bargs").EnumOption<"human" | "json"> & {
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
}> & object, readonly [string, string]>;
|
|
46
|
+
/**
|
|
47
|
+
* Parser for `history trends` command
|
|
48
|
+
*/
|
|
49
|
+
export declare const historyTrendsParser: import("@boneskull/bargs").Parser<import("@boneskull/bargs").InferOptions<{
|
|
50
|
+
all: import("@boneskull/bargs").BooleanOption & {
|
|
51
|
+
aliases: string[];
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
format: import("@boneskull/bargs").EnumOption<"human" | "json"> & {
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
limit: import("@boneskull/bargs").NumberOption & {
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
since: {
|
|
61
|
+
description: string;
|
|
62
|
+
} & import("@boneskull/bargs").StringOption;
|
|
63
|
+
tag: import("@boneskull/bargs").ArrayOption;
|
|
64
|
+
until: {
|
|
65
|
+
description: string;
|
|
66
|
+
} & import("@boneskull/bargs").StringOption;
|
|
67
|
+
}> & object, readonly [string | undefined]>;
|
|
68
|
+
/**
|
|
69
|
+
* Parser for `history clean` command
|
|
70
|
+
*
|
|
71
|
+
* Includes validation requiring at least one cleanup criterion. Uses
|
|
72
|
+
* camelCaseValues transform for cleaner property access.
|
|
73
|
+
*/
|
|
74
|
+
export declare const historyCleanParser: import("@boneskull/bargs").Parser<import("@boneskull/bargs").CamelCaseKeys<import("@boneskull/bargs").InferOptions<{
|
|
75
|
+
'max-age': import("@boneskull/bargs").NumberOption & {
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
'max-runs': import("@boneskull/bargs").NumberOption & {
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
'max-size': import("@boneskull/bargs").NumberOption & {
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
yes: import("@boneskull/bargs").BooleanOption & {
|
|
85
|
+
aliases: string[];
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
}>>, readonly []>;
|
|
89
|
+
/**
|
|
90
|
+
* Parser for `history export` command
|
|
91
|
+
*/
|
|
92
|
+
export declare const historyExportParser: import("@boneskull/bargs").CallableOptionsParser<import("@boneskull/bargs").InferOptions<{
|
|
93
|
+
format: import("@boneskull/bargs").EnumOption<"csv" | "json"> & {
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
output: {
|
|
97
|
+
aliases: string[];
|
|
98
|
+
description: string;
|
|
99
|
+
required: true;
|
|
100
|
+
} & import("@boneskull/bargs").StringOption;
|
|
101
|
+
since: {
|
|
102
|
+
description: string;
|
|
103
|
+
} & import("@boneskull/bargs").StringOption;
|
|
104
|
+
until: {
|
|
105
|
+
description: string;
|
|
106
|
+
} & import("@boneskull/bargs").StringOption;
|
|
107
|
+
}>>;
|
|
108
|
+
//# sourceMappingURL=history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../src/cli/parsers/history.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;GAqB5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;+BAa7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;uCAkBhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;2CA+B/B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;iBA2B9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;GAe9B,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* History Command Parsers
|
|
3
|
+
*
|
|
4
|
+
* Parsers for the `history` command and its subcommands: list, show, compare,
|
|
5
|
+
* trends, clean, and export.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { camelCaseValues, map, merge, opt, pos } from '@boneskull/bargs';
|
|
10
|
+
/**
|
|
11
|
+
* Parser for `history list` command
|
|
12
|
+
*/
|
|
13
|
+
export const historyListParser = opt.options({
|
|
14
|
+
format: opt.enum(['human', 'json', 'csv'], {
|
|
15
|
+
description: 'Output format',
|
|
16
|
+
}),
|
|
17
|
+
limit: opt.number({
|
|
18
|
+
description: 'Maximum number of results',
|
|
19
|
+
}),
|
|
20
|
+
pattern: opt.string({
|
|
21
|
+
description: 'Filter by benchmark name pattern',
|
|
22
|
+
}),
|
|
23
|
+
since: opt.string({
|
|
24
|
+
description: 'Show runs since date (ISO 8601 or relative like "1 week ago")',
|
|
25
|
+
}),
|
|
26
|
+
tag: opt.array('string', {
|
|
27
|
+
aliases: ['t'],
|
|
28
|
+
description: 'Filter by tags',
|
|
29
|
+
}),
|
|
30
|
+
until: opt.string({
|
|
31
|
+
description: 'Show runs until date (ISO 8601 or relative like "1 day ago")',
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* Parser for `history show` command
|
|
36
|
+
*/
|
|
37
|
+
export const historyShowParser = merge(opt.options({
|
|
38
|
+
format: opt.enum(['human', 'json', 'csv'], {
|
|
39
|
+
description: 'Output format',
|
|
40
|
+
}),
|
|
41
|
+
}), pos.positionals(pos.string({
|
|
42
|
+
description: 'ID of the benchmark run to show',
|
|
43
|
+
name: 'run-id',
|
|
44
|
+
required: true,
|
|
45
|
+
})));
|
|
46
|
+
/**
|
|
47
|
+
* Parser for `history compare` command
|
|
48
|
+
*/
|
|
49
|
+
export const historyCompareParser = merge(opt.options({
|
|
50
|
+
format: opt.enum(['human', 'json'], {
|
|
51
|
+
description: 'Output format',
|
|
52
|
+
}),
|
|
53
|
+
}), pos.positionals(pos.string({
|
|
54
|
+
description: 'ID of the first benchmark run',
|
|
55
|
+
name: 'run-id1',
|
|
56
|
+
required: true,
|
|
57
|
+
}), pos.string({
|
|
58
|
+
description: 'ID of the second benchmark run',
|
|
59
|
+
name: 'run-id2',
|
|
60
|
+
required: true,
|
|
61
|
+
})));
|
|
62
|
+
/**
|
|
63
|
+
* Parser for `history trends` command
|
|
64
|
+
*/
|
|
65
|
+
export const historyTrendsParser = merge(opt.options({
|
|
66
|
+
all: opt.boolean({
|
|
67
|
+
aliases: ['a'],
|
|
68
|
+
description: 'Analyze all runs (ignore limit)',
|
|
69
|
+
}),
|
|
70
|
+
format: opt.enum(['human', 'json'], {
|
|
71
|
+
description: 'Output format',
|
|
72
|
+
}),
|
|
73
|
+
limit: opt.number({
|
|
74
|
+
description: 'Maximum number of runs to analyze',
|
|
75
|
+
}),
|
|
76
|
+
since: opt.string({
|
|
77
|
+
description: 'Show trends since date (ISO 8601 or relative like "1 week ago")',
|
|
78
|
+
}),
|
|
79
|
+
tag: opt.array('string', {
|
|
80
|
+
aliases: ['t'],
|
|
81
|
+
description: 'Filter by tags',
|
|
82
|
+
}),
|
|
83
|
+
until: opt.string({
|
|
84
|
+
description: 'Show trends until date (ISO 8601 or relative like "1 day ago")',
|
|
85
|
+
}),
|
|
86
|
+
}), pos.positionals(pos.string({
|
|
87
|
+
description: 'Filter by benchmark name pattern',
|
|
88
|
+
name: 'pattern',
|
|
89
|
+
})));
|
|
90
|
+
/**
|
|
91
|
+
* Parser for `history clean` command
|
|
92
|
+
*
|
|
93
|
+
* Includes validation requiring at least one cleanup criterion. Uses
|
|
94
|
+
* camelCaseValues transform for cleaner property access.
|
|
95
|
+
*/
|
|
96
|
+
export const historyCleanParser = map(map(opt.options({
|
|
97
|
+
'max-age': opt.number({
|
|
98
|
+
description: 'Remove runs older than this many days',
|
|
99
|
+
}),
|
|
100
|
+
'max-runs': opt.number({
|
|
101
|
+
description: 'Keep only this many most recent runs',
|
|
102
|
+
}),
|
|
103
|
+
'max-size': opt.number({
|
|
104
|
+
description: 'Keep history under this size in bytes',
|
|
105
|
+
}),
|
|
106
|
+
yes: opt.boolean({
|
|
107
|
+
aliases: ['y'],
|
|
108
|
+
description: 'Confirm cleanup without prompting',
|
|
109
|
+
}),
|
|
110
|
+
}), ({ positionals, values }) => {
|
|
111
|
+
if (!values['max-age'] && !values['max-runs'] && !values['max-size']) {
|
|
112
|
+
throw new Error('At least one cleanup criterion must be specified (--max-age, --max-runs, or --max-size)');
|
|
113
|
+
}
|
|
114
|
+
return { positionals, values };
|
|
115
|
+
}), camelCaseValues);
|
|
116
|
+
/**
|
|
117
|
+
* Parser for `history export` command
|
|
118
|
+
*/
|
|
119
|
+
export const historyExportParser = opt.options({
|
|
120
|
+
format: opt.enum(['json', 'csv'], {
|
|
121
|
+
description: 'Export format',
|
|
122
|
+
}),
|
|
123
|
+
output: opt.string({
|
|
124
|
+
aliases: ['o'],
|
|
125
|
+
description: 'Output file path',
|
|
126
|
+
required: true,
|
|
127
|
+
}),
|
|
128
|
+
since: opt.string({
|
|
129
|
+
description: 'Export runs since date',
|
|
130
|
+
}),
|
|
131
|
+
until: opt.string({
|
|
132
|
+
description: 'Export runs until date',
|
|
133
|
+
}),
|
|
134
|
+
});
|
|
135
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.js","sourceRoot":"","sources":["../../../src/cli/par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,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,wBAAwB;KACtC,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CLI Parsers
|
|
4
|
+
*
|
|
5
|
+
* Re-exports all bargs parser definitions for CLI commands.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.testParser = exports.runParser = exports.initParser = exports.historyTrendsParser = exports.historyShowParser = exports.historyListParser = exports.historyExportParser = exports.historyCompareParser = exports.historyCleanParser = exports.quietOption = exports.globalOptions = exports.baselineShowParser = exports.baselineSetParser = exports.baselineListParser = exports.baselineDeleteParser = exports.baselineAnalyzeParser = exports.analyzeParser = void 0;
|
|
11
|
+
var analyze_js_1 = require("./analyze.cjs");
|
|
12
|
+
Object.defineProperty(exports, "analyzeParser", { enumerable: true, get: function () { return analyze_js_1.analyzeParser; } });
|
|
13
|
+
var baseline_js_1 = require("./baseline.cjs");
|
|
14
|
+
Object.defineProperty(exports, "baselineAnalyzeParser", { enumerable: true, get: function () { return baseline_js_1.baselineAnalyzeParser; } });
|
|
15
|
+
Object.defineProperty(exports, "baselineDeleteParser", { enumerable: true, get: function () { return baseline_js_1.baselineDeleteParser; } });
|
|
16
|
+
Object.defineProperty(exports, "baselineListParser", { enumerable: true, get: function () { return baseline_js_1.baselineListParser; } });
|
|
17
|
+
Object.defineProperty(exports, "baselineSetParser", { enumerable: true, get: function () { return baseline_js_1.baselineSetParser; } });
|
|
18
|
+
Object.defineProperty(exports, "baselineShowParser", { enumerable: true, get: function () { return baseline_js_1.baselineShowParser; } });
|
|
19
|
+
var global_js_1 = require("./global.cjs");
|
|
20
|
+
Object.defineProperty(exports, "globalOptions", { enumerable: true, get: function () { return global_js_1.globalOptions; } });
|
|
21
|
+
Object.defineProperty(exports, "quietOption", { enumerable: true, get: function () { return global_js_1.quietOption; } });
|
|
22
|
+
var history_js_1 = require("./history.cjs");
|
|
23
|
+
Object.defineProperty(exports, "historyCleanParser", { enumerable: true, get: function () { return history_js_1.historyCleanParser; } });
|
|
24
|
+
Object.defineProperty(exports, "historyCompareParser", { enumerable: true, get: function () { return history_js_1.historyCompareParser; } });
|
|
25
|
+
Object.defineProperty(exports, "historyExportParser", { enumerable: true, get: function () { return history_js_1.historyExportParser; } });
|
|
26
|
+
Object.defineProperty(exports, "historyListParser", { enumerable: true, get: function () { return history_js_1.historyListParser; } });
|
|
27
|
+
Object.defineProperty(exports, "historyShowParser", { enumerable: true, get: function () { return history_js_1.historyShowParser; } });
|
|
28
|
+
Object.defineProperty(exports, "historyTrendsParser", { enumerable: true, get: function () { return history_js_1.historyTrendsParser; } });
|
|
29
|
+
var init_js_1 = require("./init.cjs");
|
|
30
|
+
Object.defineProperty(exports, "initParser", { enumerable: true, get: function () { return init_js_1.initParser; } });
|
|
31
|
+
var run_js_1 = require("./run.cjs");
|
|
32
|
+
Object.defineProperty(exports, "runParser", { enumerable: true, get: function () { return run_js_1.runParser; } });
|
|
33
|
+
var test_js_1 = require("./test.cjs");
|
|
34
|
+
Object.defineProperty(exports, "testParser", { enumerable: true, get: function () { return test_js_1.testParser; } });
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/parsers/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,4CAA6C;AAApC,2GAAA,aAAa,OAAA;AACtB,8CAMuB;AALrB,oHAAA,qBAAqB,OAAA;AACrB,mHAAA,oBAAoB,OAAA;AACpB,iHAAA,kBAAkB,OAAA;AAClB,gHAAA,iBAAiB,OAAA;AACjB,iHAAA,kBAAkB,OAAA;AAEpB,0CAAyD;AAAhD,0GAAA,aAAa,OAAA;AAAE,wGAAA,WAAW,OAAA;AACnC,4CAOsB;AANpB,gHAAA,kBAAkB,OAAA;AAClB,kHAAA,oBAAoB,OAAA;AACpB,iHAAA,mBAAmB,OAAA;AACnB,+GAAA,iBAAiB,OAAA;AACjB,+GAAA,iBAAiB,OAAA;AACjB,iHAAA,mBAAmB,OAAA;AAErB,sCAAuC;AAA9B,qGAAA,UAAU,OAAA;AACnB,oCAAqC;AAA5B,mGAAA,SAAS,OAAA;AAClB,sCAAuC;AAA9B,qGAAA,UAAU,OAAA"}
|