@oxbit/cli 0.3.3 → 0.4.0
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/package.json +1 -1
- package/runtime/dist/index.js +5 -1
- package/runtime/package.json +1 -1
- package/web/dist/assets/{index-nCiWoOlW.css → index-B7cH1Cpv.css} +1 -1
- package/web/dist/assets/{index-WzJHy4M7.js → index-uLHm1V21.js} +101 -101
- package/web/dist/assets/{typescript-CaioFRCx.js → typescript-JybYWk0M.js} +2 -2
- package/web/dist/index.html +2 -2
- package/web/dist/licenses/ios-ssh-crates.txt +3807 -0
package/package.json
CHANGED
package/runtime/dist/index.js
CHANGED
|
@@ -10955,6 +10955,9 @@ async function createRuntime(options2) {
|
|
|
10955
10955
|
};
|
|
10956
10956
|
await persist();
|
|
10957
10957
|
const pairingCode = options2.pairingCode ?? randomBytes(6).toString("hex");
|
|
10958
|
+
const pairingAttemptsPerMinute = options2.pairingAttemptsPerMinute ?? 10;
|
|
10959
|
+
if (!Number.isInteger(pairingAttemptsPerMinute) || pairingAttemptsPerMinute < 1)
|
|
10960
|
+
throw new Error("Pairing attempts per minute must be a positive whole number");
|
|
10958
10961
|
let port2 = options2.port ?? 9277;
|
|
10959
10962
|
const allowedOrigins = () => /* @__PURE__ */ new Set([
|
|
10960
10963
|
"tauri://localhost",
|
|
@@ -11186,7 +11189,7 @@ async function createRuntime(options2) {
|
|
|
11186
11189
|
entry.count = 0;
|
|
11187
11190
|
entry.reset = Date.now() + 6e4;
|
|
11188
11191
|
}
|
|
11189
|
-
if (++entry.count >
|
|
11192
|
+
if (++entry.count > pairingAttemptsPerMinute) {
|
|
11190
11193
|
httpJson(response, 429, { error: "Pairing rate limit reached" });
|
|
11191
11194
|
return;
|
|
11192
11195
|
}
|
|
@@ -12299,6 +12302,7 @@ async function serve(invocation, target, dataDir, env) {
|
|
|
12299
12302
|
host,
|
|
12300
12303
|
dataDir,
|
|
12301
12304
|
pairingCode: setting("PAIRING_CODE", env),
|
|
12305
|
+
pairingAttemptsPerMinute: setting("PAIRING_ATTEMPTS_PER_MINUTE", env) === void 0 ? void 0 : Number(setting("PAIRING_ATTEMPTS_PER_MINUTE", env)),
|
|
12302
12306
|
origins: setting("ORIGINS", env)?.split(",").filter(Boolean),
|
|
12303
12307
|
webRoot: setting("WEB_ROOT", env)
|
|
12304
12308
|
});
|