unplugin-https-reverse-proxy 4.0.3 → 4.1.0-beta.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/README.md +30 -6
- package/dist/{chunk-MD5CVZP7.js → chunk-7CA3EIIX.js} +682 -224
- package/dist/{chunk-RSBXFJ3Z.js → chunk-C5A7XLKL.js} +9 -2
- package/dist/{chunk-2P7SUCQ3.js → chunk-EY3HXBJ4.js} +0 -26
- package/dist/chunk-RKHJN6KY.js +53 -0
- package/dist/esbuild.cjs +790 -303
- package/dist/esbuild.js +4 -3
- package/dist/hmr-sse-bridge.cjs +12 -4
- package/dist/hmr-sse-bridge.d.cts +4 -3
- package/dist/hmr-sse-bridge.d.ts +4 -3
- package/dist/hmr-sse-bridge.js +5 -3
- package/dist/index.cjs +790 -303
- package/dist/index.js +4 -3
- package/dist/nuxt.cjs +787 -292
- package/dist/nuxt.js +5 -9
- package/dist/privileged-helper.cjs +668 -0
- package/dist/privileged-helper.d.cts +2 -0
- package/dist/privileged-helper.d.ts +2 -0
- package/dist/privileged-helper.js +641 -0
- package/dist/rollup.cjs +790 -303
- package/dist/rollup.js +4 -3
- package/dist/rspack.cjs +790 -303
- package/dist/rspack.js +4 -3
- package/dist/utils.cjs +0 -28
- package/dist/utils.d.cts +1 -3
- package/dist/utils.d.ts +1 -3
- package/dist/utils.js +1 -5
- package/dist/vite.cjs +790 -303
- package/dist/vite.js +4 -3
- package/dist/webpack.cjs +790 -303
- package/dist/webpack.js +4 -3
- package/package.json +1 -4
- package/src/caddy/caddyfile.ts +1 -0
- package/src/caddy/index.ts +183 -110
- package/src/caddy/privileged.ts +118 -0
- package/src/caddy/utils.ts +0 -43
- package/src/hmr-sse-bridge.ts +14 -3
- package/src/index.ts +4 -18
- package/src/nuxt.ts +1 -6
- package/src/privileged/bootstrap.ts +174 -0
- package/src/privileged/client.ts +287 -0
- package/src/privileged/entry.ts +45 -0
- package/src/privileged/hosts-file.ts +142 -0
- package/src/privileged/launch.ts +193 -0
- package/src/privileged/ports.ts +45 -0
- package/src/privileged/protocol.ts +111 -0
- package/src/privileged/server.ts +465 -0
- package/src/privileged/session.ts +114 -0
- package/src/privileged/validation.ts +38 -0
- package/src/privileged/windows-elevation.ts +80 -0
- package/src/privileged-helper.ts +109 -0
- package/src/utils.ts +0 -28
- package/src/host/index.ts +0 -52
package/dist/rspack.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
src_default
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7CA3EIIX.js";
|
|
4
|
+
import "./chunk-EY3HXBJ4.js";
|
|
5
|
+
import "./chunk-C5A7XLKL.js";
|
|
6
|
+
import "./chunk-RKHJN6KY.js";
|
|
6
7
|
|
|
7
8
|
// src/rspack.ts
|
|
8
9
|
var rspack_default = src_default.rspack;
|
package/dist/utils.cjs
CHANGED
|
@@ -30,33 +30,19 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/utils.ts
|
|
31
31
|
var utils_exports = {};
|
|
32
32
|
__export(utils_exports, {
|
|
33
|
-
chmodRecursive: () => chmodRecursive,
|
|
34
33
|
consola: () => consola,
|
|
35
34
|
generateQrcode: () => generateQrcode,
|
|
36
35
|
getIpv4List: () => getIpv4List,
|
|
37
|
-
isAdmin: () => isAdmin,
|
|
38
36
|
once: () => once
|
|
39
37
|
});
|
|
40
38
|
module.exports = __toCommonJS(utils_exports);
|
|
41
|
-
var import_node_child_process = require("child_process");
|
|
42
|
-
var import_promises = require("fs/promises");
|
|
43
39
|
var import_node_os = require("os");
|
|
44
|
-
var import_node_path = __toESM(require("path"), 1);
|
|
45
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
46
40
|
var import_consola = require("consola");
|
|
47
41
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
48
42
|
var import_qrcode_terminal = __toESM(require("qrcode-terminal"), 1);
|
|
49
43
|
var consola = (0, import_consola.createConsola)({
|
|
50
44
|
level: 3
|
|
51
45
|
}).withTag("reverse-proxy");
|
|
52
|
-
async function chmodRecursive(_path, mode) {
|
|
53
|
-
await (0, import_promises.chmod)(_path, mode);
|
|
54
|
-
if ((await (0, import_promises.stat)(_path)).isDirectory()) {
|
|
55
|
-
const children = await (0, import_promises.readdir)(_path);
|
|
56
|
-
for (const child of children)
|
|
57
|
-
await chmodRecursive(import_node_path.default.join(_path, child), mode);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
46
|
function once(fn) {
|
|
61
47
|
let called = false;
|
|
62
48
|
return (...args) => {
|
|
@@ -66,18 +52,6 @@ function once(fn) {
|
|
|
66
52
|
return fn(...args);
|
|
67
53
|
};
|
|
68
54
|
}
|
|
69
|
-
function isAdmin() {
|
|
70
|
-
if (import_node_process.default.platform === "win32") {
|
|
71
|
-
try {
|
|
72
|
-
(0, import_node_child_process.execSync)("net session", { stdio: "ignore" });
|
|
73
|
-
return true;
|
|
74
|
-
} catch {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
} else {
|
|
78
|
-
return !!(import_node_process.default.getuid && import_node_process.default.getuid() === 0);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
55
|
function getIpv4List() {
|
|
82
56
|
const interfaces = (0, import_node_os.networkInterfaces)();
|
|
83
57
|
return Object.values(interfaces).flatMap((nInterface) => nInterface ?? []).filter(
|
|
@@ -93,11 +67,9 @@ async function generateQrcode(input) {
|
|
|
93
67
|
}
|
|
94
68
|
// Annotate the CommonJS export names for ESM import in node:
|
|
95
69
|
0 && (module.exports = {
|
|
96
|
-
chmodRecursive,
|
|
97
70
|
consola,
|
|
98
71
|
generateQrcode,
|
|
99
72
|
getIpv4List,
|
|
100
|
-
isAdmin,
|
|
101
73
|
once
|
|
102
74
|
});
|
|
103
75
|
exports.default = module.exports;
|
package/dist/utils.d.cts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as _consola from 'consola';
|
|
2
2
|
|
|
3
3
|
declare const consola: _consola.ConsolaInstance;
|
|
4
|
-
declare function chmodRecursive(_path: string, mode: number): Promise<void>;
|
|
5
4
|
declare function once<T extends (...args: any[]) => any>(fn: T): (...args: Parameters<T>) => ReturnType<T>;
|
|
6
|
-
declare function isAdmin(): boolean;
|
|
7
5
|
declare function getIpv4List(): string[];
|
|
8
6
|
declare function generateQrcode(input: string): Promise<string>;
|
|
9
7
|
|
|
10
|
-
export {
|
|
8
|
+
export { consola, generateQrcode, getIpv4List, once };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as _consola from 'consola';
|
|
2
2
|
|
|
3
3
|
declare const consola: _consola.ConsolaInstance;
|
|
4
|
-
declare function chmodRecursive(_path: string, mode: number): Promise<void>;
|
|
5
4
|
declare function once<T extends (...args: any[]) => any>(fn: T): (...args: Parameters<T>) => ReturnType<T>;
|
|
6
|
-
declare function isAdmin(): boolean;
|
|
7
5
|
declare function getIpv4List(): string[];
|
|
8
6
|
declare function generateQrcode(input: string): Promise<string>;
|
|
9
7
|
|
|
10
|
-
export {
|
|
8
|
+
export { consola, generateQrcode, getIpv4List, once };
|
package/dist/utils.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
chmodRecursive,
|
|
3
2
|
consola,
|
|
4
3
|
generateQrcode,
|
|
5
4
|
getIpv4List,
|
|
6
|
-
isAdmin,
|
|
7
5
|
once
|
|
8
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EY3HXBJ4.js";
|
|
9
7
|
export {
|
|
10
|
-
chmodRecursive,
|
|
11
8
|
consola,
|
|
12
9
|
generateQrcode,
|
|
13
10
|
getIpv4List,
|
|
14
|
-
isAdmin,
|
|
15
11
|
once
|
|
16
12
|
};
|