Skip to content

Commit 318acf7

Browse files
authored
chore: add protocol support for miniapp (#36)
1 parent f93b850 commit 318acf7

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vscode/gulp-electron",
3-
"version": "1.40.0",
3+
"version": "1.40.1",
44
"description": "gulp plugin for packaging Electron into VS Code",
55
"main": "src/index.js",
66
"scripts": {

src/darwin.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,19 @@ function patchMiniAppInfoPlist(opts) {
355355
infoPlist["NSHumanReadableCopyright"] = opts.copyright;
356356
}
357357

358+
// URL types (protocol handlers)
359+
if (opts.darwinMiniAppBundleURLTypes) {
360+
infoPlist["CFBundleURLTypes"] = opts.darwinMiniAppBundleURLTypes.map(
361+
function (type) {
362+
return {
363+
CFBundleTypeRole: type.role,
364+
CFBundleURLName: type.name,
365+
CFBundleURLSchemes: type.urlSchemes,
366+
};
367+
}
368+
);
369+
}
370+
358371
// Update host bundle reference
359372
if (opts.darwinBundleIdentifier) {
360373
infoPlist["ElectronHostBundleId"] = opts.darwinBundleIdentifier;

0 commit comments

Comments
 (0)