wispctl 1.1.0 → 1.1.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 +157 -612
- package/dist/index.js.map +8 -9
- package/package.json +2 -2
- package/dist/keyring.darwin-arm64-nxmqrmhq.node +0 -0
package/dist/index.js
CHANGED
|
@@ -107195,544 +107195,6 @@ var require_dist28 = __commonJS((exports) => {
|
|
|
107195
107195
|
__exportStar(require_util27(), exports);
|
|
107196
107196
|
});
|
|
107197
107197
|
|
|
107198
|
-
// ../node_modules/.bun/@napi-rs+keyring-darwin-arm64@1.2.0/node_modules/@napi-rs/keyring-darwin-arm64/keyring.darwin-arm64.node
|
|
107199
|
-
var require_keyring_darwin_arm64 = __commonJS((exports, module) => {
|
|
107200
|
-
module.exports = __require("./keyring.darwin-arm64-nxmqrmhq.node");
|
|
107201
|
-
});
|
|
107202
|
-
|
|
107203
|
-
// ../node_modules/.bun/@napi-rs+keyring-darwin-arm64@1.2.0/node_modules/@napi-rs/keyring-darwin-arm64/package.json
|
|
107204
|
-
var require_package2 = __commonJS((exports, module) => {
|
|
107205
|
-
module.exports = {
|
|
107206
|
-
name: "@napi-rs/keyring-darwin-arm64",
|
|
107207
|
-
version: "1.2.0",
|
|
107208
|
-
cpu: [
|
|
107209
|
-
"arm64"
|
|
107210
|
-
],
|
|
107211
|
-
main: "keyring.darwin-arm64.node",
|
|
107212
|
-
files: [
|
|
107213
|
-
"keyring.darwin-arm64.node"
|
|
107214
|
-
],
|
|
107215
|
-
description: "https://github.com/hwchen/keyring-rs Node.js binding via https://napi.rs",
|
|
107216
|
-
keywords: [
|
|
107217
|
-
"napi-rs",
|
|
107218
|
-
"NAPI",
|
|
107219
|
-
"N-API",
|
|
107220
|
-
"Rust",
|
|
107221
|
-
"node-addon",
|
|
107222
|
-
"node-addon-api"
|
|
107223
|
-
],
|
|
107224
|
-
license: "MIT",
|
|
107225
|
-
engines: {
|
|
107226
|
-
node: ">= 10"
|
|
107227
|
-
},
|
|
107228
|
-
repository: "https://github.com/Brooooooklyn/keyring-node",
|
|
107229
|
-
publishConfig: {
|
|
107230
|
-
registry: "https://registry.npmjs.org/",
|
|
107231
|
-
access: "public"
|
|
107232
|
-
},
|
|
107233
|
-
os: [
|
|
107234
|
-
"darwin"
|
|
107235
|
-
]
|
|
107236
|
-
};
|
|
107237
|
-
});
|
|
107238
|
-
|
|
107239
|
-
// ../node_modules/.bun/@napi-rs+keyring@1.2.0/node_modules/@napi-rs/keyring/index.js
|
|
107240
|
-
var require_keyring = __commonJS((exports, module) => {
|
|
107241
|
-
var __filename = "/Users/regent/Developer/wisp.place-monorepo/node_modules/.bun/@napi-rs+keyring@1.2.0/node_modules/@napi-rs/keyring/index.js";
|
|
107242
|
-
var { createRequire: createRequire2 } = __require("node:module");
|
|
107243
|
-
__require = createRequire2(__filename);
|
|
107244
|
-
var { readFileSync: readFileSync2 } = __require("node:fs");
|
|
107245
|
-
var nativeBinding = null;
|
|
107246
|
-
var loadErrors = [];
|
|
107247
|
-
var isMusl = () => {
|
|
107248
|
-
let musl = false;
|
|
107249
|
-
if (process.platform === "linux") {
|
|
107250
|
-
musl = isMuslFromFilesystem();
|
|
107251
|
-
if (musl === null) {
|
|
107252
|
-
musl = isMuslFromReport();
|
|
107253
|
-
}
|
|
107254
|
-
if (musl === null) {
|
|
107255
|
-
musl = isMuslFromChildProcess();
|
|
107256
|
-
}
|
|
107257
|
-
}
|
|
107258
|
-
return musl;
|
|
107259
|
-
};
|
|
107260
|
-
var isFileMusl = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
|
|
107261
|
-
var isMuslFromFilesystem = () => {
|
|
107262
|
-
try {
|
|
107263
|
-
return readFileSync2("/usr/bin/ldd", "utf-8").includes("musl");
|
|
107264
|
-
} catch {
|
|
107265
|
-
return null;
|
|
107266
|
-
}
|
|
107267
|
-
};
|
|
107268
|
-
var isMuslFromReport = () => {
|
|
107269
|
-
let report = null;
|
|
107270
|
-
if (typeof process.report?.getReport === "function") {
|
|
107271
|
-
process.report.excludeNetwork = true;
|
|
107272
|
-
report = process.report.getReport();
|
|
107273
|
-
}
|
|
107274
|
-
if (!report) {
|
|
107275
|
-
return null;
|
|
107276
|
-
}
|
|
107277
|
-
if (report.header && report.header.glibcVersionRuntime) {
|
|
107278
|
-
return false;
|
|
107279
|
-
}
|
|
107280
|
-
if (Array.isArray(report.sharedObjects)) {
|
|
107281
|
-
if (report.sharedObjects.some(isFileMusl)) {
|
|
107282
|
-
return true;
|
|
107283
|
-
}
|
|
107284
|
-
}
|
|
107285
|
-
return false;
|
|
107286
|
-
};
|
|
107287
|
-
var isMuslFromChildProcess = () => {
|
|
107288
|
-
try {
|
|
107289
|
-
return __require("child_process").execSync("ldd --version", { encoding: "utf8" }).includes("musl");
|
|
107290
|
-
} catch (e3) {
|
|
107291
|
-
return false;
|
|
107292
|
-
}
|
|
107293
|
-
};
|
|
107294
|
-
function requireNative() {
|
|
107295
|
-
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
|
107296
|
-
try {
|
|
107297
|
-
nativeBinding = __require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
|
|
107298
|
-
} catch (err) {
|
|
107299
|
-
loadErrors.push(err);
|
|
107300
|
-
}
|
|
107301
|
-
} else if (process.platform === "android") {
|
|
107302
|
-
if (process.arch === "arm64") {
|
|
107303
|
-
try {
|
|
107304
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.android-arm64.node");})();
|
|
107305
|
-
} catch (e3) {
|
|
107306
|
-
loadErrors.push(e3);
|
|
107307
|
-
}
|
|
107308
|
-
try {
|
|
107309
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-android-arm64");})();
|
|
107310
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-android-arm64/package.json");})().version;
|
|
107311
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107312
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107313
|
-
}
|
|
107314
|
-
return binding;
|
|
107315
|
-
} catch (e3) {
|
|
107316
|
-
loadErrors.push(e3);
|
|
107317
|
-
}
|
|
107318
|
-
} else if (process.arch === "arm") {
|
|
107319
|
-
try {
|
|
107320
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.android-arm-eabi.node");})();
|
|
107321
|
-
} catch (e3) {
|
|
107322
|
-
loadErrors.push(e3);
|
|
107323
|
-
}
|
|
107324
|
-
try {
|
|
107325
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-android-arm-eabi");})();
|
|
107326
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-android-arm-eabi/package.json");})().version;
|
|
107327
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107328
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107329
|
-
}
|
|
107330
|
-
return binding;
|
|
107331
|
-
} catch (e3) {
|
|
107332
|
-
loadErrors.push(e3);
|
|
107333
|
-
}
|
|
107334
|
-
} else {
|
|
107335
|
-
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`));
|
|
107336
|
-
}
|
|
107337
|
-
} else if (process.platform === "win32") {
|
|
107338
|
-
if (process.arch === "x64") {
|
|
107339
|
-
try {
|
|
107340
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.win32-x64-msvc.node");})();
|
|
107341
|
-
} catch (e3) {
|
|
107342
|
-
loadErrors.push(e3);
|
|
107343
|
-
}
|
|
107344
|
-
try {
|
|
107345
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-win32-x64-msvc");})();
|
|
107346
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-win32-x64-msvc/package.json");})().version;
|
|
107347
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107348
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107349
|
-
}
|
|
107350
|
-
return binding;
|
|
107351
|
-
} catch (e3) {
|
|
107352
|
-
loadErrors.push(e3);
|
|
107353
|
-
}
|
|
107354
|
-
} else if (process.arch === "ia32") {
|
|
107355
|
-
try {
|
|
107356
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.win32-ia32-msvc.node");})();
|
|
107357
|
-
} catch (e3) {
|
|
107358
|
-
loadErrors.push(e3);
|
|
107359
|
-
}
|
|
107360
|
-
try {
|
|
107361
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-win32-ia32-msvc");})();
|
|
107362
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-win32-ia32-msvc/package.json");})().version;
|
|
107363
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107364
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107365
|
-
}
|
|
107366
|
-
return binding;
|
|
107367
|
-
} catch (e3) {
|
|
107368
|
-
loadErrors.push(e3);
|
|
107369
|
-
}
|
|
107370
|
-
} else if (process.arch === "arm64") {
|
|
107371
|
-
try {
|
|
107372
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.win32-arm64-msvc.node");})();
|
|
107373
|
-
} catch (e3) {
|
|
107374
|
-
loadErrors.push(e3);
|
|
107375
|
-
}
|
|
107376
|
-
try {
|
|
107377
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-win32-arm64-msvc");})();
|
|
107378
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-win32-arm64-msvc/package.json");})().version;
|
|
107379
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107380
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107381
|
-
}
|
|
107382
|
-
return binding;
|
|
107383
|
-
} catch (e3) {
|
|
107384
|
-
loadErrors.push(e3);
|
|
107385
|
-
}
|
|
107386
|
-
} else {
|
|
107387
|
-
loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
|
|
107388
|
-
}
|
|
107389
|
-
} else if (process.platform === "darwin") {
|
|
107390
|
-
try {
|
|
107391
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.darwin-universal.node");})();
|
|
107392
|
-
} catch (e3) {
|
|
107393
|
-
loadErrors.push(e3);
|
|
107394
|
-
}
|
|
107395
|
-
try {
|
|
107396
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-darwin-universal");})();
|
|
107397
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-darwin-universal/package.json");})().version;
|
|
107398
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107399
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107400
|
-
}
|
|
107401
|
-
return binding;
|
|
107402
|
-
} catch (e3) {
|
|
107403
|
-
loadErrors.push(e3);
|
|
107404
|
-
}
|
|
107405
|
-
if (process.arch === "x64") {
|
|
107406
|
-
try {
|
|
107407
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.darwin-x64.node");})();
|
|
107408
|
-
} catch (e3) {
|
|
107409
|
-
loadErrors.push(e3);
|
|
107410
|
-
}
|
|
107411
|
-
try {
|
|
107412
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-darwin-x64");})();
|
|
107413
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-darwin-x64/package.json");})().version;
|
|
107414
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107415
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107416
|
-
}
|
|
107417
|
-
return binding;
|
|
107418
|
-
} catch (e3) {
|
|
107419
|
-
loadErrors.push(e3);
|
|
107420
|
-
}
|
|
107421
|
-
} else if (process.arch === "arm64") {
|
|
107422
|
-
try {
|
|
107423
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.darwin-arm64.node");})();
|
|
107424
|
-
} catch (e3) {
|
|
107425
|
-
loadErrors.push(e3);
|
|
107426
|
-
}
|
|
107427
|
-
try {
|
|
107428
|
-
const binding = require_keyring_darwin_arm64();
|
|
107429
|
-
const bindingPackageVersion = require_package2().version;
|
|
107430
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107431
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107432
|
-
}
|
|
107433
|
-
return binding;
|
|
107434
|
-
} catch (e3) {
|
|
107435
|
-
loadErrors.push(e3);
|
|
107436
|
-
}
|
|
107437
|
-
} else {
|
|
107438
|
-
loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`));
|
|
107439
|
-
}
|
|
107440
|
-
} else if (process.platform === "freebsd") {
|
|
107441
|
-
if (process.arch === "x64") {
|
|
107442
|
-
try {
|
|
107443
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.freebsd-x64.node");})();
|
|
107444
|
-
} catch (e3) {
|
|
107445
|
-
loadErrors.push(e3);
|
|
107446
|
-
}
|
|
107447
|
-
try {
|
|
107448
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-freebsd-x64");})();
|
|
107449
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-freebsd-x64/package.json");})().version;
|
|
107450
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107451
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107452
|
-
}
|
|
107453
|
-
return binding;
|
|
107454
|
-
} catch (e3) {
|
|
107455
|
-
loadErrors.push(e3);
|
|
107456
|
-
}
|
|
107457
|
-
} else if (process.arch === "arm64") {
|
|
107458
|
-
try {
|
|
107459
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.freebsd-arm64.node");})();
|
|
107460
|
-
} catch (e3) {
|
|
107461
|
-
loadErrors.push(e3);
|
|
107462
|
-
}
|
|
107463
|
-
try {
|
|
107464
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-freebsd-arm64");})();
|
|
107465
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-freebsd-arm64/package.json");})().version;
|
|
107466
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107467
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107468
|
-
}
|
|
107469
|
-
return binding;
|
|
107470
|
-
} catch (e3) {
|
|
107471
|
-
loadErrors.push(e3);
|
|
107472
|
-
}
|
|
107473
|
-
} else {
|
|
107474
|
-
loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
|
|
107475
|
-
}
|
|
107476
|
-
} else if (process.platform === "linux") {
|
|
107477
|
-
if (process.arch === "x64") {
|
|
107478
|
-
if (isMusl()) {
|
|
107479
|
-
try {
|
|
107480
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.linux-x64-musl.node");})();
|
|
107481
|
-
} catch (e3) {
|
|
107482
|
-
loadErrors.push(e3);
|
|
107483
|
-
}
|
|
107484
|
-
try {
|
|
107485
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-x64-musl");})();
|
|
107486
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-x64-musl/package.json");})().version;
|
|
107487
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107488
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107489
|
-
}
|
|
107490
|
-
return binding;
|
|
107491
|
-
} catch (e3) {
|
|
107492
|
-
loadErrors.push(e3);
|
|
107493
|
-
}
|
|
107494
|
-
} else {
|
|
107495
|
-
try {
|
|
107496
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.linux-x64-gnu.node");})();
|
|
107497
|
-
} catch (e3) {
|
|
107498
|
-
loadErrors.push(e3);
|
|
107499
|
-
}
|
|
107500
|
-
try {
|
|
107501
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-x64-gnu");})();
|
|
107502
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-x64-gnu/package.json");})().version;
|
|
107503
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107504
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107505
|
-
}
|
|
107506
|
-
return binding;
|
|
107507
|
-
} catch (e3) {
|
|
107508
|
-
loadErrors.push(e3);
|
|
107509
|
-
}
|
|
107510
|
-
}
|
|
107511
|
-
} else if (process.arch === "arm64") {
|
|
107512
|
-
if (isMusl()) {
|
|
107513
|
-
try {
|
|
107514
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.linux-arm64-musl.node");})();
|
|
107515
|
-
} catch (e3) {
|
|
107516
|
-
loadErrors.push(e3);
|
|
107517
|
-
}
|
|
107518
|
-
try {
|
|
107519
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-arm64-musl");})();
|
|
107520
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-arm64-musl/package.json");})().version;
|
|
107521
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107522
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107523
|
-
}
|
|
107524
|
-
return binding;
|
|
107525
|
-
} catch (e3) {
|
|
107526
|
-
loadErrors.push(e3);
|
|
107527
|
-
}
|
|
107528
|
-
} else {
|
|
107529
|
-
try {
|
|
107530
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.linux-arm64-gnu.node");})();
|
|
107531
|
-
} catch (e3) {
|
|
107532
|
-
loadErrors.push(e3);
|
|
107533
|
-
}
|
|
107534
|
-
try {
|
|
107535
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-arm64-gnu");})();
|
|
107536
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-arm64-gnu/package.json");})().version;
|
|
107537
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107538
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107539
|
-
}
|
|
107540
|
-
return binding;
|
|
107541
|
-
} catch (e3) {
|
|
107542
|
-
loadErrors.push(e3);
|
|
107543
|
-
}
|
|
107544
|
-
}
|
|
107545
|
-
} else if (process.arch === "arm") {
|
|
107546
|
-
if (isMusl()) {
|
|
107547
|
-
try {
|
|
107548
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.linux-arm-musleabihf.node");})();
|
|
107549
|
-
} catch (e3) {
|
|
107550
|
-
loadErrors.push(e3);
|
|
107551
|
-
}
|
|
107552
|
-
try {
|
|
107553
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-arm-musleabihf");})();
|
|
107554
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-arm-musleabihf/package.json");})().version;
|
|
107555
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107556
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107557
|
-
}
|
|
107558
|
-
return binding;
|
|
107559
|
-
} catch (e3) {
|
|
107560
|
-
loadErrors.push(e3);
|
|
107561
|
-
}
|
|
107562
|
-
} else {
|
|
107563
|
-
try {
|
|
107564
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.linux-arm-gnueabihf.node");})();
|
|
107565
|
-
} catch (e3) {
|
|
107566
|
-
loadErrors.push(e3);
|
|
107567
|
-
}
|
|
107568
|
-
try {
|
|
107569
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-arm-gnueabihf");})();
|
|
107570
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-arm-gnueabihf/package.json");})().version;
|
|
107571
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107572
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107573
|
-
}
|
|
107574
|
-
return binding;
|
|
107575
|
-
} catch (e3) {
|
|
107576
|
-
loadErrors.push(e3);
|
|
107577
|
-
}
|
|
107578
|
-
}
|
|
107579
|
-
} else if (process.arch === "riscv64") {
|
|
107580
|
-
if (isMusl()) {
|
|
107581
|
-
try {
|
|
107582
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.linux-riscv64-musl.node");})();
|
|
107583
|
-
} catch (e3) {
|
|
107584
|
-
loadErrors.push(e3);
|
|
107585
|
-
}
|
|
107586
|
-
try {
|
|
107587
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-riscv64-musl");})();
|
|
107588
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-riscv64-musl/package.json");})().version;
|
|
107589
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107590
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107591
|
-
}
|
|
107592
|
-
return binding;
|
|
107593
|
-
} catch (e3) {
|
|
107594
|
-
loadErrors.push(e3);
|
|
107595
|
-
}
|
|
107596
|
-
} else {
|
|
107597
|
-
try {
|
|
107598
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.linux-riscv64-gnu.node");})();
|
|
107599
|
-
} catch (e3) {
|
|
107600
|
-
loadErrors.push(e3);
|
|
107601
|
-
}
|
|
107602
|
-
try {
|
|
107603
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-riscv64-gnu");})();
|
|
107604
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-riscv64-gnu/package.json");})().version;
|
|
107605
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107606
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107607
|
-
}
|
|
107608
|
-
return binding;
|
|
107609
|
-
} catch (e3) {
|
|
107610
|
-
loadErrors.push(e3);
|
|
107611
|
-
}
|
|
107612
|
-
}
|
|
107613
|
-
} else if (process.arch === "ppc64") {
|
|
107614
|
-
try {
|
|
107615
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.linux-ppc64-gnu.node");})();
|
|
107616
|
-
} catch (e3) {
|
|
107617
|
-
loadErrors.push(e3);
|
|
107618
|
-
}
|
|
107619
|
-
try {
|
|
107620
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-ppc64-gnu");})();
|
|
107621
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-ppc64-gnu/package.json");})().version;
|
|
107622
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107623
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107624
|
-
}
|
|
107625
|
-
return binding;
|
|
107626
|
-
} catch (e3) {
|
|
107627
|
-
loadErrors.push(e3);
|
|
107628
|
-
}
|
|
107629
|
-
} else if (process.arch === "s390x") {
|
|
107630
|
-
try {
|
|
107631
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.linux-s390x-gnu.node");})();
|
|
107632
|
-
} catch (e3) {
|
|
107633
|
-
loadErrors.push(e3);
|
|
107634
|
-
}
|
|
107635
|
-
try {
|
|
107636
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-s390x-gnu");})();
|
|
107637
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-linux-s390x-gnu/package.json");})().version;
|
|
107638
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107639
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107640
|
-
}
|
|
107641
|
-
return binding;
|
|
107642
|
-
} catch (e3) {
|
|
107643
|
-
loadErrors.push(e3);
|
|
107644
|
-
}
|
|
107645
|
-
} else {
|
|
107646
|
-
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
|
|
107647
|
-
}
|
|
107648
|
-
} else if (process.platform === "openharmony") {
|
|
107649
|
-
if (process.arch === "arm64") {
|
|
107650
|
-
try {
|
|
107651
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.openharmony-arm64.node");})();
|
|
107652
|
-
} catch (e3) {
|
|
107653
|
-
loadErrors.push(e3);
|
|
107654
|
-
}
|
|
107655
|
-
try {
|
|
107656
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-openharmony-arm64");})();
|
|
107657
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-openharmony-arm64/package.json");})().version;
|
|
107658
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107659
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107660
|
-
}
|
|
107661
|
-
return binding;
|
|
107662
|
-
} catch (e3) {
|
|
107663
|
-
loadErrors.push(e3);
|
|
107664
|
-
}
|
|
107665
|
-
} else if (process.arch === "x64") {
|
|
107666
|
-
try {
|
|
107667
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.openharmony-x64.node");})();
|
|
107668
|
-
} catch (e3) {
|
|
107669
|
-
loadErrors.push(e3);
|
|
107670
|
-
}
|
|
107671
|
-
try {
|
|
107672
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-openharmony-x64");})();
|
|
107673
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-openharmony-x64/package.json");})().version;
|
|
107674
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107675
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107676
|
-
}
|
|
107677
|
-
return binding;
|
|
107678
|
-
} catch (e3) {
|
|
107679
|
-
loadErrors.push(e3);
|
|
107680
|
-
}
|
|
107681
|
-
} else if (process.arch === "arm") {
|
|
107682
|
-
try {
|
|
107683
|
-
return (()=>{throw new Error("Cannot require module "+"./keyring.openharmony-arm.node");})();
|
|
107684
|
-
} catch (e3) {
|
|
107685
|
-
loadErrors.push(e3);
|
|
107686
|
-
}
|
|
107687
|
-
try {
|
|
107688
|
-
const binding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-openharmony-arm");})();
|
|
107689
|
-
const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-openharmony-arm/package.json");})().version;
|
|
107690
|
-
if (bindingPackageVersion !== "1.2.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
107691
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107692
|
-
}
|
|
107693
|
-
return binding;
|
|
107694
|
-
} catch (e3) {
|
|
107695
|
-
loadErrors.push(e3);
|
|
107696
|
-
}
|
|
107697
|
-
} else {
|
|
107698
|
-
loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
|
|
107699
|
-
}
|
|
107700
|
-
} else {
|
|
107701
|
-
loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
|
|
107702
|
-
}
|
|
107703
|
-
}
|
|
107704
|
-
nativeBinding = requireNative();
|
|
107705
|
-
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
107706
|
-
try {
|
|
107707
|
-
nativeBinding = (()=>{throw new Error("Cannot require module "+"./keyring.wasi.cjs");})();
|
|
107708
|
-
} catch (err) {
|
|
107709
|
-
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
107710
|
-
loadErrors.push(err);
|
|
107711
|
-
}
|
|
107712
|
-
}
|
|
107713
|
-
if (!nativeBinding) {
|
|
107714
|
-
try {
|
|
107715
|
-
nativeBinding = (()=>{throw new Error("Cannot require module "+"@napi-rs/keyring-wasm32-wasi");})();
|
|
107716
|
-
} catch (err) {
|
|
107717
|
-
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
107718
|
-
loadErrors.push(err);
|
|
107719
|
-
}
|
|
107720
|
-
}
|
|
107721
|
-
}
|
|
107722
|
-
}
|
|
107723
|
-
if (!nativeBinding) {
|
|
107724
|
-
if (loadErrors.length > 0) {
|
|
107725
|
-
throw new Error(`Cannot find native binding. ` + `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` + "Please try `npm i` again after removing both package-lock.json and node_modules directory.", { cause: loadErrors });
|
|
107726
|
-
}
|
|
107727
|
-
throw new Error(`Failed to load native binding`);
|
|
107728
|
-
}
|
|
107729
|
-
module.exports = nativeBinding;
|
|
107730
|
-
module.exports.AsyncEntry = nativeBinding.AsyncEntry;
|
|
107731
|
-
module.exports.Entry = nativeBinding.Entry;
|
|
107732
|
-
module.exports.findCredentials = nativeBinding.findCredentials;
|
|
107733
|
-
module.exports.findCredentialsAsync = nativeBinding.findCredentialsAsync;
|
|
107734
|
-
});
|
|
107735
|
-
|
|
107736
107198
|
// ../node_modules/.bun/@atproto+common-web@0.4.18/node_modules/@atproto/common-web/dist/check.js
|
|
107737
107199
|
var require_check2 = __commonJS((exports) => {
|
|
107738
107200
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -150905,7 +150367,6 @@ var DEFAULT_IGNORE_PATTERNS = [
|
|
|
150905
150367
|
"env/**",
|
|
150906
150368
|
"*.swp",
|
|
150907
150369
|
"*.swo",
|
|
150908
|
-
"*~",
|
|
150909
150370
|
".tangled",
|
|
150910
150371
|
".tangled/**",
|
|
150911
150372
|
".wispignore"
|
|
@@ -151516,25 +150977,6 @@ ${import_picocolors3.default.cyan(d3)}
|
|
|
151516
150977
|
`;
|
|
151517
150978
|
}
|
|
151518
150979
|
} }).prompt();
|
|
151519
|
-
var ye2 = (t) => {
|
|
151520
|
-
const n = t.active ?? "Yes", r = t.inactive ?? "No";
|
|
151521
|
-
return new dD({ active: n, inactive: r, initialValue: t.initialValue ?? true, render() {
|
|
151522
|
-
const i = `${import_picocolors3.default.gray(o2)}
|
|
151523
|
-
${b3(this.state)} ${t.message}
|
|
151524
|
-
`, s = this.value ? n : r;
|
|
151525
|
-
switch (this.state) {
|
|
151526
|
-
case "submit":
|
|
151527
|
-
return `${i}${import_picocolors3.default.gray(o2)} ${import_picocolors3.default.dim(s)}`;
|
|
151528
|
-
case "cancel":
|
|
151529
|
-
return `${i}${import_picocolors3.default.gray(o2)} ${import_picocolors3.default.strikethrough(import_picocolors3.default.dim(s))}
|
|
151530
|
-
${import_picocolors3.default.gray(o2)}`;
|
|
151531
|
-
default:
|
|
151532
|
-
return `${i}${import_picocolors3.default.cyan(o2)} ${this.value ? `${import_picocolors3.default.green(k3)} ${n}` : `${import_picocolors3.default.dim(P3)} ${import_picocolors3.default.dim(n)}`} ${import_picocolors3.default.dim("/")} ${this.value ? `${import_picocolors3.default.dim(P3)} ${import_picocolors3.default.dim(r)}` : `${import_picocolors3.default.green(k3)} ${r}`}
|
|
151533
|
-
${import_picocolors3.default.cyan(d3)}
|
|
151534
|
-
`;
|
|
151535
|
-
}
|
|
151536
|
-
} }).prompt();
|
|
151537
|
-
};
|
|
151538
150980
|
var xe2 = (t = "") => {
|
|
151539
150981
|
process.stdout.write(`${import_picocolors3.default.gray(d3)} ${import_picocolors3.default.red(t)}
|
|
151540
150982
|
|
|
@@ -151962,7 +151404,7 @@ async function deleteOldSubfsRecords(agent, did, oldRecord, newSubfsRkeys) {
|
|
|
151962
151404
|
}
|
|
151963
151405
|
async function deploy(agent, did, options) {
|
|
151964
151406
|
const siteDir = options.path;
|
|
151965
|
-
const siteName = options.site || basename(siteDir);
|
|
151407
|
+
const siteName = (options.site || basename(siteDir)).toLowerCase();
|
|
151966
151408
|
if (!/^[a-zA-Z0-9._~:-]{1,512}$/.test(siteName)) {
|
|
151967
151409
|
throw new Error(`Invalid site name: ${siteName}. Must be 1-512 chars of [a-zA-Z0-9._~:-]`);
|
|
151968
151410
|
}
|
|
@@ -156472,25 +155914,69 @@ async function getKeyringEntryConstructor() {
|
|
|
156472
155914
|
return keyringEntryConstructor;
|
|
156473
155915
|
}
|
|
156474
155916
|
try {
|
|
156475
|
-
const module = await
|
|
155917
|
+
const module = await import("@napi-rs/keyring");
|
|
156476
155918
|
keyringEntryConstructor = module.Entry;
|
|
156477
155919
|
} catch {
|
|
156478
155920
|
keyringEntryConstructor = null;
|
|
156479
155921
|
}
|
|
156480
155922
|
return keyringEntryConstructor;
|
|
156481
155923
|
}
|
|
155924
|
+
function formatProbeError(error) {
|
|
155925
|
+
if (error instanceof Error) {
|
|
155926
|
+
return error.message;
|
|
155927
|
+
}
|
|
155928
|
+
if (typeof error === "string") {
|
|
155929
|
+
return error;
|
|
155930
|
+
}
|
|
155931
|
+
return;
|
|
155932
|
+
}
|
|
155933
|
+
function describeUnavailableKeychain(result) {
|
|
155934
|
+
if (process.platform === "darwin") {
|
|
155935
|
+
if (!result.moduleAvailable) {
|
|
155936
|
+
return "macOS Keychain support is unavailable in this build.";
|
|
155937
|
+
}
|
|
155938
|
+
if (result.detail?.toLowerCase().includes("authorization")) {
|
|
155939
|
+
return "macOS Keychain access could not be authorized.";
|
|
155940
|
+
}
|
|
155941
|
+
return result.detail ? `macOS Keychain access failed: ${result.detail}` : "macOS Keychain access is unavailable.";
|
|
155942
|
+
}
|
|
155943
|
+
if (process.platform === "linux") {
|
|
155944
|
+
if (!result.moduleAvailable) {
|
|
155945
|
+
return "System keychain support is unavailable in this build.";
|
|
155946
|
+
}
|
|
155947
|
+
if (result.detail?.toLowerCase().includes("secret service")) {
|
|
155948
|
+
return "System keychain is unavailable (no Secret Service daemon or equivalent).";
|
|
155949
|
+
}
|
|
155950
|
+
return result.detail ? `System keychain access failed: ${result.detail}` : "System keychain is unavailable.";
|
|
155951
|
+
}
|
|
155952
|
+
if (process.platform === "win32") {
|
|
155953
|
+
if (!result.moduleAvailable) {
|
|
155954
|
+
return "Windows Credential Manager support is unavailable in this build.";
|
|
155955
|
+
}
|
|
155956
|
+
return result.detail ? `Windows Credential Manager access failed: ${result.detail}` : "Windows Credential Manager is unavailable.";
|
|
155957
|
+
}
|
|
155958
|
+
if (!result.moduleAvailable) {
|
|
155959
|
+
return "Secure OS credential storage is unavailable in this build.";
|
|
155960
|
+
}
|
|
155961
|
+
return result.detail ? `Secure OS credential storage failed: ${result.detail}` : "Secure OS credential storage is unavailable.";
|
|
155962
|
+
}
|
|
156482
155963
|
async function probeKeychain() {
|
|
156483
155964
|
const KeyringEntry = await getKeyringEntryConstructor();
|
|
156484
|
-
if (!KeyringEntry)
|
|
156485
|
-
return false;
|
|
155965
|
+
if (!KeyringEntry) {
|
|
155966
|
+
return { available: false, moduleAvailable: false };
|
|
155967
|
+
}
|
|
156486
155968
|
const testKey = "__wispctl_probe__";
|
|
156487
155969
|
try {
|
|
156488
155970
|
const entry = new KeyringEntry(KEYCHAIN_SERVICE, testKey);
|
|
156489
155971
|
entry.setPassword("1");
|
|
156490
155972
|
entry.deletePassword();
|
|
156491
|
-
return true;
|
|
156492
|
-
} catch {
|
|
156493
|
-
return
|
|
155973
|
+
return { available: true, moduleAvailable: true };
|
|
155974
|
+
} catch (error) {
|
|
155975
|
+
return {
|
|
155976
|
+
available: false,
|
|
155977
|
+
detail: formatProbeError(error),
|
|
155978
|
+
moduleAvailable: true
|
|
155979
|
+
};
|
|
156494
155980
|
}
|
|
156495
155981
|
}
|
|
156496
155982
|
var DEFAULT_DB_PATH = join2(homedir(), ".config", "wispctl", "state.sqlite");
|
|
@@ -156700,17 +156186,8 @@ async function hasDirSession(dbPath) {
|
|
|
156700
156186
|
}
|
|
156701
156187
|
async function authenticateOAuth(handle, options = {}) {
|
|
156702
156188
|
const kv = await openKv(options.dbPath || DEFAULT_DB_PATH);
|
|
156703
|
-
const
|
|
156704
|
-
|
|
156705
|
-
M2.warn("System keychain is unavailable (no Secret Service daemon or equivalent).");
|
|
156706
|
-
const fallback = await ye2({
|
|
156707
|
-
message: "Fall back to storing session tokens unencrypted in SQLite? (On headless systems, prefer --password instead.)",
|
|
156708
|
-
initialValue: false
|
|
156709
|
-
});
|
|
156710
|
-
if (!fallback) {
|
|
156711
|
-
throw new Error("Cannot store session securely. Use --password for app-password authentication.");
|
|
156712
|
-
}
|
|
156713
|
-
}
|
|
156189
|
+
const keychainProbe = await probeKeychain();
|
|
156190
|
+
const useKeychain = keychainProbe.available;
|
|
156714
156191
|
const keyringEntryConstructor2 = useKeychain ? await getKeyringEntryConstructor() : null;
|
|
156715
156192
|
const stateStore = createStateStore(kv);
|
|
156716
156193
|
const sessionStore = createSessionStore(kv, keyringEntryConstructor2);
|
|
@@ -156742,20 +156219,36 @@ async function authenticateOAuth(handle, options = {}) {
|
|
|
156742
156219
|
let redirectUri = `http://${LOOPBACK_HOST}:${oauthPort}/oauth/callback`;
|
|
156743
156220
|
let client = createOAuthClient(redirectUri);
|
|
156744
156221
|
const storedDid = kvGet(kv, dirKey);
|
|
156745
|
-
if (storedDid) {
|
|
156746
|
-
|
|
156747
|
-
|
|
156748
|
-
|
|
156749
|
-
|
|
156750
|
-
|
|
156222
|
+
if (storedDid && options.forceReauth) {
|
|
156223
|
+
kv.del(dirKey);
|
|
156224
|
+
} else if (storedDid) {
|
|
156225
|
+
let canRestore = true;
|
|
156226
|
+
if (handle) {
|
|
156227
|
+
const resolvedDid = await resolveDid(handle);
|
|
156228
|
+
if (resolvedDid && resolvedDid !== storedDid) {
|
|
156229
|
+
emitStatus(options, `Stored session is for ${storedDid}, but ${handle} resolves to ${resolvedDid}. Re-authenticating.`);
|
|
156230
|
+
kv.del(dirKey);
|
|
156231
|
+
canRestore = false;
|
|
156232
|
+
}
|
|
156233
|
+
}
|
|
156234
|
+
if (canRestore) {
|
|
156235
|
+
try {
|
|
156236
|
+
const session2 = await client.restore(storedDid);
|
|
156237
|
+
if (session2) {
|
|
156238
|
+
emitStatus(options, `Restored session for ${storedDid}`);
|
|
156239
|
+
return { agent: new import_api.Agent(session2), did: storedDid };
|
|
156240
|
+
}
|
|
156241
|
+
} catch {
|
|
156242
|
+
kv.del(dirKey);
|
|
156751
156243
|
}
|
|
156752
|
-
} catch {
|
|
156753
|
-
kv.del(dirKey);
|
|
156754
156244
|
}
|
|
156755
156245
|
}
|
|
156756
156246
|
if (!handle) {
|
|
156757
156247
|
throw new Error("No active session for this directory. Run `wispctl login <handle>` first.");
|
|
156758
156248
|
}
|
|
156249
|
+
if (!useKeychain) {
|
|
156250
|
+
M2.warn(`Session tokens will be stored unencrypted in SQLite: ${describeUnavailableKeychain(keychainProbe)} Use --password for headless app-password auth.`);
|
|
156251
|
+
}
|
|
156759
156252
|
const preferredPort = oauthPort;
|
|
156760
156253
|
const portSelection = await resolveLoopbackPort(preferredPort, LOOPBACK_HOST);
|
|
156761
156254
|
if (portSelection.usedFallback) {
|
|
@@ -159328,25 +158821,69 @@ async function getKeyringEntryConstructor2() {
|
|
|
159328
158821
|
return keyringEntryConstructor2;
|
|
159329
158822
|
}
|
|
159330
158823
|
try {
|
|
159331
|
-
const module = await
|
|
158824
|
+
const module = await import("@napi-rs/keyring");
|
|
159332
158825
|
keyringEntryConstructor2 = module.Entry;
|
|
159333
158826
|
} catch {
|
|
159334
158827
|
keyringEntryConstructor2 = null;
|
|
159335
158828
|
}
|
|
159336
158829
|
return keyringEntryConstructor2;
|
|
159337
158830
|
}
|
|
158831
|
+
function formatProbeError2(error) {
|
|
158832
|
+
if (error instanceof Error) {
|
|
158833
|
+
return error.message;
|
|
158834
|
+
}
|
|
158835
|
+
if (typeof error === "string") {
|
|
158836
|
+
return error;
|
|
158837
|
+
}
|
|
158838
|
+
return;
|
|
158839
|
+
}
|
|
158840
|
+
function describeUnavailableKeychain2(result) {
|
|
158841
|
+
if (process.platform === "darwin") {
|
|
158842
|
+
if (!result.moduleAvailable) {
|
|
158843
|
+
return "macOS Keychain support is unavailable in this build.";
|
|
158844
|
+
}
|
|
158845
|
+
if (result.detail?.toLowerCase().includes("authorization")) {
|
|
158846
|
+
return "macOS Keychain access could not be authorized.";
|
|
158847
|
+
}
|
|
158848
|
+
return result.detail ? `macOS Keychain access failed: ${result.detail}` : "macOS Keychain access is unavailable.";
|
|
158849
|
+
}
|
|
158850
|
+
if (process.platform === "linux") {
|
|
158851
|
+
if (!result.moduleAvailable) {
|
|
158852
|
+
return "System keychain support is unavailable in this build.";
|
|
158853
|
+
}
|
|
158854
|
+
if (result.detail?.toLowerCase().includes("secret service")) {
|
|
158855
|
+
return "System keychain is unavailable (no Secret Service daemon or equivalent).";
|
|
158856
|
+
}
|
|
158857
|
+
return result.detail ? `System keychain access failed: ${result.detail}` : "System keychain is unavailable.";
|
|
158858
|
+
}
|
|
158859
|
+
if (process.platform === "win32") {
|
|
158860
|
+
if (!result.moduleAvailable) {
|
|
158861
|
+
return "Windows Credential Manager support is unavailable in this build.";
|
|
158862
|
+
}
|
|
158863
|
+
return result.detail ? `Windows Credential Manager access failed: ${result.detail}` : "Windows Credential Manager is unavailable.";
|
|
158864
|
+
}
|
|
158865
|
+
if (!result.moduleAvailable) {
|
|
158866
|
+
return "Secure OS credential storage is unavailable in this build.";
|
|
158867
|
+
}
|
|
158868
|
+
return result.detail ? `Secure OS credential storage failed: ${result.detail}` : "Secure OS credential storage is unavailable.";
|
|
158869
|
+
}
|
|
159338
158870
|
async function probeKeychain2() {
|
|
159339
158871
|
const KeyringEntry = await getKeyringEntryConstructor2();
|
|
159340
|
-
if (!KeyringEntry)
|
|
159341
|
-
return false;
|
|
158872
|
+
if (!KeyringEntry) {
|
|
158873
|
+
return { available: false, moduleAvailable: false };
|
|
158874
|
+
}
|
|
159342
158875
|
const testKey = "__wispctl_probe__";
|
|
159343
158876
|
try {
|
|
159344
158877
|
const entry = new KeyringEntry(KEYCHAIN_SERVICE2, testKey);
|
|
159345
158878
|
entry.setPassword("1");
|
|
159346
158879
|
entry.deletePassword();
|
|
159347
|
-
return true;
|
|
159348
|
-
} catch {
|
|
159349
|
-
return
|
|
158880
|
+
return { available: true, moduleAvailable: true };
|
|
158881
|
+
} catch (error) {
|
|
158882
|
+
return {
|
|
158883
|
+
available: false,
|
|
158884
|
+
detail: formatProbeError2(error),
|
|
158885
|
+
moduleAvailable: true
|
|
158886
|
+
};
|
|
159350
158887
|
}
|
|
159351
158888
|
}
|
|
159352
158889
|
var DEFAULT_DB_PATH2 = join7(homedir2(), ".config", "wispctl", "state.sqlite");
|
|
@@ -159556,17 +159093,8 @@ async function hasDirSession2(dbPath) {
|
|
|
159556
159093
|
}
|
|
159557
159094
|
async function authenticateOAuth2(handle, options = {}) {
|
|
159558
159095
|
const kv = await openKv2(options.dbPath || DEFAULT_DB_PATH2);
|
|
159559
|
-
const
|
|
159560
|
-
|
|
159561
|
-
M2.warn("System keychain is unavailable (no Secret Service daemon or equivalent).");
|
|
159562
|
-
const fallback = await ye2({
|
|
159563
|
-
message: "Fall back to storing session tokens unencrypted in SQLite? (On headless systems, prefer --password instead.)",
|
|
159564
|
-
initialValue: false
|
|
159565
|
-
});
|
|
159566
|
-
if (!fallback) {
|
|
159567
|
-
throw new Error("Cannot store session securely. Use --password for app-password authentication.");
|
|
159568
|
-
}
|
|
159569
|
-
}
|
|
159096
|
+
const keychainProbe = await probeKeychain2();
|
|
159097
|
+
const useKeychain = keychainProbe.available;
|
|
159570
159098
|
const keyringEntryConstructor3 = useKeychain ? await getKeyringEntryConstructor2() : null;
|
|
159571
159099
|
const stateStore = createStateStore2(kv);
|
|
159572
159100
|
const sessionStore = createSessionStore2(kv, keyringEntryConstructor3);
|
|
@@ -159598,20 +159126,36 @@ async function authenticateOAuth2(handle, options = {}) {
|
|
|
159598
159126
|
let redirectUri = `http://${LOOPBACK_HOST2}:${oauthPort}/oauth/callback`;
|
|
159599
159127
|
let client = createOAuthClient(redirectUri);
|
|
159600
159128
|
const storedDid = kvGet2(kv, dirKey);
|
|
159601
|
-
if (storedDid) {
|
|
159602
|
-
|
|
159603
|
-
|
|
159604
|
-
|
|
159605
|
-
|
|
159606
|
-
|
|
159129
|
+
if (storedDid && options.forceReauth) {
|
|
159130
|
+
kv.del(dirKey);
|
|
159131
|
+
} else if (storedDid) {
|
|
159132
|
+
let canRestore = true;
|
|
159133
|
+
if (handle) {
|
|
159134
|
+
const resolvedDid = await resolveDid(handle);
|
|
159135
|
+
if (resolvedDid && resolvedDid !== storedDid) {
|
|
159136
|
+
emitStatus2(options, `Stored session is for ${storedDid}, but ${handle} resolves to ${resolvedDid}. Re-authenticating.`);
|
|
159137
|
+
kv.del(dirKey);
|
|
159138
|
+
canRestore = false;
|
|
159139
|
+
}
|
|
159140
|
+
}
|
|
159141
|
+
if (canRestore) {
|
|
159142
|
+
try {
|
|
159143
|
+
const session2 = await client.restore(storedDid);
|
|
159144
|
+
if (session2) {
|
|
159145
|
+
emitStatus2(options, `Restored session for ${storedDid}`);
|
|
159146
|
+
return { agent: new import_api2.Agent(session2), did: storedDid };
|
|
159147
|
+
}
|
|
159148
|
+
} catch {
|
|
159149
|
+
kv.del(dirKey);
|
|
159607
159150
|
}
|
|
159608
|
-
} catch {
|
|
159609
|
-
kv.del(dirKey);
|
|
159610
159151
|
}
|
|
159611
159152
|
}
|
|
159612
159153
|
if (!handle) {
|
|
159613
159154
|
throw new Error("No active session for this directory. Run `wispctl login <handle>` first.");
|
|
159614
159155
|
}
|
|
159156
|
+
if (!useKeychain) {
|
|
159157
|
+
M2.warn(`Session tokens will be stored unencrypted in SQLite: ${describeUnavailableKeychain2(keychainProbe)} Use --password for headless app-password auth.`);
|
|
159158
|
+
}
|
|
159615
159159
|
const preferredPort = oauthPort;
|
|
159616
159160
|
const portSelection = await resolveLoopbackPort2(preferredPort, LOOPBACK_HOST2);
|
|
159617
159161
|
if (portSelection.usedFallback) {
|
|
@@ -160007,7 +159551,7 @@ async function deleteSiteWithSelection(identifier, options) {
|
|
|
160007
159551
|
}
|
|
160008
159552
|
}
|
|
160009
159553
|
}
|
|
160010
|
-
program2.name("wisp-cli").description("CLI for wisp.place - deploy static sites to the AT Protocol").version("1.1.
|
|
159554
|
+
program2.name("wisp-cli").description("CLI for wisp.place - deploy static sites to the AT Protocol").version("1.1.1");
|
|
160011
159555
|
program2.command("deploy [handle]", { isDefault: true }).description("Deploy a static site to wisp.place").option("-p, --path <path>", "Directory to deploy").option("-s, --site <name>", "Site name (defaults to directory name)").option("--directory", "Enable directory listing").option("--spa", "Enable SPA mode (serve index.html for all routes)").option("-c, --concurrency <n>", "Number of concurrent uploads (backs off to 2 on rate limit)", "3").option("--force-gzip", "Force gzip compression for all files regardless of type").option("--password <password>", "App password for headless authentication").option("--db <path>", "OAuth session database path").option("-y, --yes", "Skip confirmation prompts").action(withExit(async (handle, options) => {
|
|
160012
159556
|
let resolvedHandle = handle;
|
|
160013
159557
|
let resolvedPath = options.path;
|
|
@@ -160238,7 +159782,8 @@ program2.command("login <handle>").description("Authenticate and store session f
|
|
|
160238
159782
|
const authSpinner = createSpinner2("Authenticating...").start();
|
|
160239
159783
|
const { did } = await authenticateOAuth2(handle, {
|
|
160240
159784
|
dbPath: options.db,
|
|
160241
|
-
onStatus: bindAuthStatusToSpinner2(authSpinner)
|
|
159785
|
+
onStatus: bindAuthStatusToSpinner2(authSpinner),
|
|
159786
|
+
forceReauth: true
|
|
160242
159787
|
});
|
|
160243
159788
|
authSpinner.succeed(`Authenticated as ${did}`);
|
|
160244
159789
|
}));
|
|
@@ -160251,5 +159796,5 @@ program2.command("logout").description("Clear the stored session for the current
|
|
|
160251
159796
|
});
|
|
160252
159797
|
program2.parse();
|
|
160253
159798
|
|
|
160254
|
-
//# debugId=
|
|
159799
|
+
//# debugId=4D0876B014A40E6364756E2164756E21
|
|
160255
159800
|
//# sourceMappingURL=index.js.map
|