@@ -5,11 +5,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
## [2.0.0-beta.XX] - 2019-XX-XX
|
## [2.0.0-beta.XX] - 2019-XX-XX
|
||||||
### Added
|
### Added
|
||||||
- Added Search Results overlay
|
- Added Search Results overlay
|
||||||
- Added Search Engine - PostgreSQL
|
|
||||||
- Added Search Engine - DB Basic
|
- Added Search Engine - DB Basic
|
||||||
|
- Added Search Engine - DB PostgreSQL
|
||||||
|
- Added Search Engine - Azure Search
|
||||||
|
- Added Search Engine - AWS CloudSearch
|
||||||
- Added Git changes processing (add/modify/delete)
|
- Added Git changes processing (add/modify/delete)
|
||||||
- Added Storage last sync date in status panel
|
- Added Storage last sync date in status panel
|
||||||
- Added Dev Flags
|
- Added Dev Flags
|
||||||
|
- Added HTTPS server option
|
||||||
- Added HTTP to HTTPS redirect server option
|
- Added HTTP to HTTPS redirect server option
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ const cookieParser = require('cookie-parser')
|
|||||||
const cors = require('cors')
|
const cors = require('cors')
|
||||||
const express = require('express')
|
const express = require('express')
|
||||||
const favicon = require('serve-favicon')
|
const favicon = require('serve-favicon')
|
||||||
|
const fs = require('fs-extra')
|
||||||
const http = require('http')
|
const http = require('http')
|
||||||
const https = require('https')
|
const https = require('https')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|||||||
@@ -69,6 +69,11 @@ props:
|
|||||||
default: 'John Smith'
|
default: 'John Smith'
|
||||||
hint: 'Used as fallback in case the author of the change is not present.'
|
hint: 'Used as fallback in case the author of the change is not present.'
|
||||||
order: 21
|
order: 21
|
||||||
|
gitBinaryPath:
|
||||||
|
type: String
|
||||||
|
title: Git Binary Path
|
||||||
|
default: ''
|
||||||
|
hint: Optional - Absolute path to the Git binary, when not available in PATH. Leave empty to use the default PATH location (recommended).
|
||||||
actions:
|
actions:
|
||||||
- handler: syncUntracked
|
- handler: syncUntracked
|
||||||
label: Add Untracked Changes
|
label: Add Untracked Changes
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ const _ = require('lodash')
|
|||||||
|
|
||||||
const localeFolderRegex = /^([a-z]{2}(?:-[a-z]{2})?\/)?(.*)/i
|
const localeFolderRegex = /^([a-z]{2}(?:-[a-z]{2})?\/)?(.*)/i
|
||||||
|
|
||||||
|
/* global WIKI */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get file extension based on content type
|
* Get file extension based on content type
|
||||||
*/
|
*/
|
||||||
@@ -64,6 +66,11 @@ module.exports = {
|
|||||||
await fs.ensureDir(this.repoPath)
|
await fs.ensureDir(this.repoPath)
|
||||||
this.git = sgit(this.repoPath)
|
this.git = sgit(this.repoPath)
|
||||||
|
|
||||||
|
// Set custom binary path
|
||||||
|
if (!_.isEmpty(this.config.gitBinaryPath)) {
|
||||||
|
this.git.customBinary(this.config.gitBinaryPath)
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize repo (if needed)
|
// Initialize repo (if needed)
|
||||||
WIKI.logger.info('(STORAGE/GIT) Checking repository state...')
|
WIKI.logger.info('(STORAGE/GIT) Checking repository state...')
|
||||||
const isRepo = await this.git.checkIsRepo()
|
const isRepo = await this.git.checkIsRepo()
|
||||||
@@ -81,7 +88,7 @@ module.exports = {
|
|||||||
const remotes = await this.git.getRemotes()
|
const remotes = await this.git.getRemotes()
|
||||||
if (remotes.length > 0) {
|
if (remotes.length > 0) {
|
||||||
WIKI.logger.info('(STORAGE/GIT) Purging existing remotes...')
|
WIKI.logger.info('(STORAGE/GIT) Purging existing remotes...')
|
||||||
for(let remote of remotes) {
|
for (let remote of remotes) {
|
||||||
await this.git.removeRemote(remote.name)
|
await this.git.removeRemote(remote.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -147,7 +154,7 @@ module.exports = {
|
|||||||
|
|
||||||
const diff = await this.git.diffSummary(['-M', currentCommitLog.hash, latestCommitLog.hash])
|
const diff = await this.git.diffSummary(['-M', currentCommitLog.hash, latestCommitLog.hash])
|
||||||
if (_.get(diff, 'files', []).length > 0) {
|
if (_.get(diff, 'files', []).length > 0) {
|
||||||
for(const item of diff.files) {
|
for (const item of diff.files) {
|
||||||
const contentType = getContenType(item.file)
|
const contentType = getContenType(item.file)
|
||||||
if (!contentType) {
|
if (!contentType) {
|
||||||
continue
|
continue
|
||||||
@@ -202,7 +209,6 @@ module.exports = {
|
|||||||
locale: contentPath.locale,
|
locale: contentPath.locale,
|
||||||
skipStorage: true
|
skipStorage: true
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
WIKI.logger.warn(`(STORAGE/GIT) Failed to open ${item.file}`)
|
WIKI.logger.warn(`(STORAGE/GIT) Failed to open ${item.file}`)
|
||||||
WIKI.logger.warn(err)
|
WIKI.logger.warn(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user