Skip to content

Commit aae929c

Browse files
committed
Fix formatting
1 parent 9219637 commit aae929c

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

packages/core/src/lib/TwaManifest.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ export class TwaManifest {
325325
);
326326

327327
const fileHandlers = processFileHandlers(
328-
webManifest.file_handlers ?? [],
329-
fullStartUrl,
330-
fullScopeUrl,
328+
webManifest.file_handlers ?? [],
329+
fullStartUrl,
330+
fullScopeUrl,
331331
);
332332

333333
const twaManifest = new TwaManifest({
@@ -518,9 +518,9 @@ export class TwaManifest {
518518
let fileHandlers = oldTwaManifestJson.fileHandlers;
519519
if (!(fieldsToIgnore.includes('file_handlers'))) {
520520
fileHandlers = processFileHandlers(
521-
webManifest.file_handlers ?? [],
522-
fullStartUrl,
523-
fullScopeUrl,
521+
webManifest.file_handlers ?? [],
522+
fullStartUrl,
523+
fullScopeUrl,
524524
);
525525
if (fileHandlers.length == 0) {
526526
fileHandlers = oldTwaManifestJson.fileHandlers;

packages/core/src/lib/features/FileHandlingFeature.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import {EmptyFeature} from './EmptyFeature';
1818
import {FileHandler} from '../types/FileHandler';
1919

20-
const activityAliasTemplate = (handler: FileHandler, index: number) => `
20+
const activityAliasTemplate = (handler: FileHandler, index: number): string => `
2121
<activity-alias
2222
android:name="FileHandlingActivity${index}"
2323
android:targetActivity="LauncherActivity"
@@ -29,9 +29,9 @@ const activityAliasTemplate = (handler: FileHandler, index: number) => `
2929
<category android:name="android.intent.category.DEFAULT" />
3030
<category android:name="android.intent.category.BROWSABLE"/>
3131
<data android:scheme="content" />
32-
${ handler.mimeTypes.map(
33-
(mimeType: string) => `<data android:mimeType="${mimeType}" />`
34-
).join('\n') }
32+
${ handler.mimeTypes.map((mimeType: string) => `
33+
<data android:mimeType="${mimeType}" />`,
34+
).join('') }
3535
</intent-filter>
3636
</activity-alias>
3737
`;

packages/core/src/lib/types/FileHandler.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ export interface FileHandlerJson {
1818
action?: string;
1919
accept?: {
2020
[mimeType: string]: Array<string>;
21-
}
21+
};
2222
}
2323

2424
export interface FileHandler {
2525
actionUrl: string;
2626
mimeTypes: Array<string>;
2727
}
2828

29-
function normalizeUrl(url: string, startUrl: URL, scopeUrl: URL,): string | undefined {
29+
function normalizeUrl(url: string, startUrl: URL, scopeUrl: URL): string | undefined {
3030
try {
3131
const absoluteUrl = new URL(url, startUrl);
3232

@@ -52,9 +52,9 @@ function normalizeUrl(url: string, startUrl: URL, scopeUrl: URL,): string | unde
5252
}
5353

5454
export function processFileHandlers(
55-
fileHandlers: FileHandlerJson[],
56-
startUrl: URL,
57-
scopeUrl: URL,
55+
fileHandlers: FileHandlerJson[],
56+
startUrl: URL,
57+
scopeUrl: URL,
5858
): FileHandler[] {
5959
const processedFileHandlers: FileHandler[] = [];
6060

@@ -76,4 +76,4 @@ export function processFileHandlers(
7676
}
7777

7878
return processedFileHandlers;
79-
}
79+
}

0 commit comments

Comments
 (0)