From 4b477f562ec48a1eac30375d75e1a4981701f573 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 28 Jul 2017 17:24:19 -0600 Subject: [PATCH] rename package to walnut@daplie.com/init --- lib/bootstrap.js | 12 +++++++----- .../init}/css/bootstrap.css | 0 .../init}/index.html | 0 .../init}/js/index.js | 4 ++-- .../init}/js/jquery-2.2.2.js | 0 5 files changed, 9 insertions(+), 7 deletions(-) rename lib/{com.daplie.walnut.init => walnut@daplie.com/init}/css/bootstrap.css (100%) rename lib/{com.daplie.walnut.init => walnut@daplie.com/init}/index.html (100%) rename lib/{com.daplie.walnut.init => walnut@daplie.com/init}/js/index.js (97%) rename lib/{com.daplie.walnut.init => walnut@daplie.com/init}/js/jquery-2.2.2.js (100%) diff --git a/lib/bootstrap.js b/lib/bootstrap.js index 902c158..fa1e4e7 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -162,15 +162,17 @@ module.exports.create = function (app, xconfx, models) { // TODO How can we help apps handle this? token? // TODO allow apps to configure trustedDomains, auth, etc app.use('/api', cors); - app.get('/api/com.daplie.walnut.init', getConfig); - app.post('/api/com.daplie.walnut.init', setConfig); + app.get('/api/walnut@daplie.com/init', getConfig); + app.get('/api/com.daplie.walnut.init', getConfig); // deprecated + app.post('/api/walnut@daplie.com/init', setConfig); + app.post('/api/com.daplie.walnut.init', setConfig); // deprecated // TODO use package loader - //app.use('/', express.static(path.join(__dirname, '..', '..', 'packages', 'pages', 'com.daplie.walnut.init'))); - app.use('/', express.static(path.join(__dirname, 'com.daplie.walnut.init'))); + //app.use('/', express.static(path.join(__dirname, '..', '..', 'packages', 'pages', 'walnut@daplie.com', 'init'))); + app.use('/', express.static(path.join(__dirname, 'walnut@daplie.com', 'init'))); app.use('/', function (req, res, next) { res.statusCode = 404; - res.end('Walnut Bootstrap Not Found. Mising com.daplie.walnut.init'); + res.end('Walnut Bootstrap Not Found. Mising walnut@daplie.com/init'); }); return new PromiseA(function (_resolve) { diff --git a/lib/com.daplie.walnut.init/css/bootstrap.css b/lib/walnut@daplie.com/init/css/bootstrap.css similarity index 100% rename from lib/com.daplie.walnut.init/css/bootstrap.css rename to lib/walnut@daplie.com/init/css/bootstrap.css diff --git a/lib/com.daplie.walnut.init/index.html b/lib/walnut@daplie.com/init/index.html similarity index 100% rename from lib/com.daplie.walnut.init/index.html rename to lib/walnut@daplie.com/init/index.html diff --git a/lib/com.daplie.walnut.init/js/index.js b/lib/walnut@daplie.com/init/js/index.js similarity index 97% rename from lib/com.daplie.walnut.init/js/index.js rename to lib/walnut@daplie.com/init/js/index.js index b7adfcd..782ba5d 100644 --- a/lib/com.daplie.walnut.init/js/index.js +++ b/lib/walnut@daplie.com/init/js/index.js @@ -22,7 +22,7 @@ $(function () { return $.http({ method: 'GET' - , url: baseUrl + '/api/com.daplie.walnut.init' + , url: baseUrl + '/api/walnut@daplie.com/init' , headers: { "Accept" : "application/json; charset=utf-8" } @@ -83,7 +83,7 @@ $(function () { $.http({ method: 'POST' - , url: baseUrl + '/api/com.daplie.walnut.init' + , url: baseUrl + '/api/walnut@daplie.com/init' , headers: { "Accept" : "application/json; charset=utf-8" , "Content-Type": "application/json; charset=utf-8" diff --git a/lib/com.daplie.walnut.init/js/jquery-2.2.2.js b/lib/walnut@daplie.com/init/js/jquery-2.2.2.js similarity index 100% rename from lib/com.daplie.walnut.init/js/jquery-2.2.2.js rename to lib/walnut@daplie.com/init/js/jquery-2.2.2.js