@mcma/api
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -68,3 +68,3 @@ import { ContextVariableProvider, Resource, ResourceType } from "@mcma/core"; | ||
declare module "mcma-core" { | ||
declare module "@mcma/core" { | ||
interface ContextVariableProvider { | ||
@@ -71,0 +71,0 @@ publicUrl(): string; |
const { DefaultRouteCollectionBuilder } = require("./default-routes"); | ||
const { WorkerInvoker } = require("../worker-invoker"); | ||
DefaultRouteCollectionBuilder.prototype.forJobAssignments = function forJobAssignments(invokeWorker) { | ||
if (typeof invokeWorker !== "function") { | ||
throw new Error("invokeWorker must be a function."); | ||
} | ||
const workerInvoker = new WorkerInvoker(invokeWorker); | ||
@@ -11,9 +10,10 @@ return this.addAll() | ||
rb.onCompleted(async (requestContext, jobAssignment) => | ||
await invokeWorker(requestContext.workerFunctionId(), { | ||
operationName: "ProcessJobAssignment", | ||
contextVariables: requestContext.getAllContextVariables(), | ||
input: { | ||
await workerInvoker.invoke( | ||
requestContext.workerFunctionId(), | ||
"ProcessJobAssignment", | ||
requestContext.getAllContextVariables(), | ||
{ | ||
jobAssignmentId: jobAssignment.id | ||
} | ||
}) | ||
) | ||
) | ||
@@ -20,0 +20,0 @@ ) |
{ | ||
"name": "@mcma/api", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "Node module for building APIs based on the EBU MCMA framework", | ||
@@ -29,4 +29,4 @@ "engines": { | ||
"dependencies": { | ||
"@mcma/client": "0.4.2", | ||
"@mcma/data": "0.4.2", | ||
"@mcma/client": "0.4.3", | ||
"@mcma/data": "0.4.3", | ||
"pluralize": "^7.0.0", | ||
@@ -33,0 +33,0 @@ "uri-templates": "^0.2.0", |
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
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
31093
+ Added@mcma/client@0.4.3(transitive)
+ Added@mcma/core@0.4.3(transitive)
+ Added@mcma/data@0.4.3(transitive)
- Removed@mcma/client@0.4.2(transitive)
- Removed@mcma/core@0.4.2(transitive)
- Removed@mcma/data@0.4.2(transitive)
Updated@mcma/client@0.4.3
Updated@mcma/data@0.4.3