nx 19.6.0-canary.20240814-6d83ae2 → 19.6.0-canary.20240815-5410794

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.
Binary file
@@ -225,7 +225,7 @@ async function createProjectGraphAndSourceMapsAsync(opts = {
225
225
  return projectGraphAndSourceMaps;
226
226
  }
227
227
  catch (e) {
228
- if (e.message.indexOf('inotify_add_watch') > -1) {
228
+ if (e.message && e.message.indexOf('inotify_add_watch') > -1) {
229
229
  // common errors with the daemon due to OS settings (cannot watch all the files available)
230
230
  output_1.output.note({
231
231
  title: `Unable to start Nx Daemon due to the limited amount of inotify watches, continuing without the daemon.`,
@@ -140,7 +140,7 @@ async function ensureWorkspaceIsInSyncAndGetGraphs(projectGraph, nxJson, project
140
140
  return { projectGraph, taskGraph };
141
141
  }
142
142
  const outOfSyncTitle = 'The workspace is out of sync';
143
- const resultBodyLines = (0, sync_generators_1.syncGeneratorResultsToMessageLines)(results);
143
+ const resultBodyLines = [...(0, sync_generators_1.syncGeneratorResultsToMessageLines)(results), ''];
144
144
  const fixMessage = 'You can manually run `nx sync` to update your workspace or you can set `sync.applyChanges` to `true` in your `nx.json` to apply the changes automatically when running tasks.';
145
145
  const willErrorOnCiMessage = 'Please note that this will be an error on CI.';
146
146
  if ((0, is_ci_1.isCI)() || !process.stdout.isTTY) {
@@ -208,23 +208,28 @@ Please make sure to commit the changes to your repository.`);
208
208
  return { projectGraph, taskGraph };
209
209
  }
210
210
  async function promptForApplyingSyncGeneratorChanges() {
211
- const promptConfig = {
212
- name: 'applyChanges',
213
- type: 'select',
214
- message: 'Would you like to sync the changes to get your worskpace up to date?',
215
- choices: [
216
- {
217
- name: 'yes',
218
- message: 'Yes, sync the changes and run the tasks',
219
- },
220
- {
221
- name: 'no',
222
- message: 'No, run the tasks without syncing the changes',
223
- },
224
- ],
225
- footer: () => chalk.dim('\nYou can skip this prompt by setting the `sync.applyChanges` option in your `nx.json`.'),
226
- };
227
- return await (0, enquirer_1.prompt)([promptConfig]).then(({ applyChanges }) => applyChanges === 'yes');
211
+ try {
212
+ const promptConfig = {
213
+ name: 'applyChanges',
214
+ type: 'select',
215
+ message: 'Would you like to sync the changes to get your worskpace up to date?',
216
+ choices: [
217
+ {
218
+ name: 'yes',
219
+ message: 'Yes, sync the changes and run the tasks',
220
+ },
221
+ {
222
+ name: 'no',
223
+ message: 'No, run the tasks without syncing the changes',
224
+ },
225
+ ],
226
+ footer: () => chalk.dim('\nYou can skip this prompt by setting the `sync.applyChanges` option in your `nx.json`.'),
227
+ };
228
+ return await (0, enquirer_1.prompt)([promptConfig]).then(({ applyChanges }) => applyChanges === 'yes');
229
+ }
230
+ catch {
231
+ process.exit(1);
232
+ }
228
233
  }
229
234
  function setEnvVarsBasedOnArgs(nxArgs, loadDotEnvFiles) {
230
235
  if (nxArgs.outputStyle == 'stream' ||
@@ -103,7 +103,6 @@ function syncGeneratorResultsToMessageLines(results) {
103
103
  if (result.outOfSyncMessage) {
104
104
  messageLines.push(result.outOfSyncMessage);
105
105
  }
106
- messageLines.push('');
107
106
  }
108
107
  return messageLines;
109
108
  }