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

@epistemology-factory/crocks-web

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epistemology-factory/crocks-web - npm Package Compare versions

Comparing version 0.2.10 to 0.3.0

web/errors.js

2

package.json
{
"name": "@epistemology-factory/crocks-web",
"version": "0.2.10",
"version": "0.3.0",
"description": "Functions to help write web applications with crocks",

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

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

const { ERROR_TYPES } = require("../../../../web/lambda/errors");
const { ERROR_TYPES } = require("../../../../web/errors");

@@ -22,6 +22,2 @@ // anError = (String) -> Matcher

const anInvalidEnvVarError = (name) => anEnvVarError(ERROR_TYPES.INVALID_ENV_VAR, name)
const aMissingEnvVarError = (name) => anEnvVarError(ERROR_TYPES.MISSING_ENV_VAR, name)
const anInvalidContentTypeError = (contentType) =>

@@ -33,2 +29,16 @@ allOf(

const anInvalidEnvVarError = (name) => anEnvVarError(ERROR_TYPES.INVALID_ENV_VAR, name)
const anInvalidStateError = (reason) =>
allOf(
anError(ERROR_TYPES.INVALID_STATE),
hasProperty("reason", reason)
)
const aMissingEnvVarError = (name) => anEnvVarError(ERROR_TYPES.MISSING_ENV_VAR, name)
const aMissingPropError = (prop) => anInvalidStateError(`Missing prop '${prop}'`)
const aMissingPathError = (path) => aMissingPropError(path.join("."))
const aValidationError = (failures) =>

@@ -44,4 +54,7 @@ allOf(

anInvalidEnvVarError,
anInvalidStateError,
aMissingEnvVarError,
aMissingPropError,
aMissingPathError,
aValidationError
}

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

...require("./constraints"),
...require("./json"),
...require("./object"),
...require("./strings"),
...require("./object")
...require("./validator")
};

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

const { LOG_LEVELS, LOG_LEVEL_STRINGS } = require("../../logging/logger");
const { invalidEnvVar } = require("./errors");
const { invalidEnvVar } = require("../errors");

@@ -18,0 +18,0 @@ // getLogger :: (Integer -> Integer -> String -> a -> a) -> Object -> Result Object Assign

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

const { isSchemaValid, isDefinedFailure } = require("../../validation/validators");
const { validationError } = require("./errors");
const { validationError } = require("../errors");

@@ -21,0 +21,0 @@ // toArray :: a -> [ a ]

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