@bsb/base 9.0.1 → 9.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.
Files changed (56) hide show
  1. package/README.md +5 -8
  2. package/lib/schemas/config-default.plugin.json +1 -1
  3. package/lib/schemas/events-default.plugin.json +1 -1
  4. package/lib/schemas/observable-default.plugin.json +1 -1
  5. package/lib/serviceBase/plugins.js +10 -20
  6. package/lib/serviceBase/plugins.js.map +1 -1
  7. package/lib/tests/mocks.d.ts +37 -0
  8. package/lib/tests/mocks.js +164 -0
  9. package/lib/tests/mocks.js.map +1 -0
  10. package/lib/tests/sb/plugins/events/broadcast.d.ts +30 -0
  11. package/lib/tests/sb/plugins/events/broadcast.js +357 -0
  12. package/lib/tests/sb/plugins/events/broadcast.js.map +1 -0
  13. package/lib/tests/sb/plugins/events/emit.d.ts +30 -0
  14. package/lib/tests/sb/plugins/events/emit.js +353 -0
  15. package/lib/tests/sb/plugins/events/emit.js.map +1 -0
  16. package/lib/tests/sb/plugins/events/emitAndReturn.d.ts +30 -0
  17. package/lib/tests/sb/plugins/events/emitAndReturn.js +382 -0
  18. package/lib/tests/sb/plugins/events/emitAndReturn.js.map +1 -0
  19. package/lib/{plugins/service-default1/client.d.ts → tests/sb/plugins/events/emitStreamAndReceiveStream.d.ts} +4 -16
  20. package/lib/tests/sb/plugins/events/emitStreamAndReceiveStream.js +298 -0
  21. package/lib/tests/sb/plugins/events/emitStreamAndReceiveStream.js.map +1 -0
  22. package/lib/tests/sb/plugins/events/index.d.ts +28 -0
  23. package/lib/tests/sb/plugins/events/index.js +69 -0
  24. package/lib/tests/sb/plugins/events/index.js.map +1 -0
  25. package/lib/tests/trace.d.ts +41 -0
  26. package/lib/tests/trace.js +85 -0
  27. package/lib/tests/trace.js.map +1 -0
  28. package/lib/tests.d.ts +27 -0
  29. package/lib/{plugins/service-default4/index.js → tests.js} +16 -35
  30. package/lib/tests.js.map +1 -0
  31. package/package.json +92 -91
  32. package/lib/plugins/service-benchmarkify/index.d.ts +0 -312
  33. package/lib/plugins/service-benchmarkify/index.js +0 -138
  34. package/lib/plugins/service-benchmarkify/index.js.map +0 -1
  35. package/lib/plugins/service-default0/index.d.ts +0 -287
  36. package/lib/plugins/service-default0/index.js +0 -118
  37. package/lib/plugins/service-default0/index.js.map +0 -1
  38. package/lib/plugins/service-default1/client.js +0 -70
  39. package/lib/plugins/service-default1/client.js.map +0 -1
  40. package/lib/plugins/service-default1/index.d.ts +0 -304
  41. package/lib/plugins/service-default1/index.js +0 -179
  42. package/lib/plugins/service-default1/index.js.map +0 -1
  43. package/lib/plugins/service-default2/index.d.ts +0 -359
  44. package/lib/plugins/service-default2/index.js +0 -137
  45. package/lib/plugins/service-default2/index.js.map +0 -1
  46. package/lib/plugins/service-default3/index.d.ts +0 -119
  47. package/lib/plugins/service-default3/index.js +0 -88
  48. package/lib/plugins/service-default3/index.js.map +0 -1
  49. package/lib/plugins/service-default4/index.d.ts +0 -81
  50. package/lib/plugins/service-default4/index.js.map +0 -1
  51. package/lib/schemas/service-benchmarkify.json +0 -229
  52. package/lib/schemas/service-default0.json +0 -216
  53. package/lib/schemas/service-default1.json +0 -242
  54. package/lib/schemas/service-default2.json +0 -268
  55. package/lib/schemas/service-default3.json +0 -65
  56. package/lib/schemas/service-default4.json +0 -33
@@ -1,304 +0,0 @@
1
- /**
2
- * BSB (Better-Service-Base) is an event-bus based microservice framework.
3
- * Copyright (C) 2016 - 2025 BetterCorp (PTY) Ltd
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU Affero General Public License as published
7
- * by the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * Alternatively, you may obtain a commercial license for this program.
11
- * The commercial license allows you to use the Program in a closed-source manner,
12
- * including the right to create derivative works that are not subject to the terms
13
- * of the AGPL.
14
- *
15
- * To obtain a commercial license, please contact the copyright holders at
16
- * https://www.bettercorp.dev. The terms and conditions of the commercial license
17
- * will be provided upon request.
18
- *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU Affero General Public License for more details.
23
- *
24
- * You should have received a copy of the GNU Affero General Public License
25
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
26
- */
27
- import { BSBService, BSBServiceConstructor } from "../../base/BSBService";
28
- import { Observable } from "../../interfaces/observable";
29
- import { z } from "zod";
30
- export declare const Config: import("../../base").BSBPluginConfigClass<z.ZodNull>;
31
- export declare const EventSchemas: {
32
- readonly emitEvents: {
33
- readonly 'data.processed': {
34
- input: {
35
- _bsb: "object";
36
- properties: {
37
- readonly itemId: import("../..").BSBStringType;
38
- readonly result: import("../..").BSBType;
39
- readonly processingTime: import("../..").BSBNumberType;
40
- };
41
- required: string[];
42
- description?: string;
43
- optional?: boolean;
44
- nullable?: boolean;
45
- };
46
- description?: string;
47
- readonly __brand: "fire-and-forget";
48
- };
49
- };
50
- readonly onEvents: {
51
- readonly 'data.received': {
52
- input: {
53
- _bsb: "object";
54
- properties: {
55
- readonly itemId: import("../..").BSBStringType;
56
- readonly data: import("../..").BSBType;
57
- readonly source: import("../..").BSBStringType;
58
- };
59
- required: string[];
60
- description?: string;
61
- optional?: boolean;
62
- nullable?: boolean;
63
- };
64
- description?: string;
65
- readonly __brand: "fire-and-forget";
66
- };
67
- };
68
- readonly emitReturnableEvents: {
69
- readonly 'calculation.request': {
70
- input: {
71
- _bsb: "object";
72
- properties: {
73
- readonly operation: import("../..").BSBEnumType;
74
- readonly operands: import("../..").BSBArrayType;
75
- };
76
- required: string[];
77
- description?: string;
78
- optional?: boolean;
79
- nullable?: boolean;
80
- };
81
- output: import("../..").BSBNumberType;
82
- description?: string;
83
- defaultTimeout?: number;
84
- readonly __brand: "returnable";
85
- };
86
- };
87
- readonly onReturnableEvents: {
88
- readonly 'text.transform': {
89
- input: {
90
- _bsb: "object";
91
- properties: {
92
- readonly text: import("../..").BSBStringType;
93
- readonly transformation: import("../..").BSBEnumType;
94
- };
95
- required: string[];
96
- description?: string;
97
- optional?: boolean;
98
- nullable?: boolean;
99
- };
100
- output: import("../..").BSBStringType;
101
- description?: string;
102
- defaultTimeout?: number;
103
- readonly __brand: "returnable";
104
- };
105
- readonly calculate: {
106
- input: {
107
- _bsb: "object";
108
- properties: {
109
- readonly a: import("../..").BSBNumberType;
110
- readonly b: import("../..").BSBNumberType;
111
- };
112
- required: string[];
113
- description?: string;
114
- optional?: boolean;
115
- nullable?: boolean;
116
- };
117
- output: import("../..").BSBNumberType;
118
- description?: string;
119
- defaultTimeout?: number;
120
- readonly __brand: "returnable";
121
- };
122
- };
123
- readonly emitBroadcast: {
124
- readonly 'service.status': {
125
- input: {
126
- _bsb: "object";
127
- properties: {
128
- readonly status: import("../..").BSBEnumType;
129
- readonly timestamp: import("../..").BSBStringType;
130
- readonly details: import("../..").BSBStringType & {
131
- optional: true;
132
- };
133
- };
134
- required: string[];
135
- description?: string;
136
- optional?: boolean;
137
- nullable?: boolean;
138
- };
139
- description?: string;
140
- readonly __brand: "broadcast";
141
- };
142
- };
143
- readonly onBroadcast: {
144
- readonly 'config.updated': {
145
- input: {
146
- _bsb: "object";
147
- properties: {
148
- readonly section: import("../..").BSBStringType;
149
- readonly changes: import("../..").BSBType;
150
- readonly version: import("../..").BSBStringType;
151
- };
152
- required: string[];
153
- description?: string;
154
- optional?: boolean;
155
- nullable?: boolean;
156
- };
157
- description?: string;
158
- readonly __brand: "broadcast";
159
- };
160
- };
161
- };
162
- export declare class Plugin extends BSBService<InstanceType<typeof Config>, typeof EventSchemas> {
163
- static Config: import("../../base").BSBPluginConfigClass<z.ZodNull>;
164
- static EventSchemas: {
165
- readonly emitEvents: {
166
- readonly 'data.processed': {
167
- input: {
168
- _bsb: "object";
169
- properties: {
170
- readonly itemId: import("../..").BSBStringType;
171
- readonly result: import("../..").BSBType;
172
- readonly processingTime: import("../..").BSBNumberType;
173
- };
174
- required: string[];
175
- description?: string;
176
- optional?: boolean;
177
- nullable?: boolean;
178
- };
179
- description?: string;
180
- readonly __brand: "fire-and-forget";
181
- };
182
- };
183
- readonly onEvents: {
184
- readonly 'data.received': {
185
- input: {
186
- _bsb: "object";
187
- properties: {
188
- readonly itemId: import("../..").BSBStringType;
189
- readonly data: import("../..").BSBType;
190
- readonly source: import("../..").BSBStringType;
191
- };
192
- required: string[];
193
- description?: string;
194
- optional?: boolean;
195
- nullable?: boolean;
196
- };
197
- description?: string;
198
- readonly __brand: "fire-and-forget";
199
- };
200
- };
201
- readonly emitReturnableEvents: {
202
- readonly 'calculation.request': {
203
- input: {
204
- _bsb: "object";
205
- properties: {
206
- readonly operation: import("../..").BSBEnumType;
207
- readonly operands: import("../..").BSBArrayType;
208
- };
209
- required: string[];
210
- description?: string;
211
- optional?: boolean;
212
- nullable?: boolean;
213
- };
214
- output: import("../..").BSBNumberType;
215
- description?: string;
216
- defaultTimeout?: number;
217
- readonly __brand: "returnable";
218
- };
219
- };
220
- readonly onReturnableEvents: {
221
- readonly 'text.transform': {
222
- input: {
223
- _bsb: "object";
224
- properties: {
225
- readonly text: import("../..").BSBStringType;
226
- readonly transformation: import("../..").BSBEnumType;
227
- };
228
- required: string[];
229
- description?: string;
230
- optional?: boolean;
231
- nullable?: boolean;
232
- };
233
- output: import("../..").BSBStringType;
234
- description?: string;
235
- defaultTimeout?: number;
236
- readonly __brand: "returnable";
237
- };
238
- readonly calculate: {
239
- input: {
240
- _bsb: "object";
241
- properties: {
242
- readonly a: import("../..").BSBNumberType;
243
- readonly b: import("../..").BSBNumberType;
244
- };
245
- required: string[];
246
- description?: string;
247
- optional?: boolean;
248
- nullable?: boolean;
249
- };
250
- output: import("../..").BSBNumberType;
251
- description?: string;
252
- defaultTimeout?: number;
253
- readonly __brand: "returnable";
254
- };
255
- };
256
- readonly emitBroadcast: {
257
- readonly 'service.status': {
258
- input: {
259
- _bsb: "object";
260
- properties: {
261
- readonly status: import("../..").BSBEnumType;
262
- readonly timestamp: import("../..").BSBStringType;
263
- readonly details: import("../..").BSBStringType & {
264
- optional: true;
265
- };
266
- };
267
- required: string[];
268
- description?: string;
269
- optional?: boolean;
270
- nullable?: boolean;
271
- };
272
- description?: string;
273
- readonly __brand: "broadcast";
274
- };
275
- };
276
- readonly onBroadcast: {
277
- readonly 'config.updated': {
278
- input: {
279
- _bsb: "object";
280
- properties: {
281
- readonly section: import("../..").BSBStringType;
282
- readonly changes: import("../..").BSBType;
283
- readonly version: import("../..").BSBStringType;
284
- };
285
- required: string[];
286
- description?: string;
287
- optional?: boolean;
288
- nullable?: boolean;
289
- };
290
- description?: string;
291
- readonly __brand: "broadcast";
292
- };
293
- };
294
- };
295
- private service0;
296
- constructor(config: BSBServiceConstructor<InstanceType<typeof Config>, typeof EventSchemas>);
297
- initBeforePlugins?: string[] | undefined;
298
- initAfterPlugins?: string[] | undefined;
299
- runBeforePlugins?: string[] | undefined;
300
- runAfterPlugins?: string[] | undefined;
301
- dispose?(): void;
302
- run?(): void | Promise<void>;
303
- init(obs: Observable): Promise<void>;
304
- }
@@ -1,179 +0,0 @@
1
- "use strict";
2
- /**
3
- * BSB (Better-Service-Base) is an event-bus based microservice framework.
4
- * Copyright (C) 2016 - 2025 BetterCorp (PTY) Ltd
5
- *
6
- * This program is free software: you can redistribute it and/or modify
7
- * it under the terms of the GNU Affero General Public License as published
8
- * by the Free Software Foundation, either version 3 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * Alternatively, you may obtain a commercial license for this program.
12
- * The commercial license allows you to use the Program in a closed-source manner,
13
- * including the right to create derivative works that are not subject to the terms
14
- * of the AGPL.
15
- *
16
- * To obtain a commercial license, please contact the copyright holders at
17
- * https://www.bettercorp.dev. The terms and conditions of the commercial license
18
- * will be provided upon request.
19
- *
20
- * This program is distributed in the hope that it will be useful,
21
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- * GNU Affero General Public License for more details.
24
- *
25
- * You should have received a copy of the GNU Affero General Public License
26
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
27
- */
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Plugin = exports.EventSchemas = exports.Config = void 0;
30
- const BSBService_1 = require("../../base/BSBService");
31
- const base_1 = require("../../base");
32
- const schema_events_1 = require("../../interfaces/schema-events");
33
- const service_default0_1 = require("../service-default0");
34
- const zod_1 = require("zod");
35
- // v9: Config with metadata (no configuration options for this service)
36
- exports.Config = (0, base_1.createConfigSchema)({
37
- name: 'service-default1',
38
- description: 'Default service demonstrating BSB event patterns',
39
- version: '1.0.0',
40
- image: '../docs/public/assets/images/bsb-logo.png',
41
- tags: ['default', 'example'],
42
- }, zod_1.z.null());
43
- exports.EventSchemas = (0, schema_events_1.createEventSchemas)({
44
- // Events this service emits (fire-and-forget, first listener receives)
45
- emitEvents: {
46
- 'data.processed': (0, schema_events_1.createFireAndForgetEvent)(base_1.bsb.object({
47
- itemId: base_1.bsb.string({ description: 'Processed item ID' }),
48
- result: base_1.bsb.unknown('Processing result'),
49
- processingTime: base_1.bsb.number({ description: 'Processing time in milliseconds' })
50
- }, 'Data processing result'), 'Emitted when data processing is complete')
51
- },
52
- // Events this service listens to (fire-and-forget)
53
- onEvents: {
54
- 'data.received': (0, schema_events_1.createFireAndForgetEvent)(base_1.bsb.object({
55
- itemId: base_1.bsb.string({ description: 'Received item ID' }),
56
- data: base_1.bsb.unknown('Data payload'),
57
- source: base_1.bsb.string({ description: 'Data source' })
58
- }, 'Received data parameters'), 'Handle incoming data for processing')
59
- },
60
- // Returnable events this service emits (requests from this service)
61
- emitReturnableEvents: {
62
- 'calculation.request': (0, schema_events_1.createReturnableEvent)(base_1.bsb.object({
63
- operation: base_1.bsb.enum(['add', 'subtract', 'multiply', 'divide'], 'Calculation operation'),
64
- operands: base_1.bsb.array(base_1.bsb.number({ description: 'Operand' }), { min: 2, description: 'List of operands' })
65
- }, 'Calculation request parameters'), base_1.bsb.number({ description: 'Calculation result' }), 'Request calculation from external service')
66
- },
67
- // Returnable events this service listens to (requests to this service)
68
- onReturnableEvents: {
69
- 'text.transform': (0, schema_events_1.createReturnableEvent)(base_1.bsb.object({
70
- text: base_1.bsb.string({ description: 'Text to transform' }),
71
- transformation: base_1.bsb.enum(['uppercase', 'lowercase', 'reverse', 'capitalize'], 'Transformation type')
72
- }, 'Text transformation parameters'), base_1.bsb.string({ description: 'Transformed text' }), 'Transform text according to specified operation'),
73
- calculate: (0, schema_events_1.createReturnableEvent)(base_1.bsb.object({
74
- a: base_1.bsb.number({ description: 'First number' }),
75
- b: base_1.bsb.number({ description: 'Second number' })
76
- }, 'Calculation parameters'), base_1.bsb.number({ description: 'Calculation result' }), 'Calculate with two numbers')
77
- },
78
- // Broadcast events this service emits (all listeners receive)
79
- emitBroadcast: {
80
- 'service.status': (0, schema_events_1.createBroadcastEvent)(base_1.bsb.object({
81
- status: base_1.bsb.enum(['starting', 'ready', 'busy', 'stopping'], 'Service status'),
82
- timestamp: base_1.bsb.datetime('Status timestamp'),
83
- details: (0, base_1.optional)(base_1.bsb.string({ description: 'Status details' }))
84
- }, 'Service status parameters'), 'Broadcast service status updates')
85
- },
86
- // Broadcast events this service listens to
87
- onBroadcast: {
88
- 'config.updated': (0, schema_events_1.createBroadcastEvent)(base_1.bsb.object({
89
- section: base_1.bsb.string({ description: 'Configuration section' }),
90
- changes: base_1.bsb.record(base_1.bsb.string({ description: 'Setting name' }), base_1.bsb.unknown('Setting value'), 'Configuration changes'),
91
- version: base_1.bsb.string({ description: 'Configuration version' })
92
- }, 'Config update parameters'), 'Listen for configuration update broadcasts')
93
- }
94
- });
95
- class Plugin extends BSBService_1.BSBService {
96
- // v9: Required static properties for auto-generation
97
- static Config = exports.Config;
98
- static EventSchemas = exports.EventSchemas;
99
- // PLUGIN_CLIENT is now auto-generated from Config.metadata
100
- service0;
101
- constructor(config) {
102
- super({
103
- ...config,
104
- eventSchemas: exports.EventSchemas
105
- });
106
- this.service0 = new base_1.ServiceClient(service_default0_1.Plugin, this);
107
- }
108
- initBeforePlugins;
109
- initAfterPlugins;
110
- runBeforePlugins;
111
- runAfterPlugins;
112
- async init(obs) {
113
- // v9: Observable provides unified logging, metrics, and tracing
114
- obs.log.info("Initializing service-default1");
115
- // Listen to service0's calculation events (service0 emits these)
116
- // Event handlers receive Observable (not DTrace) with automatic context
117
- await this.service0.events.onReturnableEvent("calculate", obs, async (handlerObs, input) => {
118
- // handlerObs is a child span created automatically by BSB
119
- handlerObs.log.info("Handling calculation request from service0: {a} * {b}", {
120
- a: input.a,
121
- b: input.b
122
- });
123
- return input.a * input.b;
124
- });
125
- // Handle text transformation requests
126
- // Demonstrates Observable usage in event handlers
127
- await this.events.onReturnableEvent("text.transform", obs, async (handlerObs, input) => {
128
- handlerObs.log.info("Transforming text: {text} using {transformation}", {
129
- text: input.text,
130
- transformation: input.transformation
131
- });
132
- // Can create child spans for sub-operations
133
- const workObs = handlerObs.startSpan("transform-operation");
134
- workObs.setAttribute("operation", input.transformation);
135
- let result;
136
- switch (input.transformation) {
137
- case 'uppercase':
138
- result = input.text.toUpperCase();
139
- break;
140
- case 'lowercase':
141
- result = input.text.toLowerCase();
142
- break;
143
- case 'reverse':
144
- result = input.text.split('').reverse().join('');
145
- break;
146
- case 'capitalize':
147
- result = input.text.charAt(0).toUpperCase() + input.text.slice(1).toLowerCase();
148
- break;
149
- default:
150
- result = input.text;
151
- break;
152
- }
153
- workObs.end({ "result.length": result.length });
154
- return result;
155
- });
156
- // Handle calculation requests
157
- await this.events.onReturnableEvent("calculate", obs, async (handlerObs, input) => {
158
- handlerObs.log.info("Calculating {a} * {b}", { a: input.a, b: input.b });
159
- return input.a * input.b;
160
- });
161
- // Handle incoming data for processing
162
- await this.events.onEvent("data.received", obs, async (handlerObs, input) => {
163
- handlerObs.log.info("Received data for processing: {itemId}", { itemId: input.itemId });
164
- // Process the data and emit completion event
165
- await this.events.emitEvent("data.processed", obs, {
166
- itemId: input.itemId,
167
- result: { processed: true, timestamp: new Date().toISOString() },
168
- processingTime: 100
169
- });
170
- });
171
- // Listen for configuration update broadcasts
172
- await this.events.onBroadcast("config.updated", obs, async (handlerObs, input) => {
173
- handlerObs.log.info("Configuration updated: {section}", { section: input.section });
174
- // Handle configuration changes...
175
- });
176
- }
177
- }
178
- exports.Plugin = Plugin;
179
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/service-default1/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;AAEH,sDAA0E;AAC1E,qCAA8E;AAE9E,kEAA2I;AAC3I,0DAA+F;AAC/F,6BAAwB;AAExB,uEAAuE;AAC1D,QAAA,MAAM,GAAG,IAAA,yBAAkB,EACtC;IACE,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kDAAkD;IAC/D,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,2CAA2C;IAClD,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;CAC7B,EACD,OAAC,CAAC,IAAI,EAAE,CACT,CAAC;AAEW,QAAA,YAAY,GAAG,IAAA,kCAAkB,EAAC;IAC7C,uEAAuE;IACvE,UAAU,EAAE;QACV,gBAAgB,EAAE,IAAA,wCAAwB,EACxC,UAAG,CAAC,MAAM,CAAC;YACT,MAAM,EAAE,UAAG,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;YACxD,MAAM,EAAE,UAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC;YACxC,cAAc,EAAE,UAAG,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;SAC/E,EAAE,wBAAwB,CAAC,EAC5B,0CAA0C,CAC3C;KACF;IAED,mDAAmD;IACnD,QAAQ,EAAE;QACR,eAAe,EAAE,IAAA,wCAAwB,EACvC,UAAG,CAAC,MAAM,CAAC;YACT,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