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

@indigov/flags-api

Package Overview
Dependencies
Maintainers
14
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@indigov/flags-api - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

9

dist/__tests__/index.test.js

@@ -1,4 +0,9 @@

import Flags from '../index';
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const index_1 = __importDefault(require("../index"));
describe('Flags Client', () => {
const flags = new Flags(process.env.AUTH_TOKEN, 'indigovdev', 'test', { env: 'local' });
const flags = new index_1.default(process.env.AUTH_TOKEN, 'indigovdev', 'test', { env: 'local' });
it('fetches all flags', async () => {

@@ -5,0 +10,0 @@ const response = await flags.getAllFlags();

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

import fetch from 'cross-fetch';
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const cross_fetch_1 = __importDefault(require("cross-fetch"));
const Endpoints = {

@@ -7,3 +12,3 @@ prod: 'https://flags.indigov.us/v1',

};
export default class Flags {
class Flags {
constructor(token, office, source, { env = 'prod', traceId, cohort } = {}) {

@@ -17,3 +22,3 @@ this.token = token;

this.getAllFlags = async () => this.request('flags/all').then((_) => _.value);
this.request = (path) => fetch(`${this.endpoint}/${path}`, {
this.request = (path) => (0, cross_fetch_1.default)(`${this.endpoint}/${path}`, {
method: 'GET',

@@ -36,2 +41,3 @@ headers: {

}
exports.default = Flags;
//# sourceMappingURL=index.js.map
{
"name": "@indigov/flags-api",
"version": "0.0.20",
"version": "0.0.21",
"description": "Strongly typed React/Node client for the Flags service",

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

@@ -5,8 +5,5 @@ {

"compilerOptions": {
"declaration": true,
"outDir": "dist",
"rootDir": "src",
"strict": true,
"sourceMap": true
}
}

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