@autobe/compiler 0.21.0 → 0.22.0
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/lib/prisma/writePrismaApplication.js +2 -2
- package/lib/raw/AutoBeCompilerRealizeTemplate.js +2 -2
- package/lib/raw/AutoBeCompilerRealizeTemplate.js.map +1 -1
- package/lib/raw/AutoBeCompilerTestTemplate.js +2 -2
- package/lib/raw/AutoBeCompilerTestTemplate.js.map +1 -1
- package/lib/raw/nestjs.json +8 -8
- package/lib/raw/test.json +3 -3
- package/lib/realize/testRealizeProject.js +1 -1
- package/lib/realize/testRealizeProject.js.map +1 -1
- package/package.json +7 -7
- package/src/prisma/writePrismaApplication.ts +2 -2
- package/src/raw/AutoBeCompilerRealizeTemplate.ts +2 -2
- package/src/raw/AutoBeCompilerTestTemplate.ts +2 -2
- package/src/raw/nestjs.json +8 -8
- package/src/raw/test.json +3 -3
- package/src/realize/testRealizeProject.ts +1 -1
package/src/raw/test.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"node_modules/@nestia/e2e/lib/GaffComparator.d.ts": "/**\n * Type-safe comparator functions for Array.sort() operations with advanced\n * field access.\n *\n * GaffComparator provides a collection of specialized comparator functions\n * designed to work seamlessly with Array.sort() and testing frameworks like\n * TestValidator.sort(). Each comparator supports both single values and arrays\n * of values, enabling complex multi-field sorting scenarios with lexicographic\n * ordering.\n *\n * Key features:\n *\n * - Generic type safety for any object structure\n * - Support for single values or arrays of values per field\n * - Lexicographic comparison for multi-value scenarios\n * - Locale-aware string comparison\n * - Automatic type conversion for dates and numbers\n *\n * The comparators follow the standard JavaScript sort contract:\n *\n * - Return < 0 if first element should come before second\n * - Return > 0 if first element should come after second\n * - Return 0 if elements are equal\n *\n * @author Jeongho Nam - https://github.com/samchon\n * @example\n * ```typescript\n * // Basic usage with single fields\n * users.sort(GaffComparator.strings(user => user.name));\n * posts.sort(GaffComparator.dates(post => post.createdAt));\n * products.sort(GaffComparator.numbers(product => product.price));\n *\n * // Multi-field sorting with arrays\n * users.sort(GaffComparator.strings(user => [user.lastName, user.firstName]));\n * events.sort(GaffComparator.dates(event => [event.startDate, event.endDate]));\n *\n * // Integration with TestValidator's currying pattern\n * const validator = TestValidator.sort(\"user sorting\",\n * (sortable) => api.getUsers({ sort: sortable })\n * )(\"name\", \"email\")(\n * GaffComparator.strings(user => [user.name, user.email])\n * );\n * await validator(\"+\"); // ascending\n * await validator(\"-\"); // descending\n * ```;\n */\nexport declare namespace GaffComparator {\n /**\n * Creates a comparator function for string-based sorting with locale-aware\n * comparison.\n *\n * Generates a comparator that extracts string values from objects and\n * performs lexicographic comparison using locale-sensitive string comparison.\n * Supports both single strings and arrays of strings for multi-field sorting\n * scenarios.\n *\n * When comparing arrays, performs lexicographic ordering: compares the first\n * elements, then the second elements if the first are equal, and so on. This\n * enables complex sorting like \"sort by last name, then by first name\".\n *\n * @example\n * ```typescript\n * interface User {\n * id: string;\n * firstName: string;\n * lastName: string;\n * email: string;\n * status: 'active' | 'inactive';\n * }\n *\n * const users: User[] = [\n * { id: '1', firstName: 'John', lastName: 'Doe', email: 'john@example.com', status: 'active' },\n * { id: '2', firstName: 'Jane', lastName: 'Doe', email: 'jane@example.com', status: 'inactive' },\n * { id: '3', firstName: 'Bob', lastName: 'Smith', email: 'bob@example.com', status: 'active' }\n * ];\n *\n * // Single field sorting\n * users.sort(GaffComparator.strings(user => user.lastName));\n * // Result: Doe, Doe, Smith\n *\n * // Multi-field sorting: last name, then first name\n * users.sort(GaffComparator.strings(user => [user.lastName, user.firstName]));\n * // Result: Doe Jane, Doe John, Smith Bob\n *\n * // Status-based sorting\n * users.sort(GaffComparator.strings(user => user.status));\n * // Result: active users first, then inactive\n *\n * // Complex multi-field: status, then last name, then first name\n * users.sort(GaffComparator.strings(user => [user.status, user.lastName, user.firstName]));\n *\n * // Integration with TestValidator sorting validation\n * const sortValidator = TestValidator.sort(\"user name sorting\",\n * (sortFields) => userApi.getUsers({ sort: sortFields })\n * )(\"lastName\", \"firstName\")(\n * GaffComparator.strings(user => [user.lastName, user.firstName])\n * );\n * await sortValidator(\"+\"); // test ascending order\n * await sortValidator(\"-\"); // test descending order\n * ```;\n *\n * @template T - The type of objects being compared\n * @param getter - Function that extracts string value(s) from input objects\n * @returns A comparator function suitable for Array.sort()\n */\n const strings: <T>(getter: (input: T) => string | string[]) => (x: T, y: T) => number;\n /**\n * Creates a comparator function for date-based sorting with automatic string\n * parsing.\n *\n * Generates a comparator that extracts date values from objects,\n * automatically converting string representations to Date objects for\n * numerical comparison. Supports both single dates and arrays of dates for\n * complex temporal sorting.\n *\n * Date strings are parsed using the standard Date constructor, which supports\n * ISO 8601 format, RFC 2822 format, and other common date representations.\n * The comparison is performed on millisecond timestamps for precise\n * ordering.\n *\n * @example\n * ```typescript\n * interface Event {\n * id: string;\n * title: string;\n * startDate: string;\n * endDate: string;\n * createdAt: string;\n * updatedAt: string;\n * }\n *\n * const events: Event[] = [\n * {\n * id: '1',\n * title: 'Conference',\n * startDate: '2024-03-15T09:00:00Z',\n * endDate: '2024-03-15T17:00:00Z',\n * createdAt: '2024-01-10T10:00:00Z',\n * updatedAt: '2024-02-01T15:30:00Z'\n * },\n * {\n * id: '2',\n * title: 'Workshop',\n * startDate: '2024-03-10T14:00:00Z',\n * endDate: '2024-03-10T16:00:00Z',\n * createdAt: '2024-01-15T11:00:00Z',\n * updatedAt: '2024-01-20T09:15:00Z'\n * }\n * ];\n *\n * // Sort by start date (chronological order)\n * events.sort(GaffComparator.dates(event => event.startDate));\n *\n * // Sort by creation date (oldest first)\n * events.sort(GaffComparator.dates(event => event.createdAt));\n *\n * // Multi-field: start date, then end date\n * events.sort(GaffComparator.dates(event => [event.startDate, event.endDate]));\n *\n * // Sort by modification history: created date, then updated date\n * events.sort(GaffComparator.dates(event => [event.createdAt, event.updatedAt]));\n *\n * // Validate API date sorting with TestValidator\n * const dateValidator = TestValidator.sort(\"event chronological sorting\",\n * (sortFields) => eventApi.getEvents({ sort: sortFields })\n * )(\"startDate\")(\n * GaffComparator.dates(event => event.startDate)\n * );\n * await dateValidator(\"+\", true); // ascending with trace logging\n *\n * // Test complex date-based sorting\n * const sortByEventSchedule = GaffComparator.dates(event => [\n * event.startDate,\n * event.endDate\n * ]);\n * ```;\n *\n * @template T - The type of objects being compared\n * @param getter - Function that extracts date string(s) from input objects\n * @returns A comparator function suitable for Array.sort()\n */\n const dates: <T>(getter: (input: T) => string | string[]) => (x: T, y: T) => number;\n /**\n * Creates a comparator function for numerical sorting with multi-value\n * support.\n *\n * Generates a comparator that extracts numerical values from objects and\n * performs mathematical comparison. Supports both single numbers and arrays\n * of numbers for complex numerical sorting scenarios like sorting by price\n * then by rating.\n *\n * When comparing arrays, performs lexicographic numerical ordering: compares\n * the first numbers, then the second numbers if the first are equal, and so\n * on. This enables sophisticated sorting like \"sort by price ascending, then\n * by rating descending\".\n *\n * @example\n * ```typescript\n * interface Product {\n * id: string;\n * name: string;\n * price: number;\n * rating: number;\n * stock: number;\n * categoryId: number;\n * salesCount: number;\n * }\n *\n * const products: Product[] = [\n * { id: '1', name: 'Laptop', price: 999.99, rating: 4.5, stock: 15, categoryId: 1, salesCount: 150 },\n * { id: '2', name: 'Mouse', price: 29.99, rating: 4.2, stock: 50, categoryId: 1, salesCount: 300 },\n * { id: '3', name: 'Keyboard', price: 79.99, rating: 4.8, stock: 25, categoryId: 1, salesCount: 200 }\n * ];\n *\n * // Sort by price (ascending)\n * products.sort(GaffComparator.numbers(product => product.price));\n * // Result: Mouse ($29.99), Keyboard ($79.99), Laptop ($999.99)\n *\n * // Sort by rating (descending requires negation)\n * products.sort(GaffComparator.numbers(product => -product.rating));\n * // Result: Keyboard (4.8), Laptop (4.5), Mouse (4.2)\n *\n * // Multi-field: category, then price\n * products.sort(GaffComparator.numbers(product => [product.categoryId, product.price]));\n *\n * // Complex business logic: popularity (sales) then rating\n * products.sort(GaffComparator.numbers(product => [-product.salesCount, -product.rating]));\n * // Negative values for descending order\n *\n * // Sort by inventory priority: low stock first, then by sales\n * products.sort(GaffComparator.numbers(product => [product.stock, -product.salesCount]));\n *\n * // Validate API numerical sorting with TestValidator\n * const priceValidator = TestValidator.sort(\"product price sorting\",\n * (sortFields) => productApi.getProducts({ sort: sortFields })\n * )(\"price\")(\n * GaffComparator.numbers(product => product.price)\n * );\n * await priceValidator(\"+\"); // test ascending order\n * await priceValidator(\"-\"); // test descending order\n *\n * // Test multi-criteria sorting\n * const sortByBusinessValue = GaffComparator.numbers(product => [\n * -product.salesCount, // High sales first\n * -product.rating, // High rating first\n * product.price // Low price first (for tie-breaking)\n * ]);\n * ```;\n *\n * @template T - The type of objects being compared\n * @param closure - Function that extracts number value(s) from input objects\n * @returns A comparator function suitable for Array.sort()\n */\n const numbers: <T>(closure: (input: T) => number | number[]) => (x: T, y: T) => number;\n}\n",
|
|
5
5
|
"node_modules/@nestia/e2e/lib/MapUtil.d.ts": "/**\n * A namespace providing utility functions for Map manipulation.\n *\n * This namespace contains helper functions for working with JavaScript Map\n * objects, providing convenient methods for common Map operations like\n * retrieving values with lazy initialization.\n *\n * @author Jeongho Nam - https://github.com/samchon\n * @example\n * ```typescript\n * // Create a cache with lazy initialization\n * const cache = new Map<string, ExpensiveObject>();\n *\n * const obj = MapUtil.take(cache, \"key1\", () => {\n * console.log(\"Creating expensive object...\");\n * return new ExpensiveObject();\n * });\n *\n * // Subsequent calls return cached value without re-creating\n * const sameObj = MapUtil.take(cache, \"key1\", () => new ExpensiveObject());\n * console.log(obj === sameObj); // true\n * ```;\n */\nexport declare namespace MapUtil {\n /**\n * Retrieves a value from a Map or creates it using a lazy initialization\n * function.\n *\n * This function implements the \"get or create\" pattern for Maps. If the key\n * exists in the Map, it returns the existing value. Otherwise, it calls the\n * provided factory function to create a new value, stores it in the Map, and\n * returns it. The factory function is only called when the key doesn't exist,\n * enabling lazy initialization and caching patterns.\n *\n * @example\n * ```typescript\n * // Simple caching example\n * const userCache = new Map<number, User>();\n *\n * const user = MapUtil.take(userCache, userId, () => {\n * // This expensive operation only runs if userId is not cached\n * return fetchUserFromDatabase(userId);\n * });\n *\n * // Configuration object caching\n * const configs = new Map<string, Config>();\n *\n * const dbConfig = MapUtil.take(configs, \"database\", () => ({\n * host: \"localhost\",\n * port: 5432,\n * database: \"myapp\"\n * }));\n *\n * // Lazy computation results\n * const computationCache = new Map<string, number>();\n *\n * const result = MapUtil.take(computationCache, \"fibonacci-40\", () => {\n * console.log(\"Computing fibonacci(40)...\");\n * return fibonacci(40); // Only computed once\n * });\n *\n * // Using with complex keys\n * const cache = new Map<[number, number], Matrix>();\n * const key: [number, number] = [rows, cols];\n *\n * const matrix = MapUtil.take(cache, key, () =>\n * generateIdentityMatrix(rows, cols)\n * );\n * ```;\n *\n * @template K - The type of keys in the Map\n * @template V - The type of values in the Map\n * @param map - The Map to retrieve from or update\n * @param key - The key to look up in the Map\n * @param value - A factory function that creates the value if key doesn't exist\n * @returns The existing value if found, or the newly created value\n */\n function take<K, V>(map: Map<K, V>, key: K, value: () => V): V;\n}\n",
|
|
6
6
|
"node_modules/@nestia/e2e/lib/RandomGenerator.d.ts": "/**\n * Comprehensive random data generation utilities for testing and development.\n *\n * RandomGenerator provides a collection of functions for generating random data\n * including strings, names, content, dates, and array sampling. All functions\n * are designed to be deterministic within a single execution but produce varied\n * output across different runs, making them ideal for testing scenarios.\n *\n * The namespace includes specialized generators for:\n *\n * - Text content (alphabets, alphanumeric, names, paragraphs)\n * - Phone numbers and contact information\n * - Date ranges and time-based data\n * - Array sampling and element selection\n *\n * @author Jeongho Nam - https://github.com/samchon\n * @example\n * ```typescript\n * // Generate test user data\n * const testUser = {\n * id: RandomGenerator.alphaNumeric(8),\n * name: RandomGenerator.name(),\n * bio: RandomGenerator.paragraph({ sentences: 3, wordMin: 5, wordMax: 10 }),\n * phone: RandomGenerator.mobile(),\n * createdAt: RandomGenerator.date(new Date(), 1000 * 60 * 60 * 24 * 30) // 30 days\n * };\n *\n * // Sample data for testing\n * const testSample = RandomGenerator.sample(allUsers, 5);\n * ```;\n */\nexport declare namespace RandomGenerator {\n /**\n * Generates a random string containing only lowercase alphabetical\n * characters.\n *\n * Creates a string of specified length using only characters a-z. Each\n * character is independently randomly selected, so the same character may\n * appear multiple times. Useful for generating random identifiers, test\n * names, or placeholder text.\n *\n * @example\n * ```typescript\n * RandomGenerator.alphabets(5); // e.g. \"kxqpw\"\n * RandomGenerator.alphabets(3); // e.g. \"mzr\"\n * RandomGenerator.alphabets(10); // e.g. \"qwertasdfg\"\n *\n * // Generate random CSS class names\n * const className = `test-${RandomGenerator.alphabets(6)}`;\n *\n * // Create random variable names for testing\n * const varName = RandomGenerator.alphabets(8);\n * ```\n *\n * @param length - The desired length of the generated alphabetic string\n * @returns A string containing only lowercase letters of the specified length\n */\n const alphabets: (length: number) => string;\n /**\n * Generates a random alphanumeric string containing digits and lowercase\n * letters.\n *\n * Creates a string of specified length using characters from 0-9 and a-z.\n * Each position is independently randomly selected from the combined\n * character set. Ideal for generating random IDs, tokens, passwords, or\n * unique identifiers that need both numeric and alphabetic characters.\n *\n * @example\n * ```typescript\n * RandomGenerator.alphaNumeric(8); // e.g. \"a1b2c3d4\"\n * RandomGenerator.alphaNumeric(12); // e.g. \"x9y8z7w6v5u4\"\n *\n * // Generate random API keys\n * const apiKey = RandomGenerator.alphaNumeric(32);\n *\n * // Create session tokens\n * const sessionId = `sess_${RandomGenerator.alphaNumeric(16)}`;\n *\n * // Generate test database IDs\n * const testId = RandomGenerator.alphaNumeric(10);\n * ```\n *\n * @param length - The desired length of the generated alphanumeric string\n * @returns A string containing digits and lowercase letters of the specified\n * length\n */\n const alphaNumeric: (length: number) => string;\n /**\n * Generates a random name-like string with realistic length variation.\n *\n * Creates a name by generating a paragraph with 2-3 words (randomly chosen).\n * The resulting string resembles typical human names in structure and length.\n * Each word is between 3-7 characters by default, creating realistic-looking\n * names.\n *\n * @example\n * ```typescript\n * RandomGenerator.name(); // e.g. \"lorem ipsum\" (2-3 words)\n * RandomGenerator.name(1); // e.g. \"dolor\" (single word)\n * RandomGenerator.name(3); // e.g. \"sit amet consectetur\" (3 words)\n *\n * // Generate test user names\n * const users = Array.from({ length: 10 }, () => ({\n * id: RandomGenerator.alphaNumeric(8),\n * name: RandomGenerator.name(),\n * email: `${RandomGenerator.name(1)}@test.com`\n * }));\n *\n * // Create random author names for blog posts\n * const authorName = RandomGenerator.name();\n * ```\n *\n * @param length - Number of words in the name (default: random between 2-3)\n * @returns A space-separated string of random words (each 3-7 chars by\n * default)\n */\n const name: (length?: number) => string;\n /**\n * Generates a random paragraph with configurable sentence structure.\n *\n * Creates a paragraph consisting of a specified number of \"sentences\"\n * (words). Each sentence is a random alphabetic string, and sentences are\n * joined with spaces. Accepts an optional configuration object for fine-tuned\n * control over the paragraph structure.\n *\n * @example\n * ```typescript\n * // Generate with defaults (random 2-5 words, 3-7 characters each)\n * RandomGenerator.paragraph(); // e.g. \"lorem ipsum dolor\"\n *\n * // Specific number of sentences\n * RandomGenerator.paragraph({ sentences: 5 }); // \"lorem ipsum dolor sit amet\"\n *\n * // Custom word length ranges\n * RandomGenerator.paragraph({ sentences: 4, wordMin: 2, wordMax: 5 });\n * // \"ab cd ef gh\"\n *\n * // Generate product descriptions\n * const description = RandomGenerator.paragraph({\n * sentences: 8,\n * wordMin: 4,\n * wordMax: 8\n * });\n *\n * // Create test content for forms\n * const placeholder = RandomGenerator.paragraph({\n * sentences: 3,\n * wordMin: 5,\n * wordMax: 10\n * });\n * ```;\n *\n * @param props - Optional configuration object with sentences count and word\n * length ranges\n * @returns A string containing the generated paragraph\n */\n const paragraph: (props?: Partial<{\n sentences: number;\n wordMin: number;\n wordMax: number;\n }>) => string;\n /**\n * Generates random multi-paragraph content with customizable structure.\n *\n * Creates content consisting of multiple paragraphs separated by double\n * newlines. Accepts an optional configuration object to control content\n * structure including paragraph count, sentences per paragraph, and word\n * character lengths. Ideal for generating realistic-looking text content for\n * testing.\n *\n * @example\n * ```typescript\n * // Generate with all defaults\n * const article = RandomGenerator.content();\n *\n * // Specific structure: 5 paragraphs, 15-25 sentences each, 4-8 char words\n * const longContent = RandomGenerator.content({\n * paragraphs: 5,\n * sentenceMin: 15,\n * sentenceMax: 25,\n * wordMin: 4,\n * wordMax: 8\n * });\n *\n * // Short content with brief sentences\n * const shortContent = RandomGenerator.content({\n * paragraphs: 2,\n * sentenceMin: 5,\n * sentenceMax: 8,\n * wordMin: 2,\n * wordMax: 4\n * });\n *\n * // Generate blog post content\n * const blogPost = {\n * title: RandomGenerator.name(3),\n * content: RandomGenerator.content({\n * paragraphs: 4,\n * sentenceMin: 10,\n * sentenceMax: 20,\n * wordMin: 3,\n * wordMax: 7\n * }),\n * summary: RandomGenerator.paragraph({ sentences: 2 })\n * };\n *\n * // Create test data for CMS\n * const pages = Array.from({ length: 10 }, () => ({\n * id: RandomGenerator.alphaNumeric(8),\n * content: RandomGenerator.content({\n * paragraphs: randint(2, 6),\n * sentenceMin: 8,\n * sentenceMax: 15\n * })\n * }));\n * ```;\n *\n * @param props - Optional configuration object with paragraph, sentence, and\n * word parameters\n * @returns A string containing the generated multi-paragraph content\n */\n const content: (props?: Partial<{\n paragraphs: number;\n sentenceMin: number;\n sentenceMax: number;\n wordMin: number;\n wordMax: number;\n }>) => string;\n /**\n * Extracts a random substring from the provided content string.\n *\n * Selects two random positions within the content and returns the substring\n * between them. The starting position is always before the ending position.\n * Automatically trims whitespace from the beginning and end of the result.\n * Useful for creating excerpts, search terms, or partial content samples.\n *\n * @example\n * ```typescript\n * const text = \"The quick brown fox jumps over the lazy dog\";\n *\n * RandomGenerator.substring(text); // e.g. \"quick brown fox\"\n * RandomGenerator.substring(text); // e.g. \"jumps over\"\n * RandomGenerator.substring(text); // e.g. \"fox jumps over the lazy\"\n *\n * // Generate search terms from content\n * const searchQuery = RandomGenerator.substring(articleContent);\n *\n * // Create excerpts for previews\n * const excerpt = RandomGenerator.substring(fullBlogPost);\n *\n * // Generate partial matches for testing search functionality\n * const partialMatch = RandomGenerator.substring(productDescription);\n *\n * // Create random selections for highlight testing\n * const selectedText = RandomGenerator.substring(documentContent);\n * ```;\n *\n * @param content - The source string to extract a substring from\n * @returns A trimmed substring of the original content\n */\n const substring: (content: string) => string;\n /**\n * Generates a random mobile phone number with customizable prefix.\n *\n * Creates a mobile phone number in the format: [prefix][3-4 digits][4\n * digits]. The middle section is 3 digits if the random number is less than\n * 1000, otherwise 4 digits. The last section is always 4 digits, zero-padded\n * if necessary. Commonly used for generating Korean mobile phone numbers or\n * similar formats.\n *\n * @example\n * ```typescript\n * RandomGenerator.mobile(); // e.g. \"0103341234\" or \"01012345678\"\n * RandomGenerator.mobile(\"011\"); // e.g. \"0119876543\" or \"01112345678\"\n * RandomGenerator.mobile(\"+82\"); // e.g. \"+823341234\" or \"+8212345678\"\n *\n * // Generate test user phone numbers\n * const testUsers = Array.from({ length: 100 }, () => ({\n * name: RandomGenerator.name(),\n * phone: RandomGenerator.mobile(),\n * altPhone: RandomGenerator.mobile(\"011\")\n * }));\n *\n * // Create international phone numbers\n * const internationalPhone = RandomGenerator.mobile(\"+821\");\n *\n * // Generate contact list for testing\n * const contacts = [\"010\", \"011\", \"016\", \"017\", \"018\", \"019\"].map(prefix => ({\n * carrier: prefix,\n * number: RandomGenerator.mobile(prefix)\n * }));\n * ```;\n *\n * @param prefix - The prefix string for the phone number (default: \"010\")\n * @returns A formatted mobile phone number string\n */\n const mobile: (prefix?: string) => string;\n /**\n * Generates a random date within a specified range from a starting point.\n *\n * Returns a random date between the start date and start date + range. The\n * range represents the maximum number of milliseconds to add to the starting\n * date. Useful for generating timestamps, creation dates, or scheduling test\n * data.\n *\n * @example\n * ```typescript\n * const now = new Date();\n * const oneDay = 24 * 60 * 60 * 1000;\n * const oneMonth = 30 * oneDay;\n *\n * // Random date within the next 30 days\n * const futureDate = RandomGenerator.date(now, oneMonth);\n *\n * // Random date within the past week\n * const pastWeek = new Date(now.getTime() - 7 * oneDay);\n * const recentDate = RandomGenerator.date(pastWeek, 7 * oneDay);\n *\n * // Generate random creation dates for test data\n * const startOfYear = new Date(2024, 0, 1);\n * const endOfYear = new Date(2024, 11, 31).getTime() - startOfYear.getTime();\n * const randomCreationDate = RandomGenerator.date(startOfYear, endOfYear);\n *\n * // Create test events with random timestamps\n * const events = Array.from({ length: 50 }, () => ({\n * id: RandomGenerator.alphaNumeric(8),\n * title: RandomGenerator.name(2),\n * createdAt: RandomGenerator.date(new Date(), oneMonth),\n * scheduledFor: RandomGenerator.date(new Date(), oneMonth * 3)\n * }));\n * ```;\n *\n * @param from - The starting date for the random range\n * @param range - The range in milliseconds from the starting date\n * @returns A random date within the specified range\n */\n const date: (from: Date, range: number) => Date;\n /**\n * Randomly samples a specified number of unique elements from an array.\n *\n * Selects random elements from the input array without replacement, ensuring\n * all returned elements are unique. The sample size is automatically capped\n * at the array length to prevent errors. Uses a Set-based approach to\n * guarantee uniqueness of selected indices. Ideal for creating test datasets\n * or selecting random subsets for validation.\n *\n * @example\n * ```typescript\n * const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n *\n * RandomGenerator.sample(numbers, 3); // e.g. [2, 7, 9]\n * RandomGenerator.sample(numbers, 5); // e.g. [1, 4, 6, 8, 10]\n * RandomGenerator.sample(numbers, 15); // returns all 10 elements (capped at array length)\n *\n * // Sample users for testing\n * const allUsers = await getUsersFromDatabase();\n * const testUsers = RandomGenerator.sample(allUsers, 10);\n *\n * // Create random product selections\n * const featuredProducts = RandomGenerator.sample(allProducts, 5);\n *\n * // Generate test data subsets\n * const validationSet = RandomGenerator.sample(trainingData, 100);\n *\n * // Random A/B testing groups\n * const groupA = RandomGenerator.sample(allParticipants, 50);\n * const remaining = allParticipants.filter(p => !groupA.includes(p));\n * const groupB = RandomGenerator.sample(remaining, 50);\n * ```;\n *\n * @param array - The source array to sample from\n * @param count - The number of elements to sample\n * @returns An array containing the randomly selected elements\n */\n const sample: <T>(array: T[], count: number) => T[];\n /**\n * Randomly selects a single element from an array.\n *\n * Chooses one element at random from the provided array using uniform\n * distribution. Each element has an equal probability of being selected. This\n * is a convenience function equivalent to sampling with a count of 1, but\n * returns the element directly rather than an array containing one element.\n *\n * @example\n * ```typescript\n * const colors = ['red', 'blue', 'green', 'yellow', 'purple'];\n * const fruits = ['apple', 'banana', 'orange', 'grape', 'kiwi'];\n *\n * RandomGenerator.pick(colors); // e.g. \"blue\"\n * RandomGenerator.pick(fruits); // e.g. \"apple\"\n *\n * // Select random configuration options\n * const randomTheme = RandomGenerator.pick(['light', 'dark', 'auto']);\n * const randomLocale = RandomGenerator.pick(['en', 'ko', 'ja', 'zh']);\n *\n * // Choose random test scenarios\n * const testScenario = RandomGenerator.pick([\n * 'happy_path',\n * 'edge_case',\n * 'error_condition',\n * 'boundary_test'\n * ]);\n *\n * // Random user role assignment\n * const userRole = RandomGenerator.pick(['admin', 'user', 'moderator']);\n *\n * // Select random API endpoints for testing\n * const endpoints = ['/users', '/posts', '/comments', '/categories'];\n * const randomEndpoint = RandomGenerator.pick(endpoints);\n * ```;\n *\n * @param array - The source array to pick an element from\n * @returns A randomly selected element from the array\n */\n const pick: <T>(array: readonly T[]) => T;\n}\n",
|
|
7
|
-
"node_modules/@nestia/e2e/lib/TestValidator.d.ts": "/**\n * A comprehensive collection of E2E validation utilities for testing\n * applications.\n *\n * TestValidator provides type-safe validation functions for common testing\n * scenarios including condition checking, equality validation, error testing,\n * HTTP error validation, pagination testing, search functionality validation,\n * and sorting validation.\n *\n * Most functions use direct parameter passing for simplicity, while some\n * maintain currying patterns for advanced composition. All provide detailed\n * error messages for debugging failed assertions.\n *\n * @author Jeongho Nam - https://github.com/samchon\n * @example\n * ```typescript\n * // Basic condition testing\n * TestValidator.predicate(\"user should be authenticated\", user.isAuthenticated);\n *\n * // Equality validation\n * TestValidator.equals(\"API response should match expected\", x, y);\n *\n * // Error validation\n * TestValidator.error(\"should throw on invalid input\", () => assertInput(\"\"));\n * ```;\n */\nexport declare namespace TestValidator {\n /**\n * Validates that a given condition evaluates to true.\n *\n * Supports synchronous boolean values, synchronous functions returning\n * boolean, and asynchronous functions returning Promise<boolean>. The return\n * type is automatically inferred based on the input type.\n *\n * @example\n * ```typescript\n * // Synchronous boolean\n * TestValidator.predicate(\"user should exist\", user !== null);\n *\n * // Synchronous function\n * TestValidator.predicate(\"array should be empty\", () => arr.length === 0);\n *\n * // Asynchronous function\n * await TestValidator.predicate(\"database should be connected\",\n * async () => await db.ping()\n * );\n * ```;\n *\n * @param title - Descriptive title used in error messages when validation\n * fails\n * @param condition - The condition to validate (boolean, function, or async\n * function)\n * @returns Void or Promise<void> based on the input type\n * @throws Error with descriptive message when condition is not satisfied\n */\n function predicate<T extends boolean | (() => boolean) | (() => Promise<boolean>)>(title: string, condition: T): T extends () => Promise<boolean> ? Promise<void> : void;\n /**\n * Validates deep equality between two values using JSON comparison.\n *\n * Performs recursive comparison of objects and arrays. Supports an optional\n * exception filter to ignore specific keys during comparison. Useful for\n * validating API responses, data transformations, and object state changes.\n *\n * @example\n * ```typescript\n * // Basic equality\n * TestValidator.equals(\"response should match expected\", expectedUser, actualUser);\n *\n * // Ignore timestamps in comparison\n * TestValidator.equals(\"user data should match\", expectedUser, actualUser,\n * (key) => key === \"updatedAt\"\n * );\n *\n * // Validate API response structure\n * TestValidator.equals(\"API response structure\",\n * { id: 1, name: \"John\" },\n * { id: 1, name: \"John\" }\n * );\n *\n * // Type-safe nullable comparisons\n * const nullableData: { name: string } | null = getData();\n * TestValidator.equals(\"nullable check\", nullableData, null);\n * ```;\n *\n * @param title - Descriptive title used in error messages when values differ\n * @param X - The first value to compare\n * @param y - The second value to compare (can be null or undefined)\n * @param exception - Optional filter function to exclude specific keys from\n * comparison\n * @throws Error with detailed diff information when values are not equal\n */\n function equals<X, Y extends X>(title: string, X: X, y: Y | null | undefined, exception?: (key: string) => boolean): void;\n /**\n * Validates deep inequality between two values using JSON comparison.\n *\n * Performs recursive comparison of objects and arrays to ensure they are NOT\n * equal. Supports an optional exception filter to ignore specific keys during\n * comparison. Useful for validating that data has changed, objects are\n * different, or mutations have occurred.\n *\n * @example\n * ```typescript\n * // Basic inequality\n * TestValidator.notEquals(\"user should be different after update\", originalUser, updatedUser);\n *\n * // Ignore timestamps in comparison\n * TestValidator.notEquals(\"user data should differ\", originalUser, modifiedUser,\n * (key) => key === \"updatedAt\"\n * );\n *\n * // Validate state changes\n * TestValidator.notEquals(\"state should have changed\", initialState, currentState);\n *\n * // Type-safe nullable comparisons\n * const mutableData: { count: number } | null = getMutableData();\n * TestValidator.notEquals(\"should have changed\", mutableData, null);\n * ```;\n *\n * @param title - Descriptive title used in error messages when values are\n * equal\n * @param x - The first value to compare\n * @param y - The second value to compare (can be null or undefined)\n * @param exception - Optional filter function to exclude specific keys from\n * comparison\n * @throws Error when values are equal (indicating validation failure)\n */\n function notEquals<X, Y extends X>(title: string, x: X, y: Y | null | undefined, exception?: (key: string) => boolean): void;\n /**\n * Validates that a function throws an error or rejects when executed.\n *\n * Expects the provided function to fail. If the function executes\n * successfully without throwing an error or rejecting, this validator will\n * throw an exception. Supports both synchronous and asynchronous functions.\n *\n * @example\n * ```typescript\n * // Synchronous error validation\n * TestValidator.error(\"should reject invalid email\",\n * () => validateEmail(\"invalid-email\")\n * );\n *\n * // Asynchronous error validation\n * await TestValidator.error(\"should reject unauthorized access\",\n * async () => await api.functional.getSecretData()\n * );\n *\n * // Validate input validation\n * TestValidator.error(\"should throw on empty string\",\n * () => processRequiredInput(\"\")\n * );\n * ```;\n *\n * @param title - Descriptive title used in error messages when no error\n * occurs\n * @param task - The function that should throw an error or reject\n * @returns Void or Promise<void> based on the input type\n * @throws Error when the task function does not throw an error or reject\n */\n function error<T>(title: string, task: () => T): T extends Promise<any> ? Promise<void> : void;\n /**\n * Validates that a function throws an HTTP error with specific status codes.\n *\n * Specialized error validator for HTTP operations. Validates that the\n * function throws an HttpError with one of the specified status codes. Useful\n * for testing API endpoints, authentication, and authorization logic.\n *\n * @example\n * ```typescript\n * // Validate 401 Unauthorized\n * await TestValidator.httpError(\"should return 401 for invalid token\", 401,\n * async () => await api.functional.getProtectedResource(\"invalid-token\")\n * );\n *\n * // Validate multiple possible error codes\n * await TestValidator.httpError(\"should return client error\", [400, 404, 422],\n * async () => await api.functional.updateNonexistentResource(data)\n * );\n *\n * // Validate server errors\n * TestValidator.httpError(\"should handle server errors\", [500, 502, 503],\n * () => callFaultyEndpoint()\n * );\n * ```;\n *\n * @param title - Descriptive title used in error messages\n * @param status - Expected status code(s), can be a single number or array\n * @param task - The function that should throw an HttpError\n * @returns Void or Promise<void> based on the input type\n * @throws Error when function doesn't throw HttpError or status code doesn't\n * match\n */\n function httpError<T>(title: string, status: number | number[], task: () => T): T extends Promise<any> ? Promise<void> : void;\n /**\n * Validates pagination index API results against expected entity order.\n *\n * Compares the order of entities returned by a pagination API with manually\n * sorted expected results. Validates that entity IDs appear in the correct\n * sequence. Commonly used for testing database queries, search results, and\n * any paginated data APIs.\n *\n * @example\n * ```typescript\n * // Test article pagination\n * const expectedArticles = await db.articles.findAll({ order: 'created_at DESC' });\n * const actualArticles = await api.functional.getArticles({ page: 1, limit: 10 });\n *\n * TestValidator.index(\"article pagination order\", expectedArticles, actualArticles,\n * true // enable trace logging\n * );\n *\n * // Test user search results\n * const manuallyFilteredUsers = allUsers.filter(u => u.name.includes(\"John\"));\n * const apiSearchResults = await api.functional.searchUsers({ query: \"John\" });\n *\n * TestValidator.index(\"user search results\", manuallyFilteredUsers, apiSearchResults);\n * ```;\n *\n * @param title - Descriptive title used in error messages when order differs\n * @param expected - The expected entities in correct order\n * @param gotten - The actual entities returned by the API\n * @param trace - Optional flag to enable debug logging (default: false)\n * @throws Error when entity order differs between expected and actual results\n */\n const index: <X extends IEntity<any>, Y extends X>(title: string, expected: X[], gotten: Y[], trace?: boolean) => void;\n /**\n * Validates search functionality by testing API results against manual\n * filtering.\n *\n * Comprehensive search validation that samples entities from a complete\n * dataset, extracts search values, applies manual filtering, calls the search\n * API, and compares results. Validates that search APIs return the correct\n * subset of data matching the search criteria.\n *\n * @example\n * ```typescript\n * // Test article search functionality with exact matching\n * const allArticles = await db.articles.findAll();\n * const searchValidator = TestValidator.search(\n * \"article search API\",\n * (req) => api.searchArticles(req),\n * allArticles,\n * 5 // test with 5 random samples\n * );\n *\n * // Test exact match search\n * await searchValidator({\n * fields: [\"title\"],\n * values: (article) => [article.title], // full title for exact match\n * filter: (article, [title]) => article.title === title, // exact match\n * request: ([title]) => ({ search: { title } })\n * });\n *\n * // Test partial match search with includes\n * await searchValidator({\n * fields: [\"content\"],\n * values: (article) => [article.content.substring(0, 20)], // partial content\n * filter: (article, [keyword]) => article.content.includes(keyword),\n * request: ([keyword]) => ({ q: keyword })\n * });\n *\n * // Test multi-field search with exact matching\n * await searchValidator({\n * fields: [\"writer\", \"title\"],\n * values: (article) => [article.writer, article.title],\n * filter: (article, [writer, title]) =>\n * article.writer === writer && article.title === title,\n * request: ([writer, title]) => ({ search: { writer, title } })\n * });\n * ```;\n *\n * @param title - Descriptive title used in error messages when search fails\n * @param getter - API function that performs the search\n * @param total - Complete dataset to sample from for testing\n * @param sampleCount - Number of random samples to test (default: 1)\n * @returns A function that accepts search configuration properties\n * @throws Error when API search results don't match manual filtering results\n */\n const search: <Entity extends IEntity<any>, Request>(title: string, getter: (input: Request) => Promise<Entity[]>, total: Entity[], sampleCount?: number) => <Values extends any[]>(props: ISearchProps<Entity, Values, Request>) => Promise<void>;\n /**\n * Configuration interface for search validation functionality.\n *\n * Defines the structure needed to validate search operations by specifying\n * how to extract search values from entities, filter the dataset manually,\n * and construct API requests.\n *\n * @template Entity - Type of entities being searched, must have an ID field\n * @template Values - Tuple type representing the search values extracted from\n * entities\n * @template Request - Type of the API request object\n */\n interface ISearchProps<Entity extends IEntity<any>, Values extends any[], Request> {\n /** Field names being searched, used in error messages for identification */\n fields: string[];\n /**\n * Extracts search values from a sample entity\n *\n * @param entity - The entity to extract search values from\n * @returns Tuple of values used for searching\n */\n values(entity: Entity): Values;\n /**\n * Manual filter function to determine if an entity matches search criteria\n *\n * @param entity - Entity to test against criteria\n * @param values - Search values to match against\n * @returns True if entity matches the search criteria\n */\n filter(entity: Entity, values: Values): boolean;\n /**\n * Constructs API request object from search values\n *\n * @param values - Search values to include in request\n * @returns Request object for the search API\n */\n request(values: Values): Request;\n }\n /**\n * Validates sorting functionality of pagination APIs.\n *\n * Tests sorting operations by calling the API with sort parameters and\n * validating that results are correctly ordered. Supports multiple fields,\n * ascending/descending order, and optional filtering. Provides detailed error\n * reporting for sorting failures.\n *\n * @example\n * ```typescript\n * // Test single field sorting with GaffComparator\n * const sortValidator = TestValidator.sort(\n * \"article sorting\",\n * (sortable) => api.getArticles({ sort: sortable })\n * )(\"created_at\")(\n * GaffComparator.dates((a) => a.created_at)\n * );\n *\n * await sortValidator(\"+\"); // ascending\n * await sortValidator(\"-\"); // descending\n *\n * // Test multi-field sorting with GaffComparator\n * const userSortValidator = TestValidator.sort(\n * \"user sorting\",\n * (sortable) => api.getUsers({ sort: sortable })\n * )(\"lastName\", \"firstName\")(\n * GaffComparator.strings((user) => [user.lastName, user.firstName]),\n * (user) => user.isActive // only test active users\n * );\n *\n * await userSortValidator(\"+\", true); // ascending with trace logging\n *\n * // Custom comparator for complex logic\n * const customSortValidator = TestValidator.sort(\n * \"custom sorting\",\n * (sortable) => api.getProducts({ sort: sortable })\n * )(\"price\", \"rating\")(\n * (a, b) => {\n * const priceDiff = a.price - b.price;\n * return priceDiff !== 0 ? priceDiff : b.rating - a.rating; // price asc, rating desc\n * }\n * );\n * ```;\n *\n * @param title - Descriptive title used in error messages when sorting fails\n * @param getter - API function that fetches sorted data\n * @returns A currying function chain: field names, comparator, then direction\n * @throws Error when API results are not properly sorted according to\n * specification\n */\n const sort: <T extends object, Fields extends string, Sortable extends Array<`-${Fields}` | `+${Fields}`> = Array<`-${Fields}` | `+${Fields}`>>(title: string, getter: (sortable: Sortable) => Promise<T[]>) => (...fields: Fields[]) => (comp: (x: T, y: T) => number, filter?: (elem: T) => boolean) => (direction: \"+\" | \"-\", trace?: boolean) => Promise<void>;\n /**\n * Type alias for sortable field specifications.\n *\n * Represents an array of sort field specifications where each field can be\n * prefixed with '+' for ascending order or '-' for descending order.\n *\n * @example\n * ```typescript\n * type UserSortable = TestValidator.Sortable<\"name\" | \"email\" | \"created_at\">;\n * // Results in: Array<\"-name\" | \"+name\" | \"-email\" | \"+email\" | \"-created_at\" | \"+created_at\">\n *\n * const userSort: UserSortable = [\"+name\", \"-created_at\"];\n * ```;\n *\n * @template Literal - String literal type representing available field names\n */\n type Sortable<Literal extends string> = Array<`-${Literal}` | `+${Literal}`>;\n}\ninterface IEntity<Type extends string | number | bigint> {\n id: Type;\n}\nexport {};\n",
|
|
7
|
+
"node_modules/@nestia/e2e/lib/TestValidator.d.ts": "/**\n * A comprehensive collection of E2E validation utilities for testing\n * applications.\n *\n * TestValidator provides type-safe validation functions for common testing\n * scenarios including condition checking, equality validation, error testing,\n * HTTP error validation, pagination testing, search functionality validation,\n * and sorting validation.\n *\n * Most functions use direct parameter passing for simplicity, while some\n * maintain currying patterns for advanced composition. All provide detailed\n * error messages for debugging failed assertions.\n *\n * @author Jeongho Nam - https://github.com/samchon\n * @example\n * ```typescript\n * // Basic condition testing\n * TestValidator.predicate(\"user should be authenticated\", user.isAuthenticated);\n *\n * // Equality validation\n * TestValidator.equals(\"API response should match expected\", x, y);\n *\n * // Error validation\n * TestValidator.error(\"should throw on invalid input\", () => assertInput(\"\"));\n * ```;\n */\nexport declare namespace TestValidator {\n /**\n * Validates that a given condition evaluates to true.\n *\n * Supports synchronous boolean values, synchronous functions returning\n * boolean, and asynchronous functions returning Promise<boolean>. The return\n * type is automatically inferred based on the input type.\n *\n * @example\n * ```typescript\n * // Synchronous boolean\n * TestValidator.predicate(\"user should exist\", user !== null);\n *\n * // Synchronous function\n * TestValidator.predicate(\"array should be empty\", () => arr.length === 0);\n *\n * // Asynchronous function\n * await TestValidator.predicate(\"database should be connected\",\n * async () => await db.ping()\n * );\n * ```;\n *\n * @param title - Descriptive title used in error messages when validation\n * fails\n * @param condition - The condition to validate (boolean, function, or async\n * function)\n * @returns Void or Promise<void> based on the input type\n * @throws Error with descriptive message when condition is not satisfied\n */\n function predicate<T extends boolean | (() => boolean) | (() => Promise<boolean>)>(title: string, condition: T): T extends () => Promise<boolean> ? Promise<void> : void;\n /**\n * Validates deep equality between two values using JSON comparison.\n *\n * Performs recursive comparison of objects and arrays. Supports an optional\n * exception filter to ignore specific keys during comparison. Useful for\n * validating API responses, data transformations, and object state changes.\n *\n * @example\n * ```typescript\n * // Basic equality\n * TestValidator.equals(\"response should match expected\", expectedUser, actualUser);\n *\n * // Ignore timestamps in comparison\n * TestValidator.equals(\"user data should match\", expectedUser, actualUser,\n * (key) => key === \"updatedAt\"\n * );\n *\n * // Validate API response structure\n * TestValidator.equals(\"API response structure\",\n * { id: 1, name: \"John\" },\n * { id: 1, name: \"John\" }\n * );\n *\n * // Type-safe nullable comparisons\n * const nullableData: { name: string } | null = getData();\n * TestValidator.equals(\"nullable check\", nullableData, null);\n * ```;\n *\n * @param title - Descriptive title used in error messages when values differ\n * @param X - The first value to compare\n * @param y - The second value to compare (can be null or undefined)\n * @param exception - Optional filter function to exclude specific keys from\n * comparison\n * @throws Error with detailed diff information when values are not equal\n */\n function equals<X, Y extends X = X>(title: string, X: X, y: Y | null | undefined, exception?: (key: string) => boolean): void;\n /**\n * Validates deep inequality between two values using JSON comparison.\n *\n * Performs recursive comparison of objects and arrays to ensure they are NOT\n * equal. Supports an optional exception filter to ignore specific keys during\n * comparison. Useful for validating that data has changed, objects are\n * different, or mutations have occurred.\n *\n * @example\n * ```typescript\n * // Basic inequality\n * TestValidator.notEquals(\"user should be different after update\", originalUser, updatedUser);\n *\n * // Ignore timestamps in comparison\n * TestValidator.notEquals(\"user data should differ\", originalUser, modifiedUser,\n * (key) => key === \"updatedAt\"\n * );\n *\n * // Validate state changes\n * TestValidator.notEquals(\"state should have changed\", initialState, currentState);\n *\n * // Type-safe nullable comparisons\n * const mutableData: { count: number } | null = getMutableData();\n * TestValidator.notEquals(\"should have changed\", mutableData, null);\n * ```;\n *\n * @param title - Descriptive title used in error messages when values are\n * equal\n * @param x - The first value to compare\n * @param y - The second value to compare (can be null or undefined)\n * @param exception - Optional filter function to exclude specific keys from\n * comparison\n * @throws Error when values are equal (indicating validation failure)\n */\n function notEquals<X, Y extends X = X>(title: string, x: X, y: Y | null | undefined, exception?: (key: string) => boolean): void;\n /**\n * Validates that a function throws an error or rejects when executed.\n *\n * Expects the provided function to fail. If the function executes\n * successfully without throwing an error or rejecting, this validator will\n * throw an exception. Supports both synchronous and asynchronous functions.\n *\n * @example\n * ```typescript\n * // Synchronous error validation\n * TestValidator.error(\"should reject invalid email\",\n * () => validateEmail(\"invalid-email\")\n * );\n *\n * // Asynchronous error validation\n * await TestValidator.error(\"should reject unauthorized access\",\n * async () => await api.functional.getSecretData()\n * );\n *\n * // Validate input validation\n * TestValidator.error(\"should throw on empty string\",\n * () => processRequiredInput(\"\")\n * );\n * ```;\n *\n * @param title - Descriptive title used in error messages when no error\n * occurs\n * @param task - The function that should throw an error or reject\n * @returns Void or Promise<void> based on the input type\n * @throws Error when the task function does not throw an error or reject\n */\n function error<T>(title: string, task: () => T): T extends Promise<any> ? Promise<void> : void;\n /**\n * Validates that a function throws an HTTP error with specific status codes.\n *\n * Specialized error validator for HTTP operations. Validates that the\n * function throws an HttpError with one of the specified status codes. Useful\n * for testing API endpoints, authentication, and authorization logic.\n *\n * @example\n * ```typescript\n * // Validate 401 Unauthorized\n * await TestValidator.httpError(\"should return 401 for invalid token\", 401,\n * async () => await api.functional.getProtectedResource(\"invalid-token\")\n * );\n *\n * // Validate multiple possible error codes\n * await TestValidator.httpError(\"should return client error\", [400, 404, 422],\n * async () => await api.functional.updateNonexistentResource(data)\n * );\n *\n * // Validate server errors\n * TestValidator.httpError(\"should handle server errors\", [500, 502, 503],\n * () => callFaultyEndpoint()\n * );\n * ```;\n *\n * @param title - Descriptive title used in error messages\n * @param status - Expected status code(s), can be a single number or array\n * @param task - The function that should throw an HttpError\n * @returns Void or Promise<void> based on the input type\n * @throws Error when function doesn't throw HttpError or status code doesn't\n * match\n */\n function httpError<T>(title: string, status: number | number[], task: () => T): T extends Promise<any> ? Promise<void> : void;\n /**\n * Validates pagination index API results against expected entity order.\n *\n * Compares the order of entities returned by a pagination API with manually\n * sorted expected results. Validates that entity IDs appear in the correct\n * sequence. Commonly used for testing database queries, search results, and\n * any paginated data APIs.\n *\n * @example\n * ```typescript\n * // Test article pagination\n * const expectedArticles = await db.articles.findAll({ order: 'created_at DESC' });\n * const actualArticles = await api.functional.getArticles({ page: 1, limit: 10 });\n *\n * TestValidator.index(\"article pagination order\", expectedArticles, actualArticles,\n * true // enable trace logging\n * );\n *\n * // Test user search results\n * const manuallyFilteredUsers = allUsers.filter(u => u.name.includes(\"John\"));\n * const apiSearchResults = await api.functional.searchUsers({ query: \"John\" });\n *\n * TestValidator.index(\"user search results\", manuallyFilteredUsers, apiSearchResults);\n * ```;\n *\n * @param title - Descriptive title used in error messages when order differs\n * @param expected - The expected entities in correct order\n * @param gotten - The actual entities returned by the API\n * @param trace - Optional flag to enable debug logging (default: false)\n * @throws Error when entity order differs between expected and actual results\n */\n const index: <X extends IEntity<any>, Y extends X = X>(title: string, expected: X[], gotten: Y[], trace?: boolean) => void;\n /**\n * Validates search functionality by testing API results against manual\n * filtering.\n *\n * Comprehensive search validation that samples entities from a complete\n * dataset, extracts search values, applies manual filtering, calls the search\n * API, and compares results. Validates that search APIs return the correct\n * subset of data matching the search criteria.\n *\n * @example\n * ```typescript\n * // Test article search functionality with exact matching\n * const allArticles = await db.articles.findAll();\n * const searchValidator = TestValidator.search(\n * \"article search API\",\n * (req) => api.searchArticles(req),\n * allArticles,\n * 5 // test with 5 random samples\n * );\n *\n * // Test exact match search\n * await searchValidator({\n * fields: [\"title\"],\n * values: (article) => [article.title], // full title for exact match\n * filter: (article, [title]) => article.title === title, // exact match\n * request: ([title]) => ({ search: { title } })\n * });\n *\n * // Test partial match search with includes\n * await searchValidator({\n * fields: [\"content\"],\n * values: (article) => [article.content.substring(0, 20)], // partial content\n * filter: (article, [keyword]) => article.content.includes(keyword),\n * request: ([keyword]) => ({ q: keyword })\n * });\n *\n * // Test multi-field search with exact matching\n * await searchValidator({\n * fields: [\"writer\", \"title\"],\n * values: (article) => [article.writer, article.title],\n * filter: (article, [writer, title]) =>\n * article.writer === writer && article.title === title,\n * request: ([writer, title]) => ({ search: { writer, title } })\n * });\n * ```;\n *\n * @param title - Descriptive title used in error messages when search fails\n * @param getter - API function that performs the search\n * @param total - Complete dataset to sample from for testing\n * @param sampleCount - Number of random samples to test (default: 1)\n * @returns A function that accepts search configuration properties\n * @throws Error when API search results don't match manual filtering results\n */\n const search: <Entity extends IEntity<any>, Request>(title: string, getter: (input: Request) => Promise<Entity[]>, total: Entity[], sampleCount?: number) => <Values extends any[]>(props: ISearchProps<Entity, Values, Request>) => Promise<void>;\n /**\n * Configuration interface for search validation functionality.\n *\n * Defines the structure needed to validate search operations by specifying\n * how to extract search values from entities, filter the dataset manually,\n * and construct API requests.\n *\n * @template Entity - Type of entities being searched, must have an ID field\n * @template Values - Tuple type representing the search values extracted from\n * entities\n * @template Request - Type of the API request object\n */\n interface ISearchProps<Entity extends IEntity<any>, Values extends any[], Request> {\n /** Field names being searched, used in error messages for identification */\n fields: string[];\n /**\n * Extracts search values from a sample entity\n *\n * @param entity - The entity to extract search values from\n * @returns Tuple of values used for searching\n */\n values(entity: Entity): Values;\n /**\n * Manual filter function to determine if an entity matches search criteria\n *\n * @param entity - Entity to test against criteria\n * @param values - Search values to match against\n * @returns True if entity matches the search criteria\n */\n filter(entity: Entity, values: Values): boolean;\n /**\n * Constructs API request object from search values\n *\n * @param values - Search values to include in request\n * @returns Request object for the search API\n */\n request(values: Values): Request;\n }\n /**\n * Validates sorting functionality of pagination APIs.\n *\n * Tests sorting operations by calling the API with sort parameters and\n * validating that results are correctly ordered. Supports multiple fields,\n * ascending/descending order, and optional filtering. Provides detailed error\n * reporting for sorting failures.\n *\n * @example\n * ```typescript\n * // Test single field sorting with GaffComparator\n * const sortValidator = TestValidator.sort(\n * \"article sorting\",\n * (sortable) => api.getArticles({ sort: sortable })\n * )(\"created_at\")(\n * GaffComparator.dates((a) => a.created_at)\n * );\n *\n * await sortValidator(\"+\"); // ascending\n * await sortValidator(\"-\"); // descending\n *\n * // Test multi-field sorting with GaffComparator\n * const userSortValidator = TestValidator.sort(\n * \"user sorting\",\n * (sortable) => api.getUsers({ sort: sortable })\n * )(\"lastName\", \"firstName\")(\n * GaffComparator.strings((user) => [user.lastName, user.firstName]),\n * (user) => user.isActive // only test active users\n * );\n *\n * await userSortValidator(\"+\", true); // ascending with trace logging\n *\n * // Custom comparator for complex logic\n * const customSortValidator = TestValidator.sort(\n * \"custom sorting\",\n * (sortable) => api.getProducts({ sort: sortable })\n * )(\"price\", \"rating\")(\n * (a, b) => {\n * const priceDiff = a.price - b.price;\n * return priceDiff !== 0 ? priceDiff : b.rating - a.rating; // price asc, rating desc\n * }\n * );\n * ```;\n *\n * @param title - Descriptive title used in error messages when sorting fails\n * @param getter - API function that fetches sorted data\n * @returns A currying function chain: field names, comparator, then direction\n * @throws Error when API results are not properly sorted according to\n * specification\n */\n const sort: <T extends object, Fields extends string, Sortable extends Array<`-${Fields}` | `+${Fields}`> = Array<`-${Fields}` | `+${Fields}`>>(title: string, getter: (sortable: Sortable) => Promise<T[]>) => (...fields: Fields[]) => (comp: (x: T, y: T) => number, filter?: (elem: T) => boolean) => (direction: \"+\" | \"-\", trace?: boolean) => Promise<void>;\n /**\n * Type alias for sortable field specifications.\n *\n * Represents an array of sort field specifications where each field can be\n * prefixed with '+' for ascending order or '-' for descending order.\n *\n * @example\n * ```typescript\n * type UserSortable = TestValidator.Sortable<\"name\" | \"email\" | \"created_at\">;\n * // Results in: Array<\"-name\" | \"+name\" | \"-email\" | \"+email\" | \"-created_at\" | \"+created_at\">\n *\n * const userSort: UserSortable = [\"+name\", \"-created_at\"];\n * ```;\n *\n * @template Literal - String literal type representing available field names\n */\n type Sortable<Literal extends string> = Array<`-${Literal}` | `+${Literal}`>;\n}\ninterface IEntity<Type extends string | number | bigint> {\n id: Type;\n}\nexport {};\n",
|
|
8
8
|
"node_modules/@nestia/e2e/lib/index.d.ts": "import * as e2e from \"./module\";\nexport default e2e;\nexport * from \"./module\";\n",
|
|
9
9
|
"node_modules/@nestia/e2e/lib/internal/json_equal_to.d.ts": "export declare const json_equal_to: (exception: (key: string) => boolean) => <T>(x: T) => (y: T | null | undefined) => string[];\n",
|
|
10
10
|
"node_modules/@nestia/e2e/lib/module.d.ts": "export * from \"./ArrayUtil\";\nexport * from \"./MapUtil\";\nexport * from \"./RandomGenerator\";\nexport * from \"./DynamicExecutor\";\nexport * from \"./GaffComparator\";\nexport * from \"./TestValidator\";\n",
|
|
11
|
-
"node_modules/@nestia/e2e/package.json": "{\n \"name\": \"@nestia/e2e\",\n \"version\": \"8.0.
|
|
11
|
+
"node_modules/@nestia/e2e/package.json": "{\n \"name\": \"@nestia/e2e\",\n \"version\": \"8.0.5\",\n \"description\": \"E2E test utilify functions\",\n \"main\": \"lib/index.js\",\n \"typings\": \"lib/index.d.ts\",\n \"scripts\": {\n \"build\": \"npm run build:main && npm run build:test\",\n \"build:main\": \"rimraf lib && tsc\",\n \"build:test\": \"rimraf bin && tsc -p test/tsconfig.json\",\n \"dev\": \"npm run build:test -- --watch\",\n \"eslint\": \"eslint src && eslint test\",\n \"prepare\": \"ts-patch install && typia patch\",\n \"test\": \"node bin/test\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia\"\n },\n \"keywords\": [\n \"e2e\",\n \"nestia\",\n \"nestjs\",\n \"test\",\n \"tdd\",\n \"utility\"\n ],\n \"author\": \"Jeongho Nam\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia/issues\"\n },\n \"homepage\": \"https://nestia.io\",\n \"devDependencies\": {\n \"@trivago/prettier-plugin-sort-imports\": \"^4.0.0\",\n \"@types/node\": \"^18.11.18\",\n \"@typescript-eslint/eslint-plugin\": \"^5.57.0\",\n \"@typescript-eslint/parser\": \"^5.57.0\",\n \"rimraf\": \"^6.0.1\",\n \"ts-node\": \"^10.9.1\",\n \"ts-patch\": \"^3.3.0\",\n \"typescript\": \"~5.9.2\",\n \"typescript-transform-paths\": \"^3.4.7\",\n \"typia\": \"^9.6.1\"\n },\n \"files\": [\n \"lib\",\n \"src\",\n \"README.md\",\n \"LICENSE\",\n \"package.json\"\n ]\n}",
|
|
12
12
|
"node_modules/@nestia/fetcher/lib/AesPkcs5.d.ts": "/**\n * Utility class for the AES-128/256 encryption.\n *\n * - AES-128/256\n * - CBC mode\n * - PKCS#5 Padding\n * - Base64 Encoding\n *\n * @author Jeongho Nam - https://github.com/samchon\n */\nexport declare namespace AesPkcs5 {\n /**\n * Encrypt data\n *\n * @param data Target data\n * @param key Key value of the encryption.\n * @param iv Initializer Vector for the encryption\n * @returns Encrypted data\n */\n function encrypt(data: string, key: string, iv: string): string;\n /**\n * Decrypt data.\n *\n * @param data Target data\n * @param key Key value of the decryption.\n * @param iv Initializer Vector for the decryption\n * @returns Decrypted data.\n */\n function decrypt(data: string, key: string, iv: string): string;\n}\n",
|
|
13
13
|
"node_modules/@nestia/fetcher/lib/EncryptedFetcher.d.ts": "import { IConnection } from \"./IConnection\";\nimport { IFetchRoute } from \"./IFetchRoute\";\nimport { IPropagation } from \"./IPropagation\";\n/**\n * Utility class for `fetch` functions used in `@nestia/sdk` with encryption.\n *\n * `EncryptedFetcher` is a utility class designed for SDK functions generated by\n * [`@nestia/sdk`](https://nestia.io/docs/sdk/sdk), interacting with the remote\n * HTTP API encrypted by AES-PKCS algorithm. In other words, this is a\n * collection of dedicated `fetch()` functions for `@nestia/sdk` with\n * encryption.\n *\n * For reference, `EncryptedFetcher` class being used only when target\n * controller method is encrypting body data by `@EncryptedRoute` or\n * `@EncryptedBody` decorators. If those decorators are not used,\n * {@link PlainFetcher} class would be used instead.\n *\n * @author Jeongho Nam - https://github.com/samchon\n */\nexport declare namespace EncryptedFetcher {\n /**\n * Fetch function only for `HEAD` method.\n *\n * @param connection Connection information for the remote HTTP server\n * @param route Route information about the target API\n * @returns Nothing because of `HEAD` method\n */\n function fetch(connection: IConnection, route: IFetchRoute<\"HEAD\">): Promise<void>;\n /**\n * Fetch function only for `GET` method.\n *\n * @param connection Connection information for the remote HTTP server\n * @param route Route information about the target API\n * @returns Response body data from the remote API\n */\n function fetch<Output>(connection: IConnection, route: IFetchRoute<\"GET\">): Promise<Output>;\n /**\n * Fetch function for the `POST`, `PUT`, `PATCH` and `DELETE` methods.\n *\n * @param connection Connection information for the remote HTTP server\n * @param route Route information about the target API\n * @returns Response body data from the remote API\n */\n function fetch<Input, Output>(connection: IConnection, route: IFetchRoute<\"POST\" | \"PUT\" | \"PATCH\" | \"DELETE\">, input?: Input, stringify?: (input: Input) => string): Promise<Output>;\n function propagate<Output extends IPropagation<any, any>>(connection: IConnection, route: IFetchRoute<\"GET\" | \"HEAD\">): Promise<Output>;\n function propagate<Input, Output extends IPropagation<any, any>>(connection: IConnection, route: IFetchRoute<\"DELETE\" | \"GET\" | \"HEAD\" | \"PATCH\" | \"POST\" | \"PUT\">, input?: Input, stringify?: (input: Input) => string): Promise<Output>;\n}\n",
|
|
14
14
|
"node_modules/@nestia/fetcher/lib/FormDataInput.d.ts": "/**\n * FormData input type.\n *\n * `FormDataInput<T>` is a type for the input of the `FormData` request, casting\n * `File` property value type as an union of `File` and\n * {@link FormDataInput.IFileProps}, especially for the React Native\n * environment.\n *\n * You know what? In the React Native environment, `File` class is not\n * supported. Therefore, when composing a `FormData` request, you have to put\n * the URI address of the local filesystem with file name and content type that\n * is represented by the {@link FormDataInput.IFileProps} type.\n *\n * This `FormDataInput<T>` type is designed for that purpose. If the property\n * value type is a `File` class, it converts it to an union type of `File` and\n * {@link FormDataInput.IFileProps} type. Also, if the property value type is an\n * array of `File` class, it converts it to an array of union type of `File` and\n * {@link FormDataInput.IFileProps} type too.\n *\n * Before | After ----------|------------------------ `boolean` | `boolean`\n * `bigint` | `bigint` `number` | `number` `string` | `string` `File` | `File \\|\n * IFileProps`\n *\n * @author Jeongho Nam - https://github.com/samchon\n * @template T Target object type.\n */\nexport type FormDataInput<T extends object> = T extends Array<any> ? never : T extends Function ? never : {\n [P in keyof T]: T[P] extends Array<infer U> ? FormDataInput.Value<U>[] : FormDataInput.Value<T[P]>;\n};\nexport declare namespace FormDataInput {\n /**\n * Value type of the `FormDataInput`.\n *\n * `Value<T>` is a type for the property value defined in the `FormDataInput`.\n *\n * If the original value type is a `File` class, `Value<T>` converts it to an\n * union type of `File` and {@link IFileProps} type which is a structured data\n * for the URI file location in the React Native environment.\n */\n type Value<T> = T extends File ? T | IFileProps : T;\n /**\n * Properties of a file.\n *\n * In the React Native, this `IFileProps` structured data can replace the\n * `File` class instance in the `FormData` request.\n *\n * Just put the {@link uri URI address} of the local file system with the\n * file's {@link name} and {@link type}. It would be casted to the `File` class\n * instance automatically in the `FormData` request.\n *\n * Note that, this `IFileProps` type works only in the React Native\n * environment. If you are developing a Web or NodeJS application, you have to\n * utilize the `File` class instance directly.\n */\n interface IFileProps {\n /**\n * URI address of the file.\n *\n * In the React Native, the URI address in the local file system can replace\n * the `File` class instance. If\n *\n * @format uri\n */\n uri: string;\n /** Name of the file. */\n name: string;\n /** Content type of the file. */\n type: string;\n }\n}\n",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"node_modules/@nestia/fetcher/lib/PlainFetcher.d.ts": "import { IConnection } from \"./IConnection\";\nimport { IFetchRoute } from \"./IFetchRoute\";\nimport { IPropagation } from \"./IPropagation\";\n/**\n * Utility class for `fetch` functions used in `@nestia/sdk`.\n *\n * `PlainFetcher` is a utility class designed for SDK functions generated by\n * [`@nestia/sdk`](https://nestia.io/docs/sdk/sdk), interacting with the remote\n * HTTP sever API. In other words, this is a collection of dedicated `fetch()`\n * functions for `@nestia/sdk`.\n *\n * For reference, `PlainFetcher` class does not encrypt or decrypt the body data\n * at all. It just delivers plain data without any post processing. If you've\n * defined a controller method through `@EncryptedRoute` or `@EncryptedBody`\n * decorator, then {@liink EncryptedFetcher} class would be used instead.\n *\n * @author Jeongho Nam - https://github.com/samchon\n */\nexport declare namespace PlainFetcher {\n /**\n * Fetch function only for `HEAD` method.\n *\n * @param connection Connection information for the remote HTTP server\n * @param route Route information about the target API\n * @returns Nothing because of `HEAD` method\n */\n function fetch(connection: IConnection, route: IFetchRoute<\"HEAD\">): Promise<void>;\n /**\n * Fetch function only for `GET` method.\n *\n * @param connection Connection information for the remote HTTP server\n * @param route Route information about the target API\n * @returns Response body data from the remote API\n */\n function fetch<Output>(connection: IConnection, route: IFetchRoute<\"GET\">): Promise<Output>;\n /**\n * Fetch function for the `POST`, `PUT`, `PATCH` and `DELETE` methods.\n *\n * @param connection Connection information for the remote HTTP server\n * @param route Route information about the target API\n * @returns Response body data from the remote API\n */\n function fetch<Input, Output>(connection: IConnection, route: IFetchRoute<\"POST\" | \"PUT\" | \"PATCH\" | \"DELETE\">, input?: Input, stringify?: (input: Input) => string): Promise<Output>;\n function propagate<Output extends IPropagation<any, any>>(connection: IConnection, route: IFetchRoute<\"GET\" | \"HEAD\">): Promise<Output>;\n function propagate<Input, Output extends IPropagation<any, any>>(connection: IConnection, route: IFetchRoute<\"DELETE\" | \"GET\" | \"HEAD\" | \"PATCH\" | \"POST\" | \"PUT\">, input?: Input, stringify?: (input: Input) => string): Promise<Output>;\n}\n",
|
|
24
24
|
"node_modules/@nestia/fetcher/lib/index.d.ts": "export * from \"./FormDataInput\";\nexport * from \"./HttpError\";\nexport * from \"./IConnection\";\nexport * from \"./IEncryptionPassword\";\nexport * from \"./IFetchEvent\";\nexport * from \"./IFetchRoute\";\nexport * from \"./IPropagation\";\n",
|
|
25
25
|
"node_modules/@nestia/fetcher/lib/internal/FetcherBase.d.ts": "export {};\n",
|
|
26
|
-
"node_modules/@nestia/fetcher/package.json": "{\n \"name\": \"@nestia/fetcher\",\n \"version\": \"8.0.
|
|
26
|
+
"node_modules/@nestia/fetcher/package.json": "{\n \"name\": \"@nestia/fetcher\",\n \"version\": \"8.0.5\",\n \"description\": \"Fetcher library of Nestia SDK\",\n \"main\": \"lib/index.js\",\n \"typings\": \"lib/index.d.ts\",\n \"scripts\": {\n \"build\": \"rimraf lib && tsc\",\n \"dev\": \"tsc -p tsconfig.test.json --watch\",\n \"eslint\": \"eslint src\",\n \"eslint:fix\": \"eslint src --fix\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/samchon/nestia\"\n },\n \"keywords\": [\n \"nestia\",\n \"fetcher\",\n \"sdk\"\n ],\n \"author\": \"Jeongho Nam\",\n \"license\": \"MIT\",\n \"bugs\": {\n \"url\": \"https://github.com/samchon/nestia/issues\"\n },\n \"homepage\": \"https://nestia.io\",\n \"dependencies\": {\n \"@samchon/openapi\": \"^4.5.0\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^18.11.14\",\n \"@typescript-eslint/eslint-plugin\": \"^5.46.1\",\n \"@typescript-eslint/parser\": \"^5.46.1\",\n \"rimraf\": \"^6.0.1\",\n \"typescript\": \"~5.9.2\"\n },\n \"files\": [\n \"README.md\",\n \"LICENSE\",\n \"package.json\",\n \"lib\",\n \"src\"\n ]\n}",
|
|
27
27
|
"node_modules/@samchon/openapi/lib/HttpLlm.d.ts": "import { OpenApi } from \"./OpenApi\";\nimport { OpenApiV3 } from \"./OpenApiV3\";\nimport { OpenApiV3_1 } from \"./OpenApiV3_1\";\nimport { SwaggerV2 } from \"./SwaggerV2\";\nimport { IHttpConnection } from \"./structures/IHttpConnection\";\nimport { IHttpLlmApplication } from \"./structures/IHttpLlmApplication\";\nimport { IHttpLlmFunction } from \"./structures/IHttpLlmFunction\";\nimport { IHttpResponse } from \"./structures/IHttpResponse\";\nimport { ILlmFunction } from \"./structures/ILlmFunction\";\nimport { ILlmSchema } from \"./structures/ILlmSchema\";\n/**\n * LLM function calling application composer from OpenAPI document.\n *\n * `HttpLlm` is a module for composing LLM (Large Language Model) function\n * calling application from the {@link OpenApi.IDocument OpenAPI document}, and\n * also for LLM function call execution and parameter merging.\n *\n * At first, you can construct the LLM function calling application by the\n * {@link HttpLlm.application HttpLlm.application()} function. And then the LLM\n * has selected a {@link IHttpLlmFunction function} to call and composes its\n * arguments, you can execute the function by\n * {@link HttpLlm.execute HttpLlm.execute()} or\n * {@link HttpLlm.propagate HttpLlm.propagate()}.\n *\n * By the way, if you have configured the\n * {@link IHttpLlmApplication.IOptions.separate} option to separate the\n * parameters into human and LLM sides, you can merge these human and LLM sides'\n * parameters into one through\n * {@link HttpLlm.mergeParameters HttpLlm.mergeParameters()} before the actual\n * LLM function call execution.\n *\n * @author Jeongho Nam - https://github.com/samchon\n */\nexport declare namespace HttpLlm {\n /**\n * Properties for the LLM function calling application composer.\n *\n * @template Model Target LLM model\n */\n interface IApplicationProps<Model extends ILlmSchema.Model> {\n /** Target LLM model. */\n model: Model;\n /** OpenAPI document to convert. */\n document: OpenApi.IDocument | SwaggerV2.IDocument | OpenApiV3.IDocument | OpenApiV3_1.IDocument;\n /** Options for the LLM function calling schema conversion. */\n options?: Partial<IHttpLlmApplication.IOptions<Model>>;\n }\n /**\n * Convert OpenAPI document to LLM function calling application.\n *\n * Converts {@link OpenApi.IDocument OpenAPI document} or\n * {@link IHttpMigrateApplication migrated application} to the\n * {@link IHttpLlmApplication LLM function calling application}. Every\n * {@link OpenApi.IOperation API operations} in the OpenAPI document are\n * converted to the {@link IHttpLlmFunction LLM function} type, and they would\n * be used for the LLM function calling.\n *\n * If you have configured the {@link IHttpLlmApplication.IOptions.separate}\n * option, every parameters in the {@link IHttpLlmFunction} would be separated\n * into both human and LLM sides. In that case, you can merge these human and\n * LLM sides' parameters into one through {@link HttpLlm.mergeParameters}\n * before the actual LLM function call execution.\n *\n * Additionally, if you have configured the\n * {@link IHttpLlmApplication.IOptions.keyword} as `true`, the number of\n * {@link IHttpLlmFunction.parameters} are always 1 and the first parameter\n * type is always {@link ILlmSchemaV3.IObject}. I recommend this option because\n * LLM can understand the keyword arguments more easily.\n *\n * @param props Properties for composition\n * @returns LLM function calling application\n */\n const application: <Model extends ILlmSchema.Model>(props: IApplicationProps<Model>) => IHttpLlmApplication<Model>;\n /** Properties for the LLM function call. */\n interface IFetchProps<Model extends ILlmSchema.Model> {\n /** Application of the LLM function calling. */\n application: IHttpLlmApplication<Model>;\n /** LLM function schema to call. */\n function: IHttpLlmFunction<ILlmSchema.Model>;\n /** Connection info to the HTTP server. */\n connection: IHttpConnection;\n /** Input arguments for the function call. */\n input: object;\n }\n /**\n * Execute the LLM function call.\n *\n * `HttmLlm.execute()` is a function executing the target\n * {@link OpenApi.IOperation API endpoint} with with the connection information\n * and arguments composed by Large Language Model like OpenAI (+human\n * sometimes).\n *\n * By the way, if you've configured the\n * {@link IHttpLlmApplication.IOptions.separate}, so that the parameters are\n * separated to human and LLM sides, you have to merge these humand and LLM\n * sides' parameters into one through {@link HttpLlm.mergeParameters}\n * function.\n *\n * About the {@link IHttpLlmApplication.IOptions.keyword} option, don't worry\n * anything. This `HttmLlm.execute()` function will automatically recognize\n * the keyword arguments and convert them to the proper sequence.\n *\n * For reference, if the target API endpoinnt responds none 200/201 status,\n * this would be considered as an error and the {@link HttpError} would be\n * thrown. Otherwise you don't want such rule, you can use the\n * {@link HttpLlm.propagate} function instead.\n *\n * @param props Properties for the LLM function call\n * @returns Return value (response body) from the API endpoint\n * @throws HttpError when the API endpoint responds none 200/201 status\n */\n const execute: <Model extends ILlmSchema.Model>(props: IFetchProps<Model>) => Promise<unknown>;\n /**\n * Propagate the LLM function call.\n *\n * `HttmLlm.propagate()` is a function propagating the target\n * {@link OpenApi.IOperation API endpoint} with with the connection information\n * and arguments composed by Large Language Model like OpenAI (+human\n * sometimes).\n *\n * By the way, if you've configured the\n * {@link IHttpLlmApplication.IOptions.separate}, so that the parameters are\n * separated to human and LLM sides, you have to merge these humand and LLM\n * sides' parameters into one through {@link HttpLlm.mergeParameters}\n * function.\n *\n * About the {@link IHttpLlmApplication.IOptions.keyword} option, don't worry\n * anything. This `HttmLlm.propagate()` function will automatically recognize\n * the keyword arguments and convert them to the proper sequence.\n *\n * For reference, the propagation means always returning the response from the\n * API endpoint, even if the status is not 200/201. This is useful when you\n * want to handle the response by yourself.\n *\n * @param props Properties for the LLM function call\n * @returns Response from the API endpoint\n * @throws Error only when the connection is failed\n */\n const propagate: <Model extends ILlmSchema.Model>(props: IFetchProps<Model>) => Promise<IHttpResponse>;\n /** Properties for the parameters' merging. */\n interface IMergeProps<Model extends ILlmSchema.Model> {\n /** Metadata of the target function. */\n function: ILlmFunction<Model>;\n /** Arguments composed by the LLM. */\n llm: object | null;\n /** Arguments composed by the human. */\n human: object | null;\n }\n /**\n * Merge the parameters.\n *\n * If you've configured the {@link IHttpLlmApplication.IOptions.separate}\n * option, so that the parameters are separated to human and LLM sides, you\n * can merge these humand and LLM sides' parameters into one through this\n * `HttpLlm.mergeParameters()` function before the actual LLM function call\n * wexecution.\n *\n * On contrary, if you've not configured the\n * {@link IHttpLlmApplication.IOptions.separate} option, this function would\n * throw an error.\n *\n * @param props Properties for the parameters' merging\n * @returns Merged parameter values\n */\n const mergeParameters: <Model extends ILlmSchema.Model>(props: IMergeProps<Model>) => object;\n /**\n * Merge two values.\n *\n * If both values are objects, then combines them in the properties level.\n *\n * Otherwise, returns the latter value if it's not null, otherwise the former\n * value.\n *\n * - `return (y ?? x)`\n *\n * @param x Value X to merge\n * @param y Value Y to merge\n * @returns Merged value\n */\n const mergeValue: (x: unknown, y: unknown) => unknown;\n}\n",
|
|
28
28
|
"node_modules/@samchon/openapi/lib/HttpMigration.d.ts": "import { OpenApi } from \"./OpenApi\";\nimport { OpenApiV3 } from \"./OpenApiV3\";\nimport { OpenApiV3_1 } from \"./OpenApiV3_1\";\nimport { SwaggerV2 } from \"./SwaggerV2\";\nimport { IHttpConnection } from \"./structures/IHttpConnection\";\nimport { IHttpMigrateApplication } from \"./structures/IHttpMigrateApplication\";\nimport { IHttpMigrateRoute } from \"./structures/IHttpMigrateRoute\";\nimport { IHttpResponse } from \"./structures/IHttpResponse\";\n/**\n * HTTP migration application composer from OpenAPI document.\n *\n * `HttpMigration` is a module for composing HTTP migration application from the\n * {@link OpenApi.IDocument OpenAPI document}. It is designed for helping the\n * OpenAPI generator libraries, which converts\n * {@link OpenApi.IOperation OpenAPI operations} to an RPC (Remote Procedure\n * Call) function.\n *\n * The key feature of the `HttpModule` is the {@link HttpMigration.application}\n * function. It converts the {@link OpenApi.IOperation OpenAPI operations} to the\n * {@link IHttpMigrateRoute HTTP migration route}, and it normalizes the OpenAPI\n * operations to the RPC function calling suitable route structure.\n *\n * The other functions, {@link HttpMigration.execute} and\n * {@link HttpMigration.propagate}, are for executing the HTTP request to the\n * HTTP server. The {@link HttpMigration.execute} function returns the response\n * body from the API endpoint when the status code is `200` or `201`. Otherwise,\n * it throws an {@link HttpError} when the status code is not `200` or `201`. The\n * {@link HttpMigration.propagate} function returns the response information from\n * the API endpoint, including the status code, headers, and response body.\n *\n * The {@link HttpLlm} module is a good example utilizing this `HttpMigration`\n * module for composing RPC function calling application. The {@link HttpLlm}\n * module composes LLM (Large Language Model) function calling application from\n * the OpenAPI document bypassing through the {@link IHttpLlmApplication} type.\n *\n * @author Jeongho Nam - https://github.com/samchon\n */\nexport declare namespace HttpMigration {\n /**\n * Convert HTTP migration application from OpenAPI document.\n *\n * `HttpMigration.application()` is a function converting the\n * {@link OpenApi.IDocument OpenAPI document} and its\n * {@link OpenApi.IOperation operations} to the\n * {@link IHttpMigrateApplication HTTP migration application}.\n *\n * The HTTP migration application is designed for helping the OpenAPI\n * generator libraries, which converts OpenAPI operations to an RPC (Remote\n * Procedure Call) function. To support the OpenAPI generator libraries,\n * {@link IHttpMigrateRoute} takes below normalization rules:\n *\n * - Path parameters are separated to atomic level.\n * - Query parameters are binded into one object.\n * - Header parameters are binded into one object.\n * - Allow only below HTTP methods\n *\n * - `head`\n * - `get`\n * - `post`\n * - `put`\n * - `patch`\n * - `delete`\n * - Allow only below content media types\n *\n * - `application/json`\n * - `application/x-www-form-urlencoded`\n * - `multipart/form-data`\n * - `text/plain`\n *\n * If there're some {@link OpenApi.IOperation API operations} which canont\n * adjust the above rules or there're some logically insensible, these\n * operation would be failed to migrate and registered into the\n * {@link IHttpMigrateApplication.errors}.\n *\n * @param document OpenAPI document to migrate.\n * @returns Migrated application.\n */\n const application: (document: OpenApi.IDocument | SwaggerV2.IDocument | OpenApiV3.IDocument | OpenApiV3_1.IDocument) => IHttpMigrateApplication;\n /** Properties for the request to the HTTP server. */\n interface IFetchProps {\n /** Connection info to the HTTP server. */\n connection: IHttpConnection;\n /** Route information for the migration. */\n route: IHttpMigrateRoute;\n /**\n * Path parameters.\n *\n * Path parameters with sequenced array or key-value paired object.\n */\n parameters: Array<string | number | boolean | bigint | null> | Record<string, string | number | boolean | bigint | null>;\n /** Query parameters as a key-value paired object. */\n query?: object | undefined;\n /** Request body data. */\n body?: object | undefined;\n }\n /**\n * Execute the HTTP request.\n *\n * `HttpMigration.execute()` is a function executing the HTTP request to the\n * HTTP server.\n *\n * It returns the response body from the API endpoint when the status code is\n * `200` or `201`. Otherwise, it throws an {@link HttpError} when the status\n * code is not `200` or `201`.\n *\n * If you want to get more information than the response body, or get the\n * detailed response information even when the status code is `200` or `201`,\n * use the {@link HttpMigration.propagate} function instead.\n *\n * @param props Properties for the request.\n * @returns Return value (response body) from the API endpoint.\n * @throws HttpError when the API endpoint responds none 200/201 status.\n */\n const execute: (props: IFetchProps) => Promise<unknown>;\n /**\n * Propagate the HTTP request.\n *\n * `HttpMigration.propagate()` is a function propagating the request to the\n * HTTP server.\n *\n * It returns the response information from the API endpoint, including the\n * status code, headers, and response body.\n *\n * Even if the status code is not `200` or `201`, this function would return\n * the response information. By the way, if the connection to the HTTP server\n * is failed, this function would throw an {@link Error}.\n *\n * @param props Properties for the request.\n * @returns Response from the API endpoint.\n * @throws Error when the connection is failed.\n */\n const propagate: (props: IFetchProps) => Promise<IHttpResponse>;\n}\n",
|
|
29
29
|
"node_modules/@samchon/openapi/lib/McpLlm.d.ts": "import { ILlmSchema } from \"./structures/ILlmSchema\";\nimport { IMcpLlmApplication } from \"./structures/IMcpLlmApplication\";\nimport { IMcpTool } from \"./structures/IMcpTool\";\n/**\n * Application of LLM function calling from MCP document.\n *\n * `McpLlm` is a module for composing LLM (Large Language Model) function\n * calling application from MCP (Model Context Protocol) document.\n *\n * The reasons why `@samchon/openapi` recommends to use the function calling\n * feature instead of directly using the\n * [`mcp_servers`](https://openai.github.io/openai-agents-python/mcp/#using-mcp-servers)\n * property of LLM API are:\n *\n * - Model Specification: {@link ILlmSchema}\n * - Validation Feedback: {@link IMcpLlmFunction.validate}\n * - Selector agent for reducing context: [Agentica > Orchestration\n * Strategy](https://wrtnlabs.io/agentica/docs/concepts/function-calling/#orchestration-strategy)\n *\n * @author Jeongho Nam - https://github.com/samchon\n */\nexport declare namespace McpLlm {\n /**\n * Properties for the LLM function calling application composer.\n *\n * @template Model Target LLM model\n */\n interface IApplicationProps<Model extends ILlmSchema.Model> {\n /** Target LLM model. */\n model: Model;\n /**\n * List of tools.\n *\n * A list of tools defined in the MCP (Model Context Protocol) document.\n *\n * It is better to validate the tools using the\n * [`typia.assert<T>()`](https://typia.io/docs/validate/assert) function for\n * type safety.\n */\n tools: Array<IMcpTool>;\n /** Options for the LLM function calling schema conversion. */\n options?: Partial<IMcpLlmApplication.IOptions<Model>>;\n }\n /**\n * Convert MCP document to LLM function calling application.\n *\n * Converts MCP (Model Context Protocol) to LLM (Large Language Model)\n * function calling application.\n *\n * The reasons why `@samchon/openapi` recommends using the function calling\n * feature instead of directly using the\n * [`mcp_servers`](https://openai.github.io/openai-agents-python/mcp/#using-mcp-servers)\n * property of LLM API are:\n *\n * - **Model Specification**: {@link ILlmSchema}\n * - **Validation Feedback**: {@link IMcpLlmFunction.validate}\n * - **Selector agent for reducing context**: [Agentica > Orchestration\n * Strategy](https://wrtnlabs.io/agentica/docs/concepts/function-calling/#orchestration-strategy)\n *\n * @param props Properties for composition\n * @returns LLM function calling application\n */\n const application: <Model extends ILlmSchema.Model>(props: IApplicationProps<Model>) => IMcpLlmApplication<Model>;\n}\n",
|
|
@@ -58,7 +58,7 @@ async function test(
|
|
|
58
58
|
null,
|
|
59
59
|
IAutoBeRealizeTestListener,
|
|
60
60
|
IAutoBeRealizeTestService
|
|
61
|
-
> = new WorkerConnector(null, listener, "
|
|
61
|
+
> = new WorkerConnector(null, listener, "process");
|
|
62
62
|
await worker.connect(`${cwd}/bin/test/servant.js`, {
|
|
63
63
|
stdio: "ignore",
|
|
64
64
|
cwd,
|