Skip to content

Release/1.4.1 #1379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Dec 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e6a3a79
Bump sequelize from 5.3.5 to 5.15.1
dependabot[bot] Nov 10, 2019
83274b8
Bump sequelize from 5.3.5 to 5.15.1 (#1343)
Yukaii Nov 10, 2019
56a35f5
Add line break to README migration section
Yukaii Nov 14, 2019
daafd21
Add line break to README migration section (#1349)
Yukaii Nov 15, 2019
5002ec4
Merge branch 'master' into develop
Yukaii Nov 15, 2019
f1594c5
feat: upgrade base image to resolve pcheck issues
a60814billy Nov 28, 2019
76f4c00
Merge pull request #1357 from hackmdio/fix/pcheck-related-issues
jackycute Nov 29, 2019
abde890
Added Scalingo compatible deployment
brandon-welsch Nov 28, 2019
f7ef491
fix: mysql2 not install
a60814billy Nov 30, 2019
5472622
fix: mysql2 not install (#1362)
jackycute Nov 30, 2019
db0ee65
fix: correct to singular location
quite Dec 1, 2019
7257956
Merge pull request #1365 from quite/fixlocation
jackycute Dec 2, 2019
f0c26b3
Merge pull request #1360 from brandon-welsch/feature/scalingo_deployment
Yukaii Dec 2, 2019
45d4daf
Check for falsy existingUser variable. Fixes #1369
soerface Dec 5, 2019
510ccf7
Merge pull request #1370 from soerface/patch-1
jackycute Dec 5, 2019
3fe6ec7
Explicitely set uploaded image ACLs for S3 to "public-read"
djmaze Dec 5, 2019
b771baf
Explicitely set uploaded image ACLs for S3 to "public-read" (#1371)
Yukaii Dec 6, 2019
d212d3f
fix: minio cannot upload caused by package upgrade
a60814billy Dec 12, 2019
054dd40
Merge pull request #1376 from hackmdio/fix/minio-can-not-upload
jackycute Dec 12, 2019
8629670
feat(imageUpload): upgrade minio version to 7.0.12
a60814billy Dec 13, 2019
d5ed691
feat(imageUpload): upgrade minio version to 7.0.12 (#1377)
jackycute Dec 13, 2019
a1c5c68
Fix urlpath in webpack build
Yukaii Dec 13, 2019
b634ee2
Merge pull request #1378 from hackmdio/bugfix/urlpath
jackycute Dec 13, 2019
7d3931d
Bump version to 1.4.1
Yukaii Dec 13, 2019
5208533
Update 1.4.1 release note
Yukaii Dec 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .buildpacks
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://github.com/alex88/heroku-buildpack-vips
https://github.com/Scalingo/nodejs-buildpack
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ If you want to contribute to the project, start with [manual deployment](https:/
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).

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

### Developer
Expand Down
8 changes: 4 additions & 4 deletions bin/manage_users
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ function getPass (argv, action) {
async function createUser (argv) {
const existingUser = await models.User.findOne({ where: { email: argv['add'] } })
// Cannot create already-existing users
if (existingUser !== undefined) {
if (existingUser) {
console.log(`User with e-mail ${existingUser.email} already exists! Aborting ...`)
process.exit(1)
process.exit(2)
}

const pass = getPass(argv, 'add')
Expand All @@ -56,7 +56,7 @@ async function createUser (argv) {
async function deleteUser (argv) {
// Cannot delete non-existing users
const existingUser = await models.User.findOne({ where: { email: argv['del'] } })
if (existingUser === undefined) {
if (!existingUser) {
console.log(`User with e-mail ${argv['del']} does not exist, cannot delete`)
process.exit(1)
}
Expand All @@ -71,7 +71,7 @@ async function deleteUser (argv) {
async function resetUser (argv) {
const existingUser = await models.User.findOne({ where: { email: argv['reset'] } })
// Cannot reset non-existing users
if (existingUser === undefined) {
if (!existingUser) {
console.log(`User with e-mail ${argv['reset']} does not exist, cannot reset`)
process.exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion deployments/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN set -xe && \
yarn.lock webpack.prod.js webpack.htmlexport.js webpack.dev.js webpack.common.js \
config.json.example README.md CONTRIBUTING.md AUTHORS

FROM hackmdio/runtime:1.0.4
FROM hackmdio/runtime:1.0.6
USER hackmd
WORKDIR /home/hackmd/app
COPY --chown=1500:1500 --from=BUILD /home/hackmd/app .
Expand Down
2 changes: 2 additions & 0 deletions deployments/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ services:
- "database-data:/var/lib/postgresql/data"
restart: always
codimd:
# you can use image or custom build below
# image: nabo.codimd.dev/hackmdio/hackmd:1.4.0
build:
context: ..
dockerfile: ./deployments/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion deployments/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ "$#" -gt 0 ]]; then
fi

# check database and redis is ready
pcheck -constr "$CMD_DB_URL"
pcheck -env CMD_DB_URL

# run DB migrate
NEED_MIGRATE=${CMD_AUTO_MIGRATE:=true}
Expand Down
2 changes: 1 addition & 1 deletion lib/web/imageRouter/minio.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Minio = require('minio')
const minioClient = new Minio.Client({
endPoint: config.minio.endPoint,
port: config.minio.port,
secure: config.minio.secure,
useSSL: config.minio.secure,
accessKey: config.minio.accessKey,
secretKey: config.minio.secretKey
})
Expand Down
3 changes: 2 additions & 1 deletion lib/web/imageRouter/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ exports.uploadImage = function (imagePath, callback) {
const params = {
Bucket: config.s3bucket,
Key: path.join('uploads', path.basename(imagePath)),
Body: buffer
Body: buffer,
ACL: 'public-read'
}

const mimeType = getImageMimeType(imagePath)
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codimd",
"version": "1.4.0",
"version": "1.4.1",
"description": "Realtime collaborative markdown notes on all platforms.",
"keywords": [
"Collaborative",
Expand Down Expand Up @@ -101,10 +101,11 @@
"mermaid": "~8.2.3",
"method-override": "~3.0.0",
"minimist": "~1.2.0",
"minio": "~7.0.10",
"minio": "^7.0.12",
"moment": "~2.24.0",
"morgan": "~1.9.1",
"mysql": "~2.17.1",
"mysql2": "^2.0.1",
"passport": "~0.4.0",
"passport-dropbox-oauth2": "~1.1.0",
"passport-facebook": "~2.1.1",
Expand All @@ -129,7 +130,7 @@
"reveal.js": "~3.7.0",
"scrypt": "~6.0.3",
"select2": "~3.5.2-browserify",
"sequelize": "5.3.5",
"sequelize": "5.15.1",
"sequelize-cli": "~5.4.0",
"shortid": "~2.2.14",
"socket.io": "~2.2.0",
Expand Down
23 changes: 22 additions & 1 deletion public/docs/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
Release Notes
===

<i class="fa fa-tag"></i> 1.4.1 <i class="fa fa-clock-o"></i> 2019-12-13
---

[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!

### Fixes

- Fix urlpath in webpack build
- Fix mysql not bundled in package.json
- Fix minio image uploading
- Fix pcheck not parsed url correctly
- Fix manage_users script

### Enhancement

- Added Scalingo compatible deployment

[Check out the complete release note][v1_4_1]. Thank you CodiMD community and all our contributors. ❤️

[v1_4_1]: https://hackmd.io/@codimd/release-notes/%2F%40codimd%2Fv1_4_1

<i class="fa fa-tag"></i> 1.4.0 Syrmaticus mikado <i class="fa fa-clock-o"></i> 2019-11-11
---

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

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

[table-tools]: https://hackmd.io/@codimd/v1_4_0#New-Table-Tools
[markdownlint]: https://hackmd.io/@codimd/v1_4_0#Markdownlint-integration
Expand Down
2 changes: 1 addition & 1 deletion public/js/lib/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export default class Editor {
if (!this.statusBar) return

var cursor = this.editor.getCursor()
var cursorText = 'Line ' + (cursor.line + 1) + ', Columns ' + (cursor.ch + 1)
var cursorText = 'Line ' + (cursor.line + 1) + ', Column ' + (cursor.ch + 1)
this.statusCursor.text(cursorText)
var fileText = ' — ' + editor.lineCount() + ' Lines'
this.statusFile.text(fileText)
Expand Down
2 changes: 1 addition & 1 deletion public/views/includes/header.ejs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<% for (var css in htmlWebpackPlugin.files.css) { %>
<link href="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
<link href="<%= '\<\%= serverURL \%\>'%><%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
<% } %>
2 changes: 1 addition & 1 deletion public/views/includes/scripts.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script src="<%= webpackConfig.output.baseUrl %>/config"></script>
<% for (var js in htmlWebpackPlugin.files.js) { %>
<script src="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.js[js] %>" defer></script>
<script src="<%= '\<\%= serverURL \%\>'%><%= htmlWebpackPlugin.files.js[js] %>" defer></script>
<% } %>
157 changes: 157 additions & 0 deletions scalingo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
"name": "CodiMD",
"description": "Realtime collaborative markdown notes on all platforms",
"keywords": [
"Collaborative",
"Markdown",
"Notes"
],
"website": "https://github.com/hackmdio/codimd",
"repository": "https://github.com/hackmdio/codimd",
"logo": "https://github.com/hackmdio/codimd/raw/master/public/codimd-icon-1024.png",
"success_url": "/",
"env": {
"NPM_CONFIG_PRODUCTION": {
"description": "Let npm also install development build tool",
"value": "false"
},
"CMD_SESSION_SECRET": {
"description": "Secret used to secure session cookies.",
"required": false
},
"CMD_HSTS_ENABLE": {
"description": "whether to also use HSTS if HTTPS is enabled",
"required": false
},
"CMD_HSTS_MAX_AGE": {
"description": "max duration, in seconds, to tell clients to keep HSTS status",
"required": false
},
"CMD_HSTS_INCLUDE_SUBDOMAINS": {
"description": "whether to tell clients to also regard subdomains as HSTS hosts",
"required": false
},
"CMD_HSTS_PRELOAD": {
"description": "whether to allow at all adding of the site to HSTS preloads (e.g. in browsers)",
"required": false
},
"CMD_DOMAIN": {
"description": "domain name",
"required": false
},
"CMD_URL_PATH": {
"description": "sub url path, like `www.example.com/<URL_PATH>`",
"required": false
},
"CMD_ALLOW_ORIGIN": {
"description": "domain name whitelist (use comma to separate)",
"required": false,
"value": "localhost"
},
"CMD_PROTOCOL_USESSL": {
"description": "set to use ssl protocol for resources path (only applied when domain is set)",
"required": false
},
"CMD_URL_ADDPORT": {
"description": "set to add port on callback url (port 80 or 443 won't applied) (only applied when domain is set)",
"required": false
},
"CMD_FACEBOOK_CLIENTID": {
"description": "Facebook API client id",
"required": false
},
"CMD_FACEBOOK_CLIENTSECRET": {
"description": "Facebook API client secret",
"required": false
},
"CMD_TWITTER_CONSUMERKEY": {
"description": "Twitter API consumer key",
"required": false
},
"CMD_TWITTER_CONSUMERSECRET": {
"description": "Twitter API consumer secret",
"required": false
},
"CMD_GITHUB_CLIENTID": {
"description": "GitHub API client id",
"required": false
},
"CMD_GITHUB_CLIENTSECRET": {
"description": "GitHub API client secret",
"required": false
},
"CMD_GITLAB_BASEURL": {
"description": "GitLab authentication endpoint, set to use other endpoint than GitLab.com (optional)",
"required": false
},
"CMD_GITLAB_CLIENTID": {
"description": "GitLab API client id",
"required": false
},
"CMD_GITLAB_CLIENTSECRET": {
"description": "GitLab API client secret",
"required": false
},
"CMD_GITLAB_SCOPE": {
"description": "GitLab API client scope (optional)",
"required": false
},
"CMD_MATTERMOST_BASEURL": {
"description": "Mattermost authentication endpoint",
"required": false
},
"CMD_MATTERMOST_CLIENTID": {
"description": "Mattermost API client id",
"required": false
},
"CMD_MATTERMOST_CLIENTSECRET": {
"description": "Mattermost API client secret",
"required": false
},
"CMD_DROPBOX_CLIENTID": {
"description": "Dropbox API client id",
"required": false
},
"CMD_DROPBOX_CLIENTSECRET": {
"description": "Dropbox API client secret",
"required": false
},
"CMD_DROPBOX_APP_KEY": {
"description": "Dropbox app key (for import/export)",
"required": false
},
"CMD_GOOGLE_CLIENTID": {
"description": "Google API client id",
"required": false
},
"CMD_GOOGLE_CLIENTSECRET": {
"description": "Google API client secret",
"required": false
},
"CMD_IMGUR_CLIENTID": {
"description": "Imgur API client id",
"required": false
},
"CMD_ALLOW_PDF_EXPORT": {
"description": "Enable or disable PDF exports",
"required": false
},
"CMD_DB_URL": {
"description": "Database query url",
"value": "$DATABASE_URL"
},
"DYNO": {
"description": "Require this env var for deploy correctly the app",
"value": "Scalingo"
}
},
"formation": {
"web": {
"amount": 1,
"size": "S"
}
},
"addons": [
"postgresql:postgresql-sandbox"
]
}
Loading