Socket
Socket
Sign inDemoInstall

configcat-js-ssr

Package Overview
Dependencies
Maintainers
4
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 5.5.0 to 5.6.0

.nvmrc

1

lib/Cache.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LocalStorageCache = void 0;
var LocalStorageCache = /** @class */ (function () {

@@ -4,0 +5,0 @@ function LocalStorageCache() {

4

lib/ConfigFetcher.d.ts

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

import { IConfigFetcher, OptionsBase, FetchResult } from "configcat-common";
import { FetchResult, IConfigFetcher, OptionsBase } from "configcat-common";
export declare class HttpConfigFetcher implements IConfigFetcher {
fetchLogic(options: OptionsBase, _lastEtag: string, callback: (result: FetchResult) => void): void;
fetchLogic(options: OptionsBase, lastEtag: string, callback: (result: FetchResult) => void): void;
}
export default IConfigFetcher;
//# sourceMappingURL=ConfigFetcher.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpConfigFetcher = void 0;
var axios_1 = require("axios");
var configcat_common_1 = require("configcat-common");
var axios_1 = require("axios");
var HttpConfigFetcher = /** @class */ (function () {
function HttpConfigFetcher() {
}
HttpConfigFetcher.prototype.fetchLogic = function (options, _lastEtag, callback) {
HttpConfigFetcher.prototype.fetchLogic = function (options, lastEtag, callback) {
// If we are not running in browser set the If-None-Match header.
var headers = typeof window !== 'undefined' ? {} : {
'If-None-Match': (lastEtag) ? lastEtag : null
};
var axiosConfig = {

@@ -13,2 +18,3 @@ method: 'get',

url: options.getUrl(),
headers: headers
};

@@ -15,0 +21,0 @@ axios_1.default(axiosConfig)

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OverrideBehaviour = exports.DataGovernance = exports.createFlagOverridesFromMap = exports.createConsoleLogger = exports.createClientWithLazyLoad = exports.createClientWithManualPoll = exports.createClientWithAutoPoll = exports.createClient = void 0;
var configcatcommon = require("configcat-common");

@@ -4,0 +5,0 @@ var ConfigFetcher_1 = require("./ConfigFetcher");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = "5.5.0";
exports.default = "5.6.0";
{
"name": "configcat-js-ssr",
"version": "5.5.0",
"version": "5.6.0",
"description": "ConfigCat Feature Flags for Server Side Rendered apps like NuxtJS. Official ConfigCat SDK for Server Side Rendered to easily access feature flags.",

@@ -49,25 +49,25 @@ "main": "lib/index.js",

"devDependencies": {
"@types/chai": "^4.2.4",
"@types/mocha": "^5.2.5",
"@types/node": "^10.17.19",
"chai": "^4.2.0",
"core-js": "^3.6.5",
"@types/chai": "^4.3.3",
"@types/mocha": "^9.1.1",
"@types/node": "^18.6.5",
"chai": "^4.3.6",
"core-js": "^3.24.1",
"gulp": "^4.0.2",
"gulp-replace": "^1.1.3",
"gulp-typescript": "^6.0.0-alpha.1",
"karma": "^6.3.4",
"karma": "^6.4.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-chrome-launcher": "^3.1.1",
"karma-cli": "^2.0.0",
"karma-coverage": "^2.0.2",
"karma-coverage": "^2.2.0",
"karma-firefox-launcher": "^2.1.2",
"karma-mocha": "^2.0.1",
"karma-typescript": "^5.0.2",
"karma-typescript": "^5.5.3",
"mocha": "^8.1.0",
"ts-loader": "^6.2.2",
"typescript": "^3.8.3",
"webpack": "^4.42.1",
"ts-loader": "^9.3.1",
"typescript": "^3.9.10",
"webpack": "^5.74.0",
"webpack-auto-inject-version": "^1.2.2",
"webpack-cli": "^3.3.9"
"webpack-cli": "^4.10.0"
}
}

@@ -83,2 +83,20 @@ # ConfigCat SDK for JavaScript Server Side Rendered applications

## Sensitive information handling
The frontend/mobile SDKs are running in your users' browsers/devices. The SDK is downloading a [config.json](https://configcat.com/docs/requests/) file from ConfigCat's CDN servers. The URL path for this config.json file contains your SDK key, so the SDK key and the content of your config.json file (feature flag keys, feature flag values, targeting rules, % rules) can be visible to your users.
This SDK key is read-only, it only allows downloading your config.json file, but nobody can make any changes with it in your ConfigCat account.
Suppose you don't want your SDK key or the content of your config.json file visible to your users. In that case, we recommend you use the SDK only in your backend applications and call a backend endpoint in your frontend/mobile application to evaluate the feature flags for a specific application customer.
Also, we recommend using [sensitive targeting comparators](https://configcat.com/docs/advanced/targeting/#sensitive-text-comparators) in the targeting rules of those feature flags that are used in the frontend/mobile SDKs.
## Browser compatibility
This SDK should be compatible with all modern browsers.
The SDK is [tested](https://github.com/configcat/js-ssr-sdk/blob/master/.github/workflows/js-ssr-ci.yml) against the following browsers:
- Chrome (stable, latest, beta)
- Chromium (64.0.3282.0, 72.0.3626.0, 80.0.3987.0)
- Firefox (latest, latest-beta, 84.0).
These tests are running on each pull request, before each deploy, and on a daily basis.
You can view a sample run [here](https://github.com/configcat/js-ssr-sdk/actions/runs/2420724478).
## Need help?

@@ -94,1 +112,9 @@ https://configcat.com/support

- [Blog](https://blog.configcat.com)
# Troubleshooting
### Make sure you have the proper Node.js version installed
You might run into errors caused by the wrong version of Node.js. To make sure you are using the recommended Node.js version follow these steps.
1. Have nvm (Node Version Manager - https://github.com/nvm-sh/nvm ) installed:
1. Run `nvm install`. This will install the compatible version of Node.js.
1. Run `nvm use`. This will use the compatible version of Node.js.

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