@zimic/interceptor 0.16.1 → 0.17.0-canary.1
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.md +0 -1
- package/dist/{chunk-NTRC2S4I.mjs → chunk-3SKHNQLL.mjs} +3 -5
- package/dist/chunk-3SKHNQLL.mjs.map +1 -0
- package/dist/{chunk-O6ZIPCUJ.js → chunk-TYHJPU5G.js} +3 -5
- package/dist/chunk-TYHJPU5G.js.map +1 -0
- package/dist/cli.js +7 -7
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/http.d.ts +7 -4
- package/dist/http.js +3 -7
- package/dist/http.js.map +1 -1
- package/dist/http.mjs +3 -7
- package/dist/http.mjs.map +1 -1
- package/dist/server.js +6 -6
- package/dist/server.mjs +1 -1
- package/package.json +7 -7
- package/src/http/interceptor/factory.ts +3 -3
- package/src/http/interceptor/types/options.ts +7 -3
- package/src/http/interceptor/types/schema.ts +0 -1
- package/src/http/interceptorWorker/LocalHttpInterceptorWorker.ts +1 -3
- package/dist/chunk-NTRC2S4I.mjs.map +0 -1
- package/dist/chunk-O6ZIPCUJ.js.map +0 -1
package/dist/http.mjs
CHANGED
|
@@ -166,9 +166,7 @@ var isNonEmpty_default = isNonEmpty;
|
|
|
166
166
|
function createCachedDynamicImport(importModuleDynamically) {
|
|
167
167
|
let cachedImportResult;
|
|
168
168
|
return /* @__PURE__ */ __name2(/* @__PURE__ */ __name(async function importModuleDynamicallyWithCache() {
|
|
169
|
-
|
|
170
|
-
cachedImportResult = await importModuleDynamically();
|
|
171
|
-
}
|
|
169
|
+
cachedImportResult ??= await importModuleDynamically();
|
|
172
170
|
return cachedImportResult;
|
|
173
171
|
}, "importModuleDynamicallyWithCache"), "importModuleDynamicallyWithCache");
|
|
174
172
|
}
|
|
@@ -1249,9 +1247,7 @@ var LocalHttpInterceptorWorker = class extends HttpInterceptorWorker_default {
|
|
|
1249
1247
|
return this.internalWorker;
|
|
1250
1248
|
}
|
|
1251
1249
|
get internalWorkerOrCreate() {
|
|
1252
|
-
|
|
1253
|
-
this.internalWorker = this.createInternalWorker();
|
|
1254
|
-
}
|
|
1250
|
+
this.internalWorker ??= this.createInternalWorker();
|
|
1255
1251
|
return this.internalWorker;
|
|
1256
1252
|
}
|
|
1257
1253
|
createInternalWorker() {
|
|
@@ -2576,7 +2572,7 @@ var RemoteHttpInterceptor_default = RemoteHttpInterceptor;
|
|
|
2576
2572
|
|
|
2577
2573
|
// src/http/interceptor/factory.ts
|
|
2578
2574
|
function isLocalHttpInterceptorOptions(options) {
|
|
2579
|
-
return options.type === "local";
|
|
2575
|
+
return options.type === void 0 || options.type === "local";
|
|
2580
2576
|
}
|
|
2581
2577
|
__name(isLocalHttpInterceptorOptions, "isLocalHttpInterceptorOptions");
|
|
2582
2578
|
function isRemoteHttpInterceptorOptions(options) {
|