remove customize button if no body parts are available (#1952)
* remove customize button if no body parts are available * remove unused position field from PlayerTexturesCollection interface * removed unused label field * fix LocalUser test * little PlayerTextures class refactor * Fixing linting * Fixing missing Openapi packages in prod * Fixing back build Co-authored-by: Hanusiak Piotr <piotr@ltmp.co> Co-authored-by: David Négrier <d.negrier@thecodingmachine.com>
This commit is contained in:
+2
-2
@@ -4,9 +4,9 @@
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"tsc": "tsc",
|
||||
"tsc": "tsc && cp -rf ./data ./dist/",
|
||||
"dev": "ts-node-dev --respawn ./server.ts",
|
||||
"prod": "tsc && node --max-old-space-size=4096 ./dist/server.js",
|
||||
"prod": "tsc && cp -rf ./data ./dist/ && node --max-old-space-size=4096 ./dist/server.js",
|
||||
"runprod": "node --max-old-space-size=4096 ./dist/server.js",
|
||||
"profile": "tsc && node --prof ./dist/server.js",
|
||||
"test": "ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json",
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import swaggerJsdoc from "swagger-jsdoc";
|
||||
import { BaseHttpController } from "./BaseHttpController";
|
||||
// @ts-ignore
|
||||
import LiveDirectory from "live-directory";
|
||||
import * as fs from "fs";
|
||||
|
||||
export class SwaggerController extends BaseHttpController {
|
||||
routes() {
|
||||
this.app.get("/openapi", (req, res) => {
|
||||
// Let's load the module dynamically (it may not exist in prod because part of the -dev packages)
|
||||
const swaggerJsdoc = require("swagger-jsdoc");
|
||||
const options = {
|
||||
swaggerDefinition: {
|
||||
openapi: "3.0.0",
|
||||
@@ -22,6 +21,8 @@ export class SwaggerController extends BaseHttpController {
|
||||
});
|
||||
|
||||
// Create a LiveDirectory instance to virtualize directory with our assets
|
||||
// @ts-ignore
|
||||
const LiveDirectory = require("live-directory");
|
||||
const LiveAssets = new LiveDirectory({
|
||||
path: __dirname + "/../../node_modules/swagger-ui-dist", // We want to provide the system path to the folder. Avoid using relative paths.
|
||||
keep: {
|
||||
|
||||
Reference in New Issue
Block a user