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.14.7 to 0.14.8

6

dist/index.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

2

dist/lib/http/mcma-api-error.js

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

if (!this.error) {
this.error = http_statuses_1.getStatusError(this.status);
this.error = (0, http_statuses_1.getStatusError)(this.status);
}

@@ -20,0 +20,0 @@ }

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -28,5 +28,5 @@ "use strict";

}
const resourcePath = requestContext.request.path + "/" + uuid_1.v4();
core_1.onResourceCreate(resource, config_variables_ext_1.getPublicUrl(requestContext.configVariables) + resourcePath);
const dbTable = await this.dbTableProvider.get(data_1.getTableName(requestContext.configVariables));
const resourcePath = requestContext.request.path + "/" + (0, uuid_1.v4)();
(0, core_1.onResourceCreate)(resource, (0, config_variables_ext_1.getPublicUrl)(requestContext.configVariables) + resourcePath);
const dbTable = await this.dbTableProvider.get((0, data_1.getTableName)(requestContext.configVariables));
await dbTable.put(resourcePath, resource);

@@ -33,0 +33,0 @@ if (this.onCompleted) {

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

}
const table = await this.dbTableProvider.get(data_1.getTableName(requestContext.configVariables));
const table = await this.dbTableProvider.get((0, data_1.getTableName)(requestContext.configVariables));
const resource = await table.get(requestContext.request.path);

@@ -23,0 +23,0 @@ if (!resource) {

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

}
const dbTable = await this.dbTableProvider.get(data_1.getTableName(requestContext.configVariables));
const dbTable = await this.dbTableProvider.get((0, data_1.getTableName)(requestContext.configVariables));
const resource = await dbTable.get(requestContext.request.path);

@@ -23,0 +23,0 @@ if (this.onCompleted) {

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

if (!body.tracker) {
body.tracker = new core_1.McmaTracker({ id: uuid_1.v4(), label: body["@type"] });
body.tracker = new core_1.McmaTracker({ id: (0, uuid_1.v4)(), label: body["@type"] });
}

@@ -30,6 +30,6 @@ return true;

async onJobAssignmentCreationCompleted(requestContext, jobAssignment) {
await this.workerInvoker.invoke(worker_invoker_1.getWorkerFunctionId(requestContext.configVariables), {
await this.workerInvoker.invoke((0, worker_invoker_1.getWorkerFunctionId)(requestContext.configVariables), {
operationName: "ProcessJobAssignment",
input: {
jobAssignmentDatabaseId: jobAssignment.id.replace(config_variables_ext_1.getPublicUrl(requestContext.configVariables), "")
jobAssignmentDatabaseId: jobAssignment.id.replace((0, config_variables_ext_1.getPublicUrl)(requestContext.configVariables), "")
},

@@ -41,3 +41,3 @@ tracker: jobAssignment.tracker

const request = requestContext.request;
const table = await this.dbTableProvider.get(data_1.getTableName());
const table = await this.dbTableProvider.get((0, data_1.getTableName)());
const jobAssignmentDatabaseId = "/job-assignments/" + request.pathVariables.id;

@@ -55,3 +55,3 @@ const jobAssignment = await table.get(jobAssignmentDatabaseId);

}
await this.workerInvoker.invoke(worker_invoker_1.getWorkerFunctionId(), {
await this.workerInvoker.invoke((0, worker_invoker_1.getWorkerFunctionId)(), {
operationName: "ProcessCancel",

@@ -58,0 +58,0 @@ input: {

@@ -31,5 +31,5 @@ "use strict";

}
const table = await this.dbTableProvider.get(data_1.getTableName(requestContext.configVariables));
const table = await this.dbTableProvider.get((0, data_1.getTableName)(requestContext.configVariables));
const query = this.buildQuery(requestContext);
const queryResults = data_1.isCustomQuery(query) ? await table.customQuery(query) : await table.query(query);
const queryResults = (0, data_1.isCustomQuery)(query) ? await table.customQuery(query) : await table.query(query);
if (this.onCompleted) {

@@ -68,3 +68,3 @@ await this.onCompleted(requestContext, queryResults);

}
const filterExpression = data_1.getFilterExpressionFromKeyValuePairs(queryParams);
const filterExpression = (0, data_1.getFilterExpressionFromKeyValuePairs)(queryParams);
return {

@@ -71,0 +71,0 @@ path,

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

}
root = root || strings_1.pluralizeKebabCase(strings_1.camelCaseToKebabCase(resourceType));
root = root || (0, strings_1.pluralizeKebabCase)((0, strings_1.camelCaseToKebabCase)(resourceType));
if (root[0] !== "/") {

@@ -42,5 +42,21 @@ root = "/" + root;

}
this[key] = null;
switch (key) {
case "query":
this.query = null;
break;
case "create":
this.create = null;
break;
case "get":
this.get = null;
break;
case "update":
this.update = null;
break;
case "delete":
this.delete = null;
break;
}
}
}
exports.DefaultRouteCollection = DefaultRouteCollection;

@@ -27,4 +27,4 @@ "use strict";

}
core_1.onResourceUpsert(resource, config_variables_ext_1.getPublicUrl(requestContext.configVariables) + requestContext.request.path);
const dbTable = await this.dbTableProvider.get(data_1.getTableName(requestContext.configVariables));
(0, core_1.onResourceUpsert)(resource, (0, config_variables_ext_1.getPublicUrl)(requestContext.configVariables) + requestContext.request.path);
const dbTable = await this.dbTableProvider.get((0, data_1.getTableName)(requestContext.configVariables));
await dbTable.put(requestContext.request.path, resource);

@@ -31,0 +31,0 @@ if (this.onCompleted) {

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -23,5 +23,5 @@ "use strict";

const parts = value.split("-");
parts[parts.length - 1] = pluralize_1.plural(parts[parts.length - 1]);
parts[parts.length - 1] = (0, pluralize_1.plural)(parts[parts.length - 1]);
return parts.join("-");
}
exports.pluralizeKebabCase = pluralizeKebabCase;
{
"name": "@mcma/api",
"version": "0.14.7",
"version": "0.14.8",
"description": "Node module for building APIs based on the EBU MCMA framework",

@@ -40,12 +40,12 @@ "engines": {

"peerDependencies": {
"@mcma/client": "0.14.7",
"@mcma/core": "0.14.7",
"@mcma/data": "0.14.7",
"@mcma/worker-invoker": "0.14.7"
"@mcma/client": "0.14.8",
"@mcma/core": "0.14.8",
"@mcma/data": "0.14.8",
"@mcma/worker-invoker": "0.14.8"
},
"devDependencies": {
"@mcma/client": "0.14.7",
"@mcma/core": "0.14.7",
"@mcma/data": "0.14.7",
"@mcma/worker-invoker": "0.14.7",
"@mcma/client": "0.14.8",
"@mcma/core": "0.14.8",
"@mcma/data": "0.14.8",
"@mcma/worker-invoker": "0.14.8",
"@types/node": "^14.17.22",

@@ -52,0 +52,0 @@ "@types/pluralize": "0.0.29",

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