@bernierllc/contentful-suite 1.0.3
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/.eslintrc.cjs +16 -0
- package/LICENSE +5 -0
- package/README.md +497 -0
- package/__mocks__/@bernierllc/contentful-cache-service.ts +12 -0
- package/__mocks__/@bernierllc/contentful-gateway-service.ts +21 -0
- package/__mocks__/@bernierllc/contentful-migration-service.ts +13 -0
- package/__mocks__/@bernierllc/contentful-sync-service.ts +14 -0
- package/__mocks__/@bernierllc/contentful-webhook-service.ts +15 -0
- package/__mocks__/@bernierllc/logger.ts +27 -0
- package/__mocks__/@bernierllc/neverhub-adapter.ts +17 -0
- package/coverage/clover.xml +192 -0
- package/coverage/coverage-final.json +5 -0
- package/coverage/coverage-summary.json +6 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +131 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/ContentfulSuite.ts.html +1330 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/src/storage/InMemoryContentStorage.ts.html +394 -0
- package/coverage/lcov-report/src/storage/InMemoryMigrationStorage.ts.html +304 -0
- package/coverage/lcov-report/src/storage/InMemorySyncStateStorage.ts.html +211 -0
- package/coverage/lcov-report/src/storage/index.html +146 -0
- package/coverage/lcov.info +349 -0
- package/dist/ContentfulSuite.d.ts +85 -0
- package/dist/ContentfulSuite.d.ts.map +1 -0
- package/dist/ContentfulSuite.js +352 -0
- package/dist/ContentfulSuite.js.map +1 -0
- package/dist/__tests__/ContentfulSuite.test.d.ts +2 -0
- package/dist/__tests__/ContentfulSuite.test.d.ts.map +1 -0
- package/dist/__tests__/ContentfulSuite.test.js +347 -0
- package/dist/__tests__/ContentfulSuite.test.js.map +1 -0
- package/dist/__tests__/storage.test.d.ts +2 -0
- package/dist/__tests__/storage.test.d.ts.map +1 -0
- package/dist/__tests__/storage.test.js +343 -0
- package/dist/__tests__/storage.test.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/storage/InMemoryContentStorage.d.ts +41 -0
- package/dist/storage/InMemoryContentStorage.d.ts.map +1 -0
- package/dist/storage/InMemoryContentStorage.js +88 -0
- package/dist/storage/InMemoryContentStorage.js.map +1 -0
- package/dist/storage/InMemoryMigrationStorage.d.ts +21 -0
- package/dist/storage/InMemoryMigrationStorage.d.ts.map +1 -0
- package/dist/storage/InMemoryMigrationStorage.js +61 -0
- package/dist/storage/InMemoryMigrationStorage.js.map +1 -0
- package/dist/storage/InMemorySyncStateStorage.d.ts +19 -0
- package/dist/storage/InMemorySyncStateStorage.d.ts.map +1 -0
- package/dist/storage/InMemorySyncStateStorage.js +41 -0
- package/dist/storage/InMemorySyncStateStorage.js.map +1 -0
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +17 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/types.d.ts +131 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/jest.config.cjs +45 -0
- package/package.json +67 -0
- package/src/ContentfulSuite.ts +415 -0
- package/src/__tests__/ContentfulSuite.test.ts +424 -0
- package/src/__tests__/storage.test.ts +405 -0
- package/src/index.ts +60 -0
- package/src/storage/InMemoryContentStorage.ts +103 -0
- package/src/storage/InMemoryMigrationStorage.ts +73 -0
- package/src/storage/InMemorySyncStateStorage.ts +42 -0
- package/src/storage/index.ts +11 -0
- package/src/types.ts +158 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,352 @@
|
|
|
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.ContentfulSuite = void 0;
|
|
11
|
+
const contentful_gateway_service_1 = require("@bernierllc/contentful-gateway-service");
|
|
12
|
+
const contentful_gateway_service_2 = require("@bernierllc/contentful-gateway-service");
|
|
13
|
+
const contentful_sync_service_1 = require("@bernierllc/contentful-sync-service");
|
|
14
|
+
const contentful_webhook_service_1 = require("@bernierllc/contentful-webhook-service");
|
|
15
|
+
const contentful_cache_service_1 = require("@bernierllc/contentful-cache-service");
|
|
16
|
+
const contentful_migration_service_1 = require("@bernierllc/contentful-migration-service");
|
|
17
|
+
const logger_1 = require("@bernierllc/logger");
|
|
18
|
+
const neverhub_adapter_1 = require("@bernierllc/neverhub-adapter");
|
|
19
|
+
/**
|
|
20
|
+
* ContentfulSuite - Complete Contentful integration orchestrator
|
|
21
|
+
*
|
|
22
|
+
* Provides unified interface for:
|
|
23
|
+
* - ML training pipeline (full content export + sync)
|
|
24
|
+
* - Headless CMS proxy (API gateway + caching)
|
|
25
|
+
* - Content syndication (real-time webhooks)
|
|
26
|
+
* - Multi-space/organization management
|
|
27
|
+
*/
|
|
28
|
+
class ContentfulSuite {
|
|
29
|
+
constructor(config) {
|
|
30
|
+
this.syncServices = new Map();
|
|
31
|
+
this.migrationServices = new Map();
|
|
32
|
+
this.syncIntervals = [];
|
|
33
|
+
this.config = config;
|
|
34
|
+
this.logger = new logger_1.Logger({
|
|
35
|
+
level: logger_1.LogLevel.INFO,
|
|
36
|
+
transports: [],
|
|
37
|
+
context: { service: 'ContentfulSuite' }
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Initialize all suite services
|
|
42
|
+
*/
|
|
43
|
+
async initialize() {
|
|
44
|
+
this.logger.info('Initializing Contentful suite', {
|
|
45
|
+
gateway: this.config.gateway.enabled,
|
|
46
|
+
sync: this.config.sync.enabled,
|
|
47
|
+
webhooks: this.config.webhooks.enabled,
|
|
48
|
+
cache: this.config.cache.enabled,
|
|
49
|
+
migration: this.config.migration.enabled
|
|
50
|
+
});
|
|
51
|
+
// Initialize NeverHub integration
|
|
52
|
+
if (await neverhub_adapter_1.NeverHubAdapter.detect()) {
|
|
53
|
+
this.neverhub = new neverhub_adapter_1.NeverHubAdapter();
|
|
54
|
+
await this.neverhub.register({
|
|
55
|
+
type: 'contentful-suite',
|
|
56
|
+
name: '@bernierllc/contentful-suite',
|
|
57
|
+
version: '1.0.0',
|
|
58
|
+
dependencies: ['storage', 'cache', 'queue'],
|
|
59
|
+
capabilities: [
|
|
60
|
+
{
|
|
61
|
+
type: 'cms',
|
|
62
|
+
name: 'contentful-integration',
|
|
63
|
+
version: '1.0.0',
|
|
64
|
+
metadata: {
|
|
65
|
+
apis: ['CMA', 'CDA', 'GraphQL'],
|
|
66
|
+
features: ['sync', 'webhooks', 'caching', 'migrations']
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
discoveryEnabled: true
|
|
71
|
+
});
|
|
72
|
+
this.logger.info('NeverHub integration initialized');
|
|
73
|
+
}
|
|
74
|
+
// Initialize gateway service
|
|
75
|
+
if (this.config.gateway.enabled) {
|
|
76
|
+
const tokenStorage = this.config.storage.tokenStorage || new contentful_gateway_service_2.InMemoryTokenStorage();
|
|
77
|
+
this.gateway = new contentful_gateway_service_1.ContentfulGatewayService({
|
|
78
|
+
port: this.config.gateway.port,
|
|
79
|
+
apiKeys: this.config.gateway.apiKeys,
|
|
80
|
+
oauthConfig: this.config.oauth
|
|
81
|
+
}, tokenStorage);
|
|
82
|
+
this.logger.info('Gateway service initialized', { port: this.config.gateway.port });
|
|
83
|
+
}
|
|
84
|
+
// Initialize sync services (one per space)
|
|
85
|
+
if (this.config.sync.enabled) {
|
|
86
|
+
if (!this.config.storage.contentStorage || !this.config.storage.syncStateStorage) {
|
|
87
|
+
throw new Error('Content storage and sync state storage required for sync service');
|
|
88
|
+
}
|
|
89
|
+
for (const space of this.config.sync.spaces) {
|
|
90
|
+
const syncService = new contentful_sync_service_1.ContentfulSyncService({
|
|
91
|
+
spaceId: space.spaceId,
|
|
92
|
+
environmentId: space.environmentId,
|
|
93
|
+
accessToken: space.accessToken,
|
|
94
|
+
contentStorage: this.config.storage.contentStorage,
|
|
95
|
+
syncStateStorage: this.config.storage.syncStateStorage,
|
|
96
|
+
webhookSecret: this.config.webhooks.secret,
|
|
97
|
+
syncInterval: this.config.sync.interval
|
|
98
|
+
});
|
|
99
|
+
this.syncServices.set(space.spaceId, syncService);
|
|
100
|
+
// Perform initial sync if needed
|
|
101
|
+
const needsSync = await this.checkNeedsInitialSync(space);
|
|
102
|
+
if (needsSync) {
|
|
103
|
+
this.logger.info('Performing initial sync', { spaceId: space.spaceId });
|
|
104
|
+
// Initial sync requires CMA token - user must call it manually with their CMA token
|
|
105
|
+
this.logger.info('Initial sync required - call getSyncService(spaceId).initialSync(cmaToken)');
|
|
106
|
+
}
|
|
107
|
+
this.logger.info('Sync service initialized', { spaceId: space.spaceId });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// Initialize webhook service
|
|
111
|
+
if (this.config.webhooks.enabled) {
|
|
112
|
+
this.webhooks = new contentful_webhook_service_1.ContentfulWebhookService({
|
|
113
|
+
webhookSecret: this.config.webhooks.secret
|
|
114
|
+
});
|
|
115
|
+
// Connect webhooks to sync services
|
|
116
|
+
if (this.syncServices.size > 0) {
|
|
117
|
+
this.webhooks.on('webhook.received', async (data) => {
|
|
118
|
+
// Route webhook to appropriate sync service based on space
|
|
119
|
+
const syncServicesArray = Array.from(this.syncServices.values());
|
|
120
|
+
for (const syncService of syncServicesArray) {
|
|
121
|
+
try {
|
|
122
|
+
await syncService.processWebhook(data.body, data.headers);
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
const err = error;
|
|
126
|
+
this.logger.error('Error processing webhook in sync service', err);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
// Connect webhooks to cache service for invalidation
|
|
132
|
+
if (this.cache) {
|
|
133
|
+
this.webhooks.on('webhook.received', async (data) => {
|
|
134
|
+
try {
|
|
135
|
+
// Cache service handles webhook internally via sync service
|
|
136
|
+
this.logger.debug('Webhook received for cache invalidation', { topic: data.topic });
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
const err = error;
|
|
140
|
+
this.logger.error('Error processing webhook in cache service', err);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
this.logger.info('Webhook service initialized', { port: this.config.webhooks.port });
|
|
145
|
+
}
|
|
146
|
+
// Initialize cache service
|
|
147
|
+
if (this.config.cache.enabled && this.config.sync.spaces.length > 0) {
|
|
148
|
+
const firstSpace = this.config.sync.spaces[0];
|
|
149
|
+
this.cache = new contentful_cache_service_1.ContentfulCacheService({
|
|
150
|
+
contentful: {
|
|
151
|
+
space: firstSpace.spaceId,
|
|
152
|
+
accessToken: firstSpace.accessToken,
|
|
153
|
+
environment: firstSpace.environmentId
|
|
154
|
+
},
|
|
155
|
+
cache: {
|
|
156
|
+
ttl: this.config.cache.ttl,
|
|
157
|
+
maxSize: 1000
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
this.logger.info('Cache service initialized', { ttl: this.config.cache.ttl });
|
|
161
|
+
}
|
|
162
|
+
// Initialize migration services (one per space)
|
|
163
|
+
if (this.config.migration.enabled) {
|
|
164
|
+
if (!this.config.storage.migrationStorage) {
|
|
165
|
+
throw new Error('Migration storage required for migration service');
|
|
166
|
+
}
|
|
167
|
+
for (const space of this.config.sync.spaces) {
|
|
168
|
+
const migrationService = new contentful_migration_service_1.ContentfulMigrationService({
|
|
169
|
+
spaceId: space.spaceId,
|
|
170
|
+
environmentId: space.environmentId,
|
|
171
|
+
accessToken: space.accessToken,
|
|
172
|
+
storage: this.config.storage.migrationStorage
|
|
173
|
+
});
|
|
174
|
+
this.migrationServices.set(space.spaceId, migrationService);
|
|
175
|
+
this.logger.info('Migration service initialized', { spaceId: space.spaceId });
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
this.logger.info('Contentful suite initialized successfully', this.getServiceStatus());
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Start all services
|
|
182
|
+
*/
|
|
183
|
+
async start() {
|
|
184
|
+
this.logger.info('Starting Contentful suite');
|
|
185
|
+
// Start gateway
|
|
186
|
+
if (this.gateway) {
|
|
187
|
+
await this.gateway.start();
|
|
188
|
+
this.logger.info('Gateway service started');
|
|
189
|
+
}
|
|
190
|
+
// Start webhook server
|
|
191
|
+
if (this.webhooks) {
|
|
192
|
+
await this.webhooks.start(this.config.webhooks.port);
|
|
193
|
+
this.logger.info('Webhook service started', { port: this.config.webhooks.port });
|
|
194
|
+
}
|
|
195
|
+
// Start incremental sync polling for each space
|
|
196
|
+
if (this.config.sync.enabled && this.config.sync.interval) {
|
|
197
|
+
const syncServicesEntries = Array.from(this.syncServices.entries());
|
|
198
|
+
for (const [spaceId, syncService] of syncServicesEntries) {
|
|
199
|
+
const interval = setInterval(async () => {
|
|
200
|
+
try {
|
|
201
|
+
this.logger.debug('Running incremental sync', { spaceId });
|
|
202
|
+
await syncService.incrementalSync();
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
const err = error;
|
|
206
|
+
this.logger.error('Incremental sync error', err);
|
|
207
|
+
}
|
|
208
|
+
}, this.config.sync.interval);
|
|
209
|
+
this.syncIntervals.push(interval);
|
|
210
|
+
}
|
|
211
|
+
this.logger.info('Sync polling started', {
|
|
212
|
+
interval: this.config.sync.interval,
|
|
213
|
+
spaces: this.config.sync.spaces.length
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
// Publish started event to NeverHub
|
|
217
|
+
if (this.neverhub) {
|
|
218
|
+
await this.neverhub.publishEvent({
|
|
219
|
+
type: 'contentful.suite.started',
|
|
220
|
+
data: {
|
|
221
|
+
timestamp: new Date().toISOString(),
|
|
222
|
+
services: this.getServiceStatus()
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
this.logger.info('Contentful suite started successfully');
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Stop all services gracefully
|
|
230
|
+
*/
|
|
231
|
+
async stop() {
|
|
232
|
+
this.logger.info('Stopping Contentful suite');
|
|
233
|
+
// Clear sync intervals
|
|
234
|
+
for (const interval of this.syncIntervals) {
|
|
235
|
+
clearInterval(interval);
|
|
236
|
+
}
|
|
237
|
+
this.syncIntervals = [];
|
|
238
|
+
// Stop webhook service
|
|
239
|
+
if (this.webhooks) {
|
|
240
|
+
await this.webhooks.stop();
|
|
241
|
+
this.logger.info('Webhook service stopped');
|
|
242
|
+
}
|
|
243
|
+
// Gateway doesn't have explicit stop in current implementation
|
|
244
|
+
// Future: Add graceful shutdown for gateway
|
|
245
|
+
// Publish stopped event to NeverHub
|
|
246
|
+
if (this.neverhub) {
|
|
247
|
+
await this.neverhub.publishEvent({
|
|
248
|
+
type: 'contentful.suite.stopped',
|
|
249
|
+
data: {
|
|
250
|
+
timestamp: new Date().toISOString()
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
this.logger.info('Contentful suite stopped');
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Get content for ML training
|
|
258
|
+
* Queries local storage for all synced content
|
|
259
|
+
*/
|
|
260
|
+
async getMLTrainingData(spaceId, contentType) {
|
|
261
|
+
if (!this.config.storage.contentStorage) {
|
|
262
|
+
throw new Error('Content storage not configured');
|
|
263
|
+
}
|
|
264
|
+
const storage = this.config.storage.contentStorage;
|
|
265
|
+
// In a real implementation, we'd query by space and content type
|
|
266
|
+
// For now, assume InMemoryContentStorage with getAllEntries method
|
|
267
|
+
if ('getAllEntries' in storage && typeof storage.getAllEntries === 'function') {
|
|
268
|
+
const entries = storage.getAllEntries();
|
|
269
|
+
if (contentType) {
|
|
270
|
+
return entries.filter((e) => e.sys.contentType.sys.id === contentType);
|
|
271
|
+
}
|
|
272
|
+
return entries;
|
|
273
|
+
}
|
|
274
|
+
this.logger.warn('Content storage does not support getAllEntries method');
|
|
275
|
+
return [];
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Run migration on a specific space
|
|
279
|
+
*/
|
|
280
|
+
async runMigration(spaceId, migrationFunction, options) {
|
|
281
|
+
const migrationService = this.migrationServices.get(spaceId);
|
|
282
|
+
if (!migrationService) {
|
|
283
|
+
throw new Error(`No migration service for space ${spaceId}`);
|
|
284
|
+
}
|
|
285
|
+
await migrationService.runMigration(migrationFunction, options);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Get health status of all services
|
|
289
|
+
*/
|
|
290
|
+
getHealth() {
|
|
291
|
+
return {
|
|
292
|
+
status: 'ok',
|
|
293
|
+
timestamp: new Date().toISOString(),
|
|
294
|
+
services: this.getServiceStatus()
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Get service status
|
|
299
|
+
*/
|
|
300
|
+
getServiceStatus() {
|
|
301
|
+
return {
|
|
302
|
+
gateway: !!this.gateway,
|
|
303
|
+
sync: this.syncServices.size > 0,
|
|
304
|
+
webhooks: !!this.webhooks,
|
|
305
|
+
cache: !!this.cache,
|
|
306
|
+
migration: this.migrationServices.size > 0,
|
|
307
|
+
neverhub: !!this.neverhub
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Check if a space needs initial sync
|
|
312
|
+
*/
|
|
313
|
+
async checkNeedsInitialSync(space) {
|
|
314
|
+
if (!this.config.storage.syncStateStorage) {
|
|
315
|
+
return true;
|
|
316
|
+
}
|
|
317
|
+
const token = await this.config.storage.syncStateStorage.getSyncToken(space.spaceId);
|
|
318
|
+
return token === null;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Get gateway service (for advanced use)
|
|
322
|
+
*/
|
|
323
|
+
getGateway() {
|
|
324
|
+
return this.gateway;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Get sync service for a space (for advanced use)
|
|
328
|
+
*/
|
|
329
|
+
getSyncService(spaceId) {
|
|
330
|
+
return this.syncServices.get(spaceId);
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Get webhook service (for advanced use)
|
|
334
|
+
*/
|
|
335
|
+
getWebhookService() {
|
|
336
|
+
return this.webhooks;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Get cache service (for advanced use)
|
|
340
|
+
*/
|
|
341
|
+
getCacheService() {
|
|
342
|
+
return this.cache;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Get migration service for a space (for advanced use)
|
|
346
|
+
*/
|
|
347
|
+
getMigrationService(spaceId) {
|
|
348
|
+
return this.migrationServices.get(spaceId);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
exports.ContentfulSuite = ContentfulSuite;
|
|
352
|
+
//# sourceMappingURL=ContentfulSuite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentfulSuite.js","sourceRoot":"","sources":["../src/ContentfulSuite.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;AAEF,uFAAkF;AAClF,uFAA8E;AAC9E,iFAA4E;AAC5E,uFAAkF;AAClF,mFAA8E;AAC9E,2FAAsF;AACtF,+CAAsD;AACtD,mEAA+D;AAQ/D;;;;;;;;GAQG;AACH,MAAa,eAAe;IAW1B,YAAY,MAA6B;QATjC,iBAAY,GAAuC,IAAI,GAAG,EAAE,CAAC;QAG7D,sBAAiB,GAA4C,IAAI,GAAG,EAAE,CAAC;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