@platformatic/basic
Advanced tools
Comparing version 2.0.0-alpha.6 to 2.0.0-alpha.7
21
index.js
@@ -76,4 +76,4 @@ import { existsSync } from 'node:fs' | ||
if (!hadConfig) { | ||
const serviceRoot = relative(process.cwd(), opts.context.directory) | ||
const serviceRoot = relative(process.cwd(), opts.context.directory) | ||
if (!hadConfig && !existsSync(resolve(serviceRoot, 'platformatic.application.json'))) { | ||
const logger = pino({ | ||
@@ -96,5 +96,20 @@ level: opts.context.serverConfig?.logger?.level ?? 'warn', | ||
/* c8 ignore next 3 */ | ||
export function transformConfig () { | ||
// This is currently empty but it left as a placeholder for the future | ||
} | ||
export const schemaOptions = { | ||
useDefaults: true, | ||
coerceTypes: true, | ||
allErrors: true, | ||
strict: false | ||
} | ||
export default { | ||
configType: 'nodejs', | ||
configManagerConfig: {}, | ||
configManagerConfig: { | ||
schemaOptions, | ||
transformConfig | ||
}, | ||
buildStackable, | ||
@@ -101,0 +116,0 @@ schema, |
@@ -60,4 +60,7 @@ import pino from 'pino' | ||
async getMetrics ({ format }) { | ||
return null | ||
async collectMetrics () { | ||
return { | ||
defaultMetrics: true, | ||
httpMetrics: false | ||
} | ||
} | ||
@@ -64,0 +67,0 @@ |
@@ -10,6 +10,6 @@ import { schemas } from '@platformatic/utils' | ||
basePath: { | ||
type: 'string', | ||
}, | ||
type: 'string' | ||
} | ||
}, | ||
additionalProperties: false, | ||
additionalProperties: false | ||
} | ||
@@ -21,11 +21,37 @@ | ||
{ | ||
type: 'boolean', | ||
type: 'boolean' | ||
}, | ||
{ | ||
type: 'string' | ||
} | ||
] | ||
} | ||
const deploy = { | ||
type: 'object', | ||
properties: { | ||
include: { | ||
type: 'array', | ||
items: { | ||
type: 'string' | ||
}, | ||
default: ['dist'] | ||
}, | ||
buildCommand: { | ||
type: 'string', | ||
default: 'npm run build' | ||
}, | ||
], | ||
installCommand: { | ||
type: 'string', | ||
default: 'npm ci --omit-dev' | ||
}, | ||
startCommand: { | ||
type: 'string', | ||
default: 'npm run start' | ||
} | ||
}, | ||
default: {} | ||
} | ||
export const schemaComponents = { application, watch } | ||
export const schemaComponents = { application, deploy, watch } | ||
@@ -39,6 +65,6 @@ export const schema = { | ||
$schema: { | ||
type: 'string', | ||
}, | ||
type: 'string' | ||
} | ||
}, | ||
additionalProperties: true, | ||
additionalProperties: true | ||
} | ||
@@ -45,0 +71,0 @@ |
{ | ||
"name": "@platformatic/basic", | ||
"version": "2.0.0-alpha.6", | ||
"version": "2.0.0-alpha.7", | ||
"description": "", | ||
@@ -22,5 +22,5 @@ "main": "index.js", | ||
"undici": "^6.19.5", | ||
"@platformatic/config": "2.0.0-alpha.6", | ||
"@platformatic/itc": "2.0.0-alpha.6", | ||
"@platformatic/utils": "2.0.0-alpha.6" | ||
"@platformatic/config": "2.0.0-alpha.7", | ||
"@platformatic/itc": "2.0.0-alpha.7", | ||
"@platformatic/utils": "2.0.0-alpha.7" | ||
}, | ||
@@ -40,4 +40,4 @@ "devDependencies": { | ||
"ws": "^8.18.0", | ||
"@platformatic/composer": "2.0.0-alpha.6", | ||
"@platformatic/service": "2.0.0-alpha.6" | ||
"@platformatic/composer": "2.0.0-alpha.7", | ||
"@platformatic/service": "2.0.0-alpha.7" | ||
}, | ||
@@ -44,0 +44,0 @@ "scripts": { |
{ | ||
"$id": "https://schemas.platformatic.dev/@platformatic/basic/2.0.0-alpha.6.json", | ||
"$id": "https://schemas.platformatic.dev/@platformatic/basic/2.0.0-alpha.7.json", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
@@ -4,0 +4,0 @@ "title": "Platformatic Stackable", |
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
34586
660
+ Added@platformatic/config@2.0.0-alpha.7(transitive)
+ Added@platformatic/itc@2.0.0-alpha.7(transitive)
+ Added@platformatic/utils@2.0.0-alpha.7(transitive)
- Removed@platformatic/config@2.0.0-alpha.6(transitive)
- Removed@platformatic/itc@2.0.0-alpha.6(transitive)
- Removed@platformatic/utils@2.0.0-alpha.6(transitive)