Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sebspark/pubsub

Package Overview
Dependencies
Maintainers
0
Versions
28
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.1.0 to 1.1.1

19

dist/index.js

@@ -53,15 +53,12 @@ "use strict";

var createOrGetTopic = async (client, name, schemaData) => {
const [topic] = await client.topic(name).get({ autoCreate: true });
if (!schemaData) {
return topic;
const [exists] = await client.topic(name).exists();
if (exists) {
const [topic2] = await client.topic(name).get();
return topic2;
}
const [topicMetadata] = await topic.getMetadata();
const topicSchemaMetadata = topicMetadata.schemaSettings;
await topic.setMetadata({
...topicMetadata,
const [topic] = await client.createTopic({
name,
schemaSettings: {
encoding: "JSON",
firstRevisionId: (topicSchemaMetadata == null ? void 0 : topicSchemaMetadata.firstRevisionId) ?? schemaData.revisionId,
lastRevisionId: schemaData.revisionId,
schema: schemaData.name
schema: schemaData == null ? void 0 : schemaData.name,
encoding: import_pubsub.Encodings.Json
}

@@ -68,0 +65,0 @@ });

{
"name": "@sebspark/pubsub",
"version": "1.1.0",
"version": "1.1.1",
"license": "Apache-2.0",

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

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