@platformatic/basic 2.70.0 → 2.71.0-alpha.1

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/config.d.ts CHANGED
@@ -297,6 +297,7 @@ export interface PlatformaticStackable {
297
297
  [k: string]: unknown;
298
298
  };
299
299
  serviceTimeout?: number | string;
300
+ messagingTimeout?: number | string;
300
301
  env?: {
301
302
  [k: string]: string;
302
303
  };
package/lib/base.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { client, collectMetrics } from '@platformatic/metrics'
2
- import { buildPinoOptions, deepmerge, executeWithTimeout } from '@platformatic/utils'
2
+ import { buildPinoOptions, deepmerge, executeWithTimeout, kTimeout } from '@platformatic/utils'
3
3
  import { parseCommandString } from 'execa'
4
4
  import { spawn } from 'node:child_process'
5
5
  import EventEmitter, { once } from 'node:events'
@@ -317,12 +317,12 @@ export class BaseStackable extends EventEmitter {
317
317
  /* c8 ignore next 10 */
318
318
  const res = await executeWithTimeout(exitPromise, exitTimeout)
319
319
 
320
- if (res === 'timeout') {
320
+ if (res === kTimeout) {
321
321
  this.subprocess.kill(this.subprocessTerminationSignal)
322
322
 
323
323
  // If the process hasn't exited in X seconds, kill it the hard way
324
324
  const res = await executeWithTimeout(exitPromise, exitTimeout)
325
- if (res === 'timeout') {
325
+ if (res === kTimeout) {
326
326
  this.subprocess.kill('SIGKILL')
327
327
  }
328
328
  }
@@ -1,4 +1,4 @@
1
- import { generateRequest } from '@platformatic/itc'
1
+ import { generateRequest, sanitize } from '@platformatic/itc'
2
2
  import { ensureLoggableError } from '@platformatic/utils'
3
3
  import { once } from 'node:events'
4
4
  import { platform } from 'node:os'
@@ -42,7 +42,7 @@ export default async function () {
42
42
  return build(
43
43
  async function (source) {
44
44
  for await (const obj of source) {
45
- socket.send(JSON.stringify(generateRequest('log', { logs: [obj] })))
45
+ socket.send(JSON.stringify(sanitize(generateRequest('log', { logs: [obj] }))))
46
46
  }
47
47
  },
48
48
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/basic",
3
- "version": "2.70.0",
3
+ "version": "2.71.0-alpha.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -24,11 +24,11 @@
24
24
  "split2": "^4.2.0",
25
25
  "undici": "^7.0.0",
26
26
  "ws": "^8.18.0",
27
- "@platformatic/config": "2.70.0",
28
- "@platformatic/metrics": "2.70.0",
29
- "@platformatic/itc": "2.70.0",
30
- "@platformatic/telemetry": "2.70.0",
31
- "@platformatic/utils": "2.70.0"
27
+ "@platformatic/itc": "2.71.0-alpha.1",
28
+ "@platformatic/metrics": "2.71.0-alpha.1",
29
+ "@platformatic/telemetry": "2.71.0-alpha.1",
30
+ "@platformatic/utils": "2.71.0-alpha.1",
31
+ "@platformatic/config": "2.71.0-alpha.1"
32
32
  },
33
33
  "devDependencies": {
34
34
  "borp": "^0.20.0",
@@ -39,11 +39,7 @@
39
39
  "json-schema-to-typescript": "^15.0.0",
40
40
  "minimatch": "^10.0.1",
41
41
  "neostandard": "^0.12.0",
42
- "next": "^15.0.0",
43
- "react": "^18.3.1",
44
- "react-dom": "^18.3.1",
45
- "typescript": "^5.5.4",
46
- "vite": "^5.4.0"
42
+ "typescript": "^5.5.4"
47
43
  },
48
44
  "scripts": {
49
45
  "test": "npm run lint && borp --concurrency=1 --no-timeout",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/basic/2.70.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/basic/2.71.0-alpha.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Stackable",
5
5
  "type": "object",
@@ -935,6 +935,18 @@
935
935
  ],
936
936
  "default": 300000
937
937
  },
938
+ "messagingTimeout": {
939
+ "anyOf": [
940
+ {
941
+ "type": "number",
942
+ "minimum": 1
943
+ },
944
+ {
945
+ "type": "string"
946
+ }
947
+ ],
948
+ "default": 30000
949
+ },
938
950
  "env": {
939
951
  "type": "object",
940
952
  "additionalProperties": {