mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-25 15:41:42 +00:00
Compare commits
43 Commits
v0.16.0
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09539c1cc4 | ||
|
|
789926bc76 | ||
|
|
006795b4d0 | ||
|
|
3e5d78d322 | ||
|
|
58c4a78be1 | ||
|
|
2603dfc1ed | ||
|
|
2df590600b | ||
|
|
ef20a8f3e5 | ||
|
|
3e405e1abf | ||
|
|
553832bdfa | ||
|
|
18d65d999a | ||
|
|
3b5eff582a | ||
|
|
85d09b3b3d | ||
|
|
8958e67fcf | ||
|
|
47b796909a | ||
|
|
67d76abdfa | ||
|
|
d75d68ba72 | ||
|
|
323be6b72d | ||
|
|
031a113338 | ||
|
|
b50c5386a6 | ||
|
|
65777b1d56 | ||
|
|
fe728874ac | ||
|
|
bd9b1306b1 | ||
|
|
0ca18d8ca5 | ||
|
|
87a530612f | ||
|
|
f4259bb4d0 | ||
|
|
aa8b589569 | ||
|
|
febc98c101 | ||
|
|
b678c3bd89 | ||
|
|
80b8948433 | ||
|
|
5414fe3384 | ||
|
|
db4016385d | ||
|
|
9d43e34cfa | ||
|
|
fa157f6f76 | ||
|
|
d6a54b8a26 | ||
|
|
9813412c8e | ||
|
|
d76b7235db | ||
|
|
418a789568 | ||
|
|
2d941c3ea3 | ||
|
|
e723d4cd59 | ||
|
|
9e770ef357 | ||
|
|
c796b3b30e | ||
|
|
168fe212f5 |
@@ -63,7 +63,7 @@ export default class CodeEditor extends React.Component {
|
||||
this.focusHandler = () => {
|
||||
ipcRenderer.send('editor:focused', true)
|
||||
}
|
||||
const debouncedDeletionOfAttachments = _.debounce(
|
||||
this.debouncedDeletionOfAttachments = _.debounce(
|
||||
attachmentManagement.deleteAttachmentsNotPresentInNote,
|
||||
30000
|
||||
)
|
||||
@@ -80,7 +80,7 @@ export default class CodeEditor extends React.Component {
|
||||
this.props.onBlur != null && this.props.onBlur(e)
|
||||
const { storageKey, noteKey } = this.props
|
||||
if (this.props.deleteUnusedAttachments === true) {
|
||||
debouncedDeletionOfAttachments(
|
||||
this.debouncedDeletionOfAttachments(
|
||||
this.editor.getValue(),
|
||||
storageKey,
|
||||
noteKey
|
||||
@@ -810,6 +810,8 @@ export default class CodeEditor extends React.Component {
|
||||
}
|
||||
|
||||
handleChange(editor, changeObject) {
|
||||
this.debouncedDeletionOfAttachments.cancel()
|
||||
|
||||
spellcheck.handleChange(editor, changeObject)
|
||||
|
||||
// The current note contains an toc. We'll check for changes on headlines.
|
||||
|
||||
@@ -323,6 +323,7 @@ class MarkdownEditor extends React.Component {
|
||||
storageKey,
|
||||
noteKey,
|
||||
linesHighlighted,
|
||||
getNote,
|
||||
RTL
|
||||
} = this.props
|
||||
|
||||
@@ -426,6 +427,8 @@ class MarkdownEditor extends React.Component {
|
||||
customCSS={config.preview.customCSS}
|
||||
allowCustomCSS={config.preview.allowCustomCSS}
|
||||
lineThroughCheckbox={config.preview.lineThroughCheckbox}
|
||||
getNote={getNote}
|
||||
export={config.export}
|
||||
onDrop={e => this.handleDropImage(e)}
|
||||
RTL={RTL}
|
||||
/>
|
||||
|
||||
@@ -18,258 +18,30 @@ import convertModeName from 'browser/lib/convertModeName'
|
||||
import copy from 'copy-to-clipboard'
|
||||
import mdurl from 'mdurl'
|
||||
import exportNote from 'browser/main/lib/dataApi/exportNote'
|
||||
import { escapeHtmlCharacters } from 'browser/lib/utils'
|
||||
import formatMarkdown from 'browser/main/lib/dataApi/formatMarkdown'
|
||||
import formatHTML, {
|
||||
CSS_FILES,
|
||||
buildStyle,
|
||||
getCodeThemeLink,
|
||||
getStyleParams,
|
||||
escapeHtmlCharactersInCodeTag
|
||||
} from 'browser/main/lib/dataApi/formatHTML'
|
||||
import formatPDF from 'browser/main/lib/dataApi/formatPDF'
|
||||
import yaml from 'js-yaml'
|
||||
import i18n from 'browser/lib/i18n'
|
||||
import path from 'path'
|
||||
import { remote, shell } from 'electron'
|
||||
import attachmentManagement from '../main/lib/dataApi/attachmentManagement'
|
||||
import filenamify from 'filenamify'
|
||||
import { render } from 'react-dom'
|
||||
import Carousel from 'react-image-carousel'
|
||||
import { push } from 'connected-react-router'
|
||||
import ConfigManager from '../main/lib/ConfigManager'
|
||||
import uiThemes from 'browser/lib/ui-themes'
|
||||
import i18n from 'browser/lib/i18n'
|
||||
|
||||
const { remote, shell } = require('electron')
|
||||
const attachmentManagement = require('../main/lib/dataApi/attachmentManagement')
|
||||
const buildMarkdownPreviewContextMenu = require('browser/lib/contextMenuBuilder')
|
||||
.buildMarkdownPreviewContextMenu
|
||||
|
||||
const { app } = remote
|
||||
const path = require('path')
|
||||
const fileUrl = require('file-url')
|
||||
import { buildMarkdownPreviewContextMenu } from 'browser/lib/contextMenuBuilder'
|
||||
|
||||
const dialog = remote.dialog
|
||||
|
||||
const markdownStyle = require('!!css!stylus?sourceMap!./markdown.styl')[0][1]
|
||||
const appPath = fileUrl(
|
||||
process.env.NODE_ENV === 'production' ? app.getAppPath() : path.resolve()
|
||||
)
|
||||
const CSS_FILES = [
|
||||
`${appPath}/node_modules/katex/dist/katex.min.css`,
|
||||
`${appPath}/node_modules/codemirror/lib/codemirror.css`,
|
||||
`${appPath}/node_modules/react-image-carousel/lib/css/main.min.css`
|
||||
]
|
||||
|
||||
/**
|
||||
* @param {Object} opts
|
||||
* @param {String} opts.fontFamily
|
||||
* @param {Numberl} opts.fontSize
|
||||
* @param {String} opts.codeBlockFontFamily
|
||||
* @param {String} opts.theme
|
||||
* @param {Boolean} [opts.lineNumber] Should show line number
|
||||
* @param {Boolean} [opts.scrollPastEnd]
|
||||
* @param {Boolean} [opts.allowCustomCSS] Should add custom css
|
||||
* @param {String} [opts.customCSS] Will be added to bottom, only if `opts.allowCustomCSS` is truthy
|
||||
* @returns {String}
|
||||
*/
|
||||
function buildStyle(opts) {
|
||||
const {
|
||||
fontFamily,
|
||||
fontSize,
|
||||
codeBlockFontFamily,
|
||||
lineNumber,
|
||||
scrollPastEnd,
|
||||
theme,
|
||||
allowCustomCSS,
|
||||
customCSS,
|
||||
RTL
|
||||
} = opts
|
||||
return `
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
src: url('${appPath}/resources/fonts/Lato-Regular.woff2') format('woff2'), /* Modern Browsers */
|
||||
url('${appPath}/resources/fonts/Lato-Regular.woff') format('woff'), /* Modern Browsers */
|
||||
url('${appPath}/resources/fonts/Lato-Regular.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
src: url('${appPath}/resources/fonts/Lato-Black.woff2') format('woff2'), /* Modern Browsers */
|
||||
url('${appPath}/resources/fonts/Lato-Black.woff') format('woff'), /* Modern Browsers */
|
||||
url('${appPath}/resources/fonts/Lato-Black.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Material Icons'),
|
||||
local('MaterialIcons-Regular'),
|
||||
url('${appPath}/resources/fonts/MaterialIcons-Regular.woff2') format('woff2'),
|
||||
url('${appPath}/resources/fonts/MaterialIcons-Regular.woff') format('woff'),
|
||||
url('${appPath}/resources/fonts/MaterialIcons-Regular.ttf') format('truetype');
|
||||
}
|
||||
|
||||
${markdownStyle}
|
||||
|
||||
body {
|
||||
font-family: '${fontFamily.join("','")}';
|
||||
font-size: ${fontSize}px;
|
||||
|
||||
${
|
||||
scrollPastEnd
|
||||
? `
|
||||
padding-bottom: 90vh;
|
||||
box-sizing: border-box;
|
||||
`
|
||||
: ''
|
||||
}
|
||||
${RTL ? 'direction: rtl;' : ''}
|
||||
${RTL ? 'text-align: right;' : ''}
|
||||
}
|
||||
@media print {
|
||||
body {
|
||||
padding-bottom: initial;
|
||||
}
|
||||
}
|
||||
code {
|
||||
font-family: '${codeBlockFontFamily.join("','")}';
|
||||
background-color: rgba(0,0,0,0.04);
|
||||
text-align: left;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
p code,
|
||||
li code,
|
||||
td code
|
||||
{
|
||||
padding: 2px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 5px;
|
||||
}
|
||||
[data-theme="default"] p code,
|
||||
[data-theme="default"] li code,
|
||||
[data-theme="default"] td code
|
||||
{
|
||||
background-color: #F4F4F4;
|
||||
border-color: #d9d9d9;
|
||||
color: inherit;
|
||||
}
|
||||
[data-theme="white"] p code,
|
||||
[data-theme="white"] li code,
|
||||
[data-theme="white"] td code
|
||||
{
|
||||
background-color: #F4F4F4;
|
||||
border-color: #d9d9d9;
|
||||
color: inherit;
|
||||
}
|
||||
[data-theme="dark"] p code,
|
||||
[data-theme="dark"] li code,
|
||||
[data-theme="dark"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="dracula"] p code,
|
||||
[data-theme="dracula"] li code,
|
||||
[data-theme="dracula"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="monokai"] p code,
|
||||
[data-theme="monokai"] li code,
|
||||
[data-theme="monokai"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="nord"] p code,
|
||||
[data-theme="nord"] li code,
|
||||
[data-theme="nord"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="solarized-dark"] p code,
|
||||
[data-theme="solarized-dark"] li code,
|
||||
[data-theme="solarized-dark"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="vulcan"] p code,
|
||||
[data-theme="vulcan"] li code,
|
||||
[data-theme="vulcan"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.lineNumber {
|
||||
${lineNumber && 'display: block !important;'}
|
||||
font-family: '${codeBlockFontFamily.join("','")}';
|
||||
}
|
||||
|
||||
.clipboardButton {
|
||||
color: rgba(147,147,149,0.8);;
|
||||
fill: rgba(147,147,149,1);;
|
||||
border-radius: 50%;
|
||||
margin: 0px 10px;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
outline: none;
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clipboardButton:hover {
|
||||
transition: 0.2s;
|
||||
color: #939395;
|
||||
fill: #939395;
|
||||
background-color: rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
border: none;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 1em 0 0.8em;
|
||||
}
|
||||
|
||||
h4, h5, h6 {
|
||||
margin: 1.1em 0 0.5em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding: 0.2em 0 0.2em;
|
||||
margin: 1em 0 8px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding: 0.2em 0 0.2em;
|
||||
margin: 1em 0 0.7em;
|
||||
}
|
||||
|
||||
body p {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body[data-theme="${theme}"] {
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
.clipboardButton {
|
||||
display: none
|
||||
}
|
||||
}
|
||||
|
||||
${allowCustomCSS ? customCSS : ''}
|
||||
`
|
||||
}
|
||||
|
||||
const scrollBarStyle = `
|
||||
::-webkit-scrollbar {
|
||||
${config.get().ui.showScrollBar ? '' : 'display: none;'}
|
||||
@@ -301,22 +73,6 @@ const scrollBarDarkStyle = `
|
||||
}
|
||||
`
|
||||
|
||||
const OSX = global.process.platform === 'darwin'
|
||||
|
||||
const defaultFontFamily = ['helvetica', 'arial', 'sans-serif']
|
||||
if (!OSX) {
|
||||
defaultFontFamily.unshift('Microsoft YaHei')
|
||||
defaultFontFamily.unshift('meiryo')
|
||||
}
|
||||
const defaultCodeBlockFontFamily = [
|
||||
'Monaco',
|
||||
'Menlo',
|
||||
'Ubuntu Mono',
|
||||
'Consolas',
|
||||
'source-code-pro',
|
||||
'monospace'
|
||||
]
|
||||
|
||||
// return the line number of the line that used to generate the specified element
|
||||
// return -1 if the line is not found
|
||||
function getSourceLineNumberByElement(element) {
|
||||
@@ -430,94 +186,15 @@ class MarkdownPreview extends React.Component {
|
||||
}
|
||||
|
||||
handleSaveAsMd() {
|
||||
this.exportAsDocument('md')
|
||||
}
|
||||
|
||||
htmlContentFormatter(noteContent, exportTasks, targetDir) {
|
||||
const {
|
||||
fontFamily,
|
||||
fontSize,
|
||||
codeBlockFontFamily,
|
||||
lineNumber,
|
||||
codeBlockTheme,
|
||||
scrollPastEnd,
|
||||
theme,
|
||||
allowCustomCSS,
|
||||
customCSS,
|
||||
RTL
|
||||
} = this.getStyleParams()
|
||||
|
||||
const inlineStyles = buildStyle({
|
||||
fontFamily,
|
||||
fontSize,
|
||||
codeBlockFontFamily,
|
||||
lineNumber,
|
||||
scrollPastEnd,
|
||||
theme,
|
||||
allowCustomCSS,
|
||||
customCSS,
|
||||
RTL
|
||||
})
|
||||
let body = this.refs.root.contentWindow.document.body.innerHTML
|
||||
body = attachmentManagement.fixLocalURLS(body, this.props.storagePath)
|
||||
const files = [this.getCodeThemeLink(codeBlockTheme), ...CSS_FILES]
|
||||
files.forEach(file => {
|
||||
if (global.process.platform === 'win32') {
|
||||
file = file.replace('file:///', '')
|
||||
} else {
|
||||
file = file.replace('file://', '')
|
||||
}
|
||||
exportTasks.push({
|
||||
src: file,
|
||||
dst: 'css'
|
||||
})
|
||||
})
|
||||
|
||||
let styles = ''
|
||||
files.forEach(file => {
|
||||
styles += `<link rel="stylesheet" href="../css/${path.basename(file)}">`
|
||||
})
|
||||
|
||||
return `<html>
|
||||
<head>
|
||||
<base href="file://${targetDir}/">
|
||||
<meta charset="UTF-8">
|
||||
<meta name = "viewport" content = "width = device-width, initial-scale = 1, maximum-scale = 1">
|
||||
<style id="style">${inlineStyles}</style>
|
||||
${styles}
|
||||
</head>
|
||||
<body>${body}</body>
|
||||
</html>`
|
||||
this.exportAsDocument('md', formatMarkdown(this.props))
|
||||
}
|
||||
|
||||
handleSaveAsHtml() {
|
||||
this.exportAsDocument('html', (noteContent, exportTasks, targetDir) =>
|
||||
Promise.resolve(
|
||||
this.htmlContentFormatter(noteContent, exportTasks, targetDir)
|
||||
)
|
||||
)
|
||||
this.exportAsDocument('html', formatHTML(this.props))
|
||||
}
|
||||
|
||||
handleSaveAsPdf() {
|
||||
this.exportAsDocument('pdf', (noteContent, exportTasks, targetDir) => {
|
||||
const printout = new remote.BrowserWindow({
|
||||
show: false,
|
||||
webPreferences: { webSecurity: false, javascript: false }
|
||||
})
|
||||
printout.loadURL(
|
||||
'data:text/html;charset=UTF-8,' +
|
||||
this.htmlContentFormatter(noteContent, exportTasks, targetDir)
|
||||
)
|
||||
return new Promise((resolve, reject) => {
|
||||
printout.webContents.on('did-finish-load', () => {
|
||||
printout.webContents.printToPDF({}, (err, data) => {
|
||||
if (err) reject(err)
|
||||
else resolve(data)
|
||||
printout.destroy()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
this.exportAsDocument('pdf', formatPDF(this.props))
|
||||
}
|
||||
|
||||
handlePrint() {
|
||||
@@ -525,18 +202,21 @@ class MarkdownPreview extends React.Component {
|
||||
}
|
||||
|
||||
exportAsDocument(fileType, contentFormatter) {
|
||||
const note = this.props.getNote()
|
||||
|
||||
const options = {
|
||||
defaultPath: filenamify(note.title, {
|
||||
replacement: '_'
|
||||
}),
|
||||
filters: [{ name: 'Documents', extensions: [fileType] }],
|
||||
properties: ['openFile', 'createDirectory']
|
||||
}
|
||||
|
||||
dialog.showSaveDialog(remote.getCurrentWindow(), options, filename => {
|
||||
if (filename) {
|
||||
const content = this.props.value
|
||||
const storage = this.props.storagePath
|
||||
const nodeKey = this.props.noteKey
|
||||
const storagePath = this.props.storagePath
|
||||
|
||||
exportNote(nodeKey, storage, content, filename, contentFormatter)
|
||||
exportNote(storagePath, note, filename, contentFormatter)
|
||||
.then(res => {
|
||||
dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
type: 'info',
|
||||
@@ -567,32 +247,6 @@ class MarkdownPreview extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Convert special characters between three ```
|
||||
* @param {string[]} splitWithCodeTag Array of HTML strings separated by three ```
|
||||
* @returns {string} HTML in which special characters between three ``` have been converted
|
||||
*/
|
||||
escapeHtmlCharactersInCodeTag(splitWithCodeTag) {
|
||||
for (let index = 0; index < splitWithCodeTag.length; index++) {
|
||||
const codeTagRequired =
|
||||
splitWithCodeTag[index] !== '```' && index < splitWithCodeTag.length - 1
|
||||
if (codeTagRequired) {
|
||||
splitWithCodeTag.splice(index + 1, 0, '```')
|
||||
}
|
||||
}
|
||||
let inCodeTag = false
|
||||
let result = ''
|
||||
for (let content of splitWithCodeTag) {
|
||||
if (content === '```') {
|
||||
inCodeTag = !inCodeTag
|
||||
} else if (inCodeTag) {
|
||||
content = escapeHtmlCharacters(content)
|
||||
}
|
||||
result += content
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
getScrollBarStyle() {
|
||||
const { theme } = this.props
|
||||
|
||||
@@ -743,47 +397,6 @@ class MarkdownPreview extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
getStyleParams() {
|
||||
const {
|
||||
fontSize,
|
||||
lineNumber,
|
||||
codeBlockTheme,
|
||||
scrollPastEnd,
|
||||
theme,
|
||||
allowCustomCSS,
|
||||
customCSS,
|
||||
RTL
|
||||
} = this.props
|
||||
let { fontFamily, codeBlockFontFamily } = this.props
|
||||
fontFamily =
|
||||
_.isString(fontFamily) && fontFamily.trim().length > 0
|
||||
? fontFamily
|
||||
.split(',')
|
||||
.map(fontName => fontName.trim())
|
||||
.concat(defaultFontFamily)
|
||||
: defaultFontFamily
|
||||
codeBlockFontFamily =
|
||||
_.isString(codeBlockFontFamily) && codeBlockFontFamily.trim().length > 0
|
||||
? codeBlockFontFamily
|
||||
.split(',')
|
||||
.map(fontName => fontName.trim())
|
||||
.concat(defaultCodeBlockFontFamily)
|
||||
: defaultCodeBlockFontFamily
|
||||
|
||||
return {
|
||||
fontFamily,
|
||||
fontSize,
|
||||
codeBlockFontFamily,
|
||||
lineNumber,
|
||||
codeBlockTheme,
|
||||
scrollPastEnd,
|
||||
theme,
|
||||
allowCustomCSS,
|
||||
customCSS,
|
||||
RTL
|
||||
}
|
||||
}
|
||||
|
||||
applyStyle() {
|
||||
const {
|
||||
fontFamily,
|
||||
@@ -796,12 +409,13 @@ class MarkdownPreview extends React.Component {
|
||||
allowCustomCSS,
|
||||
customCSS,
|
||||
RTL
|
||||
} = this.getStyleParams()
|
||||
} = getStyleParams(this.props)
|
||||
|
||||
this.getWindow().document.getElementById(
|
||||
'codeTheme'
|
||||
).href = this.getCodeThemeLink(codeBlockTheme)
|
||||
this.getWindow().document.getElementById('style').innerHTML = buildStyle({
|
||||
).href = getCodeThemeLink(codeBlockTheme)
|
||||
|
||||
this.getWindow().document.getElementById('style').innerHTML = buildStyle(
|
||||
fontFamily,
|
||||
fontSize,
|
||||
codeBlockFontFamily,
|
||||
@@ -811,15 +425,7 @@ class MarkdownPreview extends React.Component {
|
||||
allowCustomCSS,
|
||||
customCSS,
|
||||
RTL
|
||||
})
|
||||
}
|
||||
|
||||
getCodeThemeLink(name) {
|
||||
const theme = consts.THEMES.find(theme => theme.name === name)
|
||||
|
||||
return theme != null
|
||||
? theme.path
|
||||
: `${appPath}/node_modules/codemirror/theme/elegant.css`
|
||||
)
|
||||
}
|
||||
|
||||
rewriteIframe() {
|
||||
@@ -853,7 +459,7 @@ class MarkdownPreview extends React.Component {
|
||||
this.refs.root.contentWindow.document.body.setAttribute('data-theme', theme)
|
||||
if (sanitize === 'NONE') {
|
||||
const splitWithCodeTag = value.split('```')
|
||||
value = this.escapeHtmlCharactersInCodeTag(splitWithCodeTag)
|
||||
value = escapeHtmlCharactersInCodeTag(splitWithCodeTag)
|
||||
}
|
||||
const renderedHTML = this.markdown.render(value)
|
||||
attachmentManagement.migrateAttachments(value, storagePath, noteKey)
|
||||
@@ -916,13 +522,9 @@ class MarkdownPreview extends React.Component {
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
const opts = {}
|
||||
// if (this.props.theme === 'dark') {
|
||||
// opts['font-color'] = '#DDD'
|
||||
// opts['line-color'] = '#DDD'
|
||||
// opts['element-color'] = '#DDD'
|
||||
// opts['fill'] = '#3A404C'
|
||||
// }
|
||||
|
||||
_.forEach(
|
||||
this.refs.root.contentWindow.document.querySelectorAll('.flowchart'),
|
||||
el => {
|
||||
|
||||
@@ -336,6 +336,7 @@ class MarkdownSplitEditor extends React.Component {
|
||||
storageKey,
|
||||
noteKey,
|
||||
linesHighlighted,
|
||||
getNote,
|
||||
isStacking,
|
||||
RTL
|
||||
} = this.props
|
||||
@@ -470,6 +471,7 @@ class MarkdownSplitEditor extends React.Component {
|
||||
codeBlockTheme={config.preview.codeBlockTheme}
|
||||
codeBlockFontFamily={config.editor.fontFamily}
|
||||
lineNumber={config.preview.lineNumber}
|
||||
indentSize={editorIndentSize}
|
||||
scrollPastEnd={config.preview.scrollPastEnd}
|
||||
smartQuotes={config.preview.smartQuotes}
|
||||
smartArrows={config.preview.smartArrows}
|
||||
@@ -486,6 +488,8 @@ class MarkdownSplitEditor extends React.Component {
|
||||
customCSS={config.preview.customCSS}
|
||||
allowCustomCSS={config.preview.allowCustomCSS}
|
||||
lineThroughCheckbox={config.preview.lineThroughCheckbox}
|
||||
getNote={getNote}
|
||||
export={config.export}
|
||||
RTL={RTL}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@ import markdownItTocAndAnchor from '@hikerpig/markdown-it-toc-and-anchor'
|
||||
import _ from 'lodash'
|
||||
import ConfigManager from 'browser/main/lib/ConfigManager'
|
||||
import katex from 'katex'
|
||||
import { lastFindInArray } from './utils'
|
||||
import { escapeHtmlCharacters, lastFindInArray } from './utils'
|
||||
|
||||
function createGutter(str, firstLineNumber) {
|
||||
if (Number.isNaN(firstLineNumber)) firstLineNumber = 1
|
||||
@@ -31,7 +31,8 @@ class Markdown {
|
||||
html: true,
|
||||
xhtmlOut: true,
|
||||
breaks: config.preview.breaks,
|
||||
sanitize: 'STRICT'
|
||||
sanitize: 'STRICT',
|
||||
onFence: () => {}
|
||||
}
|
||||
|
||||
const updatedOptions = Object.assign(defaultOptions, options)
|
||||
@@ -266,22 +267,26 @@ class Markdown {
|
||||
token.parameters.format = 'yaml'
|
||||
}
|
||||
|
||||
updatedOptions.onFence('chart', token.parameters.format)
|
||||
|
||||
return `<pre class="fence" data-line="${token.map[0]}">
|
||||
<span class="filename">${token.fileName}</span>
|
||||
<div class="chart" data-height="${
|
||||
token.parameters.height
|
||||
}" data-format="${token.parameters.format || 'json'}">${
|
||||
<span class="filename">${token.fileName}</span>
|
||||
<div class="chart" data-height="${
|
||||
token.parameters.height
|
||||
}" data-format="${token.parameters.format || 'json'}">${
|
||||
token.content
|
||||
}</div>
|
||||
</pre>`
|
||||
</pre>`
|
||||
},
|
||||
flowchart: token => {
|
||||
updatedOptions.onFence('flowchart')
|
||||
|
||||
return `<pre class="fence" data-line="${token.map[0]}">
|
||||
<span class="filename">${token.fileName}</span>
|
||||
<div class="flowchart" data-height="${token.parameters.height}">${
|
||||
<span class="filename">${token.fileName}</span>
|
||||
<div class="flowchart" data-height="${token.parameters.height}">${
|
||||
token.content
|
||||
}</div>
|
||||
</pre>`
|
||||
</pre>`
|
||||
},
|
||||
gallery: token => {
|
||||
const content = token.content
|
||||
@@ -298,35 +303,41 @@ class Markdown {
|
||||
.join('\n')
|
||||
|
||||
return `<pre class="fence" data-line="${token.map[0]}">
|
||||
<span class="filename">${token.fileName}</span>
|
||||
<div class="gallery" data-autoplay="${
|
||||
token.parameters.autoplay
|
||||
}" data-height="${token.parameters.height}">${content}</div>
|
||||
</pre>`
|
||||
<span class="filename">${token.fileName}</span>
|
||||
<div class="gallery" data-autoplay="${
|
||||
token.parameters.autoplay
|
||||
}" data-height="${token.parameters.height}">${content}</div>
|
||||
</pre>`
|
||||
},
|
||||
mermaid: token => {
|
||||
updatedOptions.onFence('mermaid')
|
||||
|
||||
return `<pre class="fence" data-line="${token.map[0]}">
|
||||
<span class="filename">${token.fileName}</span>
|
||||
<div class="mermaid" data-height="${token.parameters.height}">${
|
||||
<span class="filename">${token.fileName}</span>
|
||||
<div class="mermaid" data-height="${token.parameters.height}">${
|
||||
token.content
|
||||
}</div>
|
||||
</pre>`
|
||||
</pre>`
|
||||
},
|
||||
sequence: token => {
|
||||
updatedOptions.onFence('sequence')
|
||||
|
||||
return `<pre class="fence" data-line="${token.map[0]}">
|
||||
<span class="filename">${token.fileName}</span>
|
||||
<div class="sequence" data-height="${token.parameters.height}">${
|
||||
<span class="filename">${token.fileName}</span>
|
||||
<div class="sequence" data-height="${token.parameters.height}">${
|
||||
token.content
|
||||
}</div>
|
||||
</pre>`
|
||||
</pre>`
|
||||
}
|
||||
},
|
||||
token => {
|
||||
updatedOptions.onFence('code', token.langType)
|
||||
|
||||
return `<pre class="code CodeMirror" data-line="${token.map[0]}">
|
||||
<span class="filename">${token.fileName}</span>
|
||||
${createGutter(token.content, token.firstLineNumber)}
|
||||
<code class="${token.langType}">${token.content}</code>
|
||||
</pre>`
|
||||
<span class="filename">${token.fileName}</span>
|
||||
${createGutter(token.content, token.firstLineNumber)}
|
||||
<code class="${token.langType}">${token.content}</code>
|
||||
</pre>`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -468,6 +479,16 @@ class Markdown {
|
||||
return true
|
||||
})
|
||||
|
||||
this.md.renderer.rules.code_inline = function(tokens, idx) {
|
||||
const token = tokens[idx]
|
||||
|
||||
return (
|
||||
'<code class="inline">' +
|
||||
escapeHtmlCharacters(token.content) +
|
||||
'</code>'
|
||||
)
|
||||
}
|
||||
|
||||
if (config.preview.smartArrows) {
|
||||
this.md.use(smartArrows)
|
||||
}
|
||||
|
||||
@@ -57,10 +57,11 @@ class MarkdownNoteDetail extends React.Component {
|
||||
|
||||
this.dispatchTimer = null
|
||||
|
||||
this.toggleLockButton = this.handleToggleLockButton.bind(this)
|
||||
this.generateToc = this.handleGenerateToc.bind(this)
|
||||
this.toggleLockButton = this.handleToggleLockButton.bind(this)
|
||||
this.handleUpdateContent = this.handleUpdateContent.bind(this)
|
||||
this.handleSwitchStackDirection = this.handleSwitchStackDirection.bind(this)
|
||||
this.getNote = this.getNote.bind(this)
|
||||
}
|
||||
|
||||
focus() {
|
||||
@@ -441,6 +442,10 @@ class MarkdownNoteDetail extends React.Component {
|
||||
this.updateNote(note)
|
||||
}
|
||||
|
||||
getNote() {
|
||||
return this.state.note
|
||||
}
|
||||
|
||||
renderEditor() {
|
||||
const { config, ignorePreviewPointerEvents } = this.props
|
||||
const { note, isStacking } = this.state
|
||||
@@ -456,8 +461,8 @@ class MarkdownNoteDetail extends React.Component {
|
||||
noteKey={note.key}
|
||||
linesHighlighted={note.linesHighlighted}
|
||||
onChange={this.handleUpdateContent}
|
||||
isLocked={this.state.isLocked}
|
||||
ignorePreviewPointerEvents={ignorePreviewPointerEvents}
|
||||
getNote={this.getNote}
|
||||
RTL={config.editor.rtlEnabled && this.state.RTL}
|
||||
/>
|
||||
)
|
||||
@@ -473,6 +478,7 @@ class MarkdownNoteDetail extends React.Component {
|
||||
linesHighlighted={note.linesHighlighted}
|
||||
onChange={this.handleUpdateContent}
|
||||
ignorePreviewPointerEvents={ignorePreviewPointerEvents}
|
||||
getNote={this.getNote}
|
||||
RTL={config.editor.rtlEnabled && this.state.RTL}
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -18,6 +18,7 @@ import { getLocales } from 'browser/lib/Languages'
|
||||
import applyShortcuts from 'browser/main/lib/shortcutManager'
|
||||
import { chooseTheme, applyTheme } from 'browser/main/lib/ThemeManager'
|
||||
import { push } from 'connected-react-router'
|
||||
import { ipcRenderer } from 'electron'
|
||||
|
||||
const path = require('path')
|
||||
const electron = require('electron')
|
||||
@@ -184,6 +185,7 @@ class Main extends React.Component {
|
||||
this.toggleMenuBarVisible.bind(this)
|
||||
)
|
||||
eventEmitter.on('dispatch:push', this.changeRoutePush.bind(this))
|
||||
eventEmitter.on('update', () => ipcRenderer.send('update-check', 'manual'))
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
||||
@@ -21,6 +21,7 @@ import Markdown from '../../lib/markdown'
|
||||
import i18n from 'browser/lib/i18n'
|
||||
import { confirmDeleteNote } from 'browser/lib/confirmDeleteNote'
|
||||
import context from 'browser/lib/context'
|
||||
import filenamify from 'filenamify'
|
||||
import queryString from 'query-string'
|
||||
|
||||
const { remote } = require('electron')
|
||||
@@ -634,6 +635,38 @@ class NoteList extends React.Component {
|
||||
this.selectNextNote()
|
||||
}
|
||||
|
||||
handleExportClick(e, note, fileType) {
|
||||
const options = {
|
||||
defaultPath: filenamify(note.title, {
|
||||
replacement: '_'
|
||||
}),
|
||||
filters: [{ name: 'Documents', extensions: [fileType] }],
|
||||
properties: ['openFile', 'createDirectory']
|
||||
}
|
||||
|
||||
dialog.showSaveDialog(remote.getCurrentWindow(), options, filename => {
|
||||
if (filename) {
|
||||
const { config } = this.props
|
||||
|
||||
dataApi
|
||||
.exportNoteAs(note, filename, fileType, config)
|
||||
.then(res => {
|
||||
dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
type: 'info',
|
||||
message: `Exported to ${filename}`
|
||||
})
|
||||
})
|
||||
.catch(err => {
|
||||
dialog.showErrorBox(
|
||||
'Export error',
|
||||
err ? err.message || err : 'Unexpected error during export'
|
||||
)
|
||||
throw err
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
handleNoteContextMenu(e, uniqueKey) {
|
||||
const { location } = this.props
|
||||
const { selectedNoteKeys } = this.state
|
||||
@@ -689,9 +722,40 @@ class NoteList extends React.Component {
|
||||
click: this.copyNoteLink.bind(this, note)
|
||||
}
|
||||
)
|
||||
|
||||
if (note.type === 'MARKDOWN_NOTE') {
|
||||
templates.push(
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export Note'),
|
||||
submenu: [
|
||||
{
|
||||
label: i18n.__('Export as Plain Text (.txt)'),
|
||||
click: e => this.handleExportClick(e, note, 'txt')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as Markdown (.md)'),
|
||||
click: e => this.handleExportClick(e, note, 'md')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as HTML (.html)'),
|
||||
click: e => this.handleExportClick(e, note, 'html')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as PDF (.pdf)'),
|
||||
click: e => this.handleExportClick(e, note, 'pdf')
|
||||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
|
||||
if (note.blog && note.blog.blogLink && note.blog.blogId) {
|
||||
templates.push(
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: updateLabel,
|
||||
click: this.publishMarkdown.bind(this)
|
||||
@@ -702,10 +766,15 @@ class NoteList extends React.Component {
|
||||
}
|
||||
)
|
||||
} else {
|
||||
templates.push({
|
||||
label: publishLabel,
|
||||
click: this.publishMarkdown.bind(this)
|
||||
})
|
||||
templates.push(
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: publishLabel,
|
||||
click: this.publishMarkdown.bind(this)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,12 +43,20 @@ class StorageItem extends React.Component {
|
||||
label: i18n.__('Export Storage'),
|
||||
submenu: [
|
||||
{
|
||||
label: i18n.__('Export as txt'),
|
||||
label: i18n.__('Export as Plain Text (.txt)'),
|
||||
click: e => this.handleExportStorageClick(e, 'txt')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as md'),
|
||||
label: i18n.__('Export as Markdown (.md)'),
|
||||
click: e => this.handleExportStorageClick(e, 'md')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as HTML (.html)'),
|
||||
click: e => this.handleExportStorageClick(e, 'html')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as PDF (.pdf)'),
|
||||
click: e => this.handleExportStorageClick(e, 'pdf')
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -97,14 +105,28 @@ class StorageItem extends React.Component {
|
||||
}
|
||||
dialog.showOpenDialog(remote.getCurrentWindow(), options, paths => {
|
||||
if (paths && paths.length === 1) {
|
||||
const { storage, dispatch } = this.props
|
||||
dataApi.exportStorage(storage.key, fileType, paths[0]).then(data => {
|
||||
dispatch({
|
||||
type: 'EXPORT_STORAGE',
|
||||
storage: data.storage,
|
||||
fileType: data.fileType
|
||||
const { storage, dispatch, config } = this.props
|
||||
dataApi
|
||||
.exportStorage(storage.key, fileType, paths[0], config)
|
||||
.then(data => {
|
||||
dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
type: 'info',
|
||||
message: `Exported to ${paths[0]}`
|
||||
})
|
||||
|
||||
dispatch({
|
||||
type: 'EXPORT_STORAGE',
|
||||
storage: data.storage,
|
||||
fileType: data.fileType
|
||||
})
|
||||
})
|
||||
.catch(error => {
|
||||
dialog.showErrorBox(
|
||||
'Export error',
|
||||
error ? error.message || error : 'Unexpected error during export'
|
||||
)
|
||||
throw error
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -166,12 +188,20 @@ class StorageItem extends React.Component {
|
||||
label: i18n.__('Export Folder'),
|
||||
submenu: [
|
||||
{
|
||||
label: i18n.__('Export as txt'),
|
||||
label: i18n.__('Export as Plain Text (.txt)'),
|
||||
click: e => this.handleExportFolderClick(e, folder, 'txt')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as md'),
|
||||
label: i18n.__('Export as Markdown (.md)'),
|
||||
click: e => this.handleExportFolderClick(e, folder, 'md')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as HTML (.html)'),
|
||||
click: e => this.handleExportFolderClick(e, folder, 'html')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as PDF (.pdf)'),
|
||||
click: e => this.handleExportFolderClick(e, folder, 'pdf')
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -202,30 +232,28 @@ class StorageItem extends React.Component {
|
||||
}
|
||||
dialog.showOpenDialog(remote.getCurrentWindow(), options, paths => {
|
||||
if (paths && paths.length === 1) {
|
||||
const { storage, dispatch } = this.props
|
||||
const { storage, dispatch, config } = this.props
|
||||
dataApi
|
||||
.exportFolder(storage.key, folder.key, fileType, paths[0])
|
||||
.exportFolder(storage.key, folder.key, fileType, paths[0], config)
|
||||
.then(data => {
|
||||
dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
type: 'info',
|
||||
message: `Exported to ${paths[0]}`
|
||||
})
|
||||
|
||||
dispatch({
|
||||
type: 'EXPORT_FOLDER',
|
||||
storage: data.storage,
|
||||
folderKey: data.folderKey,
|
||||
fileType: data.fileType
|
||||
})
|
||||
return data
|
||||
})
|
||||
.then(data => {
|
||||
dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
type: 'info',
|
||||
message: 'Exported to "' + data.exportDir + '"'
|
||||
})
|
||||
})
|
||||
.catch(err => {
|
||||
.catch(error => {
|
||||
dialog.showErrorBox(
|
||||
'Export error',
|
||||
err ? err.message || err : 'Unexpected error during export'
|
||||
error ? error.message || error : 'Unexpected error during export'
|
||||
)
|
||||
throw err
|
||||
throw error
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -26,6 +26,8 @@ import { confirmDeleteNote } from 'browser/lib/confirmDeleteNote'
|
||||
import ColorPicker from 'browser/components/ColorPicker'
|
||||
import { every, sortBy } from 'lodash'
|
||||
|
||||
const { dialog } = remote
|
||||
|
||||
function matchActiveTags(tags, activeTags) {
|
||||
return every(activeTags, v => tags.indexOf(v) >= 0)
|
||||
}
|
||||
@@ -63,15 +65,12 @@ class SideNav extends React.Component {
|
||||
}
|
||||
|
||||
deleteTag(tag) {
|
||||
const selectedButton = remote.dialog.showMessageBox(
|
||||
remote.getCurrentWindow(),
|
||||
{
|
||||
type: 'warning',
|
||||
message: i18n.__('Confirm tag deletion'),
|
||||
detail: i18n.__('This will permanently remove this tag.'),
|
||||
buttons: [i18n.__('Confirm'), i18n.__('Cancel')]
|
||||
}
|
||||
)
|
||||
const selectedButton = dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
type: 'warning',
|
||||
message: i18n.__('Confirm tag deletion'),
|
||||
detail: i18n.__('This will permanently remove this tag.'),
|
||||
buttons: [i18n.__('Confirm'), i18n.__('Cancel')]
|
||||
})
|
||||
|
||||
if (selectedButton === 0) {
|
||||
const {
|
||||
@@ -155,28 +154,80 @@ class SideNav extends React.Component {
|
||||
}
|
||||
|
||||
handleTagContextMenu(e, tag) {
|
||||
const menu = []
|
||||
context.popup([
|
||||
{
|
||||
label: i18n.__('Rename Tag'),
|
||||
click: this.handleRenameTagClick.bind(this, tag)
|
||||
},
|
||||
{
|
||||
label: i18n.__('Customize Color'),
|
||||
click: this.displayColorPicker.bind(
|
||||
this,
|
||||
tag,
|
||||
e.target.getBoundingClientRect()
|
||||
)
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export Tag'),
|
||||
submenu: [
|
||||
{
|
||||
label: i18n.__('Export as Plain Text (.txt)'),
|
||||
click: e => this.handleExportTagClick(e, tag, 'txt')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as Markdown (.md)'),
|
||||
click: e => this.handleExportTagClick(e, tag, 'md')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as HTML (.html)'),
|
||||
click: e => this.handleExportTagClick(e, tag, 'html')
|
||||
},
|
||||
{
|
||||
label: i18n.__('Export as PDF (.pdf)'),
|
||||
click: e => this.handleExportTagClick(e, tag, 'pdf')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: i18n.__('Delete Tag'),
|
||||
click: this.deleteTag.bind(this, tag)
|
||||
}
|
||||
])
|
||||
}
|
||||
|
||||
menu.push({
|
||||
label: i18n.__('Delete Tag'),
|
||||
click: this.deleteTag.bind(this, tag)
|
||||
handleExportTagClick(e, tag, fileType) {
|
||||
const options = {
|
||||
properties: ['openDirectory', 'createDirectory'],
|
||||
buttonLabel: i18n.__('Select directory'),
|
||||
title: i18n.__('Select a folder to export the files to'),
|
||||
multiSelections: false
|
||||
}
|
||||
dialog.showOpenDialog(remote.getCurrentWindow(), options, paths => {
|
||||
if (paths && paths.length === 1) {
|
||||
const { data, config } = this.props
|
||||
dataApi
|
||||
.exportTag(data, tag, fileType, paths[0], config)
|
||||
.then(data => {
|
||||
dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
type: 'info',
|
||||
message: `Exported to ${paths[0]}`
|
||||
})
|
||||
})
|
||||
.catch(error => {
|
||||
dialog.showErrorBox(
|
||||
'Export error',
|
||||
error ? error.message || error : 'Unexpected error during export'
|
||||
)
|
||||
throw error
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
menu.push({
|
||||
label: i18n.__('Customize Color'),
|
||||
click: this.displayColorPicker.bind(
|
||||
this,
|
||||
tag,
|
||||
e.target.getBoundingClientRect()
|
||||
)
|
||||
})
|
||||
|
||||
menu.push({
|
||||
label: i18n.__('Rename Tag'),
|
||||
click: this.handleRenameTagClick.bind(this, tag)
|
||||
})
|
||||
|
||||
context.popup(menu)
|
||||
}
|
||||
|
||||
dismissColorPicker() {
|
||||
@@ -330,6 +381,7 @@ class SideNav extends React.Component {
|
||||
dispatch={dispatch}
|
||||
onSortEnd={this.onSortEnd.bind(this)(storage)}
|
||||
useDragHandle
|
||||
config={config}
|
||||
/>
|
||||
)
|
||||
})
|
||||
|
||||
@@ -12,6 +12,7 @@ import DevTools from './DevTools'
|
||||
require('./lib/ipcClient')
|
||||
require('../lib/customMeta')
|
||||
import i18n from 'browser/lib/i18n'
|
||||
import ConfigManager from './lib/ConfigManager'
|
||||
|
||||
const electron = require('electron')
|
||||
|
||||
@@ -107,6 +108,22 @@ function updateApp() {
|
||||
}
|
||||
}
|
||||
|
||||
function downloadUpdate() {
|
||||
const index = dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
type: 'warning',
|
||||
message: i18n.__('Update Boostnote'),
|
||||
detail: i18n.__('New Boostnote is ready to be downloaded.'),
|
||||
buttons: [i18n.__('Download now'), i18n.__('Ignore updates')]
|
||||
})
|
||||
|
||||
if (index === 0) {
|
||||
ipcRenderer.send('update-download-confirm')
|
||||
} else if (index === 1) {
|
||||
ipcRenderer.send('update-cancel')
|
||||
ConfigManager.set({ autoUpdateEnabled: false })
|
||||
}
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
<Provider store={store}>
|
||||
<ConnectedRouter history={history}>
|
||||
@@ -147,8 +164,12 @@ ReactDOM.render(
|
||||
})
|
||||
|
||||
ipcRenderer.on('update-found', function() {
|
||||
notify('Update found!', {
|
||||
body: 'Preparing to update...'
|
||||
downloadUpdate()
|
||||
})
|
||||
|
||||
ipcRenderer.on('update-not-found', function(_, msg) {
|
||||
notify('Update not found!', {
|
||||
body: msg
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ const DEFAULT_MARKDOWN_LINT_CONFIG = `{
|
||||
|
||||
const DEFAULT_CSS_CONFIG = `
|
||||
/* Drop Your Custom CSS Code Here */
|
||||
[data-theme="default"] p code,
|
||||
[data-theme="default"] li code,
|
||||
[data-theme="default"] td code
|
||||
[data-theme="default"] p code.inline,
|
||||
[data-theme="default"] li code.inline,
|
||||
[data-theme="default"] td code.inline
|
||||
{
|
||||
padding: 2px;
|
||||
border-width: 1px;
|
||||
@@ -144,6 +144,11 @@ export const DEFAULT_CONFIG = {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
export: {
|
||||
metadata: 'DONT_EXPORT', // 'DONT_EXPORT', 'MERGE_HEADER', 'MERGE_VARIABLE'
|
||||
variable: 'boostnote',
|
||||
prefixAttachmentFolder: false
|
||||
},
|
||||
coloredTags: {},
|
||||
wakatime: {
|
||||
key: null
|
||||
|
||||
@@ -706,14 +706,15 @@ function replaceNoteKeyWithNewNoteKey(noteContent, oldNoteKey, newNoteKey) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Deletes all :storage and noteKey references from the given input.
|
||||
* @param input Input in which the references should be deleted
|
||||
* @description replace all :storage references with given destination folder.
|
||||
* @param input Input in which the references should be replaced
|
||||
* @param noteKey Key of the current note
|
||||
* @param destinationFolder Destination folder of the attachements
|
||||
* @returns {String} Input without the references
|
||||
*/
|
||||
function removeStorageAndNoteReferences(input, noteKey) {
|
||||
function replaceStorageReferences(input, noteKey, destinationFolder) {
|
||||
return input.replace(
|
||||
new RegExp('/?' + STORAGE_FOLDER_PLACEHOLDER + '.*?("|\\))', 'g'),
|
||||
new RegExp('/?' + STORAGE_FOLDER_PLACEHOLDER + '[^"\\)<\\s]+', 'g'),
|
||||
function(match) {
|
||||
return match
|
||||
.replace(new RegExp(mdurl.encode(path.win32.sep), 'g'), path.posix.sep)
|
||||
@@ -735,7 +736,7 @@ function removeStorageAndNoteReferences(input, noteKey) {
|
||||
')?',
|
||||
'g'
|
||||
),
|
||||
DESTINATION_FOLDER
|
||||
destinationFolder
|
||||
)
|
||||
}
|
||||
)
|
||||
@@ -1101,8 +1102,8 @@ module.exports = {
|
||||
getAttachmentsInMarkdownContent,
|
||||
getAbsolutePathsOfAttachmentsInContent,
|
||||
importAttachments,
|
||||
removeStorageAndNoteReferences,
|
||||
removeAttachmentsByPaths,
|
||||
replaceStorageReferences,
|
||||
deleteAttachmentFolder,
|
||||
deleteAttachmentsNotPresentInNote,
|
||||
getAttachmentsPathAndStatus,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
import fs from 'fs'
|
||||
import fx from 'fs-extra'
|
||||
import path from 'path'
|
||||
|
||||
/**
|
||||
* @description Copy a file from source to destination
|
||||
@@ -14,7 +15,8 @@ function copyFile(srcPath, dstPath) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const dstFolder = path.dirname(dstPath)
|
||||
if (!fs.existsSync(dstFolder)) fs.mkdirSync(dstFolder)
|
||||
|
||||
fx.ensureDirSync(dstFolder)
|
||||
|
||||
const input = fs.createReadStream(decodeURI(srcPath))
|
||||
const output = fs.createWriteStream(dstPath)
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
import { findStorage } from 'browser/lib/findStorage'
|
||||
import resolveStorageData from './resolveStorageData'
|
||||
import resolveStorageNotes from './resolveStorageNotes'
|
||||
import getFilename from './getFilename'
|
||||
import exportNote from './exportNote'
|
||||
import filenamify from 'filenamify'
|
||||
import * as path from 'path'
|
||||
import getContentFormatter from './getContentFormatter'
|
||||
|
||||
/**
|
||||
* @param {String} storageKey
|
||||
* @param {String} folderKey
|
||||
* @param {String} fileType
|
||||
* @param {String} exportDir
|
||||
* @param {Object} config
|
||||
*
|
||||
* @return {Object}
|
||||
* ```
|
||||
@@ -22,7 +23,7 @@ import * as path from 'path'
|
||||
* ```
|
||||
*/
|
||||
|
||||
function exportFolder(storageKey, folderKey, fileType, exportDir) {
|
||||
function exportFolder(storageKey, folderKey, fileType, exportDir, config) {
|
||||
let targetStorage
|
||||
try {
|
||||
targetStorage = findStorage(storageKey)
|
||||
@@ -30,39 +31,34 @@ function exportFolder(storageKey, folderKey, fileType, exportDir) {
|
||||
return Promise.reject(e)
|
||||
}
|
||||
|
||||
const deduplicator = {}
|
||||
|
||||
return resolveStorageData(targetStorage)
|
||||
.then(function assignNotes(storage) {
|
||||
return resolveStorageNotes(storage).then(notes => {
|
||||
return {
|
||||
storage,
|
||||
notes
|
||||
}
|
||||
})
|
||||
.then(storage => {
|
||||
return resolveStorageNotes(storage).then(notes => ({
|
||||
storage,
|
||||
notes: notes.filter(
|
||||
note =>
|
||||
note.folder === folderKey &&
|
||||
!note.isTrashed &&
|
||||
note.type === 'MARKDOWN_NOTE'
|
||||
)
|
||||
}))
|
||||
})
|
||||
.then(function exportNotes(data) {
|
||||
const { storage, notes } = data
|
||||
.then(({ storage, notes }) => {
|
||||
const contentFormatter = getContentFormatter(storage, fileType, config)
|
||||
|
||||
return Promise.all(
|
||||
notes
|
||||
.filter(
|
||||
note =>
|
||||
note.folder === folderKey &&
|
||||
note.isTrashed === false &&
|
||||
note.type === 'MARKDOWN_NOTE'
|
||||
notes.map(note => {
|
||||
const targetPath = getFilename(
|
||||
note,
|
||||
fileType,
|
||||
exportDir,
|
||||
deduplicator
|
||||
)
|
||||
.map(note => {
|
||||
const notePath = path.join(
|
||||
exportDir,
|
||||
`${filenamify(note.title, { replacement: '_' })}.${fileType}`
|
||||
)
|
||||
return exportNote(
|
||||
note.key,
|
||||
storage.path,
|
||||
note.content,
|
||||
notePath,
|
||||
null
|
||||
)
|
||||
})
|
||||
|
||||
return exportNote(storage.key, note, targetPath, contentFormatter)
|
||||
})
|
||||
).then(() => ({
|
||||
storage,
|
||||
folderKey,
|
||||
|
||||
@@ -4,58 +4,35 @@ import { findStorage } from 'browser/lib/findStorage'
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const attachmentManagement = require('./attachmentManagement')
|
||||
|
||||
/**
|
||||
* Export note together with attachments
|
||||
*
|
||||
* If attachments are stored in the storage, creates 'attachments' subfolder in target directory
|
||||
* and copies attachments to it. Changes links to images in the content of the note
|
||||
*
|
||||
* @param {String} nodeKey key of the node that should be exported
|
||||
* @param {String} storageKey or storage path
|
||||
* @param {String} noteContent Content to export
|
||||
* @param {Object} note Note to export
|
||||
* @param {String} targetPath Path to exported file
|
||||
* @param {function} outputFormatter
|
||||
* @return {Promise.<*[]>}
|
||||
*/
|
||||
function exportNote(
|
||||
nodeKey,
|
||||
storageKey,
|
||||
noteContent,
|
||||
targetPath,
|
||||
outputFormatter
|
||||
) {
|
||||
function exportNote(storageKey, note, targetPath, outputFormatter) {
|
||||
const storagePath = path.isAbsolute(storageKey)
|
||||
? storageKey
|
||||
: findStorage(storageKey).path
|
||||
|
||||
const exportTasks = []
|
||||
|
||||
if (!storagePath) {
|
||||
throw new Error('Storage path is not found')
|
||||
}
|
||||
const attachmentsAbsolutePaths = attachmentManagement.getAbsolutePathsOfAttachmentsInContent(
|
||||
noteContent,
|
||||
storagePath
|
||||
)
|
||||
attachmentsAbsolutePaths.forEach(attachment => {
|
||||
exportTasks.push({
|
||||
src: attachment,
|
||||
dst: attachmentManagement.DESTINATION_FOLDER
|
||||
})
|
||||
})
|
||||
|
||||
let exportedData = attachmentManagement.removeStorageAndNoteReferences(
|
||||
noteContent,
|
||||
nodeKey
|
||||
const exportedData = Promise.resolve(
|
||||
outputFormatter
|
||||
? outputFormatter(note, targetPath, exportTasks)
|
||||
: note.content
|
||||
)
|
||||
|
||||
if (outputFormatter) {
|
||||
exportedData = outputFormatter(exportedData, exportTasks, targetPath)
|
||||
} else {
|
||||
exportedData = Promise.resolve(exportedData)
|
||||
}
|
||||
|
||||
const tasks = prepareTasks(exportTasks, storagePath, path.dirname(targetPath))
|
||||
|
||||
return Promise.all(tasks.map(task => copyFile(task.src, task.dst)))
|
||||
@@ -63,9 +40,9 @@ function exportNote(
|
||||
.then(data => {
|
||||
return saveToFile(data, targetPath)
|
||||
})
|
||||
.catch(err => {
|
||||
.catch(error => {
|
||||
rollbackExport(tasks)
|
||||
throw err
|
||||
throw error
|
||||
})
|
||||
}
|
||||
|
||||
@@ -107,14 +84,14 @@ function rollbackExport(tasks) {
|
||||
}
|
||||
|
||||
if (fs.existsSync(fullpath)) {
|
||||
fs.unlink(fullpath)
|
||||
fs.unlinkSync(fullpath)
|
||||
folders.add(path.dirname(fullpath))
|
||||
}
|
||||
})
|
||||
|
||||
folders.forEach(folder => {
|
||||
if (fs.readdirSync(folder).length === 0) {
|
||||
fs.rmdir(folder)
|
||||
fs.rmdirSync(folder)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
19
browser/main/lib/dataApi/exportNoteAs.js
Normal file
19
browser/main/lib/dataApi/exportNoteAs.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import { findStorage } from 'browser/lib/findStorage'
|
||||
import exportNote from './exportNote'
|
||||
import getContentFormatter from './getContentFormatter'
|
||||
|
||||
/**
|
||||
* @param {Object} note
|
||||
* @param {String} filename
|
||||
* @param {String} fileType
|
||||
* @param {Object} config
|
||||
*/
|
||||
|
||||
function exportNoteAs(note, filename, fileType, config) {
|
||||
const storage = findStorage(note.storage)
|
||||
const contentFormatter = getContentFormatter(storage, fileType, config)
|
||||
|
||||
return exportNote(storage.key, note, filename, contentFormatter)
|
||||
}
|
||||
|
||||
module.exports = exportNoteAs
|
||||
@@ -2,13 +2,17 @@ import { findStorage } from 'browser/lib/findStorage'
|
||||
import resolveStorageData from './resolveStorageData'
|
||||
import resolveStorageNotes from './resolveStorageNotes'
|
||||
import filenamify from 'filenamify'
|
||||
import * as path from 'path'
|
||||
import * as fs from 'fs'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
import exportNote from './exportNote'
|
||||
import getContentFormatter from './getContentFormatter'
|
||||
import getFilename from './getFilename'
|
||||
|
||||
/**
|
||||
* @param {String} storageKey
|
||||
* @param {String} fileType
|
||||
* @param {String} exportDir
|
||||
* @param {Object} config
|
||||
*
|
||||
* @return {Object}
|
||||
* ```
|
||||
@@ -20,7 +24,7 @@ import * as fs from 'fs'
|
||||
* ```
|
||||
*/
|
||||
|
||||
function exportStorage(storageKey, fileType, exportDir) {
|
||||
function exportStorage(storageKey, fileType, exportDir, config) {
|
||||
let targetStorage
|
||||
try {
|
||||
targetStorage = findStorage(storageKey)
|
||||
@@ -29,39 +33,52 @@ function exportStorage(storageKey, fileType, exportDir) {
|
||||
}
|
||||
|
||||
return resolveStorageData(targetStorage)
|
||||
.then(storage =>
|
||||
resolveStorageNotes(storage).then(notes => ({ storage, notes }))
|
||||
)
|
||||
.then(function exportNotes(data) {
|
||||
const { storage, notes } = data
|
||||
.then(storage => {
|
||||
return resolveStorageNotes(storage).then(notes => ({
|
||||
storage,
|
||||
notes: notes.filter(
|
||||
note => !note.isTrashed && note.type === 'MARKDOWN_NOTE'
|
||||
)
|
||||
}))
|
||||
})
|
||||
.then(({ storage, notes }) => {
|
||||
const contentFormatter = getContentFormatter(storage, fileType, config)
|
||||
|
||||
const folderNamesMapping = {}
|
||||
const deduplicators = {}
|
||||
|
||||
storage.folders.forEach(folder => {
|
||||
const folderExportedDir = path.join(
|
||||
exportDir,
|
||||
filenamify(folder.name, { replacement: '_' })
|
||||
)
|
||||
|
||||
folderNamesMapping[folder.key] = folderExportedDir
|
||||
|
||||
// make sure directory exists
|
||||
try {
|
||||
fs.mkdirSync(folderExportedDir)
|
||||
} catch (e) {}
|
||||
})
|
||||
notes
|
||||
.filter(note => !note.isTrashed && note.type === 'MARKDOWN_NOTE')
|
||||
.forEach(markdownNote => {
|
||||
const folderExportedDir = folderNamesMapping[markdownNote.folder]
|
||||
const snippetName = `${filenamify(markdownNote.title, {
|
||||
replacement: '_'
|
||||
})}.${fileType}`
|
||||
const notePath = path.join(folderExportedDir, snippetName)
|
||||
fs.writeFileSync(notePath, markdownNote.content)
|
||||
})
|
||||
|
||||
return {
|
||||
deduplicators[folder.key] = {}
|
||||
})
|
||||
|
||||
return Promise.all(
|
||||
notes.map(note => {
|
||||
const targetPath = getFilename(
|
||||
note,
|
||||
fileType,
|
||||
folderNamesMapping[note.folder],
|
||||
deduplicators[note.folder]
|
||||
)
|
||||
|
||||
return exportNote(storage.key, note, targetPath, contentFormatter)
|
||||
})
|
||||
).then(() => ({
|
||||
storage,
|
||||
fileType,
|
||||
exportDir
|
||||
}
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
28
browser/main/lib/dataApi/exportTag.js
Normal file
28
browser/main/lib/dataApi/exportTag.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import exportNoteAs from './exportNoteAs'
|
||||
import getFilename from './getFilename'
|
||||
|
||||
/**
|
||||
* @param {Object} data
|
||||
* @param {String} tag
|
||||
* @param {String} fileType
|
||||
* @param {String} exportDir
|
||||
* @param {Object} config
|
||||
*/
|
||||
|
||||
function exportTag(data, tag, fileType, exportDir, config) {
|
||||
const notes = data.noteMap
|
||||
.map(note => note)
|
||||
.filter(note => note.tags.indexOf(tag) !== -1)
|
||||
|
||||
const deduplicator = {}
|
||||
|
||||
return Promise.all(
|
||||
notes.map(note => {
|
||||
const filename = getFilename(note, fileType, exportDir, deduplicator)
|
||||
|
||||
return exportNoteAs(note, filename, fileType, config)
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = exportTag
|
||||
796
browser/main/lib/dataApi/formatHTML.js
Normal file
796
browser/main/lib/dataApi/formatHTML.js
Normal file
@@ -0,0 +1,796 @@
|
||||
import path from 'path'
|
||||
import fileUrl from 'file-url'
|
||||
import fs from 'fs'
|
||||
import { remote } from 'electron'
|
||||
import consts from 'browser/lib/consts'
|
||||
import Markdown from 'browser/lib/markdown'
|
||||
import attachmentManagement from './attachmentManagement'
|
||||
import { version as codemirrorVersion } from 'codemirror/package.json'
|
||||
import { escapeHtmlCharacters } from 'browser/lib/utils'
|
||||
|
||||
const { app } = remote
|
||||
const appPath = fileUrl(
|
||||
process.env.NODE_ENV === 'production' ? app.getAppPath() : path.resolve()
|
||||
)
|
||||
|
||||
let markdownStyle = ''
|
||||
try {
|
||||
markdownStyle = require('!!css!stylus?sourceMap!../../../components/markdown.styl')[0][1]
|
||||
} catch (e) {}
|
||||
|
||||
export const CSS_FILES = [
|
||||
`${appPath}/node_modules/katex/dist/katex.min.css`,
|
||||
`${appPath}/node_modules/codemirror/lib/codemirror.css`,
|
||||
`${appPath}/node_modules/react-image-carousel/lib/css/main.min.css`
|
||||
]
|
||||
|
||||
const macos = global.process.platform === 'darwin'
|
||||
|
||||
const defaultFontFamily = ['helvetica', 'arial', 'sans-serif']
|
||||
if (!macos) {
|
||||
defaultFontFamily.unshift('Microsoft YaHei')
|
||||
defaultFontFamily.unshift('meiryo')
|
||||
}
|
||||
|
||||
const defaultCodeBlockFontFamily = [
|
||||
'Monaco',
|
||||
'Menlo',
|
||||
'Ubuntu Mono',
|
||||
'Consolas',
|
||||
'source-code-pro',
|
||||
'monospace'
|
||||
]
|
||||
|
||||
function unprefix(file) {
|
||||
if (global.process.platform === 'win32') {
|
||||
return file.replace('file:///', '')
|
||||
} else {
|
||||
return file.replace('file://', '')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ```
|
||||
* {
|
||||
* fontFamily,
|
||||
* fontSize,
|
||||
* lineNumber,
|
||||
* codeBlockFontFamily,
|
||||
* codeBlockTheme,
|
||||
* scrollPastEnd,
|
||||
* theme,
|
||||
* allowCustomCSS,
|
||||
* customCSS
|
||||
* smartQuotes,
|
||||
* sanitize,
|
||||
* breaks,
|
||||
* storagePath,
|
||||
* export,
|
||||
* indentSize
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export default function formatHTML(props) {
|
||||
const {
|
||||
fontFamily,
|
||||
fontSize,
|
||||
codeBlockFontFamily,
|
||||
lineNumber,
|
||||
codeBlockTheme,
|
||||
scrollPastEnd,
|
||||
theme,
|
||||
allowCustomCSS,
|
||||
customCSS
|
||||
} = getStyleParams(props)
|
||||
|
||||
const inlineStyles = buildStyle(
|
||||
fontFamily,
|
||||
fontSize,
|
||||
codeBlockFontFamily,
|
||||
lineNumber,
|
||||
scrollPastEnd,
|
||||
theme,
|
||||
allowCustomCSS,
|
||||
customCSS
|
||||
)
|
||||
|
||||
const { smartQuotes, sanitize, breaks } = props
|
||||
|
||||
let indentSize = parseInt(props.indentSize, 10)
|
||||
if (!(indentSize > 0 && indentSize < 132)) {
|
||||
indentSize = 4
|
||||
}
|
||||
|
||||
const files = [getCodeThemeLink(codeBlockTheme), ...CSS_FILES]
|
||||
|
||||
return function(note, targetPath, exportTasks) {
|
||||
const styles = files
|
||||
.map(file => `<link rel="stylesheet" href="css/${path.basename(file)}">`)
|
||||
.join('\n')
|
||||
|
||||
let inlineScripts = ''
|
||||
let scripts = ''
|
||||
|
||||
let decodeEntities = false
|
||||
function addDecodeEntities() {
|
||||
if (decodeEntities) {
|
||||
return
|
||||
}
|
||||
|
||||
decodeEntities = true
|
||||
|
||||
inlineScripts += `
|
||||
function decodeEntities (text) {
|
||||
var entities = [
|
||||
['apos', '\\''],
|
||||
['amp', '&'],
|
||||
['lt', '<'],
|
||||
['gt', '>'],
|
||||
['#63', '\\?'],
|
||||
['#36', '\\$']
|
||||
]
|
||||
|
||||
for (var i = 0, max = entities.length; i < max; ++i) {
|
||||
text = text.replace(new RegExp(\`&\${entities[i][0]};\`, 'g'), entities[i][1])
|
||||
}
|
||||
|
||||
return text
|
||||
}`
|
||||
}
|
||||
|
||||
let lodash = false
|
||||
function addLodash() {
|
||||
if (lodash) {
|
||||
return
|
||||
}
|
||||
|
||||
lodash = true
|
||||
|
||||
exportTasks.push({
|
||||
src: unprefix(`${appPath}/node_modules/lodash/lodash.min.js`),
|
||||
dst: 'js'
|
||||
})
|
||||
|
||||
scripts += `<script src="js/lodash.min.js"></script>`
|
||||
}
|
||||
|
||||
let raphael = false
|
||||
function addRaphael() {
|
||||
if (raphael) {
|
||||
return
|
||||
}
|
||||
|
||||
raphael = true
|
||||
|
||||
exportTasks.push({
|
||||
src: unprefix(`${appPath}/node_modules/raphael/raphael.min.js`),
|
||||
dst: 'js'
|
||||
})
|
||||
|
||||
scripts += `<script src="js/raphael.min.js"></script>`
|
||||
}
|
||||
|
||||
let yaml = false
|
||||
function addYAML() {
|
||||
if (yaml) {
|
||||
return
|
||||
}
|
||||
|
||||
yaml = true
|
||||
|
||||
exportTasks.push({
|
||||
src: unprefix(`${appPath}/node_modules/js-yaml/dist/js-yaml.min.js`),
|
||||
dst: 'js'
|
||||
})
|
||||
|
||||
scripts += `<script src="js/js-yaml.min.js"></script>`
|
||||
}
|
||||
|
||||
let chart = false
|
||||
function addChart() {
|
||||
if (chart) {
|
||||
return
|
||||
}
|
||||
|
||||
chart = true
|
||||
|
||||
addLodash()
|
||||
|
||||
exportTasks.push({
|
||||
src: unprefix(`${appPath}/node_modules/chart.js/dist/Chart.min.js`),
|
||||
dst: 'js'
|
||||
})
|
||||
|
||||
scripts += `<script src="js/Chart.min.js"></script>`
|
||||
|
||||
inlineScripts += `
|
||||
function displayCharts() {
|
||||
_.forEach(
|
||||
document.querySelectorAll('.chart'),
|
||||
el => {
|
||||
try {
|
||||
const format = el.attributes.getNamedItem('data-format').value
|
||||
const chartConfig = format === 'yaml' ? jsyaml.load(el.innerHTML) : JSON.parse(el.innerHTML)
|
||||
el.innerHTML = ''
|
||||
|
||||
const canvas = document.createElement('canvas')
|
||||
el.appendChild(canvas)
|
||||
|
||||
const height = el.attributes.getNamedItem('data-height')
|
||||
if (height && height.value !== 'undefined') {
|
||||
el.style.height = height.value + 'vh'
|
||||
canvas.height = height.value + 'vh'
|
||||
}
|
||||
|
||||
const chart = new Chart(canvas, chartConfig)
|
||||
} catch (e) {
|
||||
el.className = 'chart-error'
|
||||
el.innerHTML = 'chartjs diagram parse error: ' + e.message
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', displayCharts);
|
||||
`
|
||||
}
|
||||
|
||||
let codemirror = false
|
||||
function addCodeMirror() {
|
||||
if (codemirror) {
|
||||
return
|
||||
}
|
||||
|
||||
codemirror = true
|
||||
|
||||
addDecodeEntities()
|
||||
addLodash()
|
||||
|
||||
exportTasks.push(
|
||||
{
|
||||
src: unprefix(`${appPath}/node_modules/codemirror/lib/codemirror.js`),
|
||||
dst: 'js/codemirror'
|
||||
},
|
||||
{
|
||||
src: unprefix(`${appPath}/node_modules/codemirror/mode/meta.js`),
|
||||
dst: 'js/codemirror/mode'
|
||||
},
|
||||
{
|
||||
src: unprefix(
|
||||
`${appPath}/node_modules/codemirror/addon/mode/loadmode.js`
|
||||
),
|
||||
dst: 'js/codemirror/addon/mode'
|
||||
},
|
||||
{
|
||||
src: unprefix(
|
||||
`${appPath}/node_modules/codemirror/addon/runmode/runmode.js`
|
||||
),
|
||||
dst: 'js/codemirror/addon/runmode'
|
||||
}
|
||||
)
|
||||
|
||||
scripts += `
|
||||
<script src="js/codemirror/codemirror.js"></script>
|
||||
<script src="js/codemirror/mode/meta.js"></script>
|
||||
<script src="js/codemirror/addon/mode/loadmode.js"></script>
|
||||
<script src="js/codemirror/addon/runmode/runmode.js"></script>
|
||||
`
|
||||
|
||||
let className = `cm-s-${codeBlockTheme}`
|
||||
if (codeBlockTheme.indexOf('solarized') === 0) {
|
||||
const [refThema, color] = codeBlockTheme.split(' ')
|
||||
className = `cm-s-${refThema} cm-s-${color}`
|
||||
}
|
||||
|
||||
inlineScripts += `
|
||||
CodeMirror.modeURL = 'https://cdn.jsdelivr.net/npm/codemirror@${codemirrorVersion}/mode/%N/%N.js';
|
||||
|
||||
function displayCodeBlocks() {
|
||||
_.forEach(
|
||||
document.querySelectorAll('.code code'),
|
||||
el => {
|
||||
el.parentNode.className += ' ${className}'
|
||||
let syntax = CodeMirror.findModeByName(el.className)
|
||||
if (syntax == null) syntax = CodeMirror.findModeByName('Plain Text')
|
||||
CodeMirror.requireMode(syntax.mode, () => {
|
||||
const content = decodeEntities(el.innerHTML)
|
||||
el.innerHTML = ''
|
||||
CodeMirror.runMode(content, syntax.mime, el, {
|
||||
tabSize: ${indentSize}
|
||||
})
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', displayCodeBlocks);
|
||||
`
|
||||
}
|
||||
|
||||
let flowchart = false
|
||||
function addFlowchart() {
|
||||
if (flowchart) {
|
||||
return
|
||||
}
|
||||
|
||||
flowchart = true
|
||||
|
||||
addDecodeEntities()
|
||||
addLodash()
|
||||
addRaphael()
|
||||
|
||||
exportTasks.push({
|
||||
src: unprefix(
|
||||
`${appPath}/node_modules/flowchart.js/release/flowchart.min.js`
|
||||
),
|
||||
dst: 'js'
|
||||
})
|
||||
|
||||
scripts += `<script src="js/flowchart.min.js"></script>`
|
||||
|
||||
inlineScripts += `
|
||||
function displayFlowcharts() {
|
||||
_.forEach(
|
||||
document.querySelectorAll('.flowchart'),
|
||||
el => {
|
||||
try {
|
||||
const diagram = flowchart.parse(
|
||||
decodeEntities(el.innerHTML)
|
||||
)
|
||||
el.innerHTML = ''
|
||||
diagram.drawSVG(el)
|
||||
} catch (e) {
|
||||
el.className = 'flowchart-error'
|
||||
el.innerHTML = 'Flowchart parse error: ' + e.message
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', displayFlowcharts);
|
||||
`
|
||||
}
|
||||
|
||||
let mermaid = false
|
||||
function addMermaid() {
|
||||
if (mermaid) {
|
||||
return
|
||||
}
|
||||
|
||||
mermaid = true
|
||||
|
||||
addLodash()
|
||||
|
||||
exportTasks.push({
|
||||
src: unprefix(`${appPath}/node_modules/mermaid/dist/mermaid.min.js`),
|
||||
dst: 'js'
|
||||
})
|
||||
|
||||
scripts += `<script src="js/mermaid.min.js"></script>`
|
||||
|
||||
inlineScripts += `
|
||||
function displayMermaids() {
|
||||
_.forEach(
|
||||
document.querySelectorAll('.mermaid'),
|
||||
el => {
|
||||
const height = el.attributes.getNamedItem('data-height')
|
||||
if (height && height.value !== 'undefined') {
|
||||
el.style.height = height.value + 'vh'
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', displayMermaids);
|
||||
`
|
||||
}
|
||||
|
||||
let sequence = false
|
||||
function addSequence() {
|
||||
if (sequence) {
|
||||
return
|
||||
}
|
||||
|
||||
sequence = true
|
||||
|
||||
addDecodeEntities()
|
||||
addLodash()
|
||||
addRaphael()
|
||||
|
||||
exportTasks.push({
|
||||
src: unprefix(
|
||||
`${appPath}/node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.js`
|
||||
),
|
||||
dst: 'js'
|
||||
})
|
||||
|
||||
scripts += `<script src="js/sequence-diagram-min.js"></script>`
|
||||
|
||||
inlineScripts += `
|
||||
function displaySequences() {
|
||||
_.forEach(
|
||||
document.querySelectorAll('.sequence'),
|
||||
el => {
|
||||
try {
|
||||
const diagram = Diagram.parse(
|
||||
decodeEntities(el.innerHTML)
|
||||
)
|
||||
el.innerHTML = ''
|
||||
diagram.drawSVG(el, { theme: 'simple' })
|
||||
} catch (e) {
|
||||
el.className = 'sequence-error'
|
||||
el.innerHTML = 'Sequence diagram parse error: ' + e.message
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', displaySequences);
|
||||
`
|
||||
}
|
||||
|
||||
const modes = {}
|
||||
const markdown = new Markdown({
|
||||
typographer: smartQuotes,
|
||||
sanitize,
|
||||
breaks,
|
||||
onFence(type, mode) {
|
||||
if (type === 'chart') {
|
||||
addChart()
|
||||
|
||||
if (mode === 'yaml') {
|
||||
addYAML()
|
||||
}
|
||||
} else if (type === 'code') {
|
||||
addCodeMirror()
|
||||
|
||||
if (mode && modes[mode] !== true) {
|
||||
const file = unprefix(
|
||||
`${appPath}/node_modules/codemirror/mode/${mode}/${mode}.js`
|
||||
)
|
||||
|
||||
if (fs.existsSync(file)) {
|
||||
exportTasks.push({
|
||||
src: file,
|
||||
dst: `js/codemirror/mode/${mode}`
|
||||
})
|
||||
|
||||
modes[mode] = true
|
||||
}
|
||||
}
|
||||
} else if (type === 'flowchart') {
|
||||
addFlowchart()
|
||||
} else if (type === 'mermaid') {
|
||||
addMermaid()
|
||||
} else if (type === 'sequence') {
|
||||
addSequence()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let body = note.content
|
||||
|
||||
if (sanitize === 'NONE') {
|
||||
body = escapeHtmlCharactersInCodeTag(body.split('```'))
|
||||
}
|
||||
|
||||
body = markdown.render(note.content)
|
||||
|
||||
const attachmentsAbsolutePaths = attachmentManagement.getAbsolutePathsOfAttachmentsInContent(
|
||||
note.content,
|
||||
props.storagePath
|
||||
)
|
||||
|
||||
files.forEach(file => {
|
||||
exportTasks.push({
|
||||
src: unprefix(file),
|
||||
dst: 'css'
|
||||
})
|
||||
})
|
||||
|
||||
const destinationFolder = props.export.prefixAttachmentFolder
|
||||
? `${path.parse(targetPath).name} - ${
|
||||
attachmentManagement.DESTINATION_FOLDER
|
||||
}`
|
||||
: attachmentManagement.DESTINATION_FOLDER
|
||||
|
||||
attachmentsAbsolutePaths.forEach(attachment => {
|
||||
exportTasks.push({
|
||||
src: attachment,
|
||||
dst: destinationFolder
|
||||
})
|
||||
})
|
||||
|
||||
body = attachmentManagement.replaceStorageReferences(
|
||||
body,
|
||||
note.key,
|
||||
destinationFolder
|
||||
)
|
||||
|
||||
return `
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name = "viewport" content = "width = device-width, initial-scale = 1, maximum-scale = 1">
|
||||
<style id="style">${inlineStyles}</style>
|
||||
${styles}
|
||||
${scripts}
|
||||
<script>${inlineScripts}</script>
|
||||
</head>
|
||||
<body data-theme="${theme}">
|
||||
${body}
|
||||
</body>
|
||||
</html>
|
||||
`
|
||||
}
|
||||
}
|
||||
|
||||
export function getStyleParams(props) {
|
||||
const {
|
||||
fontSize,
|
||||
lineNumber,
|
||||
codeBlockTheme,
|
||||
scrollPastEnd,
|
||||
theme,
|
||||
allowCustomCSS,
|
||||
customCSS,
|
||||
RTL
|
||||
} = props
|
||||
|
||||
let { fontFamily, codeBlockFontFamily } = props
|
||||
|
||||
fontFamily =
|
||||
_.isString(fontFamily) && fontFamily.trim().length > 0
|
||||
? fontFamily
|
||||
.split(',')
|
||||
.map(fontName => fontName.trim())
|
||||
.concat(defaultFontFamily)
|
||||
: defaultFontFamily
|
||||
|
||||
codeBlockFontFamily =
|
||||
_.isString(codeBlockFontFamily) && codeBlockFontFamily.trim().length > 0
|
||||
? codeBlockFontFamily
|
||||
.split(',')
|
||||
.map(fontName => fontName.trim())
|
||||
.concat(defaultCodeBlockFontFamily)
|
||||
: defaultCodeBlockFontFamily
|
||||
|
||||
return {
|
||||
fontFamily,
|
||||
fontSize,
|
||||
codeBlockFontFamily,
|
||||
lineNumber,
|
||||
codeBlockTheme,
|
||||
scrollPastEnd,
|
||||
theme,
|
||||
allowCustomCSS,
|
||||
customCSS,
|
||||
RTL
|
||||
}
|
||||
}
|
||||
|
||||
export function getCodeThemeLink(name) {
|
||||
const theme = consts.THEMES.find(theme => theme.name === name)
|
||||
|
||||
return theme != null
|
||||
? theme.path
|
||||
: `${appPath}/node_modules/codemirror/theme/elegant.css`
|
||||
}
|
||||
|
||||
export function buildStyle(
|
||||
fontFamily,
|
||||
fontSize,
|
||||
codeBlockFontFamily,
|
||||
lineNumber,
|
||||
scrollPastEnd,
|
||||
theme,
|
||||
allowCustomCSS,
|
||||
customCSS,
|
||||
RTL
|
||||
) {
|
||||
return `
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
src: url('${appPath}/resources/fonts/Lato-Regular.woff2') format('woff2'), /* Modern Browsers */
|
||||
url('${appPath}/resources/fonts/Lato-Regular.woff') format('woff'), /* Modern Browsers */
|
||||
url('${appPath}/resources/fonts/Lato-Regular.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
src: url('${appPath}/resources/fonts/Lato-Black.woff2') format('woff2'), /* Modern Browsers */
|
||||
url('${appPath}/resources/fonts/Lato-Black.woff') format('woff'), /* Modern Browsers */
|
||||
url('${appPath}/resources/fonts/Lato-Black.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Material Icons'),
|
||||
local('MaterialIcons-Regular'),
|
||||
url('${appPath}/resources/fonts/MaterialIcons-Regular.woff2') format('woff2'),
|
||||
url('${appPath}/resources/fonts/MaterialIcons-Regular.woff') format('woff'),
|
||||
url('${appPath}/resources/fonts/MaterialIcons-Regular.ttf') format('truetype');
|
||||
}
|
||||
${markdownStyle}
|
||||
|
||||
body {
|
||||
font-family: '${fontFamily.join("','")}';
|
||||
font-size: ${fontSize}px;
|
||||
${scrollPastEnd && 'padding-bottom: 90vh;box-sizing: border-box;'}
|
||||
${RTL && 'direction: rtl;text-align: right;'}
|
||||
}
|
||||
@media print {
|
||||
body {
|
||||
padding-bottom: initial;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: '${codeBlockFontFamily.join("','")}';
|
||||
background-color: rgba(0,0,0,0.04);
|
||||
text-align: left;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
p code.inline,
|
||||
li code.inline,
|
||||
td code.inline
|
||||
{
|
||||
padding: 2px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 5px;
|
||||
}
|
||||
[data-theme="default"] p code.inline,
|
||||
[data-theme="default"] li code.inline,
|
||||
[data-theme="default"] td code.inline
|
||||
{
|
||||
background-color: #F4F4F4;
|
||||
border-color: #d9d9d9;
|
||||
color: inherit;
|
||||
}
|
||||
[data-theme="white"] p code.inline,
|
||||
[data-theme="white"] li code.inline,
|
||||
[data-theme="white"] td code.inline
|
||||
{
|
||||
background-color: #F4F4F4;
|
||||
border-color: #d9d9d9;
|
||||
color: inherit;
|
||||
}
|
||||
[data-theme="dark"] p code.inline,
|
||||
[data-theme="dark"] li code.inline,
|
||||
[data-theme="dark"] td code.inline
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="dracula"] p code.inline,
|
||||
[data-theme="dracula"] li code.inline,
|
||||
[data-theme="dracula"] td code.inline
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="monokai"] p code.inline,
|
||||
[data-theme="monokai"] li code.inline,
|
||||
[data-theme="monokai"] td code.inline
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="nord"] p code.inline,
|
||||
[data-theme="nord"] li code.inline,
|
||||
[data-theme="nord"] td code.inline
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="solarized-dark"] p code.inline,
|
||||
[data-theme="solarized-dark"] li code.inline,
|
||||
[data-theme="solarized-dark"] td code.inline
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="vulcan"] p code.inline,
|
||||
[data-theme="vulcan"] li code.inline,
|
||||
[data-theme="vulcan"] td code.inline
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.lineNumber {
|
||||
${lineNumber && 'display: block !important;'}
|
||||
font-family: '${codeBlockFontFamily.join("','")}';
|
||||
}
|
||||
|
||||
.clipboardButton {
|
||||
color: rgba(147,147,149,0.8);;
|
||||
fill: rgba(147,147,149,1);;
|
||||
border-radius: 50%;
|
||||
margin: 0px 10px;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
outline: none;
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clipboardButton:hover {
|
||||
transition: 0.2s;
|
||||
color: #939395;
|
||||
fill: #939395;
|
||||
background-color: rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
border: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding-bottom: 4px;
|
||||
margin: 1em 0 8px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding-bottom: 0.2em;
|
||||
margin: 1em 0 0.37em;
|
||||
}
|
||||
|
||||
body p {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body[data-theme="${theme}"] {
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
.clipboardButton {
|
||||
display: none
|
||||
}
|
||||
}
|
||||
|
||||
${allowCustomCSS ? customCSS : ''}
|
||||
`
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Convert special characters between three ```
|
||||
* @param {string[]} splitWithCodeTag Array of HTML strings separated by three ```
|
||||
* @returns {string} HTML in which special characters between three ``` have been converted
|
||||
*/
|
||||
export function escapeHtmlCharactersInCodeTag(splitWithCodeTag) {
|
||||
for (let index = 0; index < splitWithCodeTag.length; index++) {
|
||||
const codeTagRequired =
|
||||
splitWithCodeTag[index] !== '```' && index < splitWithCodeTag.length - 1
|
||||
if (codeTagRequired) {
|
||||
splitWithCodeTag.splice(index + 1, 0, '```')
|
||||
}
|
||||
}
|
||||
let inCodeTag = false
|
||||
let result = ''
|
||||
for (let content of splitWithCodeTag) {
|
||||
if (content === '```') {
|
||||
inCodeTag = !inCodeTag
|
||||
} else if (inCodeTag) {
|
||||
content = escapeHtmlCharacters(content)
|
||||
}
|
||||
result += content
|
||||
}
|
||||
return result
|
||||
}
|
||||
103
browser/main/lib/dataApi/formatMarkdown.js
Normal file
103
browser/main/lib/dataApi/formatMarkdown.js
Normal file
@@ -0,0 +1,103 @@
|
||||
import attachmentManagement from './attachmentManagement'
|
||||
import yaml from 'js-yaml'
|
||||
import path from 'path'
|
||||
|
||||
const delimiterRegExp = /^\-{3}/
|
||||
|
||||
/**
|
||||
* ```
|
||||
* {
|
||||
* storagePath,
|
||||
* export
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export default function formatMarkdown(props) {
|
||||
return function(note, targetPath, exportTasks) {
|
||||
let result = note.content
|
||||
|
||||
if (props.storagePath && note.key) {
|
||||
const attachmentsAbsolutePaths = attachmentManagement.getAbsolutePathsOfAttachmentsInContent(
|
||||
result,
|
||||
props.storagePath
|
||||
)
|
||||
|
||||
const destinationFolder = props.export.prefixAttachmentFolder
|
||||
? `${path.parse(targetPath).name} - ${
|
||||
attachmentManagement.DESTINATION_FOLDER
|
||||
}`
|
||||
: attachmentManagement.DESTINATION_FOLDER
|
||||
|
||||
attachmentsAbsolutePaths.forEach(attachment => {
|
||||
exportTasks.push({
|
||||
src: attachment,
|
||||
dst: destinationFolder
|
||||
})
|
||||
})
|
||||
|
||||
result = attachmentManagement.replaceStorageReferences(
|
||||
result,
|
||||
note.key,
|
||||
destinationFolder
|
||||
)
|
||||
}
|
||||
|
||||
if (props.export.metadata === 'MERGE_HEADER') {
|
||||
const metadata = getFrontMatter(result)
|
||||
|
||||
const values = Object.assign({}, note)
|
||||
delete values.content
|
||||
delete values.isTrashed
|
||||
|
||||
for (const key in values) {
|
||||
metadata[key] = values[key]
|
||||
}
|
||||
|
||||
result = replaceFrontMatter(result, metadata)
|
||||
} else if (props.export.metadata === 'MERGE_VARIABLE') {
|
||||
const metadata = getFrontMatter(result)
|
||||
|
||||
const values = Object.assign({}, note)
|
||||
delete values.content
|
||||
delete values.isTrashed
|
||||
|
||||
if (props.export.variable) {
|
||||
metadata[props.export.variable] = values
|
||||
} else {
|
||||
for (const key in values) {
|
||||
metadata[key] = values[key]
|
||||
}
|
||||
}
|
||||
|
||||
result = replaceFrontMatter(result, metadata)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
function getFrontMatter(markdown) {
|
||||
const lines = markdown.split('\n')
|
||||
|
||||
if (delimiterRegExp.test(lines[0])) {
|
||||
let line = 0
|
||||
while (++line < lines.length && !delimiterRegExp.test(lines[line])) {}
|
||||
|
||||
return yaml.load(lines.slice(1, line).join('\n')) || {}
|
||||
} else {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
|
||||
function replaceFrontMatter(markdown, metadata) {
|
||||
const lines = markdown.split('\n')
|
||||
|
||||
if (delimiterRegExp.test(lines[0])) {
|
||||
let line = 0
|
||||
while (++line < lines.length && !delimiterRegExp.test(lines[line])) {}
|
||||
|
||||
return `---\n${yaml.dump(metadata)}---\n${lines.slice(line + 1).join('\n')}`
|
||||
} else {
|
||||
return `---\n${yaml.dump(metadata)}---\n\n${markdown}`
|
||||
}
|
||||
}
|
||||
26
browser/main/lib/dataApi/formatPDF.js
Normal file
26
browser/main/lib/dataApi/formatPDF.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import formatHTML from './formatHTML'
|
||||
import { remote } from 'electron'
|
||||
|
||||
export default function formatPDF(props) {
|
||||
return function(note, targetPath, exportTasks) {
|
||||
const printout = new remote.BrowserWindow({
|
||||
show: false,
|
||||
webPreferences: { webSecurity: false, javascript: false }
|
||||
})
|
||||
|
||||
printout.loadURL(
|
||||
'data:text/html;charset=UTF-8,' +
|
||||
formatHTML(props)(note, targetPath, exportTasks)
|
||||
)
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
printout.webContents.on('did-finish-load', () => {
|
||||
printout.webContents.printToPDF({}, (err, data) => {
|
||||
if (err) reject(err)
|
||||
else resolve(data)
|
||||
printout.destroy()
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
58
browser/main/lib/dataApi/getContentFormatter.js
Normal file
58
browser/main/lib/dataApi/getContentFormatter.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import formatMarkdown from './formatMarkdown'
|
||||
import formatHTML from './formatHTML'
|
||||
import formatPDF from './formatPDF'
|
||||
|
||||
/**
|
||||
* @param {Object} storage
|
||||
* @param {String} fileType
|
||||
* @param {Object} config
|
||||
*/
|
||||
|
||||
export default function getContentFormatter(storage, fileType, config) {
|
||||
if (fileType === 'md') {
|
||||
return formatMarkdown({
|
||||
storagePath: storage.path,
|
||||
export: config.export
|
||||
})
|
||||
} else if (fileType === 'html') {
|
||||
return formatHTML({
|
||||
theme: config.ui.theme,
|
||||
fontSize: config.preview.fontSize,
|
||||
fontFamily: config.preview.fontFamily,
|
||||
codeBlockTheme: config.preview.codeBlockTheme,
|
||||
codeBlockFontFamily: config.editor.fontFamily,
|
||||
lineNumber: config.preview.lineNumber,
|
||||
indentSize: config.editor.indentSize,
|
||||
scrollPastEnd: config.preview.scrollPastEnd,
|
||||
smartQuotes: config.preview.smartQuotes,
|
||||
breaks: config.preview.breaks,
|
||||
sanitize: config.preview.sanitize,
|
||||
customCSS: config.preview.customCSS,
|
||||
allowCustomCSS: config.preview.allowCustomCSS,
|
||||
storagePath: storage.path,
|
||||
export: config.export,
|
||||
RTL: config.editor.rtlEnabled /* && this.state.RTL */
|
||||
})
|
||||
} else if (fileType === 'pdf') {
|
||||
return formatPDF({
|
||||
theme: config.ui.theme,
|
||||
fontSize: config.preview.fontSize,
|
||||
fontFamily: config.preview.fontFamily,
|
||||
codeBlockTheme: config.preview.codeBlockTheme,
|
||||
codeBlockFontFamily: config.editor.fontFamily,
|
||||
lineNumber: config.preview.lineNumber,
|
||||
indentSize: config.editor.indentSize,
|
||||
scrollPastEnd: config.preview.scrollPastEnd,
|
||||
smartQuotes: config.preview.smartQuotes,
|
||||
breaks: config.preview.breaks,
|
||||
sanitize: config.preview.sanitize,
|
||||
customCSS: config.preview.customCSS,
|
||||
allowCustomCSS: config.preview.allowCustomCSS,
|
||||
storagePath: storage.path,
|
||||
export: config.export,
|
||||
RTL: config.editor.rtlEnabled /* && this.state.RTL */
|
||||
})
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
37
browser/main/lib/dataApi/getFilename.js
Normal file
37
browser/main/lib/dataApi/getFilename.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import filenamify from 'filenamify'
|
||||
import i18n from 'browser/lib/i18n'
|
||||
import path from 'path'
|
||||
|
||||
/**
|
||||
* @param {Object} note
|
||||
* @param {String} fileType
|
||||
* @param {String} directory
|
||||
* @param {Object} deduplicator
|
||||
*
|
||||
* @return {String}
|
||||
*/
|
||||
|
||||
function getFilename(note, fileType, directory, deduplicator) {
|
||||
const basename = note.title
|
||||
? filenamify(note.title, { replacement: '_' })
|
||||
: i18n.__('Untitled')
|
||||
|
||||
if (deduplicator) {
|
||||
if (deduplicator[basename]) {
|
||||
const filename = path.join(
|
||||
directory,
|
||||
`${basename} (${deduplicator[basename]}).${fileType}`
|
||||
)
|
||||
|
||||
++deduplicator[basename]
|
||||
|
||||
return filename
|
||||
} else {
|
||||
deduplicator[basename] = 1
|
||||
}
|
||||
}
|
||||
|
||||
return path.join(directory, `${basename}.${fileType}`)
|
||||
}
|
||||
|
||||
module.exports = getFilename
|
||||
@@ -15,11 +15,14 @@ const dataApi = {
|
||||
updateNote: require('./updateNote'),
|
||||
deleteNote: require('./deleteNote'),
|
||||
moveNote: require('./moveNote'),
|
||||
exportNoteAs: require('./exportNoteAs'),
|
||||
migrateFromV5Storage: require('./migrateFromV5Storage'),
|
||||
createSnippet: require('./createSnippet'),
|
||||
deleteSnippet: require('./deleteSnippet'),
|
||||
updateSnippet: require('./updateSnippet'),
|
||||
fetchSnippet: require('./fetchSnippet'),
|
||||
exportTag: require('./exportTag'),
|
||||
getFilename: require('./getFilename'),
|
||||
|
||||
_migrateFromV6Storage: require('./migrateFromV6Storage'),
|
||||
_resolveStorageData: require('./resolveStorageData'),
|
||||
|
||||
184
browser/main/modals/PreferencesModal/ExportTab.js
Normal file
184
browser/main/modals/PreferencesModal/ExportTab.js
Normal file
@@ -0,0 +1,184 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
import CSSModules from 'browser/lib/CSSModules'
|
||||
import styles from './ConfigTab.styl'
|
||||
import ConfigManager from 'browser/main/lib/ConfigManager'
|
||||
import store from 'browser/main/store'
|
||||
import _ from 'lodash'
|
||||
import i18n from 'browser/lib/i18n'
|
||||
|
||||
const electron = require('electron')
|
||||
const ipc = electron.ipcRenderer
|
||||
|
||||
class ExportTab extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
config: props.config
|
||||
}
|
||||
}
|
||||
|
||||
clearMessage() {
|
||||
_.debounce(() => {
|
||||
this.setState({
|
||||
ExportAlert: null
|
||||
})
|
||||
}, 2000)()
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.handleSettingDone = () => {
|
||||
this.setState({
|
||||
ExportAlert: {
|
||||
type: 'success',
|
||||
message: i18n.__('Successfully applied!')
|
||||
}
|
||||
})
|
||||
}
|
||||
this.handleSettingError = err => {
|
||||
this.setState({
|
||||
ExportAlert: {
|
||||
type: 'error',
|
||||
message:
|
||||
err.message != null ? err.message : i18n.__('An error occurred!')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.oldExport = this.state.config.export
|
||||
|
||||
ipc.addListener('APP_SETTING_DONE', this.handleSettingDone)
|
||||
ipc.addListener('APP_SETTING_ERROR', this.handleSettingError)
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
ipc.removeListener('APP_SETTING_DONE', this.handleSettingDone)
|
||||
ipc.removeListener('APP_SETTING_ERROR', this.handleSettingError)
|
||||
}
|
||||
|
||||
handleSaveButtonClick(e) {
|
||||
const newConfig = {
|
||||
export: this.state.config.export
|
||||
}
|
||||
|
||||
ConfigManager.set(newConfig)
|
||||
|
||||
store.dispatch({
|
||||
type: 'SET_UI',
|
||||
config: newConfig
|
||||
})
|
||||
|
||||
this.clearMessage()
|
||||
this.props.haveToSave()
|
||||
}
|
||||
|
||||
handleExportChange(e) {
|
||||
const { config } = this.state
|
||||
|
||||
config.export = {
|
||||
metadata: this.refs.metadata.value,
|
||||
variable: !_.isNil(this.refs.variable)
|
||||
? this.refs.variable.value
|
||||
: config.export.variable,
|
||||
prefixAttachmentFolder: this.refs.prefixAttachmentFolder.checked
|
||||
}
|
||||
|
||||
this.setState({
|
||||
config
|
||||
})
|
||||
|
||||
if (_.isEqual(this.oldExport, config.export)) {
|
||||
this.props.haveToSave()
|
||||
} else {
|
||||
this.props.haveToSave({
|
||||
tab: 'Export',
|
||||
type: 'warning',
|
||||
message: i18n.__('Unsaved Changes!')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { config, ExportAlert } = this.state
|
||||
|
||||
const ExportAlertElement =
|
||||
ExportAlert != null ? (
|
||||
<p className={`alert ${ExportAlert.type}`}>{ExportAlert.message}</p>
|
||||
) : null
|
||||
|
||||
return (
|
||||
<div styleName='root'>
|
||||
<div styleName='group'>
|
||||
<div styleName='group-header'>{i18n.__('Export')}</div>
|
||||
|
||||
<div styleName='group-section'>
|
||||
<div styleName='group-section-label'>{i18n.__('Metadata')}</div>
|
||||
<div styleName='group-section-control'>
|
||||
<select
|
||||
value={config.export.metadata}
|
||||
onChange={e => this.handleExportChange(e)}
|
||||
ref='metadata'
|
||||
>
|
||||
<option value='DONT_EXPORT'>{i18n.__(`Don't export`)}</option>
|
||||
<option value='MERGE_HEADER'>
|
||||
{i18n.__('Merge with the header')}
|
||||
</option>
|
||||
<option value='MERGE_VARIABLE'>
|
||||
{i18n.__('Merge with a variable')}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{config.export.metadata === 'MERGE_VARIABLE' && (
|
||||
<div styleName='group-section'>
|
||||
<div styleName='group-section-label'>
|
||||
{i18n.__('Variable Name')}
|
||||
</div>
|
||||
<div styleName='group-section-control'>
|
||||
<input
|
||||
styleName='group-section-control-input'
|
||||
onChange={e => this.handleExportChange(e)}
|
||||
ref='variable'
|
||||
value={config.export.variable}
|
||||
type='text'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div styleName='group-checkBoxSection'>
|
||||
<label>
|
||||
<input
|
||||
onChange={e => this.handleExportChange(e)}
|
||||
checked={config.export.prefixAttachmentFolder}
|
||||
ref='prefixAttachmentFolder'
|
||||
type='checkbox'
|
||||
/>
|
||||
|
||||
{i18n.__('Prefix attachment folder')}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div styleName='group-control'>
|
||||
<button
|
||||
styleName='group-control-rightButton'
|
||||
onClick={e => this.handleSaveButtonClick(e)}
|
||||
>
|
||||
{i18n.__('Save')}
|
||||
</button>
|
||||
{ExportAlertElement}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
ExportTab.propTypes = {
|
||||
dispatch: PropTypes.func,
|
||||
haveToSave: PropTypes.func
|
||||
}
|
||||
|
||||
export default CSSModules(ExportTab, styles)
|
||||
@@ -16,25 +16,78 @@ class InfoTab extends React.Component {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
config: this.props.config
|
||||
config: this.props.config,
|
||||
subscriptionFormStatus: 'idle',
|
||||
subscriptionFormErrorMessage: null,
|
||||
subscriptionFormEmail: ''
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { autoUpdateEnabled, amaEnabled } = ConfigManager.get()
|
||||
|
||||
this.setState({ config: { autoUpdateEnabled, amaEnabled } })
|
||||
}
|
||||
|
||||
handleLinkClick(e) {
|
||||
shell.openExternal(e.currentTarget.href)
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
handleConfigChange(e) {
|
||||
const newConfig = { amaEnabled: this.refs.amaEnabled.checked }
|
||||
const newConfig = {
|
||||
amaEnabled: this.refs.amaEnabled.checked,
|
||||
autoUpdateEnabled: this.refs.autoUpdateEnabled.checked
|
||||
}
|
||||
|
||||
this.setState({ config: newConfig })
|
||||
return newConfig
|
||||
}
|
||||
|
||||
handleSubscriptionFormSubmit(e) {
|
||||
e.preventDefault()
|
||||
this.setState({
|
||||
subscriptionFormStatus: 'sending',
|
||||
subscriptionFormErrorMessage: null
|
||||
})
|
||||
|
||||
fetch(
|
||||
'https://boostmails.boostio.co/api/public/lists/5f434dccd05f3160b41c0d49/subscriptions',
|
||||
{
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ email: this.state.subscriptionFormEmail })
|
||||
}
|
||||
)
|
||||
.then(response => {
|
||||
if (response.status >= 400) {
|
||||
return response.text().then(text => {
|
||||
throw new Error(text)
|
||||
})
|
||||
}
|
||||
this.setState({
|
||||
subscriptionFormStatus: 'done'
|
||||
})
|
||||
})
|
||||
.catch(error => {
|
||||
this.setState({
|
||||
subscriptionFormStatus: 'idle',
|
||||
subscriptionFormErrorMessage: error.message
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
handleSubscriptionFormEmailChange(e) {
|
||||
this.setState({
|
||||
subscriptionFormEmail: e.target.value
|
||||
})
|
||||
}
|
||||
|
||||
handleSaveButtonClick(e) {
|
||||
const newConfig = {
|
||||
amaEnabled: this.state.config.amaEnabled
|
||||
}
|
||||
const newConfig = this.state.config
|
||||
|
||||
if (!newConfig.amaEnabled) {
|
||||
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('DISABLE_AMA')
|
||||
@@ -61,20 +114,17 @@ class InfoTab extends React.Component {
|
||||
})
|
||||
}
|
||||
|
||||
toggleAutoUpdate() {
|
||||
const newConfig = {
|
||||
autoUpdateEnabled: !this.state.config.autoUpdateEnabled
|
||||
}
|
||||
|
||||
this.setState({ config: newConfig })
|
||||
ConfigManager.set(newConfig)
|
||||
}
|
||||
|
||||
infoMessage() {
|
||||
const { amaMessage } = this.state
|
||||
return amaMessage ? <p styleName='policy-confirm'>{amaMessage}</p> : null
|
||||
}
|
||||
|
||||
handleAutoUpdateChange() {
|
||||
const { autoUpdateEnabled } = this.handleConfigChange()
|
||||
|
||||
ConfigManager.set({ autoUpdateEnabled })
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div styleName='root'>
|
||||
@@ -134,6 +184,40 @@ class InfoTab extends React.Component {
|
||||
|
||||
<hr />
|
||||
|
||||
<div styleName='group-header--sub'>Subscribe Update Notes</div>
|
||||
{this.state.subscriptionFormStatus === 'done' ? (
|
||||
<div>
|
||||
<blockquote color={{ color: 'green' }}>
|
||||
Thanks for the subscription!
|
||||
</blockquote>
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
{this.state.subscriptionFormErrorMessage != null && (
|
||||
<blockquote style={{ color: 'red' }}>
|
||||
{this.state.subscriptionFormErrorMessage}
|
||||
</blockquote>
|
||||
)}
|
||||
<form onSubmit={e => this.handleSubscriptionFormSubmit(e)}>
|
||||
<input
|
||||
styleName='subscription-email-input'
|
||||
placeholder='E-mail'
|
||||
type='email'
|
||||
onChange={e => this.handleSubscriptionFormEmailChange(e)}
|
||||
disabled={this.state.subscriptionFormStatus === 'sending'}
|
||||
/>
|
||||
<button
|
||||
styleName='subscription-submit-button'
|
||||
type='submit'
|
||||
disabled={this.state.subscriptionFormStatus === 'sending'}
|
||||
>
|
||||
Subscribe
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
)}
|
||||
<hr />
|
||||
|
||||
<div styleName='group-header--sub'>{i18n.__('About')}</div>
|
||||
|
||||
<div styleName='top'>
|
||||
@@ -181,7 +265,8 @@ class InfoTab extends React.Component {
|
||||
<label>
|
||||
<input
|
||||
type='checkbox'
|
||||
onChange={this.toggleAutoUpdate.bind(this)}
|
||||
ref='autoUpdateEnabled'
|
||||
onChange={() => this.handleAutoUpdateChange()}
|
||||
checked={this.state.config.autoUpdateEnabled}
|
||||
/>
|
||||
{i18n.__('Enable Auto Update')}
|
||||
|
||||
@@ -33,6 +33,35 @@
|
||||
.separate-line
|
||||
margin 40px 0
|
||||
|
||||
.subscription-email-input
|
||||
height 35px
|
||||
vertical-align middle
|
||||
width 200px
|
||||
font-size $tab--button-font-size
|
||||
border solid 1px $border-color
|
||||
border-radius 2px
|
||||
padding 0 5px
|
||||
margin-right 5px
|
||||
outline none
|
||||
&:disabled
|
||||
background-color $ui-input--disabled-backgroundColor
|
||||
|
||||
.subscription-submit-button
|
||||
margin-top 10px
|
||||
height 35px
|
||||
border-radius 2px
|
||||
border none
|
||||
background-color alpha(#1EC38B, 90%)
|
||||
padding-left 20px
|
||||
padding-right 20px
|
||||
text-decoration none
|
||||
color white
|
||||
font-weight 600
|
||||
font-size 16px
|
||||
&:hover
|
||||
background-color #1EC38B
|
||||
transition 0.2s
|
||||
|
||||
.policy-submit
|
||||
margin-top 10px
|
||||
height 35px
|
||||
|
||||
@@ -6,6 +6,7 @@ import UiTab from './UiTab'
|
||||
import InfoTab from './InfoTab'
|
||||
import Crowdfunding from './Crowdfunding'
|
||||
import StoragesTab from './StoragesTab'
|
||||
import ExportTab from './ExportTab'
|
||||
import SnippetTab from './SnippetTab'
|
||||
import PluginsTab from './PluginsTab'
|
||||
import Blog from './Blog'
|
||||
@@ -24,7 +25,8 @@ class Preferences extends React.Component {
|
||||
currentTab: 'STORAGES',
|
||||
UIAlert: '',
|
||||
HotkeyAlert: '',
|
||||
BlogAlert: ''
|
||||
BlogAlert: '',
|
||||
ExportAlert: ''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +83,15 @@ class Preferences extends React.Component {
|
||||
haveToSave={alert => this.setState({ BlogAlert: alert })}
|
||||
/>
|
||||
)
|
||||
case 'EXPORT':
|
||||
return (
|
||||
<ExportTab
|
||||
dispatch={dispatch}
|
||||
config={config}
|
||||
data={data}
|
||||
haveToSave={alert => this.setState({ ExportAlert: alert })}
|
||||
/>
|
||||
)
|
||||
case 'SNIPPET':
|
||||
return <SnippetTab dispatch={dispatch} config={config} data={data} />
|
||||
case 'PLUGINS':
|
||||
@@ -131,6 +142,11 @@ class Preferences extends React.Component {
|
||||
{ target: 'INFO', label: i18n.__('About') },
|
||||
{ target: 'CROWDFUNDING', label: i18n.__('Crowdfunding') },
|
||||
{ target: 'BLOG', label: i18n.__('Blog'), Blog: this.state.BlogAlert },
|
||||
{
|
||||
target: 'EXPORT',
|
||||
label: i18n.__('Export'),
|
||||
Export: this.state.ExportAlert
|
||||
},
|
||||
{ target: 'SNIPPET', label: i18n.__('Snippets') },
|
||||
{ target: 'PLUGINS', label: i18n.__('Plugins') }
|
||||
]
|
||||
|
||||
@@ -187,7 +187,7 @@ module.exports = function(grunt) {
|
||||
}
|
||||
|
||||
ChildProcess.exec(
|
||||
`codesign --verbose --deep --force --sign \"${OSX_COMMON_NAME}\" dist/Boostnote-darwin-x64/Boostnote.app`,
|
||||
`codesign --verbose --deep --force --timestamp=none --sign \"${OSX_COMMON_NAME}\" dist/Boostnote-darwin-x64/Boostnote.app`,
|
||||
function(err, stdout, stderr) {
|
||||
grunt.log.writeln(stdout)
|
||||
if (err) {
|
||||
|
||||
@@ -26,6 +26,7 @@ if (!singleInstance) {
|
||||
}
|
||||
|
||||
var isUpdateReady = false
|
||||
let updateFound = false
|
||||
|
||||
var ghReleasesOpts = {
|
||||
repo: 'BoostIO/boost-releases',
|
||||
@@ -36,25 +37,33 @@ const updater = new GhReleases(ghReleasesOpts)
|
||||
|
||||
// Check for updates
|
||||
// `status` returns true if there is a new update available
|
||||
function checkUpdate() {
|
||||
function checkUpdate(manualTriggered = false) {
|
||||
if (!isPackaged) {
|
||||
// Prevents app from attempting to update when in dev mode.
|
||||
console.log('Updates are disabled in Development mode, see main-app.js')
|
||||
return true
|
||||
}
|
||||
if (!electronConfig.get('autoUpdateEnabled', true)) return
|
||||
if (process.platform === 'linux' || isUpdateReady) {
|
||||
|
||||
// End if auto updates disabled and it is an automatic check
|
||||
if (!electronConfig.get('autoUpdateEnabled', true) && !manualTriggered) return
|
||||
|
||||
if (process.platform === 'linux' || isUpdateReady || updateFound) {
|
||||
return true
|
||||
}
|
||||
|
||||
updater.check((err, status) => {
|
||||
if (err) {
|
||||
var isLatest = err.message === 'There is no newer version.'
|
||||
if (!isLatest) console.error('Updater error! %s', err.message)
|
||||
mainWindow.webContents.send(
|
||||
'update-not-found',
|
||||
isLatest ? 'There is no newer version.' : 'Updater error'
|
||||
)
|
||||
return
|
||||
}
|
||||
if (status) {
|
||||
mainWindow.webContents.send('update-found', 'Update available!')
|
||||
updater.download()
|
||||
updateFound = true
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -63,6 +72,7 @@ updater.on('update-downloaded', info => {
|
||||
if (mainWindow != null) {
|
||||
mainWindow.webContents.send('update-ready', 'Update available!')
|
||||
isUpdateReady = true
|
||||
updateFound = false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -77,6 +87,14 @@ ipc.on('update-app-confirm', function(event, msg) {
|
||||
}
|
||||
})
|
||||
|
||||
ipc.on('update-cancel', () => {
|
||||
updateFound = false
|
||||
})
|
||||
|
||||
ipc.on('update-download-confirm', () => {
|
||||
updater.download()
|
||||
})
|
||||
|
||||
app.on('window-all-closed', function() {
|
||||
app.quit()
|
||||
})
|
||||
@@ -113,7 +131,7 @@ app.on('ready', function() {
|
||||
if (isUpdateReady) {
|
||||
mainWindow.webContents.send('update-ready', 'Update available!')
|
||||
} else {
|
||||
checkUpdate()
|
||||
checkUpdate(msg === 'manual')
|
||||
}
|
||||
})
|
||||
}, 10 * 1000)
|
||||
|
||||
@@ -178,6 +178,18 @@ const file = {
|
||||
mainWindow.webContents.send('list:isMarkdownNote', 'print')
|
||||
mainWindow.webContents.send('print')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Update',
|
||||
click() {
|
||||
mainWindow.webContents.send('update')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -472,9 +484,21 @@ const help = {
|
||||
]
|
||||
}
|
||||
|
||||
const team = {
|
||||
label: 'For Team',
|
||||
submenu: [
|
||||
{
|
||||
label: 'BoostHub',
|
||||
click: async () => {
|
||||
shell.openExternal('https://boosthub.io/')
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
module.exports =
|
||||
process.platform === 'darwin'
|
||||
? [boost, file, edit, view, window, help]
|
||||
? [boost, file, edit, view, window, team, help]
|
||||
: process.platform === 'win32'
|
||||
? [boost, file, view, help]
|
||||
: [file, view, help]
|
||||
? [boost, file, view, team, help]
|
||||
: [file, view, team, help]
|
||||
|
||||
@@ -202,7 +202,6 @@
|
||||
"Create new folder": "Ordner erstellen",
|
||||
"Folder name": "Ordnername",
|
||||
"Create": "Erstellen",
|
||||
"Untitled": "Neuer Ordner",
|
||||
"Unlink Storage": "Speicherverknüpfung aufheben",
|
||||
"Unlinking removes this linked storage from Boostnote. No data is removed, please manually delete the folder from your hard drive if needed.": "Die Verknüpfung des Speichers mit Boostnote wird entfernt. Es werden keine Daten gelöscht. Um die Daten dauerhaft zu löschen musst du den Ordner auf der Festplatte manuell entfernen.",
|
||||
"Empty note": "Leere Notiz",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "boost",
|
||||
"productName": "Boostnote",
|
||||
"version": "0.16.0",
|
||||
"version": "0.16.1",
|
||||
"main": "index.js",
|
||||
"description": "Boostnote",
|
||||
"license": "GPL-3.0",
|
||||
|
||||
62
readme.md
62
readme.md
@@ -1,12 +1,26 @@
|
||||
> [We've launched desktop and mobile app of the new Boost Note now.](https://github.com/BoostIO/BoostNote.next)
|
||||
|
||||
> ### [Boost Note for Teams](https://boosthub.io/)
|
||||
> # New Boost Note app is available!
|
||||
>
|
||||
> We've developed a collaborative workspace app called "Boost Hub" for developer teams.
|
||||
> We've launched a new Boost Note app which supports real-time collaborative writing.
|
||||
>
|
||||
> It's customizable and easy to optimize for your team like rego blocks and even lets you edit documents together in real-time!
|
||||
> And it is open sourced too! Please check it out! https://github.com/BoostIO/BoostNote-App
|
||||
>
|
||||
> ## 📦 Download App
|
||||
>
|
||||
> ### 🖥 Desktop
|
||||
>
|
||||
> - [🌎 Web App (boostnote.io)](https://boostnote.io)
|
||||
> - [🍎 macOS (.dmg)](https://github.com/BoostIO/BoostNote-App/releases/latest/download/boost-note-mac.dmg)
|
||||
> - [:framed_picture: Windows (.exe NSIS)](https://github.com/BoostIO/BoostNote-App/releases/latest/download/boost-note-win.exe)
|
||||
> - [🐧 Linux (.deb)](https://github.com/BoostIO/BoostNote-App/releases/latest/download/boost-note-linux.deb)
|
||||
> - [🐧 Linux (.rpm)](https://github.com/BoostIO/BoostNote-App/releases/latest/download/boost-note-linux.rpm)
|
||||
>
|
||||
> ### 📱 Mobile
|
||||
>
|
||||
> - [🌎 Mobile Web App (m.boostnote.io)](https://m.boostnote.io)
|
||||
> - [🍏 iOS (Apple App Store)](https://apps.apple.com/gb/app/boost-note-mobile/id1576176505)
|
||||
> - [🤖 Android (Google Play Store)](https://play.google.com/store/apps/details?id=com.boostio.boostnote2021)
|
||||
|
||||

|
||||
<h1 align="center">BoostNote-Legacy</h1>
|
||||
|
||||
<h4 align="center">Note-taking app for programmers. </h4>
|
||||
<h5 align="center">Apps available for Mac, Windows and Linux.</h5>
|
||||
@@ -21,42 +35,6 @@
|
||||
|
||||
[Find the latest release of Boostnote here!](https://github.com/BoostIO/boost-releases/releases/)
|
||||
|
||||
## Roadmap
|
||||
|
||||
[Boost Note Roadmap 2020](https://medium.com/boostnote/boost-note-roadmap-2020-9f06a642f5f1)
|
||||
|
||||
## Authors & Maintainers
|
||||
|
||||
- [Rokt33r](https://github.com/rokt33r)
|
||||
- [KZ](https://github.com/kazup01)
|
||||
- [ZeroX-DG](https://github.com/ZeroX-DG)
|
||||
|
||||
## Contributors
|
||||
|
||||
Thank you to all the people who have contributed to Boostnote!
|
||||
|
||||
<a href="https://github.com/BoostIO/Boostnote/graphs/contributors"><img src="https://opencollective.com/boostnoteio/contributors.svg?width=890" /></a>
|
||||
|
||||
## Supporting Boostnote
|
||||
|
||||
Boostnote is an open source project. It's an independent project with its ongoing development made possible thanks to the support by our amazing backers.
|
||||
|
||||
Issues on Boostnote can be funded by anyone and the money will be distributed to contributors and maintainers. If you use Boostnote please consider becoming a backer:
|
||||
|
||||
[](https://issuehunt.io/repos/53266139)
|
||||
|
||||
## Community
|
||||
|
||||
- [Facebook Group](https://www.facebook.com/groups/boostnote/)
|
||||
- [Twitter](https://twitter.com/boostnoteapp)
|
||||
- [Slack Group](https://join.slack.com/t/boostnote-group/shared_invite/zt-cun7pas3-WwkaezxHBB1lCbUHrwQLXw)
|
||||
- [Blog](https://medium.com/boostnote)
|
||||
- [Reddit](https://www.reddit.com/r/Boostnote/)
|
||||
|
||||
### Boostnote mobile
|
||||
A community project developing a mobile cross-platform version of boostnote for iOS and Android can be found here: [NoteApp](https://github.com/T0M0F/NoteApp)
|
||||
|
||||
|
||||
#### More Information
|
||||
|
||||
- Website: https://boostnote.io
|
||||
|
||||
@@ -702,14 +702,15 @@ it('should remove the all ":storage" and noteKey references', function() {
|
||||
' </p>\n' +
|
||||
' </body>\n' +
|
||||
'</html>'
|
||||
const actual = systemUnderTest.removeStorageAndNoteReferences(
|
||||
const actual = systemUnderTest.replaceStorageReferences(
|
||||
testInput,
|
||||
noteKey
|
||||
noteKey,
|
||||
systemUnderTest.DESTINATION_FOLDER
|
||||
)
|
||||
expect(actual).toEqual(expectedOutput)
|
||||
})
|
||||
|
||||
it('should make sure that "removeStorageAndNoteReferences" works with markdown content as well', function() {
|
||||
it('should make sure that "replaceStorageReferences" works with markdown content as well', function() {
|
||||
const noteKey = 'noteKey'
|
||||
const testInput =
|
||||
'Test input' +
|
||||
@@ -736,9 +737,113 @@ it('should make sure that "removeStorageAndNoteReferences" works with markdown c
|
||||
systemUnderTest.DESTINATION_FOLDER +
|
||||
path.posix.sep +
|
||||
'pdf.pdf)'
|
||||
const actual = systemUnderTest.removeStorageAndNoteReferences(
|
||||
const actual = systemUnderTest.replaceStorageReferences(
|
||||
testInput,
|
||||
noteKey
|
||||
noteKey,
|
||||
systemUnderTest.DESTINATION_FOLDER
|
||||
)
|
||||
expect(actual).toEqual(expectedOutput)
|
||||
})
|
||||
|
||||
it('should replace the all ":storage" references', function() {
|
||||
const storageFolder = systemUnderTest.DESTINATION_FOLDER
|
||||
const noteKey = 'noteKey'
|
||||
const testInput =
|
||||
'<html>\n' +
|
||||
' <head>\n' +
|
||||
' //header\n' +
|
||||
' </head>\n' +
|
||||
' <body data-theme="default">\n' +
|
||||
' <h2 data-line="0" id="Headline">Headline</h2>\n' +
|
||||
' <p data-line="2">\n' +
|
||||
' <img src=":storage' +
|
||||
mdurl.encode(path.sep) +
|
||||
noteKey +
|
||||
mdurl.encode(path.sep) +
|
||||
'0.6r4zdgc22xp.png" alt="dummyImage.png" >\n' +
|
||||
' </p>\n' +
|
||||
' <p data-line="4">\n' +
|
||||
' <a href=":storage' +
|
||||
mdurl.encode(path.sep) +
|
||||
noteKey +
|
||||
mdurl.encode(path.sep) +
|
||||
'0.q2i4iw0fyx.pdf">dummyPDF.pdf</a>\n' +
|
||||
' </p>\n' +
|
||||
' <p data-line="6">\n' +
|
||||
' <img src=":storage' +
|
||||
mdurl.encode(path.sep) +
|
||||
noteKey +
|
||||
mdurl.encode(path.sep) +
|
||||
'd6c5ee92.jpg" alt="dummyImage2.jpg">\n' +
|
||||
' </p>\n' +
|
||||
' </body>\n' +
|
||||
'</html>'
|
||||
const expectedOutput =
|
||||
'<html>\n' +
|
||||
' <head>\n' +
|
||||
' //header\n' +
|
||||
' </head>\n' +
|
||||
' <body data-theme="default">\n' +
|
||||
' <h2 data-line="0" id="Headline">Headline</h2>\n' +
|
||||
' <p data-line="2">\n' +
|
||||
' <img src="' +
|
||||
storageFolder +
|
||||
path.sep +
|
||||
'0.6r4zdgc22xp.png" alt="dummyImage.png" >\n' +
|
||||
' </p>\n' +
|
||||
' <p data-line="4">\n' +
|
||||
' <a href="' +
|
||||
storageFolder +
|
||||
path.sep +
|
||||
'0.q2i4iw0fyx.pdf">dummyPDF.pdf</a>\n' +
|
||||
' </p>\n' +
|
||||
' <p data-line="6">\n' +
|
||||
' <img src="' +
|
||||
storageFolder +
|
||||
path.sep +
|
||||
'd6c5ee92.jpg" alt="dummyImage2.jpg">\n' +
|
||||
' </p>\n' +
|
||||
' </body>\n' +
|
||||
'</html>'
|
||||
const actual = systemUnderTest.replaceStorageReferences(
|
||||
testInput,
|
||||
noteKey,
|
||||
systemUnderTest.DESTINATION_FOLDER
|
||||
)
|
||||
expect(actual).toEqual(expectedOutput)
|
||||
})
|
||||
|
||||
it('should make sure that "replaceStorageReferences" works with markdown content as well', function() {
|
||||
const noteKey = 'noteKey'
|
||||
const testInput =
|
||||
'Test input' +
|
||||
' \n' +
|
||||
'[pdf](' +
|
||||
systemUnderTest.STORAGE_FOLDER_PLACEHOLDER +
|
||||
path.posix.sep +
|
||||
noteKey +
|
||||
path.posix.sep +
|
||||
'pdf.pdf)'
|
||||
|
||||
const expectedOutput =
|
||||
'Test input' +
|
||||
' \n' +
|
||||
'[pdf](' +
|
||||
systemUnderTest.DESTINATION_FOLDER +
|
||||
path.posix.sep +
|
||||
'pdf.pdf)'
|
||||
const actual = systemUnderTest.replaceStorageReferences(
|
||||
testInput,
|
||||
noteKey,
|
||||
systemUnderTest.DESTINATION_FOLDER
|
||||
)
|
||||
expect(actual).toEqual(expectedOutput)
|
||||
})
|
||||
|
||||
@@ -52,12 +52,20 @@ test.serial('Export a folder', t => {
|
||||
}
|
||||
input2.title = 'input2'
|
||||
|
||||
const config = {
|
||||
export: {
|
||||
metadata: 'DONT_EXPORT',
|
||||
variable: 'boostnote',
|
||||
prefixAttachmentFolder: false
|
||||
}
|
||||
}
|
||||
|
||||
return createNote(storageKey, input1)
|
||||
.then(function() {
|
||||
return createNote(storageKey, input2)
|
||||
})
|
||||
.then(function() {
|
||||
return exportFolder(storageKey, folderKey, 'md', storagePath)
|
||||
return exportFolder(storageKey, folderKey, 'md', storagePath, config)
|
||||
})
|
||||
.then(function assert() {
|
||||
let filePath = path.join(storagePath, 'input1.md')
|
||||
|
||||
@@ -35,7 +35,16 @@ test.serial('Export a storage', t => {
|
||||
acc[folder.key] = folder.name
|
||||
return acc
|
||||
}, {})
|
||||
return exportStorage(storageKey, 'md', exportDir).then(() => {
|
||||
|
||||
const config = {
|
||||
export: {
|
||||
metadata: 'DONT_EXPORT',
|
||||
variable: 'boostnote',
|
||||
prefixAttachmentFolder: false
|
||||
}
|
||||
}
|
||||
|
||||
return exportStorage(storageKey, 'md', exportDir, config).then(() => {
|
||||
notes.forEach(note => {
|
||||
const noteDir = path.join(
|
||||
exportDir,
|
||||
|
||||
@@ -98,11 +98,11 @@ exports[`Markdown.render() should renders checkboxes 1`] = `
|
||||
|
||||
exports[`Markdown.render() should renders codeblock correctly 1`] = `
|
||||
"<pre class=\\"code CodeMirror\\" data-line=\\"1\\">
|
||||
<span class=\\"filename\\">filename.js</span>
|
||||
<span class=\\"lineNumber CodeMirror-gutters\\"><span class=\\"CodeMirror-linenumber\\">2</span></span>
|
||||
<code class=\\"js\\">var project = 'boostnote';
|
||||
<span class=\\"filename\\">filename.js</span>
|
||||
<span class=\\"lineNumber CodeMirror-gutters\\"><span class=\\"CodeMirror-linenumber\\">2</span></span>
|
||||
<code class=\\"js\\">var project = 'boostnote';
|
||||
</code>
|
||||
</pre>"
|
||||
</pre>"
|
||||
`;
|
||||
|
||||
exports[`Markdown.render() should renders definition lists correctly 1`] = `
|
||||
|
||||
400
yarn.lock
400
yarn.lock
@@ -144,12 +144,13 @@ abbrev@1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
||||
|
||||
accepts@~1.3.4, accepts@~1.3.5:
|
||||
version "1.3.5"
|
||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2"
|
||||
accepts@~1.3.4, accepts@~1.3.8:
|
||||
version "1.3.8"
|
||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
|
||||
integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==
|
||||
dependencies:
|
||||
mime-types "~2.1.18"
|
||||
negotiator "0.6.1"
|
||||
mime-types "~2.1.34"
|
||||
negotiator "0.6.3"
|
||||
|
||||
accessibility-developer-tools@^2.11.0:
|
||||
version "2.12.0"
|
||||
@@ -365,6 +366,7 @@ array-find-index@^1.0.1:
|
||||
array-flatten@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
|
||||
integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==
|
||||
|
||||
array-includes@^3.0.3:
|
||||
version "3.0.3"
|
||||
@@ -1353,20 +1355,23 @@ bluebird@^3.0.0, bluebird@^3.1.1, bluebird@^3.3.4, bluebird@^3.5.0:
|
||||
version "3.5.1"
|
||||
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
|
||||
|
||||
body-parser@1.18.2:
|
||||
version "1.18.2"
|
||||
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454"
|
||||
body-parser@1.20.1:
|
||||
version "1.20.1"
|
||||
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668"
|
||||
integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==
|
||||
dependencies:
|
||||
bytes "3.0.0"
|
||||
bytes "3.1.2"
|
||||
content-type "~1.0.4"
|
||||
debug "2.6.9"
|
||||
depd "~1.1.1"
|
||||
http-errors "~1.6.2"
|
||||
iconv-lite "0.4.19"
|
||||
on-finished "~2.3.0"
|
||||
qs "6.5.1"
|
||||
raw-body "2.3.2"
|
||||
type-is "~1.6.15"
|
||||
depd "2.0.0"
|
||||
destroy "1.2.0"
|
||||
http-errors "2.0.0"
|
||||
iconv-lite "0.4.24"
|
||||
on-finished "2.4.1"
|
||||
qs "6.11.0"
|
||||
raw-body "2.5.1"
|
||||
type-is "~1.6.18"
|
||||
unpipe "1.0.0"
|
||||
|
||||
boxen@^1.2.1:
|
||||
version "1.3.0"
|
||||
@@ -1505,6 +1510,11 @@ bytes@3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
|
||||
|
||||
bytes@3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
|
||||
integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
|
||||
|
||||
cache-base@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
|
||||
@@ -1527,6 +1537,14 @@ caching-transform@^1.0.0:
|
||||
mkdirp "^0.5.1"
|
||||
write-file-atomic "^1.1.4"
|
||||
|
||||
call-bind@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"
|
||||
integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==
|
||||
dependencies:
|
||||
function-bind "^1.1.1"
|
||||
get-intrinsic "^1.0.2"
|
||||
|
||||
call-matcher@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/call-matcher/-/call-matcher-1.0.1.tgz#5134d077984f712a54dad3cbf62de28dce416ca8"
|
||||
@@ -2121,9 +2139,12 @@ constants-browserify@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
|
||||
|
||||
content-disposition@0.5.2:
|
||||
version "0.5.2"
|
||||
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4"
|
||||
content-disposition@0.5.4:
|
||||
version "0.5.4"
|
||||
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe"
|
||||
integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==
|
||||
dependencies:
|
||||
safe-buffer "5.2.1"
|
||||
|
||||
content-type-parser@^1.0.1, content-type-parser@^1.0.2:
|
||||
version "1.0.2"
|
||||
@@ -2132,6 +2153,7 @@ content-type-parser@^1.0.1, content-type-parser@^1.0.2:
|
||||
content-type@~1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
|
||||
integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
|
||||
|
||||
convert-source-map@^1.4.0, convert-source-map@^1.5.1:
|
||||
version "1.5.1"
|
||||
@@ -2144,10 +2166,12 @@ convert-to-spaces@^1.0.1:
|
||||
cookie-signature@1.0.6:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
|
||||
integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==
|
||||
|
||||
cookie@0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
|
||||
cookie@0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
||||
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
||||
|
||||
copy-descriptor@^0.1.0:
|
||||
version "0.1.1"
|
||||
@@ -2734,11 +2758,12 @@ debug-log@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f"
|
||||
|
||||
debug@*, debug@^3.0.0, debug@^3.0.1, debug@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||
debug@*, debug@^4.1.0:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
|
||||
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
ms "^2.1.1"
|
||||
|
||||
debug@2.6.9, debug@^2.1.1, debug@^2.1.2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9:
|
||||
version "2.6.9"
|
||||
@@ -2746,12 +2771,11 @@ debug@2.6.9, debug@^2.1.1, debug@^2.1.2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@^4.1.0:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
|
||||
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
|
||||
debug@^3.0.0, debug@^3.0.1, debug@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
ms "2.0.0"
|
||||
|
||||
decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
|
||||
version "1.2.0"
|
||||
@@ -2852,17 +2876,19 @@ delegates@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
|
||||
|
||||
depd@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359"
|
||||
depd@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
|
||||
integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==
|
||||
|
||||
depd@~1.1.1, depd@~1.1.2:
|
||||
depd@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
|
||||
|
||||
destroy@~1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
|
||||
destroy@1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015"
|
||||
integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==
|
||||
|
||||
detect-indent@^4.0.0:
|
||||
version "4.0.0"
|
||||
@@ -2990,6 +3016,7 @@ ecc-jsbn@~0.1.1:
|
||||
ee-first@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
||||
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
|
||||
|
||||
electron-config@^1.0.0:
|
||||
version "1.0.0"
|
||||
@@ -3162,6 +3189,7 @@ empower-core@^0.6.1:
|
||||
encodeurl@~1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
|
||||
integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==
|
||||
|
||||
encoding@^0.1.11:
|
||||
version "0.1.12"
|
||||
@@ -3296,6 +3324,7 @@ es6-weak-map@^2.0.1:
|
||||
escape-html@~1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
||||
integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==
|
||||
|
||||
escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.4, escape-string-regexp@^1.0.5:
|
||||
version "1.0.5"
|
||||
@@ -3548,6 +3577,7 @@ esutils@^2.0.2:
|
||||
etag@~1.8.1:
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
||||
integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
|
||||
|
||||
eve-raphael@0.5.0:
|
||||
version "0.5.0"
|
||||
@@ -3660,37 +3690,39 @@ expect@^22.4.0:
|
||||
jest-regex-util "^22.4.3"
|
||||
|
||||
express@^4.13.3:
|
||||
version "4.16.3"
|
||||
resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53"
|
||||
version "4.18.2"
|
||||
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
|
||||
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
|
||||
dependencies:
|
||||
accepts "~1.3.5"
|
||||
accepts "~1.3.8"
|
||||
array-flatten "1.1.1"
|
||||
body-parser "1.18.2"
|
||||
content-disposition "0.5.2"
|
||||
body-parser "1.20.1"
|
||||
content-disposition "0.5.4"
|
||||
content-type "~1.0.4"
|
||||
cookie "0.3.1"
|
||||
cookie "0.5.0"
|
||||
cookie-signature "1.0.6"
|
||||
debug "2.6.9"
|
||||
depd "~1.1.2"
|
||||
depd "2.0.0"
|
||||
encodeurl "~1.0.2"
|
||||
escape-html "~1.0.3"
|
||||
etag "~1.8.1"
|
||||
finalhandler "1.1.1"
|
||||
finalhandler "1.2.0"
|
||||
fresh "0.5.2"
|
||||
http-errors "2.0.0"
|
||||
merge-descriptors "1.0.1"
|
||||
methods "~1.1.2"
|
||||
on-finished "~2.3.0"
|
||||
parseurl "~1.3.2"
|
||||
on-finished "2.4.1"
|
||||
parseurl "~1.3.3"
|
||||
path-to-regexp "0.1.7"
|
||||
proxy-addr "~2.0.3"
|
||||
qs "6.5.1"
|
||||
range-parser "~1.2.0"
|
||||
safe-buffer "5.1.1"
|
||||
send "0.16.2"
|
||||
serve-static "1.13.2"
|
||||
setprototypeof "1.1.0"
|
||||
statuses "~1.4.0"
|
||||
type-is "~1.6.16"
|
||||
proxy-addr "~2.0.7"
|
||||
qs "6.11.0"
|
||||
range-parser "~1.2.1"
|
||||
safe-buffer "5.2.1"
|
||||
send "0.18.0"
|
||||
serve-static "1.15.0"
|
||||
setprototypeof "1.2.0"
|
||||
statuses "2.0.1"
|
||||
type-is "~1.6.18"
|
||||
utils-merge "1.0.1"
|
||||
vary "~1.1.2"
|
||||
|
||||
@@ -3905,16 +3937,17 @@ fill-range@^4.0.0:
|
||||
repeat-string "^1.6.1"
|
||||
to-regex-range "^2.1.0"
|
||||
|
||||
finalhandler@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105"
|
||||
finalhandler@1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32"
|
||||
integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==
|
||||
dependencies:
|
||||
debug "2.6.9"
|
||||
encodeurl "~1.0.2"
|
||||
escape-html "~1.0.3"
|
||||
on-finished "~2.3.0"
|
||||
parseurl "~1.3.2"
|
||||
statuses "~1.4.0"
|
||||
on-finished "2.4.1"
|
||||
parseurl "~1.3.3"
|
||||
statuses "2.0.1"
|
||||
unpipe "~1.0.0"
|
||||
|
||||
find-cache-dir@^0.1.1:
|
||||
@@ -4030,9 +4063,10 @@ form-data@~2.3.1:
|
||||
combined-stream "1.0.6"
|
||||
mime-types "^2.1.12"
|
||||
|
||||
forwarded@~0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
|
||||
forwarded@0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811"
|
||||
integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==
|
||||
|
||||
fragment-cache@^0.2.1:
|
||||
version "0.2.1"
|
||||
@@ -4043,6 +4077,7 @@ fragment-cache@^0.2.1:
|
||||
fresh@0.5.2:
|
||||
version "0.5.2"
|
||||
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
|
||||
integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==
|
||||
|
||||
fs-extra@0.26.7, fs-extra@^0.26.7:
|
||||
version "0.26.7"
|
||||
@@ -4163,6 +4198,15 @@ get-folder-size@^1.0.0:
|
||||
async "^1.4.2"
|
||||
gar "^1.0.2"
|
||||
|
||||
get-intrinsic@^1.0.2:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385"
|
||||
integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==
|
||||
dependencies:
|
||||
function-bind "^1.1.1"
|
||||
has "^1.0.3"
|
||||
has-symbols "^1.0.3"
|
||||
|
||||
get-package-info@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/get-package-info/-/get-package-info-1.0.0.tgz#6432796563e28113cd9474dbbd00052985a4999c"
|
||||
@@ -4514,6 +4558,11 @@ has-flag@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
|
||||
|
||||
has-symbols@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
|
||||
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
|
||||
|
||||
has-unicode@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
|
||||
@@ -4555,6 +4604,13 @@ has@^1.0.1:
|
||||
dependencies:
|
||||
function-bind "^1.0.2"
|
||||
|
||||
has@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
|
||||
integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
|
||||
dependencies:
|
||||
function-bind "^1.1.1"
|
||||
|
||||
he@^1.1.1, he@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
|
||||
@@ -4642,14 +4698,16 @@ htmlparser2@^3.9.0:
|
||||
inherits "^2.0.1"
|
||||
readable-stream "^2.0.2"
|
||||
|
||||
http-errors@1.6.2:
|
||||
version "1.6.2"
|
||||
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736"
|
||||
http-errors@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3"
|
||||
integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==
|
||||
dependencies:
|
||||
depd "1.1.1"
|
||||
inherits "2.0.3"
|
||||
setprototypeof "1.0.3"
|
||||
statuses ">= 1.3.1 < 2"
|
||||
depd "2.0.0"
|
||||
inherits "2.0.4"
|
||||
setprototypeof "1.2.0"
|
||||
statuses "2.0.1"
|
||||
toidentifier "1.0.1"
|
||||
|
||||
http-errors@~1.6.2:
|
||||
version "1.6.3"
|
||||
@@ -4748,7 +4806,7 @@ iconv-lite@0.4.19:
|
||||
version "0.4.19"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
|
||||
|
||||
iconv-lite@^0.4.17:
|
||||
iconv-lite@0.4.24, iconv-lite@^0.4.17:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
|
||||
@@ -4855,6 +4913,11 @@ inherits@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
|
||||
|
||||
inherits@2.0.4:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
ini@^1.3.4, ini@~1.3.0:
|
||||
version "1.3.5"
|
||||
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
|
||||
@@ -4920,9 +4983,10 @@ invert-kv@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
|
||||
|
||||
ipaddr.js@1.6.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.6.0.tgz#e3fa357b773da619f26e95f049d055c72796f86b"
|
||||
ipaddr.js@1.9.1:
|
||||
version "1.9.1"
|
||||
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
|
||||
integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
|
||||
|
||||
irregular-plurals@^1.0.0:
|
||||
version "1.4.0"
|
||||
@@ -6405,6 +6469,7 @@ meaw@^2.0.0:
|
||||
media-typer@0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
|
||||
integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==
|
||||
|
||||
mem@^1.1.0:
|
||||
version "1.1.0"
|
||||
@@ -6448,6 +6513,7 @@ meow@^3.1.0, meow@^3.7.0:
|
||||
merge-descriptors@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
|
||||
integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==
|
||||
|
||||
merge-stream@^1.0.0, merge-stream@^1.0.1:
|
||||
version "1.0.1"
|
||||
@@ -6480,6 +6546,7 @@ mermaid@^8.5.2:
|
||||
methods@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
|
||||
integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==
|
||||
|
||||
micromatch@^2.1.5, micromatch@^2.3.11:
|
||||
version "2.3.11"
|
||||
@@ -6517,21 +6584,29 @@ micromatch@^3.1.4, micromatch@^3.1.8:
|
||||
snapdragon "^0.8.1"
|
||||
to-regex "^3.0.2"
|
||||
|
||||
mime-db@1.52.0:
|
||||
version "1.52.0"
|
||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
|
||||
integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
|
||||
|
||||
"mime-db@>= 1.33.0 < 2", mime-db@~1.33.0:
|
||||
version "1.33.0"
|
||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db"
|
||||
|
||||
mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18:
|
||||
mime-types@^2.1.12, mime-types@~2.1.17:
|
||||
version "2.1.18"
|
||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8"
|
||||
dependencies:
|
||||
mime-db "~1.33.0"
|
||||
|
||||
mime@1.4.1:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
|
||||
mime-types@~2.1.24, mime-types@~2.1.34:
|
||||
version "2.1.35"
|
||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
|
||||
integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
|
||||
dependencies:
|
||||
mime-db "1.52.0"
|
||||
|
||||
mime@^1.5.0:
|
||||
mime@1.6.0, mime@^1.5.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
|
||||
|
||||
@@ -6662,6 +6737,12 @@ mousetrap@^1.6.2:
|
||||
ms@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==
|
||||
|
||||
ms@2.1.3:
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
||||
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
||||
|
||||
ms@^2.0.0:
|
||||
version "2.1.1"
|
||||
@@ -6723,9 +6804,10 @@ needle@^2.2.0:
|
||||
iconv-lite "^0.4.4"
|
||||
sax "^1.2.4"
|
||||
|
||||
negotiator@0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
|
||||
negotiator@0.6.3:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
|
||||
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
|
||||
|
||||
neo-async@^2.6.0:
|
||||
version "2.6.1"
|
||||
@@ -6970,6 +7052,11 @@ object-copy@^0.1.0:
|
||||
define-property "^0.2.5"
|
||||
kind-of "^3.0.3"
|
||||
|
||||
object-inspect@^1.9.0:
|
||||
version "1.12.2"
|
||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
|
||||
integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==
|
||||
|
||||
object-keys@^1.0.8:
|
||||
version "1.0.11"
|
||||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
||||
@@ -7016,9 +7103,10 @@ observable-to-promise@^0.5.0:
|
||||
is-observable "^0.2.0"
|
||||
symbol-observable "^1.0.4"
|
||||
|
||||
on-finished@~2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
|
||||
on-finished@2.4.1:
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f"
|
||||
integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==
|
||||
dependencies:
|
||||
ee-first "1.1.1"
|
||||
|
||||
@@ -7234,9 +7322,10 @@ parse5@^1.5.1:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94"
|
||||
|
||||
parseurl@~1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3"
|
||||
parseurl@~1.3.2, parseurl@~1.3.3:
|
||||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
|
||||
integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
|
||||
|
||||
pascalcase@^0.1.1:
|
||||
version "0.1.1"
|
||||
@@ -7275,6 +7364,7 @@ path-parse@^1.0.5:
|
||||
path-to-regexp@0.1.7:
|
||||
version "0.1.7"
|
||||
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
|
||||
integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==
|
||||
|
||||
path-to-regexp@^1.7.0:
|
||||
version "1.7.0"
|
||||
@@ -7769,12 +7859,13 @@ prop-types@^15.6.2:
|
||||
loose-envify "^1.3.1"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
proxy-addr@~2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.3.tgz#355f262505a621646b3130a728eb647e22055341"
|
||||
proxy-addr@~2.0.7:
|
||||
version "2.0.7"
|
||||
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025"
|
||||
integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==
|
||||
dependencies:
|
||||
forwarded "~0.1.2"
|
||||
ipaddr.js "1.6.0"
|
||||
forwarded "0.2.0"
|
||||
ipaddr.js "1.9.1"
|
||||
|
||||
prr@~1.0.1:
|
||||
version "1.0.1"
|
||||
@@ -7809,9 +7900,12 @@ q@^1.1.2:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
|
||||
|
||||
qs@6.5.1:
|
||||
version "6.5.1"
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
|
||||
qs@6.11.0:
|
||||
version "6.11.0"
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
|
||||
integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
|
||||
dependencies:
|
||||
side-channel "^1.0.4"
|
||||
|
||||
qs@~6.5.1:
|
||||
version "6.5.2"
|
||||
@@ -7854,9 +7948,10 @@ randomatic@^3.0.0:
|
||||
kind-of "^6.0.0"
|
||||
math-random "^1.0.1"
|
||||
|
||||
range-parser@^1.0.3, range-parser@~1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e"
|
||||
range-parser@^1.0.3, range-parser@~1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
|
||||
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
|
||||
|
||||
raphael@2.2.7, raphael@^2.2.7:
|
||||
version "2.2.7"
|
||||
@@ -7871,13 +7966,14 @@ raphael@~2.1.x:
|
||||
dependencies:
|
||||
eve "git://github.com/adobe-webplatform/eve.git#eef80ed"
|
||||
|
||||
raw-body@2.3.2:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89"
|
||||
raw-body@2.5.1:
|
||||
version "2.5.1"
|
||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857"
|
||||
integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==
|
||||
dependencies:
|
||||
bytes "3.0.0"
|
||||
http-errors "1.6.2"
|
||||
iconv-lite "0.4.19"
|
||||
bytes "3.1.2"
|
||||
http-errors "2.0.0"
|
||||
iconv-lite "0.4.24"
|
||||
unpipe "1.0.0"
|
||||
|
||||
rc@^1.0.1, rc@^1.1.6, rc@^1.1.7, rc@^1.2.1:
|
||||
@@ -8612,7 +8708,12 @@ safe-buffer@5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
||||
|
||||
safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||
safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2:
|
||||
version "5.2.1"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
||||
|
||||
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||
|
||||
@@ -8625,6 +8726,7 @@ safe-regex@^1.1.0:
|
||||
"safer-buffer@>= 2.1.2 < 3":
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
|
||||
sander@^0.5.1:
|
||||
version "0.5.1"
|
||||
@@ -8728,23 +8830,24 @@ semver@^5.5.0:
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
|
||||
integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
|
||||
|
||||
send@0.16.2:
|
||||
version "0.16.2"
|
||||
resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1"
|
||||
send@0.18.0:
|
||||
version "0.18.0"
|
||||
resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be"
|
||||
integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==
|
||||
dependencies:
|
||||
debug "2.6.9"
|
||||
depd "~1.1.2"
|
||||
destroy "~1.0.4"
|
||||
depd "2.0.0"
|
||||
destroy "1.2.0"
|
||||
encodeurl "~1.0.2"
|
||||
escape-html "~1.0.3"
|
||||
etag "~1.8.1"
|
||||
fresh "0.5.2"
|
||||
http-errors "~1.6.2"
|
||||
mime "1.4.1"
|
||||
ms "2.0.0"
|
||||
on-finished "~2.3.0"
|
||||
range-parser "~1.2.0"
|
||||
statuses "~1.4.0"
|
||||
http-errors "2.0.0"
|
||||
mime "1.6.0"
|
||||
ms "2.1.3"
|
||||
on-finished "2.4.1"
|
||||
range-parser "~1.2.1"
|
||||
statuses "2.0.1"
|
||||
|
||||
serialize-error@^2.1.0:
|
||||
version "2.1.0"
|
||||
@@ -8762,14 +8865,15 @@ serve-index@^1.7.2:
|
||||
mime-types "~2.1.17"
|
||||
parseurl "~1.3.2"
|
||||
|
||||
serve-static@1.13.2:
|
||||
version "1.13.2"
|
||||
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1"
|
||||
serve-static@1.15.0:
|
||||
version "1.15.0"
|
||||
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540"
|
||||
integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==
|
||||
dependencies:
|
||||
encodeurl "~1.0.2"
|
||||
escape-html "~1.0.3"
|
||||
parseurl "~1.3.2"
|
||||
send "0.16.2"
|
||||
parseurl "~1.3.3"
|
||||
send "0.18.0"
|
||||
|
||||
set-blocking@^2.0.0, set-blocking@~2.0.0:
|
||||
version "2.0.0"
|
||||
@@ -8807,14 +8911,15 @@ setimmediate@^1.0.4, setimmediate@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
|
||||
|
||||
setprototypeof@1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04"
|
||||
|
||||
setprototypeof@1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
|
||||
|
||||
setprototypeof@1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
|
||||
integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
|
||||
|
||||
sha.js@2.2.6:
|
||||
version "2.2.6"
|
||||
resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.2.6.tgz#17ddeddc5f722fb66501658895461977867315ba"
|
||||
@@ -8845,6 +8950,15 @@ shellwords@^0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
|
||||
|
||||
side-channel@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
|
||||
integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==
|
||||
dependencies:
|
||||
call-bind "^1.0.0"
|
||||
get-intrinsic "^1.0.2"
|
||||
object-inspect "^1.9.0"
|
||||
|
||||
sigmund@~1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
|
||||
@@ -9134,14 +9248,15 @@ static-extend@^0.1.1:
|
||||
define-property "^0.2.5"
|
||||
object-copy "^0.1.0"
|
||||
|
||||
"statuses@>= 1.3.1 < 2", "statuses@>= 1.4.0 < 2":
|
||||
statuses@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63"
|
||||
integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==
|
||||
|
||||
"statuses@>= 1.4.0 < 2":
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
|
||||
|
||||
statuses@~1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
|
||||
|
||||
stealthy-require@^1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
|
||||
@@ -9578,6 +9693,11 @@ toggle-selection@^1.0.3:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32"
|
||||
|
||||
toidentifier@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
|
||||
integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
|
||||
|
||||
toml@^2.3.2:
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/toml/-/toml-2.3.3.tgz#8d683d729577cb286231dfc7a8affe58d31728fb"
|
||||
@@ -9688,12 +9808,13 @@ type-fest@^0.5.2:
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2"
|
||||
integrity sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==
|
||||
|
||||
type-is@~1.6.15, type-is@~1.6.16:
|
||||
version "1.6.16"
|
||||
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194"
|
||||
type-is@~1.6.18:
|
||||
version "1.6.18"
|
||||
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
|
||||
integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
|
||||
dependencies:
|
||||
media-typer "0.3.0"
|
||||
mime-types "~2.1.18"
|
||||
mime-types "~2.1.24"
|
||||
|
||||
typedarray@^0.0.6:
|
||||
version "0.0.6"
|
||||
@@ -9834,6 +9955,7 @@ universalify@^0.1.0:
|
||||
unpipe@1.0.0, unpipe@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
|
||||
integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==
|
||||
|
||||
unset-value@^1.0.0:
|
||||
version "1.0.0"
|
||||
@@ -9945,6 +10067,7 @@ util@0.10.3, util@^0.10.3:
|
||||
utils-merge@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
|
||||
integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==
|
||||
|
||||
uuid@3.1.0:
|
||||
version "3.1.0"
|
||||
@@ -9969,6 +10092,7 @@ value-equal@^0.4.0:
|
||||
vary@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
|
||||
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
|
||||
|
||||
vendors@^1.0.0:
|
||||
version "1.0.2"
|
||||
|
||||
Reference in New Issue
Block a user