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

@flatfile/listener

Package Overview
Dependencies
Maintainers
25
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flatfile/listener - npm Package Compare versions

Comparing version 0.3.13 to 0.3.14

8

dist/index.d.ts

@@ -76,2 +76,10 @@ import { Event, RecordsWithLinks } from '@flatfile/api/api';

update(records: RecordsWithLinks): Promise<void>;
/**
* Fetch the Secrets as indicated by this event context
*
* @param key - The name of the secret to fetch
* @param options - (Optional) environmentId and spaceId to override event context
*
* @returns The value of the secret (usually a credential or token)
*/
secrets(key: string, options?: {

@@ -78,0 +86,0 @@ environmentId?: string;

22

dist/index.js

@@ -306,8 +306,22 @@ "use strict";

}
/**
* Fetch the Secrets as indicated by this event context
*
* @param key - The name of the secret to fetch
* @param options - (Optional) environmentId and spaceId to override event context
*
* @returns The value of the secret (usually a credential or token)
*/
async secrets(key, options) {
const environmentId = options?.environmentId || this.context.environmentId;
const environmentId = options?.environmentId || this.context.environmentId || "";
const spaceId = options?.spaceId || this.context.spaceId || "";
if (!environmentId) {
throw new Error("environmentId is required to fetch secrets");
}
let getSecrets = `v1/secrets?environmentId=${environmentId}`;
if (spaceId) {
getSecrets += `&spaceId=${spaceId}`;
}
const secrets = await this.cache.init("secrets", async () => {
const secretsResponse = await this.fetch(
`v1/secrets?environmentId=${environmentId}${options?.spaceId ? `&spaceId=${options.spaceId}` : ""}`
);
const secretsResponse = await this.fetch(getSecrets);
const SecretMap = /* @__PURE__ */ new Map();

@@ -314,0 +328,0 @@ secretsResponse.forEach((secret) => {

2

package.json
{
"name": "@flatfile/listener",
"version": "0.3.13",
"version": "0.3.14",
"description": "A PubSub Listener for configuring and using Flatfile",

@@ -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