@platformatic/config
Advanced tools
Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6
@@ -15,8 +15,13 @@ 'use strict' | ||
const defaultTypes = ['service', 'db', 'composer', 'basic', 'node', 'vite', 'next'] | ||
const defaultTypesConfigurationAliases = { | ||
// Keys are default types, values are the suffix for the default configuration file | ||
const defaultTypesWithAliases = { | ||
service: 'service', | ||
db: 'db', | ||
composer: 'composer', | ||
basic: 'application', | ||
node: 'application', | ||
vite: 'application', | ||
next: 'application' | ||
next: 'application', | ||
astro: 'application', | ||
remix: 'application' | ||
} | ||
@@ -94,3 +99,3 @@ | ||
if (!app && defaultTypes.includes(type)) { | ||
if (!app && defaultTypesWithAliases[type]) { | ||
app = await loadModule(require, `@platformatic/${type}`) | ||
@@ -161,3 +166,3 @@ this.add(app) | ||
for (let type of defaultTypes) { | ||
for (const [type, alias] of Object.entries(defaultTypesWithAliases)) { | ||
if (typeSet.has(type)) { | ||
@@ -167,12 +172,11 @@ continue | ||
type = defaultTypesConfigurationAliases[type] ?? type | ||
const _ = { | ||
configType: type, | ||
filenames: [ | ||
`platformatic.${type}.json`, | ||
`platformatic.${type}.json5`, | ||
`platformatic.${type}.yaml`, | ||
`platformatic.${type}.yml`, | ||
`platformatic.${type}.toml`, | ||
`platformatic.${type}.tml` | ||
`platformatic.${alias}.json`, | ||
`platformatic.${alias}.json5`, | ||
`platformatic.${alias}.yaml`, | ||
`platformatic.${alias}.yml`, | ||
`platformatic.${alias}.toml`, | ||
`platformatic.${alias}.tml` | ||
] | ||
@@ -179,0 +183,0 @@ } |
{ | ||
"name": "@platformatic/config", | ||
"version": "2.0.0-alpha.5", | ||
"version": "2.0.0-alpha.6", | ||
"description": "Platformatic DB Config Manager", | ||
@@ -41,3 +41,3 @@ "main": "index.js", | ||
"undici": "^6.9.0", | ||
"@platformatic/utils": "2.0.0-alpha.5" | ||
"@platformatic/utils": "2.0.0-alpha.6" | ||
}, | ||
@@ -44,0 +44,0 @@ "scripts": { |
47159
1001
+ Added@platformatic/utils@2.0.0-alpha.6(transitive)
- Removed@platformatic/utils@2.0.0-alpha.5(transitive)