@mintlify/cli 4.0.1760 → 4.0.1762

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.
@@ -65,6 +65,17 @@ describe('agent deployment API', () => {
65
65
  expect((await provision()).status).toBe('expired');
66
66
  await expect(provision()).rejects.toThrow('503');
67
67
  });
68
+ it('treats a swept registration as expired', async () => {
69
+ const swept = {
70
+ created: false,
71
+ code: 'deployment_claim_expired',
72
+ status: 'expired',
73
+ deploymentId: 'deployment',
74
+ subdomain: 'actual-name',
75
+ };
76
+ vi.stubGlobal('fetch', vi.fn().mockResolvedValue(response(swept, 409)));
77
+ expect(await provision()).toEqual(swept);
78
+ });
68
79
  it('requests a write token without a caller-selected deployment', async () => {
69
80
  const credential = {
70
81
  remote: ready.remote,
@@ -28,7 +28,7 @@ const existingSchema = z.discriminatedUnion('status', [
28
28
  }),
29
29
  z.object({
30
30
  status: z.literal('expired'),
31
- code: z.literal('deployment_already_exists'),
31
+ code: z.enum(['deployment_already_exists', 'deployment_claim_expired']),
32
32
  deploymentId: z.string(),
33
33
  subdomain: z.string(),
34
34
  expiresAt: z.iso.datetime().optional(),