From 69702bd2a9ba8828770c24efeff5d6a656578a5b Mon Sep 17 00:00:00 2001 From: uzquiano Date: Thu, 10 Aug 2017 11:58:16 -0400 Subject: [PATCH] Switch to new uuid, libraries update, fix to dependency tag render for inner content --- duster/helpers/core/cloudcms/wcm/dependency.js | 6 +++--- middleware/deployment/deployment.js | 4 ++-- package.json | 6 +++--- util/hosts.js | 1 - util/util.js | 6 +++--- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/duster/helpers/core/cloudcms/wcm/dependency.js b/duster/helpers/core/cloudcms/wcm/dependency.js index 4a97dd9e..08cb3814 100644 --- a/duster/helpers/core/cloudcms/wcm/dependency.js +++ b/duster/helpers/core/cloudcms/wcm/dependency.js @@ -53,7 +53,7 @@ module.exports = function(app, dust, callback) var key = context.resolve(params.key); var value = context.resolve(params.value); - return map(chunk, function(chunk) { + return map(chunk, function(chunk2) { // TRACKER: START tracker.start(context); @@ -74,8 +74,8 @@ module.exports = function(app, dust, callback) console.log("Unknown type for @dependency tag: " + type); } - // keep going - end(chunk, context); + // render whatever is inside the tag and keep going + return chunk2.render( bodies.block, context ); }); }; diff --git a/middleware/deployment/deployment.js b/middleware/deployment/deployment.js index f37ed017..574abe72 100644 --- a/middleware/deployment/deployment.js +++ b/middleware/deployment/deployment.js @@ -2,7 +2,7 @@ var path = require('path'); var fs = require('fs'); var http = require('http'); var util = require("../../util/util"); -var uuid = require("node-uuid"); +var uuidv4 = require("uuid/v4"); var Gitana = require("gitana"); var duster = require("../../duster/index"); @@ -38,7 +38,7 @@ exports = module.exports = function() } // otherwise, we generate a host - var host = uuid.v4() + "-hosted." + descriptor.domain; + var host = uuidv4() + "-hosted." + descriptor.domain; callback(null, host); }; diff --git a/package.json b/package.json index 063d8311..3a111b02 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ }, "name": "cloudcms-server", "description": "Cloud CMS Application Server Module", - "version": "0.8.420", + "version": "0.8.421", "repository": { "type": "git", "url": "git://github.com/gitana/cloudcms-server.git" @@ -49,7 +49,7 @@ "moment": "^2.15.1", "morgan": "^1.7.0", "node-redis-pubsub": "^1.0.0", - "node-uuid": "^1.4.7", + "uuid": "^3.1.0", "object-hash": "^1.1.4", "object-merge": "^2.5.1", "on-headers": "^1.0.1", @@ -80,7 +80,7 @@ "tar.gz": "^1.0.5", "temp": "^0.8.3", "toobusy-js": "^0.5.1", - "watch": "^0.19.2", + "watch": "^1.0.2", "basic-logger": "^0.4.4" }, "devDependencies": {}, diff --git a/util/hosts.js b/util/hosts.js index 5a5d4954..4219c1d9 100644 --- a/util/hosts.js +++ b/util/hosts.js @@ -1,7 +1,6 @@ var path = require('path'); var fs = require('fs'); var util = require("./util"); -var uuid = require("node-uuid"); exports = module.exports; diff --git a/util/util.js b/util/util.js index 89257f3a..263a10e6 100644 --- a/util/util.js +++ b/util/util.js @@ -3,7 +3,7 @@ var path = require("path"); var mkdirp = require('mkdirp'); var request = require("request"); var mime = require("mime"); -var uuid = require("node-uuid"); +var uuidv4 = require("uuid/v4"); var os = require("os"); var async = require("async"); var temp = require("temp"); @@ -924,7 +924,7 @@ var replaceAll = exports.replaceAll = function(text, find, replace) var createTempDirectory = exports.createTempDirectory = function(callback) { - var tempDirectory = path.join(os.tmpdir(), "/tmp-" + uuid.v4()); + var tempDirectory = path.join(os.tmpdir(), "/tmp-" + guid()); mkdirs(tempDirectory, function(err) { callback(err, tempDirectory); @@ -1513,7 +1513,7 @@ var countOpenHandles = exports.countOpenHandles = function(callback) var guid = exports.guid = function() { - return uuid.v4(); + return uuidv4(); }; var bytesToSize = exports.bytesToSize = function(bytes)