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 6.0.0 to 6.0.1

3

lib/Cache.d.ts

@@ -1,2 +0,3 @@

import { ICache, ProjectConfig } from "configcat-common";
import type { ICache } from "configcat-common";
import { ProjectConfig } from "configcat-common";
export declare class LocalStorageCache implements ICache {

@@ -3,0 +4,0 @@ cache: {

@@ -1,2 +0,2 @@

import { IConfigFetcher, IFetchResponse, OptionsBase } from "configcat-common";
import type { IConfigFetcher, IFetchResponse, OptionsBase } from "configcat-common";
export declare class HttpConfigFetcher implements IConfigFetcher {

@@ -3,0 +3,0 @@ fetchLogic(options: OptionsBase, lastEtag: string | null): Promise<IFetchResponse>;

@@ -16,9 +16,9 @@ "use strict";

case 0:
headers = typeof window !== 'undefined' || !lastEtag
headers = typeof window !== "undefined" || !lastEtag
// NOTE: It's intentional that we don't specify the If-None-Match header.
// The browser automatically handles it, adding it manually would cause an unnecessary CORS OPTIONS request.
? {}
: { 'If-None-Match': lastEtag };
: { "If-None-Match": lastEtag };
axiosConfig = {
method: 'get',
method: "get",
timeout: options.requestTimeoutMs,

@@ -56,2 +56,4 @@ url: options.getUrl(),

break;
default:
break;
}

@@ -58,0 +60,0 @@ throw new configcat_common_1.FetchError("failure", err_1);

import { __awaiter, __generator } from "tslib";
import axios from 'axios';
import axios from "axios";
import { FetchError } from "configcat-common";

@@ -13,9 +13,9 @@ var HttpConfigFetcher = /** @class */ (function () {

case 0:
headers = typeof window !== 'undefined' || !lastEtag
headers = typeof window !== "undefined" || !lastEtag
// NOTE: It's intentional that we don't specify the If-None-Match header.
// The browser automatically handles it, adding it manually would cause an unnecessary CORS OPTIONS request.
? {}
: { 'If-None-Match': lastEtag };
: { "If-None-Match": lastEtag };
axiosConfig = {
method: 'get',
method: "get",
timeout: options.requestTimeoutMs,

@@ -53,2 +53,4 @@ url: options.getUrl(),

break;
default:
break;
}

@@ -55,0 +57,0 @@ throw new FetchError("failure", err_1);

import * as configcatcommon from "configcat-common";
import { FlagOverrides, InMemoryCache, MapOverrideDataSource, PollingMode } from "configcat-common";
import { FlagOverrides, MapOverrideDataSource, PollingMode } from "configcat-common";
import { LocalStorageCache } from "./Cache";
import { HttpConfigFetcher } from "./ConfigFetcher";
import { LocalStorageCache } from "./Cache";
import CONFIGCAT_SDK_VERSION from "./Version";

@@ -10,3 +10,3 @@ /**

* That is, a new client object is created only when there is none available for the specified SDK Key.
* Otherwise, the already created instance is returned (in which case the 'pollingMode', 'options' and 'configCatKernel' arguments are ignored).
* Otherwise, the already created instance is returned (in which case the 'pollingMode' and 'options' arguments are ignored).
* So, please keep in mind that when you make multiple calls to this method using the same SDK Key, you may end up with multiple references to the same client object.

@@ -20,3 +20,3 @@ * @param sdkKey SDK Key to access configuration

configFetcher: new HttpConfigFetcher(),
cache: new InMemoryCache(),
cache: new LocalStorageCache(),
sdkType: "ConfigCat-JS-SSR",

@@ -23,0 +23,0 @@ sdkVersion: CONFIGCAT_SDK_VERSION

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

export default "6.0.0";
export default "6.0.1";

@@ -1,2 +0,3 @@

import { FlagOverrides, IAutoPollOptions, IConfigCatClient, IConfigCatLogger, ILazyLoadingOptions, IManualPollOptions, LogLevel, PollingMode } from "configcat-common";
import type { IAutoPollOptions, IConfigCatClient, IConfigCatLogger, ILazyLoadingOptions, IManualPollOptions, LogLevel } from "configcat-common";
import { FlagOverrides, PollingMode } from "configcat-common";
/**

@@ -6,3 +7,3 @@ * Returns an instance of ConfigCatClient for the specified SDK Key.

* That is, a new client object is created only when there is none available for the specified SDK Key.
* Otherwise, the already created instance is returned (in which case the 'pollingMode', 'options' and 'configCatKernel' arguments are ignored).
* Otherwise, the already created instance is returned (in which case the 'pollingMode' and 'options' arguments are ignored).
* So, please keep in mind that when you make multiple calls to this method using the same SDK Key, you may end up with multiple references to the same client object.

@@ -9,0 +10,0 @@ * @param sdkKey SDK Key to access configuration

@@ -6,4 +6,4 @@ "use strict";

var configcat_common_1 = require("configcat-common");
var Cache_1 = require("./Cache");
var ConfigFetcher_1 = require("./ConfigFetcher");
var Cache_1 = require("./Cache");
var Version_1 = require("./Version");

@@ -14,3 +14,3 @@ /**

* That is, a new client object is created only when there is none available for the specified SDK Key.
* Otherwise, the already created instance is returned (in which case the 'pollingMode', 'options' and 'configCatKernel' arguments are ignored).
* Otherwise, the already created instance is returned (in which case the 'pollingMode' and 'options' arguments are ignored).
* So, please keep in mind that when you make multiple calls to this method using the same SDK Key, you may end up with multiple references to the same client object.

@@ -24,3 +24,3 @@ * @param sdkKey SDK Key to access configuration

configFetcher: new ConfigFetcher_1.HttpConfigFetcher(),
cache: new configcat_common_1.InMemoryCache(),
cache: new Cache_1.LocalStorageCache(),
sdkType: "ConfigCat-JS-SSR",

@@ -27,0 +27,0 @@ sdkVersion: Version_1.default

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

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

"buildPure": "webpack && gulp webpack",
"prepare": "npm run build"
"prepare": "npm run build",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix"
},

@@ -56,5 +58,9 @@ "repository": {

"@types/node": "^18.11.18",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"axios-mock-adapter": "^1.21.2",
"chai": "^4.3.7",
"core-js": "^3.24.1",
"eslint": "^8.34.0",
"eslint-plugin-import": "^2.27.5",
"gulp": "^4.0.2",

@@ -75,3 +81,3 @@ "gulp-replace": "^1.1.3",

"typescript": "^4.9.4",
"webpack": "^5.74.0",
"webpack": "^5.77.0",
"webpack-auto-inject-version": "^1.2.2",

@@ -78,0 +84,0 @@ "webpack-cli": "^4.10.0"

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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