@hamsterbase/evidra 0.11.0 → 0.12.0
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/sdk/conformance-rules.js +1103 -814
- package/dist/sdk/conformance.js +1 -5
- package/dist/sdk/index-lcSI6COn.d.ts +108 -0
- package/dist/sdk/index.d.ts +2 -10
- package/dist/sdk/rules.d.ts +236 -154
- package/dist/sdk/runner-Dcqs9-Dm.js +191 -0
- package/dist/service/cli.js +2689 -268
- package/package.json +2 -3
- package/skills/evidra/SKILL.md +3 -2
- package/skills/evidra-share/scripts/named-tunnel.mjs +14 -2
- package/skills/evidra-share/scripts/share.sh +12 -7
- package/dist/sdk/types--o0ku6ya.d.ts +0 -21
- package/packages/conformance/rules/baseline-max-diff-pixels/RULE.md +0 -21
- package/packages/conformance/rules/commit-message/RULE.md +0 -29
- package/packages/conformance/rules/duplicate-localization/RULE.md +0 -37
- package/packages/conformance/rules/e2e-scenarios-structure/RULE.md +0 -39
- package/packages/conformance/rules/index.md +0 -18
- package/packages/conformance/rules/same-dir-import-only/RULE.md +0 -35
- package/packages/conformance/rules/single-component-file/RULE.md +0 -33
- package/packages/conformance/rules/source-locale-defaults/RULE.md +0 -48
- package/packages/conformance/rules/sync-locales/RULE.md +0 -45
- package/packages/conformance/rules/ui-scenarios-structure/RULE.md +0 -43
package/dist/sdk/conformance.js
CHANGED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
interface RuleResult {
|
|
3
|
+
name: string;
|
|
4
|
+
success: boolean;
|
|
5
|
+
messages: string;
|
|
6
|
+
howToFix: string;
|
|
7
|
+
}
|
|
8
|
+
interface CommonConfig {
|
|
9
|
+
/** 已解析的项目绝对路径。 */
|
|
10
|
+
readonly projectRoot: string;
|
|
11
|
+
}
|
|
12
|
+
interface RuleExample<Options = unknown> {
|
|
13
|
+
/** 示例参数,用于推导用法代码片段并由 optionsSchema 校验。 */
|
|
14
|
+
readonly options: Options;
|
|
15
|
+
/** 可选的场景说明。 */
|
|
16
|
+
readonly title?: string;
|
|
17
|
+
}
|
|
18
|
+
interface RuleDoc<Options = unknown> {
|
|
19
|
+
/** 规约稳定 ID(kebab-case,与文件名一致)。 */
|
|
20
|
+
readonly id: string;
|
|
21
|
+
/** 工作台展示名称。 */
|
|
22
|
+
readonly displayName: string;
|
|
23
|
+
/** 导出的工厂函数名(camelCase,用于生成用法文档)。 */
|
|
24
|
+
readonly exportName: string;
|
|
25
|
+
/** 用法示例中的导入包名,默认 '@hamsterbase/evidra/conformance-rules'。 */
|
|
26
|
+
readonly importFrom?: string;
|
|
27
|
+
/** 一句话说明规约的目标。 */
|
|
28
|
+
readonly summary: string;
|
|
29
|
+
/** 配置项 Zod Schema(用于运行时校验、类型推导与参数文档生成)。 */
|
|
30
|
+
readonly optionsSchema: z.ZodType;
|
|
31
|
+
/** 至少一个最小可用示例,用于推导用法文档。 */
|
|
32
|
+
readonly examples: readonly RuleExample<Options>[];
|
|
33
|
+
/** 可选的补充说明(检查范围、边界条件、副作用等)。 */
|
|
34
|
+
readonly notes?: string;
|
|
35
|
+
}
|
|
36
|
+
type RuleTask = ((commonConfig: CommonConfig) => Promise<RuleResult>) & {
|
|
37
|
+
/** 规约的稳定 ID,报告按此归并同一规约的配置。 */
|
|
38
|
+
readonly id?: string;
|
|
39
|
+
/** 用于在执行前展示规则名称。 */
|
|
40
|
+
readonly displayName?: string;
|
|
41
|
+
/** 相对于配置文件的 Markdown 路径,供自定义规约手写文档使用。 */
|
|
42
|
+
readonly readme?: string;
|
|
43
|
+
/** 规约元数据,存在时由框架自动推导 Markdown 文档。 */
|
|
44
|
+
readonly doc?: RuleDoc;
|
|
45
|
+
};
|
|
46
|
+
/** evidra.conformance.ts 的默认导出。 */
|
|
47
|
+
interface Config {
|
|
48
|
+
/** 默认配置文件所在目录;相对路径也基于配置文件所在目录。 */
|
|
49
|
+
projectRoot?: string;
|
|
50
|
+
/** 按数组顺序执行的任务函数;单个任务失败不会阻止后续任务,空数组视为通过。 */
|
|
51
|
+
rules: readonly RuleTask[];
|
|
52
|
+
}
|
|
53
|
+
declare function defineConfig(config: Config): Config;
|
|
54
|
+
interface RuleDefinition<Schema extends z.ZodType> {
|
|
55
|
+
/** 规约稳定 ID(kebab-case,与文件名一致)。 */
|
|
56
|
+
readonly id: string;
|
|
57
|
+
/** 工作台展示名称。 */
|
|
58
|
+
readonly displayName: string;
|
|
59
|
+
/** 导出的工厂函数名(camelCase,用于生成用法文档)。 */
|
|
60
|
+
readonly exportName: string;
|
|
61
|
+
/** 用法示例中的导入包名,默认 '@hamsterbase/evidra/conformance-rules'。 */
|
|
62
|
+
readonly importFrom?: string;
|
|
63
|
+
/** 一句话说明规约的目标。 */
|
|
64
|
+
readonly summary: string;
|
|
65
|
+
/** 配置项 Zod Schema(用于运行时校验、类型推导和参数文档生成)。 */
|
|
66
|
+
readonly optionsSchema: Schema;
|
|
67
|
+
/** 至少一个最小可用示例,用于推导用法文档。 */
|
|
68
|
+
readonly examples: readonly [RuleExample<z.input<Schema>>, ...RuleExample<z.input<Schema>>[]];
|
|
69
|
+
/** 可选的补充说明(检查范围、边界条件、副作用等)。 */
|
|
70
|
+
readonly notes?: string;
|
|
71
|
+
/** 按配置覆写工作台展示名称(例如按 options.name 区分多个实例)。 */
|
|
72
|
+
readonly resolveDisplayName?: (options: z.output<Schema>) => string;
|
|
73
|
+
/** 执行规约检查。 */
|
|
74
|
+
readonly run: (common: CommonConfig, options: z.output<Schema>) => Promise<RuleResult>;
|
|
75
|
+
}
|
|
76
|
+
type RuleFactory<Schema extends z.ZodType> = (...args: {} extends z.input<Schema> ? [options?: z.input<Schema>] : [options: z.input<Schema>]) => RuleTask;
|
|
77
|
+
type DefinedRule<Schema extends z.ZodType = z.ZodType> = RuleFactory<Schema> & {
|
|
78
|
+
readonly meta: RuleDoc<z.input<Schema>>;
|
|
79
|
+
};
|
|
80
|
+
/** 定义一条自描述规约:统一声明元信息、Zod 配置校验与检查实现。 */
|
|
81
|
+
declare function defineRule<Schema extends z.ZodType>(definition: RuleDefinition<Schema>): DefinedRule<Schema>;
|
|
82
|
+
interface JsonSchemaNode {
|
|
83
|
+
type?: string | readonly string[];
|
|
84
|
+
description?: string;
|
|
85
|
+
default?: unknown;
|
|
86
|
+
readOnly?: boolean;
|
|
87
|
+
minLength?: number;
|
|
88
|
+
maxLength?: number;
|
|
89
|
+
minimum?: number;
|
|
90
|
+
maximum?: number;
|
|
91
|
+
exclusiveMinimum?: number;
|
|
92
|
+
exclusiveMaximum?: number;
|
|
93
|
+
pattern?: string;
|
|
94
|
+
enum?: readonly unknown[];
|
|
95
|
+
const?: unknown;
|
|
96
|
+
items?: JsonSchemaNode;
|
|
97
|
+
properties?: Record<string, JsonSchemaNode>;
|
|
98
|
+
required?: readonly string[];
|
|
99
|
+
additionalProperties?: boolean | JsonSchemaNode;
|
|
100
|
+
anyOf?: readonly JsonSchemaNode[];
|
|
101
|
+
oneOf?: readonly JsonSchemaNode[];
|
|
102
|
+
tsType?: string;
|
|
103
|
+
}
|
|
104
|
+
/** 将规约的 Zod Schema 转换为带 tsType 元信息的 JSON Schema。 */
|
|
105
|
+
declare function ruleOptionsToJsonSchema(schema: z.ZodType): JsonSchemaNode;
|
|
106
|
+
/** 根据规约定义与 Zod Schema 自动推导工作台展示的 Markdown 文档。 */
|
|
107
|
+
declare function renderRuleDoc(doc: RuleDoc): string;
|
|
108
|
+
export { RuleDefinition as a, Config as c, RuleDoc as d, RuleExample as f, DefinedRule as i, defineConfig as l, RuleTask as m, renderRuleDoc as n, RuleFactory as o, RuleResult as p, ruleOptionsToJsonSchema as r, defineRule as s, JsonSchemaNode as t, CommonConfig as u };
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import { n as RuleResult, r as
|
|
2
|
-
|
|
3
|
-
interface Config {
|
|
4
|
-
/** 默认配置文件所在目录;相对路径也基于配置文件所在目录。 */
|
|
5
|
-
projectRoot?: string;
|
|
6
|
-
/** 按数组顺序执行的任务函数;单个任务失败不会阻止后续任务,空数组视为通过。 */
|
|
7
|
-
rules: readonly RuleTask[];
|
|
8
|
-
}
|
|
9
|
-
export declare function defineConfig(config: Config): Config;
|
|
10
|
-
export type { CommonConfig, Config, RuleResult, RuleTask };
|
|
1
|
+
import { a as RuleDefinition, c as Config, d as RuleDoc, f as RuleExample, i as DefinedRule, l as defineConfig, m as RuleTask, n as renderRuleDoc, o as RuleFactory, p as RuleResult, r as ruleOptionsToJsonSchema, s as defineRule, t as JsonSchemaNode, u as CommonConfig } from "./index-lcSI6COn.js";
|
|
2
|
+
export { type CommonConfig, type Config, type DefinedRule, type JsonSchemaNode, type RuleDefinition, type RuleDoc, type RuleExample, type RuleFactory, type RuleResult, type RuleTask, defineConfig, defineRule, renderRuleDoc, ruleOptionsToJsonSchema };
|
package/dist/sdk/rules.d.ts
CHANGED
|
@@ -1,156 +1,238 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
baselineDir:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
base
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
keyArgument
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
1
|
+
import { i as DefinedRule } from "./index-lcSI6COn.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
declare const optionsSchema$9: z.ZodObject<{
|
|
4
|
+
baselineDir: z.ZodString;
|
|
5
|
+
maxDiffPixels: z.ZodNumber;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
type BaselineMaxDiffPixelsOptions = z.input<typeof optionsSchema$9>;
|
|
8
|
+
export declare const baselineMaxDiffPixels: DefinedRule<z.ZodObject<{
|
|
9
|
+
baselineDir: z.ZodString;
|
|
10
|
+
maxDiffPixels: z.ZodNumber;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
declare const optionsSchema$8: z.ZodObject<{
|
|
13
|
+
forbiddenPrefixes: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
14
|
+
base: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
type CommitMessageOptions = z.input<typeof optionsSchema$8>;
|
|
17
|
+
export declare const commitMessage: DefinedRule<z.ZodObject<{
|
|
18
|
+
forbiddenPrefixes: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
19
|
+
base: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
declare const optionsSchema$7: z.ZodObject<{
|
|
22
|
+
rulesDir: z.ZodString;
|
|
23
|
+
entryFile: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
type ConformanceRuleFormatOptions = z.input<typeof optionsSchema$7>;
|
|
26
|
+
export declare const conformanceRuleFormat: DefinedRule<z.ZodObject<{
|
|
27
|
+
rulesDir: z.ZodString;
|
|
28
|
+
entryFile: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
declare const optionsSchema$6: z.ZodObject<{
|
|
31
|
+
scanRoot: z.ZodString;
|
|
32
|
+
excludeDirs: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
33
|
+
skipDirNames: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
34
|
+
callName: z.ZodDefault<z.ZodString>;
|
|
35
|
+
keyArgument: z.ZodDefault<z.ZodNumber>;
|
|
36
|
+
valueArgument: z.ZodDefault<z.ZodNumber>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
type DuplicateLocalizationOptions = z.input<typeof optionsSchema$6>;
|
|
39
|
+
export declare const duplicateLocalization: DefinedRule<z.ZodObject<{
|
|
40
|
+
scanRoot: z.ZodString;
|
|
41
|
+
excludeDirs: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
42
|
+
skipDirNames: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
43
|
+
callName: z.ZodDefault<z.ZodString>;
|
|
44
|
+
keyArgument: z.ZodDefault<z.ZodNumber>;
|
|
45
|
+
valueArgument: z.ZodDefault<z.ZodNumber>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
declare const optionsSchema$5: z.ZodObject<{
|
|
48
|
+
root: z.ZodString;
|
|
49
|
+
name: z.ZodOptional<z.ZodString>;
|
|
50
|
+
entrySuffix: z.ZodDefault<z.ZodString>;
|
|
51
|
+
sharedDir: z.ZodDefault<z.ZodString>;
|
|
52
|
+
utilsDir: z.ZodDefault<z.ZodString>;
|
|
53
|
+
strictRoot: z.ZodDefault<z.ZodBoolean>;
|
|
54
|
+
sharedThreshold: z.ZodDefault<z.ZodNumber>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
type E2eScenariosStructureOptions = z.input<typeof optionsSchema$5>;
|
|
57
|
+
export declare const e2eScenariosStructure: DefinedRule<z.ZodObject<{
|
|
58
|
+
root: z.ZodString;
|
|
59
|
+
name: z.ZodOptional<z.ZodString>;
|
|
60
|
+
entrySuffix: z.ZodDefault<z.ZodString>;
|
|
61
|
+
sharedDir: z.ZodDefault<z.ZodString>;
|
|
62
|
+
utilsDir: z.ZodDefault<z.ZodString>;
|
|
63
|
+
strictRoot: z.ZodDefault<z.ZodBoolean>;
|
|
64
|
+
sharedThreshold: z.ZodDefault<z.ZodNumber>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
declare const optionsSchema$4: z.ZodObject<{
|
|
67
|
+
scanRoot: z.ZodString;
|
|
68
|
+
excludeDirs: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
69
|
+
skipDirNames: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
70
|
+
marker: z.ZodDefault<z.ZodString>;
|
|
71
|
+
aliases: z.ZodDefault<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
type SameDirImportOnlyOptions = z.input<typeof optionsSchema$4>;
|
|
74
|
+
export declare const sameDirImportOnly: DefinedRule<z.ZodObject<{
|
|
75
|
+
scanRoot: z.ZodString;
|
|
76
|
+
excludeDirs: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
77
|
+
skipDirNames: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
78
|
+
marker: z.ZodDefault<z.ZodString>;
|
|
79
|
+
aliases: z.ZodDefault<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
declare const optionsSchema$3: z.ZodObject<{
|
|
82
|
+
scanRoot: z.ZodString;
|
|
83
|
+
excludeDirs: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
84
|
+
skipDirNames: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
85
|
+
componentWrappers: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
type SingleComponentFileOptions = z.input<typeof optionsSchema$3>;
|
|
88
|
+
export declare const singleComponentFile: DefinedRule<z.ZodObject<{
|
|
89
|
+
scanRoot: z.ZodString;
|
|
90
|
+
excludeDirs: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
91
|
+
skipDirNames: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
92
|
+
componentWrappers: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
declare const localizationCallSchema: z.ZodObject<{
|
|
95
|
+
name: z.ZodString;
|
|
96
|
+
valueArgument: z.ZodNumber;
|
|
97
|
+
member: z.ZodDefault<z.ZodBoolean>;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
declare const optionsSchema$2: z.ZodObject<{
|
|
100
|
+
scanRoot: z.ZodString;
|
|
101
|
+
excludeDirs: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
102
|
+
skipDirNames: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
103
|
+
calls: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
valueArgument: z.ZodNumber;
|
|
106
|
+
member: z.ZodDefault<z.ZodBoolean>;
|
|
107
|
+
}, z.core.$strip>>>;
|
|
108
|
+
pattern: z.ZodInstanceOf<RegExp>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
type LocalizationCall = z.input<typeof localizationCallSchema>;
|
|
111
|
+
type SourceLocaleDefaultsOptions = z.input<typeof optionsSchema$2>;
|
|
93
112
|
/** 汉字、CJK 标点和全角字符;可用于检查英文默认文案。 */
|
|
94
113
|
export declare const CJK_PATTERN: RegExp;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
114
|
+
export declare const sourceLocaleDefaults: DefinedRule<z.ZodObject<{
|
|
115
|
+
scanRoot: z.ZodString;
|
|
116
|
+
excludeDirs: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
117
|
+
skipDirNames: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
118
|
+
calls: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
119
|
+
name: z.ZodString;
|
|
120
|
+
valueArgument: z.ZodNumber;
|
|
121
|
+
member: z.ZodDefault<z.ZodBoolean>;
|
|
122
|
+
}, z.core.$strip>>>;
|
|
123
|
+
pattern: z.ZodInstanceOf<RegExp>;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
declare const optionsSchema$1: z.ZodObject<{
|
|
126
|
+
scanRoot: z.ZodString;
|
|
127
|
+
excludeDirs: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
128
|
+
skipDirNames: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
129
|
+
callName: z.ZodDefault<z.ZodString>;
|
|
130
|
+
keyArgument: z.ZodDefault<z.ZodNumber>;
|
|
131
|
+
valueArgument: z.ZodDefault<z.ZodNumber>;
|
|
132
|
+
localesDir: z.ZodString;
|
|
133
|
+
defaultLocale: z.ZodString;
|
|
134
|
+
otherLocales: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
135
|
+
metadataKey: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
type SyncLocalesOptions = z.input<typeof optionsSchema$1>;
|
|
138
|
+
export declare const syncLocales: DefinedRule<z.ZodObject<{
|
|
139
|
+
scanRoot: z.ZodString;
|
|
140
|
+
excludeDirs: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
141
|
+
skipDirNames: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
142
|
+
callName: z.ZodDefault<z.ZodString>;
|
|
143
|
+
keyArgument: z.ZodDefault<z.ZodNumber>;
|
|
144
|
+
valueArgument: z.ZodDefault<z.ZodNumber>;
|
|
145
|
+
localesDir: z.ZodString;
|
|
146
|
+
defaultLocale: z.ZodString;
|
|
147
|
+
otherLocales: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
148
|
+
metadataKey: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
declare const optionsSchema: z.ZodObject<{
|
|
151
|
+
root: z.ZodString;
|
|
152
|
+
name: z.ZodOptional<z.ZodString>;
|
|
153
|
+
entrySuffix: z.ZodDefault<z.ZodString>;
|
|
154
|
+
sharedDir: z.ZodDefault<z.ZodString>;
|
|
155
|
+
utilsDir: z.ZodDefault<z.ZodString>;
|
|
156
|
+
exportName: z.ZodDefault<z.ZodString>;
|
|
157
|
+
strictRoot: z.ZodDefault<z.ZodBoolean>;
|
|
158
|
+
sharedThreshold: z.ZodDefault<z.ZodNumber>;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
type UiScenariosStructureOptions = z.input<typeof optionsSchema>;
|
|
161
|
+
export declare const uiScenariosStructure: DefinedRule<z.ZodObject<{
|
|
162
|
+
root: z.ZodString;
|
|
163
|
+
name: z.ZodOptional<z.ZodString>;
|
|
164
|
+
entrySuffix: z.ZodDefault<z.ZodString>;
|
|
165
|
+
sharedDir: z.ZodDefault<z.ZodString>;
|
|
166
|
+
utilsDir: z.ZodDefault<z.ZodString>;
|
|
167
|
+
exportName: z.ZodDefault<z.ZodString>;
|
|
168
|
+
strictRoot: z.ZodDefault<z.ZodBoolean>;
|
|
169
|
+
sharedThreshold: z.ZodDefault<z.ZodNumber>;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
/** 所有内置规约,按稳定 ID 排序,供工作台目录与文档推导使用。 */
|
|
172
|
+
export declare const builtinRules: readonly [DefinedRule<import("zod").ZodObject<{
|
|
173
|
+
baselineDir: import("zod").ZodString;
|
|
174
|
+
maxDiffPixels: import("zod").ZodNumber;
|
|
175
|
+
}, import("zod/v4/core").$strip>>, DefinedRule<import("zod").ZodObject<{
|
|
176
|
+
forbiddenPrefixes: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
177
|
+
base: import("zod").ZodOptional<import("zod").ZodString>;
|
|
178
|
+
}, import("zod/v4/core").$strip>>, DefinedRule<import("zod").ZodObject<{
|
|
179
|
+
rulesDir: import("zod").ZodString;
|
|
180
|
+
entryFile: import("zod").ZodOptional<import("zod").ZodString>;
|
|
181
|
+
}, import("zod/v4/core").$strip>>, DefinedRule<import("zod").ZodObject<{
|
|
182
|
+
scanRoot: import("zod").ZodString;
|
|
183
|
+
excludeDirs: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
184
|
+
skipDirNames: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
185
|
+
callName: import("zod").ZodDefault<import("zod").ZodString>;
|
|
186
|
+
keyArgument: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
187
|
+
valueArgument: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
188
|
+
}, import("zod/v4/core").$strip>>, DefinedRule<import("zod").ZodObject<{
|
|
189
|
+
root: import("zod").ZodString;
|
|
190
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
191
|
+
entrySuffix: import("zod").ZodDefault<import("zod").ZodString>;
|
|
192
|
+
sharedDir: import("zod").ZodDefault<import("zod").ZodString>;
|
|
193
|
+
utilsDir: import("zod").ZodDefault<import("zod").ZodString>;
|
|
194
|
+
strictRoot: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
195
|
+
sharedThreshold: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
196
|
+
}, import("zod/v4/core").$strip>>, DefinedRule<import("zod").ZodObject<{
|
|
197
|
+
scanRoot: import("zod").ZodString;
|
|
198
|
+
excludeDirs: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
199
|
+
skipDirNames: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
200
|
+
marker: import("zod").ZodDefault<import("zod").ZodString>;
|
|
201
|
+
aliases: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>>;
|
|
202
|
+
}, import("zod/v4/core").$strip>>, DefinedRule<import("zod").ZodObject<{
|
|
203
|
+
scanRoot: import("zod").ZodString;
|
|
204
|
+
excludeDirs: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
205
|
+
skipDirNames: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
206
|
+
componentWrappers: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
207
|
+
}, import("zod/v4/core").$strip>>, DefinedRule<import("zod").ZodObject<{
|
|
208
|
+
scanRoot: import("zod").ZodString;
|
|
209
|
+
excludeDirs: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
210
|
+
skipDirNames: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
211
|
+
calls: import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodObject<{
|
|
212
|
+
name: import("zod").ZodString;
|
|
213
|
+
valueArgument: import("zod").ZodNumber;
|
|
214
|
+
member: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
215
|
+
}, import("zod/v4/core").$strip>>>;
|
|
216
|
+
pattern: import("zod").ZodInstanceOf<RegExp>;
|
|
217
|
+
}, import("zod/v4/core").$strip>>, DefinedRule<import("zod").ZodObject<{
|
|
218
|
+
scanRoot: import("zod").ZodString;
|
|
219
|
+
excludeDirs: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
220
|
+
skipDirNames: import("zod").ZodDefault<import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
221
|
+
callName: import("zod").ZodDefault<import("zod").ZodString>;
|
|
222
|
+
keyArgument: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
223
|
+
valueArgument: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
224
|
+
localesDir: import("zod").ZodString;
|
|
225
|
+
defaultLocale: import("zod").ZodString;
|
|
226
|
+
otherLocales: import("zod").ZodReadonly<import("zod").ZodArray<import("zod").ZodString>>;
|
|
227
|
+
metadataKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
228
|
+
}, import("zod/v4/core").$strip>>, DefinedRule<import("zod").ZodObject<{
|
|
229
|
+
root: import("zod").ZodString;
|
|
230
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
231
|
+
entrySuffix: import("zod").ZodDefault<import("zod").ZodString>;
|
|
232
|
+
sharedDir: import("zod").ZodDefault<import("zod").ZodString>;
|
|
233
|
+
utilsDir: import("zod").ZodDefault<import("zod").ZodString>;
|
|
234
|
+
exportName: import("zod").ZodDefault<import("zod").ZodString>;
|
|
235
|
+
strictRoot: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
236
|
+
sharedThreshold: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
237
|
+
}, import("zod/v4/core").$strip>>];
|
|
238
|
+
export type { BaselineMaxDiffPixelsOptions, CommitMessageOptions, ConformanceRuleFormatOptions, DuplicateLocalizationOptions, E2eScenariosStructureOptions, LocalizationCall, SameDirImportOnlyOptions, SingleComponentFileOptions, SourceLocaleDefaultsOptions, SyncLocalesOptions, UiScenariosStructureOptions };
|