Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ updateNotifier({
const prompt = require('prompt');
const logger = require('./src/logger');
const {calculateTotalSteps, androidBuildSteps, previewSteps} = require('./src/custom-logger/steps');
const {overallProgressBar} = require('./src/custom-logger/progress-bar')
const {overallProgressBar} = require('./src/custom-logger/progress-bar');
const { audit } = require('./src/audit');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing file src/audit

const { snyk } = require('./src/snyk');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing file src/synk

const taskLogger = require('./src/custom-logger/task-logger').spinnerBar;

console.log("wm = reactnative-cli version: ", pkg.version);

global.rootDir = process.env.WM_REACTNATIVE_CLI || `${os.homedir()}/.wm-reactnative-cli`;
global.localStorage = new LocalStorage(`${global.rootDir}/.store`);
// src is the web react native project zip
Expand Down Expand Up @@ -376,5 +380,25 @@ const args = require('yargs')
overallProgressBar.setTotal(totalCount);
sync(args.previewUrl, args.clean, args.useProxy);
})
.command('snyk [src]', '', yargs => {
yargs.positional('src', {
describe: 'path of rn project',
default: './',
type: 'string',
normalize: true
})
}, (args)=> {
snyk(args);
})
.command('audit [src]', '', yargs => {
yargs.positional('src', {
describe: 'path of rn project',
default: './',
type: 'string',
normalize: true
})
}, (args)=> {
audit(args);
})
.help('h')
.alias('h', 'help').argv;
Loading