From 2978f1186983305a59636da82bb7883c44f9beb9 Mon Sep 17 00:00:00 2001 From: goynov Date: Mon, 4 Nov 2024 20:26:27 +0200 Subject: [PATCH] gameobject module dev --- .gitignore | 4 +- README.md | 3 + backend/app/Db.js | 24 +- backend/app/bl/GameObjectsManager.js | 170 ++++ backend/controllers/AssetController.js | 27 + backend/controllers/api/GameObjects.js | 25 - .../controllers/api/GameObjectsController.js | 49 + backend/main.js | 4 +- package-lock.json | 958 +++++++++++++++++- package.json | 2 + result.json | 1 + src/App.vue | 2 +- src/components/AppHeader.vue | 24 +- src/gameEngine/index.js | 2 - src/pages/game-objects/[[id]].vue | 91 ++ src/pages/game-objects/index.vue | 67 -- src/pages/game-objects/list.vue | 27 + src/plugins/api.js | 6 + src/plugins/lang.js | 9 +- src/plugins/vuetify.js | 10 +- 20 files changed, 1391 insertions(+), 114 deletions(-) create mode 100644 backend/app/bl/GameObjectsManager.js create mode 100644 backend/controllers/AssetController.js delete mode 100644 backend/controllers/api/GameObjects.js create mode 100644 backend/controllers/api/GameObjectsController.js create mode 100644 result.json create mode 100644 src/pages/game-objects/[[id]].vue delete mode 100644 src/pages/game-objects/index.vue create mode 100644 src/pages/game-objects/list.vue diff --git a/.gitignore b/.gitignore index b3bccdd..3edf437 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ .DS_Store node_modules /dist +/out +/repo # local env files .env.local @@ -20,4 +22,4 @@ pnpm-debug.log* *.njsproj *.sln *.sw? -.cert \ No newline at end of file +.cert diff --git a/README.md b/README.md index e69de29..3e39321 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,3 @@ +JSDOC: + +jsdoc ./backend/app/Db.js -t "D:\IMI\ProNature\jsdoc-releases-4.0\templates\haruki" -d console -q format=xml \ No newline at end of file diff --git a/backend/app/Db.js b/backend/app/Db.js index bb7e8df..d256d37 100644 --- a/backend/app/Db.js +++ b/backend/app/Db.js @@ -3,10 +3,13 @@ import { ObjectId, MongoClient } from 'mongodb'; let db; let dbo; +/** + * Manages database operations + */ class Db { name = 'db'; init(app){ - this.app = app; + } async start(app){ @@ -23,6 +26,12 @@ class Db { } } + /** + * Inserts a record in a db collection + * @param {string} collection The name of the collection + * @param {Object} value The object to insert + * @returns Inserted Id + */ async create(collection, value){ try { delete value._id; @@ -31,6 +40,13 @@ class Db { } } + /** + * Loads a record from db collection + * @param {string} collection The name of the collection + * @param {Object} key Record identifier + * @param {Object} projection What data to take from the object + * @returns A record + */ async get(collection, key, projection){ try { let res = await dbo.collection(collection).findOne(key, projection ? {projection} : undefined) @@ -39,6 +55,12 @@ class Db { } } + /** + * Performs a database query + * @param {string} collection Collection name + * @param {Object} query A mongo db query + * @returns Array of records + */ async list(collection, query){ try { let cursor = dbo.collection(collection).find(query.query, query.project ? {projection: query.project} : undefined); diff --git a/backend/app/bl/GameObjectsManager.js b/backend/app/bl/GameObjectsManager.js new file mode 100644 index 0000000..f144a49 --- /dev/null +++ b/backend/app/bl/GameObjectsManager.js @@ -0,0 +1,170 @@ +import decompress from "decompress"; +import sharp from 'sharp'; +import fs from 'fs'; +import path from 'path'; + +const collection = 'assets'; + +/** + * Application layer manager + */ +class GameObjectsManager{ + name = 'gameObject'; + + /** + * Plugin initializer + * @param {App} app The Application + */ + init(app){ + const {db, config} = app; + + /** + * Gets last asset Id from database + * @returns {Number} Last Asset Id + */ + this.getLastId = async function(){ + let ag = await db.aggregate(collection, [ + { + $group:{ + _id: null, + max: { + $max: "$id", + }, + }, + }, + ]); + return ag.max || 0; + } + + /** + * Creates a game object + * @param {Context} ctx Request context + * @param {GameObject} data Asset data + */ + this.create = async function(ctx, data){ + data.id = (await this.getLastId()) + 1; + await db.create(collection, data); + if (ctx.files?.file){ + await this.addFile(data, ctx.files.file) + await fs.promises.unlink(ctx.files.file.path) + await db.update(collection, {id: data.id}, data); + } + return data; + } + + /** + * Retrieves game object from database + * @param {Number} id Game object ID + * @returns {GameObject} The game object + */ + this.read = async function(id){ + id = parseInt(id); + return await db.get(collection, {id}); + } + + /** + * Updates game object into the database + * @param {Context} ctx Request context + * @param {GameObject} data Game object + */ + this.update = async function(ctx, data){ + data.id = parseInt(data.id); + let object = await this.read(data.id); + data = Object.assign(object, data); + if (ctx.files?.file){ + await this.addFile(data, ctx.files.file) + await fs.promises.unlink(ctx.files.file.path) + }if (ctx.files?.thumb){ + await this.addThumb(data, ctx.files.thumb.path); + await fs.promises.unlink(ctx.files.thumb.path) + } + await db.update(collection, {id: data.id}, data); + return data; + } + + /** + * Removes game object from database + * @param {Number} id Game object ID + */ + this.remove = async function(id){ + id = parseInt(id); + await db.remove(collection, {id}); + } + + /** + * Assigns a file to a game object + * @param {GameObject} object Game object + * @param {File} tmpFile A file + */ + this.addFile = async function(object, tmpFile){ + let i = tmpFile; + let ofn = i.name; + let ext = path.extname(ofn).toLowerCase(); + let src = `${config.fs.repo}/source/${object.id}${ext}`; + let def = `${config.fs.repo}/default/${object.id}`; + await fs.promises.copyFile(i.path, src); + object.asset = { + ofn, + name: `${object.id}${ext}` + } + if (ext == '.zip'){ + let result = await decompress(src, def); + object.asset.list = result.map(f=>f.path); + object.asset.type = 'bundle'; + }else{ + object.asset.type = 'single'; + await fs.promises.copyFile(src, def + ext); + await this.addThumb(object, src); + } + } + + /** + * Assigns a thumbnail to a game object + * @param {GameObject} object Game object + * @param {File} thumbSrc A thumbnail + */ + this.addThumb = async function(object, thumbSrc){ + let dest = `${config.fs.repo}/thumb/${object.id}.webp`; + await sharp(thumbSrc).resize({height: 250}).toFile(dest); + object.asset.thumb = `${object.id}.webp`; + } + + /** + * Returns list of GameObjects + * @param {Object} query Query to DB + * @returns {GameObject[]} Array of game objects + */ + this.list = async function(query){ + return await db.list(collection, { + query: {}, + project: { name:1, id:1, type:1, asset:1} + }); + } + } + + /** + * Class starter + * @param {App} app The application + */ + async start(app){ + + } +} + +/** + * GameObject entity + */ +class GameObject { + /** + * Game object name + * @type string + */ + name = null; + + type = null; + + + file = null; +} + +export { GameObjectsManager } \ No newline at end of file diff --git a/backend/controllers/AssetController.js b/backend/controllers/AssetController.js new file mode 100644 index 0000000..ecbc918 --- /dev/null +++ b/backend/controllers/AssetController.js @@ -0,0 +1,27 @@ +import express from 'express'; + +class AssetController{ + + name = 'assetController' + route = '/asset' + + init(app){ + const router = express.Router(); + const {config} = app; + + router.get('/:where/:id(*)', async (req, res)=>{ + res.sendFile(config.fs.repo + req.params.where + '/' + req.params.id, (err)=>{ + if (err){ + console.error('Error retreiving file', req.params, err.code, err.message); + if (req.params.where == 'thumb'){ + res.redirect(302, '/empty.png'); + }else res.status(404).end(); + } + }); + }) + + app.webServer.xapp.use(this.route, router); + } +} + +export {AssetController} \ No newline at end of file diff --git a/backend/controllers/api/GameObjects.js b/backend/controllers/api/GameObjects.js deleted file mode 100644 index 44799d5..0000000 --- a/backend/controllers/api/GameObjects.js +++ /dev/null @@ -1,25 +0,0 @@ -import express from 'express'; -import fs from 'fs'; -import { v4 as uuidv4 } from 'uuid'; -import multipart from 'connect-multiparty'; - -const multipartMiddleware = multipart(); -class GameObjectsApi{ - - name = 'gameObjectsApi' - route = '/api/game-object' - - init(app){ - const { am, config } = app; - const router = express.Router(); - router.put('/', multipartMiddleware, async (req, res)=>{ - try{ - }catch(err){ - } - }); - - app.webServer.xapp.use(this.route, router); - } -} - -export {GameObjectsApi} \ No newline at end of file diff --git a/backend/controllers/api/GameObjectsController.js b/backend/controllers/api/GameObjectsController.js new file mode 100644 index 0000000..daabf50 --- /dev/null +++ b/backend/controllers/api/GameObjectsController.js @@ -0,0 +1,49 @@ +import express from 'express'; +import multipart from 'connect-multiparty'; + +const multipartMiddleware = multipart(); +class GameObjectsController{ + + name = 'gameObjectsApi' + route = '/api/game-object' + + init(app){ + const { gameObject } = app; + const router = express.Router(); + + /** + * Create & update + */ + router.put('/', multipartMiddleware, async (req, res)=>{ + try{ + let data = req.body; + let object = await gameObject[data.id? 'update' : 'create'](req, data) + res.json({status: 'OK', object}); + }catch(err){ + console.error(err); + res.status(500).json({status: 'ERR', err}); + } + }); + + /** + * List + */ + router.post('/', async (req, res)=>{ + let result = await gameObject.list(req.body); + res.json(result); + }) + + router.get('/', async (req, res)=>{ + + }) + + router.get('/:id', async (req, res)=>{ + let object = await gameObject.read(parseInt(req.params.id)); + res.json(object); + }) + + app.webServer.xapp.use(this.route, router); + } +} + +export {GameObjectsController} \ No newline at end of file diff --git a/backend/main.js b/backend/main.js index 90e366e..89033f1 100644 --- a/backend/main.js +++ b/backend/main.js @@ -11,8 +11,10 @@ import App from './app/App.js'; const modules = [ {name:'Config', path:'app/Config.js'}, {name:'Db', path:'app/Db.js'}, + {name:'GameObjectsManager', path:'app/bl/GameObjectsManager.js'}, {name:'WebServer', path:'app/WebServer.js'}, - {name:'GameObjectsApi', path:'controllers/api/GameObjects.js'}, + {name: 'AssetController', path: 'controllers/AssetController.js'}, + {name:'GameObjectsController', path:'controllers/api/GameObjectsController.js'}, ] process.on('uncaughtException', err => { diff --git a/package-lock.json b/package-lock.json index b88091d..ae2622c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,12 +16,14 @@ "connect-multiparty": "^2.2.0", "cookie-parser": "^1.4.7", "core-js": "^3.37.1", + "decompress": "^4.2.1", "dotenv": "^16.4.5", "express": "^4.21.1", "express-session": "^1.18.1", "helmet": "^8.0.0", "mongodb": "^6.10.0", "roboto-fontface": "*", + "sharp": "^0.33.5", "three": "^0.169.0", "uuid": "^11.0.2", "vue": "^3.4.31", @@ -274,6 +276,16 @@ "node": ">=6.9.0" } }, + "node_modules/@emnapi/runtime": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", + "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", @@ -740,6 +752,367 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", + "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", + "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", + "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", + "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", + "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "cpu": [ + "arm" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", + "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", + "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", + "cpu": [ + "s390x" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", + "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", + "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", + "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", + "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "cpu": [ + "arm" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.5" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", + "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", + "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", + "cpu": [ + "s390x" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", + "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", + "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", + "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", + "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", + "cpu": [ + "wasm32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.2.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", + "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", + "cpu": [ + "ia32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", + "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", @@ -1630,6 +2003,26 @@ "dev": true, "license": "MIT" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -1643,6 +2036,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "license": "MIT", + "dependencies": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, "node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", @@ -1722,6 +2125,61 @@ "node": ">=16.20.1" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "license": "MIT", + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "node_modules/buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "license": "MIT" + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==", + "license": "MIT" + }, "node_modules/builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", @@ -1851,11 +2309,23 @@ "node": ">= 6" } }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -1868,9 +2338,18 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, "license": "MIT" }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -1883,6 +2362,12 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -2121,6 +2606,12 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2227,6 +2718,102 @@ } } }, + "node_modules/decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "license": "MIT", + "dependencies": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "license": "MIT", + "dependencies": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "license": "MIT", + "dependencies": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tarbz2/node_modules/file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "license": "MIT", + "dependencies": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==", + "license": "MIT", + "dependencies": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-unzip/node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -2297,6 +2884,15 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -2337,6 +2933,15 @@ "node": ">= 0.8" } }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -3289,6 +3894,15 @@ "reusify": "^1.0.4" } }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "license": "MIT", + "dependencies": { + "pend": "~1.2.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -3302,6 +3916,15 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -3449,6 +4072,12 @@ "node": ">= 0.6" } }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "license": "MIT" + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3527,6 +4156,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==", + "license": "MIT", + "dependencies": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/get-symbol-description": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", @@ -3638,6 +4280,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -3766,6 +4414,26 @@ "node": ">=0.10.0" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -3869,6 +4537,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "license": "MIT" + }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -4012,6 +4686,12 @@ "node": ">=0.10.0" } }, + "node_modules/is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==", + "license": "MIT" + }, "node_modules/is-negative-zero": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", @@ -4094,6 +4774,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-string": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", @@ -4328,6 +5017,27 @@ "node": ">=16.14.0" } }, + "node_modules/make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "license": "MIT", + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/make-dir/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -4630,6 +5340,15 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", @@ -4748,7 +5467,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -4876,6 +5594,12 @@ "dev": true, "license": "MIT" }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", @@ -4895,6 +5619,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/pinia": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.2.4.tgz", @@ -4949,6 +5682,27 @@ } } }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "license": "MIT", + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/pkg-types": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", @@ -5023,6 +5777,12 @@ "node": ">= 0.8.0" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -5120,6 +5880,33 @@ "node": ">= 0.8" } }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -5394,6 +6181,19 @@ "dev": true, "license": "MIT" }, + "node_modules/seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "license": "MIT", + "dependencies": { + "commander": "^2.8.1" + }, + "bin": { + "seek-bunzip": "bin/seek-bunzip", + "seek-table": "bin/seek-bzip-table" + } + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -5506,6 +6306,57 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "license": "ISC" }, + "node_modules/sharp": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", + "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.3", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.5", + "@img/sharp-darwin-x64": "0.33.5", + "@img/sharp-libvips-darwin-arm64": "1.0.4", + "@img/sharp-libvips-darwin-x64": "1.0.4", + "@img/sharp-libvips-linux-arm": "1.0.5", + "@img/sharp-libvips-linux-arm64": "1.0.4", + "@img/sharp-libvips-linux-s390x": "1.0.4", + "@img/sharp-libvips-linux-x64": "1.0.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", + "@img/sharp-libvips-linuxmusl-x64": "1.0.4", + "@img/sharp-linux-arm": "0.33.5", + "@img/sharp-linux-arm64": "0.33.5", + "@img/sharp-linux-s390x": "0.33.5", + "@img/sharp-linux-x64": "0.33.5", + "@img/sharp-linuxmusl-arm64": "0.33.5", + "@img/sharp-linuxmusl-x64": "0.33.5", + "@img/sharp-wasm32": "0.33.5", + "@img/sharp-win32-ia32": "0.33.5", + "@img/sharp-win32-x64": "0.33.5" + } + }, + "node_modules/sharp/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5547,6 +6398,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -5574,6 +6434,21 @@ "node": ">= 0.8" } }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, "node_modules/string.prototype.trim": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", @@ -5649,6 +6524,15 @@ "node": ">=4" } }, + "node_modules/strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "license": "MIT", + "dependencies": { + "is-natural-number": "^4.0.1" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -5708,6 +6592,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "license": "MIT", + "dependencies": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -5721,6 +6623,18 @@ "integrity": "sha512-Ed906MA3dR4TS5riErd4QBsRGPcx+HBDX2O5yYE5GqJeFQTPU+M56Va/f/Oph9X7uZo3W3o4l2ZhBZ6f6qUv0w==", "license": "MIT" }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "license": "MIT" + }, + "node_modules/to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "license": "MIT" + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -5777,6 +6691,13 @@ "strip-bom": "^3.0.0" } }, + "node_modules/tslib": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", + "license": "0BSD", + "optional": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5928,6 +6849,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "license": "MIT", + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, "node_modules/unimport": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/unimport/-/unimport-3.13.1.tgz", @@ -6218,7 +7149,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, "license": "MIT" }, "node_modules/utils-merge": { @@ -6548,7 +7478,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, "license": "ISC" }, "node_modules/xml-name-validator": { @@ -6561,6 +7490,15 @@ "node": ">=12" } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, "node_modules/yaml": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.0.tgz", @@ -6574,6 +7512,16 @@ "node": ">= 14" } }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 9b58818..edf395c 100644 --- a/package.json +++ b/package.json @@ -18,12 +18,14 @@ "connect-multiparty": "^2.2.0", "cookie-parser": "^1.4.7", "core-js": "^3.37.1", + "decompress": "^4.2.1", "dotenv": "^16.4.5", "express": "^4.21.1", "express-session": "^1.18.1", "helmet": "^8.0.0", "mongodb": "^6.10.0", "roboto-fontface": "*", + "sharp": "^0.33.5", "three": "^0.169.0", "uuid": "^11.0.2", "vue": "^3.4.31", diff --git a/result.json b/result.json new file mode 100644 index 0000000..f2857b1 --- /dev/null +++ b/result.json @@ -0,0 +1 @@ +[{"comment":"/**\r\n * Application layer manager\r\n */","meta":{"range":[188,3908],"filename":"GameObjectsManager.js","lineno":11,"columnno":0,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000022","name":"GameObjectsManager","type":"ClassDeclaration","paramnames":[]}},"classdesc":"Application layer manager","name":"GameObjectsManager","longname":"GameObjectsManager","kind":"class","scope":"global"},{"comment":"/**\r\n * Plugin initializer\r\n * @param {App} app The Application\r\n */","meta":{"range":[333,3790],"filename":"GameObjectsManager.js","lineno":18,"columnno":4,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000027","name":"GameObjectsManager#init","type":"MethodDefinition","paramnames":["app"]},"vars":{"":null}},"description":"Plugin initializer","params":[{"type":{"names":["App"]},"description":"The Application","name":"app"}],"name":"init","longname":"GameObjectsManager#init","kind":"function","memberof":"GameObjectsManager","scope":"instance"},{"comment":"/**\r\n * Gets last asset Id from database\r\n * @returns {Number} Last Asset Id\r\n */","meta":{"range":[505,881],"filename":"GameObjectsManager.js","lineno":25,"columnno":8,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000041","name":"this.getLastId","type":"FunctionExpression","paramnames":[]},"vars":{"ag":"GameObjectsManager#getLastId~ag"}},"description":"Gets last asset Id from database","returns":[{"type":{"names":["Number"]},"description":"Last Asset Id"}],"name":"getLastId","longname":"GameObjectsManager#getLastId","kind":"function","memberof":"GameObjectsManager","scope":"instance"},{"comment":"/**\r\n * Creates a game object\r\n * @param {Context} ctx Request context\r\n * @param {GameObject} data Asset data\r\n */","meta":{"range":[1050,1359],"filename":"GameObjectsManager.js","lineno":44,"columnno":8,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000071","name":"this.create","type":"FunctionExpression","paramnames":["ctx","data"]},"vars":{"data.id":"data.id"}},"description":"Creates a game object","params":[{"type":{"names":["Context"]},"description":"Request context","name":"ctx"},{"type":{"names":["GameObject"]},"description":"Asset data","name":"data"}],"name":"create","longname":"GameObjectsManager#create","kind":"function","memberof":"GameObjectsManager","scope":"instance"},{"comment":"/**\r\n * Retrieves game object from database\r\n * @param {Number} id Game object ID\r\n * @returns {GameObject} The game object\r\n */","meta":{"range":[1541,1635],"filename":"GameObjectsManager.js","lineno":58,"columnno":8,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000123","name":"this.read","type":"FunctionExpression","paramnames":["id"]}},"description":"Retrieves game object from database","params":[{"type":{"names":["Number"]},"description":"Game object ID","name":"id"}],"returns":[{"type":{"names":["GameObject"]},"description":"The game object"}],"name":"read","longname":"GameObjectsManager#read","kind":"function","memberof":"GameObjectsManager","scope":"instance"},{"comment":"/**\r\n * Updates game object into the database\r\n * @param {Context} ctx Request context\r\n * @param {GameObject} data Game object\r\n */","meta":{"range":[1821,1935],"filename":"GameObjectsManager.js","lineno":67,"columnno":8,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000141","name":"this.update","type":"FunctionExpression","paramnames":["ctx","data"]}},"description":"Updates game object into the database","params":[{"type":{"names":["Context"]},"description":"Request context","name":"ctx"},{"type":{"names":["GameObject"]},"description":"Game object","name":"data"}],"name":"update","longname":"GameObjectsManager#update","kind":"function","memberof":"GameObjectsManager","scope":"instance"},{"comment":"/**\r\n * Removes game object from database\r\n * @param {Number} id Game object ID\r\n */","meta":{"range":[2065,2157],"filename":"GameObjectsManager.js","lineno":75,"columnno":8,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000163","name":"this.remove","type":"FunctionExpression","paramnames":["id"]}},"description":"Removes game object from database","params":[{"type":{"names":["Number"]},"description":"Game object ID","name":"id"}],"name":"remove","longname":"GameObjectsManager#remove","kind":"function","memberof":"GameObjectsManager","scope":"instance"},{"comment":"/**\r\n * Assigns a file to a game object\r\n * @param {GameObject} object Game object\r\n * @param {File} tmpFile A file\r\n */","meta":{"range":[2331,3104],"filename":"GameObjectsManager.js","lineno":84,"columnno":8,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000181","name":"this.addFile","type":"FunctionExpression","paramnames":["object","tmpFile"]},"vars":{"i":"GameObjectsManager#addFile~i","ofn":"GameObjectsManager#addFile~ofn","ext":"GameObjectsManager#addFile~ext","src":"GameObjectsManager#addFile~src","def":"GameObjectsManager#addFile~def","object.file":"object.file","result":"GameObjectsManager#addFile~result","object.file.assets":"object.file.assets","":null}},"description":"Assigns a file to a game object","params":[{"type":{"names":["GameObject"]},"description":"Game object","name":"object"},{"type":{"names":["File"]},"description":"A file","name":"tmpFile"}],"name":"addFile","longname":"GameObjectsManager#addFile","kind":"function","memberof":"GameObjectsManager","scope":"instance"},{"comment":"/**\r\n * Assigns a thumbnail to a game object\r\n * @param {GameObject} object Game object\r\n * @param {File} thumbSrc A thumbnail\r\n */","meta":{"range":[3289,3528],"filename":"GameObjectsManager.js","lineno":109,"columnno":8,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000320","name":"this.addThumb","type":"FunctionExpression","paramnames":["object","thumbSrc"]},"vars":{"dest":"GameObjectsManager#addThumb~dest","object.file.thumb":"object.file.thumb"}},"description":"Assigns a thumbnail to a game object","params":[{"type":{"names":["GameObject"]},"description":"Game object","name":"object"},{"type":{"names":["File"]},"description":"A thumbnail","name":"thumbSrc"}],"name":"addThumb","longname":"GameObjectsManager#addThumb","kind":"function","memberof":"GameObjectsManager","scope":"instance"},{"comment":"/**\r\n * Returns list of GameObjects\r\n * @param {Object} query Query to DB \r\n * @returns {GameObject[]} Array of game objects\r\n */","meta":{"range":[3711,3783],"filename":"GameObjectsManager.js","lineno":120,"columnno":8,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000367","name":"this.list","type":"FunctionExpression","paramnames":["query"]}},"description":"Returns list of GameObjects","params":[{"type":{"names":["Object"]},"description":"Query to DB","name":"query"}],"returns":[{"type":{"names":["Array."]},"description":"Array of game objects"}],"name":"list","longname":"GameObjectsManager#list","kind":"function","memberof":"GameObjectsManager","scope":"instance"},{"comment":"/**\r\n * Class starter\r\n * @param {App} app The application\r\n */","meta":{"range":[3879,3905],"filename":"GameObjectsManager.js","lineno":129,"columnno":4,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000376","name":"GameObjectsManager#start","type":"MethodDefinition","paramnames":["app"]},"vars":{"":null}},"description":"Class starter","params":[{"type":{"names":["App"]},"description":"The application","name":"app"}],"name":"start","longname":"GameObjectsManager#start","kind":"function","memberof":"GameObjectsManager","scope":"instance","async":true},{"comment":"/**\r\n * GameObject entity\r\n */","meta":{"range":[3944,4089],"filename":"GameObjectsManager.js","lineno":137,"columnno":0,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000381","name":"GameObject","type":"ClassDeclaration","paramnames":[]}},"classdesc":"GameObject entity","name":"GameObject","longname":"GameObject","kind":"class","scope":"global"},{"comment":"/**\r\n * Game object name\r\n * @type string\r\n */","meta":{"range":[4032,4044],"filename":"GameObjectsManager.js","lineno":142,"columnno":4,"path":"D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl","code":{"id":"astnode100000384","name":"name","type":"ClassProperty"}},"description":"Game object name","type":{"names":["string"]},"name":"name","longname":"GameObject#name","kind":"member","memberof":"GameObject","scope":"instance"},{"kind":"package","longname":"package:undefined","files":["D:\\IMI\\ProNature\\pronature-platform\\backend\\app\\bl\\GameObjectsManager.js"]}] \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 2caa78e..660483f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,7 @@ diff --git a/src/components/AppHeader.vue b/src/components/AppHeader.vue index a86cfad..a0c786e 100644 --- a/src/components/AppHeader.vue +++ b/src/components/AppHeader.vue @@ -7,29 +7,37 @@ - Нов игрови обект + Нов игрови обект Нов сценарий Нова игра - + - - - - + + + + + + + + + \ No newline at end of file diff --git a/src/gameEngine/index.js b/src/gameEngine/index.js index f47a597..9ae4b5f 100644 --- a/src/gameEngine/index.js +++ b/src/gameEngine/index.js @@ -21,13 +21,11 @@ class GameEngine { mesh.rotation.y = time / 1000; renderer.render(scene, camera); - } const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true }); renderer.setSize(width, height); renderer.setAnimationLoop(animate); - document.body.appendChild(renderer.domElement); this.renderer = renderer; } diff --git a/src/pages/game-objects/[[id]].vue b/src/pages/game-objects/[[id]].vue new file mode 100644 index 0000000..15c53cf --- /dev/null +++ b/src/pages/game-objects/[[id]].vue @@ -0,0 +1,91 @@ + + + \ No newline at end of file diff --git a/src/pages/game-objects/index.vue b/src/pages/game-objects/index.vue deleted file mode 100644 index 0b4e630..0000000 --- a/src/pages/game-objects/index.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - \ No newline at end of file diff --git a/src/pages/game-objects/list.vue b/src/pages/game-objects/list.vue new file mode 100644 index 0000000..dd88709 --- /dev/null +++ b/src/pages/game-objects/list.vue @@ -0,0 +1,27 @@ + + + \ No newline at end of file diff --git a/src/plugins/api.js b/src/plugins/api.js index de1cb90..03147d1 100644 --- a/src/plugins/api.js +++ b/src/plugins/api.js @@ -10,6 +10,12 @@ export default { gameObject:{ async save(data){ return await $ax.put('/game-object', data); + }, + async load(id){ + return await $ax.get(`/game-object/${id}`); + }, + async search(query){ + return await $ax.post('/game-object', query); } } } diff --git a/src/plugins/lang.js b/src/plugins/lang.js index 2b4494b..21590ac 100644 --- a/src/plugins/lang.js +++ b/src/plugins/lang.js @@ -1,6 +1,7 @@ const lang = { bg: { createGameObject: 'Добавяне на игрови обект', + editGameObject: 'Редактиране на игрови обект', name: 'Име', fieldRequired: 'Полето е задължително', objectType: 'Тип обект', @@ -12,8 +13,14 @@ const lang = { audio: 'Аудио', player3d: 'Играч', saveAndPreview: 'Запис и преглед', + preview: 'Преглед', captureThumbnail: 'Capture thumbnail', - publish: 'Публикуване' + publish: 'Публикуване', + gameObjects: 'Обекти', + gameScenarios: 'Сценарии', + gameRules: 'Правила', + games: 'Игри', + darkMode: 'Тъмен режим' }, en: { diff --git a/src/plugins/vuetify.js b/src/plugins/vuetify.js index 3b36f73..1ca1c60 100644 --- a/src/plugins/vuetify.js +++ b/src/plugins/vuetify.js @@ -35,8 +35,14 @@ export default createVuetify({ themes: { light: { colors: { - // primary: '#1867C0', - // secondary: '#5CBBF6', + primary: '#497d95', + secondary: '#63963a', + }, + }, + dark: { + colors: { + primary: '#497d95', + secondary: '#63963a', }, }, },