![pnpm 9.5 Introduces Catalogs: Shareable Dependency Version Specifiers](https://cdn.sanity.io/images/cgdhsj6q/production/c06a5b74512bcc6da29d38cef96a454fa947810d-1024x1024.webp?w=400&fit=max&auto=format)
Security News
pnpm 9.5 Introduces Catalogs: Shareable Dependency Version Specifiers
pnpm 9.5 introduces a Catalogs feature, enabling shareable dependency version specifiers, reducing merge conflicts and improving support for monorepos.
@temporalio/client
Advanced tools
Package description
@temporalio/client is an npm package that provides a client for interacting with Temporal, a platform for orchestrating microservices and managing workflows. It allows developers to start, query, and manage workflows and activities in a Temporal server.
Starting a Workflow
This feature allows you to start a new workflow. The code sample demonstrates how to create a connection to the Temporal server, instantiate a WorkflowClient, and start a workflow with a specified task queue.
const { Connection, WorkflowClient } = require('@temporalio/client');
async function run() {
const connection = new Connection();
const client = new WorkflowClient(connection.service);
const handle = await client.start('exampleWorkflow', { taskQueue: 'example' });
console.log(`Started workflow with ID: ${handle.workflowId}`);
}
run().catch(err => console.error(err));
Querying a Workflow
This feature allows you to query the state of a running workflow. The code sample shows how to get a handle to a workflow using its ID and perform a query on it.
const { Connection, WorkflowClient } = require('@temporalio/client');
async function run() {
const connection = new Connection();
const client = new WorkflowClient(connection.service);
const handle = client.getHandle('exampleWorkflowId');
const result = await handle.query('exampleQuery');
console.log(`Query result: ${result}`);
}
run().catch(err => console.error(err));
Cancelling a Workflow
This feature allows you to cancel a running workflow. The code sample demonstrates how to get a handle to a workflow using its ID and cancel it.
const { Connection, WorkflowClient } = require('@temporalio/client');
async function run() {
const connection = new Connection();
const client = new WorkflowClient(connection.service);
const handle = client.getHandle('exampleWorkflowId');
await handle.cancel();
console.log('Workflow cancelled');
}
run().catch(err => console.error(err));
The aws-sdk package provides a comprehensive set of tools for interacting with AWS services, including Step Functions, which can be used for orchestrating workflows. Compared to @temporalio/client, aws-sdk offers broader functionality but may require more setup and configuration for workflow orchestration.
The camunda-external-task-client-js package is a client for interacting with Camunda BPM, a workflow and decision automation platform. It allows for the execution of external tasks in a workflow. Compared to @temporalio/client, it is more focused on BPMN-based workflows and external task execution.
The zeebe-node package is a client for Zeebe, a workflow engine for microservices orchestration. It provides similar functionalities to @temporalio/client, such as starting and managing workflows, but is designed to work with the Zeebe engine specifically.
Readme
FAQs
Unknown package
We found that @temporalio/client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 9.5 introduces a Catalogs feature, enabling shareable dependency version specifiers, reducing merge conflicts and improving support for monorepos.
Security News
A threat actor on BreachForums is selling an unverified npm vulnerability for account takeover, but npm has not officially confirmed the existence of this security concern.
Security News
Cyber insurance rates are dropping as the market matures, according to a new report projecting global premiums to reach $43 billion by 2030, driven by international market uptake and growth in the SME sector.