Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cafe-tui

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cafe-tui - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

38

dist/commands/proxy.js

@@ -29,3 +29,4 @@ "use strict";

alias: 'h',
description: 'Hostname of the proxy, required for Bzz.link'
description: 'Hostname of the proxy, required for Bzz.link',
default: 'bzz-link.local'
})

@@ -45,2 +46,15 @@ .withOption({

.withOption({
key: 'reupload',
type: 'boolean',
alias: 'r',
description: 'Enables periodical content reupload'
})
.withOption({
key: 'reupload-interval-ms',
type: 'number',
alias: 'i',
description: 'Reupload interval in milliseconds',
default: cafe_utility_1.Dates.minutes(2)
})
.withOption({
key: 'all',

@@ -51,2 +65,8 @@ type: 'boolean',

})
.withOption({
key: 'debug',
type: 'boolean',
alias: 'd',
description: 'Enables debug log level'
})
.withFn((context) => __awaiter(this, void 0, void 0, function* () {

@@ -57,10 +77,5 @@ const location = (0, utility_1.requireEnv)('CAFE_CLI_PROJECT_PROXY');

const cid = context.options['cid'] || context.options['all'];
const reupload = context.options['reupload'] || context.options['all'];
const stampManagement = context.options['stamp-management'] || context.options['all'];
if (ens && !hostname) {
throw new Error('Hostname is required for ENS');
}
if (cid && !hostname) {
throw new Error('Hostname is required for CID');
}
const env = process.env;
const env = { PATH: cafe_utility_1.Types.asString(process.env.PATH) };
if (stampManagement) {

@@ -80,2 +95,9 @@ env.POSTAGE_DEPTH = '22';

}
if (reupload) {
env.REUPLOAD_PERIOD = cafe_utility_1.Types.asNumber(context.options['reupload-interval-ms']).toString();
}
if (context.options['debug']) {
env.LOG_LEVEL = 'debug';
}
console.log('Starting with env:', env);
cafe_utility_1.System.runProcess('npm', ['start'], { cwd: location, env }, x => process.stdout.write(x.toString()), x => process.stderr.write(x.toString()));

@@ -82,0 +104,0 @@ })));

{
"name": "cafe-tui",
"version": "0.7.0",
"version": "0.8.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

import { Command, Parser } from 'cafe-args'
import { System, Types } from 'cafe-utility'
import { Dates, System, Types } from 'cafe-utility'
import { requireEnv } from '../utility'

@@ -19,3 +19,4 @@

alias: 'h',
description: 'Hostname of the proxy, required for Bzz.link'
description: 'Hostname of the proxy, required for Bzz.link',
default: 'bzz-link.local'
})

@@ -35,2 +36,15 @@ .withOption({

.withOption({
key: 'reupload',
type: 'boolean',
alias: 'r',
description: 'Enables periodical content reupload'
})
.withOption({
key: 'reupload-interval-ms',
type: 'number',
alias: 'i',
description: 'Reupload interval in milliseconds',
default: Dates.minutes(2)
})
.withOption({
key: 'all',

@@ -41,2 +55,8 @@ type: 'boolean',

})
.withOption({
key: 'debug',
type: 'boolean',
alias: 'd',
description: 'Enables debug log level'
})
.withFn(async context => {

@@ -47,10 +67,5 @@ const location = requireEnv('CAFE_CLI_PROJECT_PROXY')

const cid = context.options['cid'] || context.options['all']
const reupload = context.options['reupload'] || context.options['all']
const stampManagement = context.options['stamp-management'] || context.options['all']
if (ens && !hostname) {
throw new Error('Hostname is required for ENS')
}
if (cid && !hostname) {
throw new Error('Hostname is required for CID')
}
const env = process.env
const env: Record<string, string> = { PATH: Types.asString(process.env.PATH) }
if (stampManagement) {

@@ -70,2 +85,9 @@ env.POSTAGE_DEPTH = '22'

}
if (reupload) {
env.REUPLOAD_PERIOD = Types.asNumber(context.options['reupload-interval-ms']).toString()
}
if (context.options['debug']) {
env.LOG_LEVEL = 'debug'
}
console.log('Starting with env:', env)
System.runProcess(

@@ -72,0 +94,0 @@ 'npm',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc