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

@platformatic/config

Package Overview
Dependencies
Maintainers
0
Versions
291
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platformatic/config - npm Package Compare versions

Comparing version 2.0.0-alpha.24 to 2.0.0-alpha.25

1

index.d.ts

@@ -158,3 +158,2 @@ import { FastifyError } from '@fastify/error'

export const InvalidPlaceholderError: (placeholder: string, suggestion: string) => FastifyError
export const EnvVarMissingError: (envVarName: string) => FastifyError
export const CannotParseConfigFileError: (error: string) => FastifyError

@@ -161,0 +160,0 @@ export const ValidationErrors: (errors: string) => FastifyError

@@ -11,3 +11,2 @@ 'use strict'

InvalidPlaceholderError: createError(`${ERROR_PREFIX}_INVALID_PLACEHOLDER`, '%s is an invalid placeholder. All placeholders must be prefixed with PLT_.\nDid you mean PLT_%s?'),
EnvVarMissingError: createError(`${ERROR_PREFIX}_ENV_VAR_MISSING`, '%s env variable is missing.'),
CannotParseConfigFileError: createError(`${ERROR_PREFIX}_CANNOT_PARSE_CONFIG_FILE`, 'Cannot parse config file. %s'),

@@ -14,0 +13,0 @@ ValidationErrors: createError(`${ERROR_PREFIX}_VALIDATION_ERRORS`, 'Validation errors: %s'),

11

lib/manager.js

@@ -114,2 +114,10 @@ 'use strict'

/*
When the value is undefined, which means that the key was missing,
just replace with an empty string. The JSON schema will eventually throw an error.
*/
if (typeof value === 'undefined') {
value = ''
}
// TODO this should handle all the escapes chars

@@ -215,5 +223,2 @@ // defined in https://www.json.org/json-en.html

} catch (err) {
if (err.name === 'MissingValueError') {
throw new errors.EnvVarMissingError(err.key)
}
const newerr = new errors.CannotParseConfigFileError(err.message)

@@ -220,0 +225,0 @@ newerr.cause = err

{
"name": "@platformatic/config",
"version": "2.0.0-alpha.24",
"version": "2.0.0-alpha.25",
"description": "Platformatic DB Config Manager",

@@ -41,3 +41,3 @@ "main": "index.js",

"undici": "^6.9.0",
"@platformatic/utils": "2.0.0-alpha.24"
"@platformatic/utils": "2.0.0-alpha.25"
},

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

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