gdx 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,272 +1,355 @@
1
- /* eslint-disable no-undef */
2
- /* eslint-disable @typescript-eslint/no-require-imports */
3
- const fs = require('fs');
4
- const path = require('path');
5
- const { spawnSync, execFileSync } = require('child_process');
6
-
7
- // Configuration
8
- const PACKAGE_JSON_PATH = path.join(__dirname, '../package.json');
9
- const BIN_DIR = path.join(__dirname, '../bin');
10
- const NATIVE_DIR = path.join(BIN_DIR, 'native');
11
- const PKG_SRC_PATH = path.join(__dirname, '../dist/index.js');
12
- const INSTALL_INFO_PATH = path.join(NATIVE_DIR, 'install.json');
13
- const PREBUILT_BASE_URL = process.env.GDX_PREBUILT_BASE_URL || 'https://github.com/Type-Delta/gdx/releases/download';
14
-
15
- // Ensure native directory exists
16
- function ensureBinDir() {
17
- if (!fs.existsSync(NATIVE_DIR)) {
18
- fs.mkdirSync(NATIVE_DIR, { recursive: true });
19
- }
20
- }
21
-
22
- function getPackageVersion() {
23
- const pkg = JSON.parse(fs.readFileSync(PACKAGE_JSON_PATH, 'utf8'));
24
- return pkg.version;
25
- }
26
-
27
- function log(message) {
28
- console.log(`[gdx-install] ${message}`);
29
- }
30
-
31
- function error(message) {
32
- console.error(`[gdx-install] ERROR: ${message}`);
33
- }
34
-
35
- function writeInstallInfo(info) {
36
- fs.writeFileSync(INSTALL_INFO_PATH, JSON.stringify(info, null, 2));
37
- }
38
-
39
- function isTruthy(v) {
40
- return v === '1' || v === 'true' || v === 'yes';
41
- }
42
-
43
- function getPrefixFromEnvOrNpm() {
44
- if (process.env.npm_config_prefix) {
45
- return process.env.npm_config_prefix;
46
- }
47
-
48
- // Fallback: ask npm (works on modern npm)
49
- const npmExecPath = process.env.npm_execpath;
50
- if (!npmExecPath) return null;
51
-
52
- const prefix = execFileSync(
53
- `"${npmExecPath}"`,
54
- ['config', 'get', 'prefix'],
55
- { encoding: 'utf8', shell: true }
56
- ).trim();
57
-
58
- return prefix || null;
59
- }
60
-
61
-
62
- async function checkUrlExists(url) {
63
- try {
64
- const res = await fetch(url, { method: 'HEAD', redirect: 'follow' });
65
- return res.ok;
66
- } catch (err) {
67
- throw new Error(`Network error while checking prebuilt availability: ${err.message} (${url})`);
68
- }
69
- }
70
-
71
- async function downloadFile(url, tmpPath, destPath) {
72
- const res = await fetch(url, { method: 'GET', redirect: 'follow' });
73
- if (!res.ok) {
74
- throw new Error(`Failed to download: ${res.statusText} (${url})`);
75
- }
76
-
77
- const fileStream = fs.createWriteStream(destPath);
78
- const stream = require('stream');
79
- const { promisify } = require('util');
80
- const pipeline = promisify(stream.pipeline);
81
-
82
- await pipeline(res.body, fileStream);
83
- fs.renameSync(tmpPath, destPath);
84
- }
85
-
86
- function setExecutable(filePath) {
87
- if (process.platform !== 'win32') {
88
- fs.chmodSync(filePath, 0o755);
89
- }
90
- }
91
-
92
- function writeFileExecutable(filePath, content) {
93
- fs.writeFileSync(filePath, content, { encoding: 'utf8' });
94
- setExecutable(filePath);
95
- }
96
-
97
- function getNpmGlobalBinDir() {
98
- if (!isTruthy(process.env.npm_config_global)) return null;
99
-
100
- const prefix = getPrefixFromEnvOrNpm();
101
- if (!prefix) return null;
102
-
103
- if (process.platform === 'win32') {
104
- // On Windows, shims are in the prefix dir itself
105
- return prefix;
106
- }
107
-
108
- // On Unix, shims are in <prefix>/bin
109
- return path.join(prefix, 'bin');
110
- }
111
-
112
-
113
- function overwriteGlobalShim(nativeAbsPath) {
114
- if (!isTruthy(process.env.npm_config_global))
115
- return false;
116
-
117
- if (!(process.env.npm_config_user_agent || '').includes('npm/')) {
118
- log('Non-npm global install detected; skipping global shim overwrite.');
119
- log('This may result in overhead introduced by the Node.js launch script.');
120
- return false;
121
- }
122
-
123
- const globalBin = getNpmGlobalBinDir();
124
- if (!globalBin) return false;
125
-
126
- if (process.platform === 'win32') {
127
- const cmdPath = path.join(globalBin, 'gdx.cmd');
128
- const ps1Path = path.join(globalBin, 'gdx.ps1');
129
-
130
- const cmd = [
131
- '@echo off',
132
- `"${nativeAbsPath}" %*`,
133
- 'exit /b %ERRORLEVEL%',
134
- ''
135
- ].join('\r\n');
136
-
137
- const ps1 = [
138
- `& "${nativeAbsPath}" @args`,
139
- 'exit $LASTEXITCODE',
140
- ''
141
- ].join('\r\n');
142
-
143
- writeFileExecutable(cmdPath, cmd);
144
- writeFileExecutable(ps1Path, ps1);
145
- } else {
146
- const shPath = path.join(globalBin, 'gdx');
147
-
148
- const sh = [
149
- '#!/usr/bin/env sh',
150
- `exec "${nativeAbsPath}" "$@"`,
151
- ''
152
- ].join('\n');
153
-
154
- writeFileExecutable(shPath, sh);
155
- }
156
- return true;
157
- }
158
-
159
- async function tryDownloadPrebuilt() {
160
- const version = getPackageVersion();
161
- const platform = process.platform;
162
- const arch = process.arch;
163
-
164
- // Currently only supporting win32-x64
165
- if (platform !== 'win32' || arch !== 'x64') {
166
- throw new Error(`gdx: prebuilt binary not available for ${platform}/${arch} yet. Please reinstall without GDX_USE_PREBUILT=1 (unset GDX_USE_PREBUILT or use GDX_BUILD_NATIVE=1).`);
167
- }
168
-
169
- const ext = platform === 'win32' ? '.exe' : '';
170
- const assetName = `gdx-${platform}-${arch}${ext}`;
171
- const url = `${PREBUILT_BASE_URL}/v${version}/${assetName}`;
172
-
173
- log(`Checking availability of prebuilt binary: ${url}`);
174
- const exists = await checkUrlExists(url);
175
- if (!exists) {
176
- throw new Error(`gdx: prebuilt binary not available for ${platform}/${arch} yet (404). Please reinstall without GDX_USE_PREBUILT=1 (unset GDX_USE_PREBUILT or use GDX_BUILD_NATIVE=1).`);
177
- }
178
-
179
- log(`Downloading prebuilt binary...`);
180
- const tmpPath = path.join(NATIVE_DIR, `${assetName}.tmp`);
181
- const finalPath = path.join(NATIVE_DIR, 'gdx' + ext);
182
-
183
- ensureBinDir();
184
- await downloadFile(url, tmpPath, finalPath);
185
- setExecutable(finalPath);
186
-
187
- log(`Prebuilt binary installed to ${finalPath}`);
188
-
189
- writeInstallInfo({
190
- mode: 'prebuilt',
191
- platform,
192
- arch,
193
- version,
194
- userAgent: process.env.npm_config_user_agent || null,
195
- useNativeShim: overwriteGlobalShim(finalPath),
196
- ts: (new Date).toLocaleString(),
197
- binaryPath: finalPath
198
- });
199
- }
200
-
201
- function tryBuildNative() {
202
- log('Attempting local native build with Bun...');
203
-
204
- // Check for bun
205
- const bunCheck = spawnSync('bun', ['--version'], { encoding: 'utf8', shell: true });
206
- if (bunCheck.error || bunCheck.status !== 0) {
207
- throw new Error('Bun is not installed or not found in PATH. Cannot build native binary. Please install Bun or reinstall without GDX_BUILD_NATIVE=1. (unset GDX_BUILD_NATIVE or set GDX_USE_PREBUILT to use prebuilt binary if available)');
208
- }
209
-
210
- const platform = process.platform;
211
- const arch = process.arch;
212
- const isWin = platform === 'win32';
213
- const binaryName = isWin ? 'gdx.exe' : 'gdx';
214
- const finalPath = path.join(NATIVE_DIR, binaryName);
215
-
216
- // Build command
217
- const args = [
218
- 'build',
219
- PKG_SRC_PATH,
220
- `--outfile=${finalPath}`,
221
- '--compile',
222
- '--bytecode',
223
- '--production',
224
- '--keep-names',
225
- ];
226
-
227
- ensureBinDir();
228
- log(`Running: bun ${args.join(' ')}`);
229
- const build = spawnSync('bun', args, { stdio: 'inherit', shell: true });
230
-
231
- if (build.status !== 0) {
232
- throw new Error('Native build failed. Please check output above.');
233
- }
234
-
235
- log(`Native binary built at ${finalPath}`);
236
-
237
- writeInstallInfo({
238
- mode: 'built',
239
- platform,
240
- arch,
241
- version: getPackageVersion(),
242
- userAgent: process.env.npm_config_user_agent || null,
243
- useNativeShim: overwriteGlobalShim(finalPath),
244
- ts: (new Date).toLocaleString(),
245
- binaryPath: finalPath
246
- });
247
- }
248
-
249
- async function main() {
250
- const ignoreScripts = isTruthy(process.env.npm_config_ignore_scripts) ||
251
- isTruthy(process.env.NPM_CONFIG_IGNORE_SCRIPTS);
252
- if (ignoreScripts) {
253
- log('Scripts ignored by configuration. Skipping native setup.');
254
- return;
255
- }
256
-
257
- try {
258
- if (isTruthy(process.env.GDX_USE_PREBUILT)) {
259
- await tryDownloadPrebuilt();
260
- } else if (isTruthy(process.env.GDX_BUILD_NATIVE)) {
261
- tryBuildNative();
262
- } else {
263
- log('No native install requested (default). Using Node.js fallback.');
264
- // Do nothing
265
- }
266
- } catch (err) {
267
- error(err.message);
268
- process.exit(1);
269
- }
270
- }
271
-
272
- main();
1
+ /* eslint-disable no-undef */
2
+ /* eslint-disable @typescript-eslint/no-require-imports */
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const { spawnSync, execFileSync } = require('child_process');
6
+
7
+ // Configuration
8
+ const PACKAGE_JSON_PATH = path.join(__dirname, '../package.json');
9
+ const PACKAGE_DIR = path.join(__dirname, '..');
10
+ const BIN_DIR = path.join(__dirname, '../bin');
11
+ const NATIVE_DIR = path.join(BIN_DIR, 'native');
12
+ const PKG_SRC_PATH = path.join(__dirname, '../dist/index.js');
13
+ const INSTALL_INFO_PATH = path.join(NATIVE_DIR, 'install.json');
14
+ const PREBUILT_BASE_URL = process.env.GDX_PREBUILT_BASE_URL || 'https://github.com/Type-Delta/gdx/releases/download';
15
+
16
+ // Ensure native directory exists
17
+ function ensureBinDir() {
18
+ if (!fs.existsSync(NATIVE_DIR)) {
19
+ fs.mkdirSync(NATIVE_DIR, { recursive: true });
20
+ }
21
+ }
22
+
23
+ function getPackageVersion() {
24
+ const pkg = JSON.parse(fs.readFileSync(PACKAGE_JSON_PATH, 'utf8'));
25
+ return pkg.version;
26
+ }
27
+
28
+ function log(message) {
29
+ console.log(`[gdx-install] ${message}`);
30
+ }
31
+
32
+ function error(message) {
33
+ console.error(`[gdx-install] ERROR: ${message}`);
34
+ }
35
+
36
+ function writeInstallInfo(info) {
37
+ ensureBinDir();
38
+ fs.writeFileSync(INSTALL_INFO_PATH, JSON.stringify(info, null, 2));
39
+ }
40
+
41
+ function isTruthy(v) {
42
+ return v === '1' || v === 'true' || v === 'yes';
43
+ }
44
+
45
+ function getPrefixFromEnvOrNpm() {
46
+ if (process.env.npm_config_prefix) {
47
+ return process.env.npm_config_prefix;
48
+ }
49
+
50
+ // Fallback: ask npm (works on modern npm)
51
+ const npmExecPath = process.env.npm_execpath;
52
+ if (!npmExecPath) return null;
53
+
54
+ const prefix = execFileSync(
55
+ `"${npmExecPath}"`,
56
+ ['config', 'get', 'prefix'],
57
+ { encoding: 'utf8', shell: true }
58
+ ).trim();
59
+
60
+ return prefix || null;
61
+ }
62
+
63
+
64
+ async function checkUrlExists(url) {
65
+ try {
66
+ const res = await fetch(url, { method: 'HEAD', redirect: 'follow' });
67
+ return res.ok;
68
+ } catch (err) {
69
+ throw new Error(`Network error while checking prebuilt availability: ${err.message} (${url})`);
70
+ }
71
+ }
72
+
73
+ async function downloadFile(url, tmpPath, destPath) {
74
+ const res = await fetch(url, { method: 'GET', redirect: 'follow' });
75
+ if (!res.ok) {
76
+ throw new Error(`Failed to download: ${res.statusText} (${url})`);
77
+ }
78
+
79
+ const fileStream = fs.createWriteStream(destPath);
80
+ const stream = require('stream');
81
+ const { promisify } = require('util');
82
+ const pipeline = promisify(stream.pipeline);
83
+
84
+ await pipeline(res.body, fileStream);
85
+ fs.renameSync(tmpPath, destPath);
86
+ }
87
+
88
+ function setExecutable(filePath) {
89
+ if (process.platform !== 'win32') {
90
+ fs.chmodSync(filePath, 0o755);
91
+ }
92
+ }
93
+
94
+ function writeFileExecutable(filePath, content) {
95
+ // Remove any existing entry first. npm links bin entries as symlinks
96
+ // (e.g. <bindir>/gdx -> ../gdx/scripts/launcher.cjs); writing without
97
+ // unlinking would follow that symlink and overwrite its target
98
+ // (launcher.cjs) with shim content instead of replacing the bin entry.
99
+ // fs.rmSync unlinks the symlink itself; force ignores a missing path.
100
+ fs.rmSync(filePath, { force: true });
101
+ fs.writeFileSync(filePath, content, { encoding: 'utf8' });
102
+ setExecutable(filePath);
103
+ }
104
+
105
+ function buildNodeShimContents(nodeAbsPath, launcherAbsPath) {
106
+ return {
107
+ cmd: [
108
+ '@echo off',
109
+ 'set "GDX_NODE_SHIM=1"',
110
+ `"${nodeAbsPath}" "${launcherAbsPath}" -- %*`,
111
+ 'exit /b %ERRORLEVEL%',
112
+ ''
113
+ ].join('\r\n'),
114
+ ps1: [
115
+ '$env:GDX_NODE_SHIM = "1"',
116
+ `& "${nodeAbsPath}" "${launcherAbsPath}" -- @args`,
117
+ 'exit $LASTEXITCODE',
118
+ ''
119
+ ].join('\r\n'),
120
+ sh: [
121
+ '#!/usr/bin/env sh',
122
+ 'export GDX_NODE_SHIM=1',
123
+ `exec "${nodeAbsPath}" "${launcherAbsPath}" -- "$@"`,
124
+ ''
125
+ ].join('\n'),
126
+ };
127
+ }
128
+
129
+ function getLocalNodeModulesBinDir() {
130
+ return path.resolve(PACKAGE_DIR, '..', '.bin');
131
+ }
132
+
133
+ function overwriteNodeShim(binDir, launcherAbsPath) {
134
+ if (!binDir || !fs.existsSync(binDir)) return false;
135
+
136
+ const nodeAbsPath = process.execPath;
137
+ const shims = buildNodeShimContents(nodeAbsPath, launcherAbsPath);
138
+
139
+ if (process.platform === 'win32') {
140
+ writeFileExecutable(path.join(binDir, 'gdx.cmd'), shims.cmd);
141
+ writeFileExecutable(path.join(binDir, 'gdx.ps1'), shims.ps1);
142
+ return true;
143
+ }
144
+
145
+ writeFileExecutable(path.join(binDir, 'gdx'), shims.sh);
146
+ return true;
147
+ }
148
+
149
+ function getNpmGlobalBinDir() {
150
+ if (!isTruthy(process.env.npm_config_global)) return null;
151
+
152
+ const prefix = getPrefixFromEnvOrNpm();
153
+ if (!prefix) return null;
154
+
155
+ if (process.platform === 'win32') {
156
+ // On Windows, shims are in the prefix dir itself
157
+ return prefix;
158
+ }
159
+
160
+ // On Unix, shims are in <prefix>/bin
161
+ return path.join(prefix, 'bin');
162
+ }
163
+
164
+
165
+ function overwriteGlobalShim(nativeAbsPath) {
166
+ if (!isTruthy(process.env.npm_config_global))
167
+ return false;
168
+
169
+ if (!(process.env.npm_config_user_agent || '').includes('npm/')) {
170
+ log('Non-npm global install detected; skipping global shim overwrite.');
171
+ log('This may result in overhead introduced by the Node.js launch script.');
172
+ return false;
173
+ }
174
+
175
+ const globalBin = getNpmGlobalBinDir();
176
+ if (!globalBin) return false;
177
+
178
+ if (process.platform === 'win32') {
179
+ const cmdPath = path.join(globalBin, 'gdx.cmd');
180
+ const ps1Path = path.join(globalBin, 'gdx.ps1');
181
+
182
+ const cmd = [
183
+ '@echo off',
184
+ `"${nativeAbsPath}" %*`,
185
+ 'exit /b %ERRORLEVEL%',
186
+ ''
187
+ ].join('\r\n');
188
+
189
+ const ps1 = [
190
+ `& "${nativeAbsPath}" @args`,
191
+ 'exit $LASTEXITCODE',
192
+ ''
193
+ ].join('\r\n');
194
+
195
+ writeFileExecutable(cmdPath, cmd);
196
+ writeFileExecutable(ps1Path, ps1);
197
+ } else {
198
+ const shPath = path.join(globalBin, 'gdx');
199
+
200
+ const sh = [
201
+ '#!/usr/bin/env sh',
202
+ `exec "${nativeAbsPath}" "$@"`,
203
+ ''
204
+ ].join('\n');
205
+
206
+ writeFileExecutable(shPath, sh);
207
+ }
208
+ return true;
209
+ }
210
+
211
+ function installNodeFallbackShims() {
212
+ const launcherAbsPath = path.join(__dirname, 'launcher.cjs');
213
+ const localBin = getLocalNodeModulesBinDir();
214
+ const globalBin = getNpmGlobalBinDir();
215
+
216
+ return {
217
+ local: overwriteNodeShim(localBin, launcherAbsPath),
218
+ global: overwriteNodeShim(globalBin, launcherAbsPath),
219
+ };
220
+ }
221
+
222
+ async function tryDownloadPrebuilt() {
223
+ const version = getPackageVersion();
224
+ const platform = process.platform;
225
+ const arch = process.arch;
226
+
227
+ // Currently only supporting win32-x64
228
+ if (platform !== 'win32' || arch !== 'x64') {
229
+ throw new Error(`gdx: prebuilt binary not available for ${platform}/${arch} yet. Please reinstall without GDX_USE_PREBUILT=1 (unset GDX_USE_PREBUILT or use GDX_BUILD_NATIVE=1).`);
230
+ }
231
+
232
+ const ext = platform === 'win32' ? '.exe' : '';
233
+ const assetName = `gdx-${platform}-${arch}${ext}`;
234
+ const url = `${PREBUILT_BASE_URL}/v${version}/${assetName}`;
235
+
236
+ log(`Checking availability of prebuilt binary: ${url}`);
237
+ const exists = await checkUrlExists(url);
238
+ if (!exists) {
239
+ throw new Error(`gdx: prebuilt binary not available for ${platform}/${arch} yet (404). Please reinstall without GDX_USE_PREBUILT=1 (unset GDX_USE_PREBUILT or use GDX_BUILD_NATIVE=1).`);
240
+ }
241
+
242
+ log(`Downloading prebuilt binary...`);
243
+ const tmpPath = path.join(NATIVE_DIR, `${assetName}.tmp`);
244
+ const finalPath = path.join(NATIVE_DIR, 'gdx' + ext);
245
+
246
+ ensureBinDir();
247
+ await downloadFile(url, tmpPath, finalPath);
248
+ setExecutable(finalPath);
249
+
250
+ log(`Prebuilt binary installed to ${finalPath}`);
251
+
252
+ writeInstallInfo({
253
+ mode: 'prebuilt',
254
+ platform,
255
+ arch,
256
+ version,
257
+ userAgent: process.env.npm_config_user_agent || null,
258
+ useNativeShim: overwriteGlobalShim(finalPath),
259
+ ts: (new Date).toLocaleString(),
260
+ binaryPath: finalPath
261
+ });
262
+ }
263
+
264
+ function tryBuildNative() {
265
+ log('Attempting local native build with Bun...');
266
+
267
+ // Check for bun
268
+ const bunCheck = spawnSync('bun', ['--version'], { encoding: 'utf8', shell: true });
269
+ if (bunCheck.error || bunCheck.status !== 0) {
270
+ throw new Error('Bun is not installed or not found in PATH. Cannot build native binary. Please install Bun or reinstall without GDX_BUILD_NATIVE=1. (unset GDX_BUILD_NATIVE or set GDX_USE_PREBUILT to use prebuilt binary if available)');
271
+ }
272
+
273
+ const platform = process.platform;
274
+ const arch = process.arch;
275
+ const isWin = platform === 'win32';
276
+ const binaryName = isWin ? 'gdx.exe' : 'gdx';
277
+ const finalPath = path.join(NATIVE_DIR, binaryName);
278
+
279
+ // Build command
280
+ const args = [
281
+ 'build',
282
+ PKG_SRC_PATH,
283
+ `--outfile=${finalPath}`,
284
+ '--compile',
285
+ '--bytecode',
286
+ '--production',
287
+ '--keep-names',
288
+ ];
289
+
290
+ ensureBinDir();
291
+ log(`Running: bun ${args.join(' ')}`);
292
+ const build = spawnSync('bun', args, { stdio: 'inherit', shell: true });
293
+
294
+ if (build.status !== 0) {
295
+ throw new Error('Native build failed. Please check output above.');
296
+ }
297
+
298
+ log(`Native binary built at ${finalPath}`);
299
+
300
+ writeInstallInfo({
301
+ mode: 'built',
302
+ platform,
303
+ arch,
304
+ version: getPackageVersion(),
305
+ userAgent: process.env.npm_config_user_agent || null,
306
+ useNativeShim: overwriteGlobalShim(finalPath),
307
+ ts: (new Date).toLocaleString(),
308
+ binaryPath: finalPath
309
+ });
310
+ }
311
+
312
+ async function main() {
313
+ const ignoreScripts = isTruthy(process.env.npm_config_ignore_scripts) ||
314
+ isTruthy(process.env.NPM_CONFIG_IGNORE_SCRIPTS);
315
+ if (ignoreScripts) {
316
+ log('Scripts ignored by configuration. Skipping native setup.');
317
+ return;
318
+ }
319
+
320
+ try {
321
+ if (isTruthy(process.env.GDX_USE_PREBUILT)) {
322
+ await tryDownloadPrebuilt();
323
+ } else if (isTruthy(process.env.GDX_BUILD_NATIVE)) {
324
+ tryBuildNative();
325
+ } else {
326
+ log('No native install requested (default). Using Node.js fallback.');
327
+ const shimInstall = installNodeFallbackShims();
328
+ writeInstallInfo({
329
+ mode: 'node',
330
+ platform: process.platform,
331
+ arch: process.arch,
332
+ version: getPackageVersion(),
333
+ userAgent: process.env.npm_config_user_agent || null,
334
+ useGlobalShim: shimInstall.global,
335
+ useLocalShim: shimInstall.local,
336
+ ts: (new Date).toLocaleString(),
337
+ launcherPath: path.join(__dirname, 'launcher.cjs')
338
+ });
339
+ }
340
+ } catch (err) {
341
+ error(err.message);
342
+ process.exit(1);
343
+ }
344
+ }
345
+
346
+ if (require.main === module) {
347
+ main();
348
+ }
349
+
350
+ module.exports = {
351
+ buildNodeShimContents,
352
+ getLocalNodeModulesBinDir,
353
+ installNodeFallbackShims,
354
+ overwriteNodeShim,
355
+ };