@bubblewrap/core 1.19.1 → 1.20.0

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/README.md CHANGED
@@ -22,7 +22,7 @@ application that launches an existing Progressive Web App (PWA) using a
22
22
  [Trusted Web Activity (TWA)](https://developer.chrome.com/docs/android/trusted-web-activity/).
23
23
 
24
24
  ## Requirements
25
- - [Node.js](https://nodejs.org/en/) 12.0 or above
25
+ - [Node.js](https://nodejs.org/en/) 14.15.0 or above
26
26
 
27
27
  ## Setting up the Environment
28
28
 
@@ -18,20 +18,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.DigitalAssetLinks = void 0;
19
19
  class DigitalAssetLinks {
20
20
  static generateAssetLinks(applicationId, ...sha256Fingerprints) {
21
- const assetlinks = new Array();
22
- assetlinks.push('[');
23
- sha256Fingerprints.forEach((sha256Fingerprint, index) => {
24
- if (index > 0) {
25
- assetlinks.push(',');
26
- }
27
- assetlinks.push(`{
28
- "relation": ["delegate_permission/common.handle_all_urls"],
29
- "target" : { "namespace": "android_app", "package_name": "${applicationId}",
30
- "sha256_cert_fingerprints": ["${sha256Fingerprint}"] }
31
- }\n`);
32
- });
33
- assetlinks.push(']');
34
- return assetlinks.join('');
21
+ if (sha256Fingerprints.length === 0) {
22
+ return '[]';
23
+ }
24
+ return `[{
25
+ "relation": ["delegate_permission/common.handle_all_urls"],
26
+ "target": {
27
+ "namespace": "android_app",
28
+ "package_name": "${applicationId}",
29
+ "sha256_cert_fingerprints": ["${sha256Fingerprints.join('\", \"')}"]
30
+ }
31
+ }]\n`;
35
32
  }
36
33
  }
37
34
  exports.DigitalAssetLinks = DigitalAssetLinks;
@@ -45,12 +45,12 @@ declare type alphaDependencies = {
45
45
  * enableSiteSettingsShortcut: true, // Set to false to disable the shortcut into site settings.
46
46
  * // Add shortcuts for your app here. Every shortcut must include the following fields:
47
47
  * // - name: String that will show up in the shortcut.
48
- * // - short_name: Shorter string used if |name| is too long.
48
+ * // - shortName: Shorter string used if |name| is too long.
49
49
  * // - url: Absolute path of the URL to launch the app with (e.g '/create').
50
- * // - icon: Name of the resource in the drawable folder to use as an icon.
50
+ * // - chosenIconUrl: Name of the resource in the drawable folder to use as an icon.
51
51
  * shortcuts: [
52
52
  * // Insert shortcuts here, for example:
53
- * // [name: 'Open SVG', short_name: 'Open', url: '/open', icon: 'splash']
53
+ * // { name: 'Open SVG', shortName: 'Open', url: '/open', chosenIconUrl: 'https://example.com/example.svg' }
54
54
  * ],
55
55
  * // The duration of fade out animation in milliseconds to be played when removing splash screen.
56
56
  * splashScreenFadeOutDuration: 300
@@ -83,12 +83,12 @@ const DEFAULT_ORIENTATION = 'default';
83
83
  * enableSiteSettingsShortcut: true, // Set to false to disable the shortcut into site settings.
84
84
  * // Add shortcuts for your app here. Every shortcut must include the following fields:
85
85
  * // - name: String that will show up in the shortcut.
86
- * // - short_name: Shorter string used if |name| is too long.
86
+ * // - shortName: Shorter string used if |name| is too long.
87
87
  * // - url: Absolute path of the URL to launch the app with (e.g '/create').
88
- * // - icon: Name of the resource in the drawable folder to use as an icon.
88
+ * // - chosenIconUrl: Name of the resource in the drawable folder to use as an icon.
89
89
  * shortcuts: [
90
90
  * // Insert shortcuts here, for example:
91
- * // [name: 'Open SVG', short_name: 'Open', url: '/open', icon: 'splash']
91
+ * // { name: 'Open SVG', shortName: 'Open', url: '/open', chosenIconUrl: 'https://example.com/example.svg' }
92
92
  * ],
93
93
  * // The duration of fade out animation in milliseconds to be played when removing splash screen.
94
94
  * splashScreenFadeOutDuration: 300
@@ -4,7 +4,7 @@ import { JdkHelper } from '../jdk/JdkHelper';
4
4
  import { Log } from '../../lib/Log';
5
5
  import { Result } from '../../lib/Result';
6
6
  import { ValidatePathError } from '../errors/ValidatePathError';
7
- export declare const BUILD_TOOLS_VERSION = "30.0.3";
7
+ export declare const BUILD_TOOLS_VERSION = "33.0.2";
8
8
  /**
9
9
  * Wraps functionality of the Android SDK Tools and allows them to be invoked programatically.
10
10
  */
@@ -22,7 +22,7 @@ const util = require("../util");
22
22
  const Log_1 = require("../../lib/Log");
23
23
  const Result_1 = require("../../lib/Result");
24
24
  const ValidatePathError_1 = require("../errors/ValidatePathError");
25
- exports.BUILD_TOOLS_VERSION = '30.0.3';
25
+ exports.BUILD_TOOLS_VERSION = '33.0.2';
26
26
  /**
27
27
  * Wraps functionality of the Android SDK Tools and allows them to be invoked programatically.
28
28
  */
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@bubblewrap/core",
3
- "version": "1.19.1",
3
+ "version": "1.20.0",
4
4
  "description": "Core Library to generate, build and sign TWA projects",
5
+ "engines": {
6
+ "node": ">=14.15.0"
7
+ },
5
8
  "scripts": {
6
9
  "build": "tsc",
7
10
  "clean": "del dist",
@@ -54,5 +57,5 @@
54
57
  "tar": "^6.1.0",
55
58
  "valid-url": "^1.0.9"
56
59
  },
57
- "gitHead": "0214f23544fd43aab07b7963a16d2d8fe25be7b4"
60
+ "gitHead": "8e1716ce14bbc2b06e175753094b7ffccbafd19d"
58
61
  }
@@ -50,11 +50,11 @@ def twaManifest = [
50
50
  ]
51
51
 
52
52
  android {
53
- compileSdkVersion 31
53
+ compileSdkVersion 33
54
54
  defaultConfig {
55
55
  applicationId "<%= packageId %>"
56
56
  minSdkVersion <%= minSdkVersion %>
57
- targetSdkVersion 31
57
+ targetSdkVersion 33
58
58
  versionCode <%= appVersionCode %>
59
59
  versionName "<%= appVersionName %>"
60
60
 
@@ -1 +0,0 @@
1
- /build