hinacode 0.3.0-alpha.2 → 0.3.0-alpha.4
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/out/server/chunks/{remote-hGWSrZQV.js → remote-B2NssK2N.js} +1145 -581
- package/out/server/cli.js +4 -9
- package/out/server/daemon.js +7951 -7454
- package/package.json +1 -1
package/out/server/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module";
|
|
2
2
|
globalThis.require ??= __createRequire(import.meta.url);
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
|
-
import { d as dual, r as runFork, t as tapCause, h as hasInterruptsOnly, v as void_, s as squash, l as logError, c as constVoid, i as isEffect, a as isSuccess, w as withFiber, C as ConsoleRef, b as sync, T as TaggedError, A as ArraySchema, S as String$6, U as Union, e as hasProperty, o as optional$3, L as Literal, f as optionalKey, D as Defect, g as format, j as toCodecStringTree, k as decodeUnknownEffect, m as identity, n as succeed$2, p as fail, q as is, u as TrueLiterals, F as FalseLiterals, x as mapError, B as BooleanLiterals, I as Int$4, R as Reference, y as fnUntraced, z as scoped, Q as QuitError, E as Terminal, G as cached, H as suspend, P as Prototype, J as getOrElse, K as some, M as match, N as none, O as make$2, V as map$2, W as taggedEnum, X as match$1, Y as map$3, Z as isSome, _ as flatMap$1, $ as sync$1, a0 as empty, a1 as reduce, a2 as pipe, a3 as match$2, a4 as findFirstIndex, a5 as findFirst, a6 as findLast, a7 as isReadonlyArrayNonEmpty, a8 as ensuring, a9 as orDie, aa as take, ab as raceFirst, ac as
|
|
4
|
+
import { d as dual, r as runFork, t as tapCause, h as hasInterruptsOnly, v as void_, s as squash, l as logError, c as constVoid, i as isEffect, a as isSuccess, w as withFiber, C as ConsoleRef, b as sync, T as TaggedError, A as ArraySchema, S as String$6, U as Union, e as hasProperty, o as optional$3, L as Literal, f as optionalKey, D as Defect, g as format, j as toCodecStringTree, k as decodeUnknownEffect, m as identity, n as succeed$2, p as fail, q as is, u as TrueLiterals, F as FalseLiterals, x as mapError, B as BooleanLiterals, I as Int$4, R as Reference, y as fnUntraced, z as scoped, Q as QuitError, E as Terminal, G as cached, H as suspend, P as Prototype, J as getOrElse, K as some, M as match, N as none, O as make$2, V as map$2, W as taggedEnum, X as match$1, Y as map$3, Z as isSome, _ as flatMap$1, $ as sync$1, a0 as empty, a1 as reduce, a2 as pipe, a3 as match$2, a4 as findFirstIndex, a5 as findFirst, a6 as findLast, a7 as isReadonlyArrayNonEmpty, a8 as ensuring, a9 as orDie, aa as take, ab as raceFirst, ac as round, ad as pipeArguments, ae as catchTags, af as fromUndefinedOr, ag as isNotUndefined, ah as getOrUndefined, ai as assignProperty, aj as Service, ak as empty$1, al as exists, am as gen, an as isNone, ao as succeed$3, ap as value, aq as provideService, ar as Stdio, as as catchFilter, at as isQuitError, au as succeed$4, av as fail$1, aw as interrupt, ax as andThen, ay as catchTag, az as result, aA as make$3, aB as provideContext, aC as MinimumLogLevel, aD as Struct, aE as ApprovalRequest, aF as QuestionRequest, aG as SecretRequest, aH as Thread, aI as TaggedError$1, aJ as seconds, aK as decodeUnknownExit, aL as fromJsonString, aM as ServerFrame, aN as acquireRelease, aO as unbounded, aP as endUnsafe, aQ as encodeUnknownEffect, aR as RpcMethods, aS as timeoutOrElse, aT as callback, aU as methodKind, aV as offerUnsafe, aW as WebSocket, aX as REMOTE_PATH, aY as REMOTE_MAX_FRAME_BYTES, aZ as succeedNone, a_ as cliSocketPath, a$ as all, b0 as fromResult, b1 as Number$2, b2 as forEach, b3 as AccessMode, b4 as ProviderId, b5 as promise, b6 as isFailure, b7 as toCheckoutTarget, b8 as noticeEvents, b9 as PushEvent, ba as NullOr, bb as ThreadStatus, bc as try_, bd as as, be as isThreadBusy, bf as tryPromise, bg as map$4, bh as tapError, bi as provide, bj as layer$1 } from "./chunks/remote-B2NssK2N.js";
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import { resolve, sep, join } from "node:path";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
@@ -22,10 +22,6 @@ import "net";
|
|
|
22
22
|
import "tls";
|
|
23
23
|
import "url";
|
|
24
24
|
import "util";
|
|
25
|
-
const round = /* @__PURE__ */ dual(2, (self, precision) => {
|
|
26
|
-
const factor = Math.pow(10, precision);
|
|
27
|
-
return Math.round(self * factor) / factor;
|
|
28
|
-
});
|
|
29
25
|
const defaultTeardown = (exit, onExit) => {
|
|
30
26
|
if (isSuccess(exit)) return onExit(0);
|
|
31
27
|
if (hasInterruptsOnly(exit.cause)) return onExit(130);
|
|
@@ -5796,10 +5792,9 @@ const serve = make(
|
|
|
5796
5792
|
withDefault(false),
|
|
5797
5793
|
withDescription$1("Replace the token, which unpairs every client, or HINACODE_SERVE_ROTATE_TOKEN=1.")
|
|
5798
5794
|
),
|
|
5799
|
-
relay:
|
|
5800
|
-
withMetavar("on|off"),
|
|
5795
|
+
relay: Boolean("relay").pipe(
|
|
5801
5796
|
withDescription$1(
|
|
5802
|
-
"Reach the cloud from any network through the HinaCode relay, or HINACODE_SERVE_RELAY.
|
|
5797
|
+
"Reach the cloud from any network through the HinaCode relay, or HINACODE_SERVE_RELAY. --relay prints a URL to sign in and link it to your HinaCode account. --no-relay removes it."
|
|
5803
5798
|
),
|
|
5804
5799
|
optional
|
|
5805
5800
|
)
|
|
@@ -5812,7 +5807,7 @@ const serve = make(
|
|
|
5812
5807
|
{
|
|
5813
5808
|
port: getOrUndefined(flags.port),
|
|
5814
5809
|
host: getOrUndefined(flags.host),
|
|
5815
|
-
relay: getOrUndefined(flags.relay),
|
|
5810
|
+
relay: getOrUndefined(map$4(flags.relay, (on) => on ? "on" : "off")),
|
|
5816
5811
|
rotateToken: flags.rotateToken
|
|
5817
5812
|
},
|
|
5818
5813
|
userData
|