diff --git a/common/package.json b/common/package.json index 0376895..7f9bac4 100644 --- a/common/package.json +++ b/common/package.json @@ -5,7 +5,12 @@ "author": "neopostmodern ", "homepage": "", "license": "ISC", - "exports": "./dist/index.js", + "exports": { + ".": { + "node": "./dist/index.js", + "default": "./index.ts" + } + }, "type": "module", "directories": { "lib": "lib", diff --git a/config/config-example.json b/config/config-example.json index 65e2e0f..145fb1f 100755 --- a/config/config-example.json +++ b/config/config-example.json @@ -2,13 +2,14 @@ "PORT": 3030, "GRAPHIQL": false, "MONGO_URL": "mongodb://localhost/structureApp", + "MONGOOSE_DEBUG": true, "MIGRATIONS_DIRECTORY": "/home/structure/backend/migrations", "CHANNEL": "dev", "GITHUB_CLIENT_ID": "YOUR_CLIENT_ID_HERE", "GITHUB_CLIENT_SECRET": "YOUR_CLIENT_SECRET_HERE", "BACKEND_URL": "https://backend.structure.neopostmodern.com", "WEB_FRONTEND_HOST": "https://structure.neopostmodern.com", - "ADDITIONAL_FRONTEND_HOSTS": ["file://"], + "ADDITIONAL_FRONTEND_HOSTS": ["file://", "http://localhost:5173"], "SESSION_SECRET": "YOUR_SESSION_SECRET_HERE", "USER": "YOU_SERVER_USERNAME_HERE", "SERVER": "YOUR_SERVER_URL_HERE", diff --git a/config/config.d.ts b/config/config.d.ts new file mode 100644 index 0000000..b769830 --- /dev/null +++ b/config/config.d.ts @@ -0,0 +1,25 @@ +declare module '@structure/config' { + const config: { + PORT: number + GRAPHIQL: boolean + MONGO_URL: string + MONGOOSE_DEBUG: boolean + MIGRATIONS_DIRECTORY: string + CHANNEL: 'dev' | 'master' | string + GITHUB_CLIENT_ID: string + GITHUB_CLIENT_SECRET: string + BACKEND_URL: string + WEB_FRONTEND_HOST: string + ADDITIONAL_FRONTEND_HOSTS: Array + SESSION_SECRET: string + USER: string + SERVER: string + SERVER_FOLDER_BACKEND: string + SERVER_FOLDER_FRONTEND: string + PROCESS_NAME: string + NODE_ARGS: string + RUN_PREFLIGHT: string + BACKUP_DIR: string + } + export default config +} diff --git a/config/package.json b/config/package.json index 9c00bbf..9f4d117 100644 --- a/config/package.json +++ b/config/package.json @@ -1,5 +1,6 @@ { "name": "@structure/config", - "main": "index.js", + "main": "./config.json", + "types": "./config.d.ts", "version": "0.23.1" }