Skip to content

Commit a5bb0d6

Browse files
authored
Merge pull request #1379 from hackmdio/release/1.4.1
Release/1.4.1
2 parents a0cc195 + 5208533 commit a5bb0d6

File tree

15 files changed

+294
-36
lines changed

15 files changed

+294
-36
lines changed

Diff for: .buildpacks

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
https://github.com/alex88/heroku-buildpack-vips
2+
https://github.com/Scalingo/nodejs-buildpack

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If you want to contribute to the project, start with [manual deployment](https:/
5151
CodiMD is highly customizable, learn about all configuration options of networking, security, performance, resources, privilege, privacy, image storage, and authentication in [CodiMD Configuration](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration).
5252

5353
### Upgrading and Migration
54-
Upgrade CodiMD from previous version? See [this guide](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-upgrade)
54+
Upgrade CodiMD from previous version? See [this guide](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-upgrade)<br>
5555
Migrating from Etherpad? Follow [this guide](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-migration-etherpad)
5656

5757
### Developer

Diff for: bin/manage_users

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ function getPass (argv, action) {
3737
async function createUser (argv) {
3838
const existingUser = await models.User.findOne({ where: { email: argv['add'] } })
3939
// Cannot create already-existing users
40-
if (existingUser !== undefined) {
40+
if (existingUser) {
4141
console.log(`User with e-mail ${existingUser.email} already exists! Aborting ...`)
42-
process.exit(1)
42+
process.exit(2)
4343
}
4444

4545
const pass = getPass(argv, 'add')
@@ -56,7 +56,7 @@ async function createUser (argv) {
5656
async function deleteUser (argv) {
5757
// Cannot delete non-existing users
5858
const existingUser = await models.User.findOne({ where: { email: argv['del'] } })
59-
if (existingUser === undefined) {
59+
if (!existingUser) {
6060
console.log(`User with e-mail ${argv['del']} does not exist, cannot delete`)
6161
process.exit(1)
6262
}
@@ -71,7 +71,7 @@ async function deleteUser (argv) {
7171
async function resetUser (argv) {
7272
const existingUser = await models.User.findOne({ where: { email: argv['reset'] } })
7373
// Cannot reset non-existing users
74-
if (existingUser === undefined) {
74+
if (!existingUser) {
7575
console.log(`User with e-mail ${argv['reset']} does not exist, cannot reset`)
7676
process.exit(1)
7777
}

Diff for: deployments/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN set -xe && \
1515
yarn.lock webpack.prod.js webpack.htmlexport.js webpack.dev.js webpack.common.js \
1616
config.json.example README.md CONTRIBUTING.md AUTHORS
1717

18-
FROM hackmdio/runtime:1.0.4
18+
FROM hackmdio/runtime:1.0.6
1919
USER hackmd
2020
WORKDIR /home/hackmd/app
2121
COPY --chown=1500:1500 --from=BUILD /home/hackmd/app .

Diff for: deployments/docker-compose.yml

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ services:
1010
- "database-data:/var/lib/postgresql/data"
1111
restart: always
1212
codimd:
13+
# you can use image or custom build below
14+
# image: nabo.codimd.dev/hackmdio/hackmd:1.4.0
1315
build:
1416
context: ..
1517
dockerfile: ./deployments/Dockerfile

Diff for: deployments/docker-entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [[ "$#" -gt 0 ]]; then
88
fi
99

1010
# check database and redis is ready
11-
pcheck -constr "$CMD_DB_URL"
11+
pcheck -env CMD_DB_URL
1212

1313
# run DB migrate
1414
NEED_MIGRATE=${CMD_AUTO_MIGRATE:=true}

Diff for: lib/web/imageRouter/minio.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Minio = require('minio')
1010
const minioClient = new Minio.Client({
1111
endPoint: config.minio.endPoint,
1212
port: config.minio.port,
13-
secure: config.minio.secure,
13+
useSSL: config.minio.secure,
1414
accessKey: config.minio.accessKey,
1515
secretKey: config.minio.secretKey
1616
})

Diff for: lib/web/imageRouter/s3.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ exports.uploadImage = function (imagePath, callback) {
2929
const params = {
3030
Bucket: config.s3bucket,
3131
Key: path.join('uploads', path.basename(imagePath)),
32-
Body: buffer
32+
Body: buffer,
33+
ACL: 'public-read'
3334
}
3435

3536
const mimeType = getImageMimeType(imagePath)

Diff for: package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codimd",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "Realtime collaborative markdown notes on all platforms.",
55
"keywords": [
66
"Collaborative",
@@ -101,10 +101,11 @@
101101
"mermaid": "~8.2.3",
102102
"method-override": "~3.0.0",
103103
"minimist": "~1.2.0",
104-
"minio": "~7.0.10",
104+
"minio": "^7.0.12",
105105
"moment": "~2.24.0",
106106
"morgan": "~1.9.1",
107107
"mysql": "~2.17.1",
108+
"mysql2": "^2.0.1",
108109
"passport": "~0.4.0",
109110
"passport-dropbox-oauth2": "~1.1.0",
110111
"passport-facebook": "~2.1.1",
@@ -129,7 +130,7 @@
129130
"reveal.js": "~3.7.0",
130131
"scrypt": "~6.0.3",
131132
"select2": "~3.5.2-browserify",
132-
"sequelize": "5.3.5",
133+
"sequelize": "5.15.1",
133134
"sequelize-cli": "~5.4.0",
134135
"shortid": "~2.2.14",
135136
"socket.io": "~2.2.0",

Diff for: public/docs/release-notes.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
Release Notes
22
===
33

4+
<i class="fa fa-tag"></i> 1.4.1 <i class="fa fa-clock-o"></i> 2019-12-13
5+
---
6+
7+
[CodiMD 1.4.1](https://github.com/hackmdio/codimd/releases/tag/1.4.1) is a minor release including bug fixes introduced in 1.4.0 and earlier versions. We encourage everyone to upgrade to 1.4.1 now. Also, we're preparing for the next major release, and you can see how things are going on [GitHub](https://github.com/hackmdio/codimd/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc+milestone%3ANext). Stay tuned, and we hope you love it!
8+
9+
### Fixes
10+
11+
- Fix urlpath in webpack build
12+
- Fix mysql not bundled in package.json
13+
- Fix minio image uploading
14+
- Fix pcheck not parsed url correctly
15+
- Fix manage_users script
16+
17+
### Enhancement
18+
19+
- Added Scalingo compatible deployment
20+
21+
[Check out the complete release note][v1_4_1]. Thank you CodiMD community and all our contributors. ❤️
22+
23+
[v1_4_1]: https://hackmd.io/@codimd/release-notes/%2F%40codimd%2Fv1_4_1
24+
425
<i class="fa fa-tag"></i> 1.4.0 Syrmaticus mikado <i class="fa fa-clock-o"></i> 2019-11-11
526
---
627

@@ -20,7 +41,7 @@ It has been over 200+ commits since our last release. These are the highlights f
2041
- [New Emoji sets][new-emoji]
2142
- [Slide mode plugins][slide-mode-plugins]: Elapsed time bar and Spotlight
2243

23-
[Go read the complete release note here][v1_4_0]. Thank you CodiMD community and all our contributors. ❤️
44+
[Check out the complete release note][v1_4_0]. Thank you CodiMD community and all our contributors. ❤️
2445

2546
[table-tools]: https://hackmd.io/@codimd/v1_4_0#New-Table-Tools
2647
[markdownlint]: https://hackmd.io/@codimd/v1_4_0#Markdownlint-integration

Diff for: public/js/lib/editor/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ export default class Editor {
331331
if (!this.statusBar) return
332332

333333
var cursor = this.editor.getCursor()
334-
var cursorText = 'Line ' + (cursor.line + 1) + ', Columns ' + (cursor.ch + 1)
334+
var cursorText = 'Line ' + (cursor.line + 1) + ', Column ' + (cursor.ch + 1)
335335
this.statusCursor.text(cursorText)
336336
var fileText = ' — ' + editor.lineCount() + ' Lines'
337337
this.statusFile.text(fileText)

Diff for: public/views/includes/header.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<% for (var css in htmlWebpackPlugin.files.css) { %>
2-
<link href="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
2+
<link href="<%= '\<\%= serverURL \%\>'%><%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
33
<% } %>

Diff for: public/views/includes/scripts.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<script src="<%= webpackConfig.output.baseUrl %>/config"></script>
22
<% for (var js in htmlWebpackPlugin.files.js) { %>
3-
<script src="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.js[js] %>" defer></script>
3+
<script src="<%= '\<\%= serverURL \%\>'%><%= htmlWebpackPlugin.files.js[js] %>" defer></script>
44
<% } %>

Diff for: scalingo.json

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
{
2+
"name": "CodiMD",
3+
"description": "Realtime collaborative markdown notes on all platforms",
4+
"keywords": [
5+
"Collaborative",
6+
"Markdown",
7+
"Notes"
8+
],
9+
"website": "https://github.com/hackmdio/codimd",
10+
"repository": "https://github.com/hackmdio/codimd",
11+
"logo": "https://github.com/hackmdio/codimd/raw/master/public/codimd-icon-1024.png",
12+
"success_url": "/",
13+
"env": {
14+
"NPM_CONFIG_PRODUCTION": {
15+
"description": "Let npm also install development build tool",
16+
"value": "false"
17+
},
18+
"CMD_SESSION_SECRET": {
19+
"description": "Secret used to secure session cookies.",
20+
"required": false
21+
},
22+
"CMD_HSTS_ENABLE": {
23+
"description": "whether to also use HSTS if HTTPS is enabled",
24+
"required": false
25+
},
26+
"CMD_HSTS_MAX_AGE": {
27+
"description": "max duration, in seconds, to tell clients to keep HSTS status",
28+
"required": false
29+
},
30+
"CMD_HSTS_INCLUDE_SUBDOMAINS": {
31+
"description": "whether to tell clients to also regard subdomains as HSTS hosts",
32+
"required": false
33+
},
34+
"CMD_HSTS_PRELOAD": {
35+
"description": "whether to allow at all adding of the site to HSTS preloads (e.g. in browsers)",
36+
"required": false
37+
},
38+
"CMD_DOMAIN": {
39+
"description": "domain name",
40+
"required": false
41+
},
42+
"CMD_URL_PATH": {
43+
"description": "sub url path, like `www.example.com/<URL_PATH>`",
44+
"required": false
45+
},
46+
"CMD_ALLOW_ORIGIN": {
47+
"description": "domain name whitelist (use comma to separate)",
48+
"required": false,
49+
"value": "localhost"
50+
},
51+
"CMD_PROTOCOL_USESSL": {
52+
"description": "set to use ssl protocol for resources path (only applied when domain is set)",
53+
"required": false
54+
},
55+
"CMD_URL_ADDPORT": {
56+
"description": "set to add port on callback url (port 80 or 443 won't applied) (only applied when domain is set)",
57+
"required": false
58+
},
59+
"CMD_FACEBOOK_CLIENTID": {
60+
"description": "Facebook API client id",
61+
"required": false
62+
},
63+
"CMD_FACEBOOK_CLIENTSECRET": {
64+
"description": "Facebook API client secret",
65+
"required": false
66+
},
67+
"CMD_TWITTER_CONSUMERKEY": {
68+
"description": "Twitter API consumer key",
69+
"required": false
70+
},
71+
"CMD_TWITTER_CONSUMERSECRET": {
72+
"description": "Twitter API consumer secret",
73+
"required": false
74+
},
75+
"CMD_GITHUB_CLIENTID": {
76+
"description": "GitHub API client id",
77+
"required": false
78+
},
79+
"CMD_GITHUB_CLIENTSECRET": {
80+
"description": "GitHub API client secret",
81+
"required": false
82+
},
83+
"CMD_GITLAB_BASEURL": {
84+
"description": "GitLab authentication endpoint, set to use other endpoint than GitLab.com (optional)",
85+
"required": false
86+
},
87+
"CMD_GITLAB_CLIENTID": {
88+
"description": "GitLab API client id",
89+
"required": false
90+
},
91+
"CMD_GITLAB_CLIENTSECRET": {
92+
"description": "GitLab API client secret",
93+
"required": false
94+
},
95+
"CMD_GITLAB_SCOPE": {
96+
"description": "GitLab API client scope (optional)",
97+
"required": false
98+
},
99+
"CMD_MATTERMOST_BASEURL": {
100+
"description": "Mattermost authentication endpoint",
101+
"required": false
102+
},
103+
"CMD_MATTERMOST_CLIENTID": {
104+
"description": "Mattermost API client id",
105+
"required": false
106+
},
107+
"CMD_MATTERMOST_CLIENTSECRET": {
108+
"description": "Mattermost API client secret",
109+
"required": false
110+
},
111+
"CMD_DROPBOX_CLIENTID": {
112+
"description": "Dropbox API client id",
113+
"required": false
114+
},
115+
"CMD_DROPBOX_CLIENTSECRET": {
116+
"description": "Dropbox API client secret",
117+
"required": false
118+
},
119+
"CMD_DROPBOX_APP_KEY": {
120+
"description": "Dropbox app key (for import/export)",
121+
"required": false
122+
},
123+
"CMD_GOOGLE_CLIENTID": {
124+
"description": "Google API client id",
125+
"required": false
126+
},
127+
"CMD_GOOGLE_CLIENTSECRET": {
128+
"description": "Google API client secret",
129+
"required": false
130+
},
131+
"CMD_IMGUR_CLIENTID": {
132+
"description": "Imgur API client id",
133+
"required": false
134+
},
135+
"CMD_ALLOW_PDF_EXPORT": {
136+
"description": "Enable or disable PDF exports",
137+
"required": false
138+
},
139+
"CMD_DB_URL": {
140+
"description": "Database query url",
141+
"value": "$DATABASE_URL"
142+
},
143+
"DYNO": {
144+
"description": "Require this env var for deploy correctly the app",
145+
"value": "Scalingo"
146+
}
147+
},
148+
"formation": {
149+
"web": {
150+
"amount": 1,
151+
"size": "S"
152+
}
153+
},
154+
"addons": [
155+
"postgresql:postgresql-sandbox"
156+
]
157+
}

0 commit comments

Comments
 (0)