@react-native-community/cli-hermes
Advanced tools
Comparing version 12.3.5 to 12.3.6
@@ -13,3 +13,3 @@ import { Config } from '@react-native-community/cli-types'; | ||
*/ | ||
export declare function downloadProfile(ctx: Config, dstPath: string, filename?: string, sourcemapPath?: string, raw?: boolean, shouldGenerateSourcemap?: boolean, port?: string, appId?: string, appIdSuffix?: string): Promise<void>; | ||
export declare function downloadProfile(ctx: Config, dstPath: string, filename?: string, sourcemapPath?: string, raw?: boolean, shouldGenerateSourcemap?: boolean, port?: string, appId?: string, appIdSuffix?: string, host?: string): Promise<void>; | ||
//# sourceMappingURL=downloadProfile.d.ts.map |
@@ -98,3 +98,3 @@ "use strict"; | ||
*/ | ||
async function downloadProfile(ctx, dstPath, filename, sourcemapPath, raw, shouldGenerateSourcemap, port = '8081', appId, appIdSuffix) { | ||
async function downloadProfile(ctx, dstPath, filename, sourcemapPath, raw, shouldGenerateSourcemap, port = '8081', appId, appIdSuffix, host = 'localhost') { | ||
try { | ||
@@ -126,3 +126,3 @@ const androidProject = (0, _cliPlatformAndroid().getAndroidProject)(ctx); | ||
execSyncWithLog(`adb shell run-as ${packageNameWithSuffix} cat cache/${file} > ${tempFilePath}`); | ||
const bundleOptions = (0, _metroBundleOptions.getMetroBundleOptions)(tempFilePath); | ||
const bundleOptions = (0, _metroBundleOptions.getMetroBundleOptions)(tempFilePath, host); | ||
@@ -129,0 +129,0 @@ // If path to source map is not given |
@@ -10,2 +10,3 @@ import { Config } from '@react-native-community/cli-types'; | ||
appIdSuffix?: string; | ||
host?: string; | ||
}; | ||
@@ -25,2 +26,6 @@ declare function profileHermes([dstPath]: Array<string>, ctx: Config, options: Options): Promise<void>; | ||
description?: undefined; | ||
} | { | ||
name: string; | ||
description: string; | ||
default: string; | ||
})[]; | ||
@@ -27,0 +32,0 @@ examples: { |
@@ -21,3 +21,3 @@ "use strict"; | ||
} | ||
await (0, _downloadProfile.downloadProfile)(ctx, dstPath, options.filename, options.sourcemapPath, options.raw, options.generateSourcemap, options.port, options.appId, options.appIdSuffix); | ||
await (0, _downloadProfile.downloadProfile)(ctx, dstPath, options.filename, options.sourcemapPath, options.raw, options.generateSourcemap, options.port, options.appId, options.appIdSuffix, options.host); | ||
} catch (err) { | ||
@@ -52,2 +52,6 @@ throw err; | ||
description: 'Specify an applicationIdSuffix to launch after build.' | ||
}, { | ||
name: '--host <string>', | ||
description: 'The host of the packager.', | ||
default: 'localhost' | ||
}], | ||
@@ -54,0 +58,0 @@ examples: [{ |
@@ -5,4 +5,5 @@ export interface MetroBundleOptions { | ||
minify: boolean; | ||
host: string; | ||
} | ||
export declare function getMetroBundleOptions(downloadedProfileFilePath: string): MetroBundleOptions; | ||
export declare function getMetroBundleOptions(downloadedProfileFilePath: string, host: string): MetroBundleOptions; | ||
//# sourceMappingURL=metroBundleOptions.d.ts.map |
@@ -22,7 +22,8 @@ "use strict"; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function getMetroBundleOptions(downloadedProfileFilePath) { | ||
function getMetroBundleOptions(downloadedProfileFilePath, host) { | ||
let options = { | ||
platform: 'android', | ||
dev: true, | ||
minify: false | ||
minify: false, | ||
host | ||
}; | ||
@@ -29,0 +30,0 @@ try { |
@@ -36,9 +36,2 @@ "use strict"; | ||
} | ||
function _ip() { | ||
const data = _interopRequireDefault(require("ip")); | ||
_ip = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -64,7 +57,7 @@ function getTempFilePath(filename) { | ||
dev, | ||
minify | ||
minify, | ||
host | ||
}) { | ||
_cliTools().logger.debug('Getting source maps from Metro packager server'); | ||
const IP_ADDRESS = _ip().default.address(); | ||
const requestURL = `http://${IP_ADDRESS}:${port}/index.map?platform=${platform}&dev=${dev}&minify=${minify}`; | ||
const requestURL = `http://${host}:${port}/index.map?platform=${platform}&dev=${dev}&minify=${minify}`; | ||
_cliTools().logger.debug(`Downloading from ${requestURL}`); | ||
@@ -71,0 +64,0 @@ try { |
{ | ||
"name": "@react-native-community/cli-hermes", | ||
"version": "12.3.5", | ||
"version": "12.3.6", | ||
"license": "MIT", | ||
@@ -11,7 +11,6 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@react-native-community/cli-platform-android": "12.3.5", | ||
"@react-native-community/cli-tools": "12.3.5", | ||
"@react-native-community/cli-platform-android": "12.3.6", | ||
"@react-native-community/cli-tools": "12.3.6", | ||
"chalk": "^4.1.2", | ||
"hermes-profile-transformer": "^0.0.6", | ||
"ip": "^1.1.5" | ||
"hermes-profile-transformer": "^0.0.6" | ||
}, | ||
@@ -24,3 +23,3 @@ "files": [ | ||
"devDependencies": { | ||
"@react-native-community/cli-types": "12.3.5", | ||
"@react-native-community/cli-types": "12.3.6", | ||
"@types/ip": "^1.1.0" | ||
@@ -34,3 +33,3 @@ }, | ||
}, | ||
"gitHead": "730f92aecd67148a57973bf2fb28fa37a248874d" | ||
"gitHead": "24be612a91ac005f5054bc352600146517f32d10" | ||
} |
@@ -60,2 +60,8 @@ # @react-native-community/cli-hermes | ||
#### `--host <string>` | ||
The host of the packager. | ||
> default: localhost | ||
### Notes on source map | ||
@@ -62,0 +68,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44238
4
453
71
+ Added@react-native-community/cli-platform-android@12.3.6(transitive)
+ Added@react-native-community/cli-tools@12.3.6(transitive)
- Removedip@^1.1.5
- Removed@react-native-community/cli-platform-android@12.3.5(transitive)
- Removed@react-native-community/cli-tools@12.3.5(transitive)
- Removedip@1.1.9(transitive)