New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@omotes/sdk

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@omotes/sdk - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

2

package.json
{
"name": "@omotes/sdk",
"version": "0.1.3",
"version": "0.1.4",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "repository": {

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

});
this.workflows = yield (0, workflow_1.setupAvailableWorkflows)(this.connection, this.options.id);
const { trigger, workflows } = yield (0, workflow_1.setupAvailableWorkflows)(this.connection, this.options.id);
this.workflows = workflows;
trigger();
});

@@ -34,0 +36,0 @@ }

import { Connection } from 'amqplib';
export declare function setupAvailableWorkflows(connection: Connection, clientId: string): Promise<import("rxjs").Observable<import("@omotes/proto").Workflow.AsObject[]>>;
export declare function setupAvailableWorkflows(connection: Connection, clientId: string): Promise<{
workflows: import("rxjs").Observable<import("@omotes/proto").Workflow.AsObject[]>;
trigger: () => boolean;
}>;

@@ -5,14 +5,15 @@ "use strict";

const tslib_1 = require("tslib");
const proto_1 = require("@omotes/proto");
const rxjs_1 = require("rxjs");
const channel_1 = require("./channel");
const AvailableWorkflowsHandler_1 = require("./handlers/AvailableWorkflowsHandler");
const RequestAvailableWorkflowsHandler_1 = require("./handlers/RequestAvailableWorkflowsHandler");
function setupAvailableWorkflows(connection, clientId) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const availableChannel$ = (0, rxjs_1.from)((0, channel_1.getChannel)(connection, `available_workflows.${clientId}`, 'available_workflows')).pipe((0, rxjs_1.map)(({ channel }) => channel));
const { channel: requestChannel } = yield (0, channel_1.getChannel)(connection, 'request_available_workflows');
const requestHandler = new RequestAvailableWorkflowsHandler_1.RequestAvailableWorkflowsHandler();
const workflowsHandler = new AvailableWorkflowsHandler_1.AvailableWorkflowsHandler(availableChannel$, clientId);
requestHandler.start(requestChannel);
return workflowsHandler.getWorkflows().pipe((0, rxjs_1.shareReplay)(1));
const requestChannel = yield connection.createChannel();
return {
workflows: workflowsHandler.getWorkflows().pipe((0, rxjs_1.shareReplay)(1)),
trigger: () => requestChannel.sendToQueue('request_available_workflows', Buffer.from(new proto_1.RequestAvailableWorkflows().serializeBinary()))
};
});

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

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc