New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@unrevealed/node

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unrevealed/node - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

3

lib/types/types.d.ts

@@ -16,2 +16,5 @@ export interface UserTraits {

export type FeatureKey = keyof Features extends never ? string : keyof Features;
export interface Stages {
}
export type StageKey = keyof Stages extends never ? string : keyof Stages;
export interface FeatureAccess {

@@ -18,0 +21,0 @@ fullAccess: boolean;

3

lib/types/UnrevealedClient.d.ts
import { UnrevealedLogger } from './Logger';
import { FeatureAccess, FeatureAccessUpdate, FeatureKey, Team, User } from './types';
import { FeatureAccess, FeatureAccessUpdate, FeatureKey, StageKey, Team, User } from './types';
export type ReadyState = 'UNINITIALIZED' | 'CONNECTING' | 'READY' | 'CLOSED';

@@ -37,2 +37,3 @@ export interface UnrevealedClientOptions {

updateFeatureAccess(featureKey: FeatureKey, access: FeatureAccessUpdate): Promise<FeatureAccess>;
updateFeatureStage(featureKey: FeatureKey, access: StageKey): Promise<FeatureAccess>;
private _normalizeKey;

@@ -39,0 +40,0 @@ private _track;

@@ -152,2 +152,27 @@ "use strict";

}
updateFeatureStage(featureKey, access) {
return __awaiter(this, void 0, void 0, function* () {
const fetch = (0, fetch_1.getFetch)();
try {
const response = yield fetch(`${this._apiUrl}/api/update-feature-access`, {
method: 'post',
headers: {
Authorization: `Bearer ${this._apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ key: featureKey, access }),
});
const featureAccess = yield response.json();
this._featureAccesses.set(featureKey, featureAccess);
return featureAccess;
}
catch (err) {
let message = 'Error updating feature access';
if (err instanceof Error) {
message = `${message}: ${err.message}`;
}
throw new Error(message);
}
});
}
_normalizeKey(key) {

@@ -154,0 +179,0 @@ const hash = crypto_1.default.createHash('sha1');

{
"name": "@unrevealed/node",
"version": "0.3.4",
"version": "0.3.5",
"description": "Unrevealed SDK for Node",

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

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