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

@platformatic/config

Package Overview
Dependencies
Maintainers
6
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 0.36.0 to 0.37.0

2

index.d.ts

@@ -32,4 +32,2 @@ import { type InstanceOptions } from 'ajv'

fullPath: string
startWatching(): void
stopWatching(): Promise<void>
getSerializer(): ISerializer

@@ -36,0 +34,0 @@ purgeEnv(): IEnv

14

lib/load-config.js

@@ -41,11 +41,7 @@ 'use strict'

try {
const parsingResult = await configManager.parse()
if (!parsingResult) {
const err = new Error('The configuration does not validate against the configuration schema')
err.validationErrors = configManager.validationErrors
throw err
}
} finally {
configManager.stopWatching()
const parsingResult = await configManager.parse()
if (!parsingResult) {
const err = new Error('The configuration does not validate against the configuration schema')
err.validationErrors = configManager.validationErrors
throw err
}

@@ -52,0 +48,0 @@

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

const { request } = require('undici')
const { FileWatcher } = require('@platformatic/utils')
const { getParser, analyze, upgrade } = require('@platformatic/metaconfig')

@@ -30,12 +29,2 @@ const { isFileAccessible } = require('./utils')

this._parser = getParser(this.fullPath)
this.fileWatcher = new FileWatcher({
path: dirname(this.fullPath),
allowToWatch
})
/* c8 ignore next 3 */
if (opts.watch) {
this.startWatching()
}
this.dirname = dirname(this.fullPath)

@@ -67,20 +56,2 @@ } else {

async stopWatching () {
await this.fileWatcher.stopWatching()
}
startWatching () {
if (this.fileWatcher.isWatching) return
this.fileWatcher.on('update', async () => {
try {
await this.parseAndValidate()
this.emit('update', this.current)
} catch (err) {
this.emit('error', err)
}
})
this.fileWatcher.startWatching()
}
purgeEnv (providedEnvironment) {

@@ -101,2 +72,3 @@ const env = {

async replaceEnv (configString) {
/* istanbul ignore next */
if (this.pupa === null) {

@@ -232,2 +204,3 @@ this.pupa = (await import('pupa')).default

/* istanbul ignore next */
async parseAndValidate () {

@@ -234,0 +207,0 @@ const validationResult = await this.parse()

{
"name": "@platformatic/config",
"version": "0.36.0",
"version": "0.37.0",
"description": "Platformatic DB Config Manager",

@@ -33,4 +33,4 @@ "main": "index.js",

"undici": "^5.22.1",
"@platformatic/metaconfig": "0.36.0",
"@platformatic/utils": "0.36.0"
"@platformatic/metaconfig": "0.37.0",
"@platformatic/utils": "0.37.0"
},

@@ -37,0 +37,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