* fix: repair the server test suite on develop
* fix: keep mention read state when a message is edited
* fix: do not preview soft-404 pages
frappe.io answers unpublished blog URLs with HTTP 200 and its error
page, og tags included, so the fetcher built a "Page Not Found" card.
parse_open_graph now fails the fetch when the page's title is exactly a
known not-found title. The failure stays retryable: a post published
later under the same URL previews on a future share.
* fix(ui): reduce blurfade for files and links in channel settings tab
* feat: switch workspaces with cmd+alt+up/down
* fix: make polls inert in thread list rows
* fix: show the server's error when saving admin settings fails
* fix: align Later list rows with the page gutter on mobile
* fix: show a media teaser for image-only messages in notifications
* fix: size the notification media teaser like rich quotes
The rich branch's .tiptap root overrides the quote container's xs/gray
styling, so the plain "📷 Photo" fallback rendered smaller and dimmer
than text quotes. The fallback now carries the same reading tier.
* fix: match the profile skeleton to the real page layout
* fix: sr-only print dialog descriptions and combobox titles
44 lines
1.4 KiB
JavaScript
44 lines
1.4 KiB
JavaScript
import path from 'path';
|
|
import fs from 'fs';
|
|
|
|
function getCommonSiteConfig() {
|
|
let currentDir = path.resolve('.')
|
|
// traverse up till we find frappe-bench with sites directory
|
|
while (currentDir !== '/') {
|
|
if (
|
|
fs.existsSync(path.join(currentDir, 'sites')) &&
|
|
fs.existsSync(path.join(currentDir, 'apps'))
|
|
) {
|
|
let configPath = path.join(currentDir, 'sites', 'common_site_config.json')
|
|
if (fs.existsSync(configPath)) {
|
|
return JSON.parse(fs.readFileSync(configPath))
|
|
}
|
|
return null
|
|
}
|
|
currentDir = path.resolve(currentDir, '..')
|
|
}
|
|
return null
|
|
}
|
|
|
|
const config = getCommonSiteConfig()
|
|
const webserver_port = config ? config.webserver_port : 8000
|
|
if (!config) {
|
|
console.log('No common_site_config.json found, using default port 8000')
|
|
}
|
|
|
|
export default {
|
|
// printview: the document print preview iframe (DocumentPrintDialog) —
|
|
// without it the dev server answers with the SPA inside the iframe.
|
|
'^/(app|api|assets|files|private|printview)': {
|
|
target: `http://127.0.0.1:${webserver_port}`,
|
|
ws: true,
|
|
changeOrigin: true,
|
|
secure: false,
|
|
router: function (req) {
|
|
const site_name = req.headers.host.split(':')[0];
|
|
return `http://${site_name}:${webserver_port}`;
|
|
}
|
|
}
|
|
};
|
|
|