lux-framework
Advanced tools
Comparing version 0.0.1-beta.2 to 0.0.1-beta.3
@@ -1,1 +0,1 @@ | ||
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _regenerator=require("babel-runtime/regenerator"),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require("babel-runtime/helpers/asyncToGenerator"),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_commander=require("commander"),_commander2=_interopRequireDefault(_commander),_test=require("./commands/test"),_test2=_interopRequireDefault(_test),_serve=require("./commands/serve"),_serve2=_interopRequireDefault(_serve),_create=require("./commands/create"),_create2=_interopRequireDefault(_create),_destroy=require("./commands/destroy"),_destroy2=_interopRequireDefault(_destroy),_generate=require("./commands/generate"),_generate2=_interopRequireDefault(_generate),_tryCatch=require("../../utils/try-catch"),_tryCatch2=_interopRequireDefault(_tryCatch);_commander2["default"].version("0.0.1-beta.2"),_commander2["default"].command("n <name>").alias("new").description("Create a new application").action(function(){var e=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(e){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function t(){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,_create2["default"])(e);case 2:case"end":return r.stop()}},t,void 0)})),function(e){console.error(e),process.exit(1)});case 2:case"end":return r.stop()}},r,void 0)}));return function(r){return e.apply(this,arguments)}}()),_commander2["default"].command("t").alias("test").description("Run your app's tests").action(function(){var e=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(){return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(){return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_test2["default"])();case 2:case"end":return e.stop()}},r,void 0)})),function(e){console.error(e),process.exit(1)});case 2:case"end":return e.stop()}},r,void 0)}));return function(r){return e.apply(this,arguments)}}()),_commander2["default"].command("s").alias("serve").description("Serve your application").option("-e, --environment","(Default: development)").option("-p, --port","(Default: 4000)").action(function(){var e=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(){var e;return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return e=4e3,t.forEach(function(r){/^\d+$/gi.test(r)?e=parseInt(r,10):/^\w+$/gi.test(r)&&(process.env.NODE_ENV=r)}),r.next=4,(0,_serve2["default"])(e);case 4:case"end":return r.stop()}},r,void 0)})),function(e){console.error(e),process.exit(1)});case 2:case"end":return e.stop()}},r,void 0)}));return function(r){return e.apply(this,arguments)}}()),_commander2["default"].command("g").alias("generate").description("Example: lux generate model user").option("type").option("name").action(function(){var e=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(e,t){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function n(){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if("string"!=typeof e||"string"!=typeof t){r.next=5;break}return r.next=3,(0,_generate2["default"])(e,t);case 3:r.next=6;break;case 5:throw new TypeError("Invalid arguements for type or name");case 6:case"end":return r.stop()}},n,void 0)})),function(e){console.error(e),process.exit(1)});case 2:case"end":return r.stop()}},r,void 0)}));return function(r,t){return e.apply(this,arguments)}}()),_commander2["default"].command("d").alias("destroy").description("Example: lux destroy model user").option("type").option("name").action(function(){var e=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(e,t){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function n(){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if("string"!=typeof e||"string"!=typeof t){r.next=5;break}return r.next=3,(0,_destroy2["default"])(e,t);case 3:r.next=6;break;case 5:throw new TypeError("Invalid arguements for type or name");case 6:case"end":return r.stop()}},n,void 0)})),function(e){console.error(e),process.exit(1)});case 2:case"end":return r.stop()}},r,void 0)}));return function(r,t){return e.apply(this,arguments)}}()),_commander2["default"].parse(process.argv); | ||
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _regenerator=require("babel-runtime/regenerator"),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require("babel-runtime/helpers/asyncToGenerator"),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_commander=require("commander"),_commander2=_interopRequireDefault(_commander),_test=require("./commands/test"),_test2=_interopRequireDefault(_test),_serve=require("./commands/serve"),_serve2=_interopRequireDefault(_serve),_create=require("./commands/create"),_create2=_interopRequireDefault(_create),_destroy=require("./commands/destroy"),_destroy2=_interopRequireDefault(_destroy),_generate=require("./commands/generate"),_generate2=_interopRequireDefault(_generate),_tryCatch=require("../../utils/try-catch"),_tryCatch2=_interopRequireDefault(_tryCatch);_commander2["default"].version("0.0.1-beta.3"),_commander2["default"].command("n <name>").alias("new").description("Create a new application").action(function(){var e=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(e){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function t(){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,_create2["default"])(e);case 2:case"end":return r.stop()}},t,void 0)})),function(e){console.error(e),process.exit(1)});case 2:case"end":return r.stop()}},r,void 0)}));return function(r){return e.apply(this,arguments)}}()),_commander2["default"].command("t").alias("test").description("Run your app's tests").action(function(){var e=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(){return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(){return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_test2["default"])();case 2:case"end":return e.stop()}},r,void 0)})),function(e){console.error(e),process.exit(1)});case 2:case"end":return e.stop()}},r,void 0)}));return function(r){return e.apply(this,arguments)}}()),_commander2["default"].command("s").alias("serve").description("Serve your application").option("-e, --environment","(Default: development)").option("-p, --port","(Default: 4000)").action(function(){var e=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(){var e;return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return e=4e3,t.forEach(function(r){/^\d+$/gi.test(r)?e=parseInt(r,10):/^\w+$/gi.test(r)&&(process.env.NODE_ENV=r)}),r.next=4,(0,_serve2["default"])(e);case 4:case"end":return r.stop()}},r,void 0)})),function(e){console.error(e),process.exit(1)});case 2:case"end":return e.stop()}},r,void 0)}));return function(r){return e.apply(this,arguments)}}()),_commander2["default"].command("g").alias("generate").description("Example: lux generate model user").option("type").option("name").action(function(){var e=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(e,t){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function n(){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if("string"!=typeof e||"string"!=typeof t){r.next=5;break}return r.next=3,(0,_generate2["default"])(e,t);case 3:r.next=6;break;case 5:throw new TypeError("Invalid arguements for type or name");case 6:case"end":return r.stop()}},n,void 0)})),function(e){console.error(e),process.exit(1)});case 2:case"end":return r.stop()}},r,void 0)}));return function(r,t){return e.apply(this,arguments)}}()),_commander2["default"].command("d").alias("destroy").description("Example: lux destroy model user").option("type").option("name").action(function(){var e=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function r(e,t){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function n(){return _regenerator2["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if("string"!=typeof e||"string"!=typeof t){r.next=5;break}return r.next=3,(0,_destroy2["default"])(e,t);case 3:r.next=6;break;case 5:throw new TypeError("Invalid arguements for type or name");case 6:case"end":return r.stop()}},n,void 0)})),function(e){console.error(e),process.exit(1)});case 2:case"end":return r.stop()}},r,void 0)}));return function(r,t){return e.apply(this,arguments)}}()),_commander2["default"].parse(process.argv); |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=function(n){return n=n.replace("-","_"),('\n{\n "development": {\n "username": "root",\n "password": "root",\n "database": "'+n+'_dev",\n "host": "127.0.0.1",\n "dialect": "mysql",\n "logging": false\n },\n "test": {\n "username": "root",\n "password": "root",\n "database": "'+n+'_test",\n "host": "127.0.0.1",\n "dialect": "mysql",\n "logging": false\n },\n "production": {\n "username": "root",\n "password": "root",\n "database": "'+n+'_prod",\n "host": "127.0.0.1",\n "dialect": "mysql",\n "logging": false\n }\n}\n ').substr(1).trim()}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=function(n){return n=n.replace("-","_"),('\n{\n "development": {\n "username": "root",\n "password": "root",\n "database": "'+n+'_dev",\n "host": "127.0.0.1",\n "port": "3306",\n "dialect": "mysql",\n "logging": false\n },\n "test": {\n "username": "root",\n "password": "root",\n "database": "'+n+'_test",\n "host": "127.0.0.1",\n "port": "3306",\n "dialect": "mysql",\n "logging": false\n },\n "production": {\n "username": "root",\n "password": "root",\n "database": "'+n+'_prod",\n "host": "127.0.0.1",\n "port": "3306",\n "dialect": "mysql",\n "logging": false\n }\n}\n ').substr(1).trim()}; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=function(e){return('\n{\n "name": "'+e+'",\n "version": "0.0.1",\n "description": "",\n "main": "bin/app.js",\n "scripts": {\n "start": "lux serve",\n "test": "lux test"\n },\n "author": "",\n "license": "MIT",\n "dependencies": {\n "lux-framework": "0.0.1-beta.2",\n "babel-core": "6.7.4",\n "babel-eslint": "6.0.2",\n "babel-plugin-transform-decorators-legacy": "1.3.4",\n "babel-plugin-transform-runtime": "6.6.0",\n "babel-preset-es2015": "6.6.0",\n "babel-preset-stage-1": "6.5.0",\n "babel-runtime": "6.6.1",\n "mysql": "2.10.2"\n }\n}\n ').substr(1).trim()}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=function(e){return('\n{\n "name": "'+e+'",\n "version": "0.0.1",\n "description": "",\n "main": "bin/app.js",\n "scripts": {\n "start": "lux serve",\n "test": "lux test"\n },\n "author": "",\n "license": "MIT",\n "dependencies": {\n "lux-framework": "0.0.1-beta.3",\n "babel-core": "6.7.4",\n "babel-eslint": "6.0.2",\n "babel-plugin-transform-decorators-legacy": "1.3.4",\n "babel-plugin-transform-runtime": "6.6.0",\n "babel-preset-es2015": "6.6.0",\n "babel-preset-stage-1": "6.5.0",\n "babel-runtime": "6.6.1",\n "mysql": "2.10.2"\n }\n}\n ').substr(1).trim()}; |
@@ -1,1 +0,1 @@ | ||
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _applyDecoratedDescriptor(e,r,t,a,i){var o={};return Object.keys(a).forEach(function(e){o[e]=a[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=t.slice().reverse().reduce(function(t,a){return a(e,r,t)||t},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,r,o),o=null),o}Object.defineProperty(exports,"__esModule",{value:!0}),exports.line=void 0;var _getOwnPropertyDescriptor=require("babel-runtime/core-js/object/get-own-property-descriptor"),_getOwnPropertyDescriptor2=_interopRequireDefault(_getOwnPropertyDescriptor),_regenerator=require("babel-runtime/regenerator"),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require("babel-runtime/helpers/asyncToGenerator"),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_setImmediate2=require("babel-runtime/core-js/set-immediate"),_setImmediate3=_interopRequireDefault(_setImmediate2),_getPrototypeOf=require("babel-runtime/core-js/object/get-prototype-of"),_getPrototypeOf2=_interopRequireDefault(_getPrototypeOf),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),_possibleConstructorReturn2=require("babel-runtime/helpers/possibleConstructorReturn"),_possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2),_get2=require("babel-runtime/helpers/get"),_get3=_interopRequireDefault(_get2),_inherits2=require("babel-runtime/helpers/inherits"),_inherits3=_interopRequireDefault(_inherits2),_desc,_value,_class,_moment=require("moment"),_moment2=_interopRequireDefault(_moment),_safe=require("colors/safe"),_base=require("../base"),_base2=_interopRequireDefault(_base),_fs=require("../fs"),_fs2=_interopRequireDefault(_fs),_write=require("./utils/write"),_write2=_interopRequireDefault(_write),_tryCatch=require("../../utils/try-catch"),_tryCatch2=_interopRequireDefault(_tryCatch),_bound=require("../../decorators/bound"),_bound2=_interopRequireDefault(_bound),_memoize=require("../../decorators/memoize"),_memoize2=_interopRequireDefault(_memoize),_line2=require("./utils/line"),_line3=_interopRequireDefault(_line2),Logger=(_class=function(e){function r(){return(0,_classCallCheck3["default"])(this,r),(0,_possibleConstructorReturn3["default"])(this,(0,_getPrototypeOf2["default"])(r).apply(this,arguments))}return(0,_inherits3["default"])(r,e),(0,_createClass3["default"])(r,[{key:"log",value:function(e){var r=this.file,t=this.timestamp;e=(0,_safe.dim)("["+t+"]")+" "+e+"\n",process.stdout.write(e),(0,_setImmediate3["default"])(_write2["default"],r,e)}},{key:"error",value:function(e){var r=this.file,t=this.timestamp;e=(0,_safe.red)("["+t+"]")+" "+e+"\n",process.stderr.write(e),(0,_setImmediate3["default"])(_write2["default"],r,e)}},{key:"file",get:function(){return this.root+"/log/"+this.environment+".log"}},{key:"timestamp",get:function(){return(0,_moment2["default"])().format("M/d/YY h:m:ss A")}}],[{key:"create",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function a(e){var t,i,o,n,u=this;return _regenerator2["default"].wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=(0,_get3["default"])((0,_getPrototypeOf2["default"])(r),"create",this).call(this,e),i=t.root,o=t.environment,n=!1,a.next=6,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function s(){return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_fs2["default"].mkdirAsync(i+"/log");case 2:case"end":return e.stop()}},s,u)})),function(){});case 6:return a.next=8,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function l(){return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_fs2["default"].accessAsync(i+"/log/"+o+".log");case 2:n=!0;case 3:case"end":return e.stop()}},l,u)})),function(){});case 8:if(n){a.next=11;break}return a.next=11,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function _(){return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_fs2["default"].writeFileAsync(i+"/log/"+o+".log","","utf8");case 2:case"end":return e.stop()}},_,u)})),function(){});case 11:return a.abrupt("return",t);case 12:case"end":return a.stop()}},a,this)}));return e}()}]),r}(_base2["default"]),_applyDecoratedDescriptor(_class.prototype,"file",[_memoize2["default"]],(0,_getOwnPropertyDescriptor2["default"])(_class.prototype,"file"),_class.prototype),_applyDecoratedDescriptor(_class.prototype,"log",[_bound2["default"]],(0,_getOwnPropertyDescriptor2["default"])(_class.prototype,"log"),_class.prototype),_applyDecoratedDescriptor(_class.prototype,"error",[_bound2["default"]],(0,_getOwnPropertyDescriptor2["default"])(_class.prototype,"error"),_class.prototype),_class);exports.line=_line3["default"],exports["default"]=Logger; | ||
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _applyDecoratedDescriptor(e,r,t,a,i){var o={};return Object.keys(a).forEach(function(e){o[e]=a[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=t.slice().reverse().reduce(function(t,a){return a(e,r,t)||t},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,r,o),o=null),o}Object.defineProperty(exports,"__esModule",{value:!0}),exports.line=void 0;var _getOwnPropertyDescriptor=require("babel-runtime/core-js/object/get-own-property-descriptor"),_getOwnPropertyDescriptor2=_interopRequireDefault(_getOwnPropertyDescriptor),_regenerator=require("babel-runtime/regenerator"),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require("babel-runtime/helpers/asyncToGenerator"),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_setImmediate2=require("babel-runtime/core-js/set-immediate"),_setImmediate3=_interopRequireDefault(_setImmediate2),_getPrototypeOf=require("babel-runtime/core-js/object/get-prototype-of"),_getPrototypeOf2=_interopRequireDefault(_getPrototypeOf),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),_possibleConstructorReturn2=require("babel-runtime/helpers/possibleConstructorReturn"),_possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2),_get2=require("babel-runtime/helpers/get"),_get3=_interopRequireDefault(_get2),_inherits2=require("babel-runtime/helpers/inherits"),_inherits3=_interopRequireDefault(_inherits2),_desc,_value,_class,_moment=require("moment"),_moment2=_interopRequireDefault(_moment),_safe=require("colors/safe"),_base=require("../base"),_base2=_interopRequireDefault(_base),_fs=require("../fs"),_fs2=_interopRequireDefault(_fs),_write=require("./utils/write"),_write2=_interopRequireDefault(_write),_tryCatch=require("../../utils/try-catch"),_tryCatch2=_interopRequireDefault(_tryCatch),_bound=require("../../decorators/bound"),_bound2=_interopRequireDefault(_bound),_memoize=require("../../decorators/memoize"),_memoize2=_interopRequireDefault(_memoize),_line2=require("./utils/line"),_line3=_interopRequireDefault(_line2),Logger=(_class=function(e){function r(){return(0,_classCallCheck3["default"])(this,r),(0,_possibleConstructorReturn3["default"])(this,(0,_getPrototypeOf2["default"])(r).apply(this,arguments))}return(0,_inherits3["default"])(r,e),(0,_createClass3["default"])(r,[{key:"log",value:function(e){var r=this.file,t=this.timestamp;e=(0,_safe.dim)("["+t+"]")+" "+e+"\n",process.stdout.write(e),(0,_setImmediate3["default"])(_write2["default"],r,e)}},{key:"error",value:function(e){var r=this.file,t=this.timestamp;e=(0,_safe.red)("["+t+"]")+" "+e+"\n",process.stderr.write(e),(0,_setImmediate3["default"])(_write2["default"],r,e)}},{key:"file",get:function(){return this.root+"/log/"+this.environment+".log"}},{key:"timestamp",get:function(){return(0,_moment2["default"])().format("M/D/YY h:m:ss A")}}],[{key:"create",value:function(){function e(e){return t.apply(this,arguments)}var t=(0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function a(e){var t,i,o,n,u=this;return _regenerator2["default"].wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=(0,_get3["default"])((0,_getPrototypeOf2["default"])(r),"create",this).call(this,e),i=t.root,o=t.environment,n=!1,a.next=6,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function s(){return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_fs2["default"].mkdirAsync(i+"/log");case 2:case"end":return e.stop()}},s,u)})),function(){});case 6:return a.next=8,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function l(){return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_fs2["default"].accessAsync(i+"/log/"+o+".log");case 2:n=!0;case 3:case"end":return e.stop()}},l,u)})),function(){});case 8:if(n){a.next=11;break}return a.next=11,(0,_tryCatch2["default"])((0,_asyncToGenerator3["default"])(_regenerator2["default"].mark(function _(){return _regenerator2["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_fs2["default"].writeFileAsync(i+"/log/"+o+".log","","utf8");case 2:case"end":return e.stop()}},_,u)})),function(){});case 11:return a.abrupt("return",t);case 12:case"end":return a.stop()}},a,this)}));return e}()}]),r}(_base2["default"]),_applyDecoratedDescriptor(_class.prototype,"file",[_memoize2["default"]],(0,_getOwnPropertyDescriptor2["default"])(_class.prototype,"file"),_class.prototype),_applyDecoratedDescriptor(_class.prototype,"log",[_bound2["default"]],(0,_getOwnPropertyDescriptor2["default"])(_class.prototype,"log"),_class.prototype),_applyDecoratedDescriptor(_class.prototype,"error",[_bound2["default"]],(0,_getOwnPropertyDescriptor2["default"])(_class.prototype,"error"),_class.prototype),_class);exports.line=_line3["default"],exports["default"]=Logger; |
{ | ||
"name": "lux-framework", | ||
"version": "0.0.1-beta.2", | ||
"version": "0.0.1-beta.3", | ||
"description": "A MVC style Node.js framework for building lightning fast JSON APIs", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/postlight/lux", |
@@ -11,2 +11,4 @@ # Lux | ||
[Check out the Medium Article!](https://trackchanges.postlight.com/not-another-node-js-framework-33103ebeedf8) | ||
## What? | ||
@@ -13,0 +15,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103963
168