@bernierllc/contentful-suite 1.3.3 → 1.3.5
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 +15 -15
- package/dist/ContentfulSuite.d.ts +0 -85
- package/dist/ContentfulSuite.d.ts.map +0 -1
- package/dist/ContentfulSuite.js +0 -358
- package/dist/ContentfulSuite.js.map +0 -1
- package/dist/__tests__/ContentfulSuite.test.d.ts +0 -2
- package/dist/__tests__/ContentfulSuite.test.d.ts.map +0 -1
- package/dist/__tests__/ContentfulSuite.test.js +0 -347
- package/dist/__tests__/ContentfulSuite.test.js.map +0 -1
- package/dist/__tests__/errors.test.d.ts +0 -2
- package/dist/__tests__/errors.test.d.ts.map +0 -1
- package/dist/__tests__/errors.test.js +0 -34
- package/dist/__tests__/errors.test.js.map +0 -1
- package/dist/__tests__/storage.test.d.ts +0 -2
- package/dist/__tests__/storage.test.d.ts.map +0 -1
- package/dist/__tests__/storage.test.js +0 -343
- package/dist/__tests__/storage.test.js.map +0 -1
- package/dist/errors.d.ts +0 -12
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -25
- package/dist/errors.js.map +0 -1
- package/dist/index.d.ts +0 -21
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -48
- package/dist/index.js.map +0 -1
- package/dist/storage/InMemoryContentStorage.d.ts +0 -41
- package/dist/storage/InMemoryContentStorage.d.ts.map +0 -1
- package/dist/storage/InMemoryContentStorage.js +0 -86
- package/dist/storage/InMemoryContentStorage.js.map +0 -1
- package/dist/storage/InMemoryMigrationStorage.d.ts +0 -21
- package/dist/storage/InMemoryMigrationStorage.d.ts.map +0 -1
- package/dist/storage/InMemoryMigrationStorage.js +0 -59
- package/dist/storage/InMemoryMigrationStorage.js.map +0 -1
- package/dist/storage/InMemorySyncStateStorage.d.ts +0 -19
- package/dist/storage/InMemorySyncStateStorage.d.ts.map +0 -1
- package/dist/storage/InMemorySyncStateStorage.js +0 -39
- package/dist/storage/InMemorySyncStateStorage.js.map +0 -1
- package/dist/storage/index.d.ts +0 -4
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js +0 -17
- package/dist/storage/index.js.map +0 -1
- package/dist/types.d.ts +0 -131
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -10
- package/dist/types.js.map +0 -1
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright (c) 2025 Bernier LLC
|
|
4
|
-
|
|
5
|
-
This file is licensed to the client under a limited-use license.
|
|
6
|
-
The client may use and modify this code *only within the scope of the project it was delivered for*.
|
|
7
|
-
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const ContentfulSuite_1 = require("../ContentfulSuite");
|
|
11
|
-
const InMemoryContentStorage_1 = require("../storage/InMemoryContentStorage");
|
|
12
|
-
const InMemorySyncStateStorage_1 = require("../storage/InMemorySyncStateStorage");
|
|
13
|
-
const InMemoryMigrationStorage_1 = require("../storage/InMemoryMigrationStorage");
|
|
14
|
-
// Mock all service dependencies
|
|
15
|
-
jest.mock('@bernierllc/contentful-gateway-service');
|
|
16
|
-
jest.mock('@bernierllc/contentful-sync-service');
|
|
17
|
-
jest.mock('@bernierllc/contentful-webhook-service');
|
|
18
|
-
jest.mock('@bernierllc/contentful-cache-service');
|
|
19
|
-
jest.mock('@bernierllc/contentful-migration-service');
|
|
20
|
-
jest.mock('@bernierllc/logger');
|
|
21
|
-
jest.mock('@bernierllc/neverhub-adapter');
|
|
22
|
-
describe('ContentfulSuite', () => {
|
|
23
|
-
let config;
|
|
24
|
-
let contentStorage;
|
|
25
|
-
let syncStateStorage;
|
|
26
|
-
let migrationStorage;
|
|
27
|
-
beforeEach(() => {
|
|
28
|
-
contentStorage = new InMemoryContentStorage_1.InMemoryContentStorage();
|
|
29
|
-
syncStateStorage = new InMemorySyncStateStorage_1.InMemorySyncStateStorage();
|
|
30
|
-
migrationStorage = new InMemoryMigrationStorage_1.InMemoryMigrationStorage();
|
|
31
|
-
config = {
|
|
32
|
-
oauth: {
|
|
33
|
-
clientId: 'test-client-id',
|
|
34
|
-
clientSecret: 'test-client-secret',
|
|
35
|
-
redirectUri: 'http://localhost:3000/oauth/callback'
|
|
36
|
-
},
|
|
37
|
-
gateway: {
|
|
38
|
-
enabled: true,
|
|
39
|
-
port: 3000,
|
|
40
|
-
apiKeys: ['test-api-key']
|
|
41
|
-
},
|
|
42
|
-
sync: {
|
|
43
|
-
enabled: true,
|
|
44
|
-
interval: 60000,
|
|
45
|
-
spaces: [
|
|
46
|
-
{
|
|
47
|
-
spaceId: 'test-space-1',
|
|
48
|
-
environmentId: 'master',
|
|
49
|
-
accessToken: 'test-token-1'
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
webhooks: {
|
|
54
|
-
enabled: true,
|
|
55
|
-
port: 3001,
|
|
56
|
-
secret: 'test-webhook-secret'
|
|
57
|
-
},
|
|
58
|
-
cache: {
|
|
59
|
-
enabled: true,
|
|
60
|
-
backend: 'memory',
|
|
61
|
-
ttl: 300
|
|
62
|
-
},
|
|
63
|
-
migration: {
|
|
64
|
-
enabled: true
|
|
65
|
-
},
|
|
66
|
-
storage: {
|
|
67
|
-
contentStorage,
|
|
68
|
-
syncStateStorage,
|
|
69
|
-
migrationStorage
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
});
|
|
73
|
-
afterEach(() => {
|
|
74
|
-
jest.clearAllMocks();
|
|
75
|
-
});
|
|
76
|
-
describe('constructor', () => {
|
|
77
|
-
it('should create a ContentfulSuite instance', () => {
|
|
78
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
79
|
-
expect(suite).toBeInstanceOf(ContentfulSuite_1.ContentfulSuite);
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
describe('initialize', () => {
|
|
83
|
-
it('should initialize all enabled services', async () => {
|
|
84
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
85
|
-
await suite.initialize();
|
|
86
|
-
expect(suite.getGateway()).toBeDefined();
|
|
87
|
-
expect(suite.getSyncService('test-space-1')).toBeDefined();
|
|
88
|
-
expect(suite.getWebhookService()).toBeDefined();
|
|
89
|
-
expect(suite.getCacheService()).toBeDefined();
|
|
90
|
-
expect(suite.getMigrationService('test-space-1')).toBeDefined();
|
|
91
|
-
});
|
|
92
|
-
it('should not initialize disabled services', async () => {
|
|
93
|
-
const minimalConfig = {
|
|
94
|
-
...config,
|
|
95
|
-
gateway: { ...config.gateway, enabled: false },
|
|
96
|
-
sync: { ...config.sync, enabled: false },
|
|
97
|
-
webhooks: { ...config.webhooks, enabled: false },
|
|
98
|
-
cache: { ...config.cache, enabled: false },
|
|
99
|
-
migration: { ...config.migration, enabled: false }
|
|
100
|
-
};
|
|
101
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(minimalConfig);
|
|
102
|
-
await suite.initialize();
|
|
103
|
-
expect(suite.getGateway()).toBeUndefined();
|
|
104
|
-
expect(suite.getSyncService('test-space-1')).toBeUndefined();
|
|
105
|
-
expect(suite.getWebhookService()).toBeUndefined();
|
|
106
|
-
expect(suite.getCacheService()).toBeUndefined();
|
|
107
|
-
expect(suite.getMigrationService('test-space-1')).toBeUndefined();
|
|
108
|
-
});
|
|
109
|
-
it('should throw error if sync enabled without storage', async () => {
|
|
110
|
-
const invalidConfig = {
|
|
111
|
-
...config,
|
|
112
|
-
storage: {}
|
|
113
|
-
};
|
|
114
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(invalidConfig);
|
|
115
|
-
await expect(suite.initialize()).rejects.toThrow('Content storage and sync state storage required for sync service');
|
|
116
|
-
});
|
|
117
|
-
it('should throw error if migration enabled without storage', async () => {
|
|
118
|
-
const invalidConfig = {
|
|
119
|
-
...config,
|
|
120
|
-
sync: { ...config.sync, enabled: false },
|
|
121
|
-
storage: {
|
|
122
|
-
contentStorage: undefined,
|
|
123
|
-
syncStateStorage: undefined,
|
|
124
|
-
migrationStorage: undefined
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(invalidConfig);
|
|
128
|
-
await expect(suite.initialize()).rejects.toThrow('Migration storage required for migration service');
|
|
129
|
-
});
|
|
130
|
-
it('should initialize multiple sync services for multiple spaces', async () => {
|
|
131
|
-
const multiSpaceConfig = {
|
|
132
|
-
...config,
|
|
133
|
-
sync: {
|
|
134
|
-
enabled: true,
|
|
135
|
-
spaces: [
|
|
136
|
-
{ spaceId: 'space-1', environmentId: 'master', accessToken: 'token-1' },
|
|
137
|
-
{ spaceId: 'space-2', environmentId: 'master', accessToken: 'token-2' }
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(multiSpaceConfig);
|
|
142
|
-
await suite.initialize();
|
|
143
|
-
expect(suite.getSyncService('space-1')).toBeDefined();
|
|
144
|
-
expect(suite.getSyncService('space-2')).toBeDefined();
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
describe('start', () => {
|
|
148
|
-
it('should start all initialized services', async () => {
|
|
149
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
150
|
-
await suite.initialize();
|
|
151
|
-
const gateway = suite.getGateway();
|
|
152
|
-
const webhooks = suite.getWebhookService();
|
|
153
|
-
await suite.start();
|
|
154
|
-
expect(gateway?.start).toHaveBeenCalled();
|
|
155
|
-
expect(webhooks?.start).toHaveBeenCalledWith(3001);
|
|
156
|
-
});
|
|
157
|
-
it('should start sync polling if interval configured', async () => {
|
|
158
|
-
jest.useFakeTimers();
|
|
159
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
160
|
-
await suite.initialize();
|
|
161
|
-
const syncService = suite.getSyncService('test-space-1');
|
|
162
|
-
await suite.start();
|
|
163
|
-
// Fast-forward time
|
|
164
|
-
jest.advanceTimersByTime(60000);
|
|
165
|
-
expect(syncService?.incrementalSync).toHaveBeenCalled();
|
|
166
|
-
jest.useRealTimers();
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
describe('stop', () => {
|
|
170
|
-
it('should stop all services gracefully', async () => {
|
|
171
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
172
|
-
await suite.initialize();
|
|
173
|
-
await suite.start();
|
|
174
|
-
const webhooks = suite.getWebhookService();
|
|
175
|
-
await suite.stop();
|
|
176
|
-
expect(webhooks?.stop).toHaveBeenCalled();
|
|
177
|
-
});
|
|
178
|
-
it('should clear sync intervals', async () => {
|
|
179
|
-
jest.useFakeTimers();
|
|
180
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
181
|
-
await suite.initialize();
|
|
182
|
-
await suite.start();
|
|
183
|
-
const syncService = suite.getSyncService('test-space-1');
|
|
184
|
-
await suite.stop();
|
|
185
|
-
// Advance time - sync should NOT be called after stop
|
|
186
|
-
jest.advanceTimersByTime(60000);
|
|
187
|
-
expect(syncService?.incrementalSync).not.toHaveBeenCalled();
|
|
188
|
-
jest.useRealTimers();
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
describe('getMLTrainingData', () => {
|
|
192
|
-
it('should return all entries from content storage', async () => {
|
|
193
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
194
|
-
await suite.initialize();
|
|
195
|
-
// Add test data
|
|
196
|
-
await contentStorage.storeEntries([
|
|
197
|
-
{
|
|
198
|
-
sys: {
|
|
199
|
-
id: 'entry-1',
|
|
200
|
-
type: 'Entry',
|
|
201
|
-
contentType: { sys: { id: 'article', type: 'Link', linkType: 'ContentType' } },
|
|
202
|
-
createdAt: '2025-01-01T00:00:00Z',
|
|
203
|
-
updatedAt: '2025-01-01T00:00:00Z',
|
|
204
|
-
revision: 1,
|
|
205
|
-
space: { sys: { id: 'test-space', type: 'Link', linkType: 'Space' } },
|
|
206
|
-
environment: { sys: { id: 'master', type: 'Link', linkType: 'Environment' } }
|
|
207
|
-
},
|
|
208
|
-
fields: { title: { 'en-US': 'Test Article' } }
|
|
209
|
-
}
|
|
210
|
-
]);
|
|
211
|
-
const data = await suite.getMLTrainingData('test-space-1');
|
|
212
|
-
expect(data).toHaveLength(1);
|
|
213
|
-
expect(data[0]).toHaveProperty('sys.id', 'entry-1');
|
|
214
|
-
});
|
|
215
|
-
it('should filter by content type if specified', async () => {
|
|
216
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
217
|
-
await suite.initialize();
|
|
218
|
-
await contentStorage.storeEntries([
|
|
219
|
-
{
|
|
220
|
-
sys: {
|
|
221
|
-
id: 'entry-1',
|
|
222
|
-
type: 'Entry',
|
|
223
|
-
contentType: { sys: { id: 'article', type: 'Link', linkType: 'ContentType' } },
|
|
224
|
-
createdAt: '2025-01-01T00:00:00Z',
|
|
225
|
-
updatedAt: '2025-01-01T00:00:00Z',
|
|
226
|
-
revision: 1,
|
|
227
|
-
space: { sys: { id: 'test-space', type: 'Link', linkType: 'Space' } },
|
|
228
|
-
environment: { sys: { id: 'master', type: 'Link', linkType: 'Environment' } }
|
|
229
|
-
},
|
|
230
|
-
fields: { title: { 'en-US': 'Article' } }
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
sys: {
|
|
234
|
-
id: 'entry-2',
|
|
235
|
-
type: 'Entry',
|
|
236
|
-
contentType: { sys: { id: 'page', type: 'Link', linkType: 'ContentType' } },
|
|
237
|
-
createdAt: '2025-01-01T00:00:00Z',
|
|
238
|
-
updatedAt: '2025-01-01T00:00:00Z',
|
|
239
|
-
revision: 1,
|
|
240
|
-
space: { sys: { id: 'test-space', type: 'Link', linkType: 'Space' } },
|
|
241
|
-
environment: { sys: { id: 'master', type: 'Link', linkType: 'Environment' } }
|
|
242
|
-
},
|
|
243
|
-
fields: { title: { 'en-US': 'Page' } }
|
|
244
|
-
}
|
|
245
|
-
]);
|
|
246
|
-
const data = await suite.getMLTrainingData('test-space-1', 'article');
|
|
247
|
-
expect(data).toHaveLength(1);
|
|
248
|
-
expect(data[0]).toHaveProperty('sys.contentType.sys.id', 'article');
|
|
249
|
-
});
|
|
250
|
-
it('should throw error if content storage not configured', async () => {
|
|
251
|
-
const noStorageConfig = {
|
|
252
|
-
...config,
|
|
253
|
-
sync: { ...config.sync, enabled: false },
|
|
254
|
-
migration: { ...config.migration, enabled: false },
|
|
255
|
-
storage: {}
|
|
256
|
-
};
|
|
257
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(noStorageConfig);
|
|
258
|
-
await suite.initialize();
|
|
259
|
-
await expect(suite.getMLTrainingData('test-space-1')).rejects.toThrow('Content storage not configured');
|
|
260
|
-
});
|
|
261
|
-
});
|
|
262
|
-
describe('runMigration', () => {
|
|
263
|
-
it('should run migration on specified space', async () => {
|
|
264
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
265
|
-
await suite.initialize();
|
|
266
|
-
const migrationService = suite.getMigrationService('test-space-1');
|
|
267
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
268
|
-
const migrationFunction = (migration) => {
|
|
269
|
-
migration.createContentType('test');
|
|
270
|
-
};
|
|
271
|
-
await suite.runMigration('test-space-1', migrationFunction, {
|
|
272
|
-
id: 'migration-1',
|
|
273
|
-
name: 'Test Migration'
|
|
274
|
-
});
|
|
275
|
-
expect(migrationService?.runMigration).toHaveBeenCalledWith(migrationFunction, {
|
|
276
|
-
id: 'migration-1',
|
|
277
|
-
name: 'Test Migration'
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
it('should throw error if no migration service for space', async () => {
|
|
281
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
282
|
-
await suite.initialize();
|
|
283
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
284
|
-
const migrationFunction = (migration) => {
|
|
285
|
-
migration.createContentType('test');
|
|
286
|
-
};
|
|
287
|
-
await expect(suite.runMigration('unknown-space', migrationFunction, {
|
|
288
|
-
id: 'migration-1',
|
|
289
|
-
name: 'Test'
|
|
290
|
-
})).rejects.toThrow('No migration service for space unknown-space');
|
|
291
|
-
});
|
|
292
|
-
});
|
|
293
|
-
describe('getHealth', () => {
|
|
294
|
-
it('should return health status of all services', async () => {
|
|
295
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
296
|
-
await suite.initialize();
|
|
297
|
-
const health = suite.getHealth();
|
|
298
|
-
expect(health).toEqual({
|
|
299
|
-
status: 'ok',
|
|
300
|
-
timestamp: expect.any(String),
|
|
301
|
-
services: {
|
|
302
|
-
gateway: true,
|
|
303
|
-
sync: true,
|
|
304
|
-
webhooks: true,
|
|
305
|
-
cache: true,
|
|
306
|
-
migration: true,
|
|
307
|
-
neverhub: false // Mocked as not detected
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
});
|
|
311
|
-
it('should reflect disabled services in health status', async () => {
|
|
312
|
-
const minimalConfig = {
|
|
313
|
-
...config,
|
|
314
|
-
gateway: { ...config.gateway, enabled: false },
|
|
315
|
-
sync: { ...config.sync, enabled: false }
|
|
316
|
-
};
|
|
317
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(minimalConfig);
|
|
318
|
-
await suite.initialize();
|
|
319
|
-
const health = suite.getHealth();
|
|
320
|
-
expect(health.services.gateway).toBe(false);
|
|
321
|
-
expect(health.services.sync).toBe(false);
|
|
322
|
-
});
|
|
323
|
-
});
|
|
324
|
-
describe('service getters', () => {
|
|
325
|
-
it('should provide access to individual services', async () => {
|
|
326
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(config);
|
|
327
|
-
await suite.initialize();
|
|
328
|
-
expect(suite.getGateway()).toBeDefined();
|
|
329
|
-
expect(suite.getSyncService('test-space-1')).toBeDefined();
|
|
330
|
-
expect(suite.getWebhookService()).toBeDefined();
|
|
331
|
-
expect(suite.getCacheService()).toBeDefined();
|
|
332
|
-
expect(suite.getMigrationService('test-space-1')).toBeDefined();
|
|
333
|
-
});
|
|
334
|
-
it('should return undefined for disabled services', async () => {
|
|
335
|
-
const minimalConfig = {
|
|
336
|
-
...config,
|
|
337
|
-
gateway: { ...config.gateway, enabled: false },
|
|
338
|
-
sync: { ...config.sync, enabled: false }
|
|
339
|
-
};
|
|
340
|
-
const suite = new ContentfulSuite_1.ContentfulSuite(minimalConfig);
|
|
341
|
-
await suite.initialize();
|
|
342
|
-
expect(suite.getGateway()).toBeUndefined();
|
|
343
|
-
expect(suite.getSyncService('test-space-1')).toBeUndefined();
|
|
344
|
-
});
|
|
345
|
-
});
|
|
346
|
-
});
|
|
347
|
-
//# sourceMappingURL=ContentfulSuite.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentfulSuite.test.js","sourceRoot":"","sources":["../../src/__tests__/ContentfulSuite.test.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;AAEF,wDAAqD;AACrD,8EAA2E;AAC3E,kFAA+E;AAC/E,kFAA+E;AAG/E,gCAAgC;AAChC,IAAI,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;AACpD,IAAI,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;AACjD,IAAI,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;AACpD,IAAI,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;AAClD,IAAI,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;AACtD,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AAChC,IAAI,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;AAE1C,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,IAAI,MAA6B,CAAC;IAClC,IAAI,cAAsC,CAAC;IAC3C,IAAI,gBAA0C,CAAC;IAC/C,IAAI,gBAA0C,CAAC;IAE/C,UAAU,CAAC,GAAG,EAAE;QACd,cAAc,GAAG,IAAI,+CAAsB,EAAE,CAAC;QAC9C,gB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,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/errors.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright (c) 2025 Bernier LLC
|
|
4
|
-
|
|
5
|
-
This file is licensed to the client under a limited-use license.
|
|
6
|
-
The client may use and modify this code *only within the scope of the project it was delivered for*.
|
|
7
|
-
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const errors_1 = require("../errors");
|
|
11
|
-
describe('ContentfulSuiteError', () => {
|
|
12
|
-
it('uses the default code when none is supplied', () => {
|
|
13
|
-
const err = new errors_1.ContentfulSuiteError('boom');
|
|
14
|
-
expect(err.code).toBe('CONTENTFUL_SUITE_ERROR');
|
|
15
|
-
expect(err.name).toBe('ContentfulSuiteError');
|
|
16
|
-
expect(err.message).toBe('boom');
|
|
17
|
-
});
|
|
18
|
-
it('preserves cause and context', () => {
|
|
19
|
-
const cause = new Error('underlying');
|
|
20
|
-
const err = new errors_1.ContentfulSuiteError('wrap', {
|
|
21
|
-
cause,
|
|
22
|
-
code: 'OPERATION_FAILED',
|
|
23
|
-
context: { spaceId: 's1' },
|
|
24
|
-
});
|
|
25
|
-
expect(err.cause).toBe(cause);
|
|
26
|
-
expect(err.context).toEqual({ spaceId: 's1' });
|
|
27
|
-
expect(err.code).toBe('OPERATION_FAILED');
|
|
28
|
-
});
|
|
29
|
-
it('leaves context undefined when omitted', () => {
|
|
30
|
-
const err = new errors_1.ContentfulSuiteError('nope');
|
|
31
|
-
expect(err.context).toBeUndefined();
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=errors.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version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