@appscode/design-system 2.0.33 → 2.0.34
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/package.json
CHANGED
|
@@ -57,10 +57,12 @@ export default defineComponent({
|
|
|
57
57
|
// dispose model
|
|
58
58
|
monaco.editor.getModel(this.modelId)?.dispose();
|
|
59
59
|
// remove the schema
|
|
60
|
-
this.$monacoValidationOptions
|
|
61
|
-
this.$monacoValidationOptions.schemas
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
if (this.$monacoValidationOptions) {
|
|
61
|
+
this.$monacoValidationOptions.schemas =
|
|
62
|
+
this.$monacoValidationOptions.schemas.filter(
|
|
63
|
+
(schema) => !schema.fileMatch.includes(this.modelId)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
64
66
|
// dispose editor
|
|
65
67
|
this.editor && this.editor.dispose();
|
|
66
68
|
},
|
|
@@ -80,14 +82,16 @@ export default defineComponent({
|
|
|
80
82
|
if (validation.schema?.type) {
|
|
81
83
|
// schema is provided
|
|
82
84
|
const schemas = [
|
|
83
|
-
...this.$monacoValidationOptions
|
|
85
|
+
...(this.$monacoValidationOptions?.schemas || []),
|
|
84
86
|
{
|
|
85
87
|
fileMatch: [this.modelId],
|
|
86
88
|
schema: validation.schema,
|
|
87
89
|
uri: validation.uri,
|
|
88
90
|
},
|
|
89
91
|
];
|
|
90
|
-
this.$monacoValidationOptions
|
|
92
|
+
if (this.$monacoValidationOptions) {
|
|
93
|
+
this.$monacoValidationOptions.schemas = schemas;
|
|
94
|
+
}
|
|
91
95
|
// yaml validation
|
|
92
96
|
if (this.$monacoYaml) {
|
|
93
97
|
this.$monacoYaml.update({
|
|
@@ -108,14 +112,16 @@ export default defineComponent({
|
|
|
108
112
|
if (validationSchema.ok) {
|
|
109
113
|
const schema = await validationSchema.json();
|
|
110
114
|
const schemas = [
|
|
111
|
-
...this.$monacoValidationOptions
|
|
115
|
+
...(this.$monacoValidationOptions?.schemas || []),
|
|
112
116
|
{
|
|
113
117
|
fileMatch: [this.modelId],
|
|
114
118
|
schema,
|
|
115
119
|
uri: validation.uri,
|
|
116
120
|
},
|
|
117
121
|
];
|
|
118
|
-
this.$monacoValidationOptions
|
|
122
|
+
if (this.$monacoValidationOptions) {
|
|
123
|
+
this.$monacoValidationOptions.schemas = schemas;
|
|
124
|
+
}
|
|
119
125
|
// yaml validation
|
|
120
126
|
if (this.$monacoYaml) {
|
|
121
127
|
this.$monacoYaml.update({
|