@platformatic/foundation 3.35.1 → 3.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -193,6 +193,7 @@ export declare function buildPinoOptions (
193
193
  export declare function loadFormatters (require: NodeRequire, file: string): any
194
194
  export declare function disablePinoDirectWrite (): void
195
195
  export declare function noop (): void
196
+ export declare function createDebugLogger (subject: string): debug.Debugger
196
197
 
197
198
  export declare const abstractLogger: Logger
198
199
  export declare const stdTimeFunctions: {
package/lib/cli.js CHANGED
@@ -45,9 +45,11 @@ export function setExecutableName (name) {
45
45
  executableName = name
46
46
  }
47
47
 
48
- export function logo (color = true) {
48
+ export function logo (color = true, name = undefined) {
49
+ name ??= getExecutableName()
50
+
49
51
  /* c8 ignore next - else */
50
- const executableName = color && isColorSupported ? bold(getExecutableName()) : getExecutableName()
52
+ const executableName = color && isColorSupported ? bold(name) : name
51
53
  const str = `
52
54
 
53
55
  //////
package/lib/logger.js CHANGED
@@ -1,3 +1,4 @@
1
+ import debug from 'debug'
1
2
  import { createRequire } from 'node:module'
2
3
  import { hostname } from 'node:os'
3
4
  import path from 'node:path'
@@ -155,6 +156,11 @@ export function disablePinoDirectWrite () {
155
156
  process.stdout.write = process.stdout.write.bind(process.stdout)
156
157
  }
157
158
 
159
+ /* c8 ignore next 3 - Debug utility */
160
+ export function createDebugLogger (subject) {
161
+ return debug(`plt:${subject}`)
162
+ }
163
+
158
164
  /* c8 ignore start - Nothing to test */
159
165
  export function noop () {}
160
166
 
package/lib/schema.js CHANGED
@@ -1120,6 +1120,10 @@ export const runtimeProperties = {
1120
1120
  }
1121
1121
  },
1122
1122
  additionalProperties: false
1123
+ },
1124
+ socket: {
1125
+ type: 'string',
1126
+ description: 'Custom path for the control socket. If not specified, uses the default platform-specific location.'
1123
1127
  }
1124
1128
  },
1125
1129
  additionalProperties: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/foundation",
3
- "version": "3.35.1",
3
+ "version": "3.36.0",
4
4
  "description": "Platformatic Foundation",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -23,6 +23,7 @@
23
23
  "ajv": "^8.12.0",
24
24
  "boring-name-generator": "^1.0.3",
25
25
  "colorette": "^2.0.19",
26
+ "debug": "^4.4.3",
26
27
  "fast-json-patch": "^3.1.1",
27
28
  "json5": "^2.2.3",
28
29
  "leven": "~3.1.0",