Update index.js
Browse files820 unmodified lines821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938820 unmodified linesconst file = File.fromURL(url);await file.loadAttributes();let data = await file.downloadBuffer();mime.types['py'] = 'text/x-python'; // Pythonmime.types['java'] = 'text/x-java-source'; // Javamime.types['c'] = 'text/x-c'; // Cmime.types['cpp'] = 'text/x-c++src'; // C++mime.types['cc'] = 'text/x-c++src'; // C++mime.types['cxx'] = 'text/x-c++src'; // C++mime.types['cs'] = 'text/x-csharp'; // C#mime.types['php'] = 'application/x-httpd-php'; // PHPmime.types['rb'] = 'text/x-ruby'; // Rubymime.types['pl'] = 'text/x-perl'; // Perlmime.types['sh'] = 'application/x-sh'; // Shell Scriptmime.types['go'] = 'text/x-go'; // Gomime.types['swift'] = 'text/x-swift'; // Swiftmime.types['kt'] = 'text/x-kotlin'; // Kotlinmime.types['rs'] = 'text/x-rustsrc'; // Rustmime.types['scala'] = 'text/x-scala'; // Scalamime.types['r'] = 'text/x-r-source'; // Rmime.types['R'] = 'text/x-r-source'; // R (alternatif untuk huruf besar)mime.types['lua'] = 'text/x-lua'; // Luamime.types['md'] = 'text/markdown'; // Markdownmime.types['json'] = 'application/json'; // JSONmime.types['js'] = 'application/javascript'; // JavaScriptmime.types['ts'] = 'application/x-typescript'; // TypeScriptmime.types['xml'] = 'application/xml'; // XMLmime.types['yaml'] = 'application/x-yaml'; // YAMLmime.types['yml'] = 'application/x-yaml'; // YAML (alternatif)mime.types['html'] = 'text/html'; // HTMLmime.types['htm'] = 'text/html'; // HTML (alternatif)mime.types['css'] = 'text/css'; // CSSmime.types['scss'] = 'text/x-scss'; // SCSS (Sass)mime.types['sass'] = 'text/x-sass'; // Sassmime.types['less'] = 'text/x-less'; // Lessmime.types['coffee'] = 'text/coffeescript'; // CoffeeScriptmime.types['dart'] = 'application/dart'; // Dartmime.types['sql'] = 'application/sql'; // SQLmime.types['vb'] = 'text/x-vbscript'; // VBScriptmime.types['vbs'] = 'text/x-vbscript'; // VBScript (alternatif)mime.types['bat'] = 'application/x-msdos-program'; // Batch scriptmime.types['cmd'] = 'application/cmd'; // Command scriptmime.types['ps1'] = 'application/x-powershell'; // PowerShell scriptmime.types['ini'] = 'text/plain'; // INI filemime.types['toml'] = 'application/toml'; // TOMLmime.types['cfg'] = 'text/plain'; // Configuration filemime.types['conf'] = 'text/plain'; // Configuration filemime.types['properties'] = 'text/plain'; // Properties filemime.types['log'] = 'text/plain'; // Log filemime.types['yml'] = 'application/x-yaml'; // YAML filemime.types['rst'] = 'text/x-rst'; // reStructuredTextmime.types['latex'] = 'application/x-latex'; // LaTeXmime.types['tex'] = 'application/x-tex'; // TeXmime.types['bib'] = 'text/x-bibtex'; // BibTeXmime.types['mat'] = 'application/x-matlab-data'; // MATLABmime.types['m'] = 'text/x-matlab'; // MATLAB or Objective-Cmime.types['octave'] = 'text/x-octave'; // GNU Octavemime.types['rmd'] = 'text/x-r-markdown'; // R Markdownmime.types['jl'] = 'text/x-julia'; // Juliamime.types['clj'] = 'text/x-clojure'; // Clojuremime.types['cljs'] = 'text/x-clojurescript'; // ClojureScriptmime.types['cljc'] = 'text/x-clojure'; // Clojure (Common)mime.types['erl'] = 'text/x-erlang'; // Erlangmime.types['hs'] = 'text/x-haskell'; // Haskellmime.types['lhs'] = 'text/x-literate-haskell'; // Literate Haskellmime.types['ml'] = 'text/x-ocaml'; // OCamlmime.types['mli'] = 'text/x-ocaml'; // OCaml Interfacemime.types['fs'] = 'text/x-fsharp'; // F#mime.types['fsi'] = 'text/x-fsharp'; // F# Interactivemime.types['fsx'] = 'text/x-fsharp'; // F# Scriptmime.types['fsscript'] = 'text/x-fsharp'; // F# Script (alternative)mime.types['elm'] = 'text/x-elm'; // Elmmime.types['elm'] = 'application/elm'; // Elm (alternative)mime.types['ex'] = 'text/x-elixir'; // Elixirmime.types['exs'] = 'text/x-elixir'; // Elixir Scriptmime.types['eex'] = 'text/x-eex'; // Elixir Embedded Templatesmime.types['html.eex'] = 'text/x-html-elixir'; // Elixir HTML Embedded Templatesmime.types['hx'] = 'text/x-haxe'; // Haxemime.types['hxml'] = 'application/hxml'; // Haxe XMLmime.types['sml'] = 'text/x-sml'; // Standard MLmime.types['thy'] = 'text/x-isabelle-theory'; // Isabelle Theorymime.types['lean'] = 'text/x-lean'; // Leanmime.types['v'] = 'text/x-verilog'; // Verilogmime.types['sv'] = 'text/x-systemverilog'; // SystemVerilogmime.types['vhd'] = 'text/x-vhdl'; // VHDLmime.types['vhdl'] = 'text/x-vhdl'; // VHDL (alternative)mime.types['scm'] = 'text/x-scheme'; // Schememime.types['ss'] = 'text/x-scheme'; // Scheme (alternative)mime.types['rkt'] = 'text/x-racket'; // Racketmime.types['lisp'] = 'text/x-common-lisp'; // Common Lispmime.types['asd'] = 'text/x-common-lisp'; // Common Lisp ASDFmime.types['cl'] = 'text/x-common-lisp'; // Common Lisp (alternative)mime.types['el'] = 'text/x-emacs-lisp'; // Emacs Lispmime.types['sc'] = 'text/x-supercollider'; // SuperCollidermime.types['f'] = 'text/x-fortran'; // Fortranmime.types['f90'] = 'text/x-fortran'; // Fortran (alternative)mime.types['f95'] = 'text/x-fortran'; // Fortran (alternative)mime.types['v'] = 'text/x-vim'; // Vim Scriptmime.types['pro'] = 'text/x-prolog'; // Prologmime.types['pl'] = 'text/x-prolog'; // Prolog (alternative to Perl)mime.types['p'] = 'text/x-pascal'; // Pascalmime.types['pas'] = 'text/x-pascal'; // Pascal (alternative)mime.types['d'] = 'text/x-d'; // Dmime.types['ada'] = 'text/x-ada'; // Adamime.types['adb'] = 'text/x-ada'; // Ada Bodymime.types['ads'] = 'text/x-ada'; // Ada Specificationmime.types['nim'] = 'text/x-nim'; // Nimmime.types['nimble'] = 'text/x-nim'; // Nimblemime.types['cr'] = 'text/x-crystal'; // Crystalmime.types['cl'] = 'text/x-clarion'; // Clarionmime.types['prg'] = 'text/x-clarion'; // Clarion Programmime.types['l'] = 'text/x-lex'; // Lex/Flexmime.types['yy'] = 'text/x-bison'; // Bison/Yaccmime.types['bison'] = 'text/x-bison'; // Bison/Yacc (alternative)mime.types['mly'] = 'text/x-menhir'; // Menhirlet {fileTypeFromBuffer} = await (await import('file-type'))return res.json({message:"Success",820 unmodified lines821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938820 unmodified linesconst file = File.fromURL(url);await file.loadAttributes();let data = await file.downloadBuffer();mimes.types['py'] = 'text/x-python'; // Pythonmimes.types['java'] = 'text/x-java-source'; // Javamimes.types['c'] = 'text/x-c'; // Cmimes.types['cpp'] = 'text/x-c++src'; // C++mimes.types['cc'] = 'text/x-c++src'; // C++mimes.types['cxx'] = 'text/x-c++src'; // C++mimes.types['cs'] = 'text/x-csharp'; // C#mimes.types['php'] = 'application/x-httpd-php'; // PHPmimes.types['rb'] = 'text/x-ruby'; // Rubymimes.types['pl'] = 'text/x-perl'; // Perlmimes.types['sh'] = 'application/x-sh'; // Shell Scriptmimes.types['go'] = 'text/x-go'; // Gomimes.types['swift'] = 'text/x-swift'; // Swiftmimes.types['kt'] = 'text/x-kotlin'; // Kotlinmimes.types['rs'] = 'text/x-rustsrc'; // Rustmimes.types['scala'] = 'text/x-scala'; // Scalamimes.types['r'] = 'text/x-r-source'; // Rmimes.types['R'] = 'text/x-r-source'; // R (alternatif untuk huruf besar)mimes.types['lua'] = 'text/x-lua'; // Luamimes.types['md'] = 'text/markdown'; // Markdownmimes.types['json'] = 'application/json'; // JSONmimes.types['js'] = 'application/javascript'; // JavaScriptmimes.types['ts'] = 'application/x-typescript'; // TypeScriptmimes.types['xml'] = 'application/xml'; // XMLmimes.types['yaml'] = 'application/x-yaml'; // YAMLmimes.types['yml'] = 'application/x-yaml'; // YAML (alternatif)mimes.types['html'] = 'text/html'; // HTMLmimes.types['htm'] = 'text/html'; // HTML (alternatif)mimes.types['css'] = 'text/css'; // CSSmimes.types['scss'] = 'text/x-scss'; // SCSS (Sass)mimes.types['sass'] = 'text/x-sass'; // Sassmimes.types['less'] = 'text/x-less'; // Lessmimes.types['coffee'] = 'text/coffeescript'; // CoffeeScriptmimes.types['dart'] = 'application/dart'; // Dartmimes.types['sql'] = 'application/sql'; // SQLmimes.types['vb'] = 'text/x-vbscript'; // VBScriptmimes.types['vbs'] = 'text/x-vbscript'; // VBScript (alternatif)mimes.types['bat'] = 'application/x-msdos-program'; // Batch scriptmimes.types['cmd'] = 'application/cmd'; // Command scriptmimes.types['ps1'] = 'application/x-powershell'; // PowerShell scriptmimes.types['ini'] = 'text/plain'; // INI filemimes.types['toml'] = 'application/toml'; // TOMLmimes.types['cfg'] = 'text/plain'; // Configuration filemimes.types['conf'] = 'text/plain'; // Configuration filemimes.types['properties'] = 'text/plain'; // Properties filemimes.types['log'] = 'text/plain'; // Log filemimes.types['yml'] = 'application/x-yaml'; // YAML filemimes.types['rst'] = 'text/x-rst'; // reStructuredTextmimes.types['latex'] = 'application/x-latex'; // LaTeXmimes.types['tex'] = 'application/x-tex'; // TeXmimes.types['bib'] = 'text/x-bibtex'; // BibTeXmimes.types['mat'] = 'application/x-matlab-data'; // MATLABmimes.types['m'] = 'text/x-matlab'; // MATLAB or Objective-Cmimes.types['octave'] = 'text/x-octave'; // GNU Octavemimes.types['rmd'] = 'text/x-r-markdown'; // R Markdownmimes.types['jl'] = 'text/x-julia'; // Juliamimes.types['clj'] = 'text/x-clojure'; // Clojuremimes.types['cljs'] = 'text/x-clojurescript'; // ClojureScriptmimes.types['cljc'] = 'text/x-clojure'; // Clojure (Common)mimes.types['erl'] = 'text/x-erlang'; // Erlangmimes.types['hs'] = 'text/x-haskell'; // Haskellmimes.types['lhs'] = 'text/x-literate-haskell'; // Literate Haskellmimes.types['ml'] = 'text/x-ocaml'; // OCamlmimes.types['mli'] = 'text/x-ocaml'; // OCaml Interfacemimes.types['fs'] = 'text/x-fsharp'; // F#mimes.types['fsi'] = 'text/x-fsharp'; // F# Interactivemimes.types['fsx'] = 'text/x-fsharp'; // F# Scriptmimes.types['fsscript'] = 'text/x-fsharp'; // F# Script (alternative)mimes.types['elm'] = 'text/x-elm'; // Elmmimes.types['elm'] = 'application/elm'; // Elm (alternative)mimes.types['ex'] = 'text/x-elixir'; // Elixirmimes.types['exs'] = 'text/x-elixir'; // Elixir Scriptmimes.types['eex'] = 'text/x-eex'; // Elixir Embedded Templatesmimes.types['html.eex'] = 'text/x-html-elixir'; // Elixir HTML Embedded Templatesmimes.types['hx'] = 'text/x-haxe'; // Haxemimes.types['hxml'] = 'application/hxml'; // Haxe XMLmimes.types['sml'] = 'text/x-sml'; // Standard MLmimes.types['thy'] = 'text/x-isabelle-theory'; // Isabelle Theorymimes.types['lean'] = 'text/x-lean'; // Leanmimes.types['v'] = 'text/x-verilog'; // Verilogmimes.types['sv'] = 'text/x-systemverilog'; // SystemVerilogmimes.types['vhd'] = 'text/x-vhdl'; // VHDLmimes.types['vhdl'] = 'text/x-vhdl'; // VHDL (alternative)mimes.types['scm'] = 'text/x-scheme'; // Schememimes.types['ss'] = 'text/x-scheme'; // Scheme (alternative)mimes.types['rkt'] = 'text/x-racket'; // Racketmimes.types['lisp'] = 'text/x-common-lisp'; // Common Lispmimes.types['asd'] = 'text/x-common-lisp'; // Common Lisp ASDFmimes.types['cl'] = 'text/x-common-lisp'; // Common Lisp (alternative)mimes.types['el'] = 'text/x-emacs-lisp'; // Emacs Lispmimes.types['sc'] = 'text/x-supercollider'; // SuperCollidermimes.types['f'] = 'text/x-fortran'; // Fortranmimes.types['f90'] = 'text/x-fortran'; // Fortran (alternative)mimes.types['f95'] = 'text/x-fortran'; // Fortran (alternative)mimes.types['v'] = 'text/x-vim'; // Vim Scriptmimes.types['pro'] = 'text/x-prolog'; // Prologmimes.types['pl'] = 'text/x-prolog'; // Prolog (alternative to Perl)mimes.types['p'] = 'text/x-pascal'; // Pascalmimes.types['pas'] = 'text/x-pascal'; // Pascal (alternative)mimes.types['d'] = 'text/x-d'; // Dmimes.types['ada'] = 'text/x-ada'; // Adamimes.types['adb'] = 'text/x-ada'; // Ada Bodymimes.types['ads'] = 'text/x-ada'; // Ada Specificationmimes.types['nim'] = 'text/x-nim'; // Nimmimes.types['nimble'] = 'text/x-nim'; // Nimblemimes.types['cr'] = 'text/x-crystal'; // Crystalmimes.types['cl'] = 'text/x-clarion'; // Clarionmimes.types['prg'] = 'text/x-clarion'; // Clarion Programmimes.types['l'] = 'text/x-lex'; // Lex/Flexmimes.types['yy'] = 'text/x-bison'; // Bison/Yaccmimes.types['bison'] = 'text/x-bison'; // Bison/Yacc (alternative)mimes.types['mly'] = 'text/x-menhir'; // Menhirlet {fileTypeFromBuffer} = await (await import('file-type'))return res.json({message:"Success",
index.js+112-112