mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-04 20:29:01 +00:00
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into search-by-tags
This commit is contained in:
Generated
+49
-48
@@ -10,11 +10,11 @@
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/core": "^8.0.9",
|
||||
"@babel/core": "^8.0.10",
|
||||
"@babel/plugin-transform-runtime": "^8.0.6",
|
||||
"@babel/preset-env": "^8.0.7",
|
||||
"@babel/preset-react": "^8.0.1",
|
||||
"@babel/runtime": "^8.0.8",
|
||||
"@babel/runtime": "^8.0.10",
|
||||
"@codemirror/autocomplete": "^6.20.4",
|
||||
"@codemirror/commands": "^6.11.1",
|
||||
"@codemirror/lang-css": "^6.3.1",
|
||||
@@ -46,7 +46,7 @@
|
||||
"hash-wasm": "^4.12.0",
|
||||
"idb-keyval": "^6.2.5",
|
||||
"js-yaml": "^5.5.0",
|
||||
"jwt-simple": "^0.5.6",
|
||||
"jwt-simple": "^0.6.1",
|
||||
"less": "^4.9.1",
|
||||
"lodash": "^4.18.1",
|
||||
"marked-hbfm": "^1.0.3",
|
||||
@@ -55,12 +55,12 @@
|
||||
"mongoose": "^9.11.4",
|
||||
"nanoid": "6.0.2",
|
||||
"nconf": "^0.13.0",
|
||||
"node": "^26.12.1",
|
||||
"node": "^26.13.0",
|
||||
"prettier": "^3.9.10",
|
||||
"react": "^19.3.1",
|
||||
"react-dom": "^19.3.1",
|
||||
"react-frame-component": "^5.3.2",
|
||||
"react-router": "^8.5.0",
|
||||
"react-router": "^8.5.1",
|
||||
"sanitize-filename": "1.6.4",
|
||||
"superagent": "^10.4.1"
|
||||
},
|
||||
@@ -144,19 +144,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/core": {
|
||||
"version": "8.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-8.0.9.tgz",
|
||||
"integrity": "sha512-wXtyKlpR/pXf/u0vmib+OBakQaIzLglLcRoKpWxCHW/whqq7YfQYPD0IAAl9H/evi40MyLIjYYdvb6N+9DI2yA==",
|
||||
"version": "8.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-8.0.10.tgz",
|
||||
"integrity": "sha512-T6dEcoMJ3L1hyLuNfRXcVlqQrN79kU/SB5bDygVgQNIOUgStdyEGzigtRA9K+9Coh7SZUSt543oWRBxvqYdyuQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^8.0.6",
|
||||
"@babel/generator": "^8.0.6",
|
||||
"@babel/generator": "^8.0.10",
|
||||
"@babel/helper-compilation-targets": "^8.0.7",
|
||||
"@babel/helpers": "^8.0.8",
|
||||
"@babel/parser": "^8.0.8",
|
||||
"@babel/helpers": "^8.0.10",
|
||||
"@babel/parser": "^8.0.10",
|
||||
"@babel/template": "^8.0.0",
|
||||
"@babel/traverse": "^8.0.7",
|
||||
"@babel/types": "^8.0.8",
|
||||
"@babel/traverse": "^8.0.10",
|
||||
"@babel/types": "^8.0.10",
|
||||
"@types/gensync": "^1.0.5",
|
||||
"convert-source-map": "^2.0.0",
|
||||
"empathic": "^2.0.1",
|
||||
@@ -187,13 +187,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator": {
|
||||
"version": "8.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-8.0.6.tgz",
|
||||
"integrity": "sha512-/pcanjdRsonCexCuxgGD8fKnBLLzk2i9uM4kmcmGyyev2R5YDs+rafMYZ89RvaGY1mW8T7C5au0TyYaEeHBGng==",
|
||||
"version": "8.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-8.0.10.tgz",
|
||||
"integrity": "sha512-iC9p3U4Y3vp0qKjRcfFeNzpj+kkK8BVYZTbQepBWVD7vOBLH6ji0drNzKPTPtumFd2w2r/hbEKYjG4pscKa4bg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^8.0.6",
|
||||
"@babel/types": "^8.0.6",
|
||||
"@babel/parser": "^8.0.10",
|
||||
"@babel/types": "^8.0.10",
|
||||
"@jridgewell/gen-mapping": "0.4.0-beta.0",
|
||||
"@jridgewell/trace-mapping": "^0.3.31",
|
||||
"@types/jsesc": "^2.5.0",
|
||||
@@ -463,25 +463,25 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helpers": {
|
||||
"version": "8.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-8.0.8.tgz",
|
||||
"integrity": "sha512-FBmhiDWs625wHg03OKiLQDeT6LOc2lWBbW97Yqs2iI1tZcucjpmYnO29NHsQ83XxKvredcvUymW/AAn2UtnakA==",
|
||||
"version": "8.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-8.0.10.tgz",
|
||||
"integrity": "sha512-tBG9yuaR26JJWFafcl/Dk4eib6bkRJ9H5e6lENcwZqFudA9ImNCuMXLjB3/t+Ub7/DOZv2Rmi5LCOi8q2DCekQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/template": "^8.0.0",
|
||||
"@babel/types": "^8.0.8"
|
||||
"@babel/types": "^8.0.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^22.18.0 || >=24.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "8.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-8.0.8.tgz",
|
||||
"integrity": "sha512-Gq65JogAr0S2p0BzvfSJboyuiRnxDQApyOqHkKmkrvm+VlLK4gC3pKsiOKEdnhFBemrFbSnOu90mZZWDpiJnmQ==",
|
||||
"version": "8.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-8.0.10.tgz",
|
||||
"integrity": "sha512-h+ah2Kg0ne1Vii892dShj9gky9I5jPzkd8x4s/3xgN/P2bMWmHS3qq59tum3mCVjCBXI8uqfYyYtrfp1Mz6+1w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/types": "^8.0.8"
|
||||
"@babel/types": "^8.0.10"
|
||||
},
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
@@ -1607,9 +1607,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "8.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-8.0.8.tgz",
|
||||
"integrity": "sha512-dEu8nGlRqjsJsvviUUoSMfcRHpwomCiRlXsc2mPfJ79+ffTpDm+JtfUtTMzUrqCApHQnCsVPD3gT1ZT8RgBRCQ==",
|
||||
"version": "8.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-8.0.10.tgz",
|
||||
"integrity": "sha512-0QyWQOIhl2onOgg96BuOYV+oCgLINVDPC8RkVPCiQhLILVqpefDUmcY+aAsW6vp7fcuTZL6SXXlFrSDCTFIu1w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@babel/template": {
|
||||
@@ -1627,17 +1627,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse": {
|
||||
"version": "8.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-8.0.7.tgz",
|
||||
"integrity": "sha512-bVV0brinsTWgc6ptSIoQo3GbITtl0VZAqEUJbHHcyfDPEu+q/fEvlYEa+6H85HoK8IdksKBFtKJbJFZ6Kff+zg==",
|
||||
"version": "8.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-8.0.10.tgz",
|
||||
"integrity": "sha512-t5DaGzMi9WlhMSFT2YavI8gl8yGihoQymSQUkIq9+MUh5tO3Vx9KHwr5gMCzeBdYkvs00xNvr18PxtQTRayucA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^8.0.6",
|
||||
"@babel/generator": "^8.0.6",
|
||||
"@babel/generator": "^8.0.10",
|
||||
"@babel/helper-globals": "^8.0.6",
|
||||
"@babel/parser": "^8.0.7",
|
||||
"@babel/parser": "^8.0.10",
|
||||
"@babel/template": "^8.0.0",
|
||||
"@babel/types": "^8.0.6",
|
||||
"@babel/types": "^8.0.10",
|
||||
"obug": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -1645,9 +1645,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "8.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-8.0.8.tgz",
|
||||
"integrity": "sha512-iXSSZAKQWmaeAwGtFw10v9fg5hUiUs0L+w+Z2K11kym3pDNK+SF0VcAQPsEFvWcTSZ7LMgClMXDBvTbH0IlICg==",
|
||||
"version": "8.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-8.0.10.tgz",
|
||||
"integrity": "sha512-KV8Y+teoRsmXeEPS4sCJY1kwV+hcPzHP1qQqgCxrjKOehLdBaxpsFBfoJ8MXWFV80y6Jw56+TM95wR0Per8dYw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^8.0.8",
|
||||
@@ -11052,12 +11052,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/jwt-simple": {
|
||||
"version": "0.5.6",
|
||||
"resolved": "https://registry.npmjs.org/jwt-simple/-/jwt-simple-0.5.6.tgz",
|
||||
"integrity": "sha512-40aUybvhH9t2h71ncA1/1SbtTNCVZHgsTsTgqPUxGWDmUDrXyDf2wMNQKEbdBjbf4AI+fQhbECNTV6lWxQKUzg==",
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/jwt-simple/-/jwt-simple-0.6.1.tgz",
|
||||
"integrity": "sha512-YSWn9wnJsO9rPZvudS3AMolvQBeiI3QCyOx/U91ClPTVDXzQKnEMgvNnd4E8DFwjfGeEWktPv/EcwOPCIM/eZA==",
|
||||
"deprecated": "jwt-simple is no longer maintained. Please migrate to jose or jsonwebtoken.",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
"node": ">= 6.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/kareem": {
|
||||
@@ -12138,9 +12139,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/node": {
|
||||
"version": "26.12.1",
|
||||
"resolved": "https://registry.npmjs.org/node/-/node-26.12.1.tgz",
|
||||
"integrity": "sha512-SQVeTwweXXfQfpe5gM1648UTnN640HYyqdu06+NxQjkr8d+ppo8exq5BmhS3lk+wYLwVPrqfIAuwGrM7txcBfg==",
|
||||
"version": "26.13.0",
|
||||
"resolved": "https://registry.npmjs.org/node/-/node-26.13.0.tgz",
|
||||
"integrity": "sha512-tULaq1l6WCYvOda1/qb+dXABG9a0NVhx0ySmzhR9rxGxeDU3d3Mc+FzVHSUS3gnMEb3PFLRZC5AjkGIG4RN4ew==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -13130,9 +13131,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "8.5.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-8.5.0.tgz",
|
||||
"integrity": "sha512-9nEd/deifcTJIIcUaNIyQGkyXD0D6QVB9XD2O5GgHpP3xu3U5RXm87YQ8++Wn8JQWgMBM/5+PjWPM/7n7O7WHA==",
|
||||
"version": "8.5.1",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-8.5.1.tgz",
|
||||
"integrity": "sha512-5u1eQ46QjuXjNfEnLwzrnou1Bm5dquO3xjVYkkMYCudtkicD2AQHtx+fvXzPATtPJx8TW6DR1x1TDRqsfHyZBw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@remix-run/route-pattern": "^0.22.1",
|
||||
|
||||
+5
-5
@@ -89,11 +89,11 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^8.0.9",
|
||||
"@babel/core": "^8.0.10",
|
||||
"@babel/plugin-transform-runtime": "^8.0.6",
|
||||
"@babel/preset-env": "^8.0.7",
|
||||
"@babel/preset-react": "^8.0.1",
|
||||
"@babel/runtime": "^8.0.8",
|
||||
"@babel/runtime": "^8.0.10",
|
||||
"@codemirror/autocomplete": "^6.20.4",
|
||||
"@codemirror/commands": "^6.11.1",
|
||||
"@codemirror/lang-css": "^6.3.1",
|
||||
@@ -125,7 +125,7 @@
|
||||
"hash-wasm": "^4.12.0",
|
||||
"idb-keyval": "^6.2.5",
|
||||
"js-yaml": "^5.5.0",
|
||||
"jwt-simple": "^0.5.6",
|
||||
"jwt-simple": "^0.6.1",
|
||||
"less": "^4.9.1",
|
||||
"lodash": "^4.18.1",
|
||||
"marked-hbfm": "^1.0.3",
|
||||
@@ -134,12 +134,12 @@
|
||||
"mongoose": "^9.11.4",
|
||||
"nanoid": "6.0.2",
|
||||
"nconf": "^0.13.0",
|
||||
"node": "^26.12.1",
|
||||
"node": "^26.13.0",
|
||||
"prettier": "^3.9.10",
|
||||
"react": "^19.3.1",
|
||||
"react-dom": "^19.3.1",
|
||||
"react-frame-component": "^5.3.2",
|
||||
"react-router": "^8.5.0",
|
||||
"react-router": "^8.5.1",
|
||||
"sanitize-filename": "1.6.4",
|
||||
"superagent": "^10.4.1"
|
||||
},
|
||||
|
||||
@@ -113,7 +113,7 @@ const api = {
|
||||
|
||||
return userThemes;
|
||||
},
|
||||
getBrew : (accessType, stubOnly = false)=>{
|
||||
getBrew : (accessType, stubOnly = false, split = true)=>{
|
||||
// Create middleware with the accessType passed in as part of the scope
|
||||
return async (req, res, next)=>{
|
||||
// Get relevant IDs for the brew
|
||||
@@ -178,7 +178,7 @@ const api = {
|
||||
stub = _.defaults(stub, DEFAULT_BREW_LOAD); // Fill in blank fields
|
||||
|
||||
req.brew = migrateSystemsToTags(stub);
|
||||
splitTextStyleAndMetadata(req.brew);
|
||||
split && splitTextStyleAndMetadata(req.brew);
|
||||
next();
|
||||
};
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@ import { splitTextStyleAndMetadata } from '../shared/helpers.js';
|
||||
import GoogleActions from './googleActions.js';
|
||||
|
||||
import api from './homebrew.api.js';
|
||||
const { getBrew, getUsersBrewThemes } = api;
|
||||
const { getBrew, getUsersBrewThemes, mergeBrewText } = api;
|
||||
|
||||
const welcomeText = fs.readFileSync('./client/homebrew/pages/homePage/welcome_msg.md', 'utf8');
|
||||
const welcomeTextLegacy = fs.readFileSync('./client/homebrew/pages/homePage/welcome_msg_legacy.md', 'utf8');
|
||||
@@ -122,7 +122,7 @@ export default function pageRoutes({
|
||||
});
|
||||
|
||||
//Source page
|
||||
app.get('/source/:id', asyncHandler(getBrew('share')), (req, res)=>{
|
||||
app.get('/source/:id', asyncHandler(getBrew('share', false, false)), (req, res)=>{
|
||||
const { brew } = req;
|
||||
|
||||
const replaceStrings = { '&': '&', '<': '<', '>': '>' };
|
||||
@@ -135,10 +135,11 @@ export default function pageRoutes({
|
||||
});
|
||||
|
||||
//Download brew source page
|
||||
app.get('/download/:id', asyncHandler(getBrew('share')), (req, res)=>{
|
||||
app.get('/download/:id', asyncHandler(getBrew('share', false, false)), (req, res)=>{
|
||||
const { brew } = req;
|
||||
sanitizeBrew(brew, 'share');
|
||||
const prefix = 'HB - ';
|
||||
console.log(brew);
|
||||
|
||||
const encodeRFC3986ValueChars = (str)=>{
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user