@fluojs/testing 2.0.0 → 3.0.0
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/README.ko.md +94 -12
- package/README.md +96 -12
- package/dist/babel-decorators-plugin.d.ts +1 -0
- package/dist/babel-decorators-plugin.d.ts.map +1 -1
- package/dist/babel-decorators-plugin.js +1 -0
- package/dist/byte-range-portability-consumer.test-fixture.d.ts +2 -0
- package/dist/byte-range-portability-consumer.test-fixture.d.ts.map +1 -0
- package/dist/byte-range-portability-consumer.test-fixture.js +11 -0
- package/dist/conformance/fetch-style-websocket-conformance.d.ts +1 -0
- package/dist/conformance/fetch-style-websocket-conformance.d.ts.map +1 -1
- package/dist/conformance/fetch-style-websocket-conformance.js +1 -1
- package/dist/conformance/platform-shell-lifecycle-conformance.d.ts +30 -0
- package/dist/conformance/platform-shell-lifecycle-conformance.d.ts.map +1 -0
- package/dist/conformance/platform-shell-lifecycle-conformance.js +259 -0
- package/dist/http.d.ts +2 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +8 -3
- package/dist/mock.js +1 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +45 -73
- package/dist/portability/error-representation-abort-portability.d.ts +36 -0
- package/dist/portability/error-representation-abort-portability.d.ts.map +1 -0
- package/dist/portability/error-representation-abort-portability.js +190 -0
- package/dist/portability/error-representation-portability-fixture.d.ts +58 -0
- package/dist/portability/error-representation-portability-fixture.d.ts.map +1 -0
- package/dist/portability/error-representation-portability-fixture.js +202 -0
- package/dist/portability/error-representation-portability.d.ts +50 -0
- package/dist/portability/error-representation-portability.d.ts.map +1 -0
- package/dist/portability/error-representation-portability.js +153 -0
- package/dist/portability/http-adapter-portability.d.ts +24 -1
- package/dist/portability/http-adapter-portability.d.ts.map +1 -1
- package/dist/portability/http-adapter-portability.js +441 -68
- package/dist/portability/response-cookie-portability.d.ts +16 -0
- package/dist/portability/response-cookie-portability.d.ts.map +1 -0
- package/dist/portability/response-cookie-portability.js +81 -0
- package/dist/portability/web-runtime-adapter-portability.d.ts +23 -1
- package/dist/portability/web-runtime-adapter-portability.d.ts.map +1 -1
- package/dist/portability/web-runtime-adapter-portability.js +356 -31
- package/dist/types.d.ts +5 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +19 -15
|
@@ -3,8 +3,11 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
5
5
|
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; }
|
|
6
|
-
import { Controller, Get, Post, SseResponse } from '@fluojs/http';
|
|
6
|
+
import { Controller, Get, Head, Post, Produces, Query, Route, SseResponse } from '@fluojs/http';
|
|
7
7
|
import { defineModule } from '@fluojs/runtime';
|
|
8
|
+
import { assertWebHttpErrorRepresentationAbortPortability } from './error-representation-abort-portability.js';
|
|
9
|
+
import { assertWebHttpErrorRepresentationPortability } from './error-representation-portability.js';
|
|
10
|
+
import { assertPortableResponseCookies, createResponseCookiePortabilityModule } from './response-cookie-portability.js';
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* Describes the web runtime http adapter portability harness options contract.
|
|
@@ -42,24 +45,279 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
42
45
|
constructor(options) {
|
|
43
46
|
this.options = options;
|
|
44
47
|
}
|
|
45
|
-
|
|
48
|
+
|
|
49
|
+
/** Verifies JSON, HTML, HEAD, 406, and committed error-response portability. */
|
|
50
|
+
async assertSupportsHttpErrorRepresentations() {
|
|
51
|
+
const createBootstrapOptions = this.options.createErrorRepresentationBootstrapOptions;
|
|
52
|
+
if (createBootstrapOptions === undefined) {
|
|
53
|
+
throw new Error(`${this.options.name} adapter portability harness requires createErrorRepresentationBootstrapOptions.`);
|
|
54
|
+
}
|
|
55
|
+
await assertWebHttpErrorRepresentationPortability({
|
|
56
|
+
bootstrap: this.options.bootstrap,
|
|
57
|
+
createBootstrapOptions,
|
|
58
|
+
name: this.options.name
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Verifies request abort propagation without an HTML or JSON fallback commit. */
|
|
63
|
+
async assertDoesNotCommitAbortedHttpErrorRepresentations() {
|
|
64
|
+
const createBootstrapOptions = this.options.createErrorRepresentationBootstrapOptions;
|
|
65
|
+
if (createBootstrapOptions === undefined) {
|
|
66
|
+
throw new Error(`${this.options.name} adapter portability harness requires createErrorRepresentationBootstrapOptions.`);
|
|
67
|
+
}
|
|
68
|
+
await assertWebHttpErrorRepresentationAbortPortability({
|
|
69
|
+
bootstrap: this.options.bootstrap,
|
|
70
|
+
createBootstrapOptions,
|
|
71
|
+
name: this.options.name
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Verifies ordered, non-folded portable response cookies through Web Response headers. */
|
|
76
|
+
async assertSupportsPortableResponseCookies() {
|
|
77
|
+
const app = await this.options.bootstrap(createResponseCookiePortabilityModule(), {
|
|
78
|
+
cors: false
|
|
79
|
+
});
|
|
80
|
+
await runWithCleanup(app, this.options.name, async () => {
|
|
81
|
+
assertPortableResponseCookies(await app.dispatch(new Request('https://runtime.test/response-cookies')), this.options.name);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Verifies 304/412 metadata and body suppression through fetch-style adapters. */
|
|
86
|
+
async assertSupportsConditionalRequests() {
|
|
46
87
|
let _initProto, _initClass;
|
|
88
|
+
const createBootstrapOptions = this.options.createConditionalRequestBootstrapOptions;
|
|
89
|
+
if (createBootstrapOptions === undefined) {
|
|
90
|
+
throw new Error(`${this.options.name} adapter portability harness requires createConditionalRequestBootstrapOptions.`);
|
|
91
|
+
}
|
|
92
|
+
let _ValidatorsController;
|
|
93
|
+
class ValidatorsController {
|
|
94
|
+
static {
|
|
95
|
+
({
|
|
96
|
+
e: [_initProto],
|
|
97
|
+
c: [_ValidatorsController, _initClass]
|
|
98
|
+
} = _applyDecs(this, [Controller('/validators')], [[[Produces('application/json'), Get('/resource')], 2, "getResource"], [[Produces('application/json'), Head('/resource')], 2, "headResource"], [Post('/resource'), 2, "updateResource"]]));
|
|
99
|
+
}
|
|
100
|
+
constructor() {
|
|
101
|
+
_initProto(this);
|
|
102
|
+
}
|
|
103
|
+
getResource() {
|
|
104
|
+
return {
|
|
105
|
+
id: 'resource'
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
headResource() {
|
|
109
|
+
return {
|
|
110
|
+
id: 'resource'
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
updateResource() {
|
|
114
|
+
return {
|
|
115
|
+
id: 'resource'
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
static {
|
|
119
|
+
_initClass();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
class AppModule {}
|
|
123
|
+
defineModule(AppModule, {
|
|
124
|
+
controllers: [_ValidatorsController]
|
|
125
|
+
});
|
|
126
|
+
const app = await this.options.bootstrap(AppModule, createBootstrapOptions({
|
|
127
|
+
conditionalRequest: {
|
|
128
|
+
resolve() {
|
|
129
|
+
return {
|
|
130
|
+
exists: true,
|
|
131
|
+
validators: {
|
|
132
|
+
etag: {
|
|
133
|
+
opaqueValue: 'resource-v1',
|
|
134
|
+
strength: 'strong'
|
|
135
|
+
},
|
|
136
|
+
lastModified: new Date('2026-01-01T00:00:00.750Z')
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
contentNegotiation: {
|
|
142
|
+
formatters: [{
|
|
143
|
+
format(body) {
|
|
144
|
+
return JSON.stringify(body);
|
|
145
|
+
},
|
|
146
|
+
mediaType: 'application/json'
|
|
147
|
+
}]
|
|
148
|
+
},
|
|
149
|
+
cors: false
|
|
150
|
+
}));
|
|
151
|
+
await runWithCleanup(app, this.options.name, async () => {
|
|
152
|
+
const [notModified, preconditionFailed, head] = await Promise.all([app.dispatch(new Request('https://runtime.test/validators/resource', {
|
|
153
|
+
headers: {
|
|
154
|
+
'if-none-match': '"resource-v1"'
|
|
155
|
+
}
|
|
156
|
+
})), app.dispatch(new Request('https://runtime.test/validators/resource', {
|
|
157
|
+
headers: {
|
|
158
|
+
'if-match': '"different-resource"'
|
|
159
|
+
},
|
|
160
|
+
method: 'POST'
|
|
161
|
+
})), app.dispatch(new Request('https://runtime.test/validators/resource', {
|
|
162
|
+
headers: {
|
|
163
|
+
'if-none-match': '"resource-v1"'
|
|
164
|
+
},
|
|
165
|
+
method: 'HEAD'
|
|
166
|
+
}))]);
|
|
167
|
+
if (notModified.status !== 304 || preconditionFailed.status !== 412 || (await notModified.text()) !== '' || (await preconditionFailed.text()) !== '' || (await head.text()) !== '' || notModified.headers.get('etag') !== '"resource-v1"' || notModified.headers.get('last-modified') !== 'Thu, 01 Jan 2026 00:00:00 GMT' || notModified.headers.get('vary') !== 'Accept' || preconditionFailed.headers.get('etag') !== '"resource-v1"' || preconditionFailed.headers.get('last-modified') !== 'Thu, 01 Jan 2026 00:00:00 GMT' || head.status !== 304 || head.headers.get('etag') !== '"resource-v1"' || head.headers.get('last-modified') !== 'Thu, 01 Jan 2026 00:00:00 GMT' || head.headers.get('vary') !== 'Accept') {
|
|
168
|
+
throw new Error(`${this.options.name} adapter changed conditional request response semantics.`);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** Verifies single-byte-range metadata and payload slicing through fetch dispatch. */
|
|
174
|
+
async assertSupportsSingleByteRanges() {
|
|
175
|
+
let _initProto2, _initClass2;
|
|
176
|
+
const createBootstrapOptions = this.options.createConditionalRequestBootstrapOptions;
|
|
177
|
+
if (createBootstrapOptions === undefined) {
|
|
178
|
+
throw new Error(`${this.options.name} adapter portability harness requires createConditionalRequestBootstrapOptions.`);
|
|
179
|
+
}
|
|
180
|
+
let _AssetController;
|
|
181
|
+
class AssetController {
|
|
182
|
+
static {
|
|
183
|
+
({
|
|
184
|
+
e: [_initProto2],
|
|
185
|
+
c: [_AssetController, _initClass2]
|
|
186
|
+
} = _applyDecs(this, [Controller('/assets')], [[[Produces('application/octet-stream'), Get('/logo')], 2, "getLogo"], [[Produces('application/octet-stream'), Head('/logo')], 2, "headLogo"], [[Produces('application/octet-stream'), Post('/logo')], 2, "postLogo"]]));
|
|
187
|
+
}
|
|
188
|
+
constructor() {
|
|
189
|
+
_initProto2(this);
|
|
190
|
+
}
|
|
191
|
+
getLogo() {
|
|
192
|
+
return Uint8Array.from([0, 1, 2, 3, 4, 5]);
|
|
193
|
+
}
|
|
194
|
+
headLogo() {
|
|
195
|
+
return Uint8Array.from([0, 1, 2, 3, 4, 5]);
|
|
196
|
+
}
|
|
197
|
+
postLogo() {
|
|
198
|
+
return Uint8Array.from([0, 1, 2, 3, 4, 5]);
|
|
199
|
+
}
|
|
200
|
+
static {
|
|
201
|
+
_initClass2();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
class AppModule {}
|
|
205
|
+
defineModule(AppModule, {
|
|
206
|
+
controllers: [_AssetController]
|
|
207
|
+
});
|
|
208
|
+
const app = await this.options.bootstrap(AppModule, createBootstrapOptions({
|
|
209
|
+
conditionalRequest: {
|
|
210
|
+
resolve() {
|
|
211
|
+
return {
|
|
212
|
+
exists: true,
|
|
213
|
+
validators: {
|
|
214
|
+
etag: {
|
|
215
|
+
opaqueValue: 'asset-v1',
|
|
216
|
+
strength: 'strong'
|
|
217
|
+
},
|
|
218
|
+
lastModified: new Date('2026-01-01T00:00:00.750Z')
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
contentNegotiation: {
|
|
224
|
+
formatters: [{
|
|
225
|
+
format(body) {
|
|
226
|
+
return JSON.stringify(body);
|
|
227
|
+
},
|
|
228
|
+
mediaType: 'application/json'
|
|
229
|
+
}, {
|
|
230
|
+
format(body) {
|
|
231
|
+
if (!(body instanceof Uint8Array)) {
|
|
232
|
+
throw new Error('Expected byte-range formatter to receive a Uint8Array.');
|
|
233
|
+
}
|
|
234
|
+
return body;
|
|
235
|
+
},
|
|
236
|
+
mediaType: 'application/octet-stream'
|
|
237
|
+
}]
|
|
238
|
+
},
|
|
239
|
+
cors: false
|
|
240
|
+
}));
|
|
241
|
+
await runWithCleanup(app, this.options.name, async () => {
|
|
242
|
+
const [bounded, suffix, openEnded, malformed, multiple, unsatisfiable, head, post, matchingEtag, nonmatchingEtag, matchingDate, nonmatchingDate] = await Promise.all([app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
243
|
+
headers: {
|
|
244
|
+
range: 'bytes=2-4'
|
|
245
|
+
}
|
|
246
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
247
|
+
headers: {
|
|
248
|
+
range: 'bytes=-2'
|
|
249
|
+
}
|
|
250
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
251
|
+
headers: {
|
|
252
|
+
range: 'bytes=3-'
|
|
253
|
+
}
|
|
254
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
255
|
+
headers: {
|
|
256
|
+
range: 'items=2-4'
|
|
257
|
+
}
|
|
258
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
259
|
+
headers: {
|
|
260
|
+
range: 'bytes=0-1,3-4'
|
|
261
|
+
}
|
|
262
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
263
|
+
headers: {
|
|
264
|
+
range: 'bytes=9-'
|
|
265
|
+
}
|
|
266
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
267
|
+
headers: {
|
|
268
|
+
range: 'bytes=2-4'
|
|
269
|
+
},
|
|
270
|
+
method: 'HEAD'
|
|
271
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
272
|
+
headers: {
|
|
273
|
+
range: 'bytes=2-4'
|
|
274
|
+
},
|
|
275
|
+
method: 'POST'
|
|
276
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
277
|
+
headers: {
|
|
278
|
+
'if-range': '"asset-v1"',
|
|
279
|
+
range: 'bytes=2-4'
|
|
280
|
+
}
|
|
281
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
282
|
+
headers: {
|
|
283
|
+
'if-range': '"different-asset"',
|
|
284
|
+
range: 'bytes=2-4'
|
|
285
|
+
}
|
|
286
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
287
|
+
headers: {
|
|
288
|
+
'if-range': 'Thu, 01 Jan 2026 00:00:00 GMT',
|
|
289
|
+
range: 'bytes=2-4'
|
|
290
|
+
}
|
|
291
|
+
})), app.dispatch(new Request('https://runtime.test/assets/logo', {
|
|
292
|
+
headers: {
|
|
293
|
+
'if-range': 'Wed, 31 Dec 2025 23:59:59 GMT',
|
|
294
|
+
range: 'bytes=2-4'
|
|
295
|
+
}
|
|
296
|
+
}))]);
|
|
297
|
+
const [boundedBytes, suffixBytes, openEndedBytes, malformedBytes, multipleBytes, unsatisfiableBody, headBody, postBytes, matchingEtagBytes, nonmatchingEtagBytes, matchingDateBytes, nonmatchingDateBytes] = await Promise.all([bounded.bytes(), suffix.bytes(), openEnded.bytes(), malformed.bytes(), multiple.bytes(), unsatisfiable.text(), head.text(), post.bytes(), matchingEtag.bytes(), nonmatchingEtag.bytes(), matchingDate.bytes(), nonmatchingDate.bytes()]);
|
|
298
|
+
if (bounded.status !== 206 || suffix.status !== 206 || openEnded.status !== 206 || malformed.status !== 200 || multiple.status !== 200 || unsatisfiable.status !== 416 || head.status !== 206 || post.status !== 201 || matchingEtag.status !== 206 || nonmatchingEtag.status !== 200 || matchingDate.status !== 206 || nonmatchingDate.status !== 200 || bounded.headers.get('accept-ranges') !== 'bytes' || bounded.headers.get('content-range') !== 'bytes 2-4/6' || bounded.headers.get('content-length') !== '3' || suffix.headers.get('content-range') !== 'bytes 4-5/6' || openEnded.headers.get('content-range') !== 'bytes 3-5/6' || openEnded.headers.get('content-length') !== '3' || unsatisfiable.headers.get('accept-ranges') !== 'bytes' || unsatisfiable.headers.get('content-range') !== 'bytes */6' || unsatisfiable.headers.get('content-length') !== '0' || unsatisfiableBody !== '' || head.headers.get('content-range') !== bounded.headers.get('content-range') || head.headers.get('content-length') !== bounded.headers.get('content-length') || headBody !== '' || matchingEtag.headers.get('content-range') !== 'bytes 2-4/6' || matchingEtag.headers.get('etag') !== '"asset-v1"' || matchingDate.headers.get('content-range') !== 'bytes 2-4/6' || matchingDate.headers.get('last-modified') !== 'Thu, 01 Jan 2026 00:00:00 GMT' || !sameBytes(boundedBytes, Uint8Array.from([2, 3, 4])) || !sameBytes(suffixBytes, Uint8Array.from([4, 5])) || !sameBytes(openEndedBytes, Uint8Array.from([3, 4, 5])) || !sameBytes(malformedBytes, Uint8Array.from([0, 1, 2, 3, 4, 5])) || !sameBytes(multipleBytes, Uint8Array.from([0, 1, 2, 3, 4, 5])) || !sameBytes(postBytes, Uint8Array.from([0, 1, 2, 3, 4, 5])) || !sameBytes(matchingEtagBytes, Uint8Array.from([2, 3, 4])) || !sameBytes(nonmatchingEtagBytes, Uint8Array.from([0, 1, 2, 3, 4, 5])) || !sameBytes(matchingDateBytes, Uint8Array.from([2, 3, 4])) || !sameBytes(nonmatchingDateBytes, Uint8Array.from([0, 1, 2, 3, 4, 5]))) {
|
|
299
|
+
throw new Error(`${this.options.name} adapter changed single byte-range or If-Range response semantics.`);
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
async assertPreservesQueryArraysAndDecoding() {
|
|
304
|
+
let _initProto3, _initClass3;
|
|
47
305
|
let _QueryController;
|
|
48
306
|
class QueryController {
|
|
49
307
|
static {
|
|
50
308
|
({
|
|
51
|
-
e: [
|
|
52
|
-
c: [_QueryController,
|
|
309
|
+
e: [_initProto3],
|
|
310
|
+
c: [_QueryController, _initClass3]
|
|
53
311
|
} = _applyDecs(this, [Controller('/query')], [[Get('/'), 2, "readQuery"]]));
|
|
54
312
|
}
|
|
55
313
|
constructor() {
|
|
56
|
-
|
|
314
|
+
_initProto3(this);
|
|
57
315
|
}
|
|
58
316
|
readQuery(_input, context) {
|
|
59
317
|
return context.request.query;
|
|
60
318
|
}
|
|
61
319
|
static {
|
|
62
|
-
|
|
320
|
+
_initClass3();
|
|
63
321
|
}
|
|
64
322
|
}
|
|
65
323
|
class AppModule {}
|
|
@@ -80,24 +338,88 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
80
338
|
}
|
|
81
339
|
});
|
|
82
340
|
}
|
|
341
|
+
|
|
342
|
+
/** Verifies `QUERY` and extension-method execution through the runtime's fetch dispatch seam. */
|
|
343
|
+
async assertSupportsCustomHttpRouteMethods() {
|
|
344
|
+
let _initProto4, _initClass4;
|
|
345
|
+
let _CustomMethodControll;
|
|
346
|
+
class CustomMethodController {
|
|
347
|
+
static {
|
|
348
|
+
({
|
|
349
|
+
e: [_initProto4],
|
|
350
|
+
c: [_CustomMethodControll, _initClass4]
|
|
351
|
+
} = _applyDecs(this, [Controller('/custom-methods')], [[Query('/query'), 2, "query"], [Route('PURGE', '/purge'), 2, "purge"]]));
|
|
352
|
+
}
|
|
353
|
+
constructor() {
|
|
354
|
+
_initProto4(this);
|
|
355
|
+
}
|
|
356
|
+
query(_input, context) {
|
|
357
|
+
return {
|
|
358
|
+
body: context.request.body,
|
|
359
|
+
method: context.request.method
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
purge(_input, context) {
|
|
363
|
+
return {
|
|
364
|
+
body: context.request.body,
|
|
365
|
+
method: context.request.method
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
static {
|
|
369
|
+
_initClass4();
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
class AppModule {}
|
|
373
|
+
defineModule(AppModule, {
|
|
374
|
+
controllers: [_CustomMethodControll]
|
|
375
|
+
});
|
|
376
|
+
const app = await this.options.bootstrap(AppModule, {
|
|
377
|
+
cors: false
|
|
378
|
+
});
|
|
379
|
+
await runWithCleanup(app, this.options.name, async () => {
|
|
380
|
+
for (const method of ['QUERY', 'PURGE']) {
|
|
381
|
+
const response = await app.dispatch(new Request(`https://runtime.test/custom-methods/${method.toLowerCase()}`, {
|
|
382
|
+
body: JSON.stringify({
|
|
383
|
+
value: method.toLowerCase()
|
|
384
|
+
}),
|
|
385
|
+
headers: {
|
|
386
|
+
'content-type': 'application/json'
|
|
387
|
+
},
|
|
388
|
+
method
|
|
389
|
+
}));
|
|
390
|
+
if (response.status !== 200) {
|
|
391
|
+
throw new Error(`${this.options.name} adapter changed ${method} response status semantics: received ${String(response.status)}.`);
|
|
392
|
+
}
|
|
393
|
+
const body = await response.json();
|
|
394
|
+
if (JSON.stringify(body) !== JSON.stringify({
|
|
395
|
+
body: {
|
|
396
|
+
value: method.toLowerCase()
|
|
397
|
+
},
|
|
398
|
+
method
|
|
399
|
+
})) {
|
|
400
|
+
throw new Error(`${this.options.name} adapter changed ${method} method or body semantics.`);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
}
|
|
83
405
|
async assertPreservesMalformedCookieValues() {
|
|
84
|
-
let
|
|
406
|
+
let _initProto5, _initClass5;
|
|
85
407
|
let _CookieController;
|
|
86
408
|
class CookieController {
|
|
87
409
|
static {
|
|
88
410
|
({
|
|
89
|
-
e: [
|
|
90
|
-
c: [_CookieController,
|
|
411
|
+
e: [_initProto5],
|
|
412
|
+
c: [_CookieController, _initClass5]
|
|
91
413
|
} = _applyDecs(this, [Controller('/cookies')], [[Get('/'), 2, "readCookies"]]));
|
|
92
414
|
}
|
|
93
415
|
constructor() {
|
|
94
|
-
|
|
416
|
+
_initProto5(this);
|
|
95
417
|
}
|
|
96
418
|
readCookies(_input, context) {
|
|
97
419
|
return context.request.cookies;
|
|
98
420
|
}
|
|
99
421
|
static {
|
|
100
|
-
|
|
422
|
+
_initClass5();
|
|
101
423
|
}
|
|
102
424
|
}
|
|
103
425
|
class AppModule {}
|
|
@@ -123,17 +445,17 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
123
445
|
});
|
|
124
446
|
}
|
|
125
447
|
async assertPreservesRawBodyForJsonAndText() {
|
|
126
|
-
let
|
|
448
|
+
let _initProto6, _initClass6;
|
|
127
449
|
let _WebhookController;
|
|
128
450
|
class WebhookController {
|
|
129
451
|
static {
|
|
130
452
|
({
|
|
131
|
-
e: [
|
|
132
|
-
c: [_WebhookController,
|
|
453
|
+
e: [_initProto6],
|
|
454
|
+
c: [_WebhookController, _initClass6]
|
|
133
455
|
} = _applyDecs(this, [Controller('/webhooks')], [[Post('/json'), 2, "handleJson"], [Post('/text'), 2, "handleText"]]));
|
|
134
456
|
}
|
|
135
457
|
constructor() {
|
|
136
|
-
|
|
458
|
+
_initProto6(this);
|
|
137
459
|
}
|
|
138
460
|
handleJson(_input, context) {
|
|
139
461
|
return {
|
|
@@ -148,7 +470,7 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
148
470
|
};
|
|
149
471
|
}
|
|
150
472
|
static {
|
|
151
|
-
|
|
473
|
+
_initClass6();
|
|
152
474
|
}
|
|
153
475
|
}
|
|
154
476
|
class AppModule {}
|
|
@@ -200,17 +522,17 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
200
522
|
* Asserts that byte-sensitive request bodies preserve their exact raw bytes.
|
|
201
523
|
*/
|
|
202
524
|
async assertPreservesExactRawBodyBytesForByteSensitivePayloads() {
|
|
203
|
-
let
|
|
525
|
+
let _initProto7, _initClass7;
|
|
204
526
|
let _WebhookController2;
|
|
205
527
|
class WebhookController {
|
|
206
528
|
static {
|
|
207
529
|
({
|
|
208
|
-
e: [
|
|
209
|
-
c: [_WebhookController2,
|
|
530
|
+
e: [_initProto7],
|
|
531
|
+
c: [_WebhookController2, _initClass7]
|
|
210
532
|
} = _applyDecs(this, [Controller('/webhooks')], [[Post('/bytes'), 2, "handleBytes"]]));
|
|
211
533
|
}
|
|
212
534
|
constructor() {
|
|
213
|
-
|
|
535
|
+
_initProto7(this);
|
|
214
536
|
}
|
|
215
537
|
handleBytes(_input, context) {
|
|
216
538
|
return {
|
|
@@ -218,7 +540,7 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
218
540
|
};
|
|
219
541
|
}
|
|
220
542
|
static {
|
|
221
|
-
|
|
543
|
+
_initClass7();
|
|
222
544
|
}
|
|
223
545
|
}
|
|
224
546
|
class AppModule {}
|
|
@@ -250,17 +572,17 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
250
572
|
});
|
|
251
573
|
}
|
|
252
574
|
async assertExcludesRawBodyForMultipart() {
|
|
253
|
-
let
|
|
575
|
+
let _initProto8, _initClass8;
|
|
254
576
|
let _UploadController;
|
|
255
577
|
class UploadController {
|
|
256
578
|
static {
|
|
257
579
|
({
|
|
258
|
-
e: [
|
|
259
|
-
c: [_UploadController,
|
|
580
|
+
e: [_initProto8],
|
|
581
|
+
c: [_UploadController, _initClass8]
|
|
260
582
|
} = _applyDecs(this, [Controller('/uploads')], [[Post('/'), 2, "upload"]]));
|
|
261
583
|
}
|
|
262
584
|
constructor() {
|
|
263
|
-
|
|
585
|
+
_initProto8(this);
|
|
264
586
|
}
|
|
265
587
|
upload(_input, context) {
|
|
266
588
|
return {
|
|
@@ -270,7 +592,7 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
270
592
|
};
|
|
271
593
|
}
|
|
272
594
|
static {
|
|
273
|
-
|
|
595
|
+
_initClass8();
|
|
274
596
|
}
|
|
275
597
|
}
|
|
276
598
|
class AppModule {}
|
|
@@ -307,17 +629,17 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
307
629
|
});
|
|
308
630
|
}
|
|
309
631
|
async assertSupportsSseStreaming() {
|
|
310
|
-
let
|
|
632
|
+
let _initProto9, _initClass9;
|
|
311
633
|
let _EventsController;
|
|
312
634
|
class EventsController {
|
|
313
635
|
static {
|
|
314
636
|
({
|
|
315
|
-
e: [
|
|
316
|
-
c: [_EventsController,
|
|
637
|
+
e: [_initProto9],
|
|
638
|
+
c: [_EventsController, _initClass9]
|
|
317
639
|
} = _applyDecs(this, [Controller('/events')], [[Get('/'), 2, "stream"]]));
|
|
318
640
|
}
|
|
319
641
|
constructor() {
|
|
320
|
-
|
|
642
|
+
_initProto9(this);
|
|
321
643
|
}
|
|
322
644
|
stream(_input, context) {
|
|
323
645
|
const stream = new SseResponse(context);
|
|
@@ -332,7 +654,7 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
332
654
|
return stream;
|
|
333
655
|
}
|
|
334
656
|
static {
|
|
335
|
-
|
|
657
|
+
_initClass9();
|
|
336
658
|
}
|
|
337
659
|
}
|
|
338
660
|
class AppModule {}
|
|
@@ -371,4 +693,7 @@ export class WebRuntimeHttpAdapterPortabilityHarness {
|
|
|
371
693
|
*/
|
|
372
694
|
export function createWebRuntimeHttpAdapterPortabilityHarness(options) {
|
|
373
695
|
return new WebRuntimeHttpAdapterPortabilityHarness(options);
|
|
696
|
+
}
|
|
697
|
+
function sameBytes(left, right) {
|
|
698
|
+
return left.byteLength === right.byteLength && left.every((value, index) => value === right[index]);
|
|
374
699
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export interface TestingApplicationOptions extends BootstrapApplicationOptions {
|
|
|
19
19
|
* Optional request extras accepted by `TestApp.request(...)` overloads.
|
|
20
20
|
*/
|
|
21
21
|
export interface TestRequestOptions {
|
|
22
|
+
cookies?: TestRequest['cookies'];
|
|
22
23
|
principal?: TestPrincipal;
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
@@ -124,10 +125,13 @@ export interface TestingMockFunction<Args extends unknown[] = unknown[], Return
|
|
|
124
125
|
mockRestore(): void;
|
|
125
126
|
mockImplementation(fn: (...args: Args) => Return): this;
|
|
126
127
|
mockImplementationOnce(fn: (...args: Args) => Return): this;
|
|
127
|
-
withImplementation
|
|
128
|
+
withImplementation(fn: (...args: Args) => Return, callback: () => Promise<unknown>): Promise<this>;
|
|
129
|
+
withImplementation(fn: (...args: Args) => Return, callback: () => unknown): this;
|
|
128
130
|
mockReturnThis(): this;
|
|
129
131
|
mockReturnValue(value: Return): this;
|
|
130
132
|
mockReturnValueOnce(value: Return): this;
|
|
133
|
+
mockThrow(value: unknown): this;
|
|
134
|
+
mockThrowOnce(value: unknown): this;
|
|
131
135
|
mockResolvedValue(value: Awaited<Return>): this;
|
|
132
136
|
mockResolvedValueOnce(value: Awaited<Return>): this;
|
|
133
137
|
mockRejectedValue(error: unknown): this;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC9F,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAElH;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;IA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CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAChD,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACpD,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACxC,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;KACzB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,GAAG,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrG,CAAC"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"override",
|
|
10
10
|
"module-builder"
|
|
11
11
|
],
|
|
12
|
-
"version": "
|
|
12
|
+
"version": "3.0.0",
|
|
13
13
|
"private": false,
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"directory": "packages/testing"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">=24.0.0 <27"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
"types": "./dist/conformance/platform-conformance.d.ts",
|
|
50
50
|
"import": "./dist/conformance/platform-conformance.js"
|
|
51
51
|
},
|
|
52
|
+
"./platform-shell-lifecycle-conformance": {
|
|
53
|
+
"types": "./dist/conformance/platform-shell-lifecycle-conformance.d.ts",
|
|
54
|
+
"import": "./dist/conformance/platform-shell-lifecycle-conformance.js"
|
|
55
|
+
},
|
|
52
56
|
"./http-adapter-portability": {
|
|
53
57
|
"types": "./dist/portability/http-adapter-portability.d.ts",
|
|
54
58
|
"import": "./dist/portability/http-adapter-portability.js"
|
|
@@ -80,24 +84,24 @@
|
|
|
80
84
|
"dist"
|
|
81
85
|
],
|
|
82
86
|
"dependencies": {
|
|
83
|
-
"@fluojs/
|
|
84
|
-
"@fluojs/
|
|
85
|
-
"@fluojs/
|
|
86
|
-
"@fluojs/
|
|
87
|
-
"@fluojs/
|
|
87
|
+
"@fluojs/di": "^3.0.0",
|
|
88
|
+
"@fluojs/runtime": "^3.0.0",
|
|
89
|
+
"@fluojs/config": "^2.0.0",
|
|
90
|
+
"@fluojs/core": "^2.0.0",
|
|
91
|
+
"@fluojs/http": "^3.0.0"
|
|
88
92
|
},
|
|
89
93
|
"peerDependencies": {
|
|
90
94
|
"@babel/core": ">=7.0.0",
|
|
91
|
-
"vitest": "^
|
|
95
|
+
"vitest": "^4.1.11"
|
|
92
96
|
},
|
|
93
97
|
"devDependencies": {
|
|
94
|
-
"vitest": "^
|
|
95
|
-
"@fluojs/platform-
|
|
96
|
-
"@fluojs/platform-
|
|
97
|
-
"@fluojs/platform-
|
|
98
|
-
"@fluojs/platform-
|
|
99
|
-
"@fluojs/platform-
|
|
100
|
-
"@fluojs/platform-
|
|
98
|
+
"vitest": "^4.1.11",
|
|
99
|
+
"@fluojs/platform-cloudflare-workers": "^2.0.0",
|
|
100
|
+
"@fluojs/platform-deno": "^2.0.0",
|
|
101
|
+
"@fluojs/platform-nodejs": "^2.0.0",
|
|
102
|
+
"@fluojs/platform-express": "^2.0.0",
|
|
103
|
+
"@fluojs/platform-fastify": "^2.0.0",
|
|
104
|
+
"@fluojs/platform-bun": "^3.0.0"
|
|
101
105
|
},
|
|
102
106
|
"scripts": {
|
|
103
107
|
"prebuild": "node ../../tooling/scripts/clean-dist.mjs",
|