# VDL Plugin SDK Build VDL plugins in TypeScript with a focused CLI, typed IR access, utility helpers, and test builders. This document is an AI-oriented entry layer for the SDK. Use it to quickly determine: 1. What the package does. 2. Which import path matches the current task. 3. Which documentation links to read next. Read only the sections and links relevant to your task. ## About the project ### What is VDL? VDL is the open-source cross-language definition engine for modern stacks. Define your data structures, APIs, contracts, and generate type-safe code for your backend and frontend instantly. - VDL GitHub: https://github.com/varavelio/vdl - SDK GitHub: https://github.com/varavelio/vdl-plugin-sdk ### What is VDL Plugin SDK (this package) VDL Plugin SDK is a TypeScript library for building VDL plugins (plugins are code generators). ## How to use this document - Treat this file as a routing layer, not the full API reference. - Identify the exact job first (runtime plugin code, helper utilities, or tests). - Select the matching entry point. - Follow linked docs only for the selected surface. - Avoid broad assumptions across unrelated modules. ## Task to entry-point map - Write or update plugin runtime logic in `src/index.ts` -> `@varavel/vdl-plugin-sdk` - Reuse helper utilities in plugin logic -> `@varavel/vdl-plugin-sdk/utils/` - Build test fixtures and synthetic IR in tests -> `@varavel/vdl-plugin-sdk/testing` - Type-check and bundle plugin output -> `vdl-plugin` CLI (`check`, `build`) ## Quick Start A VDL plugin exports a `generate` handler created with `definePlugin(...)` from `src/index.ts`. ```ts import { definePlugin } from "@varavel/vdl-plugin-sdk"; export const generate = definePlugin((input) => { // Your plugin logic goes here // Explore plugin input as needed console.log(input.version); // The VDL version without the v prefix console.log(input.options); // Plugin options from vdl.config.vdl console.log(input.ir); // Typed VDL intermediate representation return { files: [ { path: "hello.txt", content: "Hello from VDL Plugin SDK", }, ], }; }); ``` Then run: ```bash npx vdl-plugin check npx vdl-plugin build ``` - `check` validates your TypeScript during development. - `build` generates the release-ready plugin bundle at `dist/index.js`. Output contract reminder: - A plugin returns generated files. - VDL consumes the built artifact at `dist/index.js`. ## What This Package Includes Think of the SDK as five pieces that work together: - The main package for authoring a plugin handler and working with the typed VDL IR. - Built-in error primitives for clear diagnostics (`PluginError`, `fail`, `assert`). - Tree-shakeable utility subpaths for reusable helper functions used in plugin logic. - A separate `testing` entry point for building realistic IR fixtures in unit tests. - A small CLI plus shared `tsconfig` presets for the normal plugin build workflow. ### Entry Points | Import | Use for | | -------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `@varavel/vdl-plugin-sdk` | Main plugin authoring surface: define your plugin, receive typed input, and return generated files | | `@varavel/vdl-plugin-sdk/utils/` | Tree-shakeable utility imports for one helper category | | `@varavel/vdl-plugin-sdk/testing` | Test-only builders for creating plugin input and IR fixtures quickly | #### `@varavel/vdl-plugin-sdk` Use `@varavel/vdl-plugin-sdk` in your plugin runtime code. This is the package surface you start from when writing `src/index.ts`. #### `@varavel/vdl-plugin-sdk/utils/` Use utility subpaths when your plugin code needs reusable transformations, string helpers, option helpers, or IR-oriented convenience functions. Prefer specific imports for clarity and better tree-shaking. #### `@varavel/vdl-plugin-sdk/testing` Use `@varavel/vdl-plugin-sdk/testing` only in tests. It exposes independent IR builder functions for creating realistic plugin input and schema fixtures without hand-writing large object graphs. Do not import this entry point in production plugin runtime code. ### Mental Model - Reach for `@varavel/vdl-plugin-sdk` when you are writing the plugin itself. - Reach for `@varavel/vdl-plugin-sdk/utils/` when your plugin logic needs shared helper functions. - Reach for `@varavel/vdl-plugin-sdk/testing` when you are constructing test fixtures. - Treat the CLI and `tsconfig` presets as project scaffolding around those imports, not as part of your runtime code. ## CLI Use the bundled binary in scripts or with `npx`: ```bash npx vdl-plugin check npx vdl-plugin build # Or with custom entry/out paths: npx vdl-plugin build --entry packages/my-plugin/src/main.ts --out ../../dist/index.js ``` - `check` runs TypeScript without emitting files. - `build` bundles the required `src/index.ts` entry into `dist/index.js` by default. You can override these defaults using the `--entry ` and `--out ` options. - **Note**: Remember that the final built plugin must always be located at `dist/index.js` relative to your project's root directory so that VDL can automatically discover and load it. ## Importing Raw Files The SDK's builder includes out-of-the-box support for importing files as raw plaintext strings. This is extremely useful for bundling templates, HTML, or SQL queries directly into your plugin without needing the `fs` module at runtime. Simply append `?raw` to any relative import path: ```ts import { definePlugin } from "@varavel/vdl-plugin-sdk"; import query from "./query.sql?raw"; export const generate = definePlugin((input) => { return { files: [ { path: "output.sql", content: query, }, ], }; }); ``` ## Error handling `definePlugin` wraps your handler with a global safety boundary. - Throw `PluginError` (or use `fail` or `assert`) for user-facing generation diagnostics. - Use `assert` when validating required conditions while keeping TypeScript narrowing. - Any unexpected thrown value is converted into a safe `errors` payload. Example: ```ts import { assert, definePlugin, fail } from "@varavel/vdl-plugin-sdk"; export const generate = definePlugin((input) => { const serviceType = input.ir.types.find((typeDef) => typeDef.name === "Service"); assert(serviceType, 'Missing required type "Service".', input.ir.position); if (serviceType.type.kind !== "object") { fail('Type "Service" must be an object.', serviceType.position); } return { files: [{ path: "service.txt", content: "ok" }], }; }); ``` For RPC plugins, use an `assertValidIrForRpc` validation call: ```ts import { definePlugin } from "@varavel/vdl-plugin-sdk"; import { assertValidIrForRpc } from "@varavel/vdl-plugin-sdk/utils/rpc"; export const generate = definePlugin((input) => { assertValidIrForRpc(input.ir); return { files: [{ path: "rpc.ts", content: "// generated" }], }; }); ``` ## Agent checklist Before writing code or answering SDK usage questions, verify: 1. Correct entry point selected for the task. 2. Runtime and test imports are not mixed. 3. Workflow commands follow `check` then `build`. ## Core import: `@varavel/vdl-plugin-sdk` Define plugins and use the typed VDL IR surface exported by the main SDK entry point. https://vdl-plugin-sdk.varavel.com/llms/api/core/index.md ### Functions #### assert Ensures `condition` is truthy, otherwise throws a `PluginError`. https://vdl-plugin-sdk.varavel.com/llms/api/core/functions/assert.md #### definePlugin Wraps a plugin handler so it can be exported as the canonical VDL entry point. https://vdl-plugin-sdk.varavel.com/llms/api/core/functions/definePlugin.md #### fail Immediately aborts generation by throwing a `PluginError`. https://vdl-plugin-sdk.varavel.com/llms/api/core/functions/fail.md ### Variables #### Annotation Annotation exposes the generated runtime helpers for Annotation. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/Annotation.md #### ConstantDef ConstantDef exposes the generated runtime helpers for ConstantDef. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/ConstantDef.md #### EnumDef EnumDef exposes the generated runtime helpers for EnumDef. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/EnumDef.md #### EnumMember EnumMember exposes the generated runtime helpers for EnumMember. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/EnumMember.md #### EnumValueType EnumValueType exposes the generated enum values and runtime helpers for EnumValueType. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/EnumValueType.md #### Field Field exposes the generated runtime helpers for Field. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/Field.md #### IrSchema IrSchema exposes the generated runtime helpers for IrSchema. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/IrSchema.md #### LiteralKind LiteralKind exposes the generated enum values and runtime helpers for LiteralKind. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/LiteralKind.md #### LiteralValue LiteralValue exposes the generated runtime helpers for LiteralValue. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/LiteralValue.md #### ObjectEntry ObjectEntry exposes the generated runtime helpers for ObjectEntry. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/ObjectEntry.md #### PluginInput PluginInput exposes the generated runtime helpers for PluginInput. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/PluginInput.md #### PluginOutput PluginOutput exposes the generated runtime helpers for PluginOutput. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/PluginOutput.md #### PluginOutputError PluginOutputError exposes the generated runtime helpers for PluginOutputError. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/PluginOutputError.md #### PluginOutputFile PluginOutputFile exposes the generated runtime helpers for PluginOutputFile. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/PluginOutputFile.md #### Position Position exposes the generated runtime helpers for Position. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/Position.md #### PrimitiveType PrimitiveType exposes the generated enum values and runtime helpers for PrimitiveType. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/PrimitiveType.md #### TopLevelDoc TopLevelDoc exposes the generated runtime helpers for TopLevelDoc. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/TopLevelDoc.md #### TypeDef TypeDef exposes the generated runtime helpers for TypeDef. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/TypeDef.md #### TypeKind TypeKind exposes the generated enum values and runtime helpers for TypeKind. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/TypeKind.md #### TypeRef TypeRef exposes the generated runtime helpers for TypeRef. https://vdl-plugin-sdk.varavel.com/llms/api/core/variables/TypeRef.md ### Type Aliases #### Annotation Annotation metadata preserved in IR. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/Annotation.md #### ConstantDef Fully resolved constant definition. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/ConstantDef.md #### EnumDef Flattened enum definition. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/EnumDef.md #### EnumMember Enum member definition https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/EnumMember.md #### EnumValueType Underlying storage kind used by an enum https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/EnumValueType.md #### Field Flattened object/type field definition https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/Field.md #### IrSchema IrSchema is the generator-facing representation of a VDL program. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/IrSchema.md #### LiteralKind Kind discriminator for LiteralValue. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/LiteralKind.md #### LiteralValue Fully resolved literal value. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/LiteralValue.md #### ObjectEntry Key/value pair inside an object LiteralValue payload https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/ObjectEntry.md #### PluginInput PluginInput represents the data payload sent to a plugin. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/PluginInput.md #### PluginOutput PluginOutput represents the response payload returned by the `plugin` function. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/PluginOutput.md #### PluginOutputError A structured error reported by the plugin. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/PluginOutputError.md #### PluginOutputFile PluginOutputFile represents a single generated file produced by the plugin. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/PluginOutputFile.md #### Position It represents a position within a file and is used for error reporting, diagnostics, plugins, and tooling support. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/Position.md #### PrimitiveType Primitive scalar type names https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/PrimitiveType.md #### TopLevelDoc Standalone documentation block. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/TopLevelDoc.md #### TypeDef Flattened type definition. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/TypeDef.md #### TypeKind Kind discriminator for TypeRef https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/TypeKind.md #### TypeRef Normalized type reference used by fields. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/TypeRef.md #### VdlPluginHandler Function signature implemented by every VDL plugin entry point. https://vdl-plugin-sdk.varavel.com/llms/api/core/type-aliases/VdlPluginHandler.md ### Classes #### PluginError Error type for plugin generation failures that should be surfaced as structured VDL diagnostics. https://vdl-plugin-sdk.varavel.com/llms/api/core/classes/PluginError.md ## Utilities ### IR import: `@varavel/vdl-plugin-sdk/utils/ir` https://vdl-plugin-sdk.varavel.com/llms/api/utils/ir/index.md #### Functions ##### anonymizeIr https://vdl-plugin-sdk.varavel.com/llms/api/utils/ir/functions/anonymizeIr.md ##### getAnnotation Returns the first annotation that matches the provided name. https://vdl-plugin-sdk.varavel.com/llms/api/utils/ir/functions/getAnnotation.md ##### getAnnotationArg Returns the raw literal argument stored in an annotation. https://vdl-plugin-sdk.varavel.com/llms/api/utils/ir/functions/getAnnotationArg.md ##### hoistAnonymousTypes Hoists anonymous inline object types into generated top-level `TypeDef`s. https://vdl-plugin-sdk.varavel.com/llms/api/utils/ir/functions/hoistAnonymousTypes.md ##### unwrapLiteral Resolves a `LiteralValue` into its native JavaScript representation. https://vdl-plugin-sdk.varavel.com/llms/api/utils/ir/functions/unwrapLiteral.md #### Type Aliases ##### AnonymizableIr Object shape that explicitly carries IR source metadata. https://vdl-plugin-sdk.varavel.com/llms/api/utils/ir/type-aliases/AnonymizableIr.md ##### HoistNameContext Naming information passed to the optional `nameFn` callback used by `hoistAnonymousTypes`. https://vdl-plugin-sdk.varavel.com/llms/api/utils/ir/type-aliases/HoistNameContext.md ### RPC import: `@varavel/vdl-plugin-sdk/utils/rpc` https://vdl-plugin-sdk.varavel.com/llms/api/utils/rpc/index.md #### Functions ##### assertValidIrForRpc Asserts that RPC-annotated IR structures follow SDK RPC conventions. https://vdl-plugin-sdk.varavel.com/llms/api/utils/rpc/functions/assertValidIrForRpc.md ### Options import: `@varavel/vdl-plugin-sdk/utils/options` https://vdl-plugin-sdk.varavel.com/llms/api/utils/options/index.md #### Functions ##### getOptionArray Returns a string array option from a separator-delimited value. https://vdl-plugin-sdk.varavel.com/llms/api/utils/options/functions/getOptionArray.md ##### getOptionBool Returns a boolean option using common truthy and falsy string values. https://vdl-plugin-sdk.varavel.com/llms/api/utils/options/functions/getOptionBool.md ##### getOptionEnum Returns a string option constrained to a known set of allowed values. https://vdl-plugin-sdk.varavel.com/llms/api/utils/options/functions/getOptionEnum.md ##### getOptionNumber Returns a numeric option or the provided fallback when parsing fails. https://vdl-plugin-sdk.varavel.com/llms/api/utils/options/functions/getOptionNumber.md ##### getOptionString Returns a string option or the provided fallback when the key is missing. https://vdl-plugin-sdk.varavel.com/llms/api/utils/options/functions/getOptionString.md ### Strings import: `@varavel/vdl-plugin-sdk/utils/strings` https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/index.md #### Functions ##### camelCase Converts a string to `camelCase`. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/camelCase.md ##### dedent Removes shared indentation from a multi-line string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/dedent.md ##### ensurePrefix Ensures that a string starts with a specific prefix. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/ensurePrefix.md ##### ensureSuffix Ensures that a string ends with a specific suffix. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/ensureSuffix.md ##### escapeHtml Converts special characters into safe HTML entities. Prevents basic XSS when rendering user-provided text in the DOM. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/escapeHtml.md ##### escapeScriptTag Escapes sequences that could prematurely close an HTML \ tag. Use this when injecting JSON data or raw strings into embedded script... https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/escapeScriptTag.md ##### firstNChars Returns the first `n` characters from a string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/firstNChars.md ##### firstNWords Returns the first `n` normalized words from a string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/firstNWords.md ##### fuzzySearch Performs a fuzzy search that combines structural matching with a bounded Damerau-Levenshtein distance. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/fuzzySearch.md ##### indent Adds an indentation prefix to every non-blank line in a multi-line string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/indent.md ##### joinLines Joins lines into one string after removing blank entries. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/joinLines.md ##### kebabCase Converts a string to `kebab-case`. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/kebabCase.md ##### lastNChars Returns the last `n` characters from a string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/lastNChars.md ##### lastNWords Returns the last `n` normalized words from a string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/lastNWords.md ##### limitBlankLines Limits the number of consecutive blank lines in a string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/limitBlankLines.md ##### lowerCase Converts a string to lowercase words separated by spaces. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/lowerCase.md ##### pad Pads both sides of a string until it reaches the requested length. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/pad.md ##### padLeft Pads the left side of a string until it reaches the requested length. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/padLeft.md ##### padRight Pads the right side of a string until it reaches the requested length. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/padRight.md ##### pascalCase Converts a string to `PascalCase`. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/pascalCase.md ##### pluralize Pluralize or singularize a word based on a count. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/pluralize.md ##### slugify Converts text into a stricter kebab-style slug. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/slugify.md ##### snakeCase Converts a string to `snake_case`. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/snakeCase.md ##### trim Removes matching characters from both ends of a string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/trim.md ##### trimEnd Removes matching characters from the end of a string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/trimEnd.md ##### trimStart Removes matching characters from the start of a string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/trimStart.md ##### upperCase Converts a string to uppercase words separated by spaces. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/upperCase.md ##### words Splits a string into normalized word tokens. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/functions/words.md #### Type Aliases ##### FuzzySearchResult Describes the outcome of a fuzzy search. https://vdl-plugin-sdk.varavel.com/llms/api/utils/strings/type-aliases/FuzzySearchResult.md ### YAML import: `@varavel/vdl-plugin-sdk/utils/yaml` https://vdl-plugin-sdk.varavel.com/llms/api/utils/yaml/index.md #### Functions ##### parse Parses a YAML document string into a JavaScript value. https://vdl-plugin-sdk.varavel.com/llms/api/utils/yaml/functions/parse.md ##### stringify Serializes a JavaScript value into a YAML document string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/yaml/functions/stringify.md ### TOML import: `@varavel/vdl-plugin-sdk/utils/toml` https://vdl-plugin-sdk.varavel.com/llms/api/utils/toml/index.md #### Functions ##### parse Parses a TOML document string into a JavaScript object. https://vdl-plugin-sdk.varavel.com/llms/api/utils/toml/functions/parse.md ##### stringify Serializes a JavaScript object into a TOML document string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/toml/functions/stringify.md ### Arrays import: `@varavel/vdl-plugin-sdk/utils/arrays` https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/index.md #### Functions ##### at Retrieves elements from an array at the specified indices. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/at.md ##### chunk Splits an array into smaller arrays of a specified length. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/chunk.md ##### compact Removes falsey values (false, null, 0, -0, 0n, '', undefined, NaN) from an array. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/compact.md ##### countBy Count the occurrences of each item in an array based on a transformation function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/countBy.md ##### difference Computes the difference between two arrays. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/difference.md ##### differenceBy Computes the difference between two arrays after mapping their elements through a provided function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/differenceBy.md ##### differenceWith Computes the difference between two arrays based on a custom equality function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/differenceWith.md ##### drop Removes a specified number of elements from the beginning of an array and returns the rest. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/drop.md ##### dropRight Removes a specified number of elements from the end of an array and returns the rest. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/dropRight.md ##### dropRightWhile Removes elements from the end of an array until the predicate returns false. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/dropRightWhile.md ##### dropWhile Removes elements from the beginning of an array until the predicate returns false. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/dropWhile.md ##### flatMap Maps each element in the array using the iteratee function and flattens the result up to the specified depth. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/flatMap.md ##### flatMapDeep Recursively maps each element in an array using a provided iteratee function and then deeply flattens the resulting array. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/flatMapDeep.md ##### flatten Flattens an array up to the specified depth. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/flatten.md ##### flattenDeep Flattens all depths of a nested array. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/flattenDeep.md ##### groupBy Groups the elements of an array based on a provided key-generating function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/groupBy.md ##### head Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/head.md ##### initial Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/initial.md ##### intersection Returns the intersection of two arrays. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/intersection.md ##### intersectionBy Returns the intersection of two arrays based on a mapping function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/intersectionBy.md ##### intersectionWith Returns the intersection of two arrays based on a custom equality function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/intersectionWith.md ##### isSubset Checks if the `subset` array is entirely contained within the `superset` array. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/isSubset.md ##### isSubsetWith Checks if the `subset` array is entirely contained within the `superset` array based on a custom equality function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/isSubsetWith.md ##### keyBy Maps each element of an array based on a provided key-generating function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/keyBy.md ##### last Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/last.md ##### maxBy Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/maxBy.md ##### minBy Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/minBy.md ##### orderBy Sorts an array of objects based on the given `criteria` and their corresponding order directions. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/orderBy.md ##### partition Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/partition.md ##### sortBy Sorts an array of objects based on the given `criteria`. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/sortBy.md ##### tail Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/tail.md ##### take Returns a new array containing the first `count` elements from the input array `arr`. If `count` is greater than the length of `arr`, the en... https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/take.md ##### takeRight Returns a new array containing the last `count` elements from the input array `arr`. If `count` is greater than the length of `arr`, the ent... https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/takeRight.md ##### takeRightWhile Takes elements from the end of the array while the predicate function returns `true`. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/takeRightWhile.md ##### takeWhile Returns a new array containing the leading elements of the provided array that satisfy the provided predicate function. It stops taking elem... https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/takeWhile.md ##### toFilled Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/toFilled.md ##### union Creates an array of unique values from all given arrays. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/union.md ##### unionBy Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/unionBy.md ##### unionWith Creates an array of unique values from two given arrays based on a custom equality function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/unionWith.md ##### uniq Creates a duplicate-free version of an array. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/uniq.md ##### uniqBy Returns a new array containing only the unique elements from the original array, based on the values returned by the mapper function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/uniqBy.md ##### uniqWith Returns a new array containing only the unique elements from the original array, based on the values returned by the comparator function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/uniqWith.md ##### unzip Gathers elements in the same position in an internal array from a grouped array of elements and returns them as a new array. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/unzip.md ##### unzipWith Unzips an array of arrays, applying an `iteratee` function to regrouped elements. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/unzipWith.md ##### windowed Creates an array of sub-arrays (windows) from the input array, each of the specified size. The windows can overlap depending on the step siz... https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/windowed.md ##### without Creates an array that excludes all specified values. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/without.md ##### xor Computes the symmetric difference between two arrays. The symmetric difference is the set of elements which are in either of the arrays, but... https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/xor.md ##### xorBy Computes the symmetric difference between two arrays using a custom mapping function. The symmetric difference is the set of elements which... https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/xorBy.md ##### xorWith Computes the symmetric difference between two arrays using a custom equality function. The symmetric difference is the set of elements which... https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/xorWith.md ##### zip Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/zip.md ##### zipObject Combines two arrays, one of property names and one of corresponding values, into a single object. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/zipObject.md ##### zipWith Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/arrays/functions/zipWith.md ### Functions import: `@varavel/vdl-plugin-sdk/utils/functions` https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/index.md #### Functions ##### after Creates a function that only executes starting from the `n`-th call. The provided function will be invoked starting from the `n`-th call. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/after.md ##### ary Creates a function that invokes func, with up to n arguments, ignoring any additional arguments. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/ary.md ##### before Creates a function that limits the number of times the given function (`func`) can be called. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/before.md ##### curry Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/curry.md ##### curryRight Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/curryRight.md ##### flow Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/flow.md ##### flowRight Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/flowRight.md ##### identity Returns the input value unchanged. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/identity.md ##### memoize Creates a memoized version of the provided function. The memoized function caches results based on the argument it receives, so if the same... https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/memoize.md ##### negate Creates a function that negates the result of the predicate function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/negate.md ##### noop A no-operation function that does nothing. This can be used as a placeholder or default function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/noop.md ##### once Creates a function that is restricted to invoking func once. Repeat calls to the function return the value of the first invocation. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/once.md ##### partial Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/partial.md ##### partialRight Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/partialRight.md ##### rest Creates a function that transforms the arguments of the provided function `func`. The transformed arguments are passed to `func` such that t... https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/rest.md ##### spread Creates a new function that spreads elements of an array argument into individual arguments for the original function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/spread.md ##### unary Creates a function that accepts up to one argument, ignoring any additional arguments. https://vdl-plugin-sdk.varavel.com/llms/api/utils/functions/functions/unary.md ### Maps import: `@varavel/vdl-plugin-sdk/utils/maps` https://vdl-plugin-sdk.varavel.com/llms/api/utils/maps/index.md #### Functions ##### every Tests whether all entries in a Map satisfy the provided predicate function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/maps/functions/every.md ##### filter Filters a Map based on a predicate function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/maps/functions/filter.md ##### findKey Finds the first key in a Map for which the predicate function returns true. https://vdl-plugin-sdk.varavel.com/llms/api/utils/maps/functions/findKey.md ##### findValue Finds the first value in a Map for which the predicate function returns true. https://vdl-plugin-sdk.varavel.com/llms/api/utils/maps/functions/findValue.md ##### hasValue Checks if a Map contains a specific value. https://vdl-plugin-sdk.varavel.com/llms/api/utils/maps/functions/hasValue.md ##### mapKeys Creates a new Map with the same values but with keys transformed by the provided function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/maps/functions/mapKeys.md ##### mapValues Creates a new Map with the same keys but with values transformed by the provided function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/maps/functions/mapValues.md ##### reduce Reduces a Map to a single value by iterating through its entries and applying a callback function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/maps/functions/reduce.md ##### some Tests whether at least one entry in a Map satisfies the provided predicate function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/maps/functions/some.md ### Math import: `@varavel/vdl-plugin-sdk/utils/math` https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/index.md #### Functions ##### clamp Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/clamp.md ##### inRange Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/inRange.md ##### mean Calculates the average of an array of numbers. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/mean.md ##### meanBy Calculates the average of an array of numbers when applying the `getValue` function to each element. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/meanBy.md ##### median Calculates the median of an array of numbers. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/median.md ##### medianBy Calculates the median of an array of elements when applying the `getValue` function to each element. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/medianBy.md ##### range Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/range.md ##### rangeRight Utility functions re-exported from `es-toolkit` (MIT License). See https://github.com/toss/es-toolkit for more details. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/rangeRight.md ##### round Rounds a number to a specified precision. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/round.md ##### sum Calculates the sum of an array of numbers. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/sum.md ##### sumBy Calculates the sum of an array of numbers when applying the `getValue` function to each element. https://vdl-plugin-sdk.varavel.com/llms/api/utils/math/functions/sumBy.md ### Markdown import: `@varavel/vdl-plugin-sdk/utils/markdown` https://vdl-plugin-sdk.varavel.com/llms/api/utils/markdown/index.md #### Functions ##### firstParagraph Returns the first paragraph-like content line from a Markdown document. https://vdl-plugin-sdk.varavel.com/llms/api/utils/markdown/functions/firstParagraph.md ##### title Extracts the first Markdown heading from a document. https://vdl-plugin-sdk.varavel.com/llms/api/utils/markdown/functions/title.md ##### wrapCode Wraps source text in a fenced Markdown code block. https://vdl-plugin-sdk.varavel.com/llms/api/utils/markdown/functions/wrapCode.md ### Objects import: `@varavel/vdl-plugin-sdk/utils/objects` https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/index.md #### Functions ##### clone Creates a shallow clone of the given object. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/clone.md ##### cloneDeep Creates a deep clone of the given object. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/cloneDeep.md ##### findKey Finds the key of the first element in the object that satisfies the provided testing function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/findKey.md ##### flattenObject Flattens a nested object into a single level object with delimiter-separated keys. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/flattenObject.md ##### invert Inverts the keys and values of an object. The keys of the input object become the values of the output object and vice versa. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/invert.md ##### mapKeys Creates a new object with the same values as the given object, but with keys generated by running each own enumerable property of the object... https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/mapKeys.md ##### mapValues Creates a new object with the same keys as the given object, but with values generated by running each own enumerable property of the object... https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/mapValues.md ##### merge Merges the properties of the source object into the target object. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/merge.md ##### mergeWith Merges the properties of the source object into the target object. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/mergeWith.md ##### omit Creates a new object with specified keys omitted. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/omit.md ##### omitBy Creates a new object composed of the properties that do not satisfy the predicate function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/omitBy.md ##### pick Creates a new object composed of the picked object properties. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/pick.md ##### pickBy Creates a new object composed of the properties that satisfy the predicate function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/pickBy.md ##### toMerged Merges the properties of the source object into a deep clone of the target object. Unlike `merge`, This function does not modify the origina... https://vdl-plugin-sdk.varavel.com/llms/api/utils/objects/functions/toMerged.md ### Sets import: `@varavel/vdl-plugin-sdk/utils/sets` https://vdl-plugin-sdk.varavel.com/llms/api/utils/sets/index.md #### Functions ##### countBy Counts the occurrences of items in a Set based on a transformation function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/sets/functions/countBy.md ##### every Tests whether all elements in a Set satisfy the provided predicate function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/sets/functions/every.md ##### filter Filters a Set based on a predicate function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/sets/functions/filter.md ##### find Finds the first element in a Set for which the predicate function returns true. https://vdl-plugin-sdk.varavel.com/llms/api/utils/sets/functions/find.md ##### keyBy Maps each element of a Set based on a provided key-generating function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/sets/functions/keyBy.md ##### map Creates a new Set with elements transformed by the provided function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/sets/functions/map.md ##### reduce Reduces a Set to a single value by iterating through its elements and applying a callback function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/sets/functions/reduce.md ##### some Tests whether at least one element in a Set satisfies the provided predicate function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/sets/functions/some.md ### Paths import: `@varavel/vdl-plugin-sdk/utils/paths` https://vdl-plugin-sdk.varavel.com/llms/api/utils/paths/index.md #### Functions ##### basename Returns the last path segment, optionally removing a known extension suffix. https://vdl-plugin-sdk.varavel.com/llms/api/utils/paths/functions/basename.md ##### dirname Returns the parent directory portion of a path. https://vdl-plugin-sdk.varavel.com/llms/api/utils/paths/functions/dirname.md ##### extname Returns the file extension of a path, including the leading dot. https://vdl-plugin-sdk.varavel.com/llms/api/utils/paths/functions/extname.md ##### filename Returns the filename without its extension. https://vdl-plugin-sdk.varavel.com/llms/api/utils/paths/functions/filename.md ##### isAbsolute Checks whether a path is absolute. https://vdl-plugin-sdk.varavel.com/llms/api/utils/paths/functions/isAbsolute.md ##### join Joins path segments using deterministic forward-slash normalization. https://vdl-plugin-sdk.varavel.com/llms/api/utils/paths/functions/join.md ##### normalize Normalizes a path by collapsing redundant separators and dot segments. https://vdl-plugin-sdk.varavel.com/llms/api/utils/paths/functions/normalize.md ##### relative Computes the relative path from one location to another. https://vdl-plugin-sdk.varavel.com/llms/api/utils/paths/functions/relative.md ##### resolve Resolves one or more path segments into a normalized absolute or rooted path. https://vdl-plugin-sdk.varavel.com/llms/api/utils/paths/functions/resolve.md ### Crypto import: `@varavel/vdl-plugin-sdk/utils/crypto` https://vdl-plugin-sdk.varavel.com/llms/api/utils/crypto/index.md #### Functions ##### fingerprint Generates a short, stable, and URL-friendly 8-character hexadecimal string from any JavaScript value. https://vdl-plugin-sdk.varavel.com/llms/api/utils/crypto/functions/fingerprint.md ##### hash Hashes any JavaScript value into a deterministic string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/crypto/functions/hash.md ### Predicates import: `@varavel/vdl-plugin-sdk/utils/predicates` https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/index.md #### Functions ##### isBoolean Checks if the given value is boolean. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isBoolean.md ##### isDate Checks if `value` is a Date object. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isDate.md ##### isEmptyObject Checks if a value is an empty plain object. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isEmptyObject.md ##### isEqual Checks if two values are equal, including support for `Date`, `RegExp`, and deep object comparison. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isEqual.md ##### isError Checks if `value` is an Error object. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isError.md ##### isFunction Checks if `value` is a function. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isFunction.md ##### isJSON Checks if a given value is a valid JSON string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isJSON.md ##### isJSONValue Checks if a given value is a valid JSON value. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isJSONValue.md ##### isMap Checks if a given value is `Map`. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isMap.md ##### isNil Checks if a given value is null or undefined. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isNil.md ##### isNotNil Checks if the given value is not null nor undefined. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isNotNil.md ##### isNull Checks if the given value is null. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isNull.md ##### isNumber Checks if the given value is a number. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isNumber.md ##### isPlainObject Checks if a given value is a plain object. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isPlainObject.md ##### isPrimitive Checks whether a value is a JavaScript primitive. JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bi... https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isPrimitive.md ##### isRegExp Checks if `value` is a RegExp. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isRegExp.md ##### isSet Checks if a given value is `Set`. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isSet.md ##### isString Checks if a given value is string. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isString.md ##### isUndefined Checks if the given value is undefined. https://vdl-plugin-sdk.varavel.com/llms/api/utils/predicates/functions/isUndefined.md ### Codegen import: `@varavel/vdl-plugin-sdk/utils/codegen` https://vdl-plugin-sdk.varavel.com/llms/api/utils/codegen/index.md #### Functions ##### generateVdl Reconstructs canonical VDL source code from a normalized IR node. https://vdl-plugin-sdk.varavel.com/llms/api/utils/codegen/functions/generateVdl.md #### Type Aliases ##### GenerateVdlNode Supported VDL IR nodes that can be re-rendered into canonical VDL source. https://vdl-plugin-sdk.varavel.com/llms/api/utils/codegen/type-aliases/GenerateVdlNode.md ##### GenerateVdlOptions Configures optional behaviors for VDL source reconstruction. https://vdl-plugin-sdk.varavel.com/llms/api/utils/codegen/type-aliases/GenerateVdlOptions.md ## Testing import: `@varavel/vdl-plugin-sdk/testing` Build realistic plugin input and IR fixtures for tests with the `irb` helpers. https://vdl-plugin-sdk.varavel.com/llms/api/testing/index.md ### Functions #### annotation Creates an `Annotation` with the given name and an optional literal argument. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/annotation.md #### arrayLiteral Creates an array `LiteralValue` from a list of literal items. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/arrayLiteral.md #### arrayType Creates an array `TypeRef` wrapping the given element type. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/arrayType.md #### boolLiteral Creates a boolean `LiteralValue`. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/boolLiteral.md #### constantDef Creates a `ConstantDef` with the given name and literal value. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/constantDef.md #### enumDef Creates an `EnumDef` with the given name, value type, and members. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/enumDef.md #### enumMember Creates an `EnumMember` with the given name and literal value. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/enumMember.md #### enumType Creates a `TypeRef` that references a named enum type. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/enumType.md #### field Creates a `Field` with the given name and type. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/field.md #### floatLiteral Creates a float `LiteralValue`. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/floatLiteral.md #### intLiteral Creates an integer `LiteralValue`. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/intLiteral.md #### mapType Creates a map `TypeRef` whose value type is `type`. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/mapType.md #### namedType Creates a `TypeRef` that references a named user-defined type. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/namedType.md #### objectLiteral Creates an object `LiteralValue` from a plain key/value record. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/objectLiteral.md #### objectType Creates an inline object `TypeRef` with the given fields. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/objectType.md #### pluginInput Creates a `PluginInput` with a default version, empty options, and an empty schema. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/pluginInput.md #### position Creates a `Position` with sensible defaults. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/position.md #### primitiveType Creates a primitive `TypeRef` (e.g. `string`, `int`, `bool`). https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/primitiveType.md #### schema Creates an `IrSchema` with empty collections. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/schema.md #### stringLiteral Creates a string `LiteralValue`. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/stringLiteral.md #### typeDef Creates a `TypeDef` with the given name and underlying type. https://vdl-plugin-sdk.varavel.com/llms/api/testing/functions/typeDef.md