@platformatic/watt-admin 1.0.0 → 1.1.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.
Files changed (2) hide show
  1. package/lib/start.js +7 -4
  2. package/package.json +3 -3
package/lib/start.js CHANGED
@@ -6,8 +6,6 @@ import { parseArgs, promisify } from 'util'
6
6
  import { request } from 'undici'
7
7
  import { exec } from 'child_process'
8
8
 
9
- const __dirname = import.meta.dirname
10
-
11
9
  const execAsync = promisify(exec)
12
10
 
13
11
  const msOneMinute = 1000 * 60
@@ -50,12 +48,17 @@ export async function start (client, selectedRuntime) {
50
48
  }
51
49
  }
52
50
 
53
- const configFile = join(__dirname, '..', 'watt.json')
54
- const server = await create(configFile, undefined, {
51
+ // We move to the project root to start the server
52
+ // so amaro will load correctly
53
+ const cwd = process.cwd()
54
+ const root = join(import.meta.dirname, '..')
55
+ process.chdir(root)
56
+ const server = await create('watt.json', undefined, {
55
57
  setupSignals: false,
56
58
  isProduction: true
57
59
  })
58
60
  entrypointUrl = await server.start()
61
+ process.chdir(cwd)
59
62
 
60
63
  if (record) {
61
64
  async function shutdown () {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@platformatic/watt-admin",
4
- "version": "1.0.0",
4
+ "version": "1.1.0",
5
5
  "scripts": {
6
6
  "prepublishOnly": "npm run clean && npm run build",
7
7
  "dev": "wattpm dev",
@@ -59,7 +59,7 @@
59
59
  "devDependencies": {
60
60
  "@playwright/test": "^1.56.0",
61
61
  "@types/d3": "^7.4.3",
62
- "@types/node": "^22",
62
+ "@types/node": "^24.0.0",
63
63
  "@types/react-dom": "^19.2.1",
64
64
  "@types/split2": "^4.2.3",
65
65
  "@types/ws": "^8.18.1",
@@ -69,7 +69,7 @@
69
69
  "neostandard": "^0.12.2",
70
70
  "playwright": "^1.56.0",
71
71
  "typescript": "^5.9.3",
72
- "vitest": "^3.2.4"
72
+ "vitest": "^4.0.0"
73
73
  },
74
74
  "bin": {
75
75
  "watt-admin": "cli.js"