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

configcat-js-ssr

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

configcat-js-ssr - npm Package Compare versions

Comparing version 3.8.0 to 3.9.0

4

lib/ConfigFetcher.d.ts

@@ -1,6 +0,6 @@

import { IConfigFetcher, ProjectConfig, OptionsBase } from "configcat-common";
import { IConfigFetcher, OptionsBase, FetchResult } from "configcat-common";
export declare class HttpConfigFetcher implements IConfigFetcher {
fetchLogic(options: OptionsBase, lastProjectConfig: ProjectConfig, callback: (newProjectConfig: ProjectConfig) => void): void;
fetchLogic(options: OptionsBase, lastEtag: string, callback: (result: FetchResult) => void): void;
}
export default IConfigFetcher;
//# sourceMappingURL=ConfigFetcher.d.ts.map

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

}
HttpConfigFetcher.prototype.fetchLogic = function (options, lastProjectConfig, callback) {
HttpConfigFetcher.prototype.fetchLogic = function (options, lastEtag, callback) {
var axiosConfig = {

@@ -16,3 +16,3 @@ method: 'get',

'X-ConfigCat-UserAgent': "ConfigCat-JS-SSR/" + options.clientVersion,
'If-None-Match': (lastProjectConfig && lastProjectConfig.HttpETag) ? lastProjectConfig.HttpETag : null
'If-None-Match': (lastEtag) ? lastEtag : null
}

@@ -24,3 +24,3 @@ };

if (response.status === 200) {
callback(new configcat_common_1.ProjectConfig(new Date().getTime(), JSON.stringify(response.data), eTag));
callback(configcat_common_1.FetchResult.success(JSON.stringify(response.data), eTag));
}

@@ -30,3 +30,3 @@ else {

options.logger.info("Double-check your SDK Key on https://app.configcat.com/sdkkey");
callback(lastProjectConfig);
callback(configcat_common_1.FetchResult.error());
}

@@ -37,4 +37,3 @@ })

if (error.response.status === 304) {
var eTag = error.response.headers.etag;
callback(new configcat_common_1.ProjectConfig(new Date().getTime(), JSON.stringify(lastProjectConfig.ConfigJSON), eTag));
callback(configcat_common_1.FetchResult.notModified());
}

@@ -44,3 +43,3 @@ else {

options.logger.info("Double-check your SDK Key on https://app.configcat.com/sdkkey");
callback(lastProjectConfig);
callback(configcat_common_1.FetchResult.error());
}

@@ -50,7 +49,7 @@ }

options.logger.error('The request to Configcat was made but no response was received');
callback(lastProjectConfig);
callback(configcat_common_1.FetchResult.error());
}
else {
options.logger.error("Something happened in setting up the request to ConfigCat: " + error.message);
callback(lastProjectConfig);
callback(configcat_common_1.FetchResult.error());
}

@@ -57,0 +56,0 @@ });

{
"name": "configcat-js-ssr",
"version": "3.8.0",
"version": "3.9.0",
"description": "ConfigCat Feature Flags for Server Side Rendered apps like NuxtJS. Official ConfigCat SDK for Server Side Rendered to easily access feature flags.",

@@ -43,3 +43,3 @@ "main": "lib/index.js",

"axios": "^0.25.0",
"configcat-common": "^4.6.2"
"configcat-common": "^5.0.1"
},

@@ -46,0 +46,0 @@ "devDependencies": {

Sorry, the diff of this file is too big to display

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