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

fastify-feature-flags

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-feature-flags - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

dist/providers/index.d.ts

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Change Log

# [1.2.0](https://gitlab.com/m03geek/fastify-feature-flags/compare/v1.1.0...v1.2.0) (2019-04-26)
### Features
* make provider deps as peer deps ([cc39482](https://gitlab.com/m03geek/fastify-feature-flags/commit/cc39482))
# [1.1.0](https://gitlab.com/m03geek/fastify-feature-flags/compare/v1.0.1...v1.1.0) (2019-04-25)

@@ -7,0 +16,0 @@

3

dist/index.d.ts

@@ -8,5 +8,2 @@ /// <reference types="node" />

interface Plugin {
providers: {
[key: string]: typeof GenericProvider;
};
/**

@@ -13,0 +10,0 @@ * Check if feature is enabled

@@ -6,5 +6,2 @@ "use strict";

const fastify_plugin_1 = __importDefault(require("fastify-plugin"));
const config_1 = require("./providers/config");
const env_1 = require("./providers/env");
const unleash_1 = require("./providers/unleash");
const feature_error_1 = require("./feature-error");

@@ -28,7 +25,2 @@ const PLUGIN_NAME = 'featureFlags';

const plugin = {
providers: {
ConfigProvider: config_1.ConfigProvider,
EnvProvider: env_1.EnvProvider,
UnleashProvider: unleash_1.UnleashProvider,
},
isEnabled,

@@ -35,0 +27,0 @@ checkEnabled,

{
"name": "fastify-feature-flags",
"version": "1.1.0",
"version": "1.2.0",
"description": "Fastify feature flags plugin",

@@ -70,9 +70,13 @@ "main": "dist/index.js",

"typedoc-plugin-markdown": "^1.1.27",
"typescript": "^3.4.5"
"typescript": "^3.4.5",
"config": "^3.1.0",
"unleash-client": "^3.2.3"
},
"dependencies": {
"fastify-plugin": "^1.5.0"
},
"peerDependencies": {
"config": "^3.1.0",
"fastify-plugin": "^1.5.0",
"unleash-client": "^3.2.3"
}
}

@@ -62,3 +62,4 @@ # fastify-feature-flags

const ffPlugin = require('fastify-feature-flags');
app.register(ffPlugin, {providers: [new ffPlugin.ConfigProvider()]});
const ConfigProvider = require('fastify-feature-flags/dist/providers/config');
app.register(ffPlugin, {providers: [new ConfigProvider()]});
```

@@ -78,3 +79,3 @@

Reads feature flags from specified config section. Depends on [`config`](https://www.npmjs.com/package/config) module. It's constuctor consumes options object that contains `prefix` for config section where features are defined.
Reads feature flags from specified config section. Depends on [`config`](https://www.npmjs.com/package/config) module. You should install it manually. It's constuctor consumes options object that contains `prefix` for config section where features are defined.

@@ -95,3 +96,3 @@ Example:

```js
const provider = new ffPlugin.ConfigProvider({
const provider = new ConfigProvider({
prefix: 'features',

@@ -117,3 +118,3 @@ })

```js
const provider = new ffPlugin.EnvProvider({
const provider = new EnvProvider({
prefix: 'FEATURE_',

@@ -127,3 +128,3 @@ })

This provider relies on feature flags service [Unleash](https://github.com/Unleash/unleash). You may configure it separately, see instructions in their repo.
This provider relies on feature flags service [Unleash](https://github.com/Unleash/unleash). You should install the [module](https://www.npmjs.com/package/unleash-client) manually.

@@ -134,3 +135,3 @@ Example:

```js
const provider = new ffPlugin.UnleashProvider({
const provider = new UnleashProvider({
appName: 'my-fastify-app';

@@ -154,5 +155,6 @@ url: 'https://unleash.example.com';

const ffPlugin = require('fastify-feature-flags');
const EnvProvider = require('fastify-feature-flags/dist/providers/env');
fastify.register(ffPlugin, {
providers: [new ffPlugin.EnvProvider({prefix: 'FEATURE_'})]
providers: [new EnvProvider({prefix: 'FEATURE_'})]
});

@@ -159,0 +161,0 @@

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