wattpm 2.44.0 → 2.44.2

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/lib/utils.js CHANGED
@@ -2,6 +2,7 @@ import {
2
2
  ConfigManager,
3
3
  getParser,
4
4
  getStringifier,
5
+ matchKnownSchema,
5
6
  loadConfig as pltConfigLoadConfig,
6
7
  Store
7
8
  } from '@platformatic/config'
@@ -163,9 +164,20 @@ export function serviceToEnvVariable (service) {
163
164
  export async function findConfigurationFile (logger, root) {
164
165
  let current = root
165
166
  let configurationFile
166
- while (configurationFile === undefined) {
167
+
168
+ while (!configurationFile) {
167
169
  // Find a wattpm.json or watt.json file
168
170
  configurationFile = await ConfigManager.findConfigFile(current, true)
171
+
172
+ // If a file is found, verify it actually represents a watt or runtime configuration
173
+ if (configurationFile) {
174
+ const configuration = await loadRawConfigurationFile(logger, resolve(current, configurationFile))
175
+
176
+ if (matchKnownSchema(configuration.$schema) !== 'runtime') {
177
+ configurationFile = null
178
+ }
179
+ }
180
+
169
181
  if (!configurationFile) {
170
182
  const newCurrent = dirname(current)
171
183
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wattpm",
3
- "version": "2.44.0",
3
+ "version": "2.44.2",
4
4
  "description": "The Node.js Application Server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -36,11 +36,11 @@
36
36
  "semver": "^7.7.0",
37
37
  "split2": "^4.2.0",
38
38
  "table": "^6.8.2",
39
- "@platformatic/basic": "2.44.0",
40
- "@platformatic/config": "2.44.0",
41
- "@platformatic/control": "2.44.0",
42
- "@platformatic/runtime": "2.44.0",
43
- "@platformatic/utils": "2.44.0"
39
+ "@platformatic/basic": "2.44.2",
40
+ "@platformatic/config": "2.44.2",
41
+ "@platformatic/utils": "2.44.2",
42
+ "@platformatic/runtime": "2.44.2",
43
+ "@platformatic/control": "2.44.2"
44
44
  },
45
45
  "devDependencies": {
46
46
  "borp": "^0.19.0",
@@ -50,7 +50,7 @@
50
50
  "neostandard": "^0.12.0",
51
51
  "typescript": "^5.5.4",
52
52
  "undici": "^7.0.0",
53
- "@platformatic/node": "2.44.0"
53
+ "@platformatic/node": "2.44.2"
54
54
  },
55
55
  "scripts": {
56
56
  "test": "npm run lint && borp --concurrency=1 --timeout=300000",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/wattpm/2.44.0.json",
2
+ "$id": "https://schemas.platformatic.dev/wattpm/2.44.2.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "type": "object",
5
5
  "properties": {