Skip to content

Commit 01a2f96

Browse files
Add a patch to display Code Editor and Code OSS version in the About Section and refactor other patches (#37)
1 parent adcd6a5 commit 01a2f96

9 files changed

+117
-76
lines changed

patches/common/integration.diff

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
Index: third-party-src/product.json
2+
===================================================================
3+
--- third-party-src.orig/product.json
4+
+++ third-party-src/product.json
5+
@@ -1,18 +1,19 @@
6+
{
7+
- "nameShort": "Code - OSS",
8+
- "nameLong": "Code - OSS",
9+
- "applicationName": "code-oss",
10+
- "dataFolderName": ".vscode-oss",
11+
+ "nameShort": "Code Editor",
12+
+ "nameLong": "Code Editor",
13+
+ "codeEditorVersion": "1.0.0",
14+
+ "applicationName": "code",
15+
+ "dataFolderName": ".vscode-editor",
16+
"win32MutexName": "vscodeoss",
17+
"licenseName": "MIT",
18+
- "licenseUrl": "https://github.com/microsoft/vscode/blob/main/LICENSE.txt",
19+
- "serverLicenseUrl": "https://github.com/microsoft/vscode/blob/main/LICENSE.txt",
20+
+ "licenseUrl": "https://github.com/aws/code-editor/blob/main/LICENSE",
21+
+ "serverLicenseUrl": "https://github.com/aws/code-editor/blob/main/LICENSE",
22+
"serverGreeting": [],
23+
"serverLicense": [],
24+
"serverLicensePrompt": "",
25+
- "serverApplicationName": "code-server-oss",
26+
- "serverDataFolderName": ".vscode-server-oss",
27+
- "tunnelApplicationName": "code-tunnel-oss",
28+
+ "serverApplicationName": "code-editor-server",
29+
+ "serverDataFolderName": ".code-editor-server",
30+
+ "tunnelApplicationName": "code-editor-tunnel",
31+
"win32DirName": "Microsoft Code OSS",
32+
"win32NameVersion": "Microsoft Code OSS",
33+
"win32RegValueName": "CodeOSS",
34+
@@ -27,9 +28,9 @@
35+
"darwinBundleIdentifier": "com.visualstudio.code.oss",
36+
"darwinProfileUUID": "47827DD9-4734-49A0-AF80-7E19B11495CC",
37+
"darwinProfilePayloadUUID": "CF808BE7-53F3-46C6-A7E2-7EDB98A5E959",
38+
- "linuxIconName": "code-oss",
39+
+ "linuxIconName": "code-editor",
40+
"licenseFileName": "LICENSE.txt",
41+
- "reportIssueUrl": "https://github.com/microsoft/vscode/issues/new",
42+
+ "reportIssueUrl": "https://github.com/aws/code-editor/issues/new",
43+
"nodejsRepository": "https://nodejs.org",
44+
"urlProtocol": "code-oss",
45+
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/insider/ef65ac1ba57f57f2a3961bfe94aa20481caca4c6/out/vs/workbench/contrib/webview/browser/pre/",
46+
Index: third-party-src/src/vs/base/common/product.ts
47+
===================================================================
48+
--- third-party-src.orig/src/vs/base/common/product.ts
49+
+++ third-party-src/src/vs/base/common/product.ts
50+
@@ -60,6 +60,7 @@ export interface IProductConfiguration {
51+
readonly date?: string;
52+
readonly quality?: string;
53+
readonly commit?: string;
54+
+ readonly codeEditorVersion?: string;
55+
56+
readonly nameShort: string;
57+
readonly nameLong: string;
58+
Index: third-party-src/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
59+
===================================================================
60+
--- third-party-src.orig/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
61+
+++ third-party-src/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
62+
@@ -79,9 +79,9 @@ export class BrowserDialogHandler extend
63+
async about(): Promise<void> {
64+
const detailString = (useAgo: boolean): string => {
65+
return localize('aboutDetail',
66+
- "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
67+
+ "Code Editor Version: {0}\nCode - OSS Version: {1}\nDate: {2}\nBrowser: {3}",
68+
+ this.productService.codeEditorVersion || 'Unknown',
69+
this.productService.version || 'Unknown',
70+
- this.productService.commit || 'Unknown',
71+
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
72+
navigator.userAgent
73+
);
74+
Index: third-party-src/src/vs/platform/product/common/product.ts
75+
===================================================================
76+
--- third-party-src.orig/src/vs/platform/product/common/product.ts
77+
+++ third-party-src/src/vs/platform/product/common/product.ts
78+
@@ -61,8 +61,8 @@ else {
79+
if (Object.keys(product).length === 0) {
80+
Object.assign(product, {
81+
version: '1.95.0-dev',
82+
- nameShort: 'Code - OSS Dev',
83+
- nameLong: 'Code - OSS Dev',
84+
+ nameShort: 'Code Editor',
85+
+ nameLong: 'Code Editor',
86+
applicationName: 'code-oss',
87+
dataFolderName: '.vscode-oss',
88+
urlProtocol: 'code-oss',

patches/sagemaker.series

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
common/preapplied/remove-unsafe-headers.diff
12
common/disable-online-services.diff
23
common/disable-telemetry-service.diff
34
common/remove-accounts-feature.diff
@@ -14,6 +15,7 @@ common/suppress-known-errors-script.diff
1415
common/service-worker-fix.diff
1516
common/proposed-api.diff
1617
common/build.diff
18+
common/integration.diff
1719
web-server/suppress-known-errors-build-integration.diff
1820
web-server/local-storage.diff
1921
web-server/base-path.diff

patches/sagemaker/sagemaker-integration.diff

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,17 @@ Index: third-party-src/product.json
9191
===================================================================
9292
--- third-party-src.orig/product.json
9393
+++ third-party-src/product.json
94-
@@ -16,6 +16,6 @@
95-
],
94+
@@ -9,8 +9,8 @@
95+
"nlsBaseUrl": "",
96+
"publisherUrl": ""
97+
},
9698
- "nameShort": "Code Editor",
9799
- "nameLong": "Code Editor",
98100
+ "nameShort": "SageMaker Code Editor",
99101
+ "nameLong": "SageMaker Code Editor",
102+
"codeEditorVersion": "1.0.0",
100103
"applicationName": "code",
101104
"dataFolderName": ".vscode-editor",
102-
"win32MutexName": "vscodeoss",
103105
Index: third-party-src/src/vs/platform/product/common/product.ts
104106
===================================================================
105107
--- third-party-src.orig/src/vs/platform/product/common/product.ts

patches/web-embedded-with-terminal.series

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
common/preapplied/remove-unsafe-headers.diff
12
common/disable-online-services.diff
23
common/disable-telemetry-service.diff
34
common/remove-accounts-feature.diff
@@ -14,6 +15,7 @@ common/suppress-known-errors-script.diff
1415
common/service-worker-fix.diff
1516
common/proposed-api.diff
1617
common/build.diff
18+
common/integration.diff
1719
web-embedded/readd-workbench.diff
1820
web-embedded/suppress-known-errors-build-integration.diff
1921
web-embedded/disable-built-in-walkthroughs-from-c.diff

patches/web-embedded.series

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
common/preapplied/remove-unsafe-headers.diff
12
common/disable-online-services.diff
23
common/disable-telemetry-service.diff
34
common/remove-accounts-feature.diff
@@ -14,6 +15,7 @@ common/suppress-known-errors-script.diff
1415
common/service-worker-fix.diff
1516
common/proposed-api.diff
1617
common/build.diff
18+
common/integration.diff
1719
web-embedded/readd-workbench.diff
1820
web-embedded/suppress-known-errors-build-integration.diff
1921
web-embedded/disable-built-in-walkthroughs-from-c.diff
@@ -40,4 +42,4 @@ web-embedded/add-default-loader.diff
4042
web-embedded/fix-watch-target.diff
4143
web-embedded/remove-unused-recommended-extensions-action.diff
4244
web-embedded/remove-new-window-actions-and-profile-workspace-section.diff
43-
web-embedded/only-allow-trusted-origins-in-webviews.diff
45+
web-embedded/only-allow-trusted-origins-in-webviews.diff

patches/web-embedded/remove-unsafe-eval-and-unsafe-inline-from-csp-direct.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ Index: third-party-src/src/vs/workbench/services/extensions/worker/webWorkerExte
6969
+ script-src 'self' 'sha256-cl8ijlOzEe+0GRCQNJQu2k6nUQ0fAYNYIuuKEm72JDs=' https: http://localhost:* blob:;
7070
connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
7171
</head>
72-
<body>
72+
<body>

patches/web-embedded/revise-help-about-modal-content-and-buttons.diff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ Index: third-party-src/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
5252
- const detailString = (useAgo: boolean): string => {
5353
+ const detailString = (): string => {
5454
return localize('aboutDetail',
55-
- "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
55+
- "Code Editor Version: {0}\nCode - OSS Version: {1}\nDate: {2}\nBrowser: {3}",
56+
- this.productService.codeEditorVersion || 'Unknown',
5657
- this.productService.version || 'Unknown',
57-
- this.productService.commit || 'Unknown',
5858
- this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
5959
- navigator.userAgent
6060
+ "Note: The Lambda Code Editor doesn't include all of the features available in the desktop application. To use features like the terminal and debugger, download your code and use the desktop version.",

patches/web-server.series

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
common/preapplied/remove-unsafe-headers.diff
12
common/disable-online-services.diff
23
common/disable-telemetry-service.diff
34
common/remove-accounts-feature.diff
@@ -14,6 +15,7 @@ common/suppress-known-errors-script.diff
1415
common/service-worker-fix.diff
1516
common/proposed-api.diff
1617
common/build.diff
18+
common/integration.diff
1719
web-server/suppress-known-errors-build-integration.diff
1820
web-server/local-storage.diff
1921
web-server/base-path.diff

patches/web-server/integration.diff

Lines changed: 12 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ Index: third-party-src/product.json
22
===================================================================
33
--- third-party-src.orig/product.json
44
+++ third-party-src/product.json
5-
@@ -1,18 +1,33 @@
5+
@@ -1,4 +1,14 @@
66
{
7-
- "nameShort": "Code - OSS",
8-
- "nameLong": "Code - OSS",
9-
- "applicationName": "code-oss",
10-
- "dataFolderName": ".vscode-oss",
117
+ "extensionsGallery": {
128
+ "serviceUrl": "https://open-vsx.org/vscode/gallery",
139
+ "itemUrl": "https://open-vsx.org/vscode/item",
@@ -18,60 +14,20 @@ Index: third-party-src/product.json
1814
+ "nlsBaseUrl": "",
1915
+ "publisherUrl": ""
2016
+ },
21-
+ "linkProtectionTrustedDomains": [
17+
"nameShort": "Code Editor",
18+
"nameLong": "Code Editor",
19+
"codeEditorVersion": "1.0.0",
20+
@@ -44,6 +54,9 @@
21+
"https://console.aws.amazon.com",
22+
"https://console.amazonaws-us-gov.com",
23+
"https://console.amazonaws.cn",
24+
- "https://aws.amazon.com"
25+
+ "https://aws.amazon.com",
2226
+ "https://open-vsx.org",
2327
+ "https://oidc.*.amazonaws.com",
2428
+ "https://device.sso.*.amazonaws.com"
25-
+ ],
26-
+ "nameShort": "Code Editor",
27-
+ "nameLong": "Code Editor",
28-
+ "applicationName": "code",
29-
+ "dataFolderName": ".vscode-editor",
30-
"win32MutexName": "vscodeoss",
31-
"licenseName": "MIT",
32-
- "licenseUrl": "https://github.com/microsoft/vscode/blob/main/LICENSE.txt",
33-
- "serverLicenseUrl": "https://github.com/microsoft/vscode/blob/main/LICENSE.txt",
34-
+ "licenseUrl": "https://github.com/aws/code-editor/blob/main/LICENSE",
35-
+ "serverLicenseUrl": "https://github.com/aws/code-editor/blob/main/LICENSE",
36-
"serverGreeting": [],
37-
"serverLicense": [],
38-
"serverLicensePrompt": "",
39-
- "serverApplicationName": "code-server-oss",
40-
- "serverDataFolderName": ".vscode-server-oss",
41-
- "tunnelApplicationName": "code-tunnel-oss",
42-
+ "serverApplicationName": "code-editor-server",
43-
+ "serverDataFolderName": ".code-editor-server",
44-
+ "tunnelApplicationName": "code-editor-tunnel",
45-
"win32DirName": "Microsoft Code OSS",
46-
"win32NameVersion": "Microsoft Code OSS",
47-
"win32RegValueName": "CodeOSS",
48-
@@ -27,9 +41,9 @@
49-
"darwinBundleIdentifier": "com.visualstudio.code.oss",
50-
"darwinProfileUUID": "47827DD9-4734-49A0-AF80-7E19B11495CC",
51-
"darwinProfilePayloadUUID": "CF808BE7-53F3-46C6-A7E2-7EDB98A5E959",
52-
- "linuxIconName": "code-oss",
53-
+ "linuxIconName": "code-editor",
54-
"licenseFileName": "LICENSE.txt",
55-
- "reportIssueUrl": "https://github.com/microsoft/vscode/issues/new",
56-
+ "reportIssueUrl": "https://github.com/aws/code-editor/issues/new",
57-
"nodejsRepository": "https://nodejs.org",
58-
"urlProtocol": "code-oss",
59-
"webviewContentExternalBaseUrlTemplate": "https://{{uuid}}.vscode-cdn.net/insider/ef65ac1ba57f57f2a3961bfe94aa20481caca4c6/out/vs/workbench/contrib/webview/browser/pre/",
60-
Index: third-party-src/src/vs/platform/product/common/product.ts
61-
===================================================================
62-
--- third-party-src.orig/src/vs/platform/product/common/product.ts
63-
+++ third-party-src/src/vs/platform/product/common/product.ts
64-
@@ -61,8 +61,8 @@ else {
65-
if (Object.keys(product).length === 0) {
66-
Object.assign(product, {
67-
version: '1.95.0-dev',
68-
- nameShort: 'Code - OSS Dev',
69-
- nameLong: 'Code - OSS Dev',
70-
+ nameShort: 'Code Editor',
71-
+ nameLong: 'Code Editor',
72-
applicationName: 'code-oss',
73-
dataFolderName: '.vscode-oss',
74-
urlProtocol: 'code-oss',
29+
]
30+
}
7531
Index: third-party-src/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
7632
===================================================================
7733
--- third-party-src.orig/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
@@ -114,19 +70,6 @@ Index: third-party-src/src/vs/workbench/api/common/extHostLocalizationService.ts
11470
}
11571

11672
getBundle(extensionId: string): { [key: string]: string } | undefined {
117-
Index: third-party-src/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
118-
===================================================================
119-
--- third-party-src.orig/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
120-
+++ third-party-src/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
121-
@@ -79,7 +79,7 @@ export class BrowserDialogHandler extend
122-
async about(): Promise<void> {
123-
const detailString = (useAgo: boolean): string => {
124-
return localize('aboutDetail',
125-
- "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
126-
+ "Version: {0}\nDate: {2}\nBrowser: {3}",
127-
this.productService.version || 'Unknown',
128-
this.productService.commit || 'Unknown',
129-
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
13073
Index: third-party-src/extensions/git/package.nls.json
13174
===================================================================
13275
--- third-party-src.orig/extensions/git/package.nls.json

0 commit comments

Comments
 (0)