@cloudflare/vitest-plugin 1.1.0 → 1.1.2
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/pool/index.mjs
CHANGED
|
@@ -28,8 +28,8 @@ import P from "node:readline";
|
|
|
28
28
|
import * as z$1 from "zod";
|
|
29
29
|
import { z } from "zod";
|
|
30
30
|
|
|
31
|
-
//#region ../workers-utils/dist/chunk-
|
|
32
|
-
var DEFAULT_COMPAT_DATE = "2026-08-
|
|
31
|
+
//#region ../workers-utils/dist/chunk-2DE5GBFL.mjs
|
|
32
|
+
var DEFAULT_COMPAT_DATE = "2026-08-28";
|
|
33
33
|
function assertNever(_value) {}
|
|
34
34
|
__name$3(assertNever, "assertNever");
|
|
35
35
|
function mapWorkerMetadataBindings(bindings$1) {
|
|
@@ -41803,12 +41803,24 @@ var validateWorkflowBinding = /* @__PURE__ */ __name$3((diagnostics, field, valu
|
|
|
41803
41803
|
for (const key of ["success_retention", "error_retention"]) if (defaultRetention[key] !== void 0 && !validateWorkflowRetentionValue(diagnostics, field, key, defaultRetention[key])) isValid = false;
|
|
41804
41804
|
validateAdditionalProperties(diagnostics, `${field}.default_retention`, Object.keys(defaultRetention), ["success_retention", "error_retention"]);
|
|
41805
41805
|
}
|
|
41806
|
+
if (hasProperty(value, "concurrency") && value.concurrency !== void 0) if (typeof value.concurrency !== "object" || value.concurrency === null || Array.isArray(value.concurrency)) {
|
|
41807
|
+
diagnostics.errors.push(`"${field}" bindings should, optionally, have an object "concurrency" field but got ${JSON.stringify(value)}.`);
|
|
41808
|
+
isValid = false;
|
|
41809
|
+
} else {
|
|
41810
|
+
const concurrency = value.concurrency;
|
|
41811
|
+
if (concurrency.limit !== void 0 && (typeof concurrency.limit !== "number" || !Number.isInteger(concurrency.limit) || concurrency.limit < 1)) {
|
|
41812
|
+
diagnostics.errors.push(`"${field}" bindings "concurrency.limit" field must be a positive integer but got ${JSON.stringify(concurrency.limit)}.`);
|
|
41813
|
+
isValid = false;
|
|
41814
|
+
}
|
|
41815
|
+
validateAdditionalProperties(diagnostics, `${field}.concurrency`, Object.keys(concurrency), ["limit"]);
|
|
41816
|
+
}
|
|
41806
41817
|
validateAdditionalProperties(diagnostics, field, Object.keys(value), [
|
|
41807
41818
|
"binding",
|
|
41808
41819
|
"name",
|
|
41809
41820
|
"class_name",
|
|
41810
41821
|
"script_name",
|
|
41811
41822
|
"limits",
|
|
41823
|
+
"concurrency",
|
|
41812
41824
|
"schedules",
|
|
41813
41825
|
"default_retention"
|
|
41814
41826
|
]);
|
|
@@ -59710,7 +59722,7 @@ __name$1(createWorkerUploadForm, "createWorkerUploadForm");
|
|
|
59710
59722
|
//#endregion
|
|
59711
59723
|
//#region ../remote-bindings/dist/index.mjs
|
|
59712
59724
|
var import_undici = require_undici();
|
|
59713
|
-
var version = "0.0.
|
|
59725
|
+
var version = "0.0.17";
|
|
59714
59726
|
var NoDefaultValueProvided = class extends UserError$1 {
|
|
59715
59727
|
constructor() {
|
|
59716
59728
|
super("This command cannot be run in a non-interactive context", { telemetryMessage: "remote bindings prompt default missing" });
|
|
@@ -60676,7 +60688,7 @@ const BrowserBindingSchema = z$1.strictObject({
|
|
|
60676
60688
|
});
|
|
60677
60689
|
const WorkerBindingSchema = z$1.strictObject({
|
|
60678
60690
|
type: z$1.literal("worker"),
|
|
60679
|
-
|
|
60691
|
+
worker: z$1.string(),
|
|
60680
60692
|
exportName: z$1.string().optional(),
|
|
60681
60693
|
props: z$1.record(z$1.string(), z$1.unknown()).optional(),
|
|
60682
60694
|
dev: RemoteBindingDevSchema.optional()
|
|
@@ -60754,14 +60766,14 @@ const KnownBindingSchema = z$1.discriminatedUnion("type", [
|
|
|
60754
60766
|
type: z$1.literal("dispatch-namespace"),
|
|
60755
60767
|
namespace: z$1.string().optional(),
|
|
60756
60768
|
outbound: z$1.strictObject({
|
|
60757
|
-
|
|
60769
|
+
worker: z$1.string(),
|
|
60758
60770
|
parameters: z$1.array(z$1.string()).optional()
|
|
60759
60771
|
}).optional(),
|
|
60760
60772
|
dev: RemoteBindingDevSchema.optional()
|
|
60761
60773
|
}),
|
|
60762
60774
|
z$1.strictObject({
|
|
60763
60775
|
type: z$1.literal("durable-object"),
|
|
60764
|
-
|
|
60776
|
+
worker: z$1.string(),
|
|
60765
60777
|
exportName: z$1.string()
|
|
60766
60778
|
}),
|
|
60767
60779
|
FlagshipBindingSchema,
|
|
@@ -60991,7 +61003,7 @@ const PlacementSchema = z$1.union([
|
|
|
60991
61003
|
})
|
|
60992
61004
|
]);
|
|
60993
61005
|
const TailConsumerSchema = z$1.strictObject({
|
|
60994
|
-
|
|
61006
|
+
worker: z$1.string(),
|
|
60995
61007
|
streaming: z$1.boolean().optional()
|
|
60996
61008
|
});
|
|
60997
61009
|
const TriggerSchema = z$1.discriminatedUnion("type", [
|
|
@@ -63880,7 +63892,7 @@ function convertBindingsAndAssets(config$1, result) {
|
|
|
63880
63892
|
namespace: binding.namespace
|
|
63881
63893
|
};
|
|
63882
63894
|
if (binding.outbound) entry.outbound = omitUndefined({
|
|
63883
|
-
service: binding.outbound.
|
|
63895
|
+
service: binding.outbound.worker,
|
|
63884
63896
|
parameters: binding.outbound.parameters
|
|
63885
63897
|
});
|
|
63886
63898
|
if (binding.dev?.remote !== void 0) entry.remote = binding.dev.remote;
|
|
@@ -63891,7 +63903,7 @@ function convertBindingsAndAssets(config$1, result) {
|
|
|
63891
63903
|
durableObjectBindings.push({
|
|
63892
63904
|
name,
|
|
63893
63905
|
class_name: binding.exportName,
|
|
63894
|
-
script_name: binding.
|
|
63906
|
+
script_name: binding.worker
|
|
63895
63907
|
});
|
|
63896
63908
|
break;
|
|
63897
63909
|
case "flagship":
|
|
@@ -64042,7 +64054,7 @@ function convertBindingsAndAssets(config$1, result) {
|
|
|
64042
64054
|
case "worker":
|
|
64043
64055
|
services.push(omitUndefined({
|
|
64044
64056
|
binding: name,
|
|
64045
|
-
service: binding.
|
|
64057
|
+
service: binding.worker,
|
|
64046
64058
|
entrypoint: binding.exportName,
|
|
64047
64059
|
props: binding.props,
|
|
64048
64060
|
remote: binding.dev?.remote
|
|
@@ -64223,8 +64235,8 @@ function convertTailConsumers(config$1, result) {
|
|
|
64223
64235
|
if (!consumers || consumers.length === 0) return;
|
|
64224
64236
|
const tail$1 = [];
|
|
64225
64237
|
const streaming = [];
|
|
64226
|
-
for (const consumer of consumers) if (consumer.streaming) streaming.push({ service: consumer.
|
|
64227
|
-
else tail$1.push({ service: consumer.
|
|
64238
|
+
for (const consumer of consumers) if (consumer.streaming) streaming.push({ service: consumer.worker });
|
|
64239
|
+
else tail$1.push({ service: consumer.worker });
|
|
64228
64240
|
if (tail$1.length) result.tail_consumers = tail$1;
|
|
64229
64241
|
if (streaming.length) result.streaming_tail_consumers = streaming;
|
|
64230
64242
|
}
|