@bubblewrap/core 1.19.1 → 1.20.1

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;
@@ -19,6 +19,7 @@ exports.ImageHelper = void 0;
19
19
  const path = require("path");
20
20
  const fs = require("fs");
21
21
  const Jimp = require("jimp");
22
+ const plugin_color_1 = require("@jimp/plugin-color");
22
23
  const FetchUtils_1 = require("./FetchUtils");
23
24
  const util_1 = require("util");
24
25
  const svg2img_1 = require("./wrappers/svg2img");
@@ -73,13 +74,13 @@ class ImageHelper {
73
74
  const image = await Jimp.read(icon.data);
74
75
  image.color([
75
76
  // Set all pixels to black/0
76
- { apply: 'red', params: [-255] },
77
- { apply: 'green', params: [-255] },
78
- { apply: 'blue', params: [-255] },
77
+ { apply: plugin_color_1.ColorActionName.RED, params: [-255] },
78
+ { apply: plugin_color_1.ColorActionName.GREEN, params: [-255] },
79
+ { apply: plugin_color_1.ColorActionName.BLUE, params: [-255] },
79
80
  // Add to channels using theme color
80
- { apply: 'red', params: [themeColor.red()] },
81
- { apply: 'green', params: [themeColor.green()] },
82
- { apply: 'blue', params: [themeColor.blue()] },
81
+ { apply: plugin_color_1.ColorActionName.RED, params: [themeColor.red()] },
82
+ { apply: plugin_color_1.ColorActionName.GREEN, params: [themeColor.green()] },
83
+ { apply: plugin_color_1.ColorActionName.BLUE, params: [themeColor.blue()] },
83
84
  ]);
84
85
  return { url: icon.url, data: image };
85
86
  }
@@ -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
  */
@@ -23,8 +23,8 @@ const FirstRunFlagFeature_1 = require("./FirstRunFlagFeature");
23
23
  const Log_1 = require("../Log");
24
24
  const ArCoreFeature_1 = require("./ArCoreFeature");
25
25
  const ANDROID_BROWSER_HELPER_VERSIONS = {
26
- stable: 'com.google.androidbrowserhelper:androidbrowserhelper:2.4.0',
27
- alpha: 'com.google.androidbrowserhelper:androidbrowserhelper:2.4.0',
26
+ stable: 'com.google.androidbrowserhelper:androidbrowserhelper:2.5.0',
27
+ alpha: 'com.google.androidbrowserhelper:androidbrowserhelper:2.5.0',
28
28
  };
29
29
  /**
30
30
  * Analyzes a TwaManifest to collect enable features and aggregates all customizations that will
@@ -20,7 +20,7 @@ const EmptyFeature_1 = require("./EmptyFeature");
20
20
  class PlayBillingFeature extends EmptyFeature_1.EmptyFeature {
21
21
  constructor() {
22
22
  super('playbilling');
23
- this.buildGradle.dependencies.push('com.google.androidbrowserhelper:billing:1.0.0-alpha09');
23
+ this.buildGradle.dependencies.push('com.google.androidbrowserhelper:billing:1.0.0-alpha10');
24
24
  this.androidManifest.components.push(`
25
25
  <activity
26
26
  android:name="com.google.androidbrowserhelper.playbilling.provider.PaymentActivity"
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@bubblewrap/core",
3
- "version": "1.19.1",
3
+ "version": "1.20.1",
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",
@@ -47,12 +50,12 @@
47
50
  "fetch-h2": "^2.5.1",
48
51
  "googleapis": "^81.0.0",
49
52
  "inquirer": "^7.3.3",
50
- "jimp": "^0.14.0",
53
+ "jimp": "^0.22.7",
51
54
  "lodash.template": "^4.5.0",
52
55
  "mime-types": "^2.1.28",
53
56
  "node-fetch": "^2.6.1",
54
57
  "tar": "^6.1.0",
55
58
  "valid-url": "^1.0.9"
56
59
  },
57
- "gitHead": "0214f23544fd43aab07b7963a16d2d8fe25be7b4"
60
+ "gitHead": "176aee15be2723c805b8f4df505dd4e9d6684025"
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