shogun-core 3.1.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -98491,7 +98491,7 @@ module.exports = function whichTypedArray(value) {
|
|
|
98491
98491
|
/*!****************************************!*\
|
|
98492
98492
|
!*** ./ship/examples/messenger-cli.ts ***!
|
|
98493
98493
|
\****************************************/
|
|
98494
|
-
/***/ (
|
|
98494
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
98495
98495
|
|
|
98496
98496
|
"use strict";
|
|
98497
98497
|
/* provided dependency */ var process = __webpack_require__(/*! process/browser */ "./node_modules/process/browser.js");
|
|
@@ -98504,43 +98504,18 @@ module.exports = function whichTypedArray(value) {
|
|
|
98504
98504
|
* End-to-end encrypted decentralized chat
|
|
98505
98505
|
* Simple and functional CLI interface
|
|
98506
98506
|
*/
|
|
98507
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
98508
|
-
if (k2 === undefined) k2 = k;
|
|
98509
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
98510
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
98511
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
98512
|
-
}
|
|
98513
|
-
Object.defineProperty(o, k2, desc);
|
|
98514
|
-
}) : (function(o, m, k, k2) {
|
|
98515
|
-
if (k2 === undefined) k2 = k;
|
|
98516
|
-
o[k2] = m[k];
|
|
98517
|
-
}));
|
|
98518
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
98519
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
98520
|
-
}) : function(o, v) {
|
|
98521
|
-
o["default"] = v;
|
|
98522
|
-
});
|
|
98523
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
98524
|
-
var ownKeys = function(o) {
|
|
98525
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
98526
|
-
var ar = [];
|
|
98527
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
98528
|
-
return ar;
|
|
98529
|
-
};
|
|
98530
|
-
return ownKeys(o);
|
|
98531
|
-
};
|
|
98532
|
-
return function (mod) {
|
|
98533
|
-
if (mod && mod.__esModule) return mod;
|
|
98534
|
-
var result = {};
|
|
98535
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
98536
|
-
__setModuleDefault(result, mod);
|
|
98537
|
-
return result;
|
|
98538
|
-
};
|
|
98539
|
-
})();
|
|
98540
98507
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
98541
98508
|
exports.MessengerCLI = void 0;
|
|
98542
98509
|
const SHIP_01_1 = __webpack_require__(/*! ../implementation/SHIP_01 */ "./ship/implementation/SHIP_01.ts");
|
|
98543
|
-
|
|
98510
|
+
// Only import readline in Node.js environment
|
|
98511
|
+
let readline;
|
|
98512
|
+
try {
|
|
98513
|
+
if (false) // removed by dead control flow
|
|
98514
|
+
{}
|
|
98515
|
+
}
|
|
98516
|
+
catch (e) {
|
|
98517
|
+
// Browser environment - readline not available
|
|
98518
|
+
}
|
|
98544
98519
|
// ============================================================================
|
|
98545
98520
|
// COLORS
|
|
98546
98521
|
// ============================================================================
|
|
@@ -98567,6 +98542,7 @@ class MessengerCLI {
|
|
|
98567
98542
|
this.recipient = "";
|
|
98568
98543
|
this.derivedAddress = "";
|
|
98569
98544
|
this.isAuthenticated = false;
|
|
98545
|
+
// Initialize app in all environments (needed for TypeScript)
|
|
98570
98546
|
this.app = new SHIP_01_1.SHIP_01({
|
|
98571
98547
|
gunOptions: {
|
|
98572
98548
|
peers: [
|
|
@@ -98581,12 +98557,15 @@ class MessengerCLI {
|
|
|
98581
98557
|
axe: false,
|
|
98582
98558
|
},
|
|
98583
98559
|
});
|
|
98584
|
-
|
|
98585
|
-
|
|
98586
|
-
|
|
98587
|
-
|
|
98588
|
-
}
|
|
98589
|
-
|
|
98560
|
+
// Don't initialize readline in browser environment
|
|
98561
|
+
if (true) {
|
|
98562
|
+
console.warn('MessengerCLI is designed for Node.js CLI usage only');
|
|
98563
|
+
return;
|
|
98564
|
+
}
|
|
98565
|
+
// removed by dead control flow
|
|
98566
|
+
|
|
98567
|
+
// removed by dead control flow
|
|
98568
|
+
|
|
98590
98569
|
}
|
|
98591
98570
|
// ========================================================================
|
|
98592
98571
|
// SETUP
|
|
@@ -104325,6 +104304,8 @@ __exportStar(__webpack_require__(/*! ./interfaces/shogun */ "./src/interfaces/sh
|
|
|
104325
104304
|
__exportStar(__webpack_require__(/*! ./config/simplified-config */ "./src/config/simplified-config.ts"), exports);
|
|
104326
104305
|
var SHIP_01_1 = __webpack_require__(/*! ../ship/implementation/SHIP_01 */ "./ship/implementation/SHIP_01.ts");
|
|
104327
104306
|
Object.defineProperty(exports, "SHIP_01", ({ enumerable: true, get: function () { return SHIP_01_1.SHIP_01; } }));
|
|
104307
|
+
// Export MessengerCLI only in Node.js environment (not browser)
|
|
104308
|
+
// This prevents "readline is not a function" errors in browser builds
|
|
104328
104309
|
var messenger_cli_1 = __webpack_require__(/*! ../ship/examples/messenger-cli */ "./ship/examples/messenger-cli.ts");
|
|
104329
104310
|
Object.defineProperty(exports, "MessengerCLI", ({ enumerable: true, get: function () { return messenger_cli_1.MessengerCLI; } }));
|
|
104330
104311
|
|
|
@@ -111022,16 +111003,6 @@ function generateDeterministicPassword(salt) {
|
|
|
111022
111003
|
|
|
111023
111004
|
/***/ }),
|
|
111024
111005
|
|
|
111025
|
-
/***/ "?587a":
|
|
111026
|
-
/*!**************************!*\
|
|
111027
|
-
!*** readline (ignored) ***!
|
|
111028
|
-
\**************************/
|
|
111029
|
-
/***/ (() => {
|
|
111030
|
-
|
|
111031
|
-
/* (ignored) */
|
|
111032
|
-
|
|
111033
|
-
/***/ }),
|
|
111034
|
-
|
|
111035
111006
|
/***/ "?593c":
|
|
111036
111007
|
/*!**********************!*\
|
|
111037
111008
|
!*** util (ignored) ***!
|