@apicircle/core 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-L5DQT7V6.js → chunk-PUXJFN2Z.js} +3 -3
- package/dist/{chunk-L5DQT7V6.js.map → chunk-PUXJFN2Z.js.map} +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/workspace/file-backed.cjs +2 -2
- package/dist/workspace/file-backed.cjs.map +1 -1
- package/dist/workspace/file-backed.js +1 -1
- package/dist/workspace/registry.cjs +2 -2
- package/dist/workspace/registry.cjs.map +1 -1
- package/dist/workspace/registry.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4476,10 +4476,10 @@ function collectAttachmentSlots(synced) {
|
|
|
4476
4476
|
for (const server of Object.values(synced.mockServers ?? {})) {
|
|
4477
4477
|
for (const endpoint of server.endpoints) {
|
|
4478
4478
|
collectMockResponseAttachment(endpoint.defaultResponse, seen);
|
|
4479
|
-
for (const rule of endpoint.requestValidation) {
|
|
4479
|
+
for (const rule of endpoint.requestValidation ?? []) {
|
|
4480
4480
|
collectMockResponseAttachment(rule.failResponse, seen);
|
|
4481
4481
|
}
|
|
4482
|
-
for (const rule of endpoint.responseRules) {
|
|
4482
|
+
for (const rule of endpoint.responseRules ?? []) {
|
|
4483
4483
|
collectMockResponseAttachment(rule.response, seen);
|
|
4484
4484
|
}
|
|
4485
4485
|
}
|
|
@@ -4498,10 +4498,10 @@ function collectAttachmentSlots(synced) {
|
|
|
4498
4498
|
return [...seen.values()];
|
|
4499
4499
|
}
|
|
4500
4500
|
function collectMockResponseAttachment(response, seen) {
|
|
4501
|
-
collectMockResponseBodyAttachment(response
|
|
4501
|
+
collectMockResponseBodyAttachment(response?.body, seen);
|
|
4502
4502
|
}
|
|
4503
4503
|
function collectMockResponseBodyAttachment(body, seen) {
|
|
4504
|
-
if (body
|
|
4504
|
+
if (body?.type !== "binary") return;
|
|
4505
4505
|
const ref = body.attachment;
|
|
4506
4506
|
if (!ref?.slotId || seen.has(ref.slotId)) return;
|
|
4507
4507
|
seen.set(ref.slotId, {
|