withub-cli 0.2.0 → 0.2.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/README.md CHANGED
@@ -8,7 +8,7 @@ Now supporting multi-chain architecture:
8
8
  The CLI routes commands to the appropriate chain and storage backend based on your configuration.
9
9
 
10
10
  ## Requirements
11
- - Node.js >= 18.
11
+ - Node.js >= 20.
12
12
  - **For Mantle**: A Lighthouse API Key (get one at [Lighthouse Storage](https://lighthouse.storage)).
13
13
  - **For Sui**: Access to a Walrus relay (configured by default).
14
14
 
package/dist/config.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LIT_PLATFORM_PRIVATE_KEY = exports.LIGHTHOUSE_API_KEY = void 0;
4
+ // Obfuscated keys
5
+ const _LIGHTHOUSE_API_KEY_ENCODED = 'YWNhNmRjMzUuM2VkOGJkODBjNTc3NDBiNTk0ZjFjOWQ1YjdiMmQ1OGY=';
6
+ const _LIT_PLATFORM_PRIVATE_KEY_ENCODED = 'MHg2ZmQwYmIyOGYzODRiM2EwYjE1YjE3YzNmMTUzNmI2NTZhZWM5MDgxYjJjNTBkZDFiZmQyMmFlYmY0ZjllMTZl';
7
+ function decode(encoded) {
8
+ return Buffer.from(encoded, 'base64').toString('utf-8');
9
+ }
10
+ exports.LIGHTHOUSE_API_KEY = decode(_LIGHTHOUSE_API_KEY_ENCODED);
11
+ // Platform Wallet for Lit Protocol Capacity Credits (Datil-Test)
12
+ // Address: 0x38eF8Ca6ba8C911C77faf8D74c86a3a0BC7f72a2
13
+ exports.LIT_PLATFORM_PRIVATE_KEY = decode(_LIT_PLATFORM_PRIVATE_KEY_ENCODED);
package/dist/index.js CHANGED
@@ -5,6 +5,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.run = run;
8
+ // Suppress noisy Lit SDK deprecation warnings (written to stderr)
9
+ const originalStderrWrite = process.stderr.write;
10
+ // @ts-ignore
11
+ process.stderr.write = function (chunk, encoding, cb) {
12
+ const str = chunk.toString();
13
+ if (str.includes('deprecated LogLevel is deprecated') ||
14
+ str.includes('LitErrorKind is deprecated')) {
15
+ return false;
16
+ }
17
+ return originalStderrWrite.apply(process.stderr, [chunk, encoding, cb]);
18
+ };
19
+ // Also suppress console.warn just in case
20
+ const originalWarn = console.warn;
21
+ console.warn = (...args) => {
22
+ if (args.length > 0 &&
23
+ typeof args[0] === 'string' &&
24
+ (args[0].includes('deprecated LogLevel is deprecated') ||
25
+ args[0].includes('LitErrorKind is deprecated'))) {
26
+ return;
27
+ }
28
+ originalWarn(...args);
29
+ };
8
30
  const commander_1 = require("commander");
9
31
  const registerCommands_1 = require("./commands/registerCommands");
10
32
  const package_json_1 = __importDefault(require("../package.json"));
@@ -20,22 +42,12 @@ const crypto_1 = __importDefault(require("crypto"));
20
42
  if (!globalThis.crypto) {
21
43
  globalThis.crypto = crypto_1.default;
22
44
  }
23
- // Suppress noisy Lit SDK deprecation warnings
24
- const originalWarn = console.warn;
25
- console.warn = (...args) => {
26
- if (args.length > 0 &&
27
- typeof args[0] === 'string' &&
28
- args[0].includes('deprecated LogLevel is deprecated')) {
29
- return;
30
- }
31
- originalWarn(...args);
32
- };
33
45
  const VERSION = package_json_1.default.version || '0.0.0';
34
46
  async function run(argv = process.argv) {
35
47
  const program = new commander_1.Command();
36
48
  program
37
49
  .name('wit')
38
- .description('wit CLI: single-branch, verifiable, optionally encrypted repo tool backed by Walrus + Sui')
50
+ .description('Wit with Withub: A private, decentralized alternative to Git with GitHub')
39
51
  .version(VERSION);
40
52
  (0, registerCommands_1.registerCommands)(program);
41
53
  const normalized = normalizeArgs(argv.slice());
@@ -26,6 +26,7 @@ let globalConfigLoaded = false;
26
26
  let globalConfigCache = {};
27
27
  const DEFAULT_LIGHTHOUSE_PIN_URL = 'https://api.lighthouse.storage/api/lighthouse/pin';
28
28
  const DEFAULT_CACHE_FILE = 'lighthouse-uploads.json';
29
+ const config_1 = require("../config");
29
30
  function resolveLighthouseApiKey() {
30
31
  loadDotEnvOnce();
31
32
  const envKey = process.env.LIGHTHOUSE_API_KEY || process.env.WIT_LIGHTHOUSE_API_KEY;
@@ -35,7 +36,7 @@ function resolveLighthouseApiKey() {
35
36
  const cfgKey = cfg.lighthouse_api_key || cfg.lighthouseApiKey;
36
37
  if (typeof cfgKey === 'string' && cfgKey.trim().length > 0)
37
38
  return cfgKey;
38
- return null;
39
+ return config_1.LIGHTHOUSE_API_KEY;
39
40
  }
40
41
  function resolveLighthouseGatewayUrl() {
41
42
  loadDotEnvOnce();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "withub-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "wit CLI (Commander + Ink) skeleton",
5
5
  "repository": {
6
6
  "type": "git",