New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

app-proto-recipes

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-proto-recipes - npm Package Compare versions

Comparing version 0.2.2 to 1.1.1

book.json

2

package.json
{
"name": "app-proto-recipes",
"version": "0.2.2",
"version": "1.1.1",
"description": "Read the specification of directories (for app-proto scaffold).",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,3 +28,3 @@ 'use strict';

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { return step("next", value); }, function (err) { return step("throw", err); }); } } return step("next"); }); }; }
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

@@ -50,3 +50,3 @@ var join = _path2.default.join;

var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(ctx, params) {
var mock = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
var mock = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
return regeneratorRuntime.wrap(function _callee$(_context) {

@@ -78,3 +78,3 @@ while (1) {

return function (_x, _x2, _x3) {
return function (_x, _x2) {
return _ref.apply(this, arguments);

@@ -81,0 +81,0 @@ };

@@ -6,2 +6,5 @@ 'use strict';

});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
exports.default = renderRecipe;

@@ -29,3 +32,3 @@

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { return step("next", value); }, function (err) { return step("throw", err); }); } } return step("next"); }); }; }
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

@@ -52,6 +55,16 @@ var join = _path2.default.join;

if (!((typeof serveData === 'undefined' ? 'undefined' : _typeof(serveData)) !== 'object')) {
_context.next = 6;
break;
}
ctx.body = serveData;
return _context.abrupt('return');
case 6:
ctx.$data = Object.assign(ctx.$data || {}, serveData || {});
if (!(template === null)) {
_context.next = 8;
_context.next = 11;
break;

@@ -61,6 +74,6 @@ }

ctx.body = ctx.$data;
_context.next = 13;
_context.next = 16;
break;
case 8:
case 11:
Template = ctx.$tpls[template];

@@ -76,9 +89,9 @@ tpl = new Template({

});
_context.next = 12;
_context.next = 15;
return tpl.toHtml();
case 12:
case 15:
ctx.body = _context.sent;
case 13:
case 16:
case 'end':

@@ -135,8 +148,8 @@ return _context.stop();

return (renderConfigs.methods || ['GET']).forEach(function (method) {
return routerRegister(url, method, renderConfigs.middlewares || [], renderConfigs.controller, renderConfigs.template || null, page);
} // end method
return routerRegister(url, method, renderConfigs.middlewares || [], renderConfigs.controller, renderConfigs.template || null, page // end method
);
} // end renderConfigs.methods
);
} // end renderConfigs.methods
); // end renderConfigs.urls
return;
} // end renderConfigs.urls
);return;
}

@@ -160,7 +173,8 @@

return methods.forEach(function (method) {
return routerRegister(url, method, schema.middlewares, schema.controller, schema.template, page);
} // end method
return routerRegister(url, method, schema.middlewares, schema.controller, schema.template, page // end method
);
} // end url
);
} // end url
); // end urls
} // end urls
);
});

@@ -167,0 +181,0 @@ }

@@ -16,2 +16,8 @@ import path from 'path'

const serveData = await controller.call(this, ctx, next)
if (typeof serveData !== 'object') {
ctx.body = serveData
return
}
ctx.$data = Object.assign(ctx.$data || {}, serveData || {})

@@ -18,0 +24,0 @@

@@ -9,3 +9,3 @@ 'use strict';

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { return step("next", value); }, function (err) { return step("throw", err); }); } } return step("next"); }); }; }
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

@@ -12,0 +12,0 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -43,3 +43,3 @@ 'use strict';

function getDirObjs(dir) {
var whitelist = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];
var whitelist = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

@@ -46,0 +46,0 @@ if (!dirExists(dir)) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc