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

@mozilla/nimbus-shared

Package Overview
Dependencies
Maintainers
7
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mozilla/nimbus-shared - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

dist/data.json

12

CHANGELOG.md
# Changelog
## Version 0.0.5
### Library Changes
- Data is now included, type checked, and translated into native formats in Node and Python
packages. ([#43](https://github.com/mozilla/nimbus-shared/pull/43))
## Version 0.0.4

@@ -12,7 +19,2 @@

### Library Changes
- Data is now included, type checked, and translated into native formats in Node and Python
packages. ([#43](https://github.com/mozilla/nimbus-shared/pull/43))
### Minor Changes

@@ -19,0 +21,0 @@

export * as typeGuards from "./src/_generated/typeGuardHelpers";
export { checkSchema } from "./src/typeGuards";
export { checkSchema, assertSchema, isSchema } from "./src/typeGuards";
export * as schemas from "./src/_generated/schemas";
export * as types from "./types";
export { data } from "./src/_generated/data";

@@ -25,3 +25,7 @@ "use strict";

Object.defineProperty(exports, "checkSchema", { enumerable: true, get: function () { return typeGuards_1.checkSchema; } });
Object.defineProperty(exports, "assertSchema", { enumerable: true, get: function () { return typeGuards_1.assertSchema; } });
Object.defineProperty(exports, "isSchema", { enumerable: true, get: function () { return typeGuards_1.isSchema; } });
exports.schemas = __importStar(require("./src/_generated/schemas"));
exports.types = __importStar(require("./types"));
var data_1 = require("./src/_generated/data");
Object.defineProperty(exports, "data", { enumerable: true, get: function () { return data_1.data; } });
import { SchemaResult } from "../typeGuards";
import type { Experiment, ExperimentRecipe } from "../../types/experiments";
import type { Experiment, EmptyAAExperiment, ExperimentRecipe, ExperimentDesign } from "../../types/experiments";
import type { Feature } from "../../types/features";
import type { FoodColors } from "../../types/test";
import type { Audience } from "../../types/targeting";

@@ -10,8 +11,17 @@ import type { SimpleCFRMessage } from "../../types/messaging";

export declare function experiments_assertExperiment(obj: object): asserts obj is Experiment;
export declare function experiments_isEmptyAAExperiment(obj: object): obj is EmptyAAExperiment;
export declare function experiments_checkEmptyAAExperiment(obj: object): SchemaResult;
export declare function experiments_assertEmptyAAExperiment(obj: object): asserts obj is EmptyAAExperiment;
export declare function experiments_isExperimentRecipe(obj: object): obj is ExperimentRecipe;
export declare function experiments_checkExperimentRecipe(obj: object): SchemaResult;
export declare function experiments_assertExperimentRecipe(obj: object): asserts obj is ExperimentRecipe;
export declare function experiments_isExperimentDesign(obj: object): obj is ExperimentDesign;
export declare function experiments_checkExperimentDesign(obj: object): SchemaResult;
export declare function experiments_assertExperimentDesign(obj: object): asserts obj is ExperimentDesign;
export declare function features_isFeature(obj: object): obj is Feature;
export declare function features_checkFeature(obj: object): SchemaResult;
export declare function features_assertFeature(obj: object): asserts obj is Feature;
export declare function test_isFoodColors(obj: object): obj is FoodColors;
export declare function test_checkFoodColors(obj: object): SchemaResult;
export declare function test_assertFoodColors(obj: object): asserts obj is FoodColors;
export declare function targeting_isAudience(obj: object): obj is Audience;

@@ -18,0 +28,0 @@ export declare function targeting_checkAudience(obj: object): SchemaResult;

"use strict";
/* eslint-disable @typescript-eslint/ban-types */
Object.defineProperty(exports, "__esModule", { value: true });
exports.normandy_assertAddonRolloutArguments = exports.normandy_checkAddonRolloutArguments = exports.normandy_isAddonRolloutArguments = exports.normandy_assertMultiPreferenceExperimentArguments = exports.normandy_checkMultiPreferenceExperimentArguments = exports.normandy_isMultiPreferenceExperimentArguments = exports.normandy_assertBranchedAddonStudyArguments = exports.normandy_checkBranchedAddonStudyArguments = exports.normandy_isBranchedAddonStudyArguments = exports.normandy_assertPreferenceRollbackArguments = exports.normandy_checkPreferenceRollbackArguments = exports.normandy_isPreferenceRollbackArguments = exports.normandy_assertPreferenceExperimentArguments = exports.normandy_checkPreferenceExperimentArguments = exports.normandy_isPreferenceExperimentArguments = exports.normandy_assertNormandyRecipe = exports.normandy_checkNormandyRecipe = exports.normandy_isNormandyRecipe = exports.normandy_assertOptOutStudyArguments = exports.normandy_checkOptOutStudyArguments = exports.normandy_isOptOutStudyArguments = exports.normandy_assertShowHeartbeatArguments = exports.normandy_checkShowHeartbeatArguments = exports.normandy_isShowHeartbeatArguments = exports.normandy_assertConsoleLogArguments = exports.normandy_checkConsoleLogArguments = exports.normandy_isConsoleLogArguments = exports.normandy_assertAddonRollbackArguments = exports.normandy_checkAddonRollbackArguments = exports.normandy_isAddonRollbackArguments = exports.normandy_assertMessagingExperimentArguments = exports.normandy_checkMessagingExperimentArguments = exports.normandy_isMessagingExperimentArguments = exports.normandy_assertPreferenceRolloutArguments = exports.normandy_checkPreferenceRolloutArguments = exports.normandy_isPreferenceRolloutArguments = exports.messaging_assertSimpleCFRMessage = exports.messaging_checkSimpleCFRMessage = exports.messaging_isSimpleCFRMessage = exports.targeting_assertAudience = exports.targeting_checkAudience = exports.targeting_isAudience = exports.features_assertFeature = exports.features_checkFeature = exports.features_isFeature = exports.experiments_assertExperimentRecipe = exports.experiments_checkExperimentRecipe = exports.experiments_isExperimentRecipe = exports.experiments_assertExperiment = exports.experiments_checkExperiment = exports.experiments_isExperiment = void 0;
exports.normandy_assertAddonRolloutArguments = exports.normandy_checkAddonRolloutArguments = exports.normandy_isAddonRolloutArguments = exports.normandy_assertMultiPreferenceExperimentArguments = exports.normandy_checkMultiPreferenceExperimentArguments = exports.normandy_isMultiPreferenceExperimentArguments = exports.normandy_assertBranchedAddonStudyArguments = exports.normandy_checkBranchedAddonStudyArguments = exports.normandy_isBranchedAddonStudyArguments = exports.normandy_assertPreferenceRollbackArguments = exports.normandy_checkPreferenceRollbackArguments = exports.normandy_isPreferenceRollbackArguments = exports.normandy_assertPreferenceExperimentArguments = exports.normandy_checkPreferenceExperimentArguments = exports.normandy_isPreferenceExperimentArguments = exports.normandy_assertNormandyRecipe = exports.normandy_checkNormandyRecipe = exports.normandy_isNormandyRecipe = exports.normandy_assertOptOutStudyArguments = exports.normandy_checkOptOutStudyArguments = exports.normandy_isOptOutStudyArguments = exports.normandy_assertShowHeartbeatArguments = exports.normandy_checkShowHeartbeatArguments = exports.normandy_isShowHeartbeatArguments = exports.normandy_assertConsoleLogArguments = exports.normandy_checkConsoleLogArguments = exports.normandy_isConsoleLogArguments = exports.normandy_assertAddonRollbackArguments = exports.normandy_checkAddonRollbackArguments = exports.normandy_isAddonRollbackArguments = exports.normandy_assertMessagingExperimentArguments = exports.normandy_checkMessagingExperimentArguments = exports.normandy_isMessagingExperimentArguments = exports.normandy_assertPreferenceRolloutArguments = exports.normandy_checkPreferenceRolloutArguments = exports.normandy_isPreferenceRolloutArguments = exports.messaging_assertSimpleCFRMessage = exports.messaging_checkSimpleCFRMessage = exports.messaging_isSimpleCFRMessage = exports.targeting_assertAudience = exports.targeting_checkAudience = exports.targeting_isAudience = exports.test_assertFoodColors = exports.test_checkFoodColors = exports.test_isFoodColors = exports.features_assertFeature = exports.features_checkFeature = exports.features_isFeature = exports.experiments_assertExperimentDesign = exports.experiments_checkExperimentDesign = exports.experiments_isExperimentDesign = exports.experiments_assertExperimentRecipe = exports.experiments_checkExperimentRecipe = exports.experiments_isExperimentRecipe = exports.experiments_assertEmptyAAExperiment = exports.experiments_checkEmptyAAExperiment = exports.experiments_isEmptyAAExperiment = exports.experiments_assertExperiment = exports.experiments_checkExperiment = exports.experiments_isExperiment = void 0;
const typeGuards_1 = require("../typeGuards");

@@ -12,2 +12,8 @@ function experiments_isExperiment(obj) { return typeGuards_1.isSchema("experiments/Experiment", obj); }

exports.experiments_assertExperiment = experiments_assertExperiment;
function experiments_isEmptyAAExperiment(obj) { return typeGuards_1.isSchema("experiments/EmptyAAExperiment", obj); }
exports.experiments_isEmptyAAExperiment = experiments_isEmptyAAExperiment;
function experiments_checkEmptyAAExperiment(obj) { return typeGuards_1.checkSchema("experiments/EmptyAAExperiment", obj); }
exports.experiments_checkEmptyAAExperiment = experiments_checkEmptyAAExperiment;
function experiments_assertEmptyAAExperiment(obj) { return typeGuards_1.assertSchema("experiments/EmptyAAExperiment", obj); }
exports.experiments_assertEmptyAAExperiment = experiments_assertEmptyAAExperiment;
function experiments_isExperimentRecipe(obj) { return typeGuards_1.isSchema("experiments/ExperimentRecipe", obj); }

@@ -19,2 +25,8 @@ exports.experiments_isExperimentRecipe = experiments_isExperimentRecipe;

exports.experiments_assertExperimentRecipe = experiments_assertExperimentRecipe;
function experiments_isExperimentDesign(obj) { return typeGuards_1.isSchema("experiments/ExperimentDesign", obj); }
exports.experiments_isExperimentDesign = experiments_isExperimentDesign;
function experiments_checkExperimentDesign(obj) { return typeGuards_1.checkSchema("experiments/ExperimentDesign", obj); }
exports.experiments_checkExperimentDesign = experiments_checkExperimentDesign;
function experiments_assertExperimentDesign(obj) { return typeGuards_1.assertSchema("experiments/ExperimentDesign", obj); }
exports.experiments_assertExperimentDesign = experiments_assertExperimentDesign;
function features_isFeature(obj) { return typeGuards_1.isSchema("features/Feature", obj); }

@@ -26,2 +38,8 @@ exports.features_isFeature = features_isFeature;

exports.features_assertFeature = features_assertFeature;
function test_isFoodColors(obj) { return typeGuards_1.isSchema("test/FoodColors", obj); }
exports.test_isFoodColors = test_isFoodColors;
function test_checkFoodColors(obj) { return typeGuards_1.checkSchema("test/FoodColors", obj); }
exports.test_checkFoodColors = test_checkFoodColors;
function test_assertFoodColors(obj) { return typeGuards_1.assertSchema("test/FoodColors", obj); }
exports.test_assertFoodColors = test_assertFoodColors;
function targeting_isAudience(obj) { return typeGuards_1.isSchema("targeting/Audience", obj); }

@@ -28,0 +46,0 @@ exports.targeting_isAudience = targeting_isAudience;

@@ -87,2 +87,19 @@ /**

}
/**
* Preset types
* */
export declare type ExperimentDesign = EmptyAAExperiment;
/**
* An empty experiment that can target a maximum of 1% of the population
*/
export interface EmptyAAExperiment extends Experiment {
branches: Array<EmptyBranch>;
bucketConfig: AABucketConfig;
}
interface AABucketConfig extends BucketConfig {
total: 10000;
}
interface EmptyBranch extends Branch {
value: null;
}
export {};

@@ -1,3 +0,5 @@

export * as normandy from "./normandy";
export * as experiments from "./experiments";
export * as messaging from "./messaging";
export * as targeting from "./targeting";
export * as normandy from "./normandy";
export * as test from "./test";

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.normandy = __importStar(require("./normandy"));
exports.experiments = __importStar(require("./experiments"));
exports.messaging = __importStar(require("./messaging"));
exports.targeting = __importStar(require("./targeting"));
exports.normandy = __importStar(require("./normandy"));
exports.test = __importStar(require("./test"));
export * as typeGuards from "./src/_generated/typeGuardHelpers";
export { checkSchema } from "./src/typeGuards";
export { checkSchema, assertSchema, isSchema } from "./src/typeGuards";
export * as schemas from "./src/_generated/schemas";
export * as types from "./types";
export { data } from "./src/_generated/data";
{
"name": "@mozilla/nimbus-shared",
"version": "0.0.4",
"version": "0.0.5",
"license": "MPL-2.0",

@@ -5,0 +5,0 @@ "engines": {

@@ -10,4 +10,2 @@ # Nimbus Shared ![CircleCI](https://img.shields.io/circleci/build/github/mozilla/nimbus-shared) ![npm (scoped)](https://img.shields.io/npm/v/@mozilla/nimbus-shared)

For more information on the data and schemas included here, how to use them, and how to add to them,
see the documentation at
https://mozilla.github.io/nimbus-shared
see the documentation at https://mozilla.github.io/nimbus-shared
/* eslint-disable @typescript-eslint/ban-types */
import { checkSchema, isSchema, assertSchema, SchemaResult } from "../typeGuards";
import type { Experiment, ExperimentRecipe } from "../../types/experiments";
import type { Experiment, EmptyAAExperiment, ExperimentRecipe, ExperimentDesign } from "../../types/experiments";
import type { Feature } from "../../types/features";
import type { FoodColors } from "../../types/test";
import type { Audience } from "../../types/targeting";

@@ -15,2 +16,7 @@ import type { SimpleCFRMessage } from "../../types/messaging";

export function experiments_isEmptyAAExperiment(obj: object): obj is EmptyAAExperiment { return isSchema("experiments/EmptyAAExperiment", obj); }
export function experiments_checkEmptyAAExperiment(obj: object): SchemaResult { return checkSchema("experiments/EmptyAAExperiment", obj); }
export function experiments_assertEmptyAAExperiment(obj: object): asserts obj is EmptyAAExperiment { return assertSchema("experiments/EmptyAAExperiment", obj); }
export function experiments_isExperimentRecipe(obj: object): obj is ExperimentRecipe { return isSchema("experiments/ExperimentRecipe", obj); }

@@ -21,2 +27,7 @@ export function experiments_checkExperimentRecipe(obj: object): SchemaResult { return checkSchema("experiments/ExperimentRecipe", obj); }

export function experiments_isExperimentDesign(obj: object): obj is ExperimentDesign { return isSchema("experiments/ExperimentDesign", obj); }
export function experiments_checkExperimentDesign(obj: object): SchemaResult { return checkSchema("experiments/ExperimentDesign", obj); }
export function experiments_assertExperimentDesign(obj: object): asserts obj is ExperimentDesign { return assertSchema("experiments/ExperimentDesign", obj); }
export function features_isFeature(obj: object): obj is Feature { return isSchema("features/Feature", obj); }

@@ -27,2 +38,7 @@ export function features_checkFeature(obj: object): SchemaResult { return checkSchema("features/Feature", obj); }

export function test_isFoodColors(obj: object): obj is FoodColors { return isSchema("test/FoodColors", obj); }
export function test_checkFoodColors(obj: object): SchemaResult { return checkSchema("test/FoodColors", obj); }
export function test_assertFoodColors(obj: object): asserts obj is FoodColors { return assertSchema("test/FoodColors", obj); }
export function targeting_isAudience(obj: object): obj is Audience { return isSchema("targeting/Audience", obj); }

@@ -29,0 +45,0 @@ export function targeting_checkAudience(obj: object): SchemaResult { return checkSchema("targeting/Audience", obj); }

@@ -88,1 +88,24 @@ /**

}
/**
* Preset types
* */
// A union of all available experiment designs; right now there is only one.
export type ExperimentDesign = EmptyAAExperiment;
/**
* An empty experiment that can target a maximum of 1% of the population
*/
export interface EmptyAAExperiment extends Experiment {
branches: Array<EmptyBranch>;
bucketConfig: AABucketConfig;
}
interface AABucketConfig extends BucketConfig {
total: 10000
}
interface EmptyBranch extends Branch {
value: null
}

@@ -1,3 +0,5 @@

export * as normandy from "./normandy";
export * as experiments from "./experiments";
export * as messaging from "./messaging";
export * as targeting from "./targeting";
export * as normandy from "./normandy";
export * as test from "./test";

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

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

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

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