schema-truth 0.8.14 → 0.8.15

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.
@@ -757,7 +757,7 @@ function node(schema, rootName, isArktype, options) {
757
757
  }
758
758
  const itemSchema = itemsSchemaOf(schema.items);
759
759
  const items = itemSchema ? arktype(itemSchema, rootName, isArktype, options) : "\"unknown\"";
760
- const base = isQuoted(items) ? `"${items.slice(1, -1)}[]"` : `type(${items}).array()`;
760
+ const base = isQuoted(items) ? `"${items.slice(1, -1)}[]"` : isArktype && isArktypeDefinition(items) ? `[${items},"[]"]` : `type(${items}).array()`;
761
761
  const { minItems, maxItems } = schema;
762
762
  const isFixedLength = hasFixedItemCount(schema);
763
763
  const lengthMessage = schema["x-length-message"];
package/dist/arktype.js CHANGED
@@ -1 +1 @@
1
- export { t as schemaToArktype } from "./arktype-o5UiPNHq.js";
1
+ export { t as schemaToArktype } from "./arktype-TTBPyi3p.js";
package/dist/cli/ajv.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as schemaToAjv } from "../ajv-BzXa3loS.js";
3
- import { n as version, t as cli } from "../cli-6GScU3W_.js";
3
+ import { n as version, t as cli } from "../cli-y0a_Ae81.js";
4
4
  import * as Effect from "effect/Effect";
5
5
  import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
6
6
  import * as NodeServices from "@effect/platform-node/NodeServices";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { t as schemaToArktype } from "../arktype-o5UiPNHq.js";
3
- import { n as version, t as cli } from "../cli-6GScU3W_.js";
2
+ import { t as schemaToArktype } from "../arktype-TTBPyi3p.js";
3
+ import { n as version, t as cli } from "../cli-y0a_Ae81.js";
4
4
  import * as Effect from "effect/Effect";
5
5
  import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
6
6
  import * as NodeServices from "@effect/platform-node/NodeServices";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as schemaToEffect } from "../effect-CYQf9Lw6.js";
3
- import { n as version, t as cli } from "../cli-6GScU3W_.js";
3
+ import { n as version, t as cli } from "../cli-y0a_Ae81.js";
4
4
  import * as Effect from "effect/Effect";
5
5
  import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
6
6
  import * as NodeServices from "@effect/platform-node/NodeServices";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as schemaToTypebox } from "../typebox-2MLHaziq.js";
3
- import { n as version, t as cli } from "../cli-6GScU3W_.js";
3
+ import { n as version, t as cli } from "../cli-y0a_Ae81.js";
4
4
  import * as Effect from "effect/Effect";
5
5
  import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
6
6
  import * as NodeServices from "@effect/platform-node/NodeServices";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as schemaToValibot } from "../valibot-CRyUoeJj.js";
3
- import { n as version, t as cli } from "../cli-6GScU3W_.js";
3
+ import { n as version, t as cli } from "../cli-y0a_Ae81.js";
4
4
  import * as Effect from "effect/Effect";
5
5
  import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
6
6
  import * as NodeServices from "@effect/platform-node/NodeServices";
package/dist/cli/yup.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as schemaToYup } from "../yup-BqKfyIcd.js";
3
- import { n as version, t as cli } from "../cli-6GScU3W_.js";
3
+ import { n as version, t as cli } from "../cli-y0a_Ae81.js";
4
4
  import * as Effect from "effect/Effect";
5
5
  import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
6
6
  import * as NodeServices from "@effect/platform-node/NodeServices";
package/dist/cli/zod.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as schemaToZod } from "../zod-xz1vNbs5.js";
3
- import { n as version, t as cli } from "../cli-6GScU3W_.js";
3
+ import { n as version, t as cli } from "../cli-y0a_Ae81.js";
4
4
  import * as Effect from "effect/Effect";
5
5
  import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
6
6
  import * as NodeServices from "@effect/platform-node/NodeServices";
@@ -9,7 +9,7 @@ import * as Stdio from "effect/Stdio";
9
9
  import "@effect/platform-node/NodeFileSystem";
10
10
  import * as FileSystem from "effect/FileSystem";
11
11
  // package.json
12
- var version = "0.8.14";
12
+ var version = "0.8.15";
13
13
  // src/file/index.ts
14
14
  /** Creates the directory and its parents. An existing directory is not an error. */
15
15
  function mkdir(dir) {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { An as NUMERIC_KEYWORDS, At as toPascalCase, Bn as STRINGBOOL_TRUTHY_PATTERN, Cn as JSON_SCHEMA_TYPES, Ct as effectMessage, Dn as NUMBER_FORMATS, Dt as normalizeTypes, En as NOT_KEYWORD_UNSUPPORTED_MARKER, Et as makeSafeKey, Fn as PARAM_LOCATIONS, Ft as zodErrorPart, Gn as UNSAFE_GENERATED_MARKER, Hn as STRING_KEYWORDS, In as PARAM_STYLES, Jn as ZOD_CODE_EXTENSION_KEYS, Kn as VALIBOT_CODE_EXTENSION_KEYS, Ln as QUOTE_OR_BACKSLASH_PATTERN, Mn as OFFSET_PATTERN_SOURCE, Mt as valibotErrorPart, Nn as OPENAPI_COMPONENT_SUFFIX_MAP, Nt as zodBaseError, On as NUMBER_RANGES, Ot as resolveOpenAPIRef, Pn as OUTPUT_EXTENSION, Pt as zodError, Rn as ROOT_REFS, Sn as ISO_4217_CURRENCY_CODES, St as effectErrorPart, Tn as NON_IDENTIFIER_CHARACTER_PATTERN, Tt as issueMessageExpression, Un as STRING_WIRE_LOCATIONS, Vn as STRING_FORMATS, Wn as UNICODE_ESCAPE_PATTERN, _n as IDENTIFIER_PATTERN, an as ANCHOR_REF_PATTERN, bn as INTEGER_TEXT_PATTERN, bt as definitionOf, cn as COMPONENT_SCHEMA_REF_PREFIX, dn as DEFAULT_ROOT_NAME, fn as DEFINITION_KEYWORDS, gn as FORMAT_PATTERNS, hn as EFFECT_CODE_EXTENSION_KEYS, in as ALL_CODE_EXTENSION_KEYS, jn as OBJECT_PROTOTYPE_PROPERTIES, jt as valibotError, kn as NUMBER_WIRE_PATTERN, kt as toIdentifierPascalCase, ln as CONTENT_ENCODINGS, mn as DEFINITION_REF_PREFIXES, on as ARKTYPE_CODE_EXTENSION_KEYS, pn as DEFINITION_POINTER_PATTERN, qn as WIRE_PRIMITIVE_ORDER, sn as ARROW_FUNCTION_PATTERN, un as DATE_PATTERN_SOURCE, vn as IF_THEN_ELSE_UNSUPPORTED_MARKER, wn as MISSING_DEFINITION_PREFIX, wt as encodeNonAscii, xn as INTEGER_WIRE_PATTERN, xt as effectError, yn as INPUT_EXTENSIONS, yt as coerceDefault, zn as STRINGBOOL_PATTERN } from "./helper-DpwdwX03.js";
2
2
  import { i as fmt, n as parseSchemaFile, r as FormatError, t as ParseError } from "./parser-RBrkz7ZL.js";
3
3
  import { n as ajv, t as schemaToAjv } from "./ajv-BzXa3loS.js";
4
- import { n as arktype, t as schemaToArktype } from "./arktype-o5UiPNHq.js";
4
+ import { n as arktype, t as schemaToArktype } from "./arktype-TTBPyi3p.js";
5
5
  import { n as effect, r as wholeValueMessage, t as schemaToEffect } from "./effect-CYQf9Lw6.js";
6
6
  import { n as nestedTypeboxOptions, r as typebox, t as schemaToTypebox } from "./typebox-2MLHaziq.js";
7
7
  import { n as valibot, t as schemaToValibot } from "./valibot-CRyUoeJj.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schema-truth",
3
- "version": "0.8.14",
3
+ "version": "0.8.15",
4
4
  "description": "Generate Zod/Valibot/Effect/TypeBox/ArkType/Ajv/Yup schemas from JSON or YAML files",
5
5
  "keywords": [
6
6
  "ajv",