diff --git a/engine/generators/languages/typescript/src/lib.rs b/engine/generators/languages/typescript/src/lib.rs index 41b0f8ad9d..c82c199bd1 100644 --- a/engine/generators/languages/typescript/src/lib.rs +++ b/engine/generators/languages/typescript/src/lib.rs @@ -370,8 +370,10 @@ fn add_js_suffix_to_imports(content: &str) -> String { let path = &caps[3]; let closing_quote = &caps[4]; - // Check if it's a relative path (starts with ./ or ../) - if path.starts_with("./") || path.starts_with("../") { + let is_relative = path.starts_with("./") || path.starts_with("../"); + let is_baml_internal = path.starts_with("@boundaryml/baml/"); + + if is_relative || is_baml_internal { // Check if it already has a common JS/TS/CSS extension if !path.ends_with(".js") && !path.ends_with(".mjs") && @@ -484,6 +486,14 @@ mod tests { add_js_suffix_to_imports("import { BamlClient } from '@boundaryml/baml';"), "import { BamlClient } from '@boundaryml/baml';" ); + assert_eq!( + add_js_suffix_to_imports("import { FieldType } from '@boundaryml/baml/native';"), + "import { FieldType } from '@boundaryml/baml/native.js';" + ); + assert_eq!( + add_js_suffix_to_imports("import { TypeBuilder } from '@boundaryml/baml/type_builder';"), + "import { TypeBuilder } from '@boundaryml/baml/type_builder.js';" + ); assert_eq!( add_js_suffix_to_imports("const path = '/path/to/file.ts';"), "const path = '/path/to/file.ts';" // This is not an import/export statement diff --git a/engine/language_client_typescript/async_context_vars.d.ts b/engine/language_client_typescript/async_context_vars.d.ts index 1dc0a91f93..0ed921eb46 100644 --- a/engine/language_client_typescript/async_context_vars.d.ts +++ b/engine/language_client_typescript/async_context_vars.d.ts @@ -1,4 +1,4 @@ -import { BamlSpan, RuntimeContextManager, BamlRuntime, BamlLogEvent } from './native'; +import { BamlSpan, RuntimeContextManager, BamlRuntime, BamlLogEvent } from './native.js'; export declare class BamlCtxManager { private rt; private ctx; diff --git a/engine/language_client_typescript/async_context_vars.d.ts.map b/engine/language_client_typescript/async_context_vars.d.ts.map index a06cb76206..7dc2c3056d 100644 --- a/engine/language_client_typescript/async_context_vars.d.ts.map +++ b/engine/language_client_typescript/async_context_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 No newline at end of file +{"version":3,"file":"async_context_vars.d.ts","sourceRoot":"","sources":["typescript_src/async_context_vars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAGxF,qBAAa,cAAc;IACzB,OAAO,CAAC,EAAE,CAAa;IACvB,OAAO,CAAC,GAAG,CAA0C;gBAEzC,EAAE,EAAE,WAAW;IAS3B,WAAW,IAAI,OAAO;IAYtB,KAAK,IAAI,IAAI;IAKb,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAK9C,YAAY,IAAI,qBAAqB;IASrC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,qBAAqB,EAAE,QAAQ,CAAC;IAKvH,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAa9E,KAAK,IAAI,IAAI;IAIb,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI;IAYvE,WAAW,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAuB3F,YAAY,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;CAuBtG"} \ No newline at end of file diff --git a/engine/language_client_typescript/async_context_vars.js b/engine/language_client_typescript/async_context_vars.js index 67d39411f2..6f5ff0fd20 100644 --- a/engine/language_client_typescript/async_context_vars.js +++ b/engine/language_client_typescript/async_context_vars.js @@ -1,14 +1,11 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BamlCtxManager = void 0; -const native_1 = require("./native"); -const async_hooks_1 = require("async_hooks"); -class BamlCtxManager { +import { BamlSpan } from './native.js'; +import { AsyncLocalStorage } from 'async_hooks'; +export class BamlCtxManager { rt; ctx; constructor(rt) { this.rt = rt; - this.ctx = new async_hooks_1.AsyncLocalStorage(); + this.ctx = new AsyncLocalStorage(); this.ctx.enterWith(rt.createContextManager()); process.on('exit', () => { this.rt.flush(); @@ -25,7 +22,7 @@ class BamlCtxManager { return true; } reset() { - this.ctx = new async_hooks_1.AsyncLocalStorage(); + this.ctx = new AsyncLocalStorage(); this.ctx.enterWith(this.rt.createContextManager()); } upsertTags(tags) { @@ -42,7 +39,7 @@ class BamlCtxManager { } startTrace(name, args, envVars) { const mng = this.cloneContext(); - return [mng, native_1.BamlSpan.new(this.rt, name, args, mng, envVars)]; + return [mng, BamlSpan.new(this.rt, name, args, mng, envVars)]; } endTrace(span, response, envVars) { const manager = this.ctx.getStore(); @@ -113,4 +110,3 @@ class BamlCtxManager { }); } } -exports.BamlCtxManager = BamlCtxManager; diff --git a/engine/language_client_typescript/audio.js b/engine/language_client_typescript/audio.js index 291b680165..3aa789d229 100644 --- a/engine/language_client_typescript/audio.js +++ b/engine/language_client_typescript/audio.js @@ -1,10 +1,7 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BamlAudio = void 0; /** * Browser-compatible implementation of BamlAudio */ -class BamlAudio { +export class BamlAudio { type; content; mediaType; @@ -93,4 +90,3 @@ class BamlAudio { }; } } -exports.BamlAudio = BamlAudio; diff --git a/engine/language_client_typescript/browser.d.ts b/engine/language_client_typescript/browser.d.ts index 92bca0f3dc..8cafb57aef 100644 --- a/engine/language_client_typescript/browser.d.ts +++ b/engine/language_client_typescript/browser.d.ts @@ -10,14 +10,14 @@ * import { Image, Audio } from '@boundaryml/baml' * ``` */ -import { BamlAudio } from "./audio"; -import { BamlImage } from "./image"; -import { BamlVideo } from "./video"; -import { BamlPdf } from "./pdf"; -import type { BamlAudio as BamlAudioType } from "./audio"; -import type { BamlImage as BamlImageType } from "./image"; -import type { BamlPdf as BamlPdfType } from "./pdf"; -import type { BamlVideo as BamlVideoType } from "./video"; +import { BamlAudio } from "./audio.js"; +import { BamlImage } from "./image.js"; +import { BamlVideo } from "./video.js"; +import { BamlPdf } from "./pdf.js"; +import type { BamlAudio as BamlAudioType } from "./audio.js"; +import type { BamlImage as BamlImageType } from "./image.js"; +import type { BamlPdf as BamlPdfType } from "./pdf.js"; +import type { BamlVideo as BamlVideoType } from "./video.js"; declare const ImageImpl: typeof BamlImage; declare const AudioImpl: typeof BamlAudio; declare const PdfImpl: typeof BamlPdf; diff --git a/engine/language_client_typescript/browser.d.ts.map b/engine/language_client_typescript/browser.d.ts.map index 24bfa9ff35..9bb0dcfca5 100644 --- a/engine/language_client_typescript/browser.d.ts.map +++ b/engine/language_client_typescript/browser.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["typescript_src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM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AIF,MAAM,MAAM,KAAK,GAAG,aAAa,CAAC;AAClC,MAAM,MAAM,KAAK,GAAG,aAAa,CAAC;AAClC,MAAM,MAAM,GAAG,GAAG,WAAW,CAAC;AAC9B,MAAM,MAAM,KAAK,GAAG,aAAa,CAAC;AAGlC,OAAO,EACL,SAAS,IAAI,KAAK,EAClB,SAAS,IAAI,KAAK,EAClB,OAAO,IAAI,GAAG,EACd,SAAS,IAAI,KAAK,GACnB,CAAC"} \ No newline at end of file diff --git a/engine/language_client_typescript/browser.js b/engine/language_client_typescript/browser.js index 4a47100687..7de7bcc25c 100644 --- a/engine/language_client_typescript/browser.js +++ b/engine/language_client_typescript/browser.js @@ -1,4 +1,3 @@ -"use strict"; /** * @warning This file is intended for browser usage only. * For Node.js environments, import Image and Audio directly from '@boundaryml/baml'. @@ -11,13 +10,11 @@ * import { Image, Audio } from '@boundaryml/baml' * ``` */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Video = exports.Pdf = exports.Audio = exports.Image = void 0; // Import actual implementations -const audio_1 = require("./audio"); -const image_1 = require("./image"); -const video_1 = require("./video"); -const pdf_1 = require("./pdf"); +import { BamlAudio } from "./audio.js"; +import { BamlImage } from "./image.js"; +import { BamlVideo } from "./video.js"; +import { BamlPdf } from "./pdf.js"; // Detect if we're in server-side rendering environment const isSSR = typeof window === "undefined"; // Create a proxy handler that logs warnings in SSR environment @@ -32,11 +29,9 @@ function createSSRProxyHandler(name) { }; } // Create proxied versions that will work in both environments but warn in SSR -const ImageImpl = new Proxy(image_1.BamlImage, createSSRProxyHandler("Image")); -exports.Image = ImageImpl; -const AudioImpl = new Proxy(audio_1.BamlAudio, createSSRProxyHandler("Audio")); -exports.Audio = AudioImpl; -const PdfImpl = new Proxy(pdf_1.BamlPdf, createSSRProxyHandler("Pdf")); -exports.Pdf = PdfImpl; -const VideoImpl = new Proxy(video_1.BamlVideo, createSSRProxyHandler("Video")); -exports.Video = VideoImpl; +const ImageImpl = new Proxy(BamlImage, createSSRProxyHandler("Image")); +const AudioImpl = new Proxy(BamlAudio, createSSRProxyHandler("Audio")); +const PdfImpl = new Proxy(BamlPdf, createSSRProxyHandler("Pdf")); +const VideoImpl = new Proxy(BamlVideo, createSSRProxyHandler("Video")); +// Then export the implementations +export { ImageImpl as Image, AudioImpl as Audio, PdfImpl as Pdf, VideoImpl as Video, }; diff --git a/engine/language_client_typescript/cli.js b/engine/language_client_typescript/cli.js index 713c64d0a4..393939dab5 100755 --- a/engine/language_client_typescript/cli.js +++ b/engine/language_client_typescript/cli.js @@ -1,10 +1,14 @@ #!/usr/bin/env node -if (require.main === module) { - if (!process.env.BAML_LOG) { - process.env.BAML_LOG = 'info' - } +import { invoke_runtime_cli } from './native.js' - const baml = require('./native') - baml.invoke_runtime_cli(process.argv.slice(1)) +if (!process.env.BAML_LOG) { + process.env.BAML_LOG = 'info' +} + +try { + await invoke_runtime_cli(process.argv.slice(1)) +} catch (error) { + console.error(error) + process.exitCode = 1 } diff --git a/engine/language_client_typescript/errors.js b/engine/language_client_typescript/errors.js index 695d891c93..49bb7acec5 100644 --- a/engine/language_client_typescript/errors.js +++ b/engine/language_client_typescript/errors.js @@ -1,10 +1,5 @@ -"use strict"; // NOTE: Don't take a dependency on ./native here, it will break the browser code -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BamlAbortError = exports.BamlClientHttpError = exports.BamlValidationError = exports.BamlClientFinishReasonError = void 0; -exports.isBamlError = isBamlError; -exports.toBamlError = toBamlError; -class BamlClientFinishReasonError extends Error { +export class BamlClientFinishReasonError extends Error { prompt; raw_output; finish_reason; @@ -43,8 +38,7 @@ class BamlClientFinishReasonError extends Error { return undefined; } } -exports.BamlClientFinishReasonError = BamlClientFinishReasonError; -class BamlValidationError extends Error { +export class BamlValidationError extends Error { prompt; raw_output; detailed_message; @@ -80,8 +74,7 @@ class BamlValidationError extends Error { return undefined; } } -exports.BamlValidationError = BamlValidationError; -class BamlClientHttpError extends Error { +export class BamlClientHttpError extends Error { client_name; status_code; detailed_message; @@ -117,8 +110,7 @@ class BamlClientHttpError extends Error { return undefined; } } -exports.BamlClientHttpError = BamlClientHttpError; -class BamlAbortError extends Error { +export class BamlAbortError extends Error { reason; detailed_message; constructor(message, reason, detailed_message = '') { @@ -143,7 +135,6 @@ class BamlAbortError extends Error { return undefined; } } -exports.BamlAbortError = BamlAbortError; function isError(error) { if (typeof error === 'string') { return false; @@ -180,7 +171,7 @@ function createBamlErrorUnsafe(error) { // otherwise return the original error return error; } -function isBamlError(error) { +export function isBamlError(error) { if (error.type === 'BamlClientHttpError' || error.type === 'BamlValidationError' || error.type === 'BamlClientFinishReasonError' || @@ -198,7 +189,7 @@ function isBamlError(error) { error instanceof BamlClientFinishReasonError || error instanceof BamlAbortError); } -function toBamlError(error) { +export function toBamlError(error) { try { if (isBamlError(error)) { return error; diff --git a/engine/language_client_typescript/image.js b/engine/language_client_typescript/image.js index c703b7ed0c..92ac555f67 100644 --- a/engine/language_client_typescript/image.js +++ b/engine/language_client_typescript/image.js @@ -1,10 +1,7 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BamlImage = void 0; /** * Browser-compatible implementation of BamlImage */ -class BamlImage { +export class BamlImage { type; content; mediaType; @@ -93,4 +90,3 @@ class BamlImage { }; } } -exports.BamlImage = BamlImage; diff --git a/engine/language_client_typescript/index.d.ts b/engine/language_client_typescript/index.d.ts index 2ef878282c..76de03bfbe 100644 --- a/engine/language_client_typescript/index.d.ts +++ b/engine/language_client_typescript/index.d.ts @@ -1,7 +1,16 @@ -export * from './safe_imports'; -export * from './errors'; -export * from './logging'; -export { BamlRuntime, FunctionResult, FunctionResultStream, BamlImage as Image, BamlAudio as Audio, BamlPdf as Pdf, BamlVideo as Video, invoke_runtime_cli, ClientRegistry, BamlLogEvent, Collector, FunctionLog, LlmCall, LlmStreamCall, Usage, HTTPRequest, HTTPResponse, SSEResponse, StreamTiming, Timing, TraceStats, } from './native'; -export { BamlStream } from './stream'; -export { BamlCtxManager } from './async_context_vars'; +export * from './safe_imports.js'; +export * from './errors.js'; +export * from './logging.js'; +export { BamlRuntime, FunctionResult, FunctionResultStream, invoke_runtime_cli, ClientRegistry, BamlLogEvent, Collector, FunctionLog, LlmCall, LlmStreamCall, Usage, HttpRequest as HTTPRequest, HttpResponse as HTTPResponse, SseResponse as SSEResponse, StreamTiming, Timing, TraceStats, } from './native.js'; +export { BamlStream } from './stream.js'; +export { BamlCtxManager } from './async_context_vars.js'; +import { BamlAudio, BamlImage, BamlPdf, BamlVideo } from './native.js'; +export declare const Image: typeof BamlImage; +export declare const Audio: typeof BamlAudio; +export declare const Pdf: typeof BamlPdf; +export declare const Video: typeof BamlVideo; +export type Image = BamlImage; +export type Audio = BamlAudio; +export type Pdf = BamlPdf; +export type Video = BamlVideo; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/engine/language_client_typescript/index.d.ts.map b/engine/language_client_typescript/index.d.ts.map index 83602fa6db..06d37b3979 100644 --- a/engine/language_client_typescript/index.d.ts.map +++ b/engine/language_client_typescript/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["typescript_src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAE9B,cAAc,UAAU,CAAA;AAExB,cAAc,WAAW,CAAA;AAmCzB,OAAO,EACL,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,SAAS,IAAI,KAAK,EAClB,SAAS,IAAI,KAAK,EAClB,OAAO,IAAI,GAAG,EACd,SAAS,IAAI,KAAK,EAClB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,WAAW,EACX,OAAO,EACP,aAAa,EACb,KAAK,EACL,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,MAAM,EACN,UAAU,GACX,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["typescript_src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AAEjC,cAAc,aAAa,CAAA;AAE3B,cAAc,cAAc,CAAA;AAE5B,OAAO,EACL,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,WAAW,EACX,OAAO,EACP,aAAa,EACb,KAAK,EACL,WAAW,IAAI,WAAW,EAC1B,YAAY,IAAI,YAAY,EAC5B,WAAW,IAAI,WAAW,EAC1B,YAAY,EACZ,MAAM,EACN,UAAU,GACX,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AA+BtE,eAAO,MAAM,KAAK,kBAAyC,CAAA;AAC3D,eAAO,MAAM,KAAK,kBAAyC,CAAA;AAC3D,eAAO,MAAM,GAAG,gBAAqC,CAAA;AACrD,eAAO,MAAM,KAAK,kBAAyC,CAAA;AAE3D,MAAM,MAAM,KAAK,GAAG,SAAS,CAAA;AAC7B,MAAM,MAAM,KAAK,GAAG,SAAS,CAAA;AAC7B,MAAM,MAAM,GAAG,GAAG,OAAO,CAAA;AACzB,MAAM,MAAM,KAAK,GAAG,SAAS,CAAA"} \ No newline at end of file diff --git a/engine/language_client_typescript/index.js b/engine/language_client_typescript/index.js index 061cc410f1..04a00885c0 100644 --- a/engine/language_client_typescript/index.js +++ b/engine/language_client_typescript/index.js @@ -1,70 +1,33 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; +export * from './safe_imports.js'; +export * from './errors.js'; +export * from './logging.js'; +export { BamlRuntime, FunctionResult, FunctionResultStream, invoke_runtime_cli, ClientRegistry, Collector, FunctionLog, LlmCall, LlmStreamCall, Usage, HttpRequest as HTTPRequest, HttpResponse as HTTPResponse, SseResponse as SSEResponse, StreamTiming, Timing, TraceStats, } from './native.js'; +export { BamlStream } from './stream.js'; +export { BamlCtxManager } from './async_context_vars.js'; +import { BamlAudio, BamlImage, BamlPdf, BamlVideo } from './native.js'; +const isNode = typeof process !== 'undefined' && !!process.versions?.node; +const browserErrorMessage = (name) => `Cannot import ${name} from '@boundaryml/baml' in browser environment. Please import from '@boundaryml/baml/browser' instead.`; +function createBrowserGuard(name, target) { + if (isNode) { + return target; } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BamlCtxManager = exports.BamlStream = exports.TraceStats = exports.Timing = exports.StreamTiming = exports.SSEResponse = exports.HTTPResponse = exports.HTTPRequest = exports.Usage = exports.LlmStreamCall = exports.LlmCall = exports.FunctionLog = exports.Collector = exports.BamlLogEvent = exports.ClientRegistry = exports.invoke_runtime_cli = exports.Video = exports.Pdf = exports.Audio = exports.Image = exports.FunctionResultStream = exports.FunctionResult = exports.BamlRuntime = void 0; -__exportStar(require("./safe_imports"), exports); -__exportStar(require("./errors"), exports); -__exportStar(require("./logging"), exports); -// Detect if we're in a Node.js environment -const isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null; -if (!isNode) { - const browserError = (name) => { - throw new Error(`Cannot import ${name} from '@boundaryml/baml' in browser environment. Please import from '@boundaryml/baml/browser' instead.`); + const throwBrowserError = () => { + throw new Error(browserErrorMessage(name)); }; - // Provide helpful error messages for browser imports - Object.defineProperty(exports, 'Image', { - get: () => browserError('Image'), - enumerable: true, - }); - Object.defineProperty(exports, 'Audio', { - get: () => browserError('Audio'), - enumerable: true, - }); - Object.defineProperty(exports, 'Pdf', { - get: () => browserError('Pdf'), - enumerable: true, - }); - Object.defineProperty(exports, 'Video', { - get: () => browserError('Video'), - enumerable: true, - }); + const handler = { + get() { + return throwBrowserError(); + }, + apply() { + return throwBrowserError(); + }, + construct() { + return throwBrowserError(); + }, + }; + return new Proxy(target, handler); } -var native_1 = require("./native"); -Object.defineProperty(exports, "BamlRuntime", { enumerable: true, get: function () { return native_1.BamlRuntime; } }); -Object.defineProperty(exports, "FunctionResult", { enumerable: true, get: function () { return native_1.FunctionResult; } }); -Object.defineProperty(exports, "FunctionResultStream", { enumerable: true, get: function () { return native_1.FunctionResultStream; } }); -Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return native_1.BamlImage; } }); -Object.defineProperty(exports, "Audio", { enumerable: true, get: function () { return native_1.BamlAudio; } }); -Object.defineProperty(exports, "Pdf", { enumerable: true, get: function () { return native_1.BamlPdf; } }); -Object.defineProperty(exports, "Video", { enumerable: true, get: function () { return native_1.BamlVideo; } }); -Object.defineProperty(exports, "invoke_runtime_cli", { enumerable: true, get: function () { return native_1.invoke_runtime_cli; } }); -Object.defineProperty(exports, "ClientRegistry", { enumerable: true, get: function () { return native_1.ClientRegistry; } }); -Object.defineProperty(exports, "BamlLogEvent", { enumerable: true, get: function () { return native_1.BamlLogEvent; } }); -Object.defineProperty(exports, "Collector", { enumerable: true, get: function () { return native_1.Collector; } }); -Object.defineProperty(exports, "FunctionLog", { enumerable: true, get: function () { return native_1.FunctionLog; } }); -Object.defineProperty(exports, "LlmCall", { enumerable: true, get: function () { return native_1.LlmCall; } }); -Object.defineProperty(exports, "LlmStreamCall", { enumerable: true, get: function () { return native_1.LlmStreamCall; } }); -Object.defineProperty(exports, "Usage", { enumerable: true, get: function () { return native_1.Usage; } }); -Object.defineProperty(exports, "HTTPRequest", { enumerable: true, get: function () { return native_1.HTTPRequest; } }); -Object.defineProperty(exports, "HTTPResponse", { enumerable: true, get: function () { return native_1.HTTPResponse; } }); -Object.defineProperty(exports, "SSEResponse", { enumerable: true, get: function () { return native_1.SSEResponse; } }); -Object.defineProperty(exports, "StreamTiming", { enumerable: true, get: function () { return native_1.StreamTiming; } }); -Object.defineProperty(exports, "Timing", { enumerable: true, get: function () { return native_1.Timing; } }); -Object.defineProperty(exports, "TraceStats", { enumerable: true, get: function () { return native_1.TraceStats; } }); -var stream_1 = require("./stream"); -Object.defineProperty(exports, "BamlStream", { enumerable: true, get: function () { return stream_1.BamlStream; } }); -var async_context_vars_1 = require("./async_context_vars"); -Object.defineProperty(exports, "BamlCtxManager", { enumerable: true, get: function () { return async_context_vars_1.BamlCtxManager; } }); +export const Image = createBrowserGuard('Image', BamlImage); +export const Audio = createBrowserGuard('Audio', BamlAudio); +export const Pdf = createBrowserGuard('Pdf', BamlPdf); +export const Video = createBrowserGuard('Video', BamlVideo); diff --git a/engine/language_client_typescript/logging.d.ts b/engine/language_client_typescript/logging.d.ts index 0b3984d780..1605e53ac4 100644 --- a/engine/language_client_typescript/logging.d.ts +++ b/engine/language_client_typescript/logging.d.ts @@ -1,2 +1,2 @@ -export { setLogLevel, getLogLevel, setLogJsonMode, setLogMaxChunkLength } from './native'; +export { setLogLevel, getLogLevel, setLogJsonMode, setLogMaxChunkLength } from './native.js'; //# sourceMappingURL=logging.d.ts.map \ No newline at end of file diff --git a/engine/language_client_typescript/logging.d.ts.map b/engine/language_client_typescript/logging.d.ts.map index d770f421bd..99b8f7163d 100644 --- a/engine/language_client_typescript/logging.d.ts.map +++ b/engine/language_client_typescript/logging.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["typescript_src/logging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA"} \ No newline at end of file +{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["typescript_src/logging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA"} \ No newline at end of file diff --git a/engine/language_client_typescript/logging.js b/engine/language_client_typescript/logging.js index 90d681999e..a61bea2d1c 100644 --- a/engine/language_client_typescript/logging.js +++ b/engine/language_client_typescript/logging.js @@ -1,8 +1 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setLogMaxChunkLength = exports.setLogJsonMode = exports.getLogLevel = exports.setLogLevel = void 0; -var native_1 = require("./native"); -Object.defineProperty(exports, "setLogLevel", { enumerable: true, get: function () { return native_1.setLogLevel; } }); -Object.defineProperty(exports, "getLogLevel", { enumerable: true, get: function () { return native_1.getLogLevel; } }); -Object.defineProperty(exports, "setLogJsonMode", { enumerable: true, get: function () { return native_1.setLogJsonMode; } }); -Object.defineProperty(exports, "setLogMaxChunkLength", { enumerable: true, get: function () { return native_1.setLogMaxChunkLength; } }); +export { setLogLevel, getLogLevel, setLogJsonMode, setLogMaxChunkLength } from './native.js'; diff --git a/engine/language_client_typescript/native.js b/engine/language_client_typescript/native.js index 6a0be1cf8f..8d0bd69c44 100644 --- a/engine/language_client_typescript/native.js +++ b/engine/language_client_typescript/native.js @@ -3,8 +3,9 @@ // @ts-nocheck /* auto-generated by NAPI-RS */ -const { createRequire } = require('node:module') -require = createRequire(__filename) +import { createRequire } from 'node:module' +const require = createRequire(import.meta.url) +const __dirname = new URL('.', import.meta.url).pathname const { readFileSync } = require('node:fs') let nativeBinding = null @@ -392,44 +393,44 @@ if (!nativeBinding) { throw new Error(`Failed to load native binding`) } -module.exports = nativeBinding -module.exports.BamlAudio = nativeBinding.BamlAudio -module.exports.BamlImage = nativeBinding.BamlImage -module.exports.BamlPdf = nativeBinding.BamlPdf -module.exports.BamlRuntime = nativeBinding.BamlRuntime -module.exports.BamlSpan = nativeBinding.BamlSpan -module.exports.BamlVideo = nativeBinding.BamlVideo -module.exports.ClassBuilder = nativeBinding.ClassBuilder -module.exports.ClassPropertyBuilder = nativeBinding.ClassPropertyBuilder -module.exports.ClientRegistry = nativeBinding.ClientRegistry -module.exports.Collector = nativeBinding.Collector -module.exports.EnumBuilder = nativeBinding.EnumBuilder -module.exports.EnumValueBuilder = nativeBinding.EnumValueBuilder -module.exports.FieldType = nativeBinding.FieldType -module.exports.FunctionLog = nativeBinding.FunctionLog -module.exports.FunctionResult = nativeBinding.FunctionResult -module.exports.FunctionResultStream = nativeBinding.FunctionResultStream -module.exports.HttpBody = nativeBinding.HttpBody -module.exports.HTTPBody = nativeBinding.HTTPBody -module.exports.HttpRequest = nativeBinding.HttpRequest -module.exports.HTTPRequest = nativeBinding.HTTPRequest -module.exports.HttpResponse = nativeBinding.HttpResponse -module.exports.HTTPResponse = nativeBinding.HTTPResponse -module.exports.LlmCall = nativeBinding.LlmCall -module.exports.LLMCall = nativeBinding.LLMCall -module.exports.LlmStreamCall = nativeBinding.LlmStreamCall -module.exports.LLMStreamCall = nativeBinding.LLMStreamCall -module.exports.RuntimeContextManager = nativeBinding.RuntimeContextManager -module.exports.SseResponse = nativeBinding.SseResponse -module.exports.SSEResponse = nativeBinding.SSEResponse -module.exports.StreamTiming = nativeBinding.StreamTiming -module.exports.Timing = nativeBinding.Timing -module.exports.TraceStats = nativeBinding.TraceStats -module.exports.TypeBuilder = nativeBinding.TypeBuilder -module.exports.Usage = nativeBinding.Usage -module.exports.get_version = nativeBinding.get_version -module.exports.getLogLevel = nativeBinding.getLogLevel -module.exports.invoke_runtime_cli = nativeBinding.invoke_runtime_cli -module.exports.setLogJsonMode = nativeBinding.setLogJsonMode -module.exports.setLogLevel = nativeBinding.setLogLevel -module.exports.setLogMaxChunkLength = nativeBinding.setLogMaxChunkLength +const { BamlAudio, BamlImage, BamlPdf, BamlRuntime, BamlSpan, BamlVideo, ClassBuilder, ClassPropertyBuilder, ClientRegistry, Collector, EnumBuilder, EnumValueBuilder, FieldType, FunctionLog, FunctionResult, FunctionResultStream, HttpBody, HTTPBody, HttpRequest, HTTPRequest, HttpResponse, HTTPResponse, LlmCall, LLMCall, LlmStreamCall, LLMStreamCall, RuntimeContextManager, SseResponse, SSEResponse, StreamTiming, Timing, TraceStats, TypeBuilder, Usage, get_version, getLogLevel, invoke_runtime_cli, setLogJsonMode, setLogLevel, setLogMaxChunkLength } = nativeBinding +export { BamlAudio } +export { BamlImage } +export { BamlPdf } +export { BamlRuntime } +export { BamlSpan } +export { BamlVideo } +export { ClassBuilder } +export { ClassPropertyBuilder } +export { ClientRegistry } +export { Collector } +export { EnumBuilder } +export { EnumValueBuilder } +export { FieldType } +export { FunctionLog } +export { FunctionResult } +export { FunctionResultStream } +export { HttpBody } +export { HTTPBody } +export { HttpRequest } +export { HTTPRequest } +export { HttpResponse } +export { HTTPResponse } +export { LlmCall } +export { LLMCall } +export { LlmStreamCall } +export { LLMStreamCall } +export { RuntimeContextManager } +export { SseResponse } +export { SSEResponse } +export { StreamTiming } +export { Timing } +export { TraceStats } +export { TypeBuilder } +export { Usage } +export { get_version } +export { getLogLevel } +export { invoke_runtime_cli } +export { setLogJsonMode } +export { setLogLevel } +export { setLogMaxChunkLength } diff --git a/engine/language_client_typescript/package.json b/engine/language_client_typescript/package.json index 5ed4d4af4c..5aeb7fefd5 100644 --- a/engine/language_client_typescript/package.json +++ b/engine/language_client_typescript/package.json @@ -44,12 +44,30 @@ "main": "./index.js", "types": "./index.d.ts", "exports": { - ".": "./index.js", - "./native": "./native.js", - "./type_builder": "./type_builder.js", - "./errors": "./errors.js", - "./browser": "./browser.js", - "./logging": "./logging.js" + ".": { + "types": "./index.d.ts", + "import": "./index.js" + }, + "./native": { + "types": "./native.d.ts", + "import": "./native.js" + }, + "./type_builder": { + "types": "./type_builder.d.ts", + "import": "./type_builder.js" + }, + "./errors": { + "types": "./errors.d.ts", + "import": "./errors.js" + }, + "./browser": { + "types": "./browser.d.ts", + "import": "./browser.js" + }, + "./logging": { + "types": "./logging.d.ts", + "import": "./logging.js" + } }, "napi": { "binaryName": "baml", @@ -76,11 +94,11 @@ "release": "pnpm build:napi-release && pnpm build:ts_build", "build:debug": "pnpm build:napi-debug && pnpm build:ts_build", "build:napi-release": "pnpm build:napi-debug --release", - "build:napi-debug": "napi build --js ./native.js --dts ./native.d.ts --platform", - "build:ts_build": "tsc ./typescript_src/*.ts --outDir ./ --module nodenext --module nodenext --allowJs --declaration true --declarationMap true || true && pnpm build:ts_build_local", + "build:napi-debug": "napi build --js ./native.js --esm --dts ./native.d.ts --platform", + "build:ts_build": "(tsc --project ./tsconfig.build.json --outDir ./ || true) && pnpm build:ts_build_local", "build:local": "pnpm build:debug && pnpm napi create-npm-dirs && pnpm artifacts", - "build:napi-debug-local": "napi build -o ./artifacts --js ./native.js --dts ./native.d.ts --platform", - "build:ts_build_local": "tsc ./typescript_src/*.ts --outDir ./artifacts --module nodenext --module nodenext --allowJs --declaration true --declarationMap true || true", + "build:napi-debug-local": "napi build -o ./artifacts --js ./native.js --dts ./native.d.ts --esm --platform", + "build:ts_build_local": "tsc --project ./tsconfig.build.json --outDir ./artifacts || true", "prepublishOnly": "napi create-npm-dirs && pnpm artifacts && napi prepublish --no-gh-release", "test": "jest --config jest.config.js", "version": "napi version", @@ -111,10 +129,16 @@ "jest": { "preset": "ts-jest", "testEnvironment": "node", - "moduleFileExtensions": ["ts", "js"], + "moduleFileExtensions": [ + "ts", + "js" + ], "transform": { "^.+\\.ts$": "ts-jest" }, - "testMatch": ["**/__test__/**/*.test.ts"] - } + "testMatch": [ + "**/__test__/**/*.test.ts" + ] + }, + "type": "module" } diff --git a/engine/language_client_typescript/pdf.js b/engine/language_client_typescript/pdf.js index fbced7a288..f0191b20d1 100644 --- a/engine/language_client_typescript/pdf.js +++ b/engine/language_client_typescript/pdf.js @@ -1,10 +1,7 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BamlPdf = void 0; /** * Browser-compatible implementation of BamlPdf */ -class BamlPdf { +export class BamlPdf { type; content; mediaType; @@ -93,4 +90,3 @@ class BamlPdf { }; } } -exports.BamlPdf = BamlPdf; diff --git a/engine/language_client_typescript/safe_imports.js b/engine/language_client_typescript/safe_imports.js index efa4a34cc7..00a4a503c7 100644 --- a/engine/language_client_typescript/safe_imports.js +++ b/engine/language_client_typescript/safe_imports.js @@ -1,7 +1,4 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ThrowIfVersionMismatch = ThrowIfVersionMismatch; -const native_1 = require("./native"); +import { get_version } from "./native.js"; function ensureVersionCompatibility(generatedVersion, runtimeVersion) { try { const [genMajor, genMinor] = generatedVersion.split(".").slice(0, 2); @@ -12,8 +9,8 @@ function ensureVersionCompatibility(generatedVersion, runtimeVersion) { return false; // Error parsing versions, assume incompatible } } -function ThrowIfVersionMismatch(generatedVersion) { - const runtimeVersion = (0, native_1.get_version)(); +export function ThrowIfVersionMismatch(generatedVersion) { + const runtimeVersion = get_version(); if (!ensureVersionCompatibility(generatedVersion, runtimeVersion)) { const errorMessage = `Update to @boundaryml/baml required. Version from generators.baml: ${generatedVersion} diff --git a/engine/language_client_typescript/stream.d.ts b/engine/language_client_typescript/stream.d.ts index 16d0e2692a..3acd8c34dd 100644 --- a/engine/language_client_typescript/stream.d.ts +++ b/engine/language_client_typescript/stream.d.ts @@ -1,4 +1,4 @@ -import type { FunctionResultStream, RuntimeContextManager } from "../native"; +import type { FunctionResultStream, RuntimeContextManager } from "../native.js"; export declare class BamlStream { private ffiStream; private partialCoerce; diff --git a/engine/language_client_typescript/stream.d.ts.map b/engine/language_client_typescript/stream.d.ts.map index bca96e1153..cbc19a6342 100644 --- a/engine/language_client_typescript/stream.d.ts.map +++ b/engine/language_client_typescript/stream.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["typescript_src/stream.ts"],"names":[],"mappings":"AACA,OAAO,K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,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,iBAAiB,EACjD,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,eAAe,EAC7C,UAAU,EAAE,qBAAqB,EACzC,WAAW,CAAC,EAAE,WAAW;YAYb,iBAAiB;IAyC/B,OAAO,CAAC,qBAAqB;IAQtB,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,iBAAiB,CAAC;IA8BnE,gBAAgB,IAAI,OAAO,CAAC,eAAe,CAAC;IAMlD;;;;;;;OAOG;IACH,YAAY,IAAI,cAAc,CAAC,UAAU,CAAC;CA8C3C"} \ No newline at end of file diff --git a/engine/language_client_typescript/stream.js b/engine/language_client_typescript/stream.js index 6a1fc800bb..1ab2cbc055 100644 --- a/engine/language_client_typescript/stream.js +++ b/engine/language_client_typescript/stream.js @@ -1,8 +1,5 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BamlStream = void 0; -const errors_1 = require("./errors"); -class BamlStream { +import { toBamlError, BamlAbortError } from "./errors.js"; +export class BamlStream { ffiStream; partialCoerce; finalCoerce; @@ -28,7 +25,7 @@ class BamlStream { try { // Check for early abort if (this.abortSignal?.aborted) { - throw new errors_1.BamlAbortError("Operation was aborted", this.abortSignal.reason); + throw new BamlAbortError("Operation was aborted", this.abortSignal.reason); } this.ffiStream.onEvent((err, data) => { if (err) { @@ -45,7 +42,7 @@ class BamlStream { return retval; } catch (error) { - if (error instanceof errors_1.BamlAbortError) { + if (error instanceof BamlAbortError) { this.error = error; this.eventQueue.push(null); } @@ -115,7 +112,7 @@ class BamlStream { return; } catch (err) { - const bamlError = (0, errors_1.toBamlError)(err instanceof Error ? err : new Error(String(err))); + const bamlError = toBamlError(err instanceof Error ? err : new Error(String(err))); controller.enqueue(encoder.encode(JSON.stringify({ error: bamlError }))); controller.close(); return; @@ -137,4 +134,3 @@ class BamlStream { }); } } -exports.BamlStream = BamlStream; diff --git a/engine/language_client_typescript/tsconfig.build.json b/engine/language_client_typescript/tsconfig.build.json new file mode 100644 index 0000000000..0eb8d96c71 --- /dev/null +++ b/engine/language_client_typescript/tsconfig.build.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "nodenext", + "moduleResolution": "nodenext", + "target": "es2022", + "rootDir": "./typescript_src", + "outDir": "./", + "allowJs": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true + }, + "include": [ + "./typescript_src/**/*.ts", + "./typescript_src/**/*.d.ts" + ], + "exclude": [] +} diff --git a/engine/language_client_typescript/type_builder.d.ts b/engine/language_client_typescript/type_builder.d.ts index 015bb3d8e4..c81cf7e54c 100644 --- a/engine/language_client_typescript/type_builder.d.ts +++ b/engine/language_client_typescript/type_builder.d.ts @@ -1,4 +1,4 @@ -import { ClassBuilder as _ClassBuilder, EnumBuilder as _EnumBuilder, ClassPropertyBuilder as _ClassPropertyBuilder, EnumValueBuilder, FieldType, TypeBuilder as _TypeBuilder, BamlRuntime } from './native'; +import { ClassBuilder as _ClassBuilder, EnumBuilder as _EnumBuilder, ClassPropertyBuilder as _ClassPropertyBuilder, EnumValueBuilder, FieldType, TypeBuilder as _TypeBuilder, BamlRuntime } from './native.js'; type IsLiteral = string extends T ? false : true; type NameOf = IsLiteral extends true ? T : 'DynamicType'; type CheckNever = [T] extends [never] ? `Error: Attempt to add value '${Value}' which is already a part of '${NameOf}'.` : T; @@ -35,19 +35,20 @@ export declare class TypeBuilder { addEnum(name: Name): EnumBuilder; addBaml(baml: string): void; } -export declare class ClassAst { +export declare class ClassAst> { protected properties: Set; protected bldr: _ClassBuilder; constructor(tb: _TypeBuilder, name: ClassName, properties?: Set); - listProperties(): Record; + protected rawProperties(): Record; + listProperties(): ListReturn; type(): FieldType; } -export declare class ClassViewer extends ClassAst { +export declare class ClassViewer extends ClassAst> { constructor(tb: _TypeBuilder, name: ClassName, properties?: Set); listProperties(): Array<[string, ClassPropertyViewer]>; property(name: string): ClassPropertyViewer; } -export declare class ClassBuilder extends ClassAst { +export declare class ClassBuilder extends ClassAst> { constructor(tb: _TypeBuilder, name: ClassName, properties?: Set); addProperty(name: RestrictNot, type: FieldType): ClassPropertyBuilder; listProperties(): Array<[string, ClassPropertyBuilder]>; diff --git a/engine/language_client_typescript/type_builder.d.ts.map b/engine/language_client_typescript/type_builder.d.ts.map index 7741558e30..18590ccd4e 100644 --- a/engine/language_client_typescript/type_builder.d.ts.map +++ b/engine/language_client_typescript/type_builder.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"type_builder.d.ts","sourceRoot":"","sources":["typescript_src/type_builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,IAAI,aAAa,EAC7B,WAAW,IAAI,YAAY,EAC3B,oBAAoB,IAAI,qBAAqB,EAC7C,gBAAgB,EAChB,SAAS,EACT,WAAW,IAAI,YAAY,EAC3B,WAAW,EACZ,MAAM,UAAU,CAAA;AAEjB,KAAK,SAAS,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,SAAS,CAAC,GAAG,KAAK,GAAG,IAAI,CAAA;AAClE,KAAK,MAAM,CAAC,CAAC,SAAS,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,aAAa,CAAA;AAC7E,KAAK,UAAU,CAAC,CAAC,EAAE,QAAQ,SAAS,MAAM,EAAE,KAAK,SAAS,MAAM,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACnF,gCAAgC,KAAK,iCAAiC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAC1F,CAAC,CAAA;AACL,KAAK,WAAW,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,KAAK,GAAG,CAAC,CAAA;AAChD,KAAK,WAAW,CAAC,IAAI,SAAS,MAAM,EAAE,KAAK,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,IAAI,SAAS,CAAC,CAAC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AE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CAAa;IAIjF,UAAU,IAAI,KAAK,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAI9C,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe;CAMrC;AAED,qBAAa,eAAe;;CAE3B;AAED,qBAAa,WAAW,CAAC,QAAQ,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAC3F,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CAAa;IAIjF,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,gBAAgB;IAQ/E,UAAU,IAAI,KAAK,CAAC,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAI/C,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;CAGtC"} \ No newline at end of file diff --git a/engine/language_client_typescript/type_builder.js b/engine/language_client_typescript/type_builder.js index ed96d00a04..e66d978579 100644 --- a/engine/language_client_typescript/type_builder.js +++ b/engine/language_client_typescript/type_builder.js @@ -1,8 +1,5 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EnumBuilder = exports.EnumValueViewer = exports.EnumViewer = exports.EnumAst = exports.ClassBuilder = exports.ClassViewer = exports.ClassAst = exports.TypeBuilder = void 0; -const native_1 = require("./native"); -class TypeBuilder { +import { TypeBuilder as _TypeBuilder, } from './native.js'; +export class TypeBuilder { tb; classes; enums; @@ -10,7 +7,7 @@ class TypeBuilder { constructor({ classes, enums, runtime }) { this.classes = classes; this.enums = enums; - this.tb = new native_1.TypeBuilder(); + this.tb = new _TypeBuilder(); this.runtime = runtime; } reset() { @@ -88,28 +85,30 @@ class TypeBuilder { this.tb.addBaml(baml, this.runtime); } } -exports.TypeBuilder = TypeBuilder; -class ClassAst { +export class ClassAst { properties; bldr; constructor(tb, name, properties = new Set()) { this.properties = properties; this.bldr = tb.getClass(name); } - listProperties() { + rawProperties() { return this.bldr.listProperties(); } + listProperties() { + return this.rawProperties(); + } type() { return this.bldr.field(); } } -exports.ClassAst = ClassAst; -class ClassViewer extends ClassAst { +export class ClassViewer extends ClassAst { constructor(tb, name, properties = new Set()) { super(tb, name, properties); } listProperties() { - return Array.from(this.properties).map((name) => [name, new ClassPropertyViewer()]); + const props = this.rawProperties(); + return Object.keys(props).map((name) => [name, new ClassPropertyViewer()]); } property(name) { if (!this.properties.has(name)) { @@ -118,8 +117,7 @@ class ClassViewer extends ClassAst { return new ClassPropertyViewer(); } } -exports.ClassViewer = ClassViewer; -class ClassBuilder extends ClassAst { +export class ClassBuilder extends ClassAst { constructor(tb, name, properties = new Set()) { super(tb, name, properties); } @@ -131,7 +129,8 @@ class ClassBuilder extends ClassAst { return new ClassPropertyBuilder(this.bldr.property(name).setType(type)); } listProperties() { - return this.bldr.listProperties(); + const props = this.rawProperties(); + return Object.keys(props).map((name) => [name, new ClassPropertyBuilder(this.bldr.property(name))]); } removeProperty(name) { this.properties.delete(name); @@ -147,7 +146,6 @@ class ClassBuilder extends ClassAst { return new ClassPropertyBuilder(this.bldr.property(name)); } } -exports.ClassBuilder = ClassBuilder; class ClassPropertyViewer { constructor() { } } @@ -172,7 +170,7 @@ class ClassPropertyBuilder { return this; } } -class EnumAst { +export class EnumAst { values; bldr; constructor(tb, name, values = new Set()) { @@ -183,8 +181,7 @@ class EnumAst { return this.bldr.field(); } } -exports.EnumAst = EnumAst; -class EnumViewer extends EnumAst { +export class EnumViewer extends EnumAst { constructor(tb, name, values = new Set()) { super(tb, name, values); } @@ -198,12 +195,10 @@ class EnumViewer extends EnumAst { return new EnumValueViewer(); } } -exports.EnumViewer = EnumViewer; -class EnumValueViewer { +export class EnumValueViewer { constructor() { } } -exports.EnumValueViewer = EnumValueViewer; -class EnumBuilder extends EnumAst { +export class EnumBuilder extends EnumAst { constructor(tb, name, values = new Set()) { super(tb, name, values); } @@ -221,4 +216,3 @@ class EnumBuilder extends EnumAst { return this.bldr.value(name); } } -exports.EnumBuilder = EnumBuilder; diff --git a/engine/language_client_typescript/typescript_src/async_context_vars.ts b/engine/language_client_typescript/typescript_src/async_context_vars.ts index 3ffc47cbb4..e67e9a83dd 100644 --- a/engine/language_client_typescript/typescript_src/async_context_vars.ts +++ b/engine/language_client_typescript/typescript_src/async_context_vars.ts @@ -1,4 +1,4 @@ -import { BamlSpan, RuntimeContextManager, BamlRuntime, BamlLogEvent } from './native' +import { BamlSpan, RuntimeContextManager, BamlRuntime, BamlLogEvent } from './native.js' import { AsyncLocalStorage } from 'async_hooks' export class BamlCtxManager { diff --git a/engine/language_client_typescript/typescript_src/browser.ts b/engine/language_client_typescript/typescript_src/browser.ts index 9020e3b077..22bd112d1d 100644 --- a/engine/language_client_typescript/typescript_src/browser.ts +++ b/engine/language_client_typescript/typescript_src/browser.ts @@ -12,16 +12,16 @@ */ // Import actual implementations -import { BamlAudio } from "./audio"; -import { BamlImage } from "./image"; -import { BamlVideo } from "./video"; -import { BamlPdf } from "./pdf"; +import { BamlAudio } from "./audio.js"; +import { BamlImage } from "./image.js"; +import { BamlVideo } from "./video.js"; +import { BamlPdf } from "./pdf.js"; // Re-export the original types -import type { BamlAudio as BamlAudioType } from "./audio"; -import type { BamlImage as BamlImageType } from "./image"; -import type { BamlPdf as BamlPdfType } from "./pdf"; -import type { BamlVideo as BamlVideoType } from "./video"; +import type { BamlAudio as BamlAudioType } from "./audio.js"; +import type { BamlImage as BamlImageType } from "./image.js"; +import type { BamlPdf as BamlPdfType } from "./pdf.js"; +import type { BamlVideo as BamlVideoType } from "./video.js"; // Detect if we're in server-side rendering environment const isSSR = typeof window === "undefined"; diff --git a/engine/language_client_typescript/typescript_src/index.ts b/engine/language_client_typescript/typescript_src/index.ts index 6b93fa9c73..4c64235de5 100644 --- a/engine/language_client_typescript/typescript_src/index.ts +++ b/engine/language_client_typescript/typescript_src/index.ts @@ -1,50 +1,13 @@ -export * from './safe_imports' +export * from './safe_imports.js' -export * from './errors' +export * from './errors.js' -export * from './logging' - -// Detect if we're in a Node.js environment -const isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null - -if (!isNode) { - const browserError = (name: string) => { - throw new Error( - `Cannot import ${name} from '@boundaryml/baml' in browser environment. Please import from '@boundaryml/baml/browser' instead.`, - ) - } - - // Provide helpful error messages for browser imports - Object.defineProperty(exports, 'Image', { - get: () => browserError('Image'), - enumerable: true, - }) - - Object.defineProperty(exports, 'Audio', { - get: () => browserError('Audio'), - enumerable: true, - }); - - Object.defineProperty(exports, 'Pdf', { - get: () => browserError('Pdf'), - enumerable: true, - }); - - Object.defineProperty(exports, 'Video', { - get: () => browserError('Video'), - enumerable: true, - }); - -} +export * from './logging.js' export { BamlRuntime, FunctionResult, FunctionResultStream, - BamlImage as Image, - BamlAudio as Audio, - BamlPdf as Pdf, - BamlVideo as Video, invoke_runtime_cli, ClientRegistry, BamlLogEvent, @@ -53,13 +16,54 @@ export { LlmCall, LlmStreamCall, Usage, - HTTPRequest, - HTTPResponse, - SSEResponse, + HttpRequest as HTTPRequest, + HttpResponse as HTTPResponse, + SseResponse as SSEResponse, StreamTiming, Timing, TraceStats, -} from './native' +} from './native.js' + +export { BamlStream } from './stream.js' +export { BamlCtxManager } from './async_context_vars.js' + +import { BamlAudio, BamlImage, BamlPdf, BamlVideo } from './native.js' + +const isNode = typeof process !== 'undefined' && !!process.versions?.node + +const browserErrorMessage = (name: string) => + `Cannot import ${name} from '@boundaryml/baml' in browser environment. Please import from '@boundaryml/baml/browser' instead.` + +function createBrowserGuard(name: string, target: T): T { + if (isNode) { + return target + } + + const throwBrowserError = (): never => { + throw new Error(browserErrorMessage(name)) + } + + const handler: ProxyHandler = { + get() { + return throwBrowserError() + }, + apply() { + return throwBrowserError() + }, + construct() { + return throwBrowserError() + }, + } + + return new Proxy(target as unknown as object, handler) as T +} + +export const Image = createBrowserGuard('Image', BamlImage) +export const Audio = createBrowserGuard('Audio', BamlAudio) +export const Pdf = createBrowserGuard('Pdf', BamlPdf) +export const Video = createBrowserGuard('Video', BamlVideo) -export { BamlStream } from './stream' -export { BamlCtxManager } from './async_context_vars' +export type Image = BamlImage +export type Audio = BamlAudio +export type Pdf = BamlPdf +export type Video = BamlVideo diff --git a/engine/language_client_typescript/typescript_src/logging.ts b/engine/language_client_typescript/typescript_src/logging.ts index 43b481f304..9c5008da5d 100644 --- a/engine/language_client_typescript/typescript_src/logging.ts +++ b/engine/language_client_typescript/typescript_src/logging.ts @@ -1 +1 @@ -export { setLogLevel, getLogLevel, setLogJsonMode, setLogMaxChunkLength } from './native' +export { setLogLevel, getLogLevel, setLogJsonMode, setLogMaxChunkLength } from './native.js' diff --git a/engine/language_client_typescript/typescript_src/native-js.d.ts b/engine/language_client_typescript/typescript_src/native-js.d.ts new file mode 100644 index 0000000000..ba17e73a75 --- /dev/null +++ b/engine/language_client_typescript/typescript_src/native-js.d.ts @@ -0,0 +1,3 @@ +declare module './native.js' { + export * from '../native.js'; +} diff --git a/engine/language_client_typescript/typescript_src/native.d.ts b/engine/language_client_typescript/typescript_src/native.d.ts new file mode 100644 index 0000000000..d4c8cdb856 --- /dev/null +++ b/engine/language_client_typescript/typescript_src/native.d.ts @@ -0,0 +1 @@ +export * from '../native.js'; diff --git a/engine/language_client_typescript/typescript_src/native.js.d.ts b/engine/language_client_typescript/typescript_src/native.js.d.ts new file mode 100644 index 0000000000..d4c8cdb856 --- /dev/null +++ b/engine/language_client_typescript/typescript_src/native.js.d.ts @@ -0,0 +1 @@ +export * from '../native.js'; diff --git a/engine/language_client_typescript/typescript_src/safe_imports.ts b/engine/language_client_typescript/typescript_src/safe_imports.ts index c60b696407..583730b3d6 100644 --- a/engine/language_client_typescript/typescript_src/safe_imports.ts +++ b/engine/language_client_typescript/typescript_src/safe_imports.ts @@ -1,4 +1,4 @@ -import { get_version } from "./native"; +import { get_version } from "./native.js"; function ensureVersionCompatibility(generatedVersion: string, runtimeVersion: string) { try { diff --git a/engine/language_client_typescript/typescript_src/stream.ts b/engine/language_client_typescript/typescript_src/stream.ts index 9a64411018..93cb49d8b6 100644 --- a/engine/language_client_typescript/typescript_src/stream.ts +++ b/engine/language_client_typescript/typescript_src/stream.ts @@ -1,9 +1,9 @@ -import { toBamlError, BamlAbortError } from "./errors"; +import { toBamlError, BamlAbortError } from "./errors.js"; import type { FunctionResult, FunctionResultStream, RuntimeContextManager, -} from "../native"; +} from "../native.js"; export class BamlStream { private task: Promise | null = null; diff --git a/engine/language_client_typescript/typescript_src/type_builder.ts b/engine/language_client_typescript/typescript_src/type_builder.ts index b2d8bbafb8..2371f03873 100644 --- a/engine/language_client_typescript/typescript_src/type_builder.ts +++ b/engine/language_client_typescript/typescript_src/type_builder.ts @@ -6,7 +6,7 @@ import { FieldType, TypeBuilder as _TypeBuilder, BamlRuntime, -} from './native' +} from './native.js' type IsLiteral = string extends T ? false : true type NameOf = IsLiteral extends true ? T : 'DynamicType' @@ -132,7 +132,11 @@ export class TypeBuilder { } } -export class ClassAst { +export class ClassAst< + ClassName extends string, + Properties extends string = string, + ListReturn = Record, +> { protected bldr: _ClassBuilder constructor( @@ -143,8 +147,12 @@ export class ClassAst { - return this.bldr.listProperties() + protected rawProperties(): Record { + return this.bldr.listProperties() as unknown as Record + } + + listProperties(): ListReturn { + return this.rawProperties() as unknown as ListReturn } type(): FieldType { @@ -154,14 +162,16 @@ export class ClassAst extends ClassAst< ClassName, - Properties + Properties, + Array<[string, ClassPropertyViewer]> > { constructor(tb: _TypeBuilder, name: ClassName, properties: Set = new Set()) { super(tb, name, properties) } listProperties(): Array<[string, ClassPropertyViewer]> { - return Array.from(this.properties).map((name) => [name, new ClassPropertyViewer()]) + const props = this.rawProperties() + return Object.keys(props).map((name) => [name, new ClassPropertyViewer()]) } property(name: string): ClassPropertyViewer { @@ -174,7 +184,8 @@ export class ClassViewer extends ClassAst< ClassName, - Properties + Properties, + Array<[string, ClassPropertyBuilder]> > { constructor(tb: _TypeBuilder, name: ClassName, properties: Set = new Set()) { super(tb, name, properties) @@ -189,7 +200,8 @@ export class ClassBuilder { - return this.bldr.listProperties() + const props = this.rawProperties() + return Object.keys(props).map((name) => [name, new ClassPropertyBuilder(this.bldr.property(name))]) } removeProperty(name: string): void { diff --git a/engine/language_client_typescript/video.js b/engine/language_client_typescript/video.js index 2c8fa5f53d..56674fcc76 100644 --- a/engine/language_client_typescript/video.js +++ b/engine/language_client_typescript/video.js @@ -1,10 +1,7 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BamlVideo = void 0; /** * Browser-compatible implementation of BamlVideo */ -class BamlVideo { +export class BamlVideo { type; content; mediaType; @@ -93,4 +90,3 @@ class BamlVideo { }; } } -exports.BamlVideo = BamlVideo; diff --git a/integ-tests/typescript-esm/main.ts b/integ-tests/typescript-esm/main.ts index 59f60a433c..b4b483e320 100644 --- a/integ-tests/typescript-esm/main.ts +++ b/integ-tests/typescript-esm/main.ts @@ -1,13 +1,13 @@ import { b } from "./baml_client/index.js"; -// import { Image} from "@boundaryml/baml"; -import pkg from "@boundaryml/baml"; -// Force another import for the logging path. -import { setLogLevel } from "./baml_client/config.js"; - -const { Image } = pkg; +import { Image } from "@boundaryml/baml"; +import { setLogLevel } from "./baml_client/config.js"; setLogLevel("info"); -const result = await b.DescribeImage( Image.fromUrl('https://upload.wikimedia.org/wikipedia/en/4/4d/Shrek_%28character%29.png')); +const result = await b.DescribeImage( + Image.fromUrl( + "https://upload.wikimedia.org/wikipedia/en/4/4d/Shrek_%28character%29.png", + ), +); console.log(result); diff --git a/integ-tests/typescript-esm/package.json b/integ-tests/typescript-esm/package.json index d5213f6e33..8e33a8a4cb 100644 --- a/integ-tests/typescript-esm/package.json +++ b/integ-tests/typescript-esm/package.json @@ -5,7 +5,10 @@ "scripts": { "build": "tsc", "start": "node ./dist/main.js", - "typecheck": "tsc --noEmit" + "test-import": "node test-import.js && node test-import.mjs && tsx test-import.ts", + "typecheck": "tsc --noEmit", + "build:debug": "cd ../../engine/language_client_typescript && pnpm build:debug", + "generate": "baml-cli generate --from ../baml_src" }, "engines": { "node": ">=20" @@ -13,6 +16,7 @@ "devDependencies": { "@tsconfig/node23": "^23.0.0", "@types/node": "^22.13.4", + "tsx": "^4.20.3", "typescript": "^5.7.3" }, "dependencies": { diff --git a/integ-tests/typescript-esm/test-import.js b/integ-tests/typescript-esm/test-import.js new file mode 100644 index 0000000000..0eafab18ce --- /dev/null +++ b/integ-tests/typescript-esm/test-import.js @@ -0,0 +1,3 @@ +import { HTTPRequest } from "@boundaryml/baml"; + +console.log(typeof HTTPRequest); diff --git a/integ-tests/typescript-esm/test-import.mjs b/integ-tests/typescript-esm/test-import.mjs new file mode 100644 index 0000000000..0eafab18ce --- /dev/null +++ b/integ-tests/typescript-esm/test-import.mjs @@ -0,0 +1,3 @@ +import { HTTPRequest } from "@boundaryml/baml"; + +console.log(typeof HTTPRequest); diff --git a/integ-tests/typescript-esm/test-import.ts b/integ-tests/typescript-esm/test-import.ts new file mode 100644 index 0000000000..0eafab18ce --- /dev/null +++ b/integ-tests/typescript-esm/test-import.ts @@ -0,0 +1,3 @@ +import { HTTPRequest } from "@boundaryml/baml"; + +console.log(typeof HTTPRequest); diff --git a/integ-tests/typescript-esm/tsconfig.json b/integ-tests/typescript-esm/tsconfig.json index 8f4ff742aa..6a779858e5 100644 --- a/integ-tests/typescript-esm/tsconfig.json +++ b/integ-tests/typescript-esm/tsconfig.json @@ -2,6 +2,10 @@ "extends": "@tsconfig/node23/tsconfig.json", "exclude": ["dist"], "compilerOptions": { - "outDir": "dist" + "outDir": "dist", + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": false, + "esModuleInterop": false } } diff --git a/integ-tests/typescript/jest.config.js b/integ-tests/typescript/jest.config.js deleted file mode 100644 index f62eb57ad6..0000000000 --- a/integ-tests/typescript/jest.config.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - preset: "ts-jest", - testEnvironment: "node", - roots: ["/tests"], - testMatch: ["**/*.test.ts"], - moduleFileExtensions: ["ts", "js", "json", "node"], - setupFilesAfterEnv: ["/tests/test-setup.ts"], - testTimeout: 600000, - // detectOpenHandles: true, - moduleNameMapper: { - "^@/(.*)$": "/$1", - }, -}; diff --git a/integ-tests/typescript/package.json b/integ-tests/typescript/package.json index 07660ec61a..12cca9db5e 100644 --- a/integ-tests/typescript/package.json +++ b/integ-tests/typescript/package.json @@ -4,13 +4,13 @@ "description": "", "main": "index.js", "scripts": { - "test": "node --expose-gc ./node_modules/jest/bin/jest.js", + "test": "vitest run --passWithNoTests", "build": "tsc && pnpm run build:debug", - "integ-tests:ci": "tsc && infisical run --env=test -- pnpm test -- --ci --silent false --testTimeout 30000 --verbose=false --reporters=jest-junit", - "integ-tests": "tsc && infisical run --env=test -- pnpm test -- --silent false --testTimeout 60000", - "integ-tests:dotenv": "tsc && dotenv -e ../.env -- pnpm test -- --silent false --testTimeout 30000", + "integ-tests:ci": "tsc && infisical run --env=test -- vitest run --timeout 30000 --reporter=default --reporter=junit --outputFile=./junit.xml --passWithNoTests", + "integ-tests": "tsc && infisical run --env=test -- vitest run --timeout 60000 --passWithNoTests", + "integ-tests:dotenv": "tsc && dotenv -e ../.env -- vitest run --timeout 30000 --passWithNoTests", "generate": "baml-cli generate --from ../baml_src", - "memory-test": "BAML_LOG=info infisical run --env=test -- pnpm test -- --silent false --testTimeout 60000 -t 'memory'", + "memory-test": "BAML_LOG=info infisical run --env=test -- vitest run --timeout 60000 --passWithNoTests --filter memory", "typecheck": "tsc --noEmit", "build:debug": "cd ../../engine/language_client_typescript && pnpm build:debug" }, @@ -18,19 +18,13 @@ "author": "", "license": "ISC", "devDependencies": { - "@swc/core": "1.5.7", - "@swc/jest": "0.2.36", - "@types/jest": "29.5.12", - "@types/node": "20.17.17", + "@types/node": "20.19.1", "dotenv-cli": "7.4.2", - "jest": "29.7.0", - "jest-html-reporter": "3.10.2", - "jest-junit": "16.0.0", - "jest-summary-reporter": "0.0.2", - "ts-jest": "29.1.2", "ts-node": "10.9.2", "ts-node-dev": "2.0.0", - "typescript": "5.4.2" + "typescript": "5.4.2", + "vite": "7.0.0", + "vitest": "3.2.3" }, "dependencies": { "@anthropic-ai/sdk": "0.39.0", @@ -41,5 +35,6 @@ "esbuild": "0.25.2", "openai": "4.87.3" }, - "packageManager": "pnpm@9.12.0+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca" + "packageManager": "pnpm@9.12.0+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca", + "type": "module" } diff --git a/integ-tests/typescript/tests/abort-handlers-manual.test.ts b/integ-tests/typescript/tests/abort-handlers-manual.test.ts index 12cd714f36..ea25ce0884 100644 --- a/integ-tests/typescript/tests/abort-handlers-manual.test.ts +++ b/integ-tests/typescript/tests/abort-handlers-manual.test.ts @@ -18,7 +18,7 @@ describe("Abort Handlers - Manual Testing", () => { try { await promise; - fail("Should have thrown an error"); + throw new Error("Should have thrown an error"); } catch (error: any) { const elapsedTime = Date.now() - startTime; console.log(`Operation cancelled after ${elapsedTime}ms`); @@ -145,7 +145,7 @@ describe("Abort Handlers - Manual Testing", () => { controller.abort(); await promise; - fail("Should have been cancelled"); + throw new Error("Should have been cancelled"); } catch (error: any) { // Should be cancelled before making the API call expect(error).toBeDefined(); diff --git a/integ-tests/typescript/tests/error-handling.test.ts b/integ-tests/typescript/tests/error-handling.test.ts index 28006316a8..bbf2375e41 100644 --- a/integ-tests/typescript/tests/error-handling.test.ts +++ b/integ-tests/typescript/tests/error-handling.test.ts @@ -30,7 +30,7 @@ describe("Error Handling Tests", () => { it("should raise a BAMLValidationError with proper details", async () => { try { await b.DummyOutputFunction("dummy input"); - fail("Expected b.DummyOutputFunction to throw a BamlValidationError"); + throw new Error("Expected b.DummyOutputFunction to throw a BamlValidationError"); } catch (error: any) { if (error instanceof BamlValidationError) { expect(error.message).toContain("BamlValidationError"); @@ -55,7 +55,7 @@ describe("Error Handling Tests", () => { "My name is Harrison. My hair is black and I'm 6 feet tall.", { clientRegistry: cr }, ); - fail("Expected b.MyFunc to throw a BamlClientHttpError"); + throw new Error("Expected b.MyFunc to throw a BamlClientHttpError"); } catch (error: any) { if (error instanceof BamlClientHttpError) { expect(error.message).toContain("BamlClientHttpError"); @@ -75,7 +75,7 @@ describe("Error Handling Tests", () => { "My name is Harrison. My hair is black and I'm 6 feet tall.", { clientRegistry: cr }, ); - fail("Expected b.MyFunc to throw a BamlClientHttpError"); + throw new Error("Expected b.MyFunc to throw a BamlClientHttpError"); } catch (error: any) { if (error instanceof BamlClientHttpError) { expect(error.message).toContain("BamlClientHttpError"); diff --git a/integ-tests/typescript/tests/input-output.test.ts b/integ-tests/typescript/tests/input-output.test.ts index 482846645c..4ddac3ecab 100644 --- a/integ-tests/typescript/tests/input-output.test.ts +++ b/integ-tests/typescript/tests/input-output.test.ts @@ -1,5 +1,5 @@ import { NamedArgsSingleEnumList } from "../baml_client"; -import { partial_types } from "../baml_client/partial_types"; +import type { partial_types } from "../baml_client/partial_types"; import { b, b_sync } from "./test-setup"; describe("Basic Input/Output Tests", () => { diff --git a/integ-tests/typescript/tests/logger.test.ts b/integ-tests/typescript/tests/logger.test.ts index 5f3c4cbdb9..264a524a8f 100644 --- a/integ-tests/typescript/tests/logger.test.ts +++ b/integ-tests/typescript/tests/logger.test.ts @@ -1,3 +1,4 @@ +import { vi } from "vitest"; import { b } from "../baml_client"; import { setLogLevel, getLogLevel } from "../baml_client/config"; @@ -16,14 +17,14 @@ describe("Logger tests", () => { /** * Helper function to capture stdout. - * It temporarily uses jest.spyOn to override process.stdout.write, + * It temporarily uses vi.spyOn to override process.stdout.write, * calls the async function, then returns both the result and any output captured. */ async function captureStdout( fn: () => Promise, ): Promise<{ result: T; output: string }> { let output = ""; - const spy = jest + const spy = vi .spyOn(process.stdout, "write") .mockImplementation((chunk: any, encoding?: any, callback?: any) => { if (typeof encoding === "function") { diff --git a/integ-tests/typescript/tests/modular.test.ts b/integ-tests/typescript/tests/modular.test.ts index d7946b880d..fe9e1821fe 100644 --- a/integ-tests/typescript/tests/modular.test.ts +++ b/integ-tests/typescript/tests/modular.test.ts @@ -1,16 +1,14 @@ import OpenAI from "openai"; -import { +import type { ChatCompletionCreateParamsNonStreaming, ChatCompletionCreateParamsStreaming, } from "openai/resources"; import Anthropic from "@anthropic-ai/sdk"; -import { MessageCreateParamsNonStreaming } from "@anthropic-ai/sdk/resources"; -import { - GenerateContentRequest, - GoogleGenerativeAI, -} from "@google/generative-ai"; +import type { MessageCreateParamsNonStreaming } from "@anthropic-ai/sdk/resources"; +import type { GenerateContentRequest } from "@google/generative-ai"; +import { GoogleGenerativeAI } from "@google/generative-ai"; import { HTTPRequest as BamlHttpRequest } from "@boundaryml/baml"; -import { Resume } from "../baml_client/types"; +import type { Resume } from "../baml_client/types"; import { b, ClientRegistry } from "./test-setup"; const JOHN_DOE_TEXT_RESUME = ` diff --git a/integ-tests/typescript/tests/ontick_basic.test.ts b/integ-tests/typescript/tests/ontick_basic.test.ts index 00531ba6e2..b024fdb73b 100644 --- a/integ-tests/typescript/tests/ontick_basic.test.ts +++ b/integ-tests/typescript/tests/ontick_basic.test.ts @@ -1,10 +1,11 @@ // Basic tests for experimental onTick without requiring API calls +import { vi } from 'vitest'; import { b } from '../baml_client'; import { b as syncB } from '../baml_client/sync_client'; describe('Experimental OnTick Basic', () => { it('should reject onTick for sync functions', () => { - const onTick = jest.fn(); + const onTick = vi.fn(); expect(() => { syncB.TestAnthropicShorthand( @@ -15,7 +16,7 @@ describe('Experimental OnTick Basic', () => { }); it('should accept onTick in BamlCallOptions for async functions', () => { - const onTick = jest.fn(); + const onTick = vi.fn(); // This test just validates that the type system accepts onTick // We can't actually call the function without an API key @@ -28,7 +29,7 @@ describe('Experimental OnTick Basic', () => { }); it('should accept onTick in stream functions', () => { - const onTick = jest.fn(); + const onTick = vi.fn(); // This test just validates that the stream accepts onTick const options = { @@ -49,4 +50,4 @@ describe('Experimental OnTick Basic', () => { // Expected to fail without proper API key, but the type checking passes } }); -}); \ No newline at end of file +}); diff --git a/integ-tests/typescript/tsconfig.json b/integ-tests/typescript/tsconfig.json index 13880158a1..9482f1dc3d 100644 --- a/integ-tests/typescript/tsconfig.json +++ b/integ-tests/typescript/tsconfig.json @@ -1,8 +1,10 @@ { "compilerOptions": { "target": "es2020", - "module": "commonjs", - "lib": ["es2020"], + "module": "esnext", + "lib": [ + "es2020" + ], "strict": true, "esModuleInterop": true, "skipLibCheck": true, @@ -11,9 +13,28 @@ "declaration": true, "baseUrl": ".", "paths": { - "*": ["node_modules/*", "types/*"] - } + "*": [ + "node_modules/*", + "types/*" + ] + }, + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "resolveJsonModule": true, + "isolatedModules": false, + "allowImportingTsExtensions": false, + "noEmit": false, + "types": [ + "vitest/globals", + "node" + ] }, - "include": ["tests/**/*", "baml_client/**/*"], - "exclude": ["node_modules", "dist"] + "include": [ + "tests/**/*", + "baml_client/**/*" + ], + "exclude": [ + "node_modules", + "dist" + ] } diff --git a/integ-tests/typescript/vitest.config.ts b/integ-tests/typescript/vitest.config.ts new file mode 100644 index 0000000000..4dce3dcbb1 --- /dev/null +++ b/integ-tests/typescript/vitest.config.ts @@ -0,0 +1,28 @@ +import { defineConfig } from 'vitest/config'; +import path from 'node:path'; + +const engineRoot = path.resolve(__dirname, '../../engine/language_client_typescript'); + +export default defineConfig({ + test: { + globals: true, + environment: 'node', + testTimeout: 60_000, + hookTimeout: 60_000, + maxConcurrency: 1, + isolate: false, + poolOptions: { + threads: { + singleThread: true, + }, + }, + }, + resolve: { + alias: { + '@boundaryml/baml': path.join(engineRoot, 'index.js'), + '@boundaryml/baml/native': path.join(engineRoot, 'native.js'), + '@boundaryml/baml/type_builder': path.join(engineRoot, 'type_builder.js'), + '@boundaryml/baml/logging': path.join(engineRoot, 'logging.js'), + }, + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index df139e6f74..ba4c0c63c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -282,45 +282,27 @@ importers: specifier: 4.87.3 version: 4.87.3(ws@8.18.3)(zod@3.25.66) devDependencies: - '@swc/core': - specifier: 1.5.7 - version: 1.5.7(@swc/helpers@0.5.15) - '@swc/jest': - specifier: 0.2.36 - version: 0.2.36(@swc/core@1.5.7(@swc/helpers@0.5.15)) - '@types/jest': - specifier: 29.5.12 - version: 29.5.12 '@types/node': - specifier: 20.17.17 - version: 20.17.17 + specifier: 20.19.1 + version: 20.19.1 dotenv-cli: specifier: 7.4.2 version: 7.4.2 - jest: - specifier: 29.7.0 - version: 29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)) - jest-html-reporter: - specifier: 3.10.2 - version: 3.10.2(jest@29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)))(typescript@5.4.2) - jest-junit: - specifier: 16.0.0 - version: 16.0.0 - jest-summary-reporter: - specifier: 0.0.2 - version: 0.0.2 - ts-jest: - specifier: 29.1.2 - version: 29.1.2(@babel/core@7.28.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.0))(esbuild@0.25.2)(jest@29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)))(typescript@5.4.2) ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2) + version: 10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.4.2) ts-node-dev: specifier: 2.0.0 - version: 2.0.0(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2) + version: 2.0.0(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.4.2) typescript: specifier: 5.4.2 version: 5.4.2 + vite: + specifier: 7.0.0 + version: 7.0.0(@types/node@20.19.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) + vitest: + specifier: 3.2.3 + version: 3.2.3(@edge-runtime/vm@3.2.0)(@types/debug@4.1.12)(@types/node@20.19.1)(jiti@2.5.1)(jsdom@20.0.3(canvas@2.11.2))(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) integ-tests/typescript-esm: dependencies: @@ -334,6 +316,9 @@ importers: '@types/node': specifier: ^22.13.4 version: 22.15.33 + tsx: + specifier: ^4.20.3 + version: 4.20.3 typescript: specifier: ^5.7.3 version: 5.8.3 @@ -1245,13 +1230,13 @@ importers: version: 5.1.5 next: specifier: 15.3.3 - version: 15.3.3(@babel/core@7.27.7)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + version: 15.3.3(@babel/core@7.28.0)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) next-themes: specifier: 0.4.6 version: 0.4.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0) nuqs: specifier: 2.4.3 - version: 2.4.3(next@15.3.3(@babel/core@7.27.7)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) + version: 2.4.3(next@15.3.3(@babel/core@7.28.0)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) react: specifier: 19.1.0 version: 19.1.0 @@ -1275,10 +1260,10 @@ importers: version: 3.0.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0) react-scan: specifier: 0.3.4 - version: 0.3.4(@types/react@19.1.8)(next@15.3.3(@babel/core@7.27.7)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rollup@4.43.0) + version: 0.3.4(@types/react@19.1.8)(next@15.3.3(@babel/core@7.28.0)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rollup@4.43.0) react-spring: specifier: 10.0.1 - version: 10.0.1(@react-three/fiber@9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0))(konva@9.3.20)(react-dom@19.1.0(react@19.1.0))(react-konva@19.0.6(@types/react@19.1.8)(konva@9.3.20)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react-zdog@1.2.2)(react@19.1.0)(three@0.177.0)(zdog@1.1.3) + version: 10.0.1(@react-three/fiber@9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0))(konva@9.3.20)(react-dom@19.1.0(react@19.1.0))(react-konva@19.0.6(@types/react@19.1.8)(konva@9.3.20)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react-zdog@1.2.2)(react@19.1.0)(three@0.177.0)(zdog@1.1.3) react-twc: specifier: 1.4.2 version: 1.4.2(@types/react@19.1.8)(react@19.1.0) @@ -2995,9 +2980,6 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@jridgewell/sourcemap-codec@1.5.4': - resolution: {integrity: sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==} - '@jridgewell/sourcemap-codec@1.5.5': resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} @@ -5111,120 +5093,60 @@ packages: cpu: [arm64] os: [darwin] - '@swc/core-darwin-arm64@1.5.7': - resolution: {integrity: sha512-bZLVHPTpH3h6yhwVl395k0Mtx8v6CGhq5r4KQdAoPbADU974Mauz1b6ViHAJ74O0IVE5vyy7tD3OpkQxL/vMDQ==} - engines: {node: '>=10'} - cpu: [arm64] - os: [darwin] - '@swc/core-darwin-x64@1.12.7': resolution: {integrity: sha512-jN6LhFfGOpm4DY2mXPgwH4aa9GLOwublwMVFFZ/bGnHYYCRitLZs9+JWBbyWs7MyGcA246Ew+EREx36KVEAxjA==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-darwin-x64@1.5.7': - resolution: {integrity: sha512-RpUyu2GsviwTc2qVajPL0l8nf2vKj5wzO3WkLSHAHEJbiUZk83NJrZd1RVbEknIMO7+Uyjh54hEh8R26jSByaw==} - engines: {node: '>=10'} - cpu: [x64] - os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.12.7': resolution: {integrity: sha512-rHn8XXi7G2StEtZRAeJ6c7nhJPDnqsHXmeNrAaYwk8Tvpa6ZYG2nT9E1OQNXj1/dfbSFTjdiA8M8ZvGYBlpBoA==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm-gnueabihf@1.5.7': - resolution: {integrity: sha512-cTZWTnCXLABOuvWiv6nQQM0hP6ZWEkzdgDvztgHI/+u/MvtzJBN5lBQ2lue/9sSFYLMqzqff5EHKlFtrJCA9dQ==} - engines: {node: '>=10'} - cpu: [arm] - os: [linux] - '@swc/core-linux-arm64-gnu@1.12.7': resolution: {integrity: sha512-N15hKizSSh+hkZ2x3TDVrxq0TDcbvDbkQJi2ZrLb9fK+NdFUV/x+XF16ZDPlbxtrGXl1CT7VD439SNaMN9F7qw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-gnu@1.5.7': - resolution: {integrity: sha512-hoeTJFBiE/IJP30Be7djWF8Q5KVgkbDtjySmvYLg9P94bHg9TJPSQoC72tXx/oXOgXvElDe/GMybru0UxhKx4g==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - '@swc/core-linux-arm64-musl@1.12.7': resolution: {integrity: sha512-jxyINtBezpxd3eIUDiDXv7UQ87YWlPsM9KumOwJk09FkFSO4oYxV2RT+Wu+Nt5tVWue4N0MdXT/p7SQsDEk4YA==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-musl@1.5.7': - resolution: {integrity: sha512-+NDhK+IFTiVK1/o7EXdCeF2hEzCiaRSrb9zD7X2Z7inwWlxAntcSuzZW7Y6BRqGQH89KA91qYgwbnjgTQ22PiQ==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - '@swc/core-linux-x64-gnu@1.12.7': resolution: {integrity: sha512-PR4tPVwU1BQBfFDk2XfzXxsEIjF3x/bOV1BzZpYvrlkU0TKUDbR4t2wzvsYwD/coW7/yoQmlL70/qnuPtTp1Zw==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-linux-x64-gnu@1.5.7': - resolution: {integrity: sha512-25GXpJmeFxKB+7pbY7YQLhWWjkYlR+kHz5I3j9WRl3Lp4v4UD67OGXwPe+DIcHqcouA1fhLhsgHJWtsaNOMBNg==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - '@swc/core-linux-x64-musl@1.12.7': resolution: {integrity: sha512-zy7JWfQtQItgMfUjSbbcS3DZqQUn2d9VuV0LSGpJxtTXwgzhRpF1S2Sj7cU9hGpbM27Y8RJ4DeFb3qbAufjbrw==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-linux-x64-musl@1.5.7': - resolution: {integrity: sha512-0VN9Y5EAPBESmSPPsCJzplZHV26akC0sIgd3Hc/7S/1GkSMoeuVL+V9vt+F/cCuzr4VidzSkqftdP3qEIsXSpg==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - '@swc/core-win32-arm64-msvc@1.12.7': resolution: {integrity: sha512-52PeF0tyX04ZFD8nibNhy/GjMFOZWTEWPmIB3wpD1vIJ1po+smtBnEdRRll5WIXITKoiND8AeHlBNBPqcsdcwA==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-arm64-msvc@1.5.7': - resolution: {integrity: sha512-RtoNnstBwy5VloNCvmvYNApkTmuCe4sNcoYWpmY7C1+bPR+6SOo8im1G6/FpNem8AR5fcZCmXHWQ+EUmRWJyuA==} - engines: {node: '>=10'} - cpu: [arm64] - os: [win32] - '@swc/core-win32-ia32-msvc@1.12.7': resolution: {integrity: sha512-WzQwkNMuhB1qQShT9uUgz/mX2j7NIEPExEtzvGsBT7TlZ9j1kGZ8NJcZH/fwOFcSJL4W7DnkL7nAhx6DBlSPaA==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-ia32-msvc@1.5.7': - resolution: {integrity: sha512-Xm0TfvcmmspvQg1s4+USL3x8D+YPAfX2JHygvxAnCJ0EHun8cm2zvfNBcsTlnwYb0ybFWXXY129aq1wgFC9TpQ==} - engines: {node: '>=10'} - cpu: [ia32] - os: [win32] - '@swc/core-win32-x64-msvc@1.12.7': resolution: {integrity: sha512-R52ivBi2lgjl+Bd3XCPum0YfgbZq/W1AUExITysddP9ErsNSwnreYyNB3exEijiazWGcqHEas2ChiuMOP7NYrA==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core-win32-x64-msvc@1.5.7': - resolution: {integrity: sha512-tp43WfJLCsKLQKBmjmY/0vv1slVywR5Q4qKjF5OIY8QijaEW7/8VwPyUyVoJZEnDgv9jKtUTG5PzqtIYPZGnyg==} - engines: {node: '>=10'} - cpu: [x64] - os: [win32] - '@swc/core@1.12.7': resolution: {integrity: sha512-bcpllEihyUSnqp0UtXTvXc19CT4wp3tGWLENhWnjr4B5iEOkzqMu+xHGz1FI5IBatjfqOQb29tgIfv6IL05QaA==} engines: {node: '>=10'} @@ -5234,27 +5156,12 @@ packages: '@swc/helpers': optional: true - '@swc/core@1.5.7': - resolution: {integrity: sha512-U4qJRBefIJNJDRCCiVtkfa/hpiZ7w0R6kASea+/KLp+vkus3zcLSB8Ub8SvKgTIxjWpwsKcZlPf5nrv4ls46SQ==} - engines: {node: '>=10'} - peerDependencies: - '@swc/helpers': ^0.5.0 - peerDependenciesMeta: - '@swc/helpers': - optional: true - '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} - '@swc/jest@0.2.36': - resolution: {integrity: sha512-8X80dp81ugxs4a11z1ka43FPhP+/e+mJNXJSxiNYk8gIX/jPBtY4gQTrKu/KIoco8bzKuPI5lUxjfLiGsfvnlw==} - engines: {npm: '>= 7.0.0'} - peerDependencies: - '@swc/core': '*' - '@swc/jest@0.2.38': resolution: {integrity: sha512-HMoZgXWMqChJwffdDjvplH53g9G2ALQes3HKXDEdliB/b85OQ0CTSbxG8VSeCwiAn7cOaDVEt4mwmZvbHcS52w==} engines: {npm: '>= 7.0.0'} @@ -5264,9 +5171,6 @@ packages: '@swc/types@0.1.23': resolution: {integrity: sha512-u1iIVZV9Q0jxY+yM2vw/hZGDNudsN85bBpTqzAQ9rzkxW9D+e3aEM4Han+ow518gSewkXgjmEK0BD79ZcNVgPw==} - '@swc/types@0.1.7': - resolution: {integrity: sha512-scHWahbHF0eyj3JsxG9CFJgFdFNaVQCNAimBlT6PzS3n/HptxqREjsm4OH6AN3lYcffZYSPxXW8ua2BEHp0lJQ==} - '@tailwindcss/node@4.1.11': resolution: {integrity: sha512-yzhzuGRmv5QyU9qLNg4GTlYI6STedBWRE7NjxP45CsFYYq9taI0zJXZBMqIC/c8fViNLhmrbpSFS57EoxUmD6Q==} @@ -5735,9 +5639,6 @@ packages: '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} - '@types/jest@29.5.12': - resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==} - '@types/jest@29.5.14': resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} @@ -8754,13 +8655,6 @@ packages: resolution: {integrity: sha512-telJBKpNLeCb4MaX+I5k496556Y2FiKR/QLZc0+MGBYl4k3OO0472drlV2LUe7c1Glng5HuAu+5GLYp//GpdOQ==} engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} - jest-html-reporter@3.10.2: - resolution: {integrity: sha512-XRBa5ylHPUQoo8aJXEEdKsTruieTdlPbRktMx9WG9evMTxzJEKGFMaw5x+sQxJuClWdNR72GGwbOaz+6HIlksA==} - engines: {node: '>=4.8.3'} - peerDependencies: - jest: 19.x - 29.x - typescript: ^3.7.x || ^4.3.x || ^5.x - jest-html-reporter@4.3.0: resolution: {integrity: sha512-lq4Zx35yc6Ehw513CXJ1ok3wUmkSiOImWcyLAmylfzrz7DAqtrhDF9V73F4qfstmGxlr8X0QrEjWsl/oqhf4sQ==} engines: {node: '>=14.0.0'} @@ -8988,6 +8882,7 @@ packages: resolution: {integrity: sha512-Quz3MvAwHxVYNXsOByL7xI5EB2WYOeFswqaHIA3qOK3isRWTxiplBEocmmru6XmxDB2L7jDNYtYA4FyimoAFEw==} engines: {node: '>=8.17.0'} hasBin: true + bundledDependencies: [] jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -11755,27 +11650,6 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - ts-jest@29.1.2: - resolution: {integrity: sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==} - engines: {node: ^16.10.0 || ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@babel/core': '>=7.0.0-beta.0 <8' - '@jest/types': ^29.0.0 - babel-jest: ^29.0.0 - esbuild: '*' - jest: ^29.0.0 - typescript: '>=4.3 <6' - peerDependenciesMeta: - '@babel/core': - optional: true - '@jest/types': - optional: true - babel-jest: - optional: true - esbuild: - optional: true - ts-jest@29.4.0: resolution: {integrity: sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} @@ -12236,46 +12110,6 @@ packages: peerDependencies: vite: ^2 || ^3 || ^4 || ^5 - vite@6.3.5: - resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - jiti: '>=1.21.0' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' - terser: ^5.16.0 - tsx: ^4.8.1 - yaml: ^2.4.2 - peerDependenciesMeta: - '@types/node': - optional: true - jiti: - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - tsx: - optional: true - yaml: - optional: true - vite@7.0.0: resolution: {integrity: sha512-ixXJB1YRgDIw2OszKQS9WxGHKwLdCsbQNkpJN171udl6szi/rIySHL6/Os3s2+oE4P/FLD4dxg4mD7Wust+u5g==} engines: {node: ^20.19.0 || >=22.12.0} @@ -13815,7 +13649,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.27.7)': dependencies: @@ -13826,7 +13659,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.27.7)': dependencies: @@ -13837,7 +13669,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.27.7)': dependencies: @@ -13848,7 +13679,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-import-attributes@7.27.1(@babel/core@7.27.7)': dependencies: @@ -13859,7 +13689,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.27.7)': dependencies: @@ -13870,7 +13699,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.27.7)': dependencies: @@ -13881,7 +13709,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.27.7)': dependencies: @@ -13897,7 +13724,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.27.7)': dependencies: @@ -13908,7 +13734,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.27.7)': dependencies: @@ -13919,7 +13744,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.27.7)': dependencies: @@ -13930,7 +13754,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.27.7)': dependencies: @@ -13941,7 +13764,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.27.7)': dependencies: @@ -13952,7 +13774,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.27.7)': dependencies: @@ -13963,7 +13784,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.27.7)': dependencies: @@ -13974,7 +13794,6 @@ snapshots: dependencies: '@babel/core': 7.28.0 '@babel/helper-plugin-utils': 7.27.1 - optional: true '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.27.7)': dependencies: @@ -15017,7 +14836,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -15026,7 +14845,7 @@ snapshots: '@jest/console@30.0.2': dependencies: '@jest/types': 30.0.1 - '@types/node': 20.17.17 + '@types/node': 20.19.1 chalk: 4.1.2 jest-message-util: 30.0.2 jest-util: 30.0.2 @@ -15039,14 +14858,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)) + jest-config: 29.7.0(@types/node@20.19.1)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -15074,49 +14893,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.17 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.9.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3)) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.8 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - - '@jest/core@29.7.0(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2))': - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)) + jest-config: 29.7.0(@types/node@20.19.1)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -15145,7 +14929,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -15163,7 +14947,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.17.17 + '@types/node': 20.19.1 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -15179,7 +14963,7 @@ snapshots: '@jest/pattern@30.0.1': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 jest-regex-util: 30.0.1 '@jest/reporters@29.7.0': @@ -15190,7 +14974,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.17.17 + '@types/node': 20.19.1 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -15219,7 +15003,7 @@ snapshots: '@jest/transform': 30.0.2 '@jest/types': 30.0.1 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.17.17 + '@types/node': 20.19.1 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit-x: 0.2.2 @@ -15319,7 +15103,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -15329,19 +15113,19 @@ snapshots: '@jest/schemas': 30.0.1 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/yargs': 17.0.33 chalk: 4.1.2 '@jridgewell/gen-mapping@0.3.12': dependencies: - '@jridgewell/sourcemap-codec': 1.5.4 + '@jridgewell/sourcemap-codec': 1.5.5 '@jridgewell/trace-mapping': 0.3.29 '@jridgewell/gen-mapping@0.3.8': dependencies: '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.5.5 '@jridgewell/trace-mapping': 0.3.25 '@jridgewell/remapping@2.3.5': @@ -15360,24 +15144,22 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} - '@jridgewell/sourcemap-codec@1.5.4': {} - '@jridgewell/sourcemap-codec@1.5.5': {} '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.5.5 '@jridgewell/trace-mapping@0.3.29': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.4 + '@jridgewell/sourcemap-codec': 1.5.5 '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.5.5 '@juggle/resize-observer@3.4.0': {} @@ -16742,9 +16524,9 @@ snapshots: '@react-native/assets-registry@0.80.0': {} - '@react-native/codegen@0.80.0(@babel/core@7.27.7)': + '@react-native/codegen@0.80.0(@babel/core@7.28.0)': dependencies: - '@babel/core': 7.27.7 + '@babel/core': 7.28.0 glob: 7.2.3 hermes-parser: 0.28.1 invariant: 2.2.4 @@ -16792,12 +16574,12 @@ snapshots: '@react-native/normalize-colors@0.80.0': {} - '@react-native/virtualized-lists@0.80.0(@types/react@19.1.8)(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)': + '@react-native/virtualized-lists@0.80.0(@types/react@19.1.8)(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)': dependencies: invariant: 2.2.4 nullthrows: 1.1.1 react: 19.1.0 - react-native: 0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0) + react-native: 0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0) optionalDependencies: '@types/react': 19.1.8 @@ -16824,14 +16606,14 @@ snapshots: react: 19.1.0 react-konva: 19.0.6(@types/react@19.1.8)(konva@9.3.20)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@react-spring/native@10.0.1(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)': + '@react-spring/native@10.0.1(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)': dependencies: '@react-spring/animated': 10.0.1(react@19.1.0) '@react-spring/core': 10.0.1(react@19.1.0) '@react-spring/shared': 10.0.1(react@19.1.0) '@react-spring/types': 10.0.1 react: 19.1.0 - react-native: 0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0) + react-native: 0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0) '@react-spring/rafz@10.0.1': {} @@ -16841,13 +16623,13 @@ snapshots: '@react-spring/types': 10.0.1 react: 19.1.0 - '@react-spring/three@10.0.1(@react-three/fiber@9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0))(react@19.1.0)(three@0.177.0)': + '@react-spring/three@10.0.1(@react-three/fiber@9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0))(react@19.1.0)(three@0.177.0)': dependencies: '@react-spring/animated': 10.0.1(react@19.1.0) '@react-spring/core': 10.0.1(react@19.1.0) '@react-spring/shared': 10.0.1(react@19.1.0) '@react-spring/types': 10.0.1 - '@react-three/fiber': 9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0) + '@react-three/fiber': 9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0) react: 19.1.0 three: 0.177.0 @@ -16873,7 +16655,7 @@ snapshots: react-zdog: 1.2.2 zdog: 1.1.3 - '@react-three/fiber@9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0)': + '@react-three/fiber@9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0)': dependencies: '@babel/runtime': 7.28.2 '@types/react-reconciler': 0.28.9(@types/react@19.1.8) @@ -16891,7 +16673,7 @@ snapshots: zustand: 5.0.7(@types/react@19.1.8)(react@19.1.0)(use-sync-external-store@1.5.0(react@19.1.0)) optionalDependencies: react-dom: 19.1.0(react@19.1.0) - react-native: 0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0) + react-native: 0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0) transitivePeerDependencies: - '@types/react' - immer @@ -17178,7 +16960,7 @@ snapshots: '@slack/logger@4.0.0': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@slack/types@2.15.0': {} @@ -17186,7 +16968,7 @@ snapshots: dependencies: '@slack/logger': 4.0.0 '@slack/types': 2.15.0 - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/retry': 0.12.0 axios: 1.10.0 eventemitter3: 5.0.1 @@ -17768,63 +17550,33 @@ snapshots: '@swc/core-darwin-arm64@1.12.7': optional: true - '@swc/core-darwin-arm64@1.5.7': - optional: true - '@swc/core-darwin-x64@1.12.7': optional: true - '@swc/core-darwin-x64@1.5.7': - optional: true - '@swc/core-linux-arm-gnueabihf@1.12.7': optional: true - '@swc/core-linux-arm-gnueabihf@1.5.7': - optional: true - '@swc/core-linux-arm64-gnu@1.12.7': optional: true - '@swc/core-linux-arm64-gnu@1.5.7': - optional: true - '@swc/core-linux-arm64-musl@1.12.7': optional: true - '@swc/core-linux-arm64-musl@1.5.7': - optional: true - '@swc/core-linux-x64-gnu@1.12.7': optional: true - '@swc/core-linux-x64-gnu@1.5.7': - optional: true - '@swc/core-linux-x64-musl@1.12.7': optional: true - '@swc/core-linux-x64-musl@1.5.7': - optional: true - '@swc/core-win32-arm64-msvc@1.12.7': optional: true - '@swc/core-win32-arm64-msvc@1.5.7': - optional: true - '@swc/core-win32-ia32-msvc@1.12.7': optional: true - '@swc/core-win32-ia32-msvc@1.5.7': - optional: true - '@swc/core-win32-x64-msvc@1.12.7': optional: true - '@swc/core-win32-x64-msvc@1.5.7': - optional: true - '@swc/core@1.12.7': dependencies: '@swc/counter': 0.1.3 @@ -17841,36 +17593,12 @@ snapshots: '@swc/core-win32-ia32-msvc': 1.12.7 '@swc/core-win32-x64-msvc': 1.12.7 - '@swc/core@1.5.7(@swc/helpers@0.5.15)': - dependencies: - '@swc/counter': 0.1.3 - '@swc/types': 0.1.7 - optionalDependencies: - '@swc/core-darwin-arm64': 1.5.7 - '@swc/core-darwin-x64': 1.5.7 - '@swc/core-linux-arm-gnueabihf': 1.5.7 - '@swc/core-linux-arm64-gnu': 1.5.7 - '@swc/core-linux-arm64-musl': 1.5.7 - '@swc/core-linux-x64-gnu': 1.5.7 - '@swc/core-linux-x64-musl': 1.5.7 - '@swc/core-win32-arm64-msvc': 1.5.7 - '@swc/core-win32-ia32-msvc': 1.5.7 - '@swc/core-win32-x64-msvc': 1.5.7 - '@swc/helpers': 0.5.15 - '@swc/counter@0.1.3': {} '@swc/helpers@0.5.15': dependencies: tslib: 2.8.1 - '@swc/jest@0.2.36(@swc/core@1.5.7(@swc/helpers@0.5.15))': - dependencies: - '@jest/create-cache-key-function': 29.7.0 - '@swc/core': 1.5.7(@swc/helpers@0.5.15) - '@swc/counter': 0.1.3 - jsonc-parser: 3.3.1 - '@swc/jest@0.2.38(@swc/core@1.12.7)': dependencies: '@jest/create-cache-key-function': 29.7.0 @@ -17882,17 +17610,13 @@ snapshots: dependencies: '@swc/counter': 0.1.3 - '@swc/types@0.1.7': - dependencies: - '@swc/counter': 0.1.3 - '@tailwindcss/node@4.1.11': dependencies: '@ampproject/remapping': 2.3.0 enhanced-resolve: 5.18.2 jiti: 2.4.2 lightningcss: 1.30.1 - magic-string: 0.30.17 + magic-string: 0.30.19 source-map-js: 1.2.1 tailwindcss: 4.1.11 @@ -18152,7 +17876,7 @@ snapshots: '@types/adm-zip@0.5.7': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/aria-query@5.0.4': {} @@ -18182,7 +17906,7 @@ snapshots: '@types/body-parser@1.19.6': dependencies: '@types/connect': 3.4.38 - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/chai@5.2.2': dependencies: @@ -18190,15 +17914,15 @@ snapshots: '@types/cheerio@0.22.35': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/connect@3.4.38': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/cors@2.8.19': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/d3-array@3.2.1': {} @@ -18345,7 +18069,7 @@ snapshots: '@types/express-serve-static-core@5.0.6': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/qs': 6.14.0 '@types/range-parser': 1.2.7 '@types/send': 0.17.5 @@ -18362,7 +18086,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/hast@2.3.10': dependencies: @@ -18380,7 +18104,7 @@ snapshots: '@types/http-proxy@1.17.16': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/istanbul-lib-coverage@2.0.6': {} @@ -18392,11 +18116,6 @@ snapshots: dependencies: '@types/istanbul-lib-report': 3.0.3 - '@types/jest@29.5.12': - dependencies: - expect: 29.7.0 - pretty-format: 29.7.0 - '@types/jest@29.5.14': dependencies: expect: 29.7.0 @@ -18406,7 +18125,7 @@ snapshots: '@types/jsdom@20.0.1': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/tough-cookie': 4.0.5 parse5: 7.3.0 @@ -18426,7 +18145,7 @@ snapshots: '@types/node-fetch@2.6.12': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 form-data: 4.0.3 '@types/node@16.18.11': {} @@ -18496,12 +18215,12 @@ snapshots: '@types/send@0.17.5': dependencies: '@types/mime': 1.3.5 - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/serve-static@1.15.8': dependencies: '@types/http-errors': 2.0.5 - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@types/send': 0.17.5 '@types/stack-utils@2.0.3': {} @@ -18512,7 +18231,7 @@ snapshots: '@types/tar@6.1.13': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 minipass: 4.2.8 '@types/tough-cookie@4.0.5': {} @@ -18530,7 +18249,7 @@ snapshots: '@types/webpack@5.28.5(@swc/core@1.12.7)': dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 tapable: 2.2.2 webpack: 5.99.9(@swc/core@1.12.7) transitivePeerDependencies: @@ -18851,21 +18570,21 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.3(vite@6.3.5(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))': + '@vitest/mocker@3.2.3(vite@7.0.0(@types/node@20.19.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))': dependencies: '@vitest/spy': 3.2.3 estree-walker: 3.0.3 - magic-string: 0.30.17 + magic-string: 0.30.19 optionalDependencies: - vite: 6.3.5(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.0(@types/node@20.19.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) - '@vitest/mocker@3.2.4(vite@7.0.0(@types/node@20.17.17)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))': + '@vitest/mocker@3.2.3(vite@7.0.0(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))': dependencies: - '@vitest/spy': 3.2.4 + '@vitest/spy': 3.2.3 estree-walker: 3.0.3 - magic-string: 0.30.17 + magic-string: 0.30.19 optionalDependencies: - vite: 7.0.0(@types/node@20.17.17)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.0(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) '@vitest/mocker@3.2.4(vite@7.0.0(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))': dependencies: @@ -18906,7 +18625,7 @@ snapshots: '@vitest/snapshot@3.2.3': dependencies: '@vitest/pretty-format': 3.2.3 - magic-string: 0.30.17 + magic-string: 0.30.19 pathe: 2.0.3 '@vitest/snapshot@3.2.4': @@ -19412,7 +19131,6 @@ snapshots: slash: 3.0.0 transitivePeerDependencies: - supports-color - optional: true babel-plugin-istanbul@6.1.1: dependencies: @@ -19482,7 +19200,6 @@ snapshots: '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.28.0) '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.28.0) '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.28.0) - optional: true babel-preset-jest@29.6.3(@babel/core@7.27.7): dependencies: @@ -19495,7 +19212,6 @@ snapshots: '@babel/core': 7.28.0 babel-plugin-jest-hoist: 29.6.3 babel-preset-current-node-syntax: 1.1.0(@babel/core@7.28.0) - optional: true bail@2.0.2: {} @@ -19790,7 +19506,7 @@ snapshots: chrome-launcher@0.15.2: dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 escape-string-regexp: 4.0.0 is-wsl: 2.2.0 lighthouse-logger: 1.4.2 @@ -19801,7 +19517,7 @@ snapshots: chromium-edge-launcher@0.2.0: dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 escape-string-regexp: 4.0.0 is-wsl: 2.2.0 lighthouse-logger: 1.4.2 @@ -20036,21 +19752,6 @@ snapshots: js-yaml: 3.14.1 parse-json: 4.0.0 - create-jest@29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)): - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - create-jest@29.7.0(@types/node@20.19.1)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)): dependencies: '@jest/types': 29.6.3 @@ -21008,7 +20709,7 @@ snapshots: fix-dts-default-cjs-exports@1.0.1: dependencies: - magic-string: 0.30.17 + magic-string: 0.30.19 mlly: 1.7.4 rollup: 4.43.0 @@ -21804,7 +21505,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 chalk: 4.1.2 co: 4.6.0 dedent: 1.6.0 @@ -21824,25 +21525,6 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)): - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)) - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)) - exit: 0.1.2 - import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)) - jest-util: 29.7.0 - jest-validate: 29.7.0 - yargs: 17.7.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jest-cli@29.7.0(@types/node@20.19.1)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)): dependencies: '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)) @@ -21881,7 +21563,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)): + jest-config@29.7.0(@types/node@20.19.1)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)): dependencies: '@babel/core': 7.27.7 '@jest/test-sequencer': 29.7.0 @@ -21906,75 +21588,13 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 ts-node: 10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3)): - dependencies: - '@babel/core': 7.27.7 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.27.7) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.8 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 20.17.17 - ts-node: 10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - jest-config@29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)): - dependencies: - '@babel/core': 7.27.7 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.27.7) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.8 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 20.17.17 - ts-node: 10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - jest-config@29.7.0(@types/node@20.19.1)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)): + jest-config@29.7.0(@types/node@20.19.1)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3)): dependencies: '@babel/core': 7.27.7 '@jest/test-sequencer': 29.7.0 @@ -22000,7 +21620,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.19.1 - ts-node: 10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3) + ts-node: 10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -22077,7 +21697,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -22087,7 +21707,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.17.17 + '@types/node': 20.19.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -22102,7 +21722,7 @@ snapshots: jest-haste-map@30.0.2: dependencies: '@jest/types': 30.0.1 - '@types/node': 20.17.17 + '@types/node': 20.19.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -22114,17 +21734,6 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - jest-html-reporter@3.10.2(jest@29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)))(typescript@5.4.2): - dependencies: - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - dateformat: 3.0.2 - jest: 29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)) - mkdirp: 1.0.4 - strip-ansi: 6.0.1 - typescript: 5.4.2 - xmlbuilder: 15.0.0 - jest-html-reporter@4.3.0(jest@29.7.0(@types/node@22.15.33)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3)))(typescript@5.8.3): dependencies: '@jest/reporters': 30.0.2 @@ -22186,7 +21795,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -22223,7 +21832,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -22251,7 +21860,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 chalk: 4.1.2 cjs-module-lexer: 1.4.3 collect-v8-coverage: 1.0.2 @@ -22301,7 +21910,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -22310,7 +21919,7 @@ snapshots: jest-util@30.0.2: dependencies: '@jest/types': 30.0.1 - '@types/node': 20.17.17 + '@types/node': 20.19.1 chalk: 4.1.2 ci-info: 4.2.0 graceful-fs: 4.2.11 @@ -22329,7 +21938,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.17.17 + '@types/node': 20.19.1 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -22338,37 +21947,25 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@30.0.2: dependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 '@ungap/structured-clone': 1.3.0 jest-util: 30.0.2 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)): - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)) - '@jest/types': 29.6.3 - import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)) - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jest@29.7.0(@types/node@20.19.1)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)): dependencies: '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)) @@ -23706,7 +23303,7 @@ snapshots: - '@babel/core' - babel-plugin-macros - next@15.3.3(@babel/core@7.27.7)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + next@15.3.3(@babel/core@7.28.0)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: '@next/env': 15.3.3 '@swc/counter': 0.1.3 @@ -23716,7 +23313,7 @@ snapshots: postcss: 8.4.31 react: 19.1.0 react-dom: 19.1.0(react@19.1.0) - styled-jsx: 5.1.6(@babel/core@7.27.7)(react@19.1.0) + styled-jsx: 5.1.6(@babel/core@7.28.0)(react@19.1.0) optionalDependencies: '@next/swc-darwin-arm64': 15.3.3 '@next/swc-darwin-x64': 15.3.3 @@ -23887,12 +23484,12 @@ snapshots: optionalDependencies: next: 15.2.3(@babel/core@7.28.0)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - nuqs@2.4.3(next@15.3.3(@babel/core@7.27.7)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0): + nuqs@2.4.3(next@15.3.3(@babel/core@7.28.0)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0): dependencies: mitt: 3.0.1 react: 19.1.0 optionalDependencies: - next: 15.3.3(@babel/core@7.27.7)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + next: 15.3.3(@babel/core@7.28.0)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) nwsapi@2.2.20: {} @@ -24715,20 +24312,20 @@ snapshots: transitivePeerDependencies: - supports-color - react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0): + react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0): dependencies: '@jest/create-cache-key-function': 29.7.0 '@react-native/assets-registry': 0.80.0 - '@react-native/codegen': 0.80.0(@babel/core@7.27.7) + '@react-native/codegen': 0.80.0(@babel/core@7.28.0) '@react-native/community-cli-plugin': 0.80.0 '@react-native/gradle-plugin': 0.80.0 '@react-native/js-polyfills': 0.80.0 '@react-native/normalize-colors': 0.80.0 - '@react-native/virtualized-lists': 0.80.0(@types/react@19.1.8)(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0) + '@react-native/virtualized-lists': 0.80.0(@types/react@19.1.8)(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0) abort-controller: 3.0.0 anser: 1.4.10 ansi-regex: 5.0.1 - babel-jest: 29.7.0(@babel/core@7.27.7) + babel-jest: 29.7.0(@babel/core@7.28.0) babel-plugin-syntax-hermes-parser: 0.28.1 base64-js: 1.5.1 chalk: 4.1.2 @@ -24857,7 +24454,7 @@ snapshots: react: 19.1.0 react-dom: 19.1.0(react@19.1.0) - react-scan@0.3.4(@types/react@19.1.8)(next@15.3.3(@babel/core@7.27.7)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rollup@4.43.0): + react-scan@0.3.4(@types/react@19.1.8)(next@15.3.3(@babel/core@7.28.0)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rollup@4.43.0): dependencies: '@babel/core': 7.27.7 '@babel/generator': 7.27.5 @@ -24867,7 +24464,7 @@ snapshots: '@pivanov/utils': 0.0.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0) '@preact/signals': 1.3.2(preact@10.26.9) '@rollup/pluginutils': 5.2.0(rollup@4.43.0) - '@types/node': 20.17.17 + '@types/node': 20.19.1 bippy: 0.3.17(@types/react@19.1.8)(react@19.1.0) esbuild: 0.25.2 estree-walker: 3.0.3 @@ -24879,7 +24476,7 @@ snapshots: react-dom: 19.1.0(react@19.1.0) tsx: 4.20.3 optionalDependencies: - next: 15.3.3(@babel/core@7.27.7)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + next: 15.3.3(@babel/core@7.28.0)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) unplugin: 2.1.0 transitivePeerDependencies: - '@types/react' @@ -24894,12 +24491,12 @@ snapshots: react-dom: 19.1.0(react@19.1.0) react-transition-group: 4.4.5(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react-spring@10.0.1(@react-three/fiber@9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0))(konva@9.3.20)(react-dom@19.1.0(react@19.1.0))(react-konva@19.0.6(@types/react@19.1.8)(konva@9.3.20)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react-zdog@1.2.2)(react@19.1.0)(three@0.177.0)(zdog@1.1.3): + react-spring@10.0.1(@react-three/fiber@9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0))(konva@9.3.20)(react-dom@19.1.0(react@19.1.0))(react-konva@19.0.6(@types/react@19.1.8)(konva@9.3.20)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react-zdog@1.2.2)(react@19.1.0)(three@0.177.0)(zdog@1.1.3): dependencies: '@react-spring/core': 10.0.1(react@19.1.0) '@react-spring/konva': 10.0.1(konva@9.3.20)(react-konva@19.0.6(@types/react@19.1.8)(konva@9.3.20)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) - '@react-spring/native': 10.0.1(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0) - '@react-spring/three': 10.0.1(@react-three/fiber@9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.27.7)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0))(react@19.1.0)(three@0.177.0) + '@react-spring/native': 10.0.1(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0) + '@react-spring/three': 10.0.1(@react-three/fiber@9.1.2(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react-native@0.80.0(@babel/core@7.28.0)(@types/react@19.1.8)(react@19.1.0))(react@19.1.0)(three@0.177.0))(react@19.1.0)(three@0.177.0) '@react-spring/web': 10.0.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) '@react-spring/zdog': 10.0.1(react-dom@19.1.0(react@19.1.0))(react-zdog@1.2.2)(react@19.1.0)(zdog@1.1.3) react: 19.1.0 @@ -25816,13 +25413,6 @@ snapshots: dependencies: inline-style-parser: 0.2.4 - styled-jsx@5.1.6(@babel/core@7.27.7)(react@19.1.0): - dependencies: - client-only: 0.0.1 - react: 19.1.0 - optionalDependencies: - '@babel/core': 7.27.7 - styled-jsx@5.1.6(@babel/core@7.28.0)(react@19.1.0): dependencies: client-only: 0.0.1 @@ -26109,24 +25699,6 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.1.2(@babel/core@7.28.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.0))(esbuild@0.25.2)(jest@29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)))(typescript@5.4.2): - dependencies: - bs-logger: 0.2.6 - fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.17.17)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2)) - jest-util: 29.7.0 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.7.2 - typescript: 5.4.2 - yargs-parser: 21.1.1 - optionalDependencies: - '@babel/core': 7.28.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.28.0) - esbuild: 0.25.2 - ts-jest@29.4.0(@babel/core@7.27.7)(@jest/transform@30.0.2)(@jest/types@30.0.1)(babel-jest@29.7.0(@babel/core@7.27.7))(jest-util@30.0.2)(jest@29.7.0(@types/node@20.19.1)(ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3)))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 @@ -26182,7 +25754,7 @@ snapshots: '@ts-morph/common': 0.11.1 code-block-writer: 10.1.1 - ts-node-dev@2.0.0(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3): + ts-node-dev@2.0.0(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.4.2): dependencies: chokidar: 3.6.0 dynamic-dedupe: 0.3.0 @@ -26192,15 +25764,15 @@ snapshots: rimraf: 2.7.1 source-map-support: 0.5.21 tree-kill: 1.2.2 - ts-node: 10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3) + ts-node: 10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.4.2) tsconfig: 7.0.0 - typescript: 5.8.3 + typescript: 5.4.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' - '@types/node' - ts-node-dev@2.0.0(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2): + ts-node-dev@2.0.0(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3): dependencies: chokidar: 3.6.0 dynamic-dedupe: 0.3.0 @@ -26210,9 +25782,9 @@ snapshots: rimraf: 2.7.1 source-map-support: 0.5.21 tree-kill: 1.2.2 - ts-node: 10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2) + ts-node: 10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3) tsconfig: 7.0.0 - typescript: 5.4.2 + typescript: 5.8.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -26238,7 +25810,7 @@ snapshots: optionalDependencies: '@swc/core': 1.12.7 - ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3): + ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.4.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -26252,20 +25824,20 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.8.3 + typescript: 5.4.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: '@swc/core': 1.12.7 - ts-node@10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3): + ts-node@10.9.2(@swc/core@1.12.7)(@types/node@20.19.1)(typescript@5.8.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.15.33 + '@types/node': 20.19.1 acorn: 8.15.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -26278,14 +25850,14 @@ snapshots: optionalDependencies: '@swc/core': 1.12.7 - ts-node@10.9.2(@swc/core@1.12.7)(@types/node@24.0.3)(typescript@5.8.3): + ts-node@10.9.2(@swc/core@1.12.7)(@types/node@22.15.33)(typescript@5.8.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 24.0.3 + '@types/node': 22.15.33 acorn: 8.15.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -26298,25 +25870,25 @@ snapshots: optionalDependencies: '@swc/core': 1.12.7 - ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.15))(@types/node@20.17.17)(typescript@5.4.2): + ts-node@10.9.2(@swc/core@1.12.7)(@types/node@24.0.3)(typescript@5.8.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.17.17 + '@types/node': 24.0.3 acorn: 8.15.0 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.4.2 + typescript: 5.8.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - '@swc/core': 1.5.7(@swc/helpers@0.5.15) + '@swc/core': 1.12.7 ts-toolbelt@6.15.5: {} @@ -26715,6 +26287,27 @@ snapshots: d3-time: 3.1.0 d3-timer: 3.0.1 + vite-node@3.2.3(@types/node@20.19.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0): + dependencies: + cac: 6.7.14 + debug: 4.4.1(supports-color@8.1.1) + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 7.0.0(@types/node@20.19.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) + transitivePeerDependencies: + - '@types/node' + - jiti + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + vite-node@3.2.3(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0): dependencies: cac: 6.7.14 @@ -26801,7 +26394,7 @@ snapshots: dependencies: vite: 7.0.0(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) - vite@6.3.5(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0): + vite@7.0.0(@types/node@20.17.17)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0): dependencies: esbuild: 0.25.2 fdir: 6.4.6(picomatch@4.0.2) @@ -26810,7 +26403,7 @@ snapshots: rollup: 4.43.0 tinyglobby: 0.2.14 optionalDependencies: - '@types/node': 24.0.3 + '@types/node': 20.17.17 fsevents: 2.3.3 jiti: 2.5.1 lightningcss: 1.30.1 @@ -26818,7 +26411,7 @@ snapshots: tsx: 4.20.3 yaml: 2.8.0 - vite@7.0.0(@types/node@20.17.17)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0): + vite@7.0.0(@types/node@20.19.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0): dependencies: esbuild: 0.25.2 fdir: 6.4.6(picomatch@4.0.2) @@ -26827,7 +26420,7 @@ snapshots: rollup: 4.43.0 tinyglobby: 0.2.14 optionalDependencies: - '@types/node': 20.17.17 + '@types/node': 20.19.1 fsevents: 2.3.3 jiti: 2.5.1 lightningcss: 1.30.1 @@ -26852,11 +26445,55 @@ snapshots: tsx: 4.20.3 yaml: 2.8.0 + vitest@3.2.3(@edge-runtime/vm@3.2.0)(@types/debug@4.1.12)(@types/node@20.19.1)(jiti@2.5.1)(jsdom@20.0.3(canvas@2.11.2))(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0): + dependencies: + '@types/chai': 5.2.2 + '@vitest/expect': 3.2.3 + '@vitest/mocker': 3.2.3(vite@7.0.0(@types/node@20.19.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) + '@vitest/pretty-format': 3.2.4 + '@vitest/runner': 3.2.3 + '@vitest/snapshot': 3.2.3 + '@vitest/spy': 3.2.3 + '@vitest/utils': 3.2.3 + chai: 5.2.0 + debug: 4.4.1(supports-color@8.1.1) + expect-type: 1.2.1 + magic-string: 0.30.19 + pathe: 2.0.3 + picomatch: 4.0.2 + std-env: 3.9.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.14 + tinypool: 1.1.1 + tinyrainbow: 2.0.0 + vite: 7.0.0(@types/node@20.19.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) + vite-node: 3.2.3(@types/node@20.19.1)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@edge-runtime/vm': 3.2.0 + '@types/debug': 4.1.12 + '@types/node': 20.19.1 + jsdom: 20.0.3(canvas@2.11.2) + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + vitest@3.2.3(@edge-runtime/vm@3.2.0)(@types/debug@4.1.12)(@types/node@24.0.3)(jiti@2.5.1)(jsdom@20.0.3(canvas@2.11.2))(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.3 - '@vitest/mocker': 3.2.3(vite@6.3.5(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) + '@vitest/mocker': 3.2.3(vite@7.0.0(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.3 '@vitest/snapshot': 3.2.3 @@ -26865,7 +26502,7 @@ snapshots: chai: 5.2.0 debug: 4.4.1(supports-color@8.1.1) expect-type: 1.2.1 - magic-string: 0.30.17 + magic-string: 0.30.19 pathe: 2.0.3 picomatch: 4.0.2 std-env: 3.9.0 @@ -26874,7 +26511,7 @@ snapshots: tinyglobby: 0.2.14 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 6.3.5(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) + vite: 7.0.0(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) vite-node: 3.2.3(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) why-is-node-running: 2.3.0 optionalDependencies: @@ -26900,7 +26537,7 @@ snapshots: dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.0.0(@types/node@20.17.17)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) + '@vitest/mocker': 3.2.4(vite@7.0.0(@types/node@24.0.3)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4