@nx/js 0.0.0-pr-28595-c849fba → 0.0.0-pr-28667-e5533b1
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/js",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-28667-e5533b1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
|
|
6
6
|
"repository": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@babel/preset-env": "^7.23.2",
|
|
40
40
|
"@babel/preset-typescript": "^7.22.5",
|
|
41
41
|
"@babel/runtime": "^7.22.6",
|
|
42
|
-
"@nx/devkit": "0.0.0-pr-
|
|
43
|
-
"@nx/workspace": "0.0.0-pr-
|
|
42
|
+
"@nx/devkit": "0.0.0-pr-28667-e5533b1",
|
|
43
|
+
"@nx/workspace": "0.0.0-pr-28667-e5533b1",
|
|
44
44
|
"@zkochan/js-yaml": "0.0.7",
|
|
45
45
|
"babel-plugin-const-enum": "^1.0.1",
|
|
46
46
|
"babel-plugin-macros": "^2.8.0",
|
|
@@ -129,12 +129,12 @@ function setupNpm(options) {
|
|
|
129
129
|
?.trim()
|
|
130
130
|
?.replace('\u001b[2K\u001b[1G', '') // strip out ansi codes
|
|
131
131
|
);
|
|
132
|
-
(0, child_process_1.execSync)(`npm config set ${registryName} http
|
|
133
|
-
(0, child_process_1.execSync)(`npm config set
|
|
134
|
-
devkit_1.logger.info(`Set npm ${registryName} to http
|
|
132
|
+
(0, child_process_1.execSync)(`npm config set ${registryName} http://${options.listenAddress}:${options.port}/ --location ${options.location}`, { env, windowsHide: false });
|
|
133
|
+
(0, child_process_1.execSync)(`npm config set //${options.listenAddress}:${options.port}/:_authToken="secretVerdaccioToken" --location ${options.location}`, { env, windowsHide: false });
|
|
134
|
+
devkit_1.logger.info(`Set npm ${registryName} to http://${options.listenAddress}:${options.port}/`);
|
|
135
135
|
}
|
|
136
136
|
catch (e) {
|
|
137
|
-
throw new Error(`Failed to set npm ${registryName} to http
|
|
137
|
+
throw new Error(`Failed to set npm ${registryName} to http://${options.listenAddress}:${options.port}/: ${e.message}`);
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
return () => {
|
|
@@ -146,7 +146,7 @@ function setupNpm(options) {
|
|
|
146
146
|
scopes.forEach((scope, index) => {
|
|
147
147
|
const registryName = scope ? `${scope}:registry` : 'registry';
|
|
148
148
|
if (npmRegistryPaths[index] &&
|
|
149
|
-
currentNpmRegistryPath.includes(
|
|
149
|
+
currentNpmRegistryPath.includes(options.listenAddress)) {
|
|
150
150
|
(0, child_process_1.execSync)(`npm config set ${registryName} ${npmRegistryPaths[index]} --location ${options.location}`, { env, windowsHide: false });
|
|
151
151
|
devkit_1.logger.info(`Reset npm ${registryName} to ${npmRegistryPaths[index]}`);
|
|
152
152
|
}
|
|
@@ -158,7 +158,7 @@ function setupNpm(options) {
|
|
|
158
158
|
devkit_1.logger.info('Cleared custom npm registry');
|
|
159
159
|
}
|
|
160
160
|
});
|
|
161
|
-
(0, child_process_1.execSync)(`npm config delete
|
|
161
|
+
(0, child_process_1.execSync)(`npm config delete //${options.listenAddress}:${options.port}/:_authToken --location ${options.location}`, { env, windowsHide: false });
|
|
162
162
|
}
|
|
163
163
|
catch (e) {
|
|
164
164
|
throw new Error(`Failed to reset npm registry: ${e.message}`);
|
|
@@ -166,7 +166,7 @@ function setupNpm(options) {
|
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
168
|
catch (e) {
|
|
169
|
-
throw new Error(`Failed to set npm registry to http
|
|
169
|
+
throw new Error(`Failed to set npm registry to http://${options.listenAddress}:${options.port}/: ${e.message}`);
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
function getYarnUnsafeHttpWhitelist(isYarnV1) {
|
|
@@ -212,17 +212,17 @@ function setupYarn(options) {
|
|
|
212
212
|
?.trim()
|
|
213
213
|
?.replace('\u001b[2K\u001b[1G', '') // strip out ansi codes
|
|
214
214
|
);
|
|
215
|
-
(0, child_process_1.execSync)(`yarn config set ${scopeName}${registryConfigName} http
|
|
215
|
+
(0, child_process_1.execSync)(`yarn config set ${scopeName}${registryConfigName} http://${options.listenAddress}:${options.port}/` +
|
|
216
216
|
(options.location === 'user' ? ' --home' : ''), { env, windowsHide: false });
|
|
217
|
-
devkit_1.logger.info(`Set yarn ${scopeName}registry to http
|
|
217
|
+
devkit_1.logger.info(`Set yarn ${scopeName}registry to http://${options.listenAddress}:${options.port}/`);
|
|
218
218
|
});
|
|
219
219
|
const currentWhitelist = getYarnUnsafeHttpWhitelist(isYarnV1);
|
|
220
220
|
let whitelistedLocalhost = false;
|
|
221
|
-
if (!isYarnV1 && !currentWhitelist.has(
|
|
221
|
+
if (!isYarnV1 && !currentWhitelist.has(options.listenAddress)) {
|
|
222
222
|
whitelistedLocalhost = true;
|
|
223
|
-
currentWhitelist.add(
|
|
223
|
+
currentWhitelist.add(options.listenAddress);
|
|
224
224
|
setYarnUnsafeHttpWhitelist(currentWhitelist, options);
|
|
225
|
-
devkit_1.logger.info(`Whitelisted http
|
|
225
|
+
devkit_1.logger.info(`Whitelisted http://${options.listenAddress}:${options.port}/ as an unsafe http server`);
|
|
226
226
|
}
|
|
227
227
|
return () => {
|
|
228
228
|
try {
|
|
@@ -235,7 +235,7 @@ function setupYarn(options) {
|
|
|
235
235
|
? `${scope}:${registryConfigName}`
|
|
236
236
|
: registryConfigName;
|
|
237
237
|
if (yarnRegistryPaths[index] &&
|
|
238
|
-
currentYarnRegistryPath.includes(
|
|
238
|
+
currentYarnRegistryPath.includes(options.listenAddress)) {
|
|
239
239
|
(0, child_process_1.execSync)(`yarn config set ${registryName} ${yarnRegistryPaths[index]}` +
|
|
240
240
|
(options.location === 'user' ? ' --home' : ''), {
|
|
241
241
|
env,
|
|
@@ -251,10 +251,10 @@ function setupYarn(options) {
|
|
|
251
251
|
});
|
|
252
252
|
if (whitelistedLocalhost) {
|
|
253
253
|
const currentWhitelist = getYarnUnsafeHttpWhitelist(isYarnV1);
|
|
254
|
-
if (currentWhitelist.has(
|
|
255
|
-
currentWhitelist.delete(
|
|
254
|
+
if (currentWhitelist.has(options.listenAddress)) {
|
|
255
|
+
currentWhitelist.delete(options.listenAddress);
|
|
256
256
|
setYarnUnsafeHttpWhitelist(currentWhitelist, options);
|
|
257
|
-
devkit_1.logger.info(`Removed http
|
|
257
|
+
devkit_1.logger.info(`Removed http://${options.listenAddress}:${options.port}/ as an unsafe http server`);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
}
|
|
@@ -264,7 +264,7 @@ function setupYarn(options) {
|
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
catch (e) {
|
|
267
|
-
throw new Error(`Failed to set yarn registry to http
|
|
267
|
+
throw new Error(`Failed to set yarn registry to http://${options.listenAddress}:${options.port}/: ${e.message}`);
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
exports.default = verdaccioExecutor;
|