diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | code-features-insiders.hook | 2 | ||||
-rw-r--r-- | code-features-insiders.install | 9 | ||||
-rw-r--r-- | patch.json | 794 | ||||
-rwxr-xr-x | patch.py | 51 | ||||
-rwxr-xr-x | patch.sh | 22 | ||||
-rwxr-xr-x | update.py | 52 |
8 files changed, 919 insertions, 38 deletions
@@ -1,20 +1,22 @@ pkgbase = code-features-insiders pkgdesc = Unblock some features in Code OSS, including features in VSCode Insiders - pkgver = 1.79.0 + pkgver = 1.81.1 pkgrel = 1 url = https://github.com/microsoft/vscode install = code-features-insiders.install arch = any license = unknown depends = code - depends = sed + depends = python depends = org.freedesktop.secrets optdepends = icu69: for MS-vsliveshare.vsliveshare extension to work provides = code-features conflicts = code-features source = code-features-insiders.hook - source = patch.sh - md5sums = 6ff3e599956e45e9d1a78ac3c88c0454 - md5sums = 87962789646d29c575079c8fc7224a98 + source = patch.py + source = patch.json + md5sums = a270718448070ecda3050b7569510105 + md5sums = f11f7ccd925de0398ef2e28b127bb063 + md5sums = 4d84c2d5a989d6ed4dd442b3862c2ae1 pkgname = code-features-insiders @@ -1,22 +1,25 @@ # Maintainer: Sainnhe Park <sainnhe@gmail.com> pkgname=code-features-insiders -pkgver=1.79.0 +pkgver=1.81.1 pkgrel=1 pkgdesc='Unblock some features in Code OSS, including features in VSCode Insiders' arch=('any') url='https://github.com/microsoft/vscode' license=('unknown') -depends=('code' 'sed' 'org.freedesktop.secrets') +depends=('code' 'python' 'org.freedesktop.secrets') optdepends=('icu69: for MS-vsliveshare.vsliveshare extension to work') provides=('code-features') conflicts=('code-features') install="${pkgname}.install" source=("${pkgname}.hook" - 'patch.sh') -md5sums=('6ff3e599956e45e9d1a78ac3c88c0454' - '87962789646d29c575079c8fc7224a98') + 'patch.py' + 'patch.json') +md5sums=('a270718448070ecda3050b7569510105' + 'f11f7ccd925de0398ef2e28b127bb063' + '4d84c2d5a989d6ed4dd442b3862c2ae1') package() { install -Dm 644 "${srcdir}/${pkgname}.hook" "${pkgdir}/usr/share/libalpm/hooks/${pkgname}.hook" - install -Dm 755 "${srcdir}/patch.sh" "${pkgdir}/usr/share/${pkgname}/patch.sh" + install -Dm 755 "${srcdir}/patch.py" "${pkgdir}/usr/share/${pkgname}/patch.py" + install -Dm 644 "${srcdir}/patch.json" "${pkgdir}/usr/share/${pkgname}/patch.json" } diff --git a/code-features-insiders.hook b/code-features-insiders.hook index a1c6b1627152..efe0da29d825 100644 --- a/code-features-insiders.hook +++ b/code-features-insiders.hook @@ -6,5 +6,5 @@ Target = usr/lib/code/product.json [Action] Description = [code-features-insiders] Patching product.json... -Exec = /usr/share/code-features-insiders/patch.sh +Exec = /usr/share/code-features-insiders/patch.py code-features-insiders patch When = PostTransaction diff --git a/code-features-insiders.install b/code-features-insiders.install index 6736e7e0ed1c..5d4e8d17fc73 100644 --- a/code-features-insiders.install +++ b/code-features-insiders.install @@ -1,15 +1,16 @@ post_install() { - /usr/share/code-features-insiders/patch.sh + /usr/share/code-features-insiders/patch.py code-features-insiders patch } pre_upgrade() { - /usr/share/code-features-insiders/patch.sh -R + /usr/share/code-features-insiders/patch.py code-features-insiders restore } post_upgrade() { - /usr/share/code-features-insiders/patch.sh + /usr/share/code-features-insiders/patch.py code-features-insiders patch } pre_remove() { - /usr/share/code-features-insiders/patch.sh -R + /usr/share/code-features-insiders/patch.py code-features-insiders restore + /usr/bin/rm -f /usr/share/code-features/cache.json } diff --git a/patch.json b/patch.json new file mode 100644 index 000000000000..98ba55105760 --- /dev/null +++ b/patch.json @@ -0,0 +1,794 @@ +{ + "nameShort": "Code - Insiders", + "nameLong": "Visual Studio Code - Insiders", + "applicationName": "code-insiders", + "serverApplicationName": "code-server-insiders", + "urlProtocol": "vscode-insiders", + "dataFolderName": ".vscode-insiders", + "serverDataFolderName": ".vscode-server-insiders", + "webUrl": "https://insiders.vscode.dev", + "webEndpointUrl": "https://main.vscode-cdn.net", + "webEndpointUrlTemplate": "https://{{uuid}}.vscode-cdn.net/{{quality}}/{{commit}}", + "webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/{{quality}}/{{commit}}/out/vs/workbench/contrib/webview/browser/pre/", + "commandPaletteSuggestedCommandIds": [ + "workbench.action.files.openFile", + "workbench.action.files.openFileFolder", + "workbench.action.files.openFolder", + "workbench.action.remote.showMenu", + "editor.action.formatDocument", + "editor.action.commentLine", + "workbench.action.tasks.runTask", + "workbench.action.openSettings2", + "workbench.action.selectTheme", + "workbench.action.openWalkthrough", + "workbench.action.openIssueReporter" + ], + "extensionKeywords": { + "md": [ + "Markdown" + ], + "js": [ + "JavaScript" + ], + "jsx": [ + "JavaScript" + ], + "es6": [ + "JavaScript" + ], + "html": [ + "Html" + ], + "ts": [ + "TypeScript" + ], + "tsx": [ + "TypeScript" + ], + "css": [ + "CSS" + ], + "scss": [ + "SASS" + ], + "txt": [ + "Text" + ], + "php": [ + "PHP" + ], + "php3": [ + "PHP" + ], + "php4": [ + "PHP" + ], + "ph3": [ + "PHP" + ], + "ph4": [ + "PHP" + ], + "xml": [ + "XML" + ], + "py": [ + "Python" + ], + "pyc": [ + "Python" + ], + "pyd": [ + "Python" + ], + "pyo": [ + "Python" + ], + "pyw": [ + "Python" + ], + "pyz": [ + "Python" + ], + "java": [ + "Java" + ], + "class": [ + "Java" + ], + "jar": [ + "Java" + ], + "c": [ + "c", + "objective c", + "objective-c" + ], + "m": [ + "objective c", + "objective-c" + ], + "mm": [ + "objective c", + "objective-c" + ], + "cpp": [ + "cpp", + "c plus plus", + "c", + "c++" + ], + "cc": [ + "cpp", + "c plus plus", + "c", + "c++" + ], + "cxx": [ + "cpp", + "c plus plus", + "c++" + ], + "hh": [ + "cpp", + "c plus plus", + "c++" + ], + "hpp": [ + "cpp", + "c++" + ], + "h": [ + "cpp", + "c plus plus", + "c++", + "c", + "objective c", + "objective-c" + ], + "sql": [ + "sql" + ], + "sh": [ + "bash" + ], + "bash": [ + "bash" + ], + "zsh": [ + "bash", + "zshell" + ], + "cs": [ + "c#", + "csharp" + ], + "csproj": [ + "c#", + "csharp" + ], + "sln": [ + "c#", + "csharp" + ], + "go": [ + "go" + ], + "sty": [ + "latex" + ], + "tex": [ + "latex" + ], + "ps": [ + "powershell" + ], + "ps1": [ + "powershell" + ], + "rs": [ + "rust" + ], + "rslib": [ + "rust" + ], + "hs": [ + "haskell" + ], + "lhs": [ + "haskell" + ], + "scm": [ + "scheme" + ], + "ss": [ + "scheme" + ], + "clj": [ + "clojure" + ], + "cljs": [ + "clojure" + ], + "cljc": [ + "clojure" + ], + "edn": [ + "clojure" + ], + "erl": [ + "erlang" + ], + "hrl": [ + "erlang" + ], + "scala": [ + "scala" + ], + "sc": [ + "scala" + ], + "pl": [ + "perl" + ], + "pm": [ + "perl" + ], + "t": [ + "perl" + ], + "pod": [ + "perl" + ], + "groovy": [ + "groovy" + ], + "swift": [ + "swift" + ], + "rb": [ + "ruby" + ], + "rbw": [ + "ruby" + ], + "jl": [ + "julia" + ], + "f": [ + "fortran" + ], + "for": [ + "fortran" + ], + "f90": [ + "fortran" + ], + "f95": [ + "fortran" + ], + "coffee": [ + "CoffeeScript" + ], + "litcoffee": [ + "CoffeeScript" + ], + "yaml": [ + "yaml" + ], + "yml": [ + "yaml" + ], + "dart": [ + "dart" + ], + "json": [ + "json" + ] + }, + "aiConfig": { + "ariaKey": "5bbf946d11a54f6783919c455abaddaf-fd62977b-c92d-4714-a45d-649d06980372-7168" + }, + "settingsSearchUrl": "https://bingsettingssearch.trafficmanager.net/api/Search", + "extensionEnabledApiProposals": { + "ms-vscode.vscode-selfhost-test-provider": [ + "testObserver" + ], + "VisualStudioExptTeam.vscodeintellicode-completions": [ + "inlineCompletionsAdditions" + ], + "ms-vsliveshare.vsliveshare": [ + "contribMenuBarHome", + "contribShareMenu", + "contribStatusBarItems", + "diffCommand", + "documentFiltersExclusive", + "fileSearchProvider", + "findTextInFiles", + "notebookCellExecutionState", + "notebookLiveShare", + "terminalDimensions", + "terminalDataWriteEvent", + "textSearchProvider" + ], + "ms-vscode.js-debug": [ + "portsAttributes", + "findTextInFiles", + "workspaceTrust", + "tunnels" + ], + "ms-toolsai.vscode-ai-remote": [ + "resolvers" + ], + "ms-python.python": [ + "contribEditorContentMenu", + "quickPickSortByLabel", + "portsAttributes", + "testObserver", + "envShellEvent", + "quickPickItemTooltip", + "terminalDataWriteEvent", + "envCollectionWorkspace", + "saveEditor", + "envCollectionOptions" + ], + "ms-dotnettools.dotnet-interactive-vscode": [ + "notebookMessaging", + "languageConfigurationAutoClosingPairs" + ], + "GitHub.codespaces": [ + "contribEditSessions", + "contribMenuBarHome", + "contribRemoteHelp", + "contribViewsRemote", + "resolvers", + "tunnels", + "terminalDataWriteEvent", + "treeViewReveal", + "notebookKernelSource" + ], + "ms-vscode.azure-repos": [ + "extensionRuntime", + "fileSearchProvider", + "textSearchProvider" + ], + "ms-vscode.remote-repositories": [ + "canonicalUriProvider", + "contribEditSessions", + "contribRemoteHelp", + "contribMenuBarHome", + "contribViewsRemote", + "contribViewsWelcome", + "contribShareMenu", + "documentFiltersExclusive", + "editSessionIdentityProvider", + "extensionRuntime", + "fileSearchProvider", + "quickPickSortByLabel", + "workspaceTrust", + "shareProvider", + "scmActionButton", + "scmSelectedProvider", + "scmValidation", + "textSearchProvider", + "timeline" + ], + "ms-vscode-remote.remote-wsl": [ + "resolvers", + "contribRemoteHelp", + "contribViewsRemote", + "telemetry" + ], + "ms-vscode-remote.remote-ssh": [ + "resolvers", + "tunnels", + "terminalDataWriteEvent", + "contribRemoteHelp", + "contribViewsRemote", + "telemetry" + ], + "ms-vscode.remote-server": [ + "resolvers", + "tunnels", + "contribViewsWelcome" + ], + "ms-vscode.remote-explorer": [ + "contribRemoteHelp", + "contribViewsRemote", + "extensionsAny" + ], + "ms-vscode-remote.remote-containers": [ + "contribEditSessions", + "resolvers", + "tunnels", + "workspaceTrust", + "terminalDimensions", + "contribRemoteHelp", + "contribViewsRemote" + ], + "ms-vscode.js-debug-nightly": [ + "portsAttributes", + "findTextInFiles", + "workspaceTrust", + "tunnels" + ], + "ms-vscode.lsif-browser": [ + "documentFiltersExclusive" + ], + "GitHub.vscode-pull-request-github": [ + "contribCommentThreadAdditionalMenu", + "tokenInformation", + "contribShareMenu", + "fileComments", + "contribCommentPeekContext", + "codiconDecoration", + "diffCommand", + "contribCommentEditorActionsMenu", + "readonlyMessage", + "treeViewMarkdownMessage", + "shareProvider", + "quickDiffProvider" + ], + "GitHub.copilot": [ + "inlineCompletionsAdditions", + "interactive", + "interactiveUserActions", + "semanticSimilarity", + "terminalDataWriteEvent" + ], + "GitHub.copilot-nightly": [ + "inlineCompletionsAdditions", + "interactive", + "interactiveUserActions", + "semanticSimilarity", + "terminalDataWriteEvent" + ], + "GitHub.copilot-chat": [ + "handleIssueUri", + "interactive", + "interactiveUserActions", + "semanticSimilarity", + "terminalContextMenu", + "terminalDataWriteEvent", + "terminalSelection", + "terminalQuickFixProvider", + "chatSlashCommands" + ], + "GitHub.remotehub": [ + "contribRemoteHelp", + "contribMenuBarHome", + "contribViewsRemote", + "contribViewsWelcome", + "documentFiltersExclusive", + "extensionRuntime", + "fileSearchProvider", + "quickPickSortByLabel", + "workspaceTrust", + "scmSelectedProvider", + "scmValidation", + "textSearchProvider", + "timeline" + ], + "ms-python.gather": [ + "notebookCellExecutionState" + ], + "ms-python.vscode-pylance": [ + "notebookCellExecutionState" + ], + "ms-toolsai.jupyter-renderers": [ + "contribNotebookStaticPreloads" + ], + "ms-toolsai.jupyter": [ + "notebookDeprecated", + "notebookMessaging", + "notebookMime", + "notebookCellExecutionState", + "portsAttributes", + "quickPickSortByLabel", + "notebookKernelSource", + "interactiveWindow", + "notebookControllerAffinityHidden", + "contribNotebookStaticPreloads", + "quickPickItemTooltip", + "notebookExecution" + ], + "dbaeumer.vscode-eslint": [ + "notebookCellExecutionState" + ], + "ms-vscode.azure-sphere-tools-ui": [ + "tunnels" + ], + "ms-azuretools.vscode-azureappservice": [ + "terminalDataWriteEvent" + ], + "ms-azuretools.vscode-azureresourcegroups": [ + "authGetSessions" + ], + "ms-vscode.anycode": [ + "extensionsAny" + ], + "ms-vscode.cpptools": [ + "terminalDataWriteEvent" + ], + "redhat.java": [ + "documentPaste" + ], + "ms-dotnettools.csdevkit": [ + "inlineCompletionsAdditions" + ], + "ms-dotnettools.vscodeintellicode-csharp": [ + "inlineCompletionsAdditions" + ], + "digitarald.chat-plugins": [ + "interactiveSlashCommands" + ], + "microsoft-IsvExpTools.powerplatform-vscode": [ + "fileSearchProvider", + "textSearchProvider" + ], + "microsoft-IsvExpTools.powerplatform-vscode-preview": [ + "fileSearchProvider", + "textSearchProvider" + ] + }, + "tasConfig": { + "endpoint": "https://default.exp-tas.com/vscode/ab", + "telemetryEventName": "query-expfeature", + "featuresTelemetryPropertyName": "VSCode.ABExp.Features", + "assignmentContextTelemetryPropertyName": "abexp.assignmentcontext" + }, + "extensionKind": { + "Shan.code-settings-sync": [ + "ui" + ], + "shalldie.background": [ + "ui" + ], + "techer.open-in-browser": [ + "ui" + ], + "CoenraadS.bracket-pair-colorizer-2": [ + "ui" + ], + "CoenraadS.bracket-pair-colorizer": [ + "ui", + "workspace" + ], + "hiro-sun.vscode-emacs": [ + "ui", + "workspace" + ], + "hnw.vscode-auto-open-markdown-preview": [ + "ui", + "workspace" + ], + "wayou.vscode-todo-highlight": [ + "ui", + "workspace" + ], + "aaron-bond.better-comments": [ + "ui", + "workspace" + ], + "vscodevim.vim": [ + "ui" + ], + "ollyhayes.colmak-vim": [ + "ui" + ] + }, + "extensionPointExtensionKind": { + "typescriptServerPlugins": [ + "workspace" + ] + }, + "extensionSyncedKeys": { + "ritwickdey.liveserver": [ + "liveServer.setup.version" + ] + }, + "extensionVirtualWorkspacesSupport": { + "esbenp.prettier-vscode": { + "default": false + }, + "msjsdiag.debugger-for-chrome": { + "default": false + }, + "redhat.java": { + "default": false + }, + "HookyQR.beautify": { + "default": false + }, + "ritwickdey.LiveServer": { + "default": false + }, + "VisualStudioExptTeam.vscodeintellicode": { + "default": false + }, + "octref.vetur": { + "default": false + }, + "formulahendry.code-runner": { + "default": false + }, + "xdebug.php-debug": { + "default": false + }, + "ms-mssql.mssql": { + "default": false + }, + "christian-kohler.path-intellisense": { + "default": false + }, + "eg2.tslint": { + "default": false + }, + "eg2.vscode-npm-script": { + "default": false + }, + "donjayamanne.githistory": { + "default": false + }, + "Zignd.html-css-class-completion": { + "default": false + }, + "christian-kohler.npm-intellisense": { + "default": false + }, + "EditorConfig.EditorConfig": { + "default": false + }, + "austin.code-gnu-global": { + "default": false + }, + "johnpapa.Angular2": { + "default": false + }, + "ms-vscode.vscode-typescript-tslint-plugin": { + "default": false + }, + "DotJoshJohnson.xml": { + "default": false + }, + "techer.open-in-browser": { + "default": false + }, + "tht13.python": { + "default": false + }, + "bmewburn.vscode-intelephense-client": { + "default": false + }, + "Angular.ng-template": { + "default": false + }, + "xdebug.php-pack": { + "default": false + }, + "dbaeumer.jshint": { + "default": false + }, + "yzhang.markdown-all-in-one": { + "default": false + }, + "Dart-Code.flutter": { + "default": false + }, + "streetsidesoftware.code-spell-checker": { + "default": false + }, + "rebornix.Ruby": { + "default": false + }, + "ms-vscode.sublime-keybindings": { + "default": false + }, + "mitaki28.vscode-clang": { + "default": false + }, + "steoates.autoimport": { + "default": false + }, + "donjayamanne.python-extension-pack": { + "default": false + }, + "shd101wyy.markdown-preview-enhanced": { + "default": false + }, + "mikestead.dotenv": { + "default": false + }, + "pranaygp.vscode-css-peek": { + "default": false + }, + "ikappas.phpcs": { + "default": false + }, + "platformio.platformio-ide": { + "default": false + }, + "jchannon.csharpextensions": { + "default": false + }, + "gruntfuggly.todo-tree": { + "default": false + } + }, + "trustedExtensionAuthAccess": [ + "vscode.git", + "vscode.github", + "ms-vscode.remote-repositories", + "github.remotehub", + "ms-vscode.azure-repos", + "ms-vscode.remote-server", + "github.vscode-pull-request-github", + "github.codespaces", + "ms-vsliveshare.vsliveshare", + "github.copilot", + "github.copilot-chat", + "ms-azuretools.vscode-azureresourcegroups", + "ms-edu.vscode-learning" + ], + "auth": { + "loginUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token", + "redirectUrl": "https://vscode-redirect.azurewebsites.net/", + "clientId": "aebc6443-996d-45c2-90f0-388ff96faa56" + }, + "configurationSync.store": { + "url": "https://vscode-sync-insiders.trafficmanager.net/", + "stableUrl": "https://vscode-sync.trafficmanager.net/", + "insidersUrl": "https://vscode-sync-insiders.trafficmanager.net/", + "canSwitch": true, + "authenticationProviders": { + "github": { + "scopes": [ + "user:email" + ] + }, + "microsoft": { + "scopes": [ + "openid", + "profile", + "email", + "offline_access" + ] + } + } + }, + "editSessions.store": { + "url": "https://vscode-sync.trafficmanager.net/", + "authenticationProviders": { + "microsoft": { + "scopes": [ + "openid", + "profile", + "email", + "offline_access" + ] + }, + "github": { + "scopes": [ + "user:email" + ] + } + } + }, + "tunnelApplicationName": "code-tunnel-insiders", + "tunnelApplicationConfig": { + "editorWebUrl": "https://insiders.vscode.dev", + "extension": { + "friendlyName": "Remote - Tunnels", + "extensionId": "ms-vscode.remote-server" + }, + "authenticationProviders": { + "github": { + "scopes": [ + "user:email", + "read:org" + ] + } + } + } +}
\ No newline at end of file diff --git a/patch.py b/patch.py new file mode 100755 index 000000000000..8e0cb7665ee8 --- /dev/null +++ b/patch.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 + +import sys +import json +import os + +pkt_name = sys.argv[1] +operation = sys.argv[2] + +product_path = "/usr/lib/code/product.json" +patch_path = "/usr/share/%s/patch.json" % pkt_name +cache_path = "/usr/share/%s/cache.json" % pkt_name + +if not os.path.exists(cache_path): + with open(cache_path, 'w') as file: + file.write("{}") + +def patch(): + with open(product_path, "r") as product_file: + product_data = json.load(product_file) + with open(patch_path, "r") as patch_file: + patch_data = json.load(patch_file) + cache_data = {} + for key in patch_data.keys(): + if key in product_data: + cache_data[key] = product_data[key] + product_data[key] = patch_data[key] + with open(product_path, "w") as product_file: + json.dump(product_data, product_file, indent='\t') + with open(cache_path, "w") as cache_file: + json.dump(cache_data, cache_file, indent='\t') + +def restore(): + with open(product_path, "r") as product_file: + product_data = json.load(product_file) + with open(patch_path, "r") as patch_file: + patch_data = json.load(patch_file) + with open(cache_path, "r") as cache_file: + cache_data = json.load(cache_file) + for key in patch_data.keys(): + if key in product_data: + del product_data[key] + for key in cache_data.keys(): + product_data[key] = cache_data[key] + with open(product_path, "w") as product_file: + json.dump(product_data, product_file, indent='\t') + +if operation == "patch": + patch() +elif operation == "restore": + restore() diff --git a/patch.sh b/patch.sh deleted file mode 100755 index 2ce52c42cbb0..000000000000 --- a/patch.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env sh - -if [ "${1}" = "-R" ]; then - sed -i -e 's/^[[:blank:]]*"nameLong":.*/\t"nameLong": "Code - OSS",/' \ - -e 's/^[[:blank:]]*"tunnelApplicationName":.*/\t"tunnelApplicationName": "code-tunnel-oss",/' \ - -e '/^[[:blank:]]*"extensionEnabledApiProposals"/d' \ - -e '/^[[:blank:]]*"extensionSyncedKeys/d' \ - /usr/lib/code/product.json -else - # To patch proposed api: - # Use vim to visual select "extensionEnabledApiProposals" - # Then press :join<CR> - # To patch sync server: - # Use vim to visual select "extensionSyncedKeys" "trustedExtensionAuthAccess" "auth" "configurationSync.store" "enableSyncingProfiles" "editSessions.store" "tunnelApplicationConfig" - # Then press :join<CR> - # Select joined line and execute :'<,'>s/\//\\\//g - sed -i -e 's/^[[:blank:]]*"nameLong":.*/\t"nameLong": "Visual Studio Code - Insiders",/' \ - -e 's/^[[:blank:]]*"tunnelApplicationName":.*/\t"tunnelApplicationName": "code-tunnel-insiders",/' \ - -e '/^[[:blank:]]*"extensionsGallery"/i\\t"extensionEnabledApiProposals": { "ms-vscode.vscode-selfhost-test-provider": ["testObserver"], "VisualStudioExptTeam.vscodeintellicode-completions": ["inlineCompletionsAdditions"], "ms-vsliveshare.vsliveshare": ["contribMenuBarHome", "contribShareMenu", "contribStatusBarItems", "diffCommand", "documentFiltersExclusive", "fileSearchProvider", "findTextInFiles", "notebookCellExecutionState", "notebookLiveShare", "terminalDimensions", "terminalDataWriteEvent", "textSearchProvider"], "ms-vscode.js-debug": ["portsAttributes", "findTextInFiles", "workspaceTrust", "tunnels"], "ms-toolsai.vscode-ai-remote": ["resolvers"], "ms-python.python": ["contribEditorContentMenu", "quickPickSortByLabel", "portsAttributes", "testObserver", "envShellEvent", "quickPickItemTooltip", "terminalDataWriteEvent", "envCollectionWorkspace", "saveEditor", "envCollectionOptions"], "ms-dotnettools.dotnet-interactive-vscode": ["notebookMessaging"], "GitHub.codespaces": ["contribEditSessions", "contribMenuBarHome", "contribRemoteHelp", "contribViewsRemote", "resolvers", "tunnels", "terminalDataWriteEvent", "treeViewReveal", "notebookKernelSource"], "ms-vscode.azure-repos": ["extensionRuntime", "fileSearchProvider", "textSearchProvider"], "ms-vscode.remote-repositories": ["canonicalUriProvider", "contribEditSessions", "contribRemoteHelp", "contribMenuBarHome", "contribViewsRemote", "contribViewsWelcome", "contribShareMenu", "documentFiltersExclusive", "editSessionIdentityProvider", "extensionRuntime", "fileSearchProvider", "quickPickSortByLabel", "workspaceTrust", "shareProvider", "scmActionButton", "scmSelectedProvider", "scmValidation", "textSearchProvider", "timeline"], "ms-vscode-remote.remote-wsl": ["resolvers", "contribRemoteHelp", "contribViewsRemote", "telemetry"], "ms-vscode-remote.remote-ssh": ["resolvers", "tunnels", "terminalDataWriteEvent", "contribRemoteHelp", "contribViewsRemote", "telemetry"], "ms-vscode.remote-server": ["resolvers", "tunnels"], "ms-vscode.remote-explorer": ["contribRemoteHelp", "contribViewsRemote", "extensionsAny"], "ms-vscode-remote.remote-containers": ["contribEditSessions", "resolvers", "tunnels", "workspaceTrust", "terminalDimensions", "contribRemoteHelp", "contribViewsRemote"], "ms-vscode.js-debug-nightly": ["portsAttributes", "findTextInFiles", "workspaceTrust", "tunnels"], "ms-vscode.lsif-browser": ["documentFiltersExclusive"], "GitHub.vscode-pull-request-github": ["contribCommentThreadAdditionalMenu", "tokenInformation", "contribShareMenu", "fileComments", "contribCommentPeekContext", "treeItemCheckbox", "codiconDecoration", "diffCommand", "contribCommentEditorActionsMenu", "shareProvider", "quickDiffProvider"], "GitHub.copilot": ["inlineCompletionsAdditions", "interactive", "interactiveUserActions", "semanticSimilarity", "terminalDataWriteEvent"], "GitHub.copilot-nightly": ["inlineCompletionsAdditions", "interactive", "interactiveUserActions", "semanticSimilarity", "terminalDataWriteEvent"], "GitHub.copilot-chat": ["handleIssueUri", "interactive", "interactiveUserActions", "semanticSimilarity", "terminalDataWriteEvent"], "GitHub.remotehub": ["contribRemoteHelp", "contribMenuBarHome", "contribViewsRemote", "contribViewsWelcome", "documentFiltersExclusive", "extensionRuntime", "fileSearchProvider", "quickPickSortByLabel", "workspaceTrust", "scmSelectedProvider", "scmValidation", "textSearchProvider", "timeline"], "ms-python.gather": ["notebookCellExecutionState"], "ms-python.vscode-pylance": ["notebookCellExecutionState"], "ms-toolsai.jupyter-renderers": ["contribNotebookStaticPreloads"], "ms-toolsai.jupyter": ["notebookDeprecated", "notebookMessaging", "notebookMime", "notebookCellExecutionState", "portsAttributes", "quickPickSortByLabel", "notebookKernelSource", "interactiveWindow", "notebookControllerAffinityHidden", "contribNotebookStaticPreloads", "quickPickItemTooltip", "notebookExecution"], "dbaeumer.vscode-eslint": ["notebookCellExecutionState"], "ms-vscode.azure-sphere-tools-ui": ["tunnels"], "ms-azuretools.vscode-azureappservice": ["terminalDataWriteEvent"], "ms-azuretools.vscode-azureresourcegroups": ["authGetSessions"], "ms-vscode.anycode": ["extensionsAny"], "ms-vscode.cpptools": ["terminalDataWriteEvent"], "redhat.java": ["documentPaste"], "ms-dotnettools.csdevkit": ["inlineCompletionsAdditions"], "ms-dotnettools.vscodeintellicode-csharp": ["inlineCompletionsAdditions"], "digitarald.chat-plugins": ["interactiveSlashCommands"] },' \ - -e '/^[[:blank:]]*"extensionsGallery/i\\t"extensionSyncedKeys": { "ritwickdey.liveserver": ["liveServer.setup.version"] }, "trustedExtensionAuthAccess": ["vscode.git", "vscode.github", "ms-vscode.remote-repositories", "github.remotehub", "ms-vscode.azure-repos", "ms-vscode.remote-server", "github.vscode-pull-request-github", "github.codespaces", "ms-vsliveshare.vsliveshare", "github.copilot", "github.copilot-chat", "ms-azuretools.vscode-azureresourcegroups"], "auth": { "loginUrl": "https:\/\/login.microsoftonline.com\/common\/oauth2\/authorize", "tokenUrl": "https:\/\/login.microsoftonline.com\/common\/oauth2\/token", "redirectUrl": "https:\/\/vscode-redirect.azurewebsites.net\/", "clientId": "aebc6443-996d-45c2-90f0-388ff96faa56" }, "configurationSync.store": { "url": "https:\/\/vscode-sync-insiders.trafficmanager.net\/", "stableUrl": "https:\/\/vscode-sync.trafficmanager.net\/", "insidersUrl": "https:\/\/vscode-sync-insiders.trafficmanager.net\/", "canSwitch": true, "authenticationProviders": { "github": { "scopes": ["user:email"] }, "microsoft": { "scopes": ["openid", "profile", "email", "offline_access"] } } }, "enableSyncingProfiles": true, "editSessions.store": { "url": "https:\/\/vscode-sync.trafficmanager.net\/", "authenticationProviders": { "microsoft": { "scopes": ["openid", "profile", "email", "offline_access"] }, "github": { "scopes": ["user:email"] } } }, "tunnelApplicationConfig": { "editorWebUrl": "https:\/\/insiders.vscode.dev", "extension": { "friendlyName": "Remote - Tunnels", "extensionId": "ms-vscode.remote-server" }, "authenticationProviders": { "github": { "scopes": ["user:email", "read:org"] } } },' \ - /usr/lib/code/product.json -fi diff --git a/update.py b/update.py new file mode 100755 index 000000000000..ff54586d9a35 --- /dev/null +++ b/update.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 + +# This script can update the content of ./patch.json to the latest version +# Usage: ./update.py /path/to/extracted/produce.json +# Where /path/to/extracted/produce.json is extracted from the latest version of official vscode release + +import sys +import json + +key_list = [ + "nameShort", + "nameLong", + "applicationName", + "serverApplicationName", + "urlProtocol", + "dataFolderName", + "serverDataFolderName", + "webUrl", + "webEndpointUrl", + "webEndpointUrlTemplate", + "webviewContentExternalBaseUrlTemplate", + "commandPaletteSuggestedCommandIds", + "extensionKeywords", + "aiConfig", + "settingsSearchUrl", + "extensionEnabledApiProposals", + "tasConfig", + "extensionKind", + "extensionPointExtensionKind", + "extensionSyncedKeys", + "extensionVirtualWorkspacesSupport", + "trustedExtensionAuthAccess", + "auth", + "configurationSync.store", + "editSessions.store", + "tunnelApplicationName", + "tunnelApplicationConfig" +] + +product_path = sys.argv[1] +patch_path = "patch.json" + +with open(product_path, "r") as product_file: + product_data = json.load(product_file) + +patch_data = {} + +for key in key_list: + patch_data[key] = product_data[key] + +with open(patch_path, "w") as patch_file: + json.dump(patch_data, patch_file, indent='\t') |