Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
7bbf6839
Commit
7bbf6839
authored
Mar 16, 2019
by
Nick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: HTTPS server (#784) + custom git path (#783)
parent
c236cfdf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
4 deletions
+19
-4
CHANGELOG.md
CHANGELOG.md
+4
-1
master.js
server/master.js
+1
-0
definition.yml
server/modules/storage/git/definition.yml
+5
-0
storage.js
server/modules/storage/git/storage.js
+9
-3
yarn.lock
yarn.lock
+0
-0
No files found.
CHANGELOG.md
View file @
7bbf6839
...
...
@@ -5,11 +5,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [2.0.0-beta.XX] - 2019-XX-XX
### Added
-
Added Search Results overlay
-
Added Search Engine - PostgreSQL
-
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 Storage last sync date in status panel
-
Added Dev Flags
-
Added HTTPS server option
-
Added HTTP to HTTPS redirect server option
### Fixed
...
...
server/master.js
View file @
7bbf6839
...
...
@@ -5,6 +5,7 @@ const cookieParser = require('cookie-parser')
const
cors
=
require
(
'cors'
)
const
express
=
require
(
'express'
)
const
favicon
=
require
(
'serve-favicon'
)
const
fs
=
require
(
'fs-extra'
)
const
http
=
require
(
'http'
)
const
https
=
require
(
'https'
)
const
path
=
require
(
'path'
)
...
...
server/modules/storage/git/definition.yml
View file @
7bbf6839
...
...
@@ -69,6 +69,11 @@ props:
default
:
'
John
Smith'
hint
:
'
Used
as
fallback
in
case
the
author
of
the
change
is
not
present.'
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
:
-
handler
:
syncUntracked
label
:
Add Untracked Changes
...
...
server/modules/storage/git/storage.js
View file @
7bbf6839
...
...
@@ -5,6 +5,8 @@ const _ = require('lodash')
const
localeFolderRegex
=
/^
([
a-z
]{2}(?:
-
[
a-z
]{2})?\/)?(
.*
)
/i
/* global WIKI */
/**
* Get file extension based on content type
*/
...
...
@@ -64,6 +66,11 @@ module.exports = {
await
fs
.
ensureDir
(
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)
WIKI
.
logger
.
info
(
'(STORAGE/GIT) Checking repository state...'
)
const
isRepo
=
await
this
.
git
.
checkIsRepo
()
...
...
@@ -81,7 +88,7 @@ module.exports = {
const
remotes
=
await
this
.
git
.
getRemotes
()
if
(
remotes
.
length
>
0
)
{
WIKI
.
logger
.
info
(
'(STORAGE/GIT) Purging existing remotes...'
)
for
(
let
remote
of
remotes
)
{
for
(
let
remote
of
remotes
)
{
await
this
.
git
.
removeRemote
(
remote
.
name
)
}
}
...
...
@@ -147,7 +154,7 @@ module.exports = {
const
diff
=
await
this
.
git
.
diffSummary
([
'-M'
,
currentCommitLog
.
hash
,
latestCommitLog
.
hash
])
if
(
_
.
get
(
diff
,
'files'
,
[]).
length
>
0
)
{
for
(
const
item
of
diff
.
files
)
{
for
(
const
item
of
diff
.
files
)
{
const
contentType
=
getContenType
(
item
.
file
)
if
(
!
contentType
)
{
continue
...
...
@@ -202,7 +209,6 @@ module.exports = {
locale
:
contentPath
.
locale
,
skipStorage
:
true
})
}
else
{
WIKI
.
logger
.
warn
(
`(STORAGE/GIT) Failed to open
${
item
.
file
}
`
)
WIKI
.
logger
.
warn
(
err
)
...
...
yarn.lock
View file @
7bbf6839
This diff was suppressed by a .gitattributes entry.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment