@bubblewrap/core 1.22.5 → 1.22.7
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/dist/lib/TwaManifest.d.ts +5 -0
- package/dist/lib/TwaManifest.js +22 -6
- package/dist/lib/features/EmptyFeature.d.ts +1 -0
- package/dist/lib/features/EmptyFeature.js +1 -0
- package/dist/lib/features/Feature.d.ts +4 -0
- package/dist/lib/features/FeatureManager.d.ts +1 -0
- package/dist/lib/features/FeatureManager.js +10 -2
- package/dist/lib/features/FileHandlingFeature.d.ts +5 -0
- package/dist/lib/features/FileHandlingFeature.js +48 -0
- package/dist/lib/types/FileHandler.d.ts +11 -0
- package/dist/lib/types/FileHandler.js +58 -0
- package/dist/lib/types/WebManifest.d.ts +5 -0
- package/package.json +3 -3
- package/template_project/app/build.gradle +8 -0
- package/template_project/app/src/main/AndroidManifest.xml +12 -0
- package/template_project/.gradle/8.11.1/checksums/checksums.lock +0 -0
- package/template_project/.gradle/8.11.1/fileChanges/last-build.bin +0 -0
- package/template_project/.gradle/8.11.1/fileHashes/fileHashes.lock +0 -0
- package/template_project/.gradle/8.11.1/gc.properties +0 -0
- package/template_project/.gradle/8.8/checksums/checksums.lock +0 -0
- package/template_project/.gradle/8.8/dependencies-accessors/gc.properties +0 -0
- package/template_project/.gradle/8.8/fileChanges/last-build.bin +0 -0
- package/template_project/.gradle/8.8/fileHashes/fileHashes.lock +0 -0
- package/template_project/.gradle/8.8/gc.properties +0 -0
- package/template_project/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/template_project/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/template_project/.gradle/vcs-1/gc.properties +0 -0
|
@@ -7,6 +7,7 @@ import { LocationDelegationConfig } from './features/LocationDelegationFeature';
|
|
|
7
7
|
import { PlayBillingConfig } from './features/PlayBillingFeature';
|
|
8
8
|
import { FirstRunFlagConfig } from './features/FirstRunFlagFeature';
|
|
9
9
|
import { ArCoreConfig } from './features/ArCoreFeature';
|
|
10
|
+
import { FileHandler } from './types/FileHandler';
|
|
10
11
|
declare const DISPLAY_MODE_VALUES: string[];
|
|
11
12
|
export type DisplayMode = typeof DISPLAY_MODE_VALUES[number];
|
|
12
13
|
export declare const DisplayModes: DisplayMode[];
|
|
@@ -103,6 +104,8 @@ export declare class TwaManifest {
|
|
|
103
104
|
additionalTrustedOrigins: string[];
|
|
104
105
|
retainedBundles: number[];
|
|
105
106
|
protocolHandlers?: ProtocolHandler[];
|
|
107
|
+
fileHandlers?: FileHandler[];
|
|
108
|
+
launchHandlerClientMode?: string;
|
|
106
109
|
private static log;
|
|
107
110
|
constructor(data: TwaManifestJson);
|
|
108
111
|
/**
|
|
@@ -240,6 +243,8 @@ export interface TwaManifestJson {
|
|
|
240
243
|
additionalTrustedOrigins?: string[];
|
|
241
244
|
retainedBundles?: number[];
|
|
242
245
|
protocolHandlers?: ProtocolHandler[];
|
|
246
|
+
fileHandlers?: FileHandler[];
|
|
247
|
+
launchHandlerClientMode?: string;
|
|
243
248
|
}
|
|
244
249
|
export interface SigningKeyInfo {
|
|
245
250
|
path: string;
|
package/dist/lib/TwaManifest.js
CHANGED
|
@@ -25,6 +25,7 @@ const Color = require("color");
|
|
|
25
25
|
const Log_1 = require("./Log");
|
|
26
26
|
const ProtocolHandler_1 = require("./types/ProtocolHandler");
|
|
27
27
|
const ShortcutInfo_1 = require("./ShortcutInfo");
|
|
28
|
+
const FileHandler_1 = require("./types/FileHandler");
|
|
28
29
|
// The minimum size needed for the app icon.
|
|
29
30
|
const MIN_ICON_SIZE = 512;
|
|
30
31
|
// As described on https://developer.chrome.com/apps/manifest/name#short_name
|
|
@@ -32,7 +33,8 @@ const SHORT_NAME_MAX_SIZE = 12;
|
|
|
32
33
|
// The minimum size needed for the notification icon
|
|
33
34
|
const MIN_NOTIFICATION_ICON_SIZE = 48;
|
|
34
35
|
// Supported display modes for TWA
|
|
35
|
-
const DISPLAY_MODE_VALUES = ['standalone', 'minimal-ui', 'fullscreen', 'fullscreen-sticky'
|
|
36
|
+
const DISPLAY_MODE_VALUES = ['standalone', 'minimal-ui', 'fullscreen', 'fullscreen-sticky',
|
|
37
|
+
'browser'];
|
|
36
38
|
exports.DisplayModes = [...DISPLAY_MODE_VALUES];
|
|
37
39
|
function asDisplayMode(input) {
|
|
38
40
|
return DISPLAY_MODE_VALUES.includes(input) ? input : null;
|
|
@@ -149,6 +151,8 @@ class TwaManifest {
|
|
|
149
151
|
this.additionalTrustedOrigins = data.additionalTrustedOrigins || [];
|
|
150
152
|
this.retainedBundles = data.retainedBundles || [];
|
|
151
153
|
this.protocolHandlers = data.protocolHandlers;
|
|
154
|
+
this.fileHandlers = data.fileHandlers;
|
|
155
|
+
this.launchHandlerClientMode = data.launchHandlerClientMode;
|
|
152
156
|
}
|
|
153
157
|
/**
|
|
154
158
|
* Turns an TwaManifest into a TwaManifestJson.
|
|
@@ -219,7 +223,7 @@ class TwaManifest {
|
|
|
219
223
|
* @returns {TwaManifest}
|
|
220
224
|
*/
|
|
221
225
|
static fromWebManifestJson(webManifestUrl, webManifest) {
|
|
222
|
-
var _a, _b;
|
|
226
|
+
var _a, _b, _c, _d;
|
|
223
227
|
const icon = (0, util_1.findSuitableIcon)(webManifest.icons, 'any', MIN_ICON_SIZE);
|
|
224
228
|
const maskableIcon = (0, util_1.findSuitableIcon)(webManifest.icons, 'maskable', MIN_ICON_SIZE);
|
|
225
229
|
const monochromeIcon = (0, util_1.findSuitableIcon)(webManifest.icons, 'monochrome', MIN_NOTIFICATION_ICON_SIZE);
|
|
@@ -230,12 +234,13 @@ class TwaManifest {
|
|
|
230
234
|
return icon ? new URL(icon.src, webManifestUrl).toString() : undefined;
|
|
231
235
|
}
|
|
232
236
|
const processedProtocolHandlers = (0, ProtocolHandler_1.processProtocolHandlers)((_a = webManifest.protocol_handlers) !== null && _a !== void 0 ? _a : [], fullStartUrl, fullScopeUrl);
|
|
237
|
+
const fileHandlers = (0, FileHandler_1.processFileHandlers)((_b = webManifest.file_handlers) !== null && _b !== void 0 ? _b : [], fullStartUrl, fullScopeUrl);
|
|
233
238
|
const twaManifest = new TwaManifest({
|
|
234
239
|
packageId: (0, util_1.generatePackageId)(webManifestUrl.host) || '',
|
|
235
240
|
host: webManifestUrl.host,
|
|
236
241
|
name: webManifest['name'] || webManifest['short_name'] || DEFAULT_APP_NAME,
|
|
237
242
|
launcherName: webManifest['short_name'] ||
|
|
238
|
-
((
|
|
243
|
+
((_c = webManifest['name']) === null || _c === void 0 ? void 0 : _c.substring(0, SHORT_NAME_MAX_SIZE)) || DEFAULT_APP_NAME,
|
|
239
244
|
display: asDisplayMode(webManifest['display']) || DEFAULT_DISPLAY_MODE,
|
|
240
245
|
themeColor: webManifest['theme_color'] || DEFAULT_THEME_COLOR,
|
|
241
246
|
themeColorDark: DEFAULT_THEME_COLOR_DARK,
|
|
@@ -262,6 +267,8 @@ class TwaManifest {
|
|
|
262
267
|
orientation: asOrientation(webManifest.orientation) || DEFAULT_ORIENTATION,
|
|
263
268
|
fullScopeUrl: fullScopeUrl.toString(),
|
|
264
269
|
protocolHandlers: processedProtocolHandlers,
|
|
270
|
+
fileHandlers,
|
|
271
|
+
launchHandlerClientMode: ((_d = webManifest['launch_handler']) === null || _d === void 0 ? void 0 : _d['client_mode']) || '',
|
|
265
272
|
});
|
|
266
273
|
return twaManifest;
|
|
267
274
|
}
|
|
@@ -373,7 +380,7 @@ class TwaManifest {
|
|
|
373
380
|
* @returns {Promise<TwaManifest>} the new and merged Twa manifest.
|
|
374
381
|
*/
|
|
375
382
|
static async merge(fieldsToIgnore, webManifestUrl, webManifest, oldTwaManifest) {
|
|
376
|
-
var _a, _b, _c, _d;
|
|
383
|
+
var _a, _b, _c, _d, _e, _f;
|
|
377
384
|
let shortcuts = oldTwaManifest.shortcuts;
|
|
378
385
|
if (!(fieldsToIgnore.includes('shortcuts'))) {
|
|
379
386
|
shortcuts = this.getShortcuts(webManifestUrl, webManifest);
|
|
@@ -397,13 +404,20 @@ class TwaManifest {
|
|
|
397
404
|
});
|
|
398
405
|
const fullStartUrl = new URL(webManifest['start_url'] || '/', webManifestUrl);
|
|
399
406
|
const fullScopeUrl = new URL(webManifest['scope'] || '.', webManifestUrl);
|
|
407
|
+
let fileHandlers = oldTwaManifestJson.fileHandlers;
|
|
408
|
+
if (!(fieldsToIgnore.includes('file_handlers'))) {
|
|
409
|
+
fileHandlers = (0, FileHandler_1.processFileHandlers)((_c = webManifest.file_handlers) !== null && _c !== void 0 ? _c : [], fullStartUrl, fullScopeUrl);
|
|
410
|
+
if (fileHandlers.length == 0) {
|
|
411
|
+
fileHandlers = oldTwaManifestJson.fileHandlers;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
400
414
|
const twaManifest = new TwaManifest({
|
|
401
415
|
...oldTwaManifestJson,
|
|
402
416
|
name: this.getNewFieldValue('name', fieldsToIgnore, oldTwaManifest.name, webManifest['name'] || webManifest['short_name']),
|
|
403
417
|
launcherName: this.getNewFieldValue('short_name', fieldsToIgnore, oldTwaManifest.launcherName, webManifest['short_name'] ||
|
|
404
|
-
((
|
|
418
|
+
((_d = webManifest['name']) === null || _d === void 0 ? void 0 : _d.substring(0, SHORT_NAME_MAX_SIZE))),
|
|
405
419
|
display: this.getNewFieldValue('display', fieldsToIgnore, oldTwaManifest.display, asDisplayMode(webManifest['display'])),
|
|
406
|
-
fullScopeUrl: this.getNewFieldValue('fullScopeUrl', fieldsToIgnore, (
|
|
420
|
+
fullScopeUrl: this.getNewFieldValue('fullScopeUrl', fieldsToIgnore, (_e = oldTwaManifest.fullScopeUrl) === null || _e === void 0 ? void 0 : _e.toString(), fullScopeUrl.toString()),
|
|
407
421
|
themeColor: this.getNewFieldValue('themeColor', fieldsToIgnore, oldTwaManifest.themeColor.hex(), webManifest['theme_color']),
|
|
408
422
|
backgroundColor: this.getNewFieldValue('backgroundColor', fieldsToIgnore, oldTwaManifest.backgroundColor.hex(), webManifest['background_color']),
|
|
409
423
|
startUrl: this.getNewFieldValue('startUrl', fieldsToIgnore, oldTwaManifest.startUrl, fullStartUrl.pathname + fullStartUrl.search),
|
|
@@ -412,6 +426,8 @@ class TwaManifest {
|
|
|
412
426
|
monochromeIconUrl: monochromeIconUrl || oldTwaManifestJson.monochromeIconUrl,
|
|
413
427
|
shortcuts: shortcuts,
|
|
414
428
|
protocolHandlers: protocolHandlers,
|
|
429
|
+
fileHandlers,
|
|
430
|
+
launchHandlerClientMode: this.getNewFieldValue('launchHandlerClientMode', fieldsToIgnore, oldTwaManifest.launchHandlerClientMode, ((_f = webManifest['launch_handler']) === null || _f === void 0 ? void 0 : _f['client_mode']) || ''),
|
|
415
431
|
});
|
|
416
432
|
return twaManifest;
|
|
417
433
|
}
|
|
@@ -26,6 +26,10 @@ export interface Feature {
|
|
|
26
26
|
* Example `androidx.appcompat:appcompat:1.2.0`.
|
|
27
27
|
*/
|
|
28
28
|
dependencies: string[];
|
|
29
|
+
/**
|
|
30
|
+
* Entries to be added the `android.defaultConfig` section.
|
|
31
|
+
*/
|
|
32
|
+
configs: string[];
|
|
29
33
|
};
|
|
30
34
|
/**
|
|
31
35
|
* Customizations to be applied to `app/src/main/AndroidManifest.xml`.
|
|
@@ -23,9 +23,10 @@ const FirstRunFlagFeature_1 = require("./FirstRunFlagFeature");
|
|
|
23
23
|
const Log_1 = require("../Log");
|
|
24
24
|
const ArCoreFeature_1 = require("./ArCoreFeature");
|
|
25
25
|
const ProtocolHandlersFeature_1 = require("./ProtocolHandlersFeature");
|
|
26
|
+
const FileHandlingFeature_1 = require("./FileHandlingFeature");
|
|
26
27
|
const ANDROID_BROWSER_HELPER_VERSIONS = {
|
|
27
|
-
stable: 'com.google.androidbrowserhelper:androidbrowserhelper:2.6.
|
|
28
|
-
alpha: 'com.google.androidbrowserhelper:androidbrowserhelper:2.6.
|
|
28
|
+
stable: 'com.google.androidbrowserhelper:androidbrowserhelper:2.6.2',
|
|
29
|
+
alpha: 'com.google.androidbrowserhelper:androidbrowserhelper:2.6.2',
|
|
29
30
|
};
|
|
30
31
|
/**
|
|
31
32
|
* Analyzes a TwaManifest to collect enable features and aggregates all customizations that will
|
|
@@ -40,6 +41,7 @@ class FeatureManager {
|
|
|
40
41
|
this.buildGradle = {
|
|
41
42
|
repositories: new Set(),
|
|
42
43
|
dependencies: new Set(),
|
|
44
|
+
configs: new Set(),
|
|
43
45
|
};
|
|
44
46
|
this.androidManifest = {
|
|
45
47
|
permissions: new Set(),
|
|
@@ -100,6 +102,9 @@ class FeatureManager {
|
|
|
100
102
|
if (twaManifest.protocolHandlers) {
|
|
101
103
|
this.addFeature(new ProtocolHandlersFeature_1.ProtocolHandlersFeature(twaManifest.protocolHandlers));
|
|
102
104
|
}
|
|
105
|
+
if (twaManifest.fileHandlers) {
|
|
106
|
+
this.addFeature(new FileHandlingFeature_1.FileHandlingFeature(twaManifest.fileHandlers));
|
|
107
|
+
}
|
|
103
108
|
}
|
|
104
109
|
addFeature(feature) {
|
|
105
110
|
// Adds properties to build.
|
|
@@ -109,6 +114,9 @@ class FeatureManager {
|
|
|
109
114
|
feature.buildGradle.dependencies.forEach((dep) => {
|
|
110
115
|
this.buildGradle.dependencies.add(dep);
|
|
111
116
|
});
|
|
117
|
+
feature.buildGradle.configs.forEach((dep) => {
|
|
118
|
+
this.buildGradle.configs.add(dep);
|
|
119
|
+
});
|
|
112
120
|
// Adds properties to application.
|
|
113
121
|
feature.applicationClass.imports.forEach((imp) => {
|
|
114
122
|
this.applicationClass.imports.add(imp);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2025 Google Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.FileHandlingFeature = void 0;
|
|
19
|
+
const EmptyFeature_1 = require("./EmptyFeature");
|
|
20
|
+
const activityAliasTemplate = (handler, index) => `
|
|
21
|
+
<activity-alias
|
|
22
|
+
android:name="FileHandlingActivity${index}"
|
|
23
|
+
android:targetActivity="LauncherActivity"
|
|
24
|
+
android:exported="true">
|
|
25
|
+
<meta-data android:name="android.support.customtabs.trusted.FILE_HANDLING_ACTION_URL"
|
|
26
|
+
android:value="@string/fileHandlingActionUrl${index}" />
|
|
27
|
+
<intent-filter>
|
|
28
|
+
<action android:name="android.intent.action.VIEW"/>
|
|
29
|
+
<category android:name="android.intent.category.DEFAULT" />
|
|
30
|
+
<category android:name="android.intent.category.BROWSABLE"/>
|
|
31
|
+
<data android:scheme="content" />
|
|
32
|
+
${handler.mimeTypes.map((mimeType) => `
|
|
33
|
+
<data android:mimeType="${mimeType}" />`).join('')}
|
|
34
|
+
</intent-filter>
|
|
35
|
+
</activity-alias>
|
|
36
|
+
`;
|
|
37
|
+
class FileHandlingFeature extends EmptyFeature_1.EmptyFeature {
|
|
38
|
+
constructor(fileHandlers) {
|
|
39
|
+
super('fileHandling');
|
|
40
|
+
if (fileHandlers.length === 0)
|
|
41
|
+
return;
|
|
42
|
+
for (let i = 0; i < fileHandlers.length; i++) {
|
|
43
|
+
this.androidManifest.components.push(activityAliasTemplate(fileHandlers[i], i));
|
|
44
|
+
this.buildGradle.configs.push(`resValue "string", "fileHandlingActionUrl${i}", "${fileHandlers[i].actionUrl}"`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.FileHandlingFeature = FileHandlingFeature;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface FileHandlerJson {
|
|
2
|
+
action?: string;
|
|
3
|
+
accept?: {
|
|
4
|
+
[mimeType: string]: Array<string>;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export interface FileHandler {
|
|
8
|
+
actionUrl: string;
|
|
9
|
+
mimeTypes: Array<string>;
|
|
10
|
+
}
|
|
11
|
+
export declare function processFileHandlers(fileHandlers: FileHandlerJson[], startUrl: URL, scopeUrl: URL): FileHandler[];
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2025 Google Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.processFileHandlers = processFileHandlers;
|
|
19
|
+
function normalizeUrl(url, startUrl, scopeUrl) {
|
|
20
|
+
try {
|
|
21
|
+
const absoluteUrl = new URL(url, startUrl);
|
|
22
|
+
if (absoluteUrl.protocol !== 'https:') {
|
|
23
|
+
console.warn('Ignoring url with illegal scheme:', absoluteUrl.toString());
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (absoluteUrl.origin != scopeUrl.origin) {
|
|
27
|
+
console.warn('Ignoring url with invalid origin:', absoluteUrl.toString());
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (!absoluteUrl.pathname.startsWith(scopeUrl.pathname)) {
|
|
31
|
+
console.warn('Ignoring url not within manifest scope: ', absoluteUrl.toString());
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
return absoluteUrl.toString();
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
console.warn('Ignoring invalid url:', url);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function processFileHandlers(fileHandlers, startUrl, scopeUrl) {
|
|
41
|
+
const processedFileHandlers = [];
|
|
42
|
+
for (const handler of fileHandlers) {
|
|
43
|
+
if (!handler.action || !handler.accept)
|
|
44
|
+
continue;
|
|
45
|
+
const actionUrl = normalizeUrl(handler.action, startUrl, scopeUrl);
|
|
46
|
+
if (!actionUrl)
|
|
47
|
+
continue;
|
|
48
|
+
const mimeTypes = Object.keys(handler.accept);
|
|
49
|
+
if (mimeTypes.length == 0)
|
|
50
|
+
continue;
|
|
51
|
+
const processedHandler = {
|
|
52
|
+
actionUrl,
|
|
53
|
+
mimeTypes,
|
|
54
|
+
};
|
|
55
|
+
processedFileHandlers.push(processedHandler);
|
|
56
|
+
}
|
|
57
|
+
return processedFileHandlers;
|
|
58
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FileHandlerJson } from './FileHandler';
|
|
1
2
|
import { ProtocolHandler } from './ProtocolHandler';
|
|
2
3
|
export interface WebManifestIcon {
|
|
3
4
|
src: string;
|
|
@@ -43,5 +44,9 @@ export interface WebManifestJson {
|
|
|
43
44
|
share_target?: ShareTarget;
|
|
44
45
|
orientation?: OrientationLock;
|
|
45
46
|
protocol_handlers?: Array<ProtocolHandler>;
|
|
47
|
+
file_handlers?: Array<FileHandlerJson>;
|
|
48
|
+
launch_handler?: {
|
|
49
|
+
client_mode?: string;
|
|
50
|
+
};
|
|
46
51
|
}
|
|
47
52
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bubblewrap/core",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.7",
|
|
4
4
|
"description": "Core Library to generate, build and sign TWA projects",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=14.15.0"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/node-fetch": "^2.5.10",
|
|
45
45
|
"@types/tar": "^4.0.4",
|
|
46
46
|
"@types/valid-url": "^1.0.3",
|
|
47
|
-
"canvg": "
|
|
47
|
+
"canvg": "4.0.3",
|
|
48
48
|
"color": "^3.1.3",
|
|
49
49
|
"extract-zip": "^1.7.0",
|
|
50
50
|
"fetch-h2": "^2.5.1",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"tar": "^6.1.0",
|
|
58
58
|
"valid-url": "^1.0.9"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "8f951797db69056c8738800e33e6735d7c65ea3e"
|
|
61
61
|
}
|
|
@@ -70,6 +70,10 @@ android {
|
|
|
70
70
|
def launchUrl = "https://" + twaManifest.hostName + twaManifest.launchUrl
|
|
71
71
|
resValue "string", "launchUrl", launchUrl
|
|
72
72
|
|
|
73
|
+
<% if (launchHandlerClientMode) { %>
|
|
74
|
+
resValue "string", "launchHandlerClientMode", '<%= launchHandlerClientMode %>'
|
|
75
|
+
<% } %>
|
|
76
|
+
|
|
73
77
|
<% if (webManifestUrl) { %>
|
|
74
78
|
// The URL the Web Manifest for the Progressive Web App that the TWA points to. This
|
|
75
79
|
// is used by Chrome OS and Meta Quest to open the Web version of the PWA instead of
|
|
@@ -148,6 +152,10 @@ android {
|
|
|
148
152
|
|
|
149
153
|
resValue "bool", "enableSiteSettingsShortcut", twaManifest.enableSiteSettingsShortcut
|
|
150
154
|
resValue "string", "orientation", twaManifest.orientation
|
|
155
|
+
|
|
156
|
+
<% for(const config of buildGradle.configs) { %>
|
|
157
|
+
<%= config %>
|
|
158
|
+
<% } %>
|
|
151
159
|
}
|
|
152
160
|
buildTypes {
|
|
153
161
|
release {
|
|
@@ -109,6 +109,12 @@
|
|
|
109
109
|
android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR"
|
|
110
110
|
android:resource="@color/colorPrimary" />
|
|
111
111
|
|
|
112
|
+
<% if (launchHandlerClientMode) { %>
|
|
113
|
+
<meta-data
|
|
114
|
+
android:name="android.support.customtabs.trusted.LAUNCH_HANDLER_CLIENT_MODE"
|
|
115
|
+
android:value="@string/launchHandlerClientMode" />
|
|
116
|
+
<% } %>
|
|
117
|
+
|
|
112
118
|
<meta-data
|
|
113
119
|
android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR_DARK"
|
|
114
120
|
android:resource="@color/colorPrimaryDark" />
|
|
@@ -158,6 +164,12 @@
|
|
|
158
164
|
<% } else if (display === 'fullscreen-sticky') { %>
|
|
159
165
|
<meta-data android:name="android.support.customtabs.trusted.DISPLAY_MODE"
|
|
160
166
|
android:value="sticky-immersive" />
|
|
167
|
+
<% } else if (display === 'minimal-ui') { %>
|
|
168
|
+
<meta-data android:name="android.support.customtabs.trusted.DISPLAY_MODE"
|
|
169
|
+
android:value="minimal-ui" />
|
|
170
|
+
<% } else if (display === 'browser') { %>
|
|
171
|
+
<meta-data android:name="android.support.customtabs.trusted.DISPLAY_MODE"
|
|
172
|
+
android:value="browser" />
|
|
161
173
|
<% } %>
|
|
162
174
|
|
|
163
175
|
<meta-data android:name="android.support.customtabs.trusted.SCREEN_ORIENTATION"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|