revine 1.5.1 → 1.5.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/dist/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revine",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "A react framework, but better.",
5
5
  "license": "MIT",
6
6
  "author": "Rachit Bharadwaj",
@@ -1,3 +0,0 @@
1
- import type { Plugin } from "vite";
2
- export declare function revineLoggerPlugin(): Plugin;
3
- //# sourceMappingURL=viteLoggerPlugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"viteLoggerPlugin.d.ts","sourceRoot":"","sources":["../../../src/runtime/bundler/viteLoggerPlugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAwBlD,wBAAgB,kBAAkB,IAAI,MAAM,CAoC3C"}
@@ -1,53 +0,0 @@
1
- import chalk from "chalk";
2
- import os from "os";
3
- /**
4
- * Reads all non-internal IPv4 addresses from the host machine's
5
- * network interfaces so we can display them regardless of Vite's
6
- * resolvedUrls behaviour (which can be empty when logLevel is silent).
7
- */
8
- function getNetworkAddresses() {
9
- const interfaces = os.networkInterfaces();
10
- const addresses = [];
11
- for (const nets of Object.values(interfaces)) {
12
- if (!nets)
13
- continue;
14
- for (const net of nets) {
15
- // Only include external IPv4 addresses
16
- if (net.family === "IPv4" && !net.internal) {
17
- addresses.push(net.address);
18
- }
19
- }
20
- }
21
- return addresses;
22
- }
23
- export function revineLoggerPlugin() {
24
- const indigo = chalk.hex("#6d28d9");
25
- return {
26
- name: "revine-logger",
27
- configureServer(server) {
28
- server.httpServer?.once("listening", () => {
29
- const protocol = server.config.server.https ? "https" : "http";
30
- const port = server.config.server.port ?? 3000;
31
- const localUrl = server.resolvedUrls?.local[0] ?? `${protocol}://localhost:${port}/`;
32
- // Always derive network URLs from OS interfaces — reliable even with logLevel: silent
33
- const networkUrls = server.resolvedUrls?.network?.length
34
- ? server.resolvedUrls.network
35
- : getNetworkAddresses().map((addr) => `${protocol}://${addr}:${port}/`);
36
- console.log(indigo("─────────────────────────────────────────────"));
37
- console.log(indigo.bold("🚀 Revine Dev Server is now running!"));
38
- console.log(indigo("─────────────────────────────────────────────"));
39
- console.log(indigo(`Local: ${chalk.green(localUrl)}`));
40
- if (networkUrls.length) {
41
- networkUrls.forEach((url) => {
42
- console.log(indigo(`Network: ${chalk.green(url)}`));
43
- });
44
- }
45
- else {
46
- console.log(indigo(`Network: ${chalk.dim("not available")}`));
47
- }
48
- console.log(indigo("─────────────────────────────────────────────"));
49
- console.log("");
50
- });
51
- },
52
- };
53
- }
File without changes