bare-build 0.2.4 → 0.2.6

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.
package/index.js CHANGED
@@ -19,19 +19,13 @@ module.exports = async function* build(entry, preflight = null, opts = {}) {
19
19
  try {
20
20
  pkg = require(path.resolve(base, 'package.json'))
21
21
  } catch {
22
- pkg = null
22
+ pkg = {}
23
23
  }
24
24
 
25
- if (pkg) {
26
- const {
27
- name = opts.name || pkg.name || 'App',
28
- version = opts.version || pkg.version || '1.0.0',
29
- description = opts.description || pkg.description,
30
- author = opts.author || pkg.author
31
- } = pkg
32
-
33
- opts = { ...opts, name, version, description, author }
34
- }
25
+ opts.name ||= pkg.name || 'App'
26
+ opts.version ||= pkg.version || '1.0.0'
27
+ opts.description ||= pkg.description
28
+ opts.author ||= pkg.author
35
29
 
36
30
  if (typeof opts.runtime === 'string') {
37
31
  opts = { ...opts, runtime: await requireRelativeTo(opts.runtime, pathToFileURL(base + '/')) }
@@ -127,7 +127,7 @@ function createAndroidManifest(name, identifier, minimumSDK, targetSDK) {
127
127
  <uses-sdk android:minSdkVersion="${minimumSDK}" android:targetSdkVersion="${targetSDK}" />
128
128
  <uses-permission android:name="android.permission.INTERNET" />
129
129
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
130
- <application android:label="${name}" android:hasCode="true">
130
+ <application android:label="${name}" android:hasCode="true" android:usesCleartextTraffic="true">
131
131
  <activity android:name="to.holepunch.bare.Activity" android:exported="true">
132
132
  <intent-filter>
133
133
  <action android:name="android.intent.action.MAIN" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-build",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Application builder for Bare",
5
5
  "exports": {
6
6
  "./package": "./package.json",