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

@devcycle/js-cloud-server-sdk

Package Overview
Dependencies
Maintainers
0
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devcycle/js-cloud-server-sdk - npm Package Compare versions

Comparing version 1.17.4 to 1.18.0

12

lib/shared/server-request/src/request.js

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.get = exports.patch = exports.post = exports.getWithTimeout = exports.handleResponse = exports.exponentialBackoff = exports.ResponseError = void 0;
exports.exponentialBackoff = exports.ResponseError = void 0;
exports.handleResponse = handleResponse;
exports.getWithTimeout = getWithTimeout;
exports.post = post;
exports.patch = patch;
exports.get = get;
const fetch_retry_1 = __importDefault(require("fetch-retry"));

@@ -51,3 +56,2 @@ class ResponseError extends Error {

}
exports.handleResponse = handleResponse;
async function getWithTimeout(url, requestConfig, timeout) {

@@ -65,3 +69,2 @@ const controller = new AbortController();

}
exports.getWithTimeout = getWithTimeout;
async function post(url, requestConfig, sdkKey) {

@@ -81,3 +84,2 @@ const [_fetch, config] = await getFetchAndConfig(requestConfig);

}
exports.post = post;
async function patch(url, requestConfig, sdkKey) {

@@ -97,3 +99,2 @@ const [_fetch, config] = await getFetchAndConfig(requestConfig);

}
exports.patch = patch;
async function get(url, requestConfig) {

@@ -109,3 +110,2 @@ const [_fetch, config] = await getFetchAndConfig(requestConfig);

}
exports.get = get;
async function getFetch() {

@@ -112,0 +112,0 @@ if (typeof fetch !== 'undefined') {

{
"name": "@devcycle/js-cloud-server-sdk",
"version": "1.17.4",
"version": "1.18.0",
"description": "The DevCycle JS Cloud Bucketing Server SDK used for feature management.",

@@ -22,3 +22,3 @@ "author": "DevCycle <support@devcycle.com>",

"dependencies": {
"@devcycle/types": "^1.18.3",
"@devcycle/types": "^1.19.0",
"cross-fetch": "^4.0.0",

@@ -25,0 +25,0 @@ "fetch-retry": "^5.0.6",

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.get = exports.patch = exports.post = exports.getWithTimeout = exports.handleResponse = exports.exponentialBackoff = exports.ResponseError = void 0;
exports.exponentialBackoff = exports.ResponseError = void 0;
exports.handleResponse = handleResponse;
exports.getWithTimeout = getWithTimeout;
exports.post = post;
exports.patch = patch;
exports.get = get;
const fetch_retry_1 = __importDefault(require("fetch-retry"));

@@ -51,3 +56,2 @@ class ResponseError extends Error {

}
exports.handleResponse = handleResponse;
async function getWithTimeout(url, requestConfig, timeout) {

@@ -65,3 +69,2 @@ const controller = new AbortController();

}
exports.getWithTimeout = getWithTimeout;
async function post(url, requestConfig, sdkKey) {

@@ -81,3 +84,2 @@ const [_fetch, config] = await getFetchAndConfig(requestConfig);

}
exports.post = post;
async function patch(url, requestConfig, sdkKey) {

@@ -97,3 +99,2 @@ const [_fetch, config] = await getFetchAndConfig(requestConfig);

}
exports.patch = patch;
async function get(url, requestConfig) {

@@ -109,3 +110,2 @@ const [_fetch, config] = await getFetchAndConfig(requestConfig);

}
exports.get = get;
async function getFetch() {

@@ -112,0 +112,0 @@ if (typeof fetch !== 'undefined') {

import { DVCVariableValue, DVCVariableSet, DVCFeatureSet, DevCycleEvent } from './types';
import { DVCVariable } from './models/variable';
import { DevCyclePlatformDetails } from './models/populatedUser';
import { DevCycleServerSDKOptions, DVCLogger, VariableTypeAlias, type VariableValue } from '@devcycle/types';
import { DevCycleServerSDKOptions, DVCLogger, InferredVariableType, VariableDefinitions } from '@devcycle/types';
import { DevCycleUser } from './models/user';
export interface VariableDefinitions {
[key: string]: VariableValue;
}
export declare class DevCycleCloudClient<Variables extends VariableDefinitions = VariableDefinitions> {

@@ -21,3 +18,3 @@ private sdkKey;

variable<K extends string & keyof Variables, T extends DVCVariableValue & Variables[K]>(user: DevCycleUser, key: K, defaultValue: T): Promise<DVCVariable<T>>;
variableValue<K extends string & keyof Variables, T extends DVCVariableValue & Variables[K]>(user: DevCycleUser, key: K, defaultValue: T): Promise<VariableTypeAlias<T>>;
variableValue<K extends string & keyof Variables, T extends DVCVariableValue & Variables[K]>(user: DevCycleUser, key: K, defaultValue: T): Promise<InferredVariableType<K, T>>;
allVariables(user: DevCycleUser): Promise<DVCVariableSet>;

@@ -24,0 +21,0 @@ allFeatures(user: DevCycleUser): Promise<DVCFeatureSet>;

@@ -17,3 +17,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.initializeDevCycle = exports.DevCycleUser = exports.DevCycleCloudClient = void 0;
exports.DevCycleUser = exports.DevCycleCloudClient = void 0;
exports.initializeDevCycle = initializeDevCycle;
const cloudClient_1 = require("./cloudClient");

@@ -45,3 +46,2 @@ Object.defineProperty(exports, "DevCycleCloudClient", { enumerable: true, get: function () { return cloudClient_1.DevCycleCloudClient; } });

}
exports.initializeDevCycle = initializeDevCycle;
//# sourceMappingURL=index.js.map

@@ -18,9 +18,19 @@ "use strict";

});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });

@@ -27,0 +37,0 @@ exports.DVCPopulatedUser = void 0;

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

import { VariableType, VariableTypeAlias } from '@devcycle/types';
import { InferredVariableType, VariableKey, VariableType, VariableTypeAlias } from '@devcycle/types';
import { DVCVariableInterface, DVCVariableValue } from '../types';

@@ -10,5 +10,5 @@ export type VariableParam<T extends DVCVariableValue> = {

};
export declare class DVCVariable<T extends DVCVariableValue> implements DVCVariableInterface {
key: string;
value: VariableTypeAlias<T>;
export declare class DVCVariable<T extends DVCVariableValue, K extends VariableKey = VariableKey> implements DVCVariableInterface {
key: K;
value: InferredVariableType<K, T>;
readonly defaultValue: T;

@@ -15,0 +15,0 @@ readonly isDefaulted: boolean;

@@ -11,2 +11,4 @@ "use strict";

(0, paramUtils_1.checkParamType)('key', key, paramUtils_1.typeEnum.string);
// kind of cheating here with the type assertion but we're basically assuming that all variable keys in
// generated types are lowercase since the system enforces that elsewhere
this.key = key.toLowerCase();

@@ -13,0 +15,0 @@ this.isDefaulted = value === undefined || value === null;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.postTrack = exports.getVariable = exports.getAllVariables = exports.getAllFeatures = exports.HOST = void 0;
exports.HOST = void 0;
exports.getAllFeatures = getAllFeatures;
exports.getAllVariables = getAllVariables;
exports.getVariable = getVariable;
exports.postTrack = postTrack;
const server_request_1 = require("../server-request/src");

@@ -20,3 +24,2 @@ exports.HOST = '.devcycle.com';

}
exports.getAllFeatures = getAllFeatures;
async function getAllVariables(user, sdkKey, options) {

@@ -31,3 +34,2 @@ const baseUrl = `${options.bucketingAPIURI || BUCKETING_URL}${VARIABLES_PATH}`;

}
exports.getAllVariables = getAllVariables;
async function getVariable(user, sdkKey, variableKey, options) {

@@ -41,3 +43,2 @@ const baseUrl = `${options.bucketingAPIURI || BUCKETING_URL}${VARIABLES_PATH}/${variableKey}`;

}
exports.getVariable = getVariable;
async function postTrack(user, event, sdkKey, options) {

@@ -54,3 +55,2 @@ const baseUrl = `${options.bucketingAPIURI || BUCKETING_URL}${TRACK_PATH}`;

}
exports.postTrack = postTrack;
//# sourceMappingURL=request.js.map

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.dvcDefaultLogger = exports.DVCLogLevels = void 0;
exports.DVCLogLevels = void 0;
exports.dvcDefaultLogger = dvcDefaultLogger;
const isNumber_1 = __importDefault(require("lodash/isNumber"));

@@ -32,3 +33,2 @@ const prefix = '[DevCycle]: ';

}
exports.dvcDefaultLogger = dvcDefaultLogger;
//# sourceMappingURL=logger.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isValidServerSDKKey = exports.checkParamString = exports.checkParamType = exports.typeEnum = exports.checkParamDefined = void 0;
exports.checkParamType = exports.typeEnum = exports.checkParamDefined = void 0;
exports.checkParamString = checkParamString;
exports.isValidServerSDKKey = isValidServerSDKKey;
const checkParamDefined = (name, param) => {

@@ -40,7 +42,5 @@ if (param === undefined || param === null) {

}
exports.checkParamString = checkParamString;
function isValidServerSDKKey(sdkKey) {
return (sdkKey === null || sdkKey === void 0 ? void 0 : sdkKey.startsWith('server')) || (sdkKey === null || sdkKey === void 0 ? void 0 : sdkKey.startsWith('dvc_server'));
}
exports.isValidServerSDKKey = isValidServerSDKKey;
//# sourceMappingURL=paramUtils.js.map

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

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

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