You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.warn("--- Lint: File is malformed -> use `--format` to fix the issue");
103
+
}
104
+
if(doFormat){
105
+
console.warn("--- Format: File was malformed -> fixed the issue");
106
+
awaitfs.writeFile(file,expectedContent);
107
+
}
108
+
}
109
+
elseif(doLint){
110
+
console.warn("--- Lint: File is well-formed");
111
+
}
112
+
}
84
113
}
85
114
}
86
115
catch(error){
@@ -93,12 +122,12 @@ async function run() {
93
122
if(Array.isArray(json.collections)){
94
123
entries=json.collections;
95
124
isApiList=true;
96
-
console.log(`${file} is a /collections endpoint. Validating all ${entries.length} collections, but ignoring the other parts of the response.\n`);
125
+
console.log(`--- The file is a /collections endpoint. Validating all ${entries.length} collections, but ignoring the other parts of the response.\n`);
97
126
}
98
127
elseif(Array.isArray(json.features)){
99
128
entries=json.features;
100
129
isApiList=true;
101
-
console.log(`${file} is a /collections/:id/items endpoint. Validating all ${entries.length} items, but ignoring the other parts of the response.\n`);
130
+
console.log(`--- The file is a /collections/:id/items endpoint. Validating all ${entries.length} items, but ignoring the other parts of the response.\n`);
102
131
}
103
132
else{
104
133
entries=[json];
@@ -107,21 +136,21 @@ async function run() {
107
136
letfileValid=true;
108
137
for(letdataofentries){
109
138
110
-
letid=file;
139
+
letid='';
111
140
if(isApiList){
112
-
id+=" -> "+data.id;
141
+
id=`${data.id}: `;
113
142
}
114
143
if(typeofdata.stac_version!=='string'){
115
-
console.error(`-- ${id}: Skipping; No STAC version found\n`);
144
+
console.error(`---${id}Skipping; No STAC version found\n`);
0 commit comments