From 34ebfa40fc7b9c9149dad1dedbdcc9e766c8f62c Mon Sep 17 00:00:00 2001 From: Ryan Burnette Date: Sat, 11 May 2019 20:57:53 -0400 Subject: [PATCH 1/6] trying --- greenlock-store-sequelize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/greenlock-store-sequelize.js b/greenlock-store-sequelize.js index 5631e7d..93c1bd0 100644 --- a/greenlock-store-sequelize.js +++ b/greenlock-store-sequelize.js @@ -17,9 +17,9 @@ module.exports.create = function (config={}) { // they don't, we'll use the baked-in db with its defaults. Sequelize = require('sequelize'); if (config.storeDatabaseUrl) { - sequelize = new Sequelize(config.storeDatabaseUrl); + sequelize = new Sequelize(config.storeDatabaseUrl,{ logging: false }); } else { - sequelize = new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3' }); + sequelize = new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3', logging: false }); } } -- 2.38.5 From c9cb28fb725e8ff0c649d190a7007754ec30682b Mon Sep 17 00:00:00 2001 From: Ryan Burnette Date: Sat, 11 May 2019 21:07:29 -0400 Subject: [PATCH 2/6] v --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6a53fe1..e663520 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@greenlock/store-sequelize", - "version": "3.0.0", + "version": "3.0.1-dev", "description": "A Sequelize-based certificate store for greenlock that supports wildcards.", "homepage": "https://git.rootprojects.org/root/greenlock-store-sequelize.js", "main": "greenlock-store-sequelize.js", -- 2.38.5 From c35d78032136bf596096c1717b1878b3254b845c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 11 May 2019 19:24:37 -0600 Subject: [PATCH 3/6] v3.0.1: fix missing dir --- greenlock-store-sequelize.js | 10 +++++++++- package-lock.json | 9 +++++++-- package.json | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/greenlock-store-sequelize.js b/greenlock-store-sequelize.js index 5631e7d..ae80c49 100644 --- a/greenlock-store-sequelize.js +++ b/greenlock-store-sequelize.js @@ -1,5 +1,7 @@ 'use strict'; +var mkdirp = require('@root/mkdirp'); + module.exports.create = function (config={}) { var store = { options: {}, @@ -19,7 +21,13 @@ module.exports.create = function (config={}) { if (config.storeDatabaseUrl) { sequelize = new Sequelize(config.storeDatabaseUrl); } else { - sequelize = new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3' }); + sequelize = new Promise(function (resolve, reject) { + confDir = confDir.replace(/~\//, require('os').homedir()); + mkdirp(confDir, function (err) { + if (err) { reject(err); return; } + resolve(new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3' })); + }); + }); } } diff --git a/package-lock.json b/package-lock.json index a620df0..7e2e9a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,14 @@ { - "name": "greenlock-store-sequelize", - "version": "1.0.0", + "name": "@greenlock/store-sequelize", + "version": "3.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { + "@root/mkdirp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@root/mkdirp/-/mkdirp-1.0.0.tgz", + "integrity": "sha512-hxGAYUx5029VggfG+U9naAhQkoMSXtOeXtbql97m3Hi6/sQSRL/4khKZPyOF6w11glyCOU38WCNLu9nUcSjOfA==" + }, "@types/node": { "version": "11.13.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.0.tgz", diff --git a/package.json b/package.json index 6a53fe1..a23cddc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@greenlock/store-sequelize", - "version": "3.0.0", + "version": "3.0.1", "description": "A Sequelize-based certificate store for greenlock that supports wildcards.", "homepage": "https://git.rootprojects.org/root/greenlock-store-sequelize.js", "main": "greenlock-store-sequelize.js", @@ -29,6 +29,7 @@ ], "license": "MPL-2.0", "dependencies": { + "@root/mkdirp": "^1.0.0", "sequelize": "^5.2.11" }, "devDependencies": {}, -- 2.38.5 From 7c5a0a48ba3f135f4962486d211188b0a5f540d3 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 11 May 2019 19:28:58 -0600 Subject: [PATCH 4/6] v3.0.1: fix missing dir --- greenlock-store-sequelize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/greenlock-store-sequelize.js b/greenlock-store-sequelize.js index ae80c49..223e563 100644 --- a/greenlock-store-sequelize.js +++ b/greenlock-store-sequelize.js @@ -22,7 +22,7 @@ module.exports.create = function (config={}) { sequelize = new Sequelize(config.storeDatabaseUrl); } else { sequelize = new Promise(function (resolve, reject) { - confDir = confDir.replace(/~\//, require('os').homedir()); + confDir = confDir.replace(/~\//, require('os').homedir() + '/'); mkdirp(confDir, function (err) { if (err) { reject(err); return; } resolve(new Sequelize({ dialect: 'sqlite', storage: confDir + '/db.sqlite3' })); -- 2.38.5 From 920cb2cc6a03066e1ea5d728953ea370bc373946 Mon Sep 17 00:00:00 2001 From: Ryan Burnette Date: Sat, 11 May 2019 21:32:57 -0400 Subject: [PATCH 5/6] ver --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7d2bce5..a23cddc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@greenlock/store-sequelize", - "version": "3.0.2-dev", + "version": "3.0.1", "description": "A Sequelize-based certificate store for greenlock that supports wildcards.", "homepage": "https://git.rootprojects.org/root/greenlock-store-sequelize.js", "main": "greenlock-store-sequelize.js", -- 2.38.5 From 44ed8aaf928a666f012c75fb16d8e0cb745fa84e Mon Sep 17 00:00:00 2001 From: Ryan Burnette Date: Sat, 11 May 2019 21:34:27 -0400 Subject: [PATCH 6/6] space after comma --- greenlock-store-sequelize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/greenlock-store-sequelize.js b/greenlock-store-sequelize.js index fdd59a6..b65b1da 100644 --- a/greenlock-store-sequelize.js +++ b/greenlock-store-sequelize.js @@ -19,7 +19,7 @@ module.exports.create = function (config={}) { // they don't, we'll use the baked-in db with its defaults. Sequelize = require('sequelize'); if (config.storeDatabaseUrl) { - sequelize = new Sequelize(config.storeDatabaseUrl,{ logging: false }); + sequelize = new Sequelize(config.storeDatabaseUrl, { logging: false }); } else { sequelize = new Promise(function (resolve, reject) { confDir = confDir.replace(/~\//, require('os').homedir() + '/'); -- 2.38.5