@hamedb89/localghost 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/README.md +13 -11
- package/dist/cli.js +6 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/docs/flows.md +26 -23
- package/docs/github.md +4 -4
- package/docs/localghost.1.md +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -472,7 +472,7 @@ declare function removeManagedBlock(existing: string, projectName: string): stri
|
|
|
472
472
|
declare function updateSystemHosts(projectName: string, entries: DevHostEntry[]): Promise<UpdateSystemHostsResult>;
|
|
473
473
|
declare function removeSystemHosts(projectName: string): Promise<RemoveSystemHostsResult>;
|
|
474
474
|
|
|
475
|
-
type PackageManager = "npm" | "yarn" | "pnpm";
|
|
475
|
+
type PackageManager = "npm" | "yarn" | "pnpm" | "bun";
|
|
476
476
|
type InitOptions = {
|
|
477
477
|
cwd?: string;
|
|
478
478
|
host?: string;
|
|
@@ -571,7 +571,7 @@ type CreateVercelGhostTunnelHandlerOptions = {
|
|
|
571
571
|
declare function createVercelGhostTunnelHandler(options: CreateVercelGhostTunnelHandlerOptions): (request: VercelGhostTunnelRequestLike, response: VercelGhostTunnelResponseLike) => Promise<void>;
|
|
572
572
|
|
|
573
573
|
declare const LOCALGHOST_PACKAGE_NAME = "@hamedb89/localghost";
|
|
574
|
-
declare const LOCALGHOST_VERSION = "0.1.
|
|
574
|
+
declare const LOCALGHOST_VERSION = "0.1.13";
|
|
575
575
|
declare const UPDATE_CHECK_CACHE_TTL_MS: number;
|
|
576
576
|
declare const UPDATE_CHECK_NOTIFY_TTL_MS: number;
|
|
577
577
|
declare const UPDATE_CHECK_TIMEOUT_MS = 900;
|
package/dist/index.js
CHANGED
|
@@ -2083,16 +2083,19 @@ import { join as join7 } from "path";
|
|
|
2083
2083
|
function detectPackageManager(cwd = process.cwd()) {
|
|
2084
2084
|
if (existsSync5(join7(cwd, "pnpm-lock.yaml"))) return "pnpm";
|
|
2085
2085
|
if (existsSync5(join7(cwd, "yarn.lock"))) return "yarn";
|
|
2086
|
+
if (existsSync5(join7(cwd, "bun.lock")) || existsSync5(join7(cwd, "bun.lockb"))) return "bun";
|
|
2086
2087
|
return "npm";
|
|
2087
2088
|
}
|
|
2088
2089
|
function packageRunCommand(packageManager, script) {
|
|
2089
2090
|
if (packageManager === "yarn") return `yarn ${script}`;
|
|
2090
2091
|
if (packageManager === "pnpm") return `pnpm ${script}`;
|
|
2092
|
+
if (packageManager === "bun") return `bun run ${script}`;
|
|
2091
2093
|
return `npm run ${script}`;
|
|
2092
2094
|
}
|
|
2093
2095
|
function packageAddCommand(packageManager, packageName = "@hamedb89/localghost") {
|
|
2094
2096
|
if (packageManager === "yarn") return `yarn add -D ${packageName}`;
|
|
2095
2097
|
if (packageManager === "pnpm") return `pnpm add -D ${packageName}`;
|
|
2098
|
+
if (packageManager === "bun") return `bun add -d ${packageName}`;
|
|
2096
2099
|
return `npm install -D ${packageName}`;
|
|
2097
2100
|
}
|
|
2098
2101
|
function renderConfig(options) {
|
|
@@ -2513,7 +2516,7 @@ import { existsSync as existsSync7, mkdirSync as mkdirSync3, readFileSync as rea
|
|
|
2513
2516
|
import { homedir as homedir2 } from "os";
|
|
2514
2517
|
import { dirname as dirname4, join as join9 } from "path";
|
|
2515
2518
|
var LOCALGHOST_PACKAGE_NAME = "@hamedb89/localghost";
|
|
2516
|
-
var LOCALGHOST_VERSION = "0.1.
|
|
2519
|
+
var LOCALGHOST_VERSION = "0.1.13";
|
|
2517
2520
|
var UPDATE_CHECK_CACHE_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
2518
2521
|
var UPDATE_CHECK_NOTIFY_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
2519
2522
|
var UPDATE_CHECK_TIMEOUT_MS = 900;
|