vaderjs 1.3.3-alpha-129 → 1.3.3-alpha-130
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 +1 -1
- package/vader.js +2 -3
package/package.json
CHANGED
package/vader.js
CHANGED
|
@@ -957,14 +957,13 @@ async function Build() {
|
|
|
957
957
|
let redirectFile = fs.existsSync(process.cwd() + '/dist/' + provider) ? fs.readFileSync(process.cwd() + '/dist/' + provider, 'utf8') : ''
|
|
958
958
|
let type = provider === '_redirect' ? 'text/plain' : 'application/json'
|
|
959
959
|
let root = obj.url.includes(':') ? obj.url.split(':')[0] : obj.url
|
|
960
|
-
switch(
|
|
960
|
+
switch(type){
|
|
961
961
|
case root === '/':
|
|
962
962
|
break;
|
|
963
963
|
case 'text/plain' && !redirectFile.includes(obj.url) && obj.url.includes(':'):
|
|
964
964
|
|
|
965
965
|
redirectFile += `\n${obj.url} ${obj.url} 200`
|
|
966
|
-
fs.writeFileSync(process.cwd() + '/dist/' + provider, redirectFile)
|
|
967
|
-
console.log(`Added ${root}/* ${root} 200 to ${provider}`)
|
|
966
|
+
fs.writeFileSync(process.cwd() + '/dist/' + provider, redirectFile)
|
|
968
967
|
break;
|
|
969
968
|
case 'application/json' && !redirectFile.includes(root):
|
|
970
969
|
let json = JSON.parse(redirectFile) || {}
|