Skip to content

Commit

Permalink
fix: latest deps; pipe warnings to debug (#117)
Browse files Browse the repository at this point in the history
* fix: pipe warnings to log.

* fix: use latest echo/sdk

* fix typo.
  • Loading branch information
egorgripasov committed Dec 18, 2020
1 parent a5183b9 commit ffd7e83
Show file tree
Hide file tree
Showing 6 changed files with 311 additions and 399 deletions.
4 changes: 2 additions & 2 deletions packages/cli-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"@dxos/botkit": "2.7.41-alpha.0",
"@dxos/botkit-client": "2.7.41-alpha.0",
"@dxos/botkit": "2.7.44",
"@dxos/botkit-client": "2.7.44",
"@dxos/cli-core": "^2.0.32-alpha.0",
"@dxos/config": "^1.0.0-beta.67",
"@dxos/crypto": "^1.0.0-beta.1",
Expand Down
4 changes: 3 additions & 1 deletion packages/cli-core/src/cli-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const COMMANDS_PERMIT_NO_PROFILE = [
'services'
];

const { log, logError } = getLoggers();
const { log, debugLog, logError } = getLoggers();

/**
* Provides command executor in form of CLI extension.
Expand All @@ -43,6 +43,8 @@ const getRunnableExtension = ({ modules, getModules, version, options = {} }) =>
*/
const getRunnable = ({ modules, getModules, version, init, destroy, options = {} }) => {
return async () => {
// Pipe warnings to logs.
console.warn = debugLog;
loadCerts();

const argv = process.argv.slice(2);
Expand Down
1 change: 1 addition & 0 deletions packages/cli-core/src/util/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const getLoggers = (name = CLI_DEBUG_NAMESPACE) => {

return {
log,
debugLog,
logError: logErrorWithDebug
};
};
4 changes: 2 additions & 2 deletions packages/cli-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"dependencies": {
"@babel/runtime": "^7.0.0",
"@dxos/cli-core": "^2.0.32-alpha.0",
"@dxos/client": "2.7.41-alpha.0",
"@dxos/client": "2.7.44",
"@dxos/credentials": "2.1.10-beta.0",
"@dxos/crypto": "^1.0.0-beta.1",
"@dxos/debug": "^1.0.0-beta.67",
"@dxos/echo-db": "2.6.14-alpha.0",
"@dxos/echo-db": "2.6.17",
"@dxos/random-access-multi-storage": "1.1.0-beta.7",
"assert": "^2.0.0",
"js-yaml": "^3.13.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import { ExtensionModule } from './modules/extension';
import knownExtensionList from '../known-extensions.yml';
import { listInstalled } from './extensions';

const knownExtensions = yaml.load(knownExtensionList);

const { logError } = getLoggers();

const knownExtensions = yaml.load(knownExtensionList);

const pkg = readPkgUp.sync({ cwd: __dirname });

const WIRE_CLI_BASE_COMMAND = 'dx';
Expand Down

0 comments on commit ffd7e83

Please sign in to comment.