electron-cli 0.3.0-alpha.7 → 0.3.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1177,6 +1177,10 @@ impl PackageReport {
1177
1177
  &self.app_name
1178
1178
  }
1179
1179
 
1180
+ pub(crate) fn executable_name(&self) -> &str {
1181
+ &self.executable_name
1182
+ }
1183
+
1180
1184
  pub(crate) fn artifact_stem(&self) -> String {
1181
1185
  sanitize_artifact_name(&self.app_name)
1182
1186
  }
@@ -252,6 +252,7 @@ mod tests {
252
252
  package_json: Some(camino::Utf8PathBuf::from("/tmp/native-app/package.json")),
253
253
  name: Some("native-app".to_string()),
254
254
  version: Some("0.1.0".to_string()),
255
+ license: None,
255
256
  main: Some("src/main.js".to_string()),
256
257
  package_manager: Some("npm".to_string()),
257
258
  scripts: BTreeMap::new(),
package/src/project.rs CHANGED
@@ -15,6 +15,7 @@ pub struct ProjectSnapshot {
15
15
  pub package_json: Option<Utf8PathBuf>,
16
16
  pub name: Option<String>,
17
17
  pub version: Option<String>,
18
+ pub license: Option<String>,
18
19
  pub main: Option<String>,
19
20
  pub package_manager: Option<String>,
20
21
  pub scripts: BTreeMap<String, String>,
@@ -128,6 +129,11 @@ pub fn inspect(cwd: &Path) -> Result<ProjectSnapshot> {
128
129
  .and_then(|package| package.get("version"))
129
130
  .and_then(Value::as_str)
130
131
  .map(ToOwned::to_owned),
132
+ license: package_json
133
+ .as_ref()
134
+ .and_then(|package| package.get("license"))
135
+ .and_then(Value::as_str)
136
+ .map(ToOwned::to_owned),
131
137
  main: package_json
132
138
  .as_ref()
133
139
  .and_then(|package| package.get("main"))