@rayburst/cli 0.1.12 → 0.1.13

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/bin/rayburst.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { Command } from 'commander';
4
4
  import chalk from 'chalk';
5
- import { spawn } from 'child_process';
5
+ import { spawn, exec } from 'child_process';
6
6
  import { fileURLToPath } from 'url';
7
7
  import { dirname, join, resolve } from 'path';
8
8
  import {
@@ -48,6 +48,22 @@ program
48
48
  stdio: 'inherit',
49
49
  });
50
50
 
51
+ // Open browser after server starts
52
+ let browserOpened = false;
53
+ setTimeout(() => {
54
+ if (!browserOpened) {
55
+ browserOpened = true;
56
+ const url = `http://localhost:${options.port}`;
57
+ const openCommand = process.platform === 'darwin' ? 'open' :
58
+ process.platform === 'win32' ? 'start' : 'xdg-open';
59
+ exec(`${openCommand} ${url}`, (err) => {
60
+ if (err) {
61
+ console.log(chalk.dim(`\n💡 Open your browser to: ${url}`));
62
+ }
63
+ });
64
+ }
65
+ }, 2000);
66
+
51
67
  server.on('error', (err) => {
52
68
  console.error(chalk.red('Failed to start server:'), err);
53
69
  process.exit(1);
@@ -1,6 +1,6 @@
1
1
  import { _ as __vitePreload } from './preload-helper-Dea3Szod.js';
2
2
 
3
- const remoteEntryPromise = __vitePreload(() => import('./remoteEntry-2xB1wVPo.js'),true ?[]:void 0);
3
+ const remoteEntryPromise = __vitePreload(() => import('./remoteEntry-DDCdV_Gw.js'),true ?[]:void 0);
4
4
  // __tla only serves as a hack for vite-plugin-top-level-await.
5
5
  Promise.resolve(remoteEntryPromise)
6
6
  .then(remoteEntry => {
@@ -77,7 +77,7 @@ const importMap = {
77
77
  entryGlobalName: "rayburstApp",
78
78
  name: "rayburstApp",
79
79
  type: "module",
80
- entry: "https://www.rayburst.app/remoteEntry.js?t=1763425729584",
80
+ entry: "https://www.rayburst.app/remoteEntry.js?t=1763425786757",
81
81
  shareScope: "default",
82
82
  }
83
83
 
package/dist/index.html CHANGED
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
- <script type="module" src="/assets/hostInit-BeN71ro9.js"></script>
4
+ <script type="module" src="/assets/hostInit-DLpBV2rD.js"></script>
5
5
 
6
6
  <meta charset="UTF-8" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rayburst/cli",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Rayburst CLI - A module federation host for Rayburst app",
5
5
  "type": "module",
6
6
  "bin": {