wispctl 1.1.0 → 1.1.1
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 +156 -610
- package/dist/index.js.map +6 -7
- 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 });
|
|
@@ -151516,25 +150978,6 @@ ${import_picocolors3.default.cyan(d3)}
|
|
|
151516
150978
|
`;
|
|
151517
150979
|
}
|
|
151518
150980
|
} }).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
150981
|
var xe2 = (t = "") => {
|
|
151539
150982
|
process.stdout.write(`${import_picocolors3.default.gray(d3)} ${import_picocolors3.default.red(t)}
|
|
151540
150983
|
|
|
@@ -156472,25 +155915,69 @@ async function getKeyringEntryConstructor() {
|
|
|
156472
155915
|
return keyringEntryConstructor;
|
|
156473
155916
|
}
|
|
156474
155917
|
try {
|
|
156475
|
-
const module = await
|
|
155918
|
+
const module = await import("@napi-rs/keyring");
|
|
156476
155919
|
keyringEntryConstructor = module.Entry;
|
|
156477
155920
|
} catch {
|
|
156478
155921
|
keyringEntryConstructor = null;
|
|
156479
155922
|
}
|
|
156480
155923
|
return keyringEntryConstructor;
|
|
156481
155924
|
}
|
|
155925
|
+
function formatProbeError(error) {
|
|
155926
|
+
if (error instanceof Error) {
|
|
155927
|
+
return error.message;
|
|
155928
|
+
}
|
|
155929
|
+
if (typeof error === "string") {
|
|
155930
|
+
return error;
|
|
155931
|
+
}
|
|
155932
|
+
return;
|
|
155933
|
+
}
|
|
155934
|
+
function describeUnavailableKeychain(result) {
|
|
155935
|
+
if (process.platform === "darwin") {
|
|
155936
|
+
if (!result.moduleAvailable) {
|
|
155937
|
+
return "macOS Keychain support is unavailable in this build.";
|
|
155938
|
+
}
|
|
155939
|
+
if (result.detail?.toLowerCase().includes("authorization")) {
|
|
155940
|
+
return "macOS Keychain access could not be authorized.";
|
|
155941
|
+
}
|
|
155942
|
+
return result.detail ? `macOS Keychain access failed: ${result.detail}` : "macOS Keychain access is unavailable.";
|
|
155943
|
+
}
|
|
155944
|
+
if (process.platform === "linux") {
|
|
155945
|
+
if (!result.moduleAvailable) {
|
|
155946
|
+
return "System keychain support is unavailable in this build.";
|
|
155947
|
+
}
|
|
155948
|
+
if (result.detail?.toLowerCase().includes("secret service")) {
|
|
155949
|
+
return "System keychain is unavailable (no Secret Service daemon or equivalent).";
|
|
155950
|
+
}
|
|
155951
|
+
return result.detail ? `System keychain access failed: ${result.detail}` : "System keychain is unavailable.";
|
|
155952
|
+
}
|
|
155953
|
+
if (process.platform === "win32") {
|
|
155954
|
+
if (!result.moduleAvailable) {
|
|
155955
|
+
return "Windows Credential Manager support is unavailable in this build.";
|
|
155956
|
+
}
|
|
155957
|
+
return result.detail ? `Windows Credential Manager access failed: ${result.detail}` : "Windows Credential Manager is unavailable.";
|
|
155958
|
+
}
|
|
155959
|
+
if (!result.moduleAvailable) {
|
|
155960
|
+
return "Secure OS credential storage is unavailable in this build.";
|
|
155961
|
+
}
|
|
155962
|
+
return result.detail ? `Secure OS credential storage failed: ${result.detail}` : "Secure OS credential storage is unavailable.";
|
|
155963
|
+
}
|
|
156482
155964
|
async function probeKeychain() {
|
|
156483
155965
|
const KeyringEntry = await getKeyringEntryConstructor();
|
|
156484
|
-
if (!KeyringEntry)
|
|
156485
|
-
return false;
|
|
155966
|
+
if (!KeyringEntry) {
|
|
155967
|
+
return { available: false, moduleAvailable: false };
|
|
155968
|
+
}
|
|
156486
155969
|
const testKey = "__wispctl_probe__";
|
|
156487
155970
|
try {
|
|
156488
155971
|
const entry = new KeyringEntry(KEYCHAIN_SERVICE, testKey);
|
|
156489
155972
|
entry.setPassword("1");
|
|
156490
155973
|
entry.deletePassword();
|
|
156491
|
-
return true;
|
|
156492
|
-
} catch {
|
|
156493
|
-
return
|
|
155974
|
+
return { available: true, moduleAvailable: true };
|
|
155975
|
+
} catch (error) {
|
|
155976
|
+
return {
|
|
155977
|
+
available: false,
|
|
155978
|
+
detail: formatProbeError(error),
|
|
155979
|
+
moduleAvailable: true
|
|
155980
|
+
};
|
|
156494
155981
|
}
|
|
156495
155982
|
}
|
|
156496
155983
|
var DEFAULT_DB_PATH = join2(homedir(), ".config", "wispctl", "state.sqlite");
|
|
@@ -156700,17 +156187,8 @@ async function hasDirSession(dbPath) {
|
|
|
156700
156187
|
}
|
|
156701
156188
|
async function authenticateOAuth(handle, options = {}) {
|
|
156702
156189
|
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
|
-
}
|
|
156190
|
+
const keychainProbe = await probeKeychain();
|
|
156191
|
+
const useKeychain = keychainProbe.available;
|
|
156714
156192
|
const keyringEntryConstructor2 = useKeychain ? await getKeyringEntryConstructor() : null;
|
|
156715
156193
|
const stateStore = createStateStore(kv);
|
|
156716
156194
|
const sessionStore = createSessionStore(kv, keyringEntryConstructor2);
|
|
@@ -156742,20 +156220,36 @@ async function authenticateOAuth(handle, options = {}) {
|
|
|
156742
156220
|
let redirectUri = `http://${LOOPBACK_HOST}:${oauthPort}/oauth/callback`;
|
|
156743
156221
|
let client = createOAuthClient(redirectUri);
|
|
156744
156222
|
const storedDid = kvGet(kv, dirKey);
|
|
156745
|
-
if (storedDid) {
|
|
156746
|
-
|
|
156747
|
-
|
|
156748
|
-
|
|
156749
|
-
|
|
156750
|
-
|
|
156223
|
+
if (storedDid && options.forceReauth) {
|
|
156224
|
+
kv.del(dirKey);
|
|
156225
|
+
} else if (storedDid) {
|
|
156226
|
+
let canRestore = true;
|
|
156227
|
+
if (handle) {
|
|
156228
|
+
const resolvedDid = await resolveDid(handle);
|
|
156229
|
+
if (resolvedDid && resolvedDid !== storedDid) {
|
|
156230
|
+
emitStatus(options, `Stored session is for ${storedDid}, but ${handle} resolves to ${resolvedDid}. Re-authenticating.`);
|
|
156231
|
+
kv.del(dirKey);
|
|
156232
|
+
canRestore = false;
|
|
156233
|
+
}
|
|
156234
|
+
}
|
|
156235
|
+
if (canRestore) {
|
|
156236
|
+
try {
|
|
156237
|
+
const session2 = await client.restore(storedDid);
|
|
156238
|
+
if (session2) {
|
|
156239
|
+
emitStatus(options, `Restored session for ${storedDid}`);
|
|
156240
|
+
return { agent: new import_api.Agent(session2), did: storedDid };
|
|
156241
|
+
}
|
|
156242
|
+
} catch {
|
|
156243
|
+
kv.del(dirKey);
|
|
156751
156244
|
}
|
|
156752
|
-
} catch {
|
|
156753
|
-
kv.del(dirKey);
|
|
156754
156245
|
}
|
|
156755
156246
|
}
|
|
156756
156247
|
if (!handle) {
|
|
156757
156248
|
throw new Error("No active session for this directory. Run `wispctl login <handle>` first.");
|
|
156758
156249
|
}
|
|
156250
|
+
if (!useKeychain) {
|
|
156251
|
+
M2.warn(`Session tokens will be stored unencrypted in SQLite: ${describeUnavailableKeychain(keychainProbe)} Use --password for headless app-password auth.`);
|
|
156252
|
+
}
|
|
156759
156253
|
const preferredPort = oauthPort;
|
|
156760
156254
|
const portSelection = await resolveLoopbackPort(preferredPort, LOOPBACK_HOST);
|
|
156761
156255
|
if (portSelection.usedFallback) {
|
|
@@ -159328,25 +158822,69 @@ async function getKeyringEntryConstructor2() {
|
|
|
159328
158822
|
return keyringEntryConstructor2;
|
|
159329
158823
|
}
|
|
159330
158824
|
try {
|
|
159331
|
-
const module = await
|
|
158825
|
+
const module = await import("@napi-rs/keyring");
|
|
159332
158826
|
keyringEntryConstructor2 = module.Entry;
|
|
159333
158827
|
} catch {
|
|
159334
158828
|
keyringEntryConstructor2 = null;
|
|
159335
158829
|
}
|
|
159336
158830
|
return keyringEntryConstructor2;
|
|
159337
158831
|
}
|
|
158832
|
+
function formatProbeError2(error) {
|
|
158833
|
+
if (error instanceof Error) {
|
|
158834
|
+
return error.message;
|
|
158835
|
+
}
|
|
158836
|
+
if (typeof error === "string") {
|
|
158837
|
+
return error;
|
|
158838
|
+
}
|
|
158839
|
+
return;
|
|
158840
|
+
}
|
|
158841
|
+
function describeUnavailableKeychain2(result) {
|
|
158842
|
+
if (process.platform === "darwin") {
|
|
158843
|
+
if (!result.moduleAvailable) {
|
|
158844
|
+
return "macOS Keychain support is unavailable in this build.";
|
|
158845
|
+
}
|
|
158846
|
+
if (result.detail?.toLowerCase().includes("authorization")) {
|
|
158847
|
+
return "macOS Keychain access could not be authorized.";
|
|
158848
|
+
}
|
|
158849
|
+
return result.detail ? `macOS Keychain access failed: ${result.detail}` : "macOS Keychain access is unavailable.";
|
|
158850
|
+
}
|
|
158851
|
+
if (process.platform === "linux") {
|
|
158852
|
+
if (!result.moduleAvailable) {
|
|
158853
|
+
return "System keychain support is unavailable in this build.";
|
|
158854
|
+
}
|
|
158855
|
+
if (result.detail?.toLowerCase().includes("secret service")) {
|
|
158856
|
+
return "System keychain is unavailable (no Secret Service daemon or equivalent).";
|
|
158857
|
+
}
|
|
158858
|
+
return result.detail ? `System keychain access failed: ${result.detail}` : "System keychain is unavailable.";
|
|
158859
|
+
}
|
|
158860
|
+
if (process.platform === "win32") {
|
|
158861
|
+
if (!result.moduleAvailable) {
|
|
158862
|
+
return "Windows Credential Manager support is unavailable in this build.";
|
|
158863
|
+
}
|
|
158864
|
+
return result.detail ? `Windows Credential Manager access failed: ${result.detail}` : "Windows Credential Manager is unavailable.";
|
|
158865
|
+
}
|
|
158866
|
+
if (!result.moduleAvailable) {
|
|
158867
|
+
return "Secure OS credential storage is unavailable in this build.";
|
|
158868
|
+
}
|
|
158869
|
+
return result.detail ? `Secure OS credential storage failed: ${result.detail}` : "Secure OS credential storage is unavailable.";
|
|
158870
|
+
}
|
|
159338
158871
|
async function probeKeychain2() {
|
|
159339
158872
|
const KeyringEntry = await getKeyringEntryConstructor2();
|
|
159340
|
-
if (!KeyringEntry)
|
|
159341
|
-
return false;
|
|
158873
|
+
if (!KeyringEntry) {
|
|
158874
|
+
return { available: false, moduleAvailable: false };
|
|
158875
|
+
}
|
|
159342
158876
|
const testKey = "__wispctl_probe__";
|
|
159343
158877
|
try {
|
|
159344
158878
|
const entry = new KeyringEntry(KEYCHAIN_SERVICE2, testKey);
|
|
159345
158879
|
entry.setPassword("1");
|
|
159346
158880
|
entry.deletePassword();
|
|
159347
|
-
return true;
|
|
159348
|
-
} catch {
|
|
159349
|
-
return
|
|
158881
|
+
return { available: true, moduleAvailable: true };
|
|
158882
|
+
} catch (error) {
|
|
158883
|
+
return {
|
|
158884
|
+
available: false,
|
|
158885
|
+
detail: formatProbeError2(error),
|
|
158886
|
+
moduleAvailable: true
|
|
158887
|
+
};
|
|
159350
158888
|
}
|
|
159351
158889
|
}
|
|
159352
158890
|
var DEFAULT_DB_PATH2 = join7(homedir2(), ".config", "wispctl", "state.sqlite");
|
|
@@ -159556,17 +159094,8 @@ async function hasDirSession2(dbPath) {
|
|
|
159556
159094
|
}
|
|
159557
159095
|
async function authenticateOAuth2(handle, options = {}) {
|
|
159558
159096
|
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
|
-
}
|
|
159097
|
+
const keychainProbe = await probeKeychain2();
|
|
159098
|
+
const useKeychain = keychainProbe.available;
|
|
159570
159099
|
const keyringEntryConstructor3 = useKeychain ? await getKeyringEntryConstructor2() : null;
|
|
159571
159100
|
const stateStore = createStateStore2(kv);
|
|
159572
159101
|
const sessionStore = createSessionStore2(kv, keyringEntryConstructor3);
|
|
@@ -159598,20 +159127,36 @@ async function authenticateOAuth2(handle, options = {}) {
|
|
|
159598
159127
|
let redirectUri = `http://${LOOPBACK_HOST2}:${oauthPort}/oauth/callback`;
|
|
159599
159128
|
let client = createOAuthClient(redirectUri);
|
|
159600
159129
|
const storedDid = kvGet2(kv, dirKey);
|
|
159601
|
-
if (storedDid) {
|
|
159602
|
-
|
|
159603
|
-
|
|
159604
|
-
|
|
159605
|
-
|
|
159606
|
-
|
|
159130
|
+
if (storedDid && options.forceReauth) {
|
|
159131
|
+
kv.del(dirKey);
|
|
159132
|
+
} else if (storedDid) {
|
|
159133
|
+
let canRestore = true;
|
|
159134
|
+
if (handle) {
|
|
159135
|
+
const resolvedDid = await resolveDid(handle);
|
|
159136
|
+
if (resolvedDid && resolvedDid !== storedDid) {
|
|
159137
|
+
emitStatus2(options, `Stored session is for ${storedDid}, but ${handle} resolves to ${resolvedDid}. Re-authenticating.`);
|
|
159138
|
+
kv.del(dirKey);
|
|
159139
|
+
canRestore = false;
|
|
159140
|
+
}
|
|
159141
|
+
}
|
|
159142
|
+
if (canRestore) {
|
|
159143
|
+
try {
|
|
159144
|
+
const session2 = await client.restore(storedDid);
|
|
159145
|
+
if (session2) {
|
|
159146
|
+
emitStatus2(options, `Restored session for ${storedDid}`);
|
|
159147
|
+
return { agent: new import_api2.Agent(session2), did: storedDid };
|
|
159148
|
+
}
|
|
159149
|
+
} catch {
|
|
159150
|
+
kv.del(dirKey);
|
|
159607
159151
|
}
|
|
159608
|
-
} catch {
|
|
159609
|
-
kv.del(dirKey);
|
|
159610
159152
|
}
|
|
159611
159153
|
}
|
|
159612
159154
|
if (!handle) {
|
|
159613
159155
|
throw new Error("No active session for this directory. Run `wispctl login <handle>` first.");
|
|
159614
159156
|
}
|
|
159157
|
+
if (!useKeychain) {
|
|
159158
|
+
M2.warn(`Session tokens will be stored unencrypted in SQLite: ${describeUnavailableKeychain2(keychainProbe)} Use --password for headless app-password auth.`);
|
|
159159
|
+
}
|
|
159615
159160
|
const preferredPort = oauthPort;
|
|
159616
159161
|
const portSelection = await resolveLoopbackPort2(preferredPort, LOOPBACK_HOST2);
|
|
159617
159162
|
if (portSelection.usedFallback) {
|
|
@@ -160007,7 +159552,7 @@ async function deleteSiteWithSelection(identifier, options) {
|
|
|
160007
159552
|
}
|
|
160008
159553
|
}
|
|
160009
159554
|
}
|
|
160010
|
-
program2.name("wisp-cli").description("CLI for wisp.place - deploy static sites to the AT Protocol").version("1.1.
|
|
159555
|
+
program2.name("wisp-cli").description("CLI for wisp.place - deploy static sites to the AT Protocol").version("1.1.1");
|
|
160011
159556
|
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
159557
|
let resolvedHandle = handle;
|
|
160013
159558
|
let resolvedPath = options.path;
|
|
@@ -160238,7 +159783,8 @@ program2.command("login <handle>").description("Authenticate and store session f
|
|
|
160238
159783
|
const authSpinner = createSpinner2("Authenticating...").start();
|
|
160239
159784
|
const { did } = await authenticateOAuth2(handle, {
|
|
160240
159785
|
dbPath: options.db,
|
|
160241
|
-
onStatus: bindAuthStatusToSpinner2(authSpinner)
|
|
159786
|
+
onStatus: bindAuthStatusToSpinner2(authSpinner),
|
|
159787
|
+
forceReauth: true
|
|
160242
159788
|
});
|
|
160243
159789
|
authSpinner.succeed(`Authenticated as ${did}`);
|
|
160244
159790
|
}));
|
|
@@ -160251,5 +159797,5 @@ program2.command("logout").description("Clear the stored session for the current
|
|
|
160251
159797
|
});
|
|
160252
159798
|
program2.parse();
|
|
160253
159799
|
|
|
160254
|
-
//# debugId=
|
|
159800
|
+
//# debugId=FB106F94312419FA64756E2164756E21
|
|
160255
159801
|
//# sourceMappingURL=index.js.map
|