@platformatic/config
Advanced tools
Comparing version 0.23.2 to 0.24.0
@@ -50,2 +50,5 @@ 'use strict' | ||
this._onMissingEnv = opts.onMissingEnv | ||
if (typeof opts.transformConfig === 'function') { | ||
this._transformConfig = opts.transformConfig | ||
} | ||
} | ||
@@ -52,0 +55,0 @@ |
{ | ||
"name": "@platformatic/config", | ||
"version": "0.23.2", | ||
"version": "0.24.0", | ||
"description": "Platformatic DB Config Manager", | ||
@@ -31,4 +31,4 @@ "main": "index.js", | ||
"undici": "^5.22.0", | ||
"@platformatic/metaconfig": "0.23.2", | ||
"@platformatic/utils": "0.23.2" | ||
"@platformatic/metaconfig": "0.24.0", | ||
"@platformatic/utils": "0.24.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "scripts": { |
@@ -213,1 +213,27 @@ 'use strict' | ||
}) | ||
test('transformConfig option', async ({ same, plan, pass }) => { | ||
plan(2) | ||
const cm = new ConfigManager({ | ||
source: resolve(__dirname, './fixtures/simple.toml'), | ||
env: { PLT_FOOBAR: 'foobar' }, | ||
transformConfig: function () { | ||
pass('should call transformConfig') | ||
} | ||
}) | ||
await cm.parse() | ||
same(cm.current, { | ||
server: { hostname: '127.0.0.1', port: '3042', logger: { level: 'info' } }, | ||
metrics: { auth: { username: 'plt-db', password: 'plt-db' } }, | ||
plugin: { path: './plugin-sum.js' }, | ||
core: { | ||
connectionString: 'postgres://postgres:postgres@localhost:5432/postgres', | ||
graphiql: true, | ||
ignore: { versions: true } | ||
}, | ||
migrations: { dir: './demo/auth/migrations', validateChecksums: false }, | ||
dashboard: { enabled: true, path: '/' }, | ||
authorization: { adminSecret: 'plt-db' }, | ||
foobar: 'foobar' | ||
}) | ||
}) |
@@ -44,2 +44,3 @@ 'use strict' | ||
} | ||
await Promise.all([ | ||
@@ -46,0 +47,0 @@ once(cm, 'update'), |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55011
1491
288
46
153
+ Added@platformatic/metaconfig@0.24.0(transitive)
+ Added@platformatic/utils@0.24.0(transitive)
- Removed@platformatic/metaconfig@0.23.2(transitive)
- Removed@platformatic/utils@0.23.2(transitive)
Updated@platformatic/utils@0.24.0