@botpress/cli 5.4.3 → 5.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/.turbo/turbo-build.log +13 -13
- package/dist/code-generation/integration-implementation/integration-secret.d.ts +1 -0
- package/dist/code-generation/integration-implementation/integration-secret.js +5 -2
- package/dist/code-generation/integration-implementation/integration-secret.js.map +2 -2
- package/dist/command-definitions.d.ts +6 -0
- package/dist/command-implementations/dev-command.d.ts +3 -0
- package/dist/command-implementations/dev-command.js +33 -1
- package/dist/command-implementations/dev-command.js.map +2 -2
- package/dist/command-implementations/index.d.ts +6 -0
- package/dist/command-implementations/lint-command.js +13 -6
- package/dist/command-implementations/lint-command.js.map +2 -2
- package/dist/command-implementations/project-command.d.ts +3 -0
- package/dist/command-implementations/project-command.js.map +2 -2
- package/dist/config.d.ts +6 -0
- package/dist/config.js +6 -0
- package/dist/config.js.map +2 -2
- package/dist/index.d.ts +6 -0
- package/dist/linter/base-linter.d.ts +16 -2
- package/dist/linter/base-linter.js +29 -4
- package/dist/linter/base-linter.js.map +3 -3
- package/dist/linter/ruleset-functions.d.ts +8 -0
- package/dist/linter/ruleset-functions.js +75 -0
- package/dist/linter/ruleset-functions.js.map +7 -0
- package/dist/linter/ruleset-tests/common.d.ts +1 -2
- package/dist/linter/ruleset-tests/common.js.map +1 -1
- package/dist/linter/rulesets/bot.ruleset.d.ts +1 -141
- package/dist/linter/rulesets/bot.ruleset.js +29 -28
- package/dist/linter/rulesets/bot.ruleset.js.map +2 -2
- package/dist/linter/rulesets/integration.ruleset.d.ts +1 -336
- package/dist/linter/rulesets/integration.ruleset.js +63 -62
- package/dist/linter/rulesets/integration.ruleset.js.map +2 -2
- package/dist/linter/rulesets/interface.ruleset.d.ts +1 -101
- package/dist/linter/rulesets/interface.ruleset.js +21 -20
- package/dist/linter/rulesets/interface.ruleset.js.map +2 -2
- package/package.json +3 -3
- package/templates/empty-bot/package.json +2 -2
- package/templates/empty-integration/package.json +2 -2
- package/templates/empty-plugin/package.json +1 -1
- package/templates/hello-world/package.json +2 -2
- package/templates/webhook-message/package.json +2 -2
|
@@ -1,141 +1 @@
|
|
|
1
|
-
export declare const BOT_RULESET:
|
|
2
|
-
extends: never[];
|
|
3
|
-
rules: {
|
|
4
|
-
'event-outputparams-should-have-title': {
|
|
5
|
-
description: string;
|
|
6
|
-
message: string;
|
|
7
|
-
severity: "warn";
|
|
8
|
-
given: string;
|
|
9
|
-
then: {
|
|
10
|
-
field: string;
|
|
11
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
14
|
-
'event-outputparams-must-have-description': {
|
|
15
|
-
description: string;
|
|
16
|
-
message: string;
|
|
17
|
-
severity: "error";
|
|
18
|
-
given: string;
|
|
19
|
-
then: {
|
|
20
|
-
field: string;
|
|
21
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
22
|
-
}[];
|
|
23
|
-
};
|
|
24
|
-
'configuration-fields-must-have-a-title': {
|
|
25
|
-
description: string;
|
|
26
|
-
message: string;
|
|
27
|
-
severity: "error";
|
|
28
|
-
given: string;
|
|
29
|
-
then: {
|
|
30
|
-
field: string;
|
|
31
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
32
|
-
}[];
|
|
33
|
-
};
|
|
34
|
-
'configuration-fields-must-have-a-description': {
|
|
35
|
-
description: string;
|
|
36
|
-
message: string;
|
|
37
|
-
severity: "error";
|
|
38
|
-
given: string;
|
|
39
|
-
then: {
|
|
40
|
-
field: string;
|
|
41
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
42
|
-
}[];
|
|
43
|
-
};
|
|
44
|
-
'user-tags-should-have-a-title': {
|
|
45
|
-
description: string;
|
|
46
|
-
message: string;
|
|
47
|
-
severity: "warn";
|
|
48
|
-
given: string;
|
|
49
|
-
then: {
|
|
50
|
-
field: string;
|
|
51
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
52
|
-
}[];
|
|
53
|
-
};
|
|
54
|
-
'user-tags-must-have-a-description': {
|
|
55
|
-
description: string;
|
|
56
|
-
message: string;
|
|
57
|
-
severity: "error";
|
|
58
|
-
given: string;
|
|
59
|
-
then: {
|
|
60
|
-
field: string;
|
|
61
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
62
|
-
}[];
|
|
63
|
-
};
|
|
64
|
-
'conversation-tags-should-have-a-title': {
|
|
65
|
-
description: string;
|
|
66
|
-
message: string;
|
|
67
|
-
severity: "warn";
|
|
68
|
-
given: string;
|
|
69
|
-
then: {
|
|
70
|
-
field: string;
|
|
71
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
72
|
-
}[];
|
|
73
|
-
};
|
|
74
|
-
'conversation-tags-must-have-a-description': {
|
|
75
|
-
description: string;
|
|
76
|
-
message: string;
|
|
77
|
-
severity: "error";
|
|
78
|
-
given: string;
|
|
79
|
-
then: {
|
|
80
|
-
field: string;
|
|
81
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
82
|
-
}[];
|
|
83
|
-
};
|
|
84
|
-
'message-tags-should-have-a-title': {
|
|
85
|
-
description: string;
|
|
86
|
-
message: string;
|
|
87
|
-
severity: "warn";
|
|
88
|
-
given: string;
|
|
89
|
-
then: {
|
|
90
|
-
field: string;
|
|
91
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
92
|
-
}[];
|
|
93
|
-
};
|
|
94
|
-
'message-tags-must-have-a-description': {
|
|
95
|
-
description: string;
|
|
96
|
-
message: string;
|
|
97
|
-
severity: "error";
|
|
98
|
-
given: string;
|
|
99
|
-
then: {
|
|
100
|
-
field: string;
|
|
101
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
102
|
-
}[];
|
|
103
|
-
};
|
|
104
|
-
'legacy-zui-title-should-be-removed': {
|
|
105
|
-
description: string;
|
|
106
|
-
severity: "error";
|
|
107
|
-
given: string;
|
|
108
|
-
then: {
|
|
109
|
-
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
110
|
-
}[];
|
|
111
|
-
};
|
|
112
|
-
'legacy-zui-examples-should-be-removed': {
|
|
113
|
-
description: string;
|
|
114
|
-
severity: "hint";
|
|
115
|
-
given: string;
|
|
116
|
-
then: {
|
|
117
|
-
function: import("@stoplight/spectral-core").RulesetFunctionWithValidator<unknown, null>;
|
|
118
|
-
}[];
|
|
119
|
-
};
|
|
120
|
-
'state-fields-should-have-title': {
|
|
121
|
-
description: string;
|
|
122
|
-
message: string;
|
|
123
|
-
severity: "warn";
|
|
124
|
-
given: string;
|
|
125
|
-
then: {
|
|
126
|
-
field: string;
|
|
127
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
128
|
-
}[];
|
|
129
|
-
};
|
|
130
|
-
'state-fields-must-have-description': {
|
|
131
|
-
description: string;
|
|
132
|
-
message: string;
|
|
133
|
-
severity: "error";
|
|
134
|
-
given: string;
|
|
135
|
-
then: {
|
|
136
|
-
field: string;
|
|
137
|
-
function: import("@stoplight/spectral-core").RulesetFunction<any, any> | import("@stoplight/spectral-core").RulesetFunctionWithValidator<any, any>;
|
|
138
|
-
}[];
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
};
|
|
1
|
+
export declare const BOT_RULESET: import("@stoplight/spectral-core").RulesetDefinition & import("../ruleset-tests/common").Ruleset;
|
|
@@ -22,13 +22,14 @@ __export(bot_ruleset_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(bot_ruleset_exports);
|
|
24
24
|
var import_spectral_functions = require("@stoplight/spectral-functions");
|
|
25
|
+
var import_ruleset_functions = require("../ruleset-functions");
|
|
25
26
|
var import_spectral_functions2 = require("../spectral-functions");
|
|
26
|
-
const BOT_RULESET = {
|
|
27
|
+
const BOT_RULESET = (0, import_ruleset_functions.preprocessRuleset)({
|
|
27
28
|
extends: [],
|
|
28
29
|
rules: {
|
|
29
30
|
"event-outputparams-should-have-title": {
|
|
30
|
-
description: "All event output parameters
|
|
31
|
-
message: "{{description}}: {{error}}
|
|
31
|
+
description: "All event output parameters {{callToAction}} have a title",
|
|
32
|
+
message: "{{description}}: {{error}} {{callToAction}} provide a non-empty title by using .title() in its Zod schema",
|
|
32
33
|
severity: "warn",
|
|
33
34
|
given: "$.events[*]..schema.properties[*]",
|
|
34
35
|
then: [
|
|
@@ -42,8 +43,8 @@ const BOT_RULESET = {
|
|
|
42
43
|
]
|
|
43
44
|
},
|
|
44
45
|
"event-outputparams-must-have-description": {
|
|
45
|
-
description: "All event output parameters
|
|
46
|
-
message: "{{description}}: {{error}}
|
|
46
|
+
description: "All event output parameters {{callToAction}} have a description",
|
|
47
|
+
message: "{{description}}: {{error}} {{callToAction}} provide a non-empty description by using .describe() in its Zod schema",
|
|
47
48
|
severity: "error",
|
|
48
49
|
given: "$.events[*]..schema.properties[*]",
|
|
49
50
|
then: [
|
|
@@ -57,8 +58,8 @@ const BOT_RULESET = {
|
|
|
57
58
|
]
|
|
58
59
|
},
|
|
59
60
|
"configuration-fields-must-have-a-title": {
|
|
60
|
-
description: "All configuration fields
|
|
61
|
-
message: "{{description}}: {{error}}
|
|
61
|
+
description: "All configuration fields {{callToAction}} have a title",
|
|
62
|
+
message: "{{description}}: {{error}} {{callToAction}} provide a non-empty title by using .title() in its Zod schema",
|
|
62
63
|
severity: "error",
|
|
63
64
|
given: "$.configuration..schema.properties[*].x-zui",
|
|
64
65
|
then: [
|
|
@@ -72,8 +73,8 @@ const BOT_RULESET = {
|
|
|
72
73
|
]
|
|
73
74
|
},
|
|
74
75
|
"configuration-fields-must-have-a-description": {
|
|
75
|
-
description: "All configuration fields
|
|
76
|
-
message: "{{description}}: {{error}}
|
|
76
|
+
description: "All configuration fields {{callToAction}} have a description",
|
|
77
|
+
message: "{{description}}: {{error}} {{callToAction}} provide a non-empty description by using .describe() in its Zod schema",
|
|
77
78
|
severity: "error",
|
|
78
79
|
given: "$.configuration..schema.properties[*]",
|
|
79
80
|
then: [
|
|
@@ -87,8 +88,8 @@ const BOT_RULESET = {
|
|
|
87
88
|
]
|
|
88
89
|
},
|
|
89
90
|
"user-tags-should-have-a-title": {
|
|
90
|
-
description: "All user tags
|
|
91
|
-
message: "{{description}}: {{error}}
|
|
91
|
+
description: "All user tags {{callToAction}} have a title",
|
|
92
|
+
message: "{{description}}: {{error}} {{callToAction}} have a non-empty title",
|
|
92
93
|
severity: "warn",
|
|
93
94
|
given: "$.user.tags[*]",
|
|
94
95
|
then: [
|
|
@@ -99,8 +100,8 @@ const BOT_RULESET = {
|
|
|
99
100
|
]
|
|
100
101
|
},
|
|
101
102
|
"user-tags-must-have-a-description": {
|
|
102
|
-
description: "All user tags
|
|
103
|
-
message: "{{description}}: {{error}}
|
|
103
|
+
description: "All user tags {{callToAction}} have a description",
|
|
104
|
+
message: "{{description}}: {{error}} {{callToAction}} have a non-empty description",
|
|
104
105
|
severity: "error",
|
|
105
106
|
given: "$.user.tags[*]",
|
|
106
107
|
then: [
|
|
@@ -111,8 +112,8 @@ const BOT_RULESET = {
|
|
|
111
112
|
]
|
|
112
113
|
},
|
|
113
114
|
"conversation-tags-should-have-a-title": {
|
|
114
|
-
description: "All conversation tags
|
|
115
|
-
message: "{{description}}: {{error}}
|
|
115
|
+
description: "All conversation tags {{callToAction}} have a title",
|
|
116
|
+
message: "{{description}}: {{error}} {{callToAction}} have a non-empty title",
|
|
116
117
|
severity: "warn",
|
|
117
118
|
given: "$.conversation.tags[*]",
|
|
118
119
|
then: [
|
|
@@ -123,8 +124,8 @@ const BOT_RULESET = {
|
|
|
123
124
|
]
|
|
124
125
|
},
|
|
125
126
|
"conversation-tags-must-have-a-description": {
|
|
126
|
-
description: "All conversation tags
|
|
127
|
-
message: "{{description}}: {{error}}
|
|
127
|
+
description: "All conversation tags {{callToAction}} have a description",
|
|
128
|
+
message: "{{description}}: {{error}} {{callToAction}} have a non-empty description",
|
|
128
129
|
severity: "error",
|
|
129
130
|
given: "$.conversation.tags[*]",
|
|
130
131
|
then: [
|
|
@@ -135,8 +136,8 @@ const BOT_RULESET = {
|
|
|
135
136
|
]
|
|
136
137
|
},
|
|
137
138
|
"message-tags-should-have-a-title": {
|
|
138
|
-
description: "All message tags
|
|
139
|
-
message: "{{description}}: {{error}}
|
|
139
|
+
description: "All message tags {{callToAction}} have a title",
|
|
140
|
+
message: "{{description}}: {{error}} {{callToAction}} have a non-empty title",
|
|
140
141
|
severity: "warn",
|
|
141
142
|
given: "$.message.tags[*]",
|
|
142
143
|
then: [
|
|
@@ -147,8 +148,8 @@ const BOT_RULESET = {
|
|
|
147
148
|
]
|
|
148
149
|
},
|
|
149
150
|
"message-tags-must-have-a-description": {
|
|
150
|
-
description: "All message tags
|
|
151
|
-
message: "{{description}}: {{error}}
|
|
151
|
+
description: "All message tags {{callToAction}} have a description",
|
|
152
|
+
message: "{{description}}: {{error}} {{callToAction}} have a non-empty description",
|
|
152
153
|
severity: "error",
|
|
153
154
|
given: "$.message.tags[*]",
|
|
154
155
|
then: [
|
|
@@ -159,20 +160,20 @@ const BOT_RULESET = {
|
|
|
159
160
|
]
|
|
160
161
|
},
|
|
161
162
|
"legacy-zui-title-should-be-removed": {
|
|
162
|
-
description: "Legacy ZUI title fields (ui.title)
|
|
163
|
+
description: "Legacy ZUI title fields (ui.title) {{callToAction}} be removed. Please use .title() in your Zod schemas instead",
|
|
163
164
|
severity: "error",
|
|
164
165
|
given: "$..ui[*].title",
|
|
165
166
|
then: [{ function: import_spectral_functions.falsy }]
|
|
166
167
|
},
|
|
167
168
|
"legacy-zui-examples-should-be-removed": {
|
|
168
|
-
description: "Legacy ZUI examples fields (ui.examples)
|
|
169
|
+
description: "Legacy ZUI examples fields (ui.examples) {{callToAction}} be removed. There are currently no alternatives",
|
|
169
170
|
severity: "hint",
|
|
170
171
|
given: "$..ui[*].examples",
|
|
171
172
|
then: [{ function: import_spectral_functions.falsy }]
|
|
172
173
|
},
|
|
173
174
|
"state-fields-should-have-title": {
|
|
174
|
-
description: "All state fields
|
|
175
|
-
message: "{{description}}: {{error}}
|
|
175
|
+
description: "All state fields {{callToAction}} have a title",
|
|
176
|
+
message: "{{description}}: {{error}} {{callToAction}} provide a non-empty title by using .title() in its Zod schema",
|
|
176
177
|
severity: "warn",
|
|
177
178
|
given: "$.states[*]..schema.properties[*]",
|
|
178
179
|
then: [
|
|
@@ -186,8 +187,8 @@ const BOT_RULESET = {
|
|
|
186
187
|
]
|
|
187
188
|
},
|
|
188
189
|
"state-fields-must-have-description": {
|
|
189
|
-
description: "All state fields
|
|
190
|
-
message: "{{description}}: {{error}}
|
|
190
|
+
description: "All state fields {{callToAction}} have a description",
|
|
191
|
+
message: "{{description}}: {{error}} {{callToAction}} provide a non-empty description by using .describe() in its Zod schema",
|
|
191
192
|
severity: "error",
|
|
192
193
|
given: "$.states[*]..schema.properties[*]",
|
|
193
194
|
then: [
|
|
@@ -201,7 +202,7 @@ const BOT_RULESET = {
|
|
|
201
202
|
]
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
|
-
};
|
|
205
|
+
});
|
|
205
206
|
// Annotate the CommonJS export names for ESM import in node:
|
|
206
207
|
0 && (module.exports = {
|
|
207
208
|
BOT_RULESET
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/linter/rulesets/bot.ruleset.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import { falsy } from '@stoplight/spectral-functions'\nimport { preprocessRuleset } from '../ruleset-functions'\nimport { descriptionFallbackExtractor, titleFallbackExtractor, truthyWithMessage } from '../spectral-functions'\n\nexport const BOT_RULESET = preprocessRuleset({\n extends: [],\n rules: {\n 'event-outputparams-should-have-title': {\n description: 'All event output parameters {{callToAction}} have a title',\n message:\n '{{description}}: {{error}} {{callToAction}} provide a non-empty title by using .title() in its Zod schema',\n severity: 'warn',\n given: '$.events[*]..schema.properties[*]',\n then: [\n {\n field: 'x-zui.title',\n function: truthyWithMessage({\n failMsgMapper: ({ path, isFallback }) =>\n `output parameter \"${path.at(isFallback ? -5 : -3)}\" of event \"${path[1]}\"`,\n fallbackExtractor: titleFallbackExtractor,\n }),\n },\n ],\n },\n 'event-outputparams-must-have-description': {\n description: 'All event output parameters {{callToAction}} have a description',\n message:\n '{{description}}: {{error}} {{callToAction}} provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.events[*]..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage({\n failMsgMapper: ({ path, isFallback }) =>\n `output parameter \"${path.at(isFallback ? -4 : -2)}\" of event \"${path[1]}\"`,\n fallbackExtractor: descriptionFallbackExtractor,\n }),\n },\n ],\n },\n 'configuration-fields-must-have-a-title': {\n description: 'All configuration fields {{callToAction}} have a title',\n message:\n '{{description}}: {{error}} {{callToAction}} provide a non-empty title by using .title() in its Zod schema',\n severity: 'error',\n given: '$.configuration..schema.properties[*].x-zui',\n then: [\n {\n field: 'title',\n function: truthyWithMessage({\n failMsgMapper: ({ path, isFallback }) => `configuration parameter \"${path.at(isFallback ? -5 : -3)}\"`,\n fallbackExtractor: titleFallbackExtractor,\n }),\n },\n ],\n },\n 'configuration-fields-must-have-a-description': {\n description: 'All configuration fields {{callToAction}} have a description',\n message:\n '{{description}}: {{error}} {{callToAction}} provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.configuration..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage({\n failMsgMapper: ({ path, isFallback }) => `configuration parameter \"${path.at(isFallback ? -4 : -2)}\"`,\n fallbackExtractor: descriptionFallbackExtractor,\n }),\n },\n ],\n },\n 'user-tags-should-have-a-title': {\n description: 'All user tags {{callToAction}} have a title',\n message: '{{description}}: {{error}} {{callToAction}} have a non-empty title',\n severity: 'warn',\n given: '$.user.tags[*]',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `user tag \"${path[2]}\"`),\n },\n ],\n },\n 'user-tags-must-have-a-description': {\n description: 'All user tags {{callToAction}} have a description',\n message: '{{description}}: {{error}} {{callToAction}} have a non-empty description',\n severity: 'error',\n given: '$.user.tags[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `user tag \"${path[2]}\"`),\n },\n ],\n },\n 'conversation-tags-should-have-a-title': {\n description: 'All conversation tags {{callToAction}} have a title',\n message: '{{description}}: {{error}} {{callToAction}} have a non-empty title',\n severity: 'warn',\n given: '$.conversation.tags[*]',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `conversation tag \"${path[2]}\"`),\n },\n ],\n },\n 'conversation-tags-must-have-a-description': {\n description: 'All conversation tags {{callToAction}} have a description',\n message: '{{description}}: {{error}} {{callToAction}} have a non-empty description',\n severity: 'error',\n given: '$.conversation.tags[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `conversation tag \"${path[2]}\"`),\n },\n ],\n },\n 'message-tags-should-have-a-title': {\n description: 'All message tags {{callToAction}} have a title',\n message: '{{description}}: {{error}} {{callToAction}} have a non-empty title',\n severity: 'warn',\n given: '$.message.tags[*]',\n then: [\n {\n field: 'title',\n function: truthyWithMessage(({ path }) => `message tag \"${path[2]}\"`),\n },\n ],\n },\n 'message-tags-must-have-a-description': {\n description: 'All message tags {{callToAction}} have a description',\n message: '{{description}}: {{error}} {{callToAction}} have a non-empty description',\n severity: 'error',\n given: '$.message.tags[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage(({ path }) => `message tag \"${path[2]}\"`),\n },\n ],\n },\n 'legacy-zui-title-should-be-removed': {\n description:\n 'Legacy ZUI title fields (ui.title) {{callToAction}} be removed. Please use .title() in your Zod schemas instead',\n severity: 'error',\n given: '$..ui[*].title',\n then: [{ function: falsy }],\n },\n 'legacy-zui-examples-should-be-removed': {\n description:\n 'Legacy ZUI examples fields (ui.examples) {{callToAction}} be removed. There are currently no alternatives',\n severity: 'hint',\n given: '$..ui[*].examples',\n then: [{ function: falsy }],\n },\n 'state-fields-should-have-title': {\n description: 'All state fields {{callToAction}} have a title',\n message:\n '{{description}}: {{error}} {{callToAction}} provide a non-empty title by using .title() in its Zod schema',\n severity: 'warn',\n given: '$.states[*]..schema.properties[*]',\n then: [\n {\n field: 'x-zui.title',\n function: truthyWithMessage({\n failMsgMapper: ({ path, isFallback }) => `field \"${path.at(isFallback ? -5 : -3)}\" of state \"${path[1]}\"`,\n fallbackExtractor: titleFallbackExtractor,\n }),\n },\n ],\n },\n 'state-fields-must-have-description': {\n description: 'All state fields {{callToAction}} have a description',\n message:\n '{{description}}: {{error}} {{callToAction}} provide a non-empty description by using .describe() in its Zod schema',\n severity: 'error',\n given: '$.states[*]..schema.properties[*]',\n then: [\n {\n field: 'description',\n function: truthyWithMessage({\n failMsgMapper: ({ path, isFallback }) => `field \"${path.at(isFallback ? -4 : -2)}\" of state \"${path[1]}\"`,\n fallbackExtractor: descriptionFallbackExtractor,\n }),\n },\n ],\n },\n },\n})\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,g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