@bernierllc/contentful-suite 1.3.4 → 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 +14 -14
- 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,343 +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 InMemoryContentStorage_1 = require("../storage/InMemoryContentStorage");
|
|
11
|
-
const InMemorySyncStateStorage_1 = require("../storage/InMemorySyncStateStorage");
|
|
12
|
-
const InMemoryMigrationStorage_1 = require("../storage/InMemoryMigrationStorage");
|
|
13
|
-
describe('InMemoryContentStorage', () => {
|
|
14
|
-
let storage;
|
|
15
|
-
beforeEach(() => {
|
|
16
|
-
storage = new InMemoryContentStorage_1.InMemoryContentStorage();
|
|
17
|
-
});
|
|
18
|
-
const mockEntry = {
|
|
19
|
-
sys: {
|
|
20
|
-
id: 'entry-1',
|
|
21
|
-
type: 'Entry',
|
|
22
|
-
contentType: { sys: { id: 'article', type: 'Link', linkType: 'ContentType' } },
|
|
23
|
-
createdAt: '2025-01-01T00:00:00Z',
|
|
24
|
-
updatedAt: '2025-01-01T00:00:00Z',
|
|
25
|
-
version: 1,
|
|
26
|
-
space: { sys: { id: 'test-space', type: 'Link', linkType: 'Space' } },
|
|
27
|
-
environment: { sys: { id: 'master', type: 'Link', linkType: 'Environment' } }
|
|
28
|
-
},
|
|
29
|
-
fields: { title: { 'en-US': 'Test Entry' } }
|
|
30
|
-
};
|
|
31
|
-
const mockAsset = {
|
|
32
|
-
sys: {
|
|
33
|
-
id: 'asset-1',
|
|
34
|
-
type: 'Asset',
|
|
35
|
-
createdAt: '2025-01-01T00:00:00Z',
|
|
36
|
-
updatedAt: '2025-01-01T00:00:00Z',
|
|
37
|
-
version: 1,
|
|
38
|
-
space: { sys: { id: 'test-space', type: 'Link', linkType: 'Space' } },
|
|
39
|
-
environment: { sys: { id: 'master', type: 'Link', linkType: 'Environment' } }
|
|
40
|
-
},
|
|
41
|
-
fields: {
|
|
42
|
-
title: { 'en-US': 'Test Asset' },
|
|
43
|
-
file: {
|
|
44
|
-
'en-US': {
|
|
45
|
-
url: '//images.ctfassets.net/test.jpg',
|
|
46
|
-
fileName: 'test.jpg',
|
|
47
|
-
contentType: 'image/jpeg',
|
|
48
|
-
details: {
|
|
49
|
-
size: 1024,
|
|
50
|
-
image: {
|
|
51
|
-
width: 100,
|
|
52
|
-
height: 100
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const mockContentType = {
|
|
60
|
-
sys: {
|
|
61
|
-
id: 'article',
|
|
62
|
-
type: 'ContentType',
|
|
63
|
-
createdAt: '2025-01-01T00:00:00Z',
|
|
64
|
-
updatedAt: '2025-01-01T00:00:00Z',
|
|
65
|
-
version: 1,
|
|
66
|
-
space: { sys: { id: 'test-space', type: 'Link', linkType: 'Space' } },
|
|
67
|
-
environment: { sys: { id: 'master', type: 'Link', linkType: 'Environment' } }
|
|
68
|
-
},
|
|
69
|
-
name: 'Article',
|
|
70
|
-
description: 'Article content type',
|
|
71
|
-
displayField: 'title',
|
|
72
|
-
fields: [
|
|
73
|
-
{
|
|
74
|
-
id: 'title',
|
|
75
|
-
name: 'Title',
|
|
76
|
-
type: 'Symbol',
|
|
77
|
-
required: true,
|
|
78
|
-
localized: false,
|
|
79
|
-
disabled: false,
|
|
80
|
-
omitted: false
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
};
|
|
84
|
-
describe('storeContentTypes', () => {
|
|
85
|
-
it('should store content types', async () => {
|
|
86
|
-
await storage.storeContentTypes([mockContentType]);
|
|
87
|
-
const types = storage.getAllContentTypes();
|
|
88
|
-
expect(types).toHaveLength(1);
|
|
89
|
-
expect(types[0]).toEqual(mockContentType);
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
describe('storeEntries', () => {
|
|
93
|
-
it('should store entries', async () => {
|
|
94
|
-
await storage.storeEntries([mockEntry]);
|
|
95
|
-
const entries = storage.getAllEntries();
|
|
96
|
-
expect(entries).toHaveLength(1);
|
|
97
|
-
expect(entries[0]).toEqual(mockEntry);
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
describe('storeAssets', () => {
|
|
101
|
-
it('should store assets', async () => {
|
|
102
|
-
await storage.storeAssets([mockAsset]);
|
|
103
|
-
const assets = storage.getAllAssets();
|
|
104
|
-
expect(assets).toHaveLength(1);
|
|
105
|
-
expect(assets[0]).toEqual(mockAsset);
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
describe('updateEntry', () => {
|
|
109
|
-
it('should update existing entry', async () => {
|
|
110
|
-
await storage.storeEntries([mockEntry]);
|
|
111
|
-
const updatedEntry = {
|
|
112
|
-
...mockEntry,
|
|
113
|
-
fields: { title: { 'en-US': 'Updated Title' } }
|
|
114
|
-
};
|
|
115
|
-
await storage.updateEntry(updatedEntry);
|
|
116
|
-
const entry = await storage.getEntry('entry-1');
|
|
117
|
-
expect((entry?.fields.title)['en-US']).toBe('Updated Title');
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
describe('updateAsset', () => {
|
|
121
|
-
it('should update existing asset', async () => {
|
|
122
|
-
await storage.storeAssets([mockAsset]);
|
|
123
|
-
const updatedAsset = {
|
|
124
|
-
...mockAsset,
|
|
125
|
-
fields: {
|
|
126
|
-
...mockAsset.fields,
|
|
127
|
-
title: { 'en-US': 'Updated Asset' }
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
await storage.updateAsset(updatedAsset);
|
|
131
|
-
const asset = await storage.getAsset('asset-1');
|
|
132
|
-
expect(asset?.fields.title['en-US']).toBe('Updated Asset');
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
describe('deleteEntry', () => {
|
|
136
|
-
it('should delete entry', async () => {
|
|
137
|
-
await storage.storeEntries([mockEntry]);
|
|
138
|
-
await storage.deleteEntry('entry-1');
|
|
139
|
-
const entry = await storage.getEntry('entry-1');
|
|
140
|
-
expect(entry).toBeNull();
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
describe('deleteAsset', () => {
|
|
144
|
-
it('should delete asset', async () => {
|
|
145
|
-
await storage.storeAssets([mockAsset]);
|
|
146
|
-
await storage.deleteAsset('asset-1');
|
|
147
|
-
const asset = await storage.getAsset('asset-1');
|
|
148
|
-
expect(asset).toBeNull();
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
describe('getEntry', () => {
|
|
152
|
-
it('should return entry by id', async () => {
|
|
153
|
-
await storage.storeEntries([mockEntry]);
|
|
154
|
-
const entry = await storage.getEntry('entry-1');
|
|
155
|
-
expect(entry).toEqual(mockEntry);
|
|
156
|
-
});
|
|
157
|
-
it('should return null for non-existent entry', async () => {
|
|
158
|
-
const entry = await storage.getEntry('non-existent');
|
|
159
|
-
expect(entry).toBeNull();
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
describe('getAsset', () => {
|
|
163
|
-
it('should return asset by id', async () => {
|
|
164
|
-
await storage.storeAssets([mockAsset]);
|
|
165
|
-
const asset = await storage.getAsset('asset-1');
|
|
166
|
-
expect(asset).toEqual(mockAsset);
|
|
167
|
-
});
|
|
168
|
-
it('should return null for non-existent asset', async () => {
|
|
169
|
-
const asset = await storage.getAsset('non-existent');
|
|
170
|
-
expect(asset).toBeNull();
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
describe('clearSpace', () => {
|
|
174
|
-
it('should clear all content', async () => {
|
|
175
|
-
await storage.storeContentTypes([mockContentType]);
|
|
176
|
-
await storage.storeEntries([mockEntry]);
|
|
177
|
-
await storage.storeAssets([mockAsset]);
|
|
178
|
-
await storage.clearSpace('test-space');
|
|
179
|
-
expect(storage.getAllContentTypes()).toHaveLength(0);
|
|
180
|
-
expect(storage.getAllEntries()).toHaveLength(0);
|
|
181
|
-
expect(storage.getAllAssets()).toHaveLength(0);
|
|
182
|
-
});
|
|
183
|
-
});
|
|
184
|
-
describe('getStats', () => {
|
|
185
|
-
it('should return storage stats', async () => {
|
|
186
|
-
await storage.storeContentTypes([mockContentType]);
|
|
187
|
-
await storage.storeEntries([mockEntry]);
|
|
188
|
-
await storage.storeAssets([mockAsset]);
|
|
189
|
-
const stats = storage.getStats();
|
|
190
|
-
expect(stats).toEqual({
|
|
191
|
-
contentTypes: 1,
|
|
192
|
-
entries: 1,
|
|
193
|
-
assets: 1
|
|
194
|
-
});
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
describe('InMemorySyncStateStorage', () => {
|
|
199
|
-
let storage;
|
|
200
|
-
beforeEach(() => {
|
|
201
|
-
storage = new InMemorySyncStateStorage_1.InMemorySyncStateStorage();
|
|
202
|
-
});
|
|
203
|
-
describe('setSyncToken', () => {
|
|
204
|
-
it('should store sync token', async () => {
|
|
205
|
-
await storage.setSyncToken('space-1', 'token-123');
|
|
206
|
-
const token = await storage.getSyncToken('space-1');
|
|
207
|
-
expect(token).toBe('token-123');
|
|
208
|
-
});
|
|
209
|
-
});
|
|
210
|
-
describe('getSyncToken', () => {
|
|
211
|
-
it('should return null for non-existent token', async () => {
|
|
212
|
-
const token = await storage.getSyncToken('non-existent');
|
|
213
|
-
expect(token).toBeNull();
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
describe('clearSyncToken', () => {
|
|
217
|
-
it('should clear sync token', async () => {
|
|
218
|
-
await storage.setSyncToken('space-1', 'token-123');
|
|
219
|
-
await storage.clearSyncToken('space-1');
|
|
220
|
-
const token = await storage.getSyncToken('space-1');
|
|
221
|
-
expect(token).toBeNull();
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
describe('getAllTokens', () => {
|
|
225
|
-
it('should return all tokens', async () => {
|
|
226
|
-
await storage.setSyncToken('space-1', 'token-1');
|
|
227
|
-
await storage.setSyncToken('space-2', 'token-2');
|
|
228
|
-
const tokens = storage.getAllTokens();
|
|
229
|
-
expect(tokens).toEqual({
|
|
230
|
-
'space-1': 'token-1',
|
|
231
|
-
'space-2': 'token-2'
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
describe('clearAll', () => {
|
|
236
|
-
it('should clear all tokens', async () => {
|
|
237
|
-
await storage.setSyncToken('space-1', 'token-1');
|
|
238
|
-
await storage.setSyncToken('space-2', 'token-2');
|
|
239
|
-
storage.clearAll();
|
|
240
|
-
const tokens = storage.getAllTokens();
|
|
241
|
-
expect(tokens).toEqual({});
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
describe('InMemoryMigrationStorage', () => {
|
|
246
|
-
let storage;
|
|
247
|
-
beforeEach(() => {
|
|
248
|
-
storage = new InMemoryMigrationStorage_1.InMemoryMigrationStorage();
|
|
249
|
-
});
|
|
250
|
-
const mockMigration = {
|
|
251
|
-
id: 'migration-1',
|
|
252
|
-
name: 'Test Migration',
|
|
253
|
-
description: 'Test description',
|
|
254
|
-
executedAt: new Date('2025-01-01T00:00:00Z'),
|
|
255
|
-
executedBy: 'test-user',
|
|
256
|
-
status: 'completed',
|
|
257
|
-
spaceId: 'space-1',
|
|
258
|
-
environmentId: 'master',
|
|
259
|
-
dryRun: false,
|
|
260
|
-
duration: 1000
|
|
261
|
-
};
|
|
262
|
-
describe('saveMigration', () => {
|
|
263
|
-
it('should save migration record', async () => {
|
|
264
|
-
await storage.saveMigration(mockMigration);
|
|
265
|
-
const migration = await storage.getMigration('migration-1');
|
|
266
|
-
expect(migration).toEqual(mockMigration);
|
|
267
|
-
});
|
|
268
|
-
});
|
|
269
|
-
describe('getMigration', () => {
|
|
270
|
-
it('should return null for non-existent migration', async () => {
|
|
271
|
-
const migration = await storage.getMigration('non-existent');
|
|
272
|
-
expect(migration).toBeNull();
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
describe('getMigrations', () => {
|
|
276
|
-
it('should return migrations for space and environment', async () => {
|
|
277
|
-
await storage.saveMigration(mockMigration);
|
|
278
|
-
await storage.saveMigration({
|
|
279
|
-
...mockMigration,
|
|
280
|
-
id: 'migration-2',
|
|
281
|
-
spaceId: 'space-2'
|
|
282
|
-
});
|
|
283
|
-
const migrations = await storage.getMigrations('space-1', 'master');
|
|
284
|
-
expect(migrations).toHaveLength(1);
|
|
285
|
-
expect(migrations[0].id).toBe('migration-1');
|
|
286
|
-
});
|
|
287
|
-
});
|
|
288
|
-
describe('hasMigration', () => {
|
|
289
|
-
it('should return true for completed migration', async () => {
|
|
290
|
-
await storage.saveMigration(mockMigration);
|
|
291
|
-
const has = await storage.hasMigration('migration-1', 'space-1', 'master');
|
|
292
|
-
expect(has).toBe(true);
|
|
293
|
-
});
|
|
294
|
-
it('should return false for non-completed migration', async () => {
|
|
295
|
-
await storage.saveMigration({
|
|
296
|
-
...mockMigration,
|
|
297
|
-
status: 'failed'
|
|
298
|
-
});
|
|
299
|
-
const has = await storage.hasMigration('migration-1', 'space-1', 'master');
|
|
300
|
-
expect(has).toBe(false);
|
|
301
|
-
});
|
|
302
|
-
it('should return false for non-existent migration', async () => {
|
|
303
|
-
const has = await storage.hasMigration('non-existent', 'space-1', 'master');
|
|
304
|
-
expect(has).toBe(false);
|
|
305
|
-
});
|
|
306
|
-
});
|
|
307
|
-
describe('updateMigrationStatus', () => {
|
|
308
|
-
it('should update migration status', async () => {
|
|
309
|
-
await storage.saveMigration({
|
|
310
|
-
...mockMigration,
|
|
311
|
-
status: 'running'
|
|
312
|
-
});
|
|
313
|
-
await storage.updateMigrationStatus('migration-1', 'completed', undefined, 2000);
|
|
314
|
-
const migration = await storage.getMigration('migration-1');
|
|
315
|
-
expect(migration?.status).toBe('completed');
|
|
316
|
-
expect(migration?.duration).toBe(2000);
|
|
317
|
-
});
|
|
318
|
-
it('should update error message', async () => {
|
|
319
|
-
await storage.saveMigration(mockMigration);
|
|
320
|
-
await storage.updateMigrationStatus('migration-1', 'failed', 'Test error');
|
|
321
|
-
const migration = await storage.getMigration('migration-1');
|
|
322
|
-
expect(migration?.status).toBe('failed');
|
|
323
|
-
expect(migration?.error).toBe('Test error');
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
describe('getAllMigrations', () => {
|
|
327
|
-
it('should return all migrations', async () => {
|
|
328
|
-
await storage.saveMigration(mockMigration);
|
|
329
|
-
await storage.saveMigration({ ...mockMigration, id: 'migration-2' });
|
|
330
|
-
const migrations = storage.getAllMigrations();
|
|
331
|
-
expect(migrations).toHaveLength(2);
|
|
332
|
-
});
|
|
333
|
-
});
|
|
334
|
-
describe('clearAll', () => {
|
|
335
|
-
it('should clear all migrations', async () => {
|
|
336
|
-
await storage.saveMigration(mockMigration);
|
|
337
|
-
storage.clearAll();
|
|
338
|
-
const migrations = storage.getAllMigrations();
|
|
339
|
-
expect(migrations).toHaveLength(0);
|
|
340
|
-
});
|
|
341
|
-
});
|
|
342
|
-
});
|
|
343
|
-
//# sourceMappingURL=storage.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.test.js","sourceRoot":"","sources":["../../src/__tests__/storage.test.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;AAEF,8EAA2E;AAC3E,kFAA+E;AAC/E,kFAA+E;AAI/E,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,IAAI,OAA+B,CAAC;IAEpC,UAAU,CAAC,GAAG,EAAE;QACd,OAAO,GAAG,IAAI,+CAAsB,EAAE,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,MAAM,SAAS,GAAo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CAAC;YAErE,MAAM,UAAU,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;YAC9C,MAAM,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;QACxB,EAAE,CAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;YAC3C,MAAM,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;YAC3C,OAAO,CAAC,QAAQ,EAAE,CAAC;YAEnB,MAAM,UAAU,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;YAC9C,MAAM,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/errors.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type ContentfulSuiteErrorCode = 'CONTENTFUL_SUITE_ERROR' | 'INVALID_INPUT' | 'OPERATION_FAILED';
|
|
2
|
-
export interface ContentfulSuiteErrorOptions {
|
|
3
|
-
cause?: Error;
|
|
4
|
-
code?: ContentfulSuiteErrorCode;
|
|
5
|
-
context?: Record<string, unknown>;
|
|
6
|
-
}
|
|
7
|
-
export declare class ContentfulSuiteError extends Error {
|
|
8
|
-
readonly code: ContentfulSuiteErrorCode;
|
|
9
|
-
readonly context?: Record<string, unknown>;
|
|
10
|
-
constructor(message: string, options?: ContentfulSuiteErrorOptions);
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,wBAAwB,GAChC,wBAAwB,GACxB,eAAe,GACf,kBAAkB,CAAC;AAEvB,MAAM,WAAW,2BAA2B;IAC1C,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAE/B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,2BAA2B;CASnE"}
|
package/dist/errors.js
DELETED
|
@@ -1,25 +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
|
-
exports.ContentfulSuiteError = void 0;
|
|
11
|
-
class ContentfulSuiteError extends Error {
|
|
12
|
-
code;
|
|
13
|
-
context;
|
|
14
|
-
constructor(message, options) {
|
|
15
|
-
super(message, options?.cause ? { cause: options.cause } : undefined);
|
|
16
|
-
this.name = 'ContentfulSuiteError';
|
|
17
|
-
this.code = options?.code ?? 'CONTENTFUL_SUITE_ERROR';
|
|
18
|
-
if (options?.context !== undefined) {
|
|
19
|
-
this.context = options.context;
|
|
20
|
-
}
|
|
21
|
-
Error.captureStackTrace?.(this, this.constructor);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.ContentfulSuiteError = ContentfulSuiteError;
|
|
25
|
-
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;AAaF,MAAa,oBAAqB,SAAQ,KAAK;IACpC,IAAI,CAA2B;IAC/B,OAAO,CAA2B;IAE3C,YAAY,OAAe,EAAE,OAAqC;QAChE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QACtE,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,wBAAwB,CAAC;QACtD,IAAI,OAAO,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;YACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QACjC,CAAC;QACD,KAAK,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC;CACF;AAbD,oDAaC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { ContentfulSuite } from './ContentfulSuite';
|
|
2
|
-
export { ContentfulSuiteError, type ContentfulSuiteErrorCode, type ContentfulSuiteErrorOptions } from './errors';
|
|
3
|
-
export type { ContentfulSuiteConfig, OAuthConfig, SpaceConfig, GatewayConfig, SyncConfig, WebhooksConfig, CacheConfig, MigrationConfig, StorageConfig, ServiceStatus, SuiteHealth } from './types';
|
|
4
|
-
export { InMemoryContentStorage, InMemorySyncStateStorage, InMemoryMigrationStorage } from './storage';
|
|
5
|
-
export type { ContentfulEntry, ContentfulAsset, ContentfulContentType, ContentfulSpace, ContentfulEnvironment, ContentfulLocale } from '@bernierllc/contentful-types';
|
|
6
|
-
export { ContentfulClientCore } from '@bernierllc/contentful-client-core';
|
|
7
|
-
export { ContentfulAuth } from '@bernierllc/contentful-auth';
|
|
8
|
-
export { ContentfulCMAClient } from '@bernierllc/contentful-cma-client';
|
|
9
|
-
export { ContentfulCDAClient } from '@bernierllc/contentful-cda-client';
|
|
10
|
-
export { ContentfulGraphQLClient } from '@bernierllc/contentful-graphql-client';
|
|
11
|
-
export { ContentfulWebhookHandler } from '@bernierllc/contentful-webhook-handler';
|
|
12
|
-
export { ContentfulExportAdapter } from '@bernierllc/contentful-export-adapter';
|
|
13
|
-
export { ContentfulRichTextRenderer } from '@bernierllc/contentful-rich-text';
|
|
14
|
-
export { ContentfulGatewayService } from '@bernierllc/contentful-gateway-service';
|
|
15
|
-
export { ContentfulSyncService } from '@bernierllc/contentful-sync-service';
|
|
16
|
-
export { ContentfulWebhookService } from '@bernierllc/contentful-webhook-service';
|
|
17
|
-
export { ContentfulCacheService } from '@bernierllc/contentful-cache-service';
|
|
18
|
-
export { ContentfulMigrationService } from '@bernierllc/contentful-migration-service';
|
|
19
|
-
export type { ContentStorage, SyncStateStorage } from '@bernierllc/contentful-sync-service';
|
|
20
|
-
export type { MigrationStorage } from '@bernierllc/contentful-migration-service';
|
|
21
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,oBAAoB,EAAE,KAAK,wBAAwB,EAAE,KAAK,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAGjH,YAAY,EACV,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,EACV,cAAc,EACd,WAAW,EACX,eAAe,EACf,aAAa,EACb,aAAa,EACb,WAAW,EACZ,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,WAAW,CAAC;AAGnB,YAAY,EACV,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAGtF,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAC5F,YAAY,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,48 +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
|
-
exports.ContentfulMigrationService = exports.ContentfulCacheService = exports.ContentfulWebhookService = exports.ContentfulSyncService = exports.ContentfulGatewayService = exports.ContentfulRichTextRenderer = exports.ContentfulExportAdapter = exports.ContentfulWebhookHandler = exports.ContentfulGraphQLClient = exports.ContentfulCDAClient = exports.ContentfulCMAClient = exports.ContentfulAuth = exports.ContentfulClientCore = exports.InMemoryMigrationStorage = exports.InMemorySyncStateStorage = exports.InMemoryContentStorage = exports.ContentfulSuiteError = exports.ContentfulSuite = void 0;
|
|
11
|
-
// Main suite orchestrator
|
|
12
|
-
var ContentfulSuite_1 = require("./ContentfulSuite");
|
|
13
|
-
Object.defineProperty(exports, "ContentfulSuite", { enumerable: true, get: function () { return ContentfulSuite_1.ContentfulSuite; } });
|
|
14
|
-
// Error exports
|
|
15
|
-
var errors_1 = require("./errors");
|
|
16
|
-
Object.defineProperty(exports, "ContentfulSuiteError", { enumerable: true, get: function () { return errors_1.ContentfulSuiteError; } });
|
|
17
|
-
// Storage implementations
|
|
18
|
-
var storage_1 = require("./storage");
|
|
19
|
-
Object.defineProperty(exports, "InMemoryContentStorage", { enumerable: true, get: function () { return storage_1.InMemoryContentStorage; } });
|
|
20
|
-
Object.defineProperty(exports, "InMemorySyncStateStorage", { enumerable: true, get: function () { return storage_1.InMemorySyncStateStorage; } });
|
|
21
|
-
Object.defineProperty(exports, "InMemoryMigrationStorage", { enumerable: true, get: function () { return storage_1.InMemoryMigrationStorage; } });
|
|
22
|
-
var contentful_client_core_1 = require("@bernierllc/contentful-client-core");
|
|
23
|
-
Object.defineProperty(exports, "ContentfulClientCore", { enumerable: true, get: function () { return contentful_client_core_1.ContentfulClientCore; } });
|
|
24
|
-
var contentful_auth_1 = require("@bernierllc/contentful-auth");
|
|
25
|
-
Object.defineProperty(exports, "ContentfulAuth", { enumerable: true, get: function () { return contentful_auth_1.ContentfulAuth; } });
|
|
26
|
-
var contentful_cma_client_1 = require("@bernierllc/contentful-cma-client");
|
|
27
|
-
Object.defineProperty(exports, "ContentfulCMAClient", { enumerable: true, get: function () { return contentful_cma_client_1.ContentfulCMAClient; } });
|
|
28
|
-
var contentful_cda_client_1 = require("@bernierllc/contentful-cda-client");
|
|
29
|
-
Object.defineProperty(exports, "ContentfulCDAClient", { enumerable: true, get: function () { return contentful_cda_client_1.ContentfulCDAClient; } });
|
|
30
|
-
var contentful_graphql_client_1 = require("@bernierllc/contentful-graphql-client");
|
|
31
|
-
Object.defineProperty(exports, "ContentfulGraphQLClient", { enumerable: true, get: function () { return contentful_graphql_client_1.ContentfulGraphQLClient; } });
|
|
32
|
-
var contentful_webhook_handler_1 = require("@bernierllc/contentful-webhook-handler");
|
|
33
|
-
Object.defineProperty(exports, "ContentfulWebhookHandler", { enumerable: true, get: function () { return contentful_webhook_handler_1.ContentfulWebhookHandler; } });
|
|
34
|
-
var contentful_export_adapter_1 = require("@bernierllc/contentful-export-adapter");
|
|
35
|
-
Object.defineProperty(exports, "ContentfulExportAdapter", { enumerable: true, get: function () { return contentful_export_adapter_1.ContentfulExportAdapter; } });
|
|
36
|
-
var contentful_rich_text_1 = require("@bernierllc/contentful-rich-text");
|
|
37
|
-
Object.defineProperty(exports, "ContentfulRichTextRenderer", { enumerable: true, get: function () { return contentful_rich_text_1.ContentfulRichTextRenderer; } });
|
|
38
|
-
var contentful_gateway_service_1 = require("@bernierllc/contentful-gateway-service");
|
|
39
|
-
Object.defineProperty(exports, "ContentfulGatewayService", { enumerable: true, get: function () { return contentful_gateway_service_1.ContentfulGatewayService; } });
|
|
40
|
-
var contentful_sync_service_1 = require("@bernierllc/contentful-sync-service");
|
|
41
|
-
Object.defineProperty(exports, "ContentfulSyncService", { enumerable: true, get: function () { return contentful_sync_service_1.ContentfulSyncService; } });
|
|
42
|
-
var contentful_webhook_service_1 = require("@bernierllc/contentful-webhook-service");
|
|
43
|
-
Object.defineProperty(exports, "ContentfulWebhookService", { enumerable: true, get: function () { return contentful_webhook_service_1.ContentfulWebhookService; } });
|
|
44
|
-
var contentful_cache_service_1 = require("@bernierllc/contentful-cache-service");
|
|
45
|
-
Object.defineProperty(exports, "ContentfulCacheService", { enumerable: true, get: function () { return contentful_cache_service_1.ContentfulCacheService; } });
|
|
46
|
-
var contentful_migration_service_1 = require("@bernierllc/contentful-migration-service");
|
|
47
|
-
Object.defineProperty(exports, "ContentfulMigrationService", { enumerable: true, get: function () { return contentful_migration_service_1.ContentfulMigrationService; } });
|
|
48
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;AAEF,0BAA0B;AAC1B,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAExB,gBAAgB;AAChB,mCAAiH;AAAxG,8GAAA,oBAAoB,OAAA;AAiB7B,0BAA0B;AAC1B,qCAImB;AAHjB,iHAAA,sBAAsB,OAAA;AACtB,mHAAA,wBAAwB,OAAA;AACxB,mHAAA,wBAAwB,OAAA;AAa1B,6EAA0E;AAAjE,8HAAA,oBAAoB,OAAA;AAC7B,+DAA6D;AAApD,iHAAA,cAAc,OAAA;AACvB,2EAAwE;AAA/D,4HAAA,mBAAmB,OAAA;AAC5B,2EAAwE;AAA/D,4HAAA,mBAAmB,OAAA;AAC5B,mFAAgF;AAAvE,oIAAA,uBAAuB,OAAA;AAChC,qFAAkF;AAAzE,sIAAA,wBAAwB,OAAA;AACjC,mFAAgF;AAAvE,oIAAA,uBAAuB,OAAA;AAChC,yEAA8E;AAArE,kIAAA,0BAA0B,OAAA;AACnC,qFAAkF;AAAzE,sIAAA,wBAAwB,OAAA;AACjC,+EAA4E;AAAnE,gIAAA,qBAAqB,OAAA;AAC9B,qFAAkF;AAAzE,sIAAA,wBAAwB,OAAA;AACjC,iFAA8E;AAArE,kIAAA,sBAAsB,OAAA;AAC/B,yFAAsF;AAA7E,0IAAA,0BAA0B,OAAA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { ContentfulEntry, ContentfulAsset, ContentfulContentType } from '@bernierllc/contentful-types';
|
|
2
|
-
import type { ContentStorage } from '@bernierllc/contentful-sync-service';
|
|
3
|
-
/**
|
|
4
|
-
* In-memory implementation of ContentStorage for testing and simple use cases
|
|
5
|
-
*/
|
|
6
|
-
export declare class InMemoryContentStorage implements ContentStorage {
|
|
7
|
-
private contentTypes;
|
|
8
|
-
private entries;
|
|
9
|
-
private assets;
|
|
10
|
-
storeContentTypes(contentTypes: ContentfulContentType[]): Promise<void>;
|
|
11
|
-
storeEntries(entries: ContentfulEntry[]): Promise<void>;
|
|
12
|
-
storeAssets(assets: ContentfulAsset[]): Promise<void>;
|
|
13
|
-
updateEntry(entry: ContentfulEntry): Promise<void>;
|
|
14
|
-
updateAsset(asset: ContentfulAsset): Promise<void>;
|
|
15
|
-
deleteEntry(entryId: string): Promise<void>;
|
|
16
|
-
deleteAsset(assetId: string): Promise<void>;
|
|
17
|
-
getEntry(entryId: string): Promise<ContentfulEntry | null>;
|
|
18
|
-
getAsset(assetId: string): Promise<ContentfulAsset | null>;
|
|
19
|
-
clearSpace(_spaceId: string): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Get all entries (for ML training use case)
|
|
22
|
-
*/
|
|
23
|
-
getAllEntries(): ContentfulEntry[];
|
|
24
|
-
/**
|
|
25
|
-
* Get all assets
|
|
26
|
-
*/
|
|
27
|
-
getAllAssets(): ContentfulAsset[];
|
|
28
|
-
/**
|
|
29
|
-
* Get all content types
|
|
30
|
-
*/
|
|
31
|
-
getAllContentTypes(): ContentfulContentType[];
|
|
32
|
-
/**
|
|
33
|
-
* Get stats for monitoring
|
|
34
|
-
*/
|
|
35
|
-
getStats(): {
|
|
36
|
-
contentTypes: number;
|
|
37
|
-
entries: number;
|
|
38
|
-
assets: number;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=InMemoryContentStorage.d.ts.map
|
|
@@ -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AAI,qBAAqB,EAAE;IAI7C;;OAEG;IACH,QAAQ;;;;;CAOT"}
|
|
@@ -1,86 +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
|
-
exports.InMemoryContentStorage = void 0;
|
|
11
|
-
/**
|
|
12
|
-
* In-memory implementation of ContentStorage for testing and simple use cases
|
|
13
|
-
*/
|
|
14
|
-
class InMemoryContentStorage {
|
|
15
|
-
contentTypes = new Map();
|
|
16
|
-
entries = new Map();
|
|
17
|
-
assets = new Map();
|
|
18
|
-
async storeContentTypes(contentTypes) {
|
|
19
|
-
for (const ct of contentTypes) {
|
|
20
|
-
this.contentTypes.set(ct.sys.id, ct);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
async storeEntries(entries) {
|
|
24
|
-
for (const entry of entries) {
|
|
25
|
-
this.entries.set(entry.sys.id, entry);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
async storeAssets(assets) {
|
|
29
|
-
for (const asset of assets) {
|
|
30
|
-
this.assets.set(asset.sys.id, asset);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
async updateEntry(entry) {
|
|
34
|
-
this.entries.set(entry.sys.id, entry);
|
|
35
|
-
}
|
|
36
|
-
async updateAsset(asset) {
|
|
37
|
-
this.assets.set(asset.sys.id, asset);
|
|
38
|
-
}
|
|
39
|
-
async deleteEntry(entryId) {
|
|
40
|
-
this.entries.delete(entryId);
|
|
41
|
-
}
|
|
42
|
-
async deleteAsset(assetId) {
|
|
43
|
-
this.assets.delete(assetId);
|
|
44
|
-
}
|
|
45
|
-
async getEntry(entryId) {
|
|
46
|
-
return this.entries.get(entryId) || null;
|
|
47
|
-
}
|
|
48
|
-
async getAsset(assetId) {
|
|
49
|
-
return this.assets.get(assetId) || null;
|
|
50
|
-
}
|
|
51
|
-
async clearSpace(_spaceId) {
|
|
52
|
-
this.contentTypes.clear();
|
|
53
|
-
this.entries.clear();
|
|
54
|
-
this.assets.clear();
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Get all entries (for ML training use case)
|
|
58
|
-
*/
|
|
59
|
-
getAllEntries() {
|
|
60
|
-
return Array.from(this.entries.values());
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Get all assets
|
|
64
|
-
*/
|
|
65
|
-
getAllAssets() {
|
|
66
|
-
return Array.from(this.assets.values());
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Get all content types
|
|
70
|
-
*/
|
|
71
|
-
getAllContentTypes() {
|
|
72
|
-
return Array.from(this.contentTypes.values());
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Get stats for monitoring
|
|
76
|
-
*/
|
|
77
|
-
getStats() {
|
|
78
|
-
return {
|
|
79
|
-
contentTypes: this.contentTypes.size,
|
|
80
|
-
entries: this.entries.size,
|
|
81
|
-
assets: this.assets.size
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
exports.InMemoryContentStorage = InMemoryContentStorage;
|
|
86
|
-
//# sourceMappingURL=InMemoryContentStorage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryContentStorage.js","sourceRoot":"","sources":["../../src/storage/InMemoryContentStorage.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;AASF;;GAEG;AACH,MAAa,sBAAsB;IACzB,YAAY,GAAuC,IAAI,GAAG,EAAE,CAAC;IAC7D,OAAO,GAAiC,IAAI,GAAG,EAAE,CAAC;IAClD,MAAM,GAAiC,IAAI,GAAG,EAAE,CAAC;IAEzD,KAAK,C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