Skip to content

Commit 29ede11

Browse files
enicioMagnunAVFAzion
authored andcommitted
feat: add tty and https polyfills
1 parent 2fc4ba0 commit 29ede11

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

lib/presets/custom/next/compute/config.js

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ const config = {
6868
async_hooks: false,
6969
tls: false,
7070
net: false,
71+
child_process: false,
72+
https: require.resolve('https-browserify'),
73+
tty: require.resolve('tty-browserify'),
7174
http: require.resolve('stream-http'),
7275
buffer: require.resolve('buffer/'),
7376
crypto: require.resolve('crypto-browserify/'),

lib/presets/custom/next/compute/node/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function run(nextVersion, buildContext) {
5252
// STATICS
5353
const buildStatic = new BuildStatic({
5454
rootDir,
55-
includeDirs: ['./.next', './public'],
55+
includeDirs: ['./.next', 'public'],
5656
staticDirs: ['public', '.next/static'],
5757
excludeDirs: ['./.next/cache', 'node_modules'],
5858
out: OUT_DIR_CUSTOM_SERVER,

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"fast-glob": "^3.3.1",
6868
"form-data": "^4.0.0",
6969
"hexo": "^7.0.0-rc2",
70+
"https-browserify": "^1.0.0",
7071
"inquirer": "^9.2.7",
7172
"install": "^0.13.0",
7273
"lodash": "^4.17.21",
@@ -85,6 +86,7 @@
8586
"stream-browserify": "^3.0.0",
8687
"stream-http": "^3.2.0",
8788
"string_decoder": "^1.3.0",
89+
"tty-browserify": "^0.0.1",
8890
"url": "^0.11.1",
8991
"util": "^0.12.5",
9092
"webpack": "^5.84.0",
@@ -151,4 +153,4 @@
151153
"url": "https://github.com/aziontech/vulcan/issues"
152154
},
153155
"homepage": "https://github.com/aziontech/vulcan#readme"
154-
}
156+
}

yarn.lock

+19-4
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,11 @@
408408
resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz"
409409
integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==
410410

411+
"@babel/helper-string-parser@^7.23.4":
412+
version "7.23.4"
413+
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83"
414+
integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==
415+
411416
"@babel/helper-validator-identifier@^7.22.15", "@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.22.5":
412417
version "7.22.20"
413418
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
@@ -1230,11 +1235,11 @@
12301235
to-fast-properties "^2.0.0"
12311236

12321237
"@babel/types@^7.23.0":
1233-
version "7.23.3"
1234-
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.3.tgz#d5ea892c07f2ec371ac704420f4dcdb07b5f9598"
1235-
integrity sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==
1238+
version "7.23.4"
1239+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.4.tgz#7206a1810fc512a7f7f7d4dace4cb4c1c9dbfb8e"
1240+
integrity sha512-7uIFwVYpoplT5jp/kVv6EF93VaJ8H+Yn5IczYiaAi98ajzjfoZfslet/e0sLh+wVBjb2qqIut1b0S26VSafsSQ==
12361241
dependencies:
1237-
"@babel/helper-string-parser" "^7.22.5"
1242+
"@babel/helper-string-parser" "^7.23.4"
12381243
"@babel/helper-validator-identifier" "^7.22.20"
12391244
to-fast-properties "^2.0.0"
12401245

@@ -7533,6 +7538,11 @@ http-proxy-agent@^7.0.0:
75337538
agent-base "^7.1.0"
75347539
debug "^4.3.4"
75357540

7541+
https-browserify@^1.0.0:
7542+
version "1.0.0"
7543+
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
7544+
integrity sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==
7545+
75367546
https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1:
75377547
version "5.0.1"
75387548
resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz"
@@ -12995,6 +13005,11 @@ tsutils@^3.21.0:
1299513005
dependencies:
1299613006
tslib "^1.8.1"
1299713007

13008+
tty-browserify@^0.0.1:
13009+
version "0.0.1"
13010+
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811"
13011+
integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==
13012+
1299813013
tuf-js@^1.1.7:
1299913014
version "1.1.7"
1300013015
resolved "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz"

0 commit comments

Comments
 (0)