New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

actbase-cli

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

actbase-cli - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

117

dist/codepush.js

@@ -15,2 +15,6 @@ "use strict";

const cliSelect = require('cli-select');
const chalk = require('chalk');
if (!fs.existsSync('./package.json')) {

@@ -59,3 +63,6 @@ console.error('Not found package.json');

}
} catch (e) {}
} catch (e) {
console.error(e);
return false;
}

@@ -93,3 +100,6 @@ const podfile = yield (0, _utils.readFile)('./ios/Podfile');

}
} catch (e) {}
} catch (e) {
console.error(e);
return false;
}

@@ -147,3 +157,6 @@ let applied = false;

}
} catch (e) {} //
} catch (e) {
console.error(e);
return false;
} //

@@ -218,3 +231,3 @@

function () {
var _ref5 = _asyncToGenerator(function* () {
var _ref5 = _asyncToGenerator(function* (file) {
console.log("Initalized to Codepush");

@@ -235,3 +248,3 @@

return function install() {
return function install(_x3) {
return _ref5.apply(this, arguments);

@@ -244,27 +257,81 @@ };

function () {
var _ref6 = _asyncToGenerator(function* (pkgs) {
var _ref6 = _asyncToGenerator(function* (pkgs, argv) {
var _file$actbase;
const file = getPackageJson();
const file = yield (0, _utils.getPackageJson)();
if (!(file === null || file === void 0 ? void 0 : (_file$actbase = file.actbase) === null || _file$actbase === void 0 ? void 0 : _file$actbase.codepush)) {
file.actbase.codepush = yield install();
} else {// if (result1) {
// file.scripts['codepush-ios'] = 'rm -rf build_ios && appcenter codepush release-react -a $npm_package_appcenter_ios -d Production --output-dir build_ios';
// }
// if (result2) {
// file.scripts['codepush-and'] = 'rm -rf build_and && appcenter codepush release-react -a $npm_package_appcenter_and -d Production --output-dir build_and';
// }
// if (result1 || result2) {
// console.log(" save to package.json");
// const text = JSON.stringify(file, null, 2);
// await writeFile("./package.json", text);
// }
file.actbase.codepush = yield install(file);
} else {
const profile = argv.profile || 'Production';
let device = argv.device;
if (!device) {
console.log('Your want Device ?');
const selected = yield cliSelect({
values: ['All Device', 'iOS', 'Android'],
valueRenderer: (value, selected) => {
if (selected) {
return chalk.underline(value);
}
return value;
}
});
device = selected.value.toLowerCase();
console.log(`${selected.value} Selected.`);
}
if (!device.startsWith('ios') && !device.startsWith('and') && device.indexOf('all') < 0) {
console.log('Not found platforms.');
process.exit(1);
}
const version = file.version;
let last = parseInt(version.substring(version.lastIndexOf(".") + 1)) + 1;
file.version = version.substring(0, version.lastIndexOf('.') + 1) + last;
const text = JSON.stringify(file, null, 2);
yield (0, _utils.writeFile)("./package.json", text);
if (!device.startsWith('and')) {
// iOS or All
yield (0, _utils.execute)(`rm -rf build_ios`);
yield (0, _utils.execute)(`appcenter codepush release-react -a ${file.appcenter_ios} -d ${profile} --output-dir build_ios`);
if (file.bugsnag) {
const cmd = `bugsnag-sourcemaps upload --api-key ${file.bugsnag}
--source-map build_ios/CodePush/main.jsbundle.map
--minified-file build_ios/CodePush/main.jsbundle
--minified-url main.jsbundle
--upload-sources
--add-wildcard-prefix
--code-bundle-id ${file.version}`;
yield (0, _utils.execute)(cmd);
}
yield (0, _utils.execute)(`rm -rf build_ios`);
}
if (!device.startsWith('ios')) {
// Android or All
yield (0, _utils.execute)(`rm -rf build_and`);
yield (0, _utils.execute)(`appcenter codepush release-react -a ${file.appcenter_and} -d ${profile} --output-dir build_and`);
if (file.bugsnag) {
const cmd = `bugsnag-sourcemaps upload --api-key ${file.bugsnag}
--source-map build_and/CodePush/index.android.bundle.map
--minified-file build_and/CodePush/index.android.bundle
--minified-url index.android.bundle
--upload-sources
--add-wildcard-prefix
--code-bundle-id ${file.version}`;
yield (0, _utils.execute)(cmd);
}
yield (0, _utils.execute)(`rm -rf build_and`);
}
}
const text = JSON.stringify(file, null, 2);
yield (0, _utils.writeFile)("./package.json", text);
});
return function App(_x3) {
return function App(_x4, _x5) {
return _ref6.apply(this, arguments);

@@ -274,4 +341,4 @@ };

program.parse(process.argv);
program.option('-P, --profile <profile>', 'Profile').option('-D, --device <device>', 'Device (All, iOS, Android)').parse(process.argv);
var pkgs = program.args;
App(pkgs);
App(pkgs, program.opts());
{
"name": "actbase-cli",
"version": "0.0.8",
"version": "0.0.9",
"description": "Actbase Command Line Interface",

@@ -5,0 +5,0 @@ "author": "Trabricks LLC",

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