@pact-foundation/pact 10.0.0-beta.60 → 10.0.0-beta.61
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/CHANGELOG.md +17 -0
- package/MIGRATION.md +24 -1
- package/README.md +174 -1374
- package/package.json +24 -36
- package/src/common/net.d.ts +1 -0
- package/src/common/net.js +11 -1
- package/src/common/net.js.map +1 -1
- package/src/common/request.js +1 -0
- package/src/common/request.js.map +1 -1
- package/src/common/spec.d.ts +2 -0
- package/src/common/spec.js +22 -0
- package/src/common/spec.js.map +1 -0
- package/src/dsl/apolloGraphql.spec.js +24 -0
- package/src/dsl/apolloGraphql.spec.js.map +1 -1
- package/src/dsl/graphql.d.ts +2 -2
- package/src/dsl/graphql.js +1 -0
- package/src/dsl/graphql.js.map +1 -1
- package/src/dsl/graphql.spec.js +77 -2
- package/src/dsl/graphql.spec.js.map +1 -1
- package/src/dsl/interaction.d.ts +13 -7
- package/src/dsl/interaction.js +30 -1
- package/src/dsl/interaction.js.map +1 -1
- package/src/dsl/interaction.spec.js +21 -31
- package/src/dsl/interaction.spec.js.map +1 -1
- package/src/dsl/matchers.d.ts +27 -32
- package/src/dsl/matchers.js +24 -23
- package/src/dsl/matchers.js.map +1 -1
- package/src/dsl/matchers.spec.js +101 -96
- package/src/dsl/matchers.spec.js.map +1 -1
- package/src/dsl/message.d.ts +19 -13
- package/src/dsl/mockService.d.ts +1 -46
- package/src/dsl/mockService.js +0 -72
- package/src/dsl/mockService.js.map +1 -1
- package/src/dsl/verifier/verifier.spec.js +1 -1
- package/src/dsl/verifier/verifier.spec.js.map +1 -1
- package/src/httpPact/ffi.d.ts +15 -0
- package/src/httpPact/ffi.js +91 -0
- package/src/httpPact/ffi.js.map +1 -0
- package/src/{dsl/mockService.spec.d.ts → httpPact/ffi.spec.d.ts} +0 -0
- package/src/httpPact/ffi.spec.js +81 -0
- package/src/httpPact/ffi.spec.js.map +1 -0
- package/src/httpPact/index.d.ts +10 -10
- package/src/httpPact/index.js +141 -80
- package/src/httpPact/index.js.map +1 -1
- package/src/httpPact/index.spec.js +117 -220
- package/src/httpPact/index.spec.js.map +1 -1
- package/src/httpPact/tracing.js +4 -4
- package/src/httpPact/tracing.js.map +1 -1
- package/src/index.d.ts +1 -7
- package/src/index.js +3 -8
- package/src/index.js.map +1 -1
- package/src/messageConsumerPact.d.ts +34 -17
- package/src/messageConsumerPact.js +85 -66
- package/src/messageConsumerPact.js.map +1 -1
- package/src/messageConsumerPact.spec.js +0 -46
- package/src/messageConsumerPact.spec.js.map +1 -1
- package/src/messageProviderPact.js +1 -1
- package/src/messageProviderPact.js.map +1 -1
- package/src/messageProviderPact.spec.js +17 -2
- package/src/messageProviderPact.spec.js.map +1 -1
- package/src/v3/display.d.ts +6 -0
- package/src/v3/display.js +83 -0
- package/src/v3/display.js.map +1 -0
- package/src/v3/index.d.ts +1 -6
- package/src/v3/index.js +1 -6
- package/src/v3/index.js.map +1 -1
- package/src/v3/matchers.d.ts +1 -0
- package/src/v3/matchers.js +7 -1
- package/src/v3/matchers.js.map +1 -1
- package/src/v3/pact.d.ts +4 -70
- package/src/v3/pact.js +68 -133
- package/src/v3/pact.js.map +1 -1
- package/src/v3/types.d.ts +81 -0
- package/src/v3/types.js +11 -0
- package/src/v3/types.js.map +1 -0
- package/src/v3/xml/xmlElement.spec.js +31 -48
- package/src/v3/xml/xmlElement.spec.js.map +1 -1
- package/src/dsl/mockService.spec.js +0 -124
- package/src/dsl/mockService.spec.js.map +0 -1
- package/src/dsl/publisher.d.ts +0 -10
- package/src/dsl/publisher.js +0 -22
- package/src/dsl/publisher.js.map +0 -1
- package/src/dsl/publisher.spec.d.ts +0 -1
- package/src/dsl/publisher.spec.js +0 -47
- package/src/dsl/publisher.spec.js.map +0 -1
- package/src/v3/verifier.d.ts +0 -12
- package/src/v3/verifier.js +0 -23
- package/src/v3/verifier.js.map +0 -1
- package/v3/index.d.ts +0 -1
- package/v3/index.js +0 -20
- package/v3/index.js.map +0 -1
package/src/httpPact/index.js
CHANGED
|
@@ -33,23 +33,65 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
33
33
|
__setModuleDefault(result, mod);
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
|
+
function step(op) {
|
|
50
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
+
while (_) try {
|
|
52
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
53
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
|
+
switch (op[0]) {
|
|
55
|
+
case 0: case 1: t = op; break;
|
|
56
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
57
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
58
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59
|
+
default:
|
|
60
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
62
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
63
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
64
|
+
if (t[2]) _.ops.pop();
|
|
65
|
+
_.trys.pop(); continue;
|
|
66
|
+
}
|
|
67
|
+
op = body.call(thisArg, _);
|
|
68
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
69
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
|
+
}
|
|
71
|
+
};
|
|
36
72
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
73
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
74
|
};
|
|
39
75
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
76
|
exports.Pact = void 0;
|
|
77
|
+
/* eslint-disable no-promise-executor-return */
|
|
41
78
|
var pact_core_1 = __importDefault(require("@pact-foundation/pact-core"));
|
|
79
|
+
var index_1 = require("@pact-foundation/pact-core/src/consumer/index");
|
|
80
|
+
var clc = __importStar(require("cli-color"));
|
|
42
81
|
var path = __importStar(require("path"));
|
|
43
|
-
var cli_color_1 = __importDefault(require("cli-color"));
|
|
44
82
|
var process_1 = __importDefault(require("process"));
|
|
45
83
|
var lodash_1 = require("lodash");
|
|
46
84
|
var interaction_1 = require("../dsl/interaction");
|
|
47
85
|
var net_1 = require("../common/net");
|
|
48
86
|
var logger_1 = __importStar(require("../common/logger"));
|
|
49
|
-
var mockService_1 = require("../dsl/mockService");
|
|
50
87
|
var verificationError_1 = __importDefault(require("../errors/verificationError"));
|
|
51
88
|
var configurationError_1 = __importDefault(require("../errors/configurationError"));
|
|
52
89
|
var tracing_1 = require("./tracing");
|
|
90
|
+
var v3_1 = require("../v3");
|
|
91
|
+
var package_json_1 = require("../../package.json");
|
|
92
|
+
var display_1 = require("../v3/display");
|
|
93
|
+
var spec_1 = require("../common/spec");
|
|
94
|
+
var ffi_1 = require("./ffi");
|
|
53
95
|
var logErrorNoMockServer = function () {
|
|
54
96
|
logger_1.default.error("The pact mock service doesn't appear to be running\n" +
|
|
55
97
|
' - Please check the logs above to ensure that there are no pact service startup failures\n' +
|
|
@@ -67,6 +109,9 @@ var logErrorNoMockServer = function () {
|
|
|
67
109
|
var Pact = /** @class */ (function () {
|
|
68
110
|
function Pact(config) {
|
|
69
111
|
this.opts = Pact.createOptionsWithDefaults(config);
|
|
112
|
+
if (this.opts.pactfileWriteMode === 'overwrite') {
|
|
113
|
+
logger_1.default.warn("WARNING: the behaviour of pactfileWriteMode 'overwrite' has changed since version 9.x.x. See the type definition or the MIGRATION.md guide for details.");
|
|
114
|
+
}
|
|
70
115
|
if ((0, lodash_1.isEmpty)(this.opts.consumer)) {
|
|
71
116
|
throw new configurationError_1.default('You must specify a Consumer for this pact.');
|
|
72
117
|
}
|
|
@@ -78,23 +123,49 @@ var Pact = /** @class */ (function () {
|
|
|
78
123
|
if (this.opts.logLevel === 'trace') {
|
|
79
124
|
(0, tracing_1.traceHttpInteractions)();
|
|
80
125
|
}
|
|
81
|
-
this.
|
|
126
|
+
this.reset();
|
|
82
127
|
}
|
|
83
128
|
Pact.createOptionsWithDefaults = function (opts) {
|
|
84
129
|
return __assign(__assign({}, Pact.defaults), opts);
|
|
85
130
|
};
|
|
86
131
|
/**
|
|
87
|
-
* Setup the pact framework, including
|
|
88
|
-
*
|
|
132
|
+
* Setup the pact framework, including allocating a port for the dynamic
|
|
133
|
+
* mock server
|
|
134
|
+
*
|
|
89
135
|
* @returns {Promise}
|
|
90
136
|
*/
|
|
91
137
|
Pact.prototype.setup = function () {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
138
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
139
|
+
var port;
|
|
140
|
+
return __generator(this, function (_a) {
|
|
141
|
+
switch (_a.label) {
|
|
142
|
+
case 0:
|
|
143
|
+
if (!(this.opts.port > 0)) return [3 /*break*/, 2];
|
|
144
|
+
return [4 /*yield*/, (0, net_1.isPortAvailable)(this.opts.port, this.opts.host)];
|
|
145
|
+
case 1:
|
|
146
|
+
_a.sent();
|
|
147
|
+
return [3 /*break*/, 4];
|
|
148
|
+
case 2: return [4 /*yield*/, (0, net_1.freePort)()];
|
|
149
|
+
case 3:
|
|
150
|
+
port = _a.sent();
|
|
151
|
+
logger_1.default.debug("free port discovered: ".concat(port));
|
|
152
|
+
this.opts.port = port;
|
|
153
|
+
_a.label = 4;
|
|
154
|
+
case 4:
|
|
155
|
+
// create the mock service
|
|
156
|
+
this.mockService = {
|
|
157
|
+
baseUrl: "".concat(this.opts.ssl ? 'https' : 'http', "://").concat(this.opts.host, ":").concat(this.opts.port),
|
|
158
|
+
pactDetails: {
|
|
159
|
+
pactfile_write_mode: this.opts.pactfileWriteMode || 'merge',
|
|
160
|
+
consumer: {
|
|
161
|
+
name: this.opts.consumer,
|
|
162
|
+
},
|
|
163
|
+
provider: { name: this.opts.provider },
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
return [2 /*return*/, this.opts];
|
|
167
|
+
}
|
|
168
|
+
});
|
|
98
169
|
});
|
|
99
170
|
};
|
|
100
171
|
/**
|
|
@@ -107,20 +178,26 @@ var Pact = /** @class */ (function () {
|
|
|
107
178
|
Pact.prototype.addInteraction = function (interactionObj) {
|
|
108
179
|
if (!this.mockService) {
|
|
109
180
|
logErrorNoMockServer();
|
|
110
|
-
return Promise.reject(new Error("The pact mock service wasn't
|
|
181
|
+
return Promise.reject(new Error("The pact mock service wasn't configured when addInteraction was called"));
|
|
111
182
|
}
|
|
183
|
+
var interaction;
|
|
112
184
|
if (interactionObj instanceof interaction_1.Interaction) {
|
|
113
|
-
|
|
185
|
+
// This will throw if not valid
|
|
186
|
+
var interactionState = interactionObj.json();
|
|
187
|
+
// Convert into the same type
|
|
188
|
+
interaction = (0, interaction_1.interactionToInteractionObject)(interactionState);
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
interaction = interactionObj;
|
|
114
192
|
}
|
|
115
|
-
|
|
116
|
-
if (
|
|
117
|
-
interaction.given(
|
|
193
|
+
this.interaction.uponReceiving(interaction.uponReceiving);
|
|
194
|
+
if (interaction.state) {
|
|
195
|
+
this.interaction.given(interaction.state);
|
|
118
196
|
}
|
|
119
|
-
interaction
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return this.mockService.addInteraction(interaction);
|
|
197
|
+
(0, ffi_1.setRequestDetails)(this.interaction, interaction.withRequest);
|
|
198
|
+
(0, ffi_1.setResponseDetails)(this.interaction, interaction.willRespondWith);
|
|
199
|
+
this.startMockServer();
|
|
200
|
+
return Promise.resolve('');
|
|
124
201
|
};
|
|
125
202
|
/**
|
|
126
203
|
* Checks with the Mock Service if the expected interactions have been exercised.
|
|
@@ -134,21 +211,23 @@ var Pact = /** @class */ (function () {
|
|
|
134
211
|
logErrorNoMockServer();
|
|
135
212
|
return Promise.reject(new Error("The pact mock service wasn't running when verify was called"));
|
|
136
213
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
214
|
+
var matchingResults = this.pact.mockServerMismatches(this.opts.port);
|
|
215
|
+
var success = this.pact.mockServerMatchedSuccessfully(this.opts.port);
|
|
216
|
+
// Feature flag: allow missing requests on the mock service
|
|
217
|
+
if (!success) {
|
|
218
|
+
var error = 'Test failed for the following reasons:';
|
|
219
|
+
error += "\n\n ".concat((0, display_1.generateMockServerError)(matchingResults, '\t'));
|
|
220
|
+
/* eslint-disable no-console */
|
|
143
221
|
console.error('');
|
|
144
|
-
|
|
145
|
-
console.error(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
222
|
+
console.error(clc.red('Pact verification failed!'));
|
|
223
|
+
console.error(clc.red(error));
|
|
224
|
+
/* eslint-enable */
|
|
225
|
+
this.reset();
|
|
226
|
+
throw new verificationError_1.default('Pact verification failed - expected interactions did not match actual.');
|
|
227
|
+
}
|
|
228
|
+
return this.writePact()
|
|
229
|
+
.then(function () { return _this.reset(); })
|
|
230
|
+
.then(function () { return ''; });
|
|
152
231
|
};
|
|
153
232
|
/**
|
|
154
233
|
* Writes the Pact and clears any interactions left behind and shutdown the
|
|
@@ -158,29 +237,12 @@ var Pact = /** @class */ (function () {
|
|
|
158
237
|
* @returns {Promise}
|
|
159
238
|
*/
|
|
160
239
|
Pact.prototype.finalize = function () {
|
|
161
|
-
var _this = this;
|
|
162
240
|
if (this.finalized) {
|
|
163
241
|
logger_1.default.warn('finalize() has already been called, this is probably a logic error in your test setup. ' +
|
|
164
242
|
'In the future this will be an error.');
|
|
165
243
|
}
|
|
166
244
|
this.finalized = true;
|
|
167
|
-
|
|
168
|
-
logErrorNoMockServer();
|
|
169
|
-
return Promise.reject(new Error("The pact mock service wasn't running when finalize was called"));
|
|
170
|
-
}
|
|
171
|
-
return this.mockService
|
|
172
|
-
.writePact()
|
|
173
|
-
.then(function () { return logger_1.default.info('Pact File Written'); }, function (e) { return Promise.reject(e); })
|
|
174
|
-
.then(function () {
|
|
175
|
-
return new Promise(function (resolve, reject) {
|
|
176
|
-
return _this.server.delete().then(function () { return resolve(); }, function (e) { return reject(e); });
|
|
177
|
-
});
|
|
178
|
-
})
|
|
179
|
-
.catch(function (e) {
|
|
180
|
-
return new Promise(function (resolve, reject) {
|
|
181
|
-
return _this.server.delete().finally(function () { return reject(e); });
|
|
182
|
-
});
|
|
183
|
-
});
|
|
245
|
+
return Promise.resolve();
|
|
184
246
|
};
|
|
185
247
|
/**
|
|
186
248
|
* Writes the pact file out to file. Should be called when all tests have been performed for a
|
|
@@ -195,7 +257,8 @@ var Pact = /** @class */ (function () {
|
|
|
195
257
|
logErrorNoMockServer();
|
|
196
258
|
return Promise.reject(new Error("The pact mock service wasn't running when writePact was called"));
|
|
197
259
|
}
|
|
198
|
-
|
|
260
|
+
this.pact.writePactFile(this.opts.dir || './pacts', this.opts.pactfileWriteMode !== 'overwrite');
|
|
261
|
+
return Promise.resolve('');
|
|
199
262
|
};
|
|
200
263
|
/**
|
|
201
264
|
* Clear up any interactions in the Provider Mock Server.
|
|
@@ -204,33 +267,30 @@ var Pact = /** @class */ (function () {
|
|
|
204
267
|
* @returns {Promise}
|
|
205
268
|
*/
|
|
206
269
|
Pact.prototype.removeInteractions = function () {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
return Promise.reject(new Error("The pact mock service wasn't running when removeInteractions was called"));
|
|
210
|
-
}
|
|
211
|
-
return this.mockService.removeInteractions();
|
|
270
|
+
logger_1.default.info('removeInteractions() is no longer required to be called, but has been kept for compatibility with upgrade from 9.x.x. You should remove any use of this method.');
|
|
271
|
+
return Promise.resolve('');
|
|
212
272
|
};
|
|
213
|
-
Pact.prototype.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
273
|
+
Pact.prototype.startMockServer = function () {
|
|
274
|
+
logger_1.default.debug("Setting up Pact mock server with Consumer \"".concat(this.opts.consumer, "\" and Provider \"").concat(this.opts.provider, "\"\n using mock service on Port: \"").concat(this.opts.port, "\""));
|
|
275
|
+
var port = this.pact.createMockServer(this.opts.host, this.opts.port, this.opts.ssl);
|
|
276
|
+
this.mockServerStartedPort = port;
|
|
277
|
+
logger_1.default.debug("mock service started on port: ".concat(port));
|
|
218
278
|
};
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
this.
|
|
279
|
+
// reset the internal state
|
|
280
|
+
// (this.pact cannot be re-used between tests)
|
|
281
|
+
Pact.prototype.reset = function () {
|
|
282
|
+
var _a;
|
|
283
|
+
this.pact = (0, index_1.makeConsumerPact)(this.opts.consumer, this.opts.provider, (0, spec_1.numberToSpec)(this.opts.spec, v3_1.SpecificationVersion.SPECIFICATION_VERSION_V2), (_a = this.opts.logLevel) !== null && _a !== void 0 ? _a : 'info');
|
|
284
|
+
this.interaction = this.pact.newInteraction('');
|
|
285
|
+
if (this.mockServerStartedPort) {
|
|
286
|
+
logger_1.default.debug("cleaning up old mock server on port ".concat(this.opts.port));
|
|
287
|
+
var res = this.pact.cleanupMockServer(this.mockServerStartedPort);
|
|
288
|
+
if (!res) {
|
|
289
|
+
logger_1.default.warn('Unable to cleanup the Pact mock server. ');
|
|
290
|
+
}
|
|
291
|
+
this.mockServerStartedPort = undefined;
|
|
292
|
+
}
|
|
293
|
+
this.pact.addMetadata('pact-js', 'version', package_json_1.version);
|
|
234
294
|
};
|
|
235
295
|
Pact.defaults = {
|
|
236
296
|
consumer: '',
|
|
@@ -239,10 +299,11 @@ var Pact = /** @class */ (function () {
|
|
|
239
299
|
host: '127.0.0.1',
|
|
240
300
|
log: path.resolve(process_1.default.cwd(), 'logs', 'pact.log'),
|
|
241
301
|
logLevel: 'info',
|
|
242
|
-
pactfileWriteMode: '
|
|
302
|
+
pactfileWriteMode: 'merge',
|
|
243
303
|
provider: '',
|
|
244
304
|
spec: 2,
|
|
245
305
|
ssl: false,
|
|
306
|
+
port: 0,
|
|
246
307
|
};
|
|
247
308
|
return Pact;
|
|
248
309
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/httpPact/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/httpPact/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;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