@zpress/config 0.5.0 → 0.5.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.
package/dist/index.d.ts CHANGED
@@ -82,6 +82,26 @@ export declare type ConfigErrorType = 'not_found' | 'parse_error' | 'validation_
82
82
 
83
83
  export declare type ConfigResult<T> = Result<T, ConfigError>;
84
84
 
85
+ /**
86
+ * Non-fatal config issue that may cause unexpected behavior.
87
+ */
88
+ export declare interface ConfigWarning {
89
+ readonly _tag: 'ConfigWarning';
90
+ readonly type: ConfigWarningType;
91
+ readonly message: string;
92
+ }
93
+
94
+ /**
95
+ * Create a ConfigWarning with the given type and message.
96
+ *
97
+ * @param type - The warning type discriminant
98
+ * @param message - Human-readable warning message
99
+ * @returns A ConfigWarning object
100
+ */
101
+ export declare function configWarning(type: ConfigWarningType, message: string): ConfigWarning;
102
+
103
+ export declare type ConfigWarningType = 'duplicate_include_prefix';
104
+
85
105
  /**
86
106
  * Type-safe config helper for zpress.config.ts files.
87
107
  *
package/dist/index.mjs CHANGED
@@ -10,6 +10,13 @@ function configError(type, message) {
10
10
  message
11
11
  };
12
12
  }
13
+ function configWarning(type, message) {
14
+ return {
15
+ _tag: 'ConfigWarning',
16
+ type,
17
+ message
18
+ };
19
+ }
13
20
  function configErrorFromZod(zodError) {
14
21
  return {
15
22
  _tag: 'ConfigError',
@@ -377,4 +384,4 @@ function getErrorMessage(error) {
377
384
  return String(error);
378
385
  }
379
386
  export { COLOR_MODES, ICON_COLORS, THEME_NAMES, isBuiltInIconColor, isBuiltInTheme, resolveDefaultColorMode } from "@zpress/theme";
380
- export { configError, configErrorFromZod, defineConfig, loader_loadConfig as loadConfig, pathsSchema, validateConfig, zpressConfigSchema };
387
+ export { configError, configErrorFromZod, configWarning, defineConfig, loader_loadConfig as loadConfig, pathsSchema, validateConfig, zpressConfigSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zpress/config",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Configuration loading and validation for zpress",
5
5
  "keywords": [
6
6
  "config",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://raw.githubusercontent.com/joggrdocs/zpress/v0.5.0/packages/config/schemas/schema.json",
3
+ "$id": "https://raw.githubusercontent.com/joggrdocs/zpress/v0.5.1/packages/config/schemas/schema.json",
4
4
  "title": "Zpress Configuration",
5
5
  "description": "Configuration file for zpress documentation framework",
6
6
  "$ref": "#/definitions/ZpressConfig",