diff --git a/api/.swcrc b/api/.swcrc index 9a89b49d..794efbd7 100644 --- a/api/.swcrc +++ b/api/.swcrc @@ -7,6 +7,11 @@ "syntax": "typescript", "decorators": true }, - "target": "es2021" + "target": "es2021", + "baseUrl": "./", + "paths": { + "@fosscord/api": ["src/index.ts"], + "@fosscord/api/*": ["src/*"] + } } } diff --git a/api/package.json b/api/package.json index 2764320a..c4a29774 100644 --- a/api/package.json +++ b/api/package.json @@ -2,8 +2,8 @@ "name": "@fosscord/api", "version": "1.0.0", "description": "This repository contains the HTTP API Server", - "main": "dist/Server.js", - "types": "dist/Server.d.ts", + "main": "dist/index.js", + "types": "src/index.ts", "scripts": { "test:only": "jest --coverage --verbose --forceExit ./tests", "test:routes": "jest --coverage --verbose --forceExit ./routes.test.ts", diff --git a/bundle/.swcrc b/bundle/.swcrc index d1689115..9a89b49d 100644 --- a/bundle/.swcrc +++ b/bundle/.swcrc @@ -4,23 +4,9 @@ }, "jsc": { "parser": { - "syntax": "ecmascript", - "jsx": false, - "dynamicImport": false, - "privateMethod": false, - "functionBind": false, - "exportDefaultFrom": false, - "exportNamespaceFrom": false, - "decorators": false, - "decoratorsBeforeExport": false, - "topLevelAwait": false, - "importMeta": false + "syntax": "typescript", + "decorators": true }, - "transform": null, - "target": "es2021", - "loose": false, - "externalHelpers": false, - // Requires v1.2.50 or upper and requires target to be es2016 or upper. - "keepClassNames": false + "target": "es2021" } } diff --git a/bundle/package-lock.json b/bundle/package-lock.json index dffe4629..f44e5746 100644 Binary files a/bundle/package-lock.json and b/bundle/package-lock.json differ diff --git a/cdn/.swcrc b/cdn/.swcrc index 9a89b49d..ab531194 100644 --- a/cdn/.swcrc +++ b/cdn/.swcrc @@ -7,6 +7,11 @@ "syntax": "typescript", "decorators": true }, - "target": "es2021" + "target": "es2021", + "baseUrl": ".", + "paths": { + "@fosscord/cdn/": ["src/index"], + "@fosscord/cdn/*": ["src/*"] + } } } diff --git a/cdn/package.json b/cdn/package.json index addec363..eb623fcc 100644 --- a/cdn/package.json +++ b/cdn/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "cdn for fosscord", "main": "dist/index.js", - "types": "dist/index.d.ts", + "types": "src/index.ts", "scripts": { "postinstall": "ts-patch install -s", "test": "npm run build && jest --coverage ./tests", diff --git a/gateway/.swcrc b/gateway/.swcrc index 9a89b49d..3079a89f 100644 --- a/gateway/.swcrc +++ b/gateway/.swcrc @@ -7,6 +7,11 @@ "syntax": "typescript", "decorators": true }, - "target": "es2021" + "target": "es2021", + "baseUrl": ".", + "paths": { + "@fosscord/gateway": ["src/index"], + "@fosscord/gateway/*": ["src/*"] + } } } diff --git a/gateway/package-lock.json b/gateway/package-lock.json index 0a00ef64..c48d3987 100644 Binary files a/gateway/package-lock.json and b/gateway/package-lock.json differ diff --git a/gateway/package.json b/gateway/package.json index e3f3d172..78495a97 100644 --- a/gateway/package.json +++ b/gateway/package.json @@ -3,6 +3,7 @@ "version": "1.0.0", "description": "", "main": "dist/index.js", + "types": "src/index.ts", "scripts": { "postinstall": "npx ts-patch install -s", "test": "echo \"Error: no test specified\" && exit 1", diff --git a/util/.swcrc b/util/.swcrc index 9a89b49d..a723d37f 100644 --- a/util/.swcrc +++ b/util/.swcrc @@ -7,6 +7,12 @@ "syntax": "typescript", "decorators": true }, - "target": "es2021" + "target": "es2021", + "transform": { + "legacyDecorator": true, + "decoratorMetadata": true + }, + "keepClassNames": true, + "loose": true } } diff --git a/util/package.json b/util/package.json index 50049e23..640d8926 100644 --- a/util/package.json +++ b/util/package.json @@ -3,12 +3,12 @@ "version": "1.0.0", "description": "Utility functions for the all server repositories", "main": "dist/index.js", - "types": "dist/index.d.ts", + "types": "src/index.ts", "scripts": { "start": "npm run build && node dist/", "test": "npm run build && jest", "postinstall": "npm run build", - "build": "swc src --out-dir dist" + "build": "tsc -b ." }, "repository": { "type": "git",