Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mcma/api

Package Overview
Dependencies
Maintainers
3
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcma/api - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

12

index.d.ts

@@ -34,3 +34,3 @@ import { ContextVariableProvider, Resource, ResourceType } from "@mcma/core";

GATEWAY_TIMEOUT = 504,
VERSION = 50
VERSION = 50
}

@@ -72,3 +72,3 @@

setResponseResourceCreated<T extends Resource>(resource: T): void;
setResponseBadRequestDueToMissingBody():void;
setResponseBadRequestDueToMissingBody(): void;
setResponseResourceNotFound(): void;

@@ -80,2 +80,3 @@ }

publicUrl(): string;
workerFunctionId(): string;

@@ -121,4 +122,7 @@ }

overrideHandler(handler: McmaApiRouteHandler): void;
onStarted(handleOnStarted: ((requestContext: McmaApiRequestContext) => Promise<void>)): boolean | void;
onCompleted(handleOnCompleted: ((requestContext: McmaApiRequestContext) => Promise<T>)): void;
build(): McmaApiRoute;

@@ -137,3 +141,5 @@ }

configure<TConfigure = T | T[]>(configureRoute: (defaultRouteBuilder: DefaultRouteBuilder<TConfigure>) => void): DefaultRouteCollectionBuilder<T>;
add(): DefaultRouteCollectionBuilder<T>;
remove(): DefaultRouteCollectionBuilder<T>;

@@ -155,2 +161,2 @@ }

handleRequest(requestContext: McmaApiRequestContext): Promise<void>;
}
}

@@ -0,0 +0,0 @@ const { HttpStatusCode } = require("./lib/http-statuses");

@@ -0,0 +0,0 @@ function inMemoryTextValues(filterValues) {

@@ -99,3 +99,3 @@ const HttpStatusCode = {

return "";
}
};

@@ -105,2 +105,2 @@ module.exports = {

getStatusError
};
};

@@ -20,4 +20,4 @@ //"use strict";

"Access-Control-Allow-Origin": "*"
}
}
};
};

@@ -24,0 +24,0 @@ class McmaApiController {

@@ -27,3 +27,3 @@ const { ContextVariableProvider } = require("@mcma/core");

super(contextVariables);
this.request = request;

@@ -45,3 +45,3 @@ this.response = new McmaApiResponse();

}
setResponseBody(body) {

@@ -54,3 +54,3 @@ this.response.body = body;

}
setResponseResourceCreated(resource) {

@@ -61,3 +61,3 @@ this.response.headers["Location"] = resource.id;

}
setResponseResourceNotFound() {

@@ -70,7 +70,7 @@ this.setResponseStatusCode(HttpStatusCode.NOT_FOUND, "No resource found on path '" + this.request.path + "'.");

return this.getRequiredContextVariable("PublicUrl");
}
};
ContextVariableProvider.prototype.workerFunctionId = function workerFunctionId() {
return this.getRequiredContextVariable("WorkerFunctionId");
}
};

@@ -81,2 +81,2 @@ module.exports = {

McmaApiRequestContext
};
};

@@ -0,0 +0,0 @@ const { DefaultRouteCollectionBuilder } = require("./default-routes");

@@ -11,3 +11,3 @@ const uuidv4 = require("uuid/v4");

let handler = null;
this.overrideHandler = (x) => {

@@ -26,3 +26,3 @@ handler = x;

};
this.build = () => {

@@ -116,4 +116,4 @@ return new McmaApiRoute(httpMethod, path, handler || defaultHandlerBuilder.create());

}
}
}
};
};
}

@@ -136,3 +136,3 @@ }

var filter =
var filter =
requestContext.request.queryStringParameters && Object.keys(requestContext.request.queryStringParameters).length > 0

@@ -150,3 +150,3 @@ ? filters.inMemoryTextValues(requestContext.request.queryStringParameters)

requestContext.setResponseBody(resources);
}
};
}

@@ -186,3 +186,3 @@ )

requestContext.setResponseResourceCreated(resource);
}
};
}

@@ -219,3 +219,3 @@ )

}
}
};
}

@@ -232,3 +232,3 @@ )

(onStarted, onCompleted) => {
return async (requestContext) => {
return async (requestContext) => {
if (onStarted) {

@@ -256,3 +256,3 @@ const continueRequest = await onStarted(requestContext);

requestContext.setResponseBody(resource);
}
};
}

@@ -293,3 +293,3 @@ )

}
}
};
}

@@ -302,2 +302,2 @@ )

DefaultRouteCollectionBuilder
};
};

@@ -0,0 +0,0 @@ const uriTemplates = require("uri-templates");

@@ -12,4 +12,3 @@ const pluralize = require("pluralize");

result += value[i].toLowerCase();
}
else {
} else {
result += value[i];

@@ -31,2 +30,2 @@ }

pluralizeKebabCase
};
};

@@ -0,0 +0,0 @@ class WorkerInvoker {

{
"name": "@mcma/api",
"version": "0.5.3",
"version": "0.5.4",
"description": "Node module for building APIs based on the EBU MCMA framework",

@@ -31,12 +31,15 @@ "engines": {

"uri-templates": "^0.2.0",
"uuid": "^3.3.2"
"uuid": "^3.3.3"
},
"peerDependencies": {
"@mcma/client": "0.5.3",
"@mcma/core": "0.5.3",
"@mcma/data": "0.5.3"
"@mcma/client": "0.5.4",
"@mcma/core": "0.5.4",
"@mcma/data": "0.5.4"
},
"devDependencies": {
"@mcma/client": "0.5.4",
"@mcma/core": "0.5.4",
"@mcma/data": "0.5.4",
"jasmine": "^3.2.0"
}
}
}
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