@mintlify/cli 4.0.775 → 4.0.777

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.
@@ -54,7 +54,7 @@ describe('brokenLinks', () => {
54
54
  expect(processExitMock).toHaveBeenCalledWith(0);
55
55
  });
56
56
 
57
- it('success with broken links', async () => {
57
+ it('fails with broken links', async () => {
58
58
  vi.mocked(checkForMintJson).mockResolvedValueOnce(true);
59
59
  vi.mocked(getBrokenInternalLinks).mockResolvedValueOnce([
60
60
  {
@@ -82,10 +82,10 @@ describe('brokenLinks', () => {
82
82
  },
83
83
  })
84
84
  );
85
- expect(processExitMock).toHaveBeenCalledWith(0);
85
+ expect(processExitMock).toHaveBeenCalledWith(1);
86
86
  });
87
87
 
88
- it('error with broken links', async () => {
88
+ it('fails when checking throws error', async () => {
89
89
  vi.mocked(checkForMintJson).mockResolvedValueOnce(true);
90
90
  vi.mocked(getBrokenInternalLinks).mockRejectedValueOnce(new Error('some error'));
91
91
 
package/bin/cli.js CHANGED
@@ -134,7 +134,7 @@ export const cli = ({ packageName = 'mint' }) => {
134
134
  addLog(_jsx(ErrorLog, { message: err instanceof Error ? err.message : 'unknown error' }));
135
135
  yield terminate(1);
136
136
  }
137
- yield terminate(0);
137
+ yield terminate(1);
138
138
  }))
139
139
  .command('rename <from> <to>', 'rename a file and update all internal link references', (yargs) => yargs
140
140
  .positional('from', {