Socket
Socket
Sign inDemoInstall

@flatfile/listener

Package Overview
Dependencies
Maintainers
25
Versions
50
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.14 to 0.3.15

3

dist/index.d.ts

@@ -35,3 +35,3 @@ import { Event, RecordsWithLinks } from '@flatfile/api/api';

declare class FlatfileEvent extends AuthenticatedClient {
private readonly src;
readonly src: Event;
/**

@@ -60,2 +60,3 @@ * Event ID from the API

readonly namespace: string[];
readonly createdAt?: Date;
/**

@@ -62,0 +63,0 @@ * Fetch record data from Flatfile API via the event's dataUrl

@@ -155,2 +155,12 @@ "use strict";

var import_axios = __toESM(require("axios"));
// src/utils/helpers.ts
var ensureSingleTrailingSlash = (url) => {
while (url.endsWith("/")) {
url = url.slice(0, -1);
}
return url + "/";
};
// src/events/authenticated.client.ts
var AuthenticatedClient = class {

@@ -161,3 +171,3 @@ constructor(accessToken, apiUrl) {

this._accessToken = accessToken || bearerToken || "...";
this._apiUrl = apiUrl || FLATFILE_API_URL;
this._apiUrl = apiUrl || FLATFILE_API_URL ? ensureSingleTrailingSlash(apiUrl || FLATFILE_API_URL) : void 0;
}

@@ -170,5 +180,8 @@ async fetch(url, options) {

const axiosInstance = import_axios.default.create({
headers
headers,
validateStatus: (status) => {
return status >= 200 && status <= 399;
}
});
const fetchUrl = this._apiUrl + "/" + url;
const fetchUrl = this._apiUrl + url;
const config = {

@@ -259,2 +272,3 @@ url: fetchUrl,

this.namespace = src.namespaces || [];
this.createdAt = src.createdAt || void 0;
const data = async (options) => this.fetchData(options);

@@ -328,6 +342,7 @@ data.then = (onfulfilled, onrejected) => {

}
const secrets = await this.cache.init("secrets", async () => {
const secretCacheKey = `secrets:${environmentId}${spaceId && `:${spaceId}`}`;
const secrets = await this.cache.init(secretCacheKey, async () => {
const secretsResponse = await this.fetch(getSecrets);
const SecretMap = /* @__PURE__ */ new Map();
secretsResponse.forEach((secret) => {
secretsResponse?.forEach((secret) => {
SecretMap.set(secret.name, secret.value);

@@ -334,0 +349,0 @@ });

{
"name": "@flatfile/listener",
"version": "0.3.14",
"version": "0.3.15",
"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