You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@furystack/rest-service

Package Overview
Dependencies
Maintainers
1
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.5 to 2.2.6

3

dist/actions/error-action.js

@@ -11,3 +11,3 @@ "use strict";

*/
exports.ErrorAction = async ({ injector, getBody, request }) => {
const ErrorAction = async ({ injector, getBody, request }) => {
const body = await getBody();

@@ -29,2 +29,3 @@ const errorCode = body instanceof rest_2.RequestError ? body.responseCode : body instanceof core_1.AuthorizationError ? 403 : 500;

};
exports.ErrorAction = ErrorAction;
//# sourceMappingURL=error-action.js.map

@@ -12,6 +12,7 @@ "use strict";

*/
exports.IsAuthenticated = async ({ injector }) => {
const IsAuthenticated = async ({ injector }) => {
const isAuthenticated = await injector.isAuthenticated();
return rest_1.JsonResult({ isAuthenticated });
};
exports.IsAuthenticated = IsAuthenticated;
//# sourceMappingURL=is-authenticated.js.map

@@ -13,3 +13,3 @@ "use strict";

*/
exports.LoginAction = async ({ injector, getBody, response, }) => {
const LoginAction = async ({ injector, getBody, response, }) => {
const userContext = injector.getInstance(http_user_context_1.HttpUserContext);

@@ -26,2 +26,3 @@ const body = await getBody();

};
exports.LoginAction = LoginAction;
//# sourceMappingURL=login.js.map

@@ -15,6 +15,7 @@ "use strict";

*/
exports.LogoutAction = async ({ injector, request, response }) => {
const LogoutAction = async ({ injector, request, response }) => {
await injector.getInstance(http_user_context_1.HttpUserContext).cookieLogout(request, response);
return rest_1.EmptyResult();
};
exports.LogoutAction = LogoutAction;
//# sourceMappingURL=logout.js.map

@@ -8,3 +8,3 @@ "use strict";

*/
exports.NotFoundAction = async () => {
const NotFoundAction = async () => {
return rest_1.JsonResult({

@@ -14,2 +14,3 @@ error: 'Content not found',

};
exports.NotFoundAction = NotFoundAction;
//# sourceMappingURL=not-found-action.js.map

@@ -8,3 +8,3 @@ "use strict";

const http_user_context_1 = require("./http-user-context");
exports.Authenticate = () => (action) => {
const Authenticate = () => (action) => {
return async (args) => {

@@ -29,2 +29,3 @@ const authenticated = await args.injector.isAuthenticated();

};
exports.Authenticate = Authenticate;
//# sourceMappingURL=authenticate.js.map

@@ -7,3 +7,3 @@ "use strict";

const rest_1 = require("@furystack/rest");
exports.Authorize = (...roles) => (action) => {
const Authorize = (...roles) => (action) => {
return async (options) => {

@@ -33,2 +33,3 @@ try {

};
exports.Authorize = Authorize;
//# sourceMappingURL=authorize.js.map

@@ -13,3 +13,3 @@ "use strict";

*/
exports.createDeleteEndpoint = (options) => {
const createDeleteEndpoint = (options) => {
const endpoint = async ({ injector, getUrlParams }) => {

@@ -23,2 +23,3 @@ const { id } = getUrlParams();

};
exports.createDeleteEndpoint = createDeleteEndpoint;
//# sourceMappingURL=create-delete-endpoint.js.map

@@ -13,3 +13,3 @@ "use strict";

*/
exports.createGetCollectionEndpoint = (options) => {
const createGetCollectionEndpoint = (options) => {
const endpoint = async ({ injector, getQuery }) => {

@@ -25,2 +25,3 @@ const { findOptions } = getQuery();

};
exports.createGetCollectionEndpoint = createGetCollectionEndpoint;
//# sourceMappingURL=create-get-collection-endpoint.js.map

@@ -13,3 +13,3 @@ "use strict";

*/
exports.createGetEntityEndpoint = (options) => {
const createGetEntityEndpoint = (options) => {
const endpoint = async ({ injector, getUrlParams, getQuery }) => {

@@ -27,2 +27,3 @@ const { id } = getUrlParams();

};
exports.createGetEntityEndpoint = createGetEntityEndpoint;
//# sourceMappingURL=create-get-entity-endpoint.js.map

@@ -14,3 +14,3 @@ "use strict";

*/
exports.createPatchEndpoint = (options) => {
const createPatchEndpoint = (options) => {
const endpoint = async ({ injector, request, getUrlParams }) => {

@@ -25,2 +25,3 @@ const { id } = getUrlParams();

};
exports.createPatchEndpoint = createPatchEndpoint;
//# sourceMappingURL=create-patch-endpoint.js.map

@@ -14,3 +14,3 @@ "use strict";

*/
exports.createPostEndpoint = (options) => {
const createPostEndpoint = (options) => {
const endpoint = async ({ injector, request }) => {

@@ -27,2 +27,3 @@ const entityToCreate = await request.readPostBody();

};
exports.createPostEndpoint = createPostEndpoint;
//# sourceMappingURL=create-post-endpoint.js.map

@@ -12,5 +12,7 @@ "use strict";

exports.MockClass = MockClass;
exports.serialize = (entity) => encodeURIComponent(JSON.stringify(entity));
exports.deserialize = (entity) => JSON.parse(decodeURIComponent(entity));
exports.setupContext = (i) => {
const serialize = (entity) => encodeURIComponent(JSON.stringify(entity));
exports.serialize = serialize;
const deserialize = (entity) => JSON.parse(decodeURIComponent(entity));
exports.deserialize = deserialize;
const setupContext = (i) => {
i.setupStores((b) => b

@@ -31,2 +33,3 @@ .addStore(new core_1.InMemoryStore({

};
exports.setupContext = setupContext;
//# sourceMappingURL=utils.js.map

@@ -11,3 +11,3 @@ "use strict";

require("@furystack/logging");
exports.prepareInjector = async (i) => {
const prepareInjector = async (i) => {
i.setupStores((sm) => sm

@@ -19,2 +19,3 @@ .addStore(new core_1.InMemoryStore({ model: core_1.User, primaryKey: 'username' }))

};
exports.prepareInjector = prepareInjector;
describe('HttpUserContext', () => {

@@ -21,0 +22,0 @@ const request = { headers: {} };

{
"name": "@furystack/rest-service",
"version": "2.2.5",
"version": "2.2.6",
"description": "Repository implementation for FuryStack",

@@ -34,8 +34,8 @@ "main": "dist/index.js",

"dependencies": {
"@furystack/core": "^9.1.12",
"@furystack/inject": "^4.0.40",
"@furystack/logging": "^2.0.47",
"@furystack/repository": "^4.0.2",
"@furystack/rest": "^1.2.5",
"@furystack/utils": "^1.2.10",
"@furystack/core": "^9.1.13",
"@furystack/inject": "^4.0.41",
"@furystack/logging": "^2.0.48",
"@furystack/repository": "^4.0.3",
"@furystack/rest": "^1.2.6",
"@furystack/utils": "^1.2.11",
"hash.js": "^1.1.7",

@@ -48,9 +48,9 @@ "path-to-regexp": "^6.2.0",

"devDependencies": {
"@types/jest": "^26.0.14",
"@types/node": "^14.11.8",
"@types/jest": "^26.0.15",
"@types/node": "^14.14.9",
"@types/uuid": "^8.0.0",
"got": "^11.7.0"
"got": "^11.8.0"
},
"typings": "./dist/index.d.ts",
"gitHead": "8391c183a89bdc837aac4dcda91c693e2964fb51"
"gitHead": "9af051b8717103d81efabb95f675d116cd5421d3"
}

@@ -63,3 +63,3 @@ import { usingAsync } from '@furystack/utils'

})
await new Promise((resolve, reject) => {
await new Promise<void>((resolve, reject) => {
got(`http://127.0.0.1:1115/api/mock`, { method: 'GET' })

@@ -66,0 +66,0 @@ .then(() => reject('Should throw'))

@@ -47,3 +47,3 @@ import { Injectable, Injector } from '@furystack/inject'

(s) =>
new Promise((resolve, reject) => {
new Promise<void>((resolve, reject) => {
s.server.close((err) => (err ? reject(err) : resolve()))

@@ -64,3 +64,3 @@ s.server.off('connection', this.onConnection)

try {
await new Promise((resolve, reject) => {
await new Promise<void>((resolve, reject) => {
const apis: ServerRecord['apis'] = []

@@ -67,0 +67,0 @@ const server = createServer((req, res) => {

@@ -12,3 +12,3 @@ import { IncomingMessage, ServerResponse } from 'http'

let body = ''
await new Promise((resolve, reject) => {
await new Promise<void>((resolve, reject) => {
incomingMessage.on('readable', () => {

@@ -15,0 +15,0 @@ const data = incomingMessage.read()

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc