solidui-cli 0.6.0 → 0.6.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.js +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { log as log2, spinner as spinner2 } from "@clack/prompts";
|
|
|
11
11
|
import chalk from "chalk";
|
|
12
12
|
import prompts from "prompts";
|
|
13
13
|
|
|
14
|
-
// ../../node_modules/.pnpm/valibot@0.
|
|
14
|
+
// ../../node_modules/.pnpm/valibot@0.30.0/node_modules/valibot/dist/index.js
|
|
15
15
|
var ValiError = class extends Error {
|
|
16
16
|
issues;
|
|
17
17
|
/**
|
|
@@ -51,8 +51,8 @@ var store4;
|
|
|
51
51
|
function getSpecificMessage(reference, lang) {
|
|
52
52
|
return store4?.get(reference)?.get(lang);
|
|
53
53
|
}
|
|
54
|
-
function i18n(context, reference, config, issue) {
|
|
55
|
-
const message = context.message ?? getSpecificMessage(reference, issue.lang) ?? (
|
|
54
|
+
function i18n(schema, context, reference, config, issue) {
|
|
55
|
+
const message = context.message ?? getSpecificMessage(reference, issue.lang) ?? (schema ? getSchemaMessage(issue.lang) : null) ?? config?.message ?? getGlobalMessage(issue.lang) ?? issue.message;
|
|
56
56
|
return typeof message === "function" ? message(issue) : message;
|
|
57
57
|
}
|
|
58
58
|
function schemaResult(typed, output, issues) {
|
|
@@ -82,6 +82,7 @@ function pipeIssue(context, config, issue) {
|
|
|
82
82
|
skipPipe: config?.skipPipe
|
|
83
83
|
};
|
|
84
84
|
schemaIssue2.message = i18n(
|
|
85
|
+
false,
|
|
85
86
|
issue.context,
|
|
86
87
|
issue.reference,
|
|
87
88
|
config,
|
|
@@ -136,7 +137,7 @@ function schemaIssue(context, reference, input, config, other) {
|
|
|
136
137
|
abortPipeEarly: config?.abortPipeEarly,
|
|
137
138
|
skipPipe: config?.skipPipe
|
|
138
139
|
};
|
|
139
|
-
issue.message = i18n(context, reference, config, issue);
|
|
140
|
+
issue.message = i18n(true, context, reference, config, issue);
|
|
140
141
|
return { typed: false, output: input, issues: [issue] };
|
|
141
142
|
}
|
|
142
143
|
function boolean(arg1, arg2) {
|