Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/rstack-business.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

import { createRequire } from 'node:module';
import { fileURLToPath } from 'node:url';
import { fileURLToPath, pathToFileURL } from 'node:url';
import path from 'node:path';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
Expand Down Expand Up @@ -64,7 +64,7 @@ if (args.includes('--version') || args.includes('-v')) {
}

const serverPath = path.resolve(__dirname, '../src/observability/dashboard/server.js');
import(serverPath).catch((err) => {
import(pathToFileURL(serverPath).href).catch((err) => {
console.error(`[rstack-business] Failed to start: ${err.message}`);
console.error(err);
process.exit(1);
Expand Down
4 changes: 2 additions & 2 deletions bin/rstack-observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* scripts, and muscle memory land on the single supported dashboard.
*/

import { fileURLToPath } from 'node:url';
import { fileURLToPath, pathToFileURL } from 'node:url';
import path from 'node:path';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
Expand All @@ -23,7 +23,7 @@ for (let i = 0; i < process.argv.length; i++) {

process.stderr.write('[rstack] rstack-observer now opens the unified Business Hub. Use rstack-business for new scripts.\n');

import(serverPath).catch((err) => {
import(pathToFileURL(serverPath).href).catch((err) => {
console.error(`[rstack-observer] Failed to start unified dashboard: ${err.message}`);
console.error(err);
process.exit(1);
Expand Down
Loading