react-server-middleware-json-response
Advanced tools
Comparing version 0.6.1 to 1.0.0-alpha.0
74
index.js
@@ -1,48 +0,44 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _stringify = require('babel-runtime/core-js/json/stringify'); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _stringify2 = _interopRequireDefault(_stringify); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
var JsonResponseMiddleware = | ||
/*#__PURE__*/ | ||
function () { | ||
function JsonResponseMiddleware() { | ||
(0, _classCallCheck2["default"])(this, JsonResponseMiddleware); | ||
} | ||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); | ||
var _createClass2 = require('babel-runtime/helpers/createClass'); | ||
var _createClass3 = _interopRequireDefault(_createClass2); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var JsonResponseMiddleware = function () { | ||
function JsonResponseMiddleware() { | ||
(0, _classCallCheck3.default)(this, JsonResponseMiddleware); | ||
} | ||
(0, _createClass3.default)(JsonResponseMiddleware, [{ | ||
key: 'setConfigValues', | ||
value: function setConfigValues() { | ||
return { isRawResponse: true }; | ||
} | ||
}, { | ||
key: 'getContentType', | ||
value: function getContentType() { | ||
return 'application/json'; | ||
} | ||
}, { | ||
key: 'getResponseData', | ||
value: function getResponseData(next) { | ||
return next().then(function (data) { | ||
return (0, _stringify2.default)(data); | ||
}); | ||
} | ||
}]); | ||
return JsonResponseMiddleware; | ||
(0, _createClass2["default"])(JsonResponseMiddleware, [{ | ||
key: "setConfigValues", | ||
value: function setConfigValues() { | ||
return { | ||
isRawResponse: true | ||
}; | ||
} | ||
}, { | ||
key: "getContentType", | ||
value: function getContentType() { | ||
return 'application/json'; | ||
} | ||
}, { | ||
key: "getResponseData", | ||
value: function getResponseData(next) { | ||
return next().then(function (data) { | ||
return JSON.stringify(data); | ||
}); | ||
} | ||
}]); | ||
return JsonResponseMiddleware; | ||
}(); | ||
exports.default = JsonResponseMiddleware; | ||
module.exports = exports['default']; | ||
exports["default"] = JsonResponseMiddleware; |
{ | ||
"name": "react-server-middleware-json-response", | ||
"version": "0.6.1", | ||
"version": "1.0.0-alpha.0", | ||
"description": "JSON response middleware for React Server", | ||
@@ -8,5 +8,5 @@ "main": "index.js", | ||
"prepublish": "npm run build", | ||
"build": "babel index.src.js --out-file index.js", | ||
"build": "babel --root-mode upward index.src.js --out-file index.js", | ||
"clean": "rimraf index.js", | ||
"test": "eslint src" | ||
"lint": "eslint index.src.js" | ||
}, | ||
@@ -28,12 +28,8 @@ "repository": { | ||
}, | ||
"devDependencies": { | ||
"babel-plugin-react-server": "^1.0.0-alpha.0", | ||
"babel-preset-react-server": "^1.0.0-alpha.0" | ||
}, | ||
"homepage": "https://github.com/redfin/react-server#readme", | ||
"devDependencies": { | ||
"babel-cli": "^6.18.0", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-preset-react-server": "^0.6.0", | ||
"eslint": "^3.8.1", | ||
"eslint-plugin-react": "^6.4.1", | ||
"babel-eslint": "^7.0.0", | ||
"rimraf": "^2.5.4" | ||
} | ||
"gitHead": "8fe9078c4c8d8638909805f55f278cb5958d3ff7" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
14035
2
5
1