mdat 3.2.0 → 3.2.1

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.
@@ -1,5 +1,5 @@
1
- import { Rule, Rule as Rule$1 } from "remark-mdat";
2
1
  import { ILogBasic, ILogLayer } from "lognow";
2
+ import { Rule, Rule as Rule$1 } from "remark-mdat";
3
3
  import { MetadataContext } from "metascope";
4
4
  import { VFile } from "vfile";
5
5
  //#region src/lib/config.d.ts
@@ -18,7 +18,7 @@ type ConfigToLoad = Array<Config | string> | Config | string;
18
18
  * places. Merge precedence: Base Defaults < Defaults < Searched Config <
19
19
  * Additional Config
20
20
  */
21
- declare function loadConfig(options?: {
21
+ export declare function loadConfig(options?: {
22
22
  /**
23
23
  * Additional Config objects to merge.
24
24
  *
@@ -42,11 +42,11 @@ declare function loadConfig(options?: {
42
42
  /**
43
43
  * Convenience function for merging configs. Rightmost config takes precedence.
44
44
  */
45
- declare function mergeConfig(a: Config, b: Config): Config;
45
+ export declare function mergeConfig(a: Config, b: Config): Config;
46
46
  /**
47
47
  * Identity function providing type inference for mdat configuration files.
48
48
  */
49
- declare function defineConfig(config: Config): Config;
49
+ export declare function defineConfig(config: Config): Config;
50
50
  //#endregion
51
51
  //#region src/lib/readme/create.d.ts
52
52
  type MdatReadmeCreateOptions = {
@@ -77,13 +77,13 @@ declare function createReadme(options?: Partial<MdatReadmeCreateOptions>): Promi
77
77
  *
78
78
  * @returns An array of VFiles
79
79
  */
80
- declare function expand(files?: string | string[], name?: string, output?: string, config?: ConfigToLoad, options?: {
80
+ export declare function expand(files?: string | string[], name?: string, output?: string, config?: ConfigToLoad, options?: {
81
81
  format?: boolean;
82
82
  }): Promise<VFile[]>;
83
83
  /**
84
84
  * Expand MDAT comments in a Markdown string.
85
85
  */
86
- declare function expandString(markdown: string, config?: ConfigToLoad, options?: {
86
+ export declare function expandString(markdown: string, config?: ConfigToLoad, options?: {
87
87
  format?: boolean;
88
88
  }): Promise<VFile>;
89
89
  /**
@@ -93,13 +93,13 @@ declare function expandString(markdown: string, config?: ConfigToLoad, options?:
93
93
  *
94
94
  * @returns An array of VFiles
95
95
  */
96
- declare function collapse(files?: string | string[], name?: string, output?: string, config?: ConfigToLoad, options?: {
96
+ export declare function collapse(files?: string | string[], name?: string, output?: string, config?: ConfigToLoad, options?: {
97
97
  format?: boolean;
98
98
  }): Promise<VFile[]>;
99
99
  /**
100
100
  * Collapse MDAT comments in a Markdown string.
101
101
  */
102
- declare function collapseString(markdown: string, config?: ConfigToLoad, options?: {
102
+ export declare function collapseString(markdown: string, config?: ConfigToLoad, options?: {
103
103
  format?: boolean;
104
104
  }): Promise<VFile>;
105
105
  /**
@@ -110,13 +110,13 @@ declare function collapseString(markdown: string, config?: ConfigToLoad, options
110
110
  *
111
111
  * @returns An array of VFiles
112
112
  */
113
- declare function strip(files?: string | string[], name?: string, output?: string, config?: ConfigToLoad, options?: {
113
+ export declare function strip(files?: string | string[], name?: string, output?: string, config?: ConfigToLoad, options?: {
114
114
  format?: boolean;
115
115
  }): Promise<VFile[]>;
116
116
  /**
117
117
  * Strip MDAT comments from a Markdown string.
118
118
  */
119
- declare function stripString(markdown: string, config?: ConfigToLoad, options?: {
119
+ export declare function stripString(markdown: string, config?: ConfigToLoad, options?: {
120
120
  format?: boolean;
121
121
  }): Promise<VFile>;
122
122
  /**
@@ -125,7 +125,7 @@ declare function stripString(markdown: string, config?: ConfigToLoad, options?:
125
125
  *
126
126
  * @returns Per-file sync status and expanded VFiles
127
127
  */
128
- declare function check(files?: string | string[], config?: ConfigToLoad, options?: {
128
+ export declare function check(files?: string | string[], config?: ConfigToLoad, options?: {
129
129
  format?: boolean;
130
130
  }): Promise<Array<{
131
131
  inSync: boolean;
@@ -135,7 +135,7 @@ declare function check(files?: string | string[], config?: ConfigToLoad, options
135
135
  * Check if MDAT comments in a Markdown string are up to date by expanding and
136
136
  * comparing per-tag.
137
137
  */
138
- declare function checkString(markdown: string, config?: ConfigToLoad, options?: {
138
+ export declare function checkString(markdown: string, config?: ConfigToLoad, options?: {
139
139
  format?: boolean;
140
140
  }): Promise<{
141
141
  inSync: boolean;
@@ -149,7 +149,7 @@ declare function checkString(markdown: string, config?: ConfigToLoad, options?:
149
149
  *
150
150
  * @throws {Error} If no package.json is found
151
151
  */
152
- declare function getContextMetadata(): Promise<MetadataContext>;
152
+ export declare function getContextMetadata(): Promise<MetadataContext>;
153
153
  declare const readmeMetadataTemplate: import("metascope").Template<{
154
154
  author: string | undefined;
155
155
  authorUrl: string | undefined;
@@ -193,7 +193,7 @@ type ReadmeMetadata = ReturnType<typeof readmeMetadataTemplate>;
193
193
  *
194
194
  * @public
195
195
  */
196
- declare function getReadmeMetadata(): Promise<{
196
+ export declare function getReadmeMetadata(): Promise<{
197
197
  author: string | undefined;
198
198
  authorUrl: string | undefined;
199
199
  bin: string[] | undefined;
@@ -234,7 +234,7 @@ declare function getReadmeMetadata(): Promise<{
234
234
  * Reset all cached metadata. Call between tests or when the underlying project
235
235
  * files may have changed on disk.
236
236
  */
237
- declare function resetMetadataCaches(): void;
237
+ export declare function resetMetadataCaches(): void;
238
238
  //#endregion
239
239
  //#region src/lib/log.d.ts
240
240
  /**
@@ -244,6 +244,6 @@ declare function resetMetadataCaches(): void;
244
244
  * @param logger - Accepts either a LogLayer instance or a Console- or
245
245
  * Stream-like log target
246
246
  */
247
- declare function setLogger(logger?: ILogBasic | ILogLayer<unknown>): void;
247
+ export declare function setLogger(logger?: ILogBasic | ILogLayer<unknown>): void;
248
248
  //#endregion
249
- export { type Config, type ReadmeMetadata, type Rule, check, checkString, collapse, collapseString, createReadme as create, createReadmeInteractive as createInteractive, defineConfig, expand, expandString, getContextMetadata, getReadmeMetadata, loadConfig, mergeConfig, resetMetadataCaches, setLogger, strip, stripString };
249
+ export { type Config, type ReadmeMetadata, type Rule, createReadme as create, createReadmeInteractive as createInteractive };