summaryrefslogtreecommitdiff
path: root/node_modules/node-pre-gyp/bin
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-03 02:48:28 -0700
committer8cy <[email protected]>2020-04-03 02:48:28 -0700
commitf9159ea2d994e14180fb02ab562f0119513e67cf (patch)
tree09d14cdf05456567156738b681379d4bccd64e5c /node_modules/node-pre-gyp/bin
parent2020/04/03, 02:42, V1.2.1 (diff)
downloads5nical-f9159ea2d994e14180fb02ab562f0119513e67cf.tar.xz
s5nical-f9159ea2d994e14180fb02ab562f0119513e67cf.zip
2020/04/03, 02:47, V1.2.2
Diffstat (limited to 'node_modules/node-pre-gyp/bin')
-rw-r--r--node_modules/node-pre-gyp/bin/node-pre-gyp134
-rw-r--r--node_modules/node-pre-gyp/bin/node-pre-gyp.cmd2
2 files changed, 0 insertions, 136 deletions
diff --git a/node_modules/node-pre-gyp/bin/node-pre-gyp b/node_modules/node-pre-gyp/bin/node-pre-gyp
deleted file mode 100644
index 737b002..0000000
--- a/node_modules/node-pre-gyp/bin/node-pre-gyp
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/usr/bin/env node
-
-"use strict";
-
-/**
- * Set the title.
- */
-
-process.title = 'node-pre-gyp';
-
-/**
- * Module dependencies.
- */
-
-var node_pre_gyp = require('../');
-var log = require('npmlog');
-
-/**
- * Process and execute the selected commands.
- */
-
-var prog = new node_pre_gyp.Run();
-var completed = false;
-prog.parseArgv(process.argv);
-
-if (prog.todo.length === 0) {
- if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) {
- console.log('v%s', prog.version);
- return process.exit(0);
- } else if (~process.argv.indexOf('-h') || ~process.argv.indexOf('--help')) {
- console.log('%s', prog.usage());
- return process.exit(0);
- }
- console.log('%s', prog.usage());
- return process.exit(1);
-}
-
-// if --no-color is passed
-if (prog.opts && prog.opts.hasOwnProperty('color') && !prog.opts.color) {
- log.disableColor();
-}
-
-log.info('it worked if it ends with', 'ok');
-log.verbose('cli', process.argv);
-log.info('using', process.title + '@%s', prog.version);
-log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch);
-
-
-/**
- * Change dir if -C/--directory was passed.
- */
-
-var dir = prog.opts.directory;
-if (dir) {
- var fs = require('fs');
- try {
- var stat = fs.statSync(dir);
- if (stat.isDirectory()) {
- log.info('chdir', dir);
- process.chdir(dir);
- } else {
- log.warn('chdir', dir + ' is not a directory');
- }
- } catch (e) {
- if (e.code === 'ENOENT') {
- log.warn('chdir', dir + ' is not a directory');
- } else {
- log.warn('chdir', 'error during chdir() "%s"', e.message);
- }
- }
-}
-
-function run () {
- var command = prog.todo.shift();
- if (!command) {
- // done!
- completed = true;
- log.info('ok');
- return;
- }
-
- prog.commands[command.name](command.args, function (err) {
- if (err) {
- log.error(command.name + ' error');
- log.error('stack', err.stack);
- errorMessage();
- log.error('not ok');
- console.log(err.message);
- return process.exit(1);
- }
- var args_array = [].slice.call(arguments, 1);
- if (args_array.length) {
- console.log.apply(console, args_array);
- }
- // now run the next command in the queue
- process.nextTick(run);
- });
-}
-
-process.on('exit', function (code) {
- if (!completed && !code) {
- log.error('Completion callback never invoked!');
- issueMessage();
- process.exit(6);
- }
-});
-
-process.on('uncaughtException', function (err) {
- log.error('UNCAUGHT EXCEPTION');
- log.error('stack', err.stack);
- issueMessage();
- process.exit(7);
-});
-
-function errorMessage () {
- // copied from npm's lib/util/error-handler.js
- var os = require('os');
- log.error('System', os.type() + ' ' + os.release());
- log.error('command', process.argv.map(JSON.stringify).join(' '));
- log.error('cwd', process.cwd());
- log.error('node -v', process.version);
- log.error(process.title+' -v', 'v' + prog.package.version);
-}
-
-function issueMessage () {
- errorMessage();
- log.error('', [ 'This is a bug in `'+process.title+'`.',
- 'Try to update '+process.title+' and file an issue if it does not help:',
- ' <https://github.com/mapbox/'+process.title+'/issues>',
- ].join('\n'));
-}
-
-// start running the given commands!
-run();
diff --git a/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd b/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd
deleted file mode 100644
index 46e14b5..0000000
--- a/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-node "%~dp0\node-pre-gyp" %*