@platformatic/foundation
Advanced tools
+29
-4
@@ -16,2 +16,3 @@ import { bgGreen, black, bold, green, isColorSupported } from 'colorette' | ||
| // TODO: Deprecated and currently unused. Remove in v4. | ||
| export function isVerbose () { | ||
@@ -21,2 +22,3 @@ return verbose | ||
| // TODO: Deprecated and currently unused. Remove in v4. | ||
| export function usePrettyPrint () { | ||
@@ -26,2 +28,3 @@ return prettyPrint | ||
| // TODO: Deprecated and currently unused. Remove in v4. | ||
| export function getExecutableId () { | ||
@@ -31,2 +34,3 @@ return executableId | ||
| // TODO: Deprecated and currently unused. Remove in v4. | ||
| export function getExecutableName () { | ||
@@ -36,2 +40,3 @@ return executableName | ||
| // TODO: Deprecated and currently unused. Remove in v4. | ||
| export function setVerbose (value) { | ||
@@ -41,2 +46,3 @@ verbose = value | ||
| // TODO: Deprecated and currently unused. Remove in v4. | ||
| export function setPrettyPrint (value) { | ||
@@ -46,2 +52,3 @@ prettyPrint = value | ||
| // TODO: Deprecated and currently unused. Remove in v4. | ||
| export function setExecutableId (id) { | ||
@@ -51,2 +58,3 @@ executableId = id | ||
| // TODO: Deprecated and currently unused. Remove in v4. | ||
| export function setExecutableName (name) { | ||
@@ -56,4 +64,20 @@ executableName = name | ||
| export function createCLIContext ( | ||
| executableId = '', | ||
| executableName = '', | ||
| verbose = false, | ||
| prettyPrint = true, | ||
| options = {} | ||
| ) { | ||
| return { | ||
| executableId, | ||
| executableName, | ||
| verbose, | ||
| prettyPrint, | ||
| ...options | ||
| } | ||
| } | ||
| export function logo (color = true, name = undefined) { | ||
| name ??= getExecutableName() | ||
| name ??= this ? this.executableName : 'Watt' | ||
@@ -104,3 +128,3 @@ /* c8 ignore next - else */ | ||
| if (noPretty) { | ||
| setPrettyPrint(false) | ||
| process.env.PLT_PRETTY_PRINT = 'false' | ||
| } else { | ||
@@ -195,3 +219,4 @@ pretty = pinoPretty({ | ||
| throwOnError = true, | ||
| verifyPackages = true | ||
| verifyPackages = true, | ||
| executableName = '' | ||
| ) { | ||
@@ -219,3 +244,3 @@ let configFile = await findConfigurationFileRecursive(root, configurationFile, '@platformatic/runtime') | ||
| logger, | ||
| `Cannot find a supported ${getExecutableName()} configuration file (like ${bold('watt.json')}, a ${bold('wattpm.json')} or a ${bold( | ||
| `Cannot find a supported ${executableName} configuration file (like ${bold('watt.json')}, a ${bold('wattpm.json')} or a ${bold( | ||
| 'platformatic.json' | ||
@@ -222,0 +247,0 @@ )}) in ${bold(resolve(root))}.` |
+35
-2
@@ -903,3 +903,19 @@ export function overridableValue (spec, defaultValue) { | ||
| }, | ||
| compileCache | ||
| compileCache, | ||
| management: { | ||
| anyOf: [ | ||
| { type: 'boolean' }, | ||
| { | ||
| type: 'object', | ||
| properties: { | ||
| enabled: { type: 'boolean', default: true }, | ||
| operations: { | ||
| type: 'array', | ||
| items: { type: 'string' } | ||
| } | ||
| }, | ||
| additionalProperties: false | ||
| } | ||
| ] | ||
| } | ||
| } | ||
@@ -1150,2 +1166,18 @@ } | ||
| }, | ||
| management: { | ||
| anyOf: [ | ||
| { type: 'boolean' }, | ||
| { | ||
| type: 'object', | ||
| properties: { | ||
| enabled: { type: 'boolean', default: true }, | ||
| operations: { | ||
| type: 'array', | ||
| items: { type: 'string' } | ||
| } | ||
| }, | ||
| additionalProperties: false | ||
| } | ||
| ] | ||
| }, | ||
| metrics: { | ||
@@ -1461,3 +1493,4 @@ anyOf: [ | ||
| 'dependencies', | ||
| 'useHttp' | ||
| 'useHttp', | ||
| 'management' | ||
| ] | ||
@@ -1464,0 +1497,0 @@ |
+1
-1
| { | ||
| "name": "@platformatic/foundation", | ||
| "version": "3.39.0", | ||
| "version": "3.40.0", | ||
| "description": "Platformatic Foundation", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
111219
1.32%3319
1.75%11
10%