Skip to content

Commit 18e95ff

Browse files
committed
feat(models): export default persist config
1 parent 97c31f8 commit 18e95ff

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

packages/models/src/index.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ export {
1717
} from './lib/audit-output.js';
1818
export { auditSchema, type Audit } from './lib/audit.js';
1919
export {
20+
cacheConfigObjectSchema,
2021
cacheConfigSchema,
22+
cacheConfigShorthandSchema,
2123
type CacheConfig,
22-
cacheConfigObjectSchema,
2324
type CacheConfigObject,
24-
cacheConfigShorthandSchema,
2525
type CacheConfigShorthand,
2626
} from './lib/cache-config.js';
2727
export {
@@ -31,6 +31,10 @@ export {
3131
type CategoryRef,
3232
} from './lib/category-config.js';
3333
export { commitSchema, type Commit } from './lib/commit.js';
34+
export {
35+
artifactGenerationCommandSchema,
36+
pluginArtifactOptionsSchema,
37+
} from './lib/configuration.js';
3438
export { coreConfigSchema, type CoreConfig } from './lib/core-config.js';
3539
export {
3640
groupRefSchema,
@@ -44,6 +48,7 @@ export {
4448
SUPPORTED_CONFIG_FILE_FORMATS,
4549
} from './lib/implementation/configuration.js';
4650
export {
51+
DEFAULT_PERSIST_CONFIG,
4752
DEFAULT_PERSIST_FILENAME,
4853
DEFAULT_PERSIST_FORMAT,
4954
DEFAULT_PERSIST_OUTPUT_DIR,
@@ -143,7 +148,3 @@ export {
143148
type Tree,
144149
} from './lib/tree.js';
145150
export { uploadConfigSchema, type UploadConfig } from './lib/upload-config.js';
146-
export {
147-
artifactGenerationCommandSchema,
148-
pluginArtifactOptionsSchema,
149-
} from './lib/configuration.js';
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
import type { Format } from '../persist-config.js';
1+
import type { Format, PersistConfig } from '../persist-config.js';
22

33
export const DEFAULT_PERSIST_OUTPUT_DIR = '.code-pushup';
44
export const DEFAULT_PERSIST_FILENAME = 'report';
55
export const DEFAULT_PERSIST_FORMAT: Format[] = ['json', 'md'];
6+
7+
export const DEFAULT_PERSIST_CONFIG: Required<PersistConfig> = {
8+
outputDir: DEFAULT_PERSIST_OUTPUT_DIR,
9+
filename: DEFAULT_PERSIST_FILENAME,
10+
format: DEFAULT_PERSIST_FORMAT,
11+
skipReports: false,
12+
};

0 commit comments

Comments
 (0)