Skip to content

Commit b0b5c4e

Browse files
authored
Merge branch 'main' into aamunger/scrapbookIW
2 parents f5e494e + 1c95491 commit b0b5c4e

File tree

98 files changed

+1048
-625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+1048
-625
lines changed

build/.moduleignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ vsda/src/**
102102
vsda/.gitignore
103103
vsda/binding.gyp
104104
vsda/README.md
105+
vsda/SECURITY.md
105106
vsda/targets
106107
!vsda/build/Release/vsda.node
107108

build/.webignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,5 @@ xterm-addon-webgl/out/**
4949
!@microsoft/applicationinsights-core-js/browser/applicationinsights-core-js.min.js
5050
!@microsoft/applicationinsights-shims/dist/umd/applicationinsights-shims.min.js
5151

52-
53-
54-
52+
vsda/**
53+
!vsda/rust/web/**

build/azure-pipelines/darwin/app-entitlements.plist

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
<dict>
55
<key>com.apple.security.cs.allow-jit</key>
66
<true/>
7-
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
8-
<true/>
9-
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
10-
<true/>
11-
<key>com.apple.security.cs.disable-library-validation</key>
12-
<true/>
137
<key>com.apple.security.device.audio-input</key>
148
<true/>
159
<key>com.apple.security.device.camera</key>

build/lib/builtInExtensionsCG.js

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

build/lib/builtInExtensionsCG.ts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import got from 'got';
6+
import fetch from 'node-fetch';
77
import * as fs from 'fs';
88
import * as path from 'path';
99
import * as url from 'url';
@@ -25,23 +25,24 @@ async function downloadExtensionDetails(extension: IExtensionDefinition): Promis
2525
const repository = url.parse(extension.repo).path!.substr(1);
2626
const repositoryContentBaseUrl = `https://${token ? `${token}@` : ''}${contentBasePath}/${repository}/v${extension.version}`;
2727

28-
const promises = [];
29-
for (const fileName of contentFileNames) {
30-
promises.push(new Promise<{ fileName: string; body: Buffer | undefined | null }>(resolve => {
31-
got(`${repositoryContentBaseUrl}/${fileName}`)
32-
.then(response => {
33-
resolve({ fileName, body: response.rawBody });
34-
})
35-
.catch(error => {
36-
if (error.response.statusCode === 404) {
37-
resolve({ fileName, body: undefined });
38-
} else {
39-
resolve({ fileName, body: null });
40-
}
41-
});
42-
}));
28+
29+
async function getContent(fileName: string): Promise<{ fileName: string; body: Buffer | undefined | null }> {
30+
try {
31+
const response = await fetch(`${repositoryContentBaseUrl}/${fileName}`);
32+
if (response.ok) {
33+
return { fileName, body: await response.buffer() };
34+
} else if (response.status === 404) {
35+
return { fileName, body: undefined };
36+
} else {
37+
return { fileName, body: null };
38+
}
39+
} catch (e) {
40+
return { fileName, body: null };
41+
}
4342
}
4443

44+
const promises = contentFileNames.map(getContent);
45+
4546
console.log(extensionLabel);
4647
const results = await Promise.all(promises);
4748
for (const result of results) {

build/lib/github.js

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

0 commit comments

Comments
 (0)