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

@sebspark/pubsub

Package Overview
Dependencies
Maintainers
0
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sebspark/pubsub - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

1

dist/index.d.ts

@@ -24,2 +24,3 @@ import { ClientConfig, Message, Subscription } from '@google-cloud/pubsub';

}, options?: PubSubOptions): Promise<Subscription>;
initiate<M extends T[K]>(name: string, options?: PubSubOptions): Promise<void>;
};

@@ -26,0 +27,0 @@ };

20

dist/index.js

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

var import_pubsub2 = require("@google-cloud/pubsub");
var createOrGetSubscription = async (topic, name, options) => {
var makeSureSubacriptionExists = async (topic, name, options) => {
const createSubscriptionOptions = {

@@ -132,9 +132,5 @@ messageRetentionDuration: {

if (exists) {
return topic.subscription(name);
return;
}
const [subscription] = await topic.createSubscription(
name,
createSubscriptionOptions
);
return subscription;
await topic.createSubscription(name, createSubscriptionOptions);
};

@@ -147,2 +143,5 @@ var createSubscriber = (clientOptions) => {

return {
initiate: async (subscriptionName, options) => {
await makeSureSubacriptionExists(_topic, subscriptionName, options);
},
subscribe: async (subscriptionName, callbacks, options) => {

@@ -152,8 +151,3 @@ if (!_topic) {

}
const fullName = `${name}_${subscriptionName}`;
const subscription = await createOrGetSubscription(
_topic,
fullName,
options
);
const subscription = _topic.subscription(subscriptionName);
subscription.on("message", async (msg) => {

@@ -160,0 +154,0 @@ const data = JSON.parse(msg.data.toString("utf8"));

{
"name": "@sebspark/pubsub",
"version": "1.4.0",
"version": "1.5.0",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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