From 826b2c98200b0173f9e0f7516477fc200b8b7c45 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 9 Oct 2021 01:44:44 +0200 Subject: [PATCH] :bug: fix build --- .gitignore | 3 +- api/.swcrc | 17 ------------ api/package-lock.json | Bin 1067823 -> 1067779 bytes bundle/.swcrc | 12 -------- bundle/package-lock.json | Bin 143154 -> 149300 bytes bundle/scripts/build.js | 56 ++++++++++++++++++++++++++++++-------- bundle/tsconfig.json | 3 +- cdn/tsconfig.json | 4 +-- gateway/.swcrc | 5 ++-- gateway/package-lock.json | Bin 537293 -> 537249 bytes gateway/tsconfig.json | 4 +-- util/.swcrc | 18 ------------ webrtc/.swcrc | 12 -------- 13 files changed, 55 insertions(+), 79 deletions(-) delete mode 100644 api/.swcrc delete mode 100644 bundle/.swcrc delete mode 100644 util/.swcrc delete mode 100644 webrtc/.swcrc diff --git a/.gitignore b/.gitignore index c302ad40..f67723af 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ dist/ node_modules api/assets/*.js api/assets/*.css -database.db \ No newline at end of file +database.db +tsconfig.tsbuildinfo \ No newline at end of file diff --git a/api/.swcrc b/api/.swcrc deleted file mode 100644 index 794efbd7..00000000 --- a/api/.swcrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "module": { - "type": "commonjs" - }, - "jsc": { - "parser": { - "syntax": "typescript", - "decorators": true - }, - "target": "es2021", - "baseUrl": "./", - "paths": { - "@fosscord/api": ["src/index.ts"], - "@fosscord/api/*": ["src/*"] - } - } -} diff --git a/api/package-lock.json b/api/package-lock.json index 2af8c7b95e0e39fe02736cc70b5e6c081aff71ce..f4e7506c84cdfd84def723a016c0bbac6c6a6d67 100644 GIT binary patch delta 85 zcmZ2K&9Ql!E&O=afW&ZdWMFR8(EyEM@n(5cH)Qd#v4S-2T#$H8{^rfdT`JPx*1U0W_Rqu=cZeegl+ zHbjmC8R{YcUVUxHN79X}w?H=sBz-`M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JE27 zSKYC+bRQP2N^4(%p5c;grha+q9tIb!3hKQKMmog)5Ff9IF&Hsy{o3=f6QiSzT~Fx1 z=5E11F`_HN1yh8Js0G|2+Sx($+f9-_^i!E+E%XNVZCSJr_0$ze4?QOq$TYFar zj;u#r<6vj)8)lGdg1bBPHQhM)R?|ugTN5m-j7F!Vl9y`kt02;Z?%f63(dipt4f^9e z_+({wEmWS9B4Pq;Lbq;!ufVTg7F<$%2O#nb6 zMQCn--@o{HaYB2w<8t%Dpn#~ocKp_2vWW2Z?d3bx{`w1GmNb?<_$%;irqJwI@*j=G z>oHiKe_9jRhSq(t4g?*SO1l1c3o^P(vaL4sK5*}Np vDz#9FX9wG$>e!~*V2|X>>uSY)lKEz+v`GKY2S55;9(>ON)HdPmm~HzvMyRw3 delta 929 zcmZWnT}V_x80EX}uKVNNy&BfKsipY8rF(^n?5dk4j}=0Z_+YJ37J(vs z;XGKlYMP3FH0G#SRwR|0iDl7?(Mu2#ri5r>GUPD?BnLp*ivoYoR_$x&{g(Mh)|v2njd zTbouwFxMl~k=8sw*WqlM+U5oo!I-u*I?(P=Q5n6RPU`4L3^3H&$t6t%GWvQl=+7=| zP~z*!Bq`IdjFSf>tX7WWR96D-?bTy)#~Cc|GpKvwe+P}&)f>wl6jeZS$H79*&%hc+ z_s3za5L!Og{-~G@3e?uclFOV5Y-I#o*gUEIDe}S_yn9BhKr5G@`#yAhtO$ z;`bIY@I>l5-*O+PZc4;^5$xpI1ZNe07^!##i)yq@m?$s7hSv^;qx4w8oCl!|Z$OWI zZTE z+B)B@rQF4^Ip)nsf&Pff(%OCijbZmJ{LyIH#CtdoH~ccR buildPackage(path.join(__dirname, "..", "..", part)))); + transpileFiles(); } +main(); + process.on("exit", () => { console.log("[Build] took " + Math.round(performance.now() - start) + "ms"); }); @@ -61,7 +95,7 @@ function walk(dir) { if (stat && stat.isDirectory()) { /* Recurse into a subdirectory */ results = results.concat(walk(file)); - } else if (file.endsWith(".ts")) { + } else if (file.endsWith(".ts") || file.endsWith(".js")) { /* Is a file */ results.push(file); } diff --git a/bundle/tsconfig.json b/bundle/tsconfig.json index b300a426..69725244 100644 --- a/bundle/tsconfig.json +++ b/bundle/tsconfig.json @@ -65,6 +65,7 @@ "skipLibCheck": true /* Skip type checking of declaration files. */, "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, "emitDecoratorMetadata": true, - "experimentalDecorators": true + "experimentalDecorators": true, + "baseUrl": "." } } diff --git a/cdn/tsconfig.json b/cdn/tsconfig.json index c80d16fd..249dffff 100644 --- a/cdn/tsconfig.json +++ b/cdn/tsconfig.json @@ -4,7 +4,7 @@ /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ - "incremental": true, /* Enable incremental compilation */ + "incremental": true /* Enable incremental compilation */, "target": "ES6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, "lib": ["ES2015", "dom"] /* Specify library files to be included in the compilation. */, @@ -68,7 +68,7 @@ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, "baseUrl": ".", "paths": { - "@fosscord/cdn/": ["src/index"], + "@fosscord/cdn": ["src/index"], "@fosscord/cdn/*": ["src/*"] }, "plugins": [{ "transform": "@zerollup/ts-transform-paths" }] diff --git a/gateway/.swcrc b/gateway/.swcrc index 3079a89f..e8cbb8a1 100644 --- a/gateway/.swcrc +++ b/gateway/.swcrc @@ -7,11 +7,10 @@ "syntax": "typescript", "decorators": true }, - "target": "es2021", + "target": "es5", "baseUrl": ".", "paths": { - "@fosscord/gateway": ["src/index"], - "@fosscord/gateway/*": ["src/*"] + "@fosscord/gateway": ["src/index"] } } } diff --git a/gateway/package-lock.json b/gateway/package-lock.json index 38962a2a11605ae052a16a760ba422a2f0d1f664..07ae02f9ad19037f4ca5f602eca03aa0552e3189 100644 GIT binary patch delta 63 zcmX^6RAJ#$g$@7Mrdyn36P(`L!&2Hji@kjoJ0lP?0WtITS?nxlTENonKxrUm1!A`C Jy*=y>%K%x88Lj{T delta 83 zcmZ4ZRN?GXg$@7M_=?Mum8=w$;tcf+^b8HBd-SmMHMg+0x3Dt;F%u9oZ*O5|In#os TupOunh*^P{ZM#Pgd*m_zzakr_ diff --git a/gateway/tsconfig.json b/gateway/tsconfig.json index e2ac5b0b..2ad38f93 100644 --- a/gateway/tsconfig.json +++ b/gateway/tsconfig.json @@ -5,7 +5,7 @@ /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ - "incremental": true, /* Enable incremental compilation */ + "incremental": true /* Enable incremental compilation */, "target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, "lib": ["ES2015", "ES2020.BigInt", "DOM"] /* Specify library files to be included in the compilation. */, @@ -70,7 +70,7 @@ "resolveJsonModule": true, "baseUrl": ".", "paths": { - "@fosscord/gateway": ["src/index"], + "@fosscord/gateway": ["src/index.ts"], "@fosscord/gateway/*": ["src/*"] }, "plugins": [{ "transform": "@zerollup/ts-transform-paths" }] diff --git a/util/.swcrc b/util/.swcrc deleted file mode 100644 index a723d37f..00000000 --- a/util/.swcrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "module": { - "type": "commonjs" - }, - "jsc": { - "parser": { - "syntax": "typescript", - "decorators": true - }, - "target": "es2021", - "transform": { - "legacyDecorator": true, - "decoratorMetadata": true - }, - "keepClassNames": true, - "loose": true - } -} diff --git a/webrtc/.swcrc b/webrtc/.swcrc deleted file mode 100644 index 9a89b49d..00000000 --- a/webrtc/.swcrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "module": { - "type": "commonjs" - }, - "jsc": { - "parser": { - "syntax": "typescript", - "decorators": true - }, - "target": "es2021" - } -}