{"size": 917, "ext": "js", "max_stars_repo_path": "bin/npm-cross-link-update-all.js", "max_stars_repo_name": "medikoo/npm-cross-link", "max_stars_repo_stars_event_min_datetime": "2018-11-09T14:18:18.000Z", "max_stars_repo_stars_event_max_datetime": "2021-05-05T16:25:13.000Z", "max_issues_repo_path": "bin/npm-cross-link-update-all.js", "max_issues_repo_name": "medikoo/npm-cross-link", "max_issues_repo_issues_event_min_datetime": "2019-02-21T13:36:32.000Z", "max_issues_repo_issues_event_max_datetime": "2020-09-15T10:32:02.000Z", "max_forks_repo_path": "bin/npm-cross-link-update-all.js", "max_forks_repo_name": "medikoo/npm-cross-link", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 19, "max_issues_count": 14, "max_forks_count": null, "avg_line_length": 21.8333333333, "max_line_length": 87, "alphanum_fraction": 0.6423118866}
#!/usr/bin/env node

"use strict";

require("essentials");
require("fs2/descriptors-handler")();

require("log-node")({ defaultNamespace: "npm-cross-link" });

const meta = require("../package");

const argv = require("minimist")(process.argv.slice(2), { boolean: ["pull", "push"] });

const usage = `npm-cross-link-update-all v${ meta.version }

Usage: npm-cross-link-update-all [-h | --help] [--no-pull] [--push]

Ensures all packages in npm packages folder are properly installed and up to date

Options:

    --pull      Pull changes from remote
    --push      Push committed changes to remote
    --help,            -h  Show this message

`;

if (argv.h || argv.help) {
	process.stdout.write(usage);
	return;
}

if (argv.v || argv.version) {
	process.stdout.write(`${ meta.version }\n`);
	return;
}

require("../lib/private/cli")("update-all", null, {
	pull: argv.pull !== false,
	push: argv.push !== false
});
