Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appetizer-bundle

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appetizer-bundle - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

67

index.js

@@ -40,2 +40,10 @@ 'use strict';

let entry = 'index.js';
if (fs.existsSync(path.join(this.dir, 'index.ios.js'))) {
entry = 'index.ios.js';
} else if (fs.existsSync(path.join(this.dir, 'index.native.js'))) {
entry = 'index.native.js';
}
this.spawns('react-native', [

@@ -48,3 +56,3 @@ 'bundle',

'--entry-file',
'index.ios.js',
entry,
'--bundle-output',

@@ -93,5 +101,17 @@ dir + '/main.jsbundle',

const changes = data.split('\n').map((line) => {
if (!~line.indexOf('jsBundleURLForBundleRoot:@"index.')) return line;
//
// React-Native is always actively iterated upon, that means that the
// code structure of this file is also iterated upon. We want to support
// as many versions as possible so we need to drill down further here to
// ensure that we return the correct new bundle location.
//
return ' jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];';
if (!!~line.indexOf('jsBundleURLForBundleRoot:@"index.')) {
return ' jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];';
} else if (!!~line.indexOf('jsBundleURLForBundleRoot:@"index"')) {
return ' return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];'
}
return line;
}).join('\n');

@@ -144,21 +164,30 @@

let result;
files.sort().some(function find(file) {
const ext = path.extname(file);
/**
* Search the resolved files for files with a given extension.
*
* @param {String} target Extension we're looking for
* @returns {String|Boolean} Name of the file, or false.
* @private
*/
function search(target) {
for (let i = 0; i < files.length; i++) {
const file = files[i];
const ext = path.extname(file);
if (ext === '.xcworkspace') result = {
file: file,
name: name,
workspace: true
};
if (ext === target) return file;
}
if (ext === '.xcodeproj') result = {
file: file,
name: name,
workspace: false
};
return false;
}
return !!result;
});
const workspace = search('.xcworkspace');
const project = search('.xcodeproj');
let result;
if (workspace) {
result = { file: workspace, name, workspace: true };
} else if (project) {
result = { file: project, name, workspace: false };
}
if (result) return next(err, result);

@@ -186,3 +215,3 @@ next(new Error('Unable to locate xcode project files.'));

'-scheme', project.name,
'-derivedDataPath', 'build'
'-derivedDataPath', `build/${project.name}`
], {

@@ -189,0 +218,0 @@ cwd: dir,

{
"name": "appetizer-bundle",
"version": "0.0.1",
"version": "1.0.0",
"description": "Create/Bundle React-Native apps to on appetize.io",

@@ -28,3 +28,3 @@ "main": "index.js",

"dependencies": {
"diagnostics": "^1.1.0"
"diagnostics": "^2.0.2"
},

@@ -31,0 +31,0 @@ "devDependencies": {

@@ -17,2 +17,15 @@ # appetizer-bundle

## Part of the Appetizer suite
This module is part of a larger suite of components that work excellent with each
other. If you liked this module we highly suggest checking out:
- [appetizer][api] A Node.js component for interacting with the Appetize.io API.
- [appetizer-bundle][bundle] Prepares and packs your React-Native application for uploading to Appetize.io.
- [appetizer-component][component] A React Component to embed your uploaded application.
[api]: https://github.com/godaddy/appetizer
[bundle]: https://github.com/godaddy/appetizer-bundle
[component]: https://github.com/godaddy/appetizer-component
## API

@@ -155,2 +168,2 @@

MIT
[MIT](LICENSE)
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