You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@platformatic/foundation

Package Overview
Dependencies
Maintainers
9
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platformatic/foundation - npm Package Compare versions

Comparing version
3.0.0-alpha.5
to
3.0.0-alpha.6
+3
-3
index.d.ts

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

serverConfig: any,
serviceId?: string,
applicationId?: string,
workerId?: string,

@@ -205,3 +205,3 @@ context?: any,

// Node types
export declare function checkNodeVersionForServices (): void
export declare function checkNodeVersionForApplications (): void
export declare const features: {

@@ -239,3 +239,3 @@ node: {

export declare const telemetry: JSONSchemaType<object>
export declare const services: JSONSchemaType<object[]>
export declare const applications: JSONSchemaType<object[]>
export declare const runtimeUnwrappablePropertiesList: string[]

@@ -242,0 +242,0 @@ export declare const runtimeProperties: JSONSchemaType<object>

@@ -155,4 +155,4 @@ import { bgGreen, black, bold, green, isColorSupported } from 'colorette'

export function serviceToEnvVariable (service) {
return `PLT_SERVICE_${service.toUpperCase().replaceAll(/[^A-Z0-9_]/g, '_')}_PATH`
export function applicationToEnvVariable (application) {
return `PLT_APPLICATION_${application.toUpperCase().replaceAll(/[^A-Z0-9_]/g, '_')}_PATH`
}

@@ -170,3 +170,3 @@

// If a runtime was not found, search for service file that we wrap in a runtime
// If a runtime was not found, search for application file that we wrap in a runtime
if (!configFile && !configurationFile) {

@@ -173,0 +173,0 @@ configFile = await findConfigurationFileRecursive(root, configurationFile)

@@ -123,3 +123,4 @@ import toml from '@iarna/toml'

if (typeof suffixes === 'undefined' || suffixes === null) {
suffixes = ['runtime', 'service', 'application', 'db', 'composer']
// composer is retained for backward compatibility with V2
suffixes = ['runtime', 'service', 'application', 'db', 'gateway', 'composer']
} else if (suffixes && !Array.isArray(suffixes)) {

@@ -126,0 +127,0 @@ suffixes = [suffixes]

@@ -57,3 +57,3 @@ import { createRequire } from 'node:module'

export function buildPinoOptions (loggerConfig, serverConfig, serviceId, workerId, context, root) {
export function buildPinoOptions (loggerConfig, serverConfig, applicationId, workerId, context, root) {
const pinoOptions = {

@@ -63,4 +63,4 @@ level: loggerConfig?.level ?? serverConfig?.level ?? 'trace'

if (serviceId) {
pinoOptions.name = serviceId
if (applicationId) {
pinoOptions.name = applicationId
}

@@ -67,0 +67,0 @@

@@ -6,3 +6,3 @@ import { platform } from 'node:os'

export function checkNodeVersionForServices () {
export function checkNodeVersionForApplications () {
const currentVersion = process.version

@@ -9,0 +9,0 @@ const minimumVersion = '22.18.0'

@@ -621,9 +621,9 @@ export function overridableValue (spec, defaultValue) {

},
serviceName: {
applicationName: {
type: 'string',
description: 'The name of the service. Defaults to the folder name if not specified.'
description: 'The name of the application. Defaults to the folder name if not specified.'
},
version: {
type: 'string',
description: 'The version of the service (optional)'
description: 'The version of the application (optional)'
},

@@ -659,7 +659,7 @@ skip: {

},
required: ['serviceName'],
required: ['applicationName'],
additionalProperties: false
}
export const services = {
export const applications = {
type: 'array',

@@ -755,6 +755,7 @@ items: {

'entrypoint',
'applications',
'autoload',
'services',
'applications',
'web',
'resolvedServicesBasePath'
'resolvedApplicationsBasePath'
]

@@ -822,5 +823,6 @@

},
services,
applications,
services: applications,
web: applications,
workers: { ...workers, default: 1 },
web: services,
logger,

@@ -856,3 +858,3 @@ server,

},
service: {
application: {
anyOf: [

@@ -869,3 +871,3 @@ {

default: {},
required: ['runtime', 'service'],
required: ['runtime', 'application'],
additionalProperties: false

@@ -1090,3 +1092,3 @@ },

},
serviceTimeout: {
applicationTimeout: {
anyOf: [

@@ -1111,3 +1113,3 @@ {

},
resolvedServicesBasePath: {
resolvedApplicationsBasePath: {
type: 'string',

@@ -1193,3 +1195,3 @@ default: 'external'

telemetry,
services,
applications,
runtimeProperties,

@@ -1196,0 +1198,0 @@ wrappedRuntimeProperties,

@@ -139,3 +139,3 @@ Apache License

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
names, trademarks, application marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the

@@ -142,0 +142,0 @@ origin of the Work and reproducing the content of the NOTICE file.

{
"name": "@platformatic/foundation",
"version": "3.0.0-alpha.5",
"version": "3.0.0-alpha.6",
"description": "Platformatic Foundation",

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

"devDependencies": {
"borp": "^0.20.0",
"c8": "^10.0.0",
"cleaner-spec-reporter": "^0.5.0",
"eslint": "9",

@@ -50,6 +50,5 @@ "fastify": "^5.0.0",

"scripts": {
"test": "npm run lint && node --test --test-concurrency=1 --test-timeout=1200000 test/*.test.js",
"coverage": "c8 -r html -r text node --test --test-concurrency=1 --test-timeout=1200000 test/*.test.js",
"test": "node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js test/**/*.test.js",
"lint": "eslint"
}
}