@platformatic/runtime 2.2.0 → 2.2.2-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
@@ -5,7 +5,7 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
- export type HttpsSchemasPlatformaticDevPlatformaticRuntime220Json = {
8
+ export type HttpsSchemasPlatformaticDevPlatformaticRuntime222Alpha1Json = {
9
9
  [k: string]: unknown;
10
10
  } & {
11
11
  $schema?: string;
package/lib/runtime.js CHANGED
@@ -813,7 +813,8 @@ class Runtime extends EventEmitter {
813
813
  name: id + '-runtime',
814
814
  port: service,
815
815
  handlers: {
816
- getServiceMeta: this.getServiceMeta.bind(this)
816
+ getServiceMeta: this.getServiceMeta.bind(this),
817
+ getServices: this.getServices.bind(this)
817
818
  }
818
819
  })
819
820
  service[kITC].listen()
package/lib/worker/app.js CHANGED
@@ -1,6 +1,9 @@
1
1
  'use strict'
2
2
 
3
+ const { existsSync } = require('node:fs')
3
4
  const { EventEmitter } = require('node:events')
5
+ const { resolve } = require('node:path')
6
+ const { ConfigManager } = require('@platformatic/config')
4
7
  const { FileWatcher } = require('@platformatic/utils')
5
8
  const { getGlobalDispatcher, setGlobalDispatcher } = require('undici')
6
9
  const debounce = require('debounce')
@@ -67,6 +70,16 @@ class PlatformaticApp extends EventEmitter {
67
70
  const appConfig = this.appConfig
68
71
  let loadedConfig
69
72
 
73
+ // Before returning the base application, check if there is any file we recognize
74
+ // and the user just forgot to specify in the configuration.
75
+ if (!appConfig.config) {
76
+ const candidate = ConfigManager.listConfigFiles().find(f => existsSync(resolve(appConfig.path, f)))
77
+
78
+ if (candidate) {
79
+ appConfig.config = resolve(appConfig.path, candidate)
80
+ }
81
+ }
82
+
70
83
  if (!appConfig.config) {
71
84
  loadedConfig = await loadEmptyConfig(
72
85
  appConfig.path,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "2.2.0",
3
+ "version": "2.2.2-alpha.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -34,11 +34,11 @@
34
34
  "typescript": "^5.5.4",
35
35
  "undici-oidc-interceptor": "^0.5.0",
36
36
  "why-is-node-running": "^2.2.2",
37
- "@platformatic/composer": "2.2.0",
38
- "@platformatic/db": "2.2.0",
39
- "@platformatic/sql-graphql": "2.2.0",
40
- "@platformatic/service": "2.2.0",
41
- "@platformatic/sql-mapper": "2.2.0"
37
+ "@platformatic/composer": "2.2.2-alpha.1",
38
+ "@platformatic/service": "2.2.2-alpha.1",
39
+ "@platformatic/db": "2.2.2-alpha.1",
40
+ "@platformatic/sql-graphql": "2.2.2-alpha.1",
41
+ "@platformatic/sql-mapper": "2.2.2-alpha.1"
42
42
  },
43
43
  "dependencies": {
44
44
  "@fastify/error": "^4.0.0",
@@ -68,13 +68,13 @@
68
68
  "undici": "^6.9.0",
69
69
  "undici-thread-interceptor": "^0.6.1",
70
70
  "ws": "^8.16.0",
71
- "@platformatic/basic": "2.2.0",
72
- "@platformatic/generators": "2.2.0",
73
- "@platformatic/config": "2.2.0",
74
- "@platformatic/itc": "2.2.0",
75
- "@platformatic/telemetry": "2.2.0",
76
- "@platformatic/ts-compiler": "2.2.0",
77
- "@platformatic/utils": "2.2.0"
71
+ "@platformatic/basic": "2.2.2-alpha.1",
72
+ "@platformatic/config": "2.2.2-alpha.1",
73
+ "@platformatic/telemetry": "2.2.2-alpha.1",
74
+ "@platformatic/ts-compiler": "2.2.2-alpha.1",
75
+ "@platformatic/generators": "2.2.2-alpha.1",
76
+ "@platformatic/itc": "2.2.2-alpha.1",
77
+ "@platformatic/utils": "2.2.2-alpha.1"
78
78
  },
79
79
  "scripts": {
80
80
  "test": "npm run lint && borp --concurrency=1 --timeout=180000 && tsd",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.2.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.2.2-alpha.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "type": "object",
5
5
  "properties": {