orcaq 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +15 -0
- package/.output/public/_nuxt/8qASMGdV.js +1 -0
- package/.output/public/_nuxt/9lJACZIQ.js +19 -0
- package/.output/public/_nuxt/B2DnNiWd.js +1 -0
- package/.output/public/_nuxt/B6E6ObS_.js +8 -0
- package/.output/public/_nuxt/BH83_dXo.js +39 -0
- package/.output/public/_nuxt/BIKqrFbQ.js +1 -0
- package/.output/public/_nuxt/BNjPC06x.js +1 -0
- package/.output/public/_nuxt/BPQ-Pz1w.js +39 -0
- package/.output/public/_nuxt/BRpgKkVT.js +51 -0
- package/.output/public/_nuxt/BTCLPbPY.js +4 -0
- package/.output/public/_nuxt/BUV-RarV.js +1 -0
- package/.output/public/_nuxt/Bh6RgYlO.js +1 -0
- package/.output/public/_nuxt/Bq3cyzOD.js +1 -0
- package/.output/public/_nuxt/Bt9sU68B.js +9 -0
- package/.output/public/_nuxt/BwpH2ZxJ.js +1 -0
- package/.output/public/_nuxt/C25Tmn1m.js +1 -0
- package/.output/public/_nuxt/C2HlI1ss.js +1 -0
- package/.output/public/_nuxt/CU3ZV9iV.js +1 -0
- package/.output/public/_nuxt/CbcyysXi.js +1 -0
- package/.output/public/_nuxt/CepyvMhE.js +1 -0
- package/.output/public/_nuxt/CrgoNCm2.js +2 -0
- package/.output/public/_nuxt/CuBKbBH_.js +1 -0
- package/.output/public/_nuxt/CulD8qYQ.js +193 -0
- package/.output/public/_nuxt/CustomEdge.BNBpjEHb.css +1 -0
- package/.output/public/_nuxt/CylkLpwm.js +1 -0
- package/.output/public/_nuxt/D-bWLYHw.js +1 -0
- package/.output/public/_nuxt/D-zecHND.js +1 -0
- package/.output/public/_nuxt/D8vj6kFe.js +160 -0
- package/.output/public/_nuxt/DIETYtCL.js +1 -0
- package/.output/public/_nuxt/DJ4vUzxS.js +1 -0
- package/.output/public/_nuxt/DK-itzXx.js +8 -0
- package/.output/public/_nuxt/DL3T5jYo.js +3867 -0
- package/.output/public/_nuxt/DUsuhY9i.js +1 -0
- package/.output/public/_nuxt/DXV2HFBA.js +224 -0
- package/.output/public/_nuxt/Dh2zppOR.js +1 -0
- package/.output/public/_nuxt/DlAUqK2U.js +1 -0
- package/.output/public/_nuxt/DlmSeCnw.js +5 -0
- package/.output/public/_nuxt/DswTpYG4.js +1 -0
- package/.output/public/_nuxt/DynamicTable.DJeANwbG.css +1 -0
- package/.output/public/_nuxt/G830WtVn.js +1 -0
- package/.output/public/_nuxt/ICwM1E4-.js +15 -0
- package/.output/public/_nuxt/QZbJy9YW.js +31 -0
- package/.output/public/_nuxt/QuickQueryTable.DS_ON57S.css +1 -0
- package/.output/public/_nuxt/UXhX8z2W.js +1 -0
- package/.output/public/_nuxt/WrapperErdDiagram.DwhUd9Wr.css +1 -0
- package/.output/public/_nuxt/_fileId_.DmPfwyyD.css +1 -0
- package/.output/public/_nuxt/_tabViewId_.9Axt3zoi.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -0
- package/.output/public/_nuxt/builds/meta/6364d5cf-4642-479f-ba12-6440c56702af.json +1 -0
- package/.output/public/_nuxt/default.DixIpIal.css +1 -0
- package/.output/public/_nuxt/entry.GqPNPe1e.css +1 -0
- package/.output/public/_nuxt/index.CrXmf4gr.css +1 -0
- package/.output/public/_nuxt/ivUnXl9B.js +1 -0
- package/.output/public/_nuxt/pAheHeBV.js +36 -0
- package/.output/public/_nuxt/s5fCn4j5.js +1 -0
- package/.output/public/favicon.ico +0 -0
- package/.output/public/logo.png +0 -0
- package/.output/public/manifest.json +25 -0
- package/.output/public/robots.txt +1 -0
- package/.output/public/vite.svg +1 -0
- package/.output/server/chunks/_/error-500.mjs +8 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/.output/server/chunks/build/client.manifest.mjs +773 -0
- package/.output/server/chunks/build/client.manifest.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +6432 -0
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
- package/.output/server/chunks/routes/api/ai/chat.mjs +77 -0
- package/.output/server/chunks/routes/api/ai/chat.mjs.map +1 -0
- package/.output/server/chunks/routes/api/execute-bulk-delete.mjs +100 -0
- package/.output/server/chunks/routes/api/execute-bulk-delete.mjs.map +1 -0
- package/.output/server/chunks/routes/api/execute-bulk-update.mjs +105 -0
- package/.output/server/chunks/routes/api/execute-bulk-update.mjs.map +1 -0
- package/.output/server/chunks/routes/api/execute.mjs +47 -0
- package/.output/server/chunks/routes/api/execute.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-one-function.mjs +28 -0
- package/.output/server/chunks/routes/api/get-one-function.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-one-table.mjs +180 -0
- package/.output/server/chunks/routes/api/get-one-table.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-over-view-function.mjs +41 -0
- package/.output/server/chunks/routes/api/get-over-view-function.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-over-view-tables.mjs +53 -0
- package/.output/server/chunks/routes/api/get-over-view-tables.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-reverse-table-schemas.mjs +112 -0
- package/.output/server/chunks/routes/api/get-reverse-table-schemas.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-schema-meta-data.mjs +152 -0
- package/.output/server/chunks/routes/api/get-schema-meta-data.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-table-size.mjs +49 -0
- package/.output/server/chunks/routes/api/get-table-size.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-table-structure.mjs +111 -0
- package/.output/server/chunks/routes/api/get-table-structure.mjs.map +1 -0
- package/.output/server/chunks/routes/api/get-tables.mjs +287 -0
- package/.output/server/chunks/routes/api/get-tables.mjs.map +1 -0
- package/.output/server/chunks/routes/api/getMetricMonitor.mjs +46 -0
- package/.output/server/chunks/routes/api/getMetricMonitor.mjs.map +1 -0
- package/.output/server/chunks/routes/api/managment-connection/health-check.mjs +28 -0
- package/.output/server/chunks/routes/api/managment-connection/health-check.mjs.map +1 -0
- package/.output/server/chunks/routes/api/raw-execute.mjs +48 -0
- package/.output/server/chunks/routes/api/raw-execute.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +316 -0
- package/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/.output/server/index.mjs +14 -0
- package/.output/server/index.mjs.map +1 -0
- package/.output/server/node_modules/@ai-sdk/anthropic/dist/index.mjs +4374 -0
- package/.output/server/node_modules/@ai-sdk/anthropic/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/gateway/dist/index.mjs +1082 -0
- package/.output/server/node_modules/@ai-sdk/gateway/package.json +69 -0
- package/.output/server/node_modules/@ai-sdk/google/dist/index.mjs +2007 -0
- package/.output/server/node_modules/@ai-sdk/google/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/openai/dist/index.mjs +5956 -0
- package/.output/server/node_modules/@ai-sdk/openai/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/openai-compatible/dist/index.mjs +1551 -0
- package/.output/server/node_modules/@ai-sdk/openai-compatible/package.json +74 -0
- package/.output/server/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
- package/.output/server/node_modules/@ai-sdk/provider/package.json +57 -0
- package/.output/server/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2549 -0
- package/.output/server/node_modules/@ai-sdk/provider-utils/package.json +75 -0
- package/.output/server/node_modules/@ai-sdk/xai/dist/index.mjs +2214 -0
- package/.output/server/node_modules/@ai-sdk/xai/package.json +68 -0
- package/.output/server/node_modules/@babel/parser/lib/index.js +14246 -0
- package/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/index.mjs +350 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.mjs +188 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/common.mjs +90 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/format.mjs +38 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icon.mjs +76 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icons.mjs +168 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.mjs +14 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.mjs +33 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.mjs +51 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.mjs +84 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/data.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/format.mjs +44 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.mjs +58 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.mjs +231 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.mjs +31 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.mjs +164 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.mjs +216 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.mjs +113 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.mjs +104 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.mjs +34 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.mjs +75 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.mjs +97 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.mjs +54 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.mjs +97 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.mjs +45 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.mjs +105 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.mjs +54 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.mjs +24 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/merge.mjs +20 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/name.mjs +53 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/square.mjs +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.mjs +16 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.mjs +182 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.mjs +22 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.mjs +46 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.mjs +66 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.mjs +51 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.mjs +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.mjs +62 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.mjs +161 -0
- package/.output/server/node_modules/@iconify/utils/lib/index.mjs +64 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/custom.mjs +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/loader.mjs +59 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/modern.mjs +80 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/utils.mjs +92 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/objects.mjs +30 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/strings.mjs +17 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/title.mjs +5 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/build.mjs +119 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/defs.mjs +30 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.mjs +20 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/html.mjs +9 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/id.mjs +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.mjs +19 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/parse.mjs +83 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.mjs +70 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/size.mjs +40 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/trim.mjs +5 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/url.mjs +11 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.mjs +8 -0
- package/.output/server/node_modules/@iconify/utils/package.json +447 -0
- package/.output/server/node_modules/@ioredis/commands/built/commands.json +2447 -0
- package/.output/server/node_modules/@ioredis/commands/built/index.js +208 -0
- package/.output/server/node_modules/@ioredis/commands/package.json +52 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/context.js +81 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/diag.js +93 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/metrics.js +61 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/propagation.js +89 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/api/trace.js +79 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js +63 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js +55 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js +23 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/utils.js +51 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js +38 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/context/context.js +55 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/context-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js +59 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js +57 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js +45 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag/types.js +44 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/diag-api.js +29 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/index.js +81 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/internal/global-utils.js +64 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/internal/semver.js +122 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/Metric.js +25 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js +127 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js +31 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/metrics-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/platform/index.js +29 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js +22 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/platform/node/index.js +29 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js +34 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js +41 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/propagation-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js +69 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js +75 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js +32 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js +55 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js +54 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js +42 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/context-utils.js +82 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js +103 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js +46 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js +27 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/span_kind.js +46 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js +49 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/status.js +23 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js +26 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/trace-api.js +24 -0
- package/.output/server/node_modules/@opentelemetry/api/build/src/version.js +21 -0
- package/.output/server/node_modules/@opentelemetry/api/package.json +113 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Formatter.js +234 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Indentation.js +42 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/InlineBlock.js +60 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Params.js +21 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/Tokenizer.js +272 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/escapeRegExp.js +10 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/last.js +7 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/core/types.js +22 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/Db2Formatter.js +585 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/N1qlFormatter.js +257 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/PlSqlFormatter.js +459 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/StandardSqlFormatter.js +369 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/languages/utils/abstract.js +23 -0
- package/.output/server/node_modules/@sqltools/formatter/lib/sqlFormatter.js +34 -0
- package/.output/server/node_modules/@sqltools/formatter/package.json +59 -0
- package/.output/server/node_modules/@standard-schema/spec/dist/index.js +0 -0
- package/.output/server/node_modules/@standard-schema/spec/package.json +52 -0
- package/.output/server/node_modules/@vercel/oidc/dist/auth-config.js +84 -0
- package/.output/server/node_modules/@vercel/oidc/dist/get-context.js +34 -0
- package/.output/server/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js +80 -0
- package/.output/server/node_modules/@vercel/oidc/dist/index.js +33 -0
- package/.output/server/node_modules/@vercel/oidc/dist/oauth.js +88 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token-error.js +40 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token-io.js +78 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token-util.js +198 -0
- package/.output/server/node_modules/@vercel/oidc/dist/token.js +53 -0
- package/.output/server/node_modules/@vercel/oidc/package.json +52 -0
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6690 -0
- package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +686 -0
- package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1404 -0
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1789 -0
- package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6654 -0
- package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1669 -0
- package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +857 -0
- package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +594 -0
- package/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/.output/server/node_modules/ai/dist/index.mjs +12363 -0
- package/.output/server/node_modules/ai/package.json +106 -0
- package/.output/server/node_modules/ansis/index.js +1 -0
- package/.output/server/node_modules/ansis/package.json +28 -0
- package/.output/server/node_modules/app-root-path/index.js +4 -0
- package/.output/server/node_modules/app-root-path/lib/app-root-path.js +30 -0
- package/.output/server/node_modules/app-root-path/lib/resolve.js +128 -0
- package/.output/server/node_modules/app-root-path/package.json +66 -0
- package/.output/server/node_modules/balanced-match/index.js +62 -0
- package/.output/server/node_modules/balanced-match/package.json +48 -0
- package/.output/server/node_modules/bindings/bindings.js +221 -0
- package/.output/server/node_modules/bindings/package.json +28 -0
- package/.output/server/node_modules/brace-expansion/index.js +203 -0
- package/.output/server/node_modules/brace-expansion/package.json +46 -0
- package/.output/server/node_modules/cluster-key-slot/lib/index.js +166 -0
- package/.output/server/node_modules/cluster-key-slot/package.json +56 -0
- package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
- package/.output/server/node_modules/consola/dist/core.mjs +512 -0
- package/.output/server/node_modules/consola/dist/index.mjs +651 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
- package/.output/server/node_modules/consola/package.json +136 -0
- package/.output/server/node_modules/dayjs/dayjs.min.js +1 -0
- package/.output/server/node_modules/dayjs/package.json +84 -0
- package/.output/server/node_modules/debug/package.json +65 -0
- package/.output/server/node_modules/debug/src/browser.js +272 -0
- package/.output/server/node_modules/debug/src/common.js +292 -0
- package/.output/server/node_modules/debug/src/index.js +10 -0
- package/.output/server/node_modules/debug/src/node.js +263 -0
- package/.output/server/node_modules/dedent/dist/dedent.js +73 -0
- package/.output/server/node_modules/dedent/package.json +119 -0
- package/.output/server/node_modules/denque/index.js +481 -0
- package/.output/server/node_modules/denque/package.json +58 -0
- package/.output/server/node_modules/devalue/index.js +3 -0
- package/.output/server/node_modules/devalue/package.json +34 -0
- package/.output/server/node_modules/devalue/src/base64.js +110 -0
- package/.output/server/node_modules/devalue/src/constants.js +6 -0
- package/.output/server/node_modules/devalue/src/parse.js +160 -0
- package/.output/server/node_modules/devalue/src/stringify.js +232 -0
- package/.output/server/node_modules/devalue/src/uneval.js +351 -0
- package/.output/server/node_modules/devalue/src/utils.js +113 -0
- package/.output/server/node_modules/dotenv/lib/main.js +361 -0
- package/.output/server/node_modules/dotenv/package.json +61 -0
- package/.output/server/node_modules/entities/lib/decode.js +536 -0
- package/.output/server/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/.output/server/node_modules/entities/package.json +90 -0
- package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/.output/server/node_modules/estree-walker/package.json +37 -0
- package/.output/server/node_modules/eventsource-parser/dist/index.js +106 -0
- package/.output/server/node_modules/eventsource-parser/dist/stream.js +29 -0
- package/.output/server/node_modules/eventsource-parser/package.json +115 -0
- package/.output/server/node_modules/file-uri-to-path/index.js +66 -0
- package/.output/server/node_modules/file-uri-to-path/package.json +32 -0
- package/.output/server/node_modules/glob/dist/commonjs/glob.js +247 -0
- package/.output/server/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/.output/server/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/.output/server/node_modules/glob/dist/commonjs/index.js +68 -0
- package/.output/server/node_modules/glob/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/glob/dist/commonjs/pattern.js +219 -0
- package/.output/server/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/.output/server/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/.output/server/node_modules/glob/package.json +99 -0
- package/.output/server/node_modules/has-flag/index.js +8 -0
- package/.output/server/node_modules/has-flag/package.json +46 -0
- package/.output/server/node_modules/hookable/dist/index.mjs +290 -0
- package/.output/server/node_modules/hookable/package.json +49 -0
- package/.output/server/node_modules/inherits/inherits.js +9 -0
- package/.output/server/node_modules/inherits/inherits_browser.js +27 -0
- package/.output/server/node_modules/inherits/package.json +29 -0
- package/.output/server/node_modules/ioredis/built/Command.js +349 -0
- package/.output/server/node_modules/ioredis/built/DataHandler.js +220 -0
- package/.output/server/node_modules/ioredis/built/Pipeline.js +334 -0
- package/.output/server/node_modules/ioredis/built/Redis.js +697 -0
- package/.output/server/node_modules/ioredis/built/ScanStream.js +51 -0
- package/.output/server/node_modules/ioredis/built/Script.js +62 -0
- package/.output/server/node_modules/ioredis/built/SubscriptionSet.js +41 -0
- package/.output/server/node_modules/ioredis/built/autoPipelining.js +159 -0
- package/.output/server/node_modules/ioredis/built/cluster/ClusterOptions.js +22 -0
- package/.output/server/node_modules/ioredis/built/cluster/ClusterSubscriber.js +202 -0
- package/.output/server/node_modules/ioredis/built/cluster/ClusterSubscriberGroup.js +224 -0
- package/.output/server/node_modules/ioredis/built/cluster/ConnectionPool.js +154 -0
- package/.output/server/node_modules/ioredis/built/cluster/DelayQueue.js +53 -0
- package/.output/server/node_modules/ioredis/built/cluster/index.js +862 -0
- package/.output/server/node_modules/ioredis/built/cluster/util.js +100 -0
- package/.output/server/node_modules/ioredis/built/connectors/AbstractConnector.js +26 -0
- package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js +45 -0
- package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js +37 -0
- package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/index.js +305 -0
- package/.output/server/node_modules/ioredis/built/connectors/StandaloneConnector.js +69 -0
- package/.output/server/node_modules/ioredis/built/connectors/index.js +7 -0
- package/.output/server/node_modules/ioredis/built/constants/TLSProfiles.js +149 -0
- package/.output/server/node_modules/ioredis/built/errors/ClusterAllFailedError.js +15 -0
- package/.output/server/node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js +14 -0
- package/.output/server/node_modules/ioredis/built/errors/index.js +5 -0
- package/.output/server/node_modules/ioredis/built/index.js +62 -0
- package/.output/server/node_modules/ioredis/built/redis/RedisOptions.js +55 -0
- package/.output/server/node_modules/ioredis/built/redis/event_handler.js +292 -0
- package/.output/server/node_modules/ioredis/built/transaction.js +93 -0
- package/.output/server/node_modules/ioredis/built/utils/Commander.js +117 -0
- package/.output/server/node_modules/ioredis/built/utils/applyMixin.js +8 -0
- package/.output/server/node_modules/ioredis/built/utils/debug.js +95 -0
- package/.output/server/node_modules/ioredis/built/utils/index.js +297 -0
- package/.output/server/node_modules/ioredis/built/utils/lodash.js +9 -0
- package/.output/server/node_modules/ioredis/package.json +100 -0
- package/.output/server/node_modules/lodash.defaults/index.js +668 -0
- package/.output/server/node_modules/lodash.defaults/package.json +19 -0
- package/.output/server/node_modules/lodash.isarguments/index.js +229 -0
- package/.output/server/node_modules/lodash.isarguments/package.json +19 -0
- package/.output/server/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
- package/.output/server/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/lru-cache/package.json +116 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/ast.js +592 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/escape.js +22 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/index.js +1017 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
- package/.output/server/node_modules/minimatch/package.json +82 -0
- package/.output/server/node_modules/minipass/dist/commonjs/index.js +1028 -0
- package/.output/server/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/minipass/package.json +82 -0
- package/.output/server/node_modules/ms/index.js +162 -0
- package/.output/server/node_modules/ms/package.json +38 -0
- package/.output/server/node_modules/path-scurry/dist/commonjs/index.js +2014 -0
- package/.output/server/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/path-scurry/package.json +89 -0
- package/.output/server/node_modules/pg/lib/client.js +650 -0
- package/.output/server/node_modules/pg/lib/connection-parameters.js +167 -0
- package/.output/server/node_modules/pg/lib/connection.js +222 -0
- package/.output/server/node_modules/pg/lib/crypto/cert-signatures.js +121 -0
- package/.output/server/node_modules/pg/lib/crypto/sasl.js +212 -0
- package/.output/server/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
- package/.output/server/node_modules/pg/lib/crypto/utils-webcrypto.js +88 -0
- package/.output/server/node_modules/pg/lib/crypto/utils.js +9 -0
- package/.output/server/node_modules/pg/lib/defaults.js +84 -0
- package/.output/server/node_modules/pg/lib/index.js +58 -0
- package/.output/server/node_modules/pg/lib/native/client.js +307 -0
- package/.output/server/node_modules/pg/lib/native/index.js +2 -0
- package/.output/server/node_modules/pg/lib/native/query.js +168 -0
- package/.output/server/node_modules/pg/lib/query.js +253 -0
- package/.output/server/node_modules/pg/lib/result.js +108 -0
- package/.output/server/node_modules/pg/lib/stream.js +81 -0
- package/.output/server/node_modules/pg/lib/type-overrides.js +35 -0
- package/.output/server/node_modules/pg/lib/utils.js +206 -0
- package/.output/server/node_modules/pg/package.json +62 -0
- package/.output/server/node_modules/pg-cloudflare/dist/empty.js +4 -0
- package/.output/server/node_modules/pg-cloudflare/package.json +32 -0
- package/.output/server/node_modules/pg-connection-string/index.js +112 -0
- package/.output/server/node_modules/pg-connection-string/package.json +40 -0
- package/.output/server/node_modules/pg-cursor/index.js +265 -0
- package/.output/server/node_modules/pg-cursor/package.json +38 -0
- package/.output/server/node_modules/pg-int8/index.js +100 -0
- package/.output/server/node_modules/pg-int8/package.json +24 -0
- package/.output/server/node_modules/pg-pool/index.js +471 -0
- package/.output/server/node_modules/pg-pool/package.json +41 -0
- package/.output/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
- package/.output/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
- package/.output/server/node_modules/pg-protocol/dist/index.js +15 -0
- package/.output/server/node_modules/pg-protocol/dist/messages.js +160 -0
- package/.output/server/node_modules/pg-protocol/dist/parser.js +304 -0
- package/.output/server/node_modules/pg-protocol/dist/serializer.js +189 -0
- package/.output/server/node_modules/pg-protocol/package.json +35 -0
- package/.output/server/node_modules/pg-query-stream/dist/index.js +48 -0
- package/.output/server/node_modules/pg-query-stream/package.json +60 -0
- package/.output/server/node_modules/pg-types/index.js +47 -0
- package/.output/server/node_modules/pg-types/lib/arrayParser.js +11 -0
- package/.output/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
- package/.output/server/node_modules/pg-types/lib/builtins.js +73 -0
- package/.output/server/node_modules/pg-types/lib/textParsers.js +215 -0
- package/.output/server/node_modules/pg-types/package.json +42 -0
- package/.output/server/node_modules/pgpass/lib/helper.js +233 -0
- package/.output/server/node_modules/pgpass/lib/index.js +23 -0
- package/.output/server/node_modules/pgpass/package.json +41 -0
- package/.output/server/node_modules/postgres-array/index.js +97 -0
- package/.output/server/node_modules/postgres-array/package.json +35 -0
- package/.output/server/node_modules/postgres-bytea/index.js +31 -0
- package/.output/server/node_modules/postgres-bytea/package.json +34 -0
- package/.output/server/node_modules/postgres-date/index.js +116 -0
- package/.output/server/node_modules/postgres-date/package.json +33 -0
- package/.output/server/node_modules/postgres-interval/index.js +125 -0
- package/.output/server/node_modules/postgres-interval/package.json +36 -0
- package/.output/server/node_modules/redis-errors/index.js +7 -0
- package/.output/server/node_modules/redis-errors/lib/modern.js +59 -0
- package/.output/server/node_modules/redis-errors/lib/old.js +119 -0
- package/.output/server/node_modules/redis-errors/package.json +41 -0
- package/.output/server/node_modules/redis-parser/index.js +3 -0
- package/.output/server/node_modules/redis-parser/lib/parser.js +552 -0
- package/.output/server/node_modules/redis-parser/package.json +53 -0
- package/.output/server/node_modules/reflect-metadata/Reflect.js +1415 -0
- package/.output/server/node_modules/reflect-metadata/package.json +68 -0
- package/.output/server/node_modules/safe-buffer/index.js +65 -0
- package/.output/server/node_modules/safe-buffer/package.json +51 -0
- package/.output/server/node_modules/sha.js/hash.js +81 -0
- package/.output/server/node_modules/sha.js/index.js +15 -0
- package/.output/server/node_modules/sha.js/package.json +30 -0
- package/.output/server/node_modules/sha.js/sha.js +94 -0
- package/.output/server/node_modules/sha.js/sha1.js +99 -0
- package/.output/server/node_modules/sha.js/sha224.js +53 -0
- package/.output/server/node_modules/sha.js/sha256.js +135 -0
- package/.output/server/node_modules/sha.js/sha384.js +57 -0
- package/.output/server/node_modules/sha.js/sha512.js +260 -0
- package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
- package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
- package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
- package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
- package/.output/server/node_modules/source-map-js/package.json +71 -0
- package/.output/server/node_modules/source-map-js/source-map.js +8 -0
- package/.output/server/node_modules/split2/index.js +141 -0
- package/.output/server/node_modules/split2/package.json +39 -0
- package/.output/server/node_modules/sql-highlight/lib/escapeHtml.js +59 -0
- package/.output/server/node_modules/sql-highlight/lib/index.js +85 -0
- package/.output/server/node_modules/sql-highlight/lib/keywords.js +145 -0
- package/.output/server/node_modules/sql-highlight/package.json +49 -0
- package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node +0 -0
- package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node.bak +0 -0
- package/.output/server/node_modules/sqlite3/lib/sqlite3-binding.js +1 -0
- package/.output/server/node_modules/sqlite3/lib/sqlite3.js +207 -0
- package/.output/server/node_modules/sqlite3/lib/trace.js +38 -0
- package/.output/server/node_modules/sqlite3/package.json +89 -0
- package/.output/server/node_modules/standard-as-callback/built/index.js +41 -0
- package/.output/server/node_modules/standard-as-callback/built/utils.js +23 -0
- package/.output/server/node_modules/standard-as-callback/package.json +40 -0
- package/.output/server/node_modules/supports-color/index.js +152 -0
- package/.output/server/node_modules/supports-color/package.json +58 -0
- package/.output/server/node_modules/tslib/package.json +47 -0
- package/.output/server/node_modules/tslib/tslib.js +484 -0
- package/.output/server/node_modules/typeorm/cache/DbQueryResultCache.js +264 -0
- package/.output/server/node_modules/typeorm/cache/QueryResultCacheFactory.js +42 -0
- package/.output/server/node_modules/typeorm/cache/RedisQueryResultCache.js +197 -0
- package/.output/server/node_modules/typeorm/common/DeepPartial.js +4 -0
- package/.output/server/node_modules/typeorm/common/EntityTarget.js +4 -0
- package/.output/server/node_modules/typeorm/common/MixedList.js +4 -0
- package/.output/server/node_modules/typeorm/common/ObjectLiteral.js +4 -0
- package/.output/server/node_modules/typeorm/common/ObjectType.js +4 -0
- package/.output/server/node_modules/typeorm/common/RelationType.js +4 -0
- package/.output/server/node_modules/typeorm/connection/Connection.js +16 -0
- package/.output/server/node_modules/typeorm/connection/ConnectionManager.js +66 -0
- package/.output/server/node_modules/typeorm/connection/ConnectionMetadataBuilder.js +74 -0
- package/.output/server/node_modules/typeorm/connection/ConnectionOptionsReader.js +198 -0
- package/.output/server/node_modules/typeorm/connection/options-reader/ConnectionOptionsEnvReader.js +111 -0
- package/.output/server/node_modules/typeorm/container.js +60 -0
- package/.output/server/node_modules/typeorm/data-source/DataSource.js +517 -0
- package/.output/server/node_modules/typeorm/decorator/Check.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/EntityRepository.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/Exclusion.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/ForeignKey.js +44 -0
- package/.output/server/node_modules/typeorm/decorator/Generated.js +24 -0
- package/.output/server/node_modules/typeorm/decorator/Index.js +56 -0
- package/.output/server/node_modules/typeorm/decorator/Unique.js +50 -0
- package/.output/server/node_modules/typeorm/decorator/columns/Column.js +78 -0
- package/.output/server/node_modules/typeorm/decorator/columns/CreateDateColumn.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/columns/DeleteDateColumn.js +20 -0
- package/.output/server/node_modules/typeorm/decorator/columns/ObjectIdColumn.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/columns/PrimaryColumn.js +63 -0
- package/.output/server/node_modules/typeorm/decorator/columns/PrimaryGeneratedColumn.js +59 -0
- package/.output/server/node_modules/typeorm/decorator/columns/UpdateDateColumn.js +20 -0
- package/.output/server/node_modules/typeorm/decorator/columns/VersionColumn.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/columns/ViewColumn.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/columns/VirtualColumn.js +49 -0
- package/.output/server/node_modules/typeorm/decorator/entity/ChildEntity.js +25 -0
- package/.output/server/node_modules/typeorm/decorator/entity/Entity.js +31 -0
- package/.output/server/node_modules/typeorm/decorator/entity/TableInheritance.js +22 -0
- package/.output/server/node_modules/typeorm/decorator/entity-view/ViewEntity.js +32 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterInsert.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterLoad.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterRecover.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterSoftRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/AfterUpdate.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeInsert.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeRecover.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeSoftRemove.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/BeforeUpdate.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/listeners/EventSubscriber.js +17 -0
- package/.output/server/node_modules/typeorm/decorator/options/ColumnOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/EntityOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/IndexOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/JoinColumnOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/JoinTableOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/RelationOptions.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/options/ValueTransformer.js +4 -0
- package/.output/server/node_modules/typeorm/decorator/relations/JoinColumn.js +27 -0
- package/.output/server/node_modules/typeorm/decorator/relations/JoinTable.js +34 -0
- package/.output/server/node_modules/typeorm/decorator/relations/ManyToMany.js +46 -0
- package/.output/server/node_modules/typeorm/decorator/relations/ManyToOne.js +46 -0
- package/.output/server/node_modules/typeorm/decorator/relations/OneToMany.js +37 -0
- package/.output/server/node_modules/typeorm/decorator/relations/OneToOne.js +45 -0
- package/.output/server/node_modules/typeorm/decorator/relations/RelationCount.js +23 -0
- package/.output/server/node_modules/typeorm/decorator/relations/RelationId.js +22 -0
- package/.output/server/node_modules/typeorm/decorator/tree/Tree.js +21 -0
- package/.output/server/node_modules/typeorm/decorator/tree/TreeChildren.js +34 -0
- package/.output/server/node_modules/typeorm/decorator/tree/TreeLevelColumn.js +19 -0
- package/.output/server/node_modules/typeorm/decorator/tree/TreeParent.js +33 -0
- package/.output/server/node_modules/typeorm/driver/DriverFactory.js +98 -0
- package/.output/server/node_modules/typeorm/driver/DriverUtils.js +228 -0
- package/.output/server/node_modules/typeorm/driver/Query.js +16 -0
- package/.output/server/node_modules/typeorm/driver/SqlInMemory.js +15 -0
- package/.output/server/node_modules/typeorm/driver/aurora-mysql/AuroraMysqlDriver.js +847 -0
- package/.output/server/node_modules/typeorm/driver/aurora-mysql/AuroraMysqlQueryRunner.js +1709 -0
- package/.output/server/node_modules/typeorm/driver/aurora-postgres/AuroraPostgresDriver.js +103 -0
- package/.output/server/node_modules/typeorm/driver/aurora-postgres/AuroraPostgresQueryRunner.js +146 -0
- package/.output/server/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3Driver.js +153 -0
- package/.output/server/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js +126 -0
- package/.output/server/node_modules/typeorm/driver/capacitor/CapacitorDriver.js +78 -0
- package/.output/server/node_modules/typeorm/driver/capacitor/CapacitorQueryRunner.js +98 -0
- package/.output/server/node_modules/typeorm/driver/cockroachdb/CockroachDriver.js +885 -0
- package/.output/server/node_modules/typeorm/driver/cockroachdb/CockroachQueryRunner.js +2453 -0
- package/.output/server/node_modules/typeorm/driver/cordova/CordovaDriver.js +76 -0
- package/.output/server/node_modules/typeorm/driver/cordova/CordovaQueryRunner.js +170 -0
- package/.output/server/node_modules/typeorm/driver/expo/ExpoDriver.js +29 -0
- package/.output/server/node_modules/typeorm/driver/expo/ExpoDriverFactory.js +22 -0
- package/.output/server/node_modules/typeorm/driver/expo/ExpoQueryRunner.js +65 -0
- package/.output/server/node_modules/typeorm/driver/expo/legacy/ExpoLegacyDriver.js +75 -0
- package/.output/server/node_modules/typeorm/driver/expo/legacy/ExpoLegacyQueryRunner.js +169 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/MongoDriver.js +404 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/MongoQueryRunner.js +701 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/bson.typings.js +5 -0
- package/.output/server/node_modules/typeorm/driver/mongodb/typings.js +23 -0
- package/.output/server/node_modules/typeorm/driver/mysql/MysqlDriver.js +1105 -0
- package/.output/server/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js +2139 -0
- package/.output/server/node_modules/typeorm/driver/nativescript/NativescriptDriver.js +94 -0
- package/.output/server/node_modules/typeorm/driver/nativescript/NativescriptQueryRunner.js +92 -0
- package/.output/server/node_modules/typeorm/driver/oracle/OracleDriver.js +869 -0
- package/.output/server/node_modules/typeorm/driver/oracle/OracleQueryRunner.js +1884 -0
- package/.output/server/node_modules/typeorm/driver/postgres/PostgresDriver.js +1259 -0
- package/.output/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js +2729 -0
- package/.output/server/node_modules/typeorm/driver/react-native/ReactNativeDriver.js +728 -0
- package/.output/server/node_modules/typeorm/driver/react-native/ReactNativeQueryRunner.js +107 -0
- package/.output/server/node_modules/typeorm/driver/sap/SapDriver.js +681 -0
- package/.output/server/node_modules/typeorm/driver/sap/SapQueryRunner.js +2054 -0
- package/.output/server/node_modules/typeorm/driver/spanner/SpannerDriver.js +613 -0
- package/.output/server/node_modules/typeorm/driver/spanner/SpannerQueryRunner.js +1464 -0
- package/.output/server/node_modules/typeorm/driver/sqlite/SqliteDriver.js +174 -0
- package/.output/server/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js +124 -0
- package/.output/server/node_modules/typeorm/driver/sqlite-abstract/AbstractSqliteDriver.js +695 -0
- package/.output/server/node_modules/typeorm/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +1511 -0
- package/.output/server/node_modules/typeorm/driver/sqljs/SqljsDriver.js +250 -0
- package/.output/server/node_modules/typeorm/driver/sqljs/SqljsQueryRunner.js +123 -0
- package/.output/server/node_modules/typeorm/driver/sqlserver/MssqlParameter.js +23 -0
- package/.output/server/node_modules/typeorm/driver/sqlserver/SqlServerDriver.js +922 -0
- package/.output/server/node_modules/typeorm/driver/sqlserver/SqlServerQueryRunner.js +2484 -0
- package/.output/server/node_modules/typeorm/driver/types/DatabaseType.js +4 -0
- package/.output/server/node_modules/typeorm/driver/types/GeoJsonTypes.js +4 -0
- package/.output/server/node_modules/typeorm/driver/types/MetadataTableType.js +11 -0
- package/.output/server/node_modules/typeorm/driver/types/ReplicationMode.js +4 -0
- package/.output/server/node_modules/typeorm/entity-manager/EntityManager.js +853 -0
- package/.output/server/node_modules/typeorm/entity-manager/EntityManagerFactory.js +24 -0
- package/.output/server/node_modules/typeorm/entity-manager/MongoEntityManager.js +668 -0
- package/.output/server/node_modules/typeorm/entity-manager/SqljsEntityManager.js +44 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchema.js +15 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaEmbeddedColumnOptions.js +8 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaEmbeddedError.js +18 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaOptions.js +11 -0
- package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaTransformer.js +333 -0
- package/.output/server/node_modules/typeorm/error/AlreadyHasActiveConnectionError.js +16 -0
- package/.output/server/node_modules/typeorm/error/CannotAttachTreeChildrenEntityError.js +16 -0
- package/.output/server/node_modules/typeorm/error/CannotConnectAlreadyConnectedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CannotCreateEntityIdMapError.js +21 -0
- package/.output/server/node_modules/typeorm/error/CannotDetermineEntityError.js +16 -0
- package/.output/server/node_modules/typeorm/error/CannotExecuteNotConnectedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CannotGetEntityManagerNotConnectedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CannotReflectMethodParameterTypeError.js +18 -0
- package/.output/server/node_modules/typeorm/error/CircularRelationsError.js +16 -0
- package/.output/server/node_modules/typeorm/error/ColumnTypeUndefinedError.js +19 -0
- package/.output/server/node_modules/typeorm/error/ConnectionIsNotSetError.js +15 -0
- package/.output/server/node_modules/typeorm/error/ConnectionNotFoundError.js +15 -0
- package/.output/server/node_modules/typeorm/error/CustomRepositoryCannotInheritRepositoryError.js +18 -0
- package/.output/server/node_modules/typeorm/error/CustomRepositoryDoesNotHaveEntityError.js +18 -0
- package/.output/server/node_modules/typeorm/error/CustomRepositoryNotFoundError.js +18 -0
- package/.output/server/node_modules/typeorm/error/DataTypeNotSupportedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/DriverOptionNotSetError.js +16 -0
- package/.output/server/node_modules/typeorm/error/DriverPackageNotInstalledError.js +16 -0
- package/.output/server/node_modules/typeorm/error/EntityMetadataNotFoundError.js +29 -0
- package/.output/server/node_modules/typeorm/error/EntityNotFoundError.js +42 -0
- package/.output/server/node_modules/typeorm/error/EntityPropertyNotFoundError.js +17 -0
- package/.output/server/node_modules/typeorm/error/FindRelationsNotFoundError.js +23 -0
- package/.output/server/node_modules/typeorm/error/ForbiddenTransactionModeOverrideError.js +16 -0
- package/.output/server/node_modules/typeorm/error/InitializedRelationError.js +20 -0
- package/.output/server/node_modules/typeorm/error/InsertValuesMissingError.js +16 -0
- package/.output/server/node_modules/typeorm/error/LimitOnUpdateNotSupportedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/LockNotSupportedOnGivenDriverError.js +15 -0
- package/.output/server/node_modules/typeorm/error/MetadataAlreadyExistsError.js +18 -0
- package/.output/server/node_modules/typeorm/error/MetadataWithSuchNameAlreadyExistsError.js +16 -0
- package/.output/server/node_modules/typeorm/error/MissingDeleteDateColumnError.js +12 -0
- package/.output/server/node_modules/typeorm/error/MissingDriverError.js +16 -0
- package/.output/server/node_modules/typeorm/error/MissingJoinColumnError.js +23 -0
- package/.output/server/node_modules/typeorm/error/MissingJoinTableError.js +23 -0
- package/.output/server/node_modules/typeorm/error/MissingPrimaryColumnError.js +13 -0
- package/.output/server/node_modules/typeorm/error/MustBeEntityError.js +15 -0
- package/.output/server/node_modules/typeorm/error/NestedSetMultipleRootError.js +12 -0
- package/.output/server/node_modules/typeorm/error/NoConnectionForRepositoryError.js +16 -0
- package/.output/server/node_modules/typeorm/error/NoConnectionOptionError.js +16 -0
- package/.output/server/node_modules/typeorm/error/NoNeedToReleaseEntityManagerError.js +17 -0
- package/.output/server/node_modules/typeorm/error/NoVersionOrUpdateDateColumnError.js +15 -0
- package/.output/server/node_modules/typeorm/error/OffsetWithoutLimitNotSupportedError.js +17 -0
- package/.output/server/node_modules/typeorm/error/OptimisticLockCanNotBeUsedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/OptimisticLockVersionMismatchError.js +15 -0
- package/.output/server/node_modules/typeorm/error/PersistedEntityNotFoundError.js +15 -0
- package/.output/server/node_modules/typeorm/error/PessimisticLockTransactionRequiredError.js +15 -0
- package/.output/server/node_modules/typeorm/error/PrimaryColumnCannotBeNullableError.js +13 -0
- package/.output/server/node_modules/typeorm/error/QueryFailedError.js +30 -0
- package/.output/server/node_modules/typeorm/error/QueryRunnerAlreadyReleasedError.js +12 -0
- package/.output/server/node_modules/typeorm/error/QueryRunnerProviderAlreadyReleasedError.js +16 -0
- package/.output/server/node_modules/typeorm/error/RepositoryNotTreeError.js +32 -0
- package/.output/server/node_modules/typeorm/error/ReturningStatementNotSupportedError.js +16 -0
- package/.output/server/node_modules/typeorm/error/SubjectRemovedAndUpdatedError.js +16 -0
- package/.output/server/node_modules/typeorm/error/SubjectWithoutIdentifierError.js +17 -0
- package/.output/server/node_modules/typeorm/error/TransactionAlreadyStartedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/TransactionNotStartedError.js +15 -0
- package/.output/server/node_modules/typeorm/error/TreeRepositoryNotSupportedError.js +12 -0
- package/.output/server/node_modules/typeorm/error/TypeORMError.js +23 -0
- package/.output/server/node_modules/typeorm/error/UpdateValuesMissingError.js +12 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinColumnIsNotAllowedError.js +13 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinColumnOnlyOnOneSideAllowedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinTableIsNotAllowedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/UsingJoinTableOnlyOnOneSideAllowedError.js +14 -0
- package/.output/server/node_modules/typeorm/error/index.js +66 -0
- package/.output/server/node_modules/typeorm/find-options/EqualOperator.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/FindManyOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOneOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOperator.js +96 -0
- package/.output/server/node_modules/typeorm/find-options/FindOperatorType.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsOrder.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsRelations.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsSelect.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsUtils.js +350 -0
- package/.output/server/node_modules/typeorm/find-options/FindOptionsWhere.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/FindTreeOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/JoinOptions.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/OrderByCondition.js +4 -0
- package/.output/server/node_modules/typeorm/find-options/operator/And.js +9 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Any.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ArrayContainedBy.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ArrayContains.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ArrayOverlap.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Between.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Equal.js +17 -0
- package/.output/server/node_modules/typeorm/find-options/operator/ILike.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/In.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/IsNull.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/JsonContains.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/LessThan.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/LessThanOrEqual.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Like.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/MoreThan.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/MoreThanOrEqual.js +13 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Not.js +14 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Or.js +9 -0
- package/.output/server/node_modules/typeorm/find-options/operator/Raw.js +12 -0
- package/.output/server/node_modules/typeorm/globals.js +182 -0
- package/.output/server/node_modules/typeorm/index.js +196 -0
- package/.output/server/node_modules/typeorm/index.mjs +422 -0
- package/.output/server/node_modules/typeorm/logger/AbstractLogger.js +238 -0
- package/.output/server/node_modules/typeorm/logger/AdvancedConsoleLogger.js +56 -0
- package/.output/server/node_modules/typeorm/logger/DebugLogger.js +78 -0
- package/.output/server/node_modules/typeorm/logger/FileLogger.js +88 -0
- package/.output/server/node_modules/typeorm/logger/FormattedConsoleLogger.js +59 -0
- package/.output/server/node_modules/typeorm/logger/Logger.js +4 -0
- package/.output/server/node_modules/typeorm/logger/LoggerFactory.js +39 -0
- package/.output/server/node_modules/typeorm/logger/LoggerOptions.js +4 -0
- package/.output/server/node_modules/typeorm/logger/SimpleConsoleLogger.js +57 -0
- package/.output/server/node_modules/typeorm/metadata/CheckMetadata.js +35 -0
- package/.output/server/node_modules/typeorm/metadata/ColumnMetadata.js +618 -0
- package/.output/server/node_modules/typeorm/metadata/EmbeddedMetadata.js +224 -0
- package/.output/server/node_modules/typeorm/metadata/EntityListenerMetadata.js +77 -0
- package/.output/server/node_modules/typeorm/metadata/EntityMetadata.js +692 -0
- package/.output/server/node_modules/typeorm/metadata/ExclusionMetadata.js +35 -0
- package/.output/server/node_modules/typeorm/metadata/ForeignKeyMetadata.js +57 -0
- package/.output/server/node_modules/typeorm/metadata/IndexMetadata.js +144 -0
- package/.output/server/node_modules/typeorm/metadata/RelationCountMetadata.js +39 -0
- package/.output/server/node_modules/typeorm/metadata/RelationIdMetadata.js +62 -0
- package/.output/server/node_modules/typeorm/metadata/RelationMetadata.js +440 -0
- package/.output/server/node_modules/typeorm/metadata/UniqueMetadata.js +101 -0
- package/.output/server/node_modules/typeorm/metadata/types/EventListenerTypes.js +22 -0
- package/.output/server/node_modules/typeorm/metadata-args/MetadataArgsStorage.js +236 -0
- package/.output/server/node_modules/typeorm/metadata-builder/ClosureJunctionEntityMetadataBuilder.js +145 -0
- package/.output/server/node_modules/typeorm/metadata-builder/EntityMetadataBuilder.js +838 -0
- package/.output/server/node_modules/typeorm/metadata-builder/EntityMetadataValidator.js +258 -0
- package/.output/server/node_modules/typeorm/metadata-builder/JunctionEntityMetadataBuilder.js +287 -0
- package/.output/server/node_modules/typeorm/metadata-builder/MetadataUtils.js +44 -0
- package/.output/server/node_modules/typeorm/metadata-builder/RelationJoinColumnBuilder.js +185 -0
- package/.output/server/node_modules/typeorm/migration/Migration.js +21 -0
- package/.output/server/node_modules/typeorm/migration/MigrationExecutor.js +534 -0
- package/.output/server/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.js +145 -0
- package/.output/server/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.js +50 -0
- package/.output/server/node_modules/typeorm/package.json +268 -0
- package/.output/server/node_modules/typeorm/persistence/EntityPersistExecutor.js +170 -0
- package/.output/server/node_modules/typeorm/persistence/Subject.js +239 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectChangedColumnsComputer.js +216 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectDatabaseEntityLoader.js +135 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectExecutor.js +760 -0
- package/.output/server/node_modules/typeorm/persistence/SubjectTopologicalSorter.js +174 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/CascadesSubjectBuilder.js +107 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/ManyToManySubjectBuilder.js +218 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js +181 -0
- package/.output/server/node_modules/typeorm/persistence/subject-builder/OneToOneInverseSideSubjectBuilder.js +155 -0
- package/.output/server/node_modules/typeorm/persistence/tree/ClosureSubjectExecutor.js +241 -0
- package/.output/server/node_modules/typeorm/persistence/tree/MaterializedPathSubjectExecutor.js +125 -0
- package/.output/server/node_modules/typeorm/persistence/tree/NestedSetSubjectExecutor.js +271 -0
- package/.output/server/node_modules/typeorm/platform/PlatformTools.js +243 -0
- package/.output/server/node_modules/typeorm/query-builder/Alias.js +29 -0
- package/.output/server/node_modules/typeorm/query-builder/Brackets.js +19 -0
- package/.output/server/node_modules/typeorm/query-builder/DeleteQueryBuilder.js +200 -0
- package/.output/server/node_modules/typeorm/query-builder/InsertQueryBuilder.js +745 -0
- package/.output/server/node_modules/typeorm/query-builder/JoinAttribute.js +175 -0
- package/.output/server/node_modules/typeorm/query-builder/NotBrackets.js +17 -0
- package/.output/server/node_modules/typeorm/query-builder/QueryBuilder.js +1139 -0
- package/.output/server/node_modules/typeorm/query-builder/QueryBuilderUtils.js +32 -0
- package/.output/server/node_modules/typeorm/query-builder/QueryExpressionMap.js +328 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationIdLoader.js +503 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationLoader.js +283 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationQueryBuilder.js +155 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationRemover.js +143 -0
- package/.output/server/node_modules/typeorm/query-builder/RelationUpdater.js +152 -0
- package/.output/server/node_modules/typeorm/query-builder/ReturningResultsEntityUpdator.js +176 -0
- package/.output/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js +2656 -0
- package/.output/server/node_modules/typeorm/query-builder/SoftDeleteQueryBuilder.js +368 -0
- package/.output/server/node_modules/typeorm/query-builder/UpdateQueryBuilder.js +498 -0
- package/.output/server/node_modules/typeorm/query-builder/index.js +20 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountAttribute.js +80 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountLoader.js +168 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountMetadataToAttributeTransformer.js +55 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdAttribute.js +88 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdLoader.js +275 -0
- package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdMetadataToAttributeTransformer.js +55 -0
- package/.output/server/node_modules/typeorm/query-builder/result/DeleteResult.js +17 -0
- package/.output/server/node_modules/typeorm/query-builder/result/InsertResult.js +28 -0
- package/.output/server/node_modules/typeorm/query-builder/result/UpdateResult.js +29 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/DocumentToEntityTransformer.js +196 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js +112 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/PlainObjectToNewEntityTransformer.js +92 -0
- package/.output/server/node_modules/typeorm/query-builder/transformer/RawSqlResultsToEntityTransformer.js +447 -0
- package/.output/server/node_modules/typeorm/query-runner/BaseQueryRunner.js +454 -0
- package/.output/server/node_modules/typeorm/query-runner/QueryLock.js +28 -0
- package/.output/server/node_modules/typeorm/query-runner/QueryResult.js +17 -0
- package/.output/server/node_modules/typeorm/repository/AbstractRepository.js +92 -0
- package/.output/server/node_modules/typeorm/repository/BaseEntity.js +328 -0
- package/.output/server/node_modules/typeorm/repository/MongoRepository.js +305 -0
- package/.output/server/node_modules/typeorm/repository/RemoveOptions.js +4 -0
- package/.output/server/node_modules/typeorm/repository/Repository.js +379 -0
- package/.output/server/node_modules/typeorm/repository/SaveOptions.js +4 -0
- package/.output/server/node_modules/typeorm/repository/TreeRepository.js +255 -0
- package/.output/server/node_modules/typeorm/schema-builder/MongoSchemaBuilder.js +66 -0
- package/.output/server/node_modules/typeorm/schema-builder/RdbmsSchemaBuilder.js +929 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableCheckOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableColumnOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableExclusionOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableForeignKeyOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableIndexOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/TableUniqueOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/options/ViewOptions.js +4 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/Table.js +296 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableCheck.js +49 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableColumn.js +117 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableExclusion.js +43 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableForeignKey.js +72 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableIndex.js +68 -0
- package/.output/server/node_modules/typeorm/schema-builder/table/TableUnique.js +50 -0
- package/.output/server/node_modules/typeorm/schema-builder/util/TableUtils.js +41 -0
- package/.output/server/node_modules/typeorm/schema-builder/util/ViewUtils.js +27 -0
- package/.output/server/node_modules/typeorm/schema-builder/view/View.js +71 -0
- package/.output/server/node_modules/typeorm/subscriber/Broadcaster.js +660 -0
- package/.output/server/node_modules/typeorm/subscriber/BroadcasterResult.js +30 -0
- package/.output/server/node_modules/typeorm/subscriber/event/QueryEvent.js +4 -0
- package/.output/server/node_modules/typeorm/util/ApplyValueTransformers.js +25 -0
- package/.output/server/node_modules/typeorm/util/DateUtils.js +229 -0
- package/.output/server/node_modules/typeorm/util/DepGraph.js +230 -0
- package/.output/server/node_modules/typeorm/util/DirectoryExportedClassesLoader.js +65 -0
- package/.output/server/node_modules/typeorm/util/ImportUtils.js +66 -0
- package/.output/server/node_modules/typeorm/util/InstanceChecker.js +104 -0
- package/.output/server/node_modules/typeorm/util/ObjectUtils.js +49 -0
- package/.output/server/node_modules/typeorm/util/OrmUtils.js +443 -0
- package/.output/server/node_modules/typeorm/util/PathUtils.js +33 -0
- package/.output/server/node_modules/typeorm/util/RandomGenerator.js +154 -0
- package/.output/server/node_modules/typeorm/util/SqlTagUtils.js +43 -0
- package/.output/server/node_modules/typeorm/util/StringUtils.js +113 -0
- package/.output/server/node_modules/typeorm/util/TreeRepositoryUtils.js +67 -0
- package/.output/server/node_modules/typeorm/util/VersionUtils.js +27 -0
- package/.output/server/node_modules/typeorm/util/escapeRegExp.js +10 -0
- package/.output/server/node_modules/ufo/dist/index.mjs +630 -0
- package/.output/server/node_modules/ufo/package.json +47 -0
- package/.output/server/node_modules/unhead/dist/plugins.mjs +94 -0
- package/.output/server/node_modules/unhead/dist/server.mjs +220 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.C13swrCa.mjs +48 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.Cp0iF6eN.mjs +177 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DGkFBTYv.mjs +172 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DZbvapt-.mjs +70 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DeCxexjU.mjs +166 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
- package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
- package/.output/server/node_modules/unhead/package.json +101 -0
- package/.output/server/node_modules/uuid/dist/cjs/index.js +31 -0
- package/.output/server/node_modules/uuid/dist/cjs/max.js +3 -0
- package/.output/server/node_modules/uuid/dist/cjs/md5.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/native.js +4 -0
- package/.output/server/node_modules/uuid/dist/cjs/nil.js +3 -0
- package/.output/server/node_modules/uuid/dist/cjs/package.json +1 -0
- package/.output/server/node_modules/uuid/dist/cjs/parse.js +11 -0
- package/.output/server/node_modules/uuid/dist/cjs/regex.js +3 -0
- package/.output/server/node_modules/uuid/dist/cjs/rng.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/sha1.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/stringify.js +39 -0
- package/.output/server/node_modules/uuid/dist/cjs/v1.js +87 -0
- package/.output/server/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/v3.js +14 -0
- package/.output/server/node_modules/uuid/dist/cjs/v35.js +41 -0
- package/.output/server/node_modules/uuid/dist/cjs/v4.js +29 -0
- package/.output/server/node_modules/uuid/dist/cjs/v5.js +14 -0
- package/.output/server/node_modules/uuid/dist/cjs/v6.js +19 -0
- package/.output/server/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
- package/.output/server/node_modules/uuid/dist/cjs/v7.js +69 -0
- package/.output/server/node_modules/uuid/dist/cjs/validate.js +7 -0
- package/.output/server/node_modules/uuid/dist/cjs/version.js +10 -0
- package/.output/server/node_modules/uuid/package.json +132 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/.output/server/node_modules/vue/index.js +7 -0
- package/.output/server/node_modules/vue/index.mjs +1 -0
- package/.output/server/node_modules/vue/package.json +112 -0
- package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +196 -0
- package/.output/server/node_modules/vue-bundle-renderer/package.json +50 -0
- package/.output/server/node_modules/xtend/mutable.js +17 -0
- package/.output/server/node_modules/xtend/package.json +55 -0
- package/.output/server/node_modules/zod/index.js +4 -0
- package/.output/server/node_modules/zod/package.json +135 -0
- package/.output/server/node_modules/zod/v3/ZodError.js +133 -0
- package/.output/server/node_modules/zod/v3/errors.js +9 -0
- package/.output/server/node_modules/zod/v3/external.js +6 -0
- package/.output/server/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/.output/server/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/.output/server/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/.output/server/node_modules/zod/v3/helpers/util.js +133 -0
- package/.output/server/node_modules/zod/v3/index.js +4 -0
- package/.output/server/node_modules/zod/v3/locales/en.js +109 -0
- package/.output/server/node_modules/zod/v3/package.json +6 -0
- package/.output/server/node_modules/zod/v3/types.js +3695 -0
- package/.output/server/node_modules/zod/v4/classic/checks.js +1 -0
- package/.output/server/node_modules/zod/v4/classic/coerce.js +17 -0
- package/.output/server/node_modules/zod/v4/classic/compat.js +31 -0
- package/.output/server/node_modules/zod/v4/classic/errors.js +48 -0
- package/.output/server/node_modules/zod/v4/classic/external.js +20 -0
- package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/.output/server/node_modules/zod/v4/classic/index.js +4 -0
- package/.output/server/node_modules/zod/v4/classic/iso.js +30 -0
- package/.output/server/node_modules/zod/v4/classic/package.json +6 -0
- package/.output/server/node_modules/zod/v4/classic/parse.js +15 -0
- package/.output/server/node_modules/zod/v4/classic/schemas.js +1157 -0
- package/.output/server/node_modules/zod/v4/core/api.js +1082 -0
- package/.output/server/node_modules/zod/v4/core/checks.js +575 -0
- package/.output/server/node_modules/zod/v4/core/core.js +76 -0
- package/.output/server/node_modules/zod/v4/core/doc.js +35 -0
- package/.output/server/node_modules/zod/v4/core/errors.js +182 -0
- package/.output/server/node_modules/zod/v4/core/index.js +16 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/.output/server/node_modules/zod/v4/core/json-schema.js +1 -0
- package/.output/server/node_modules/zod/v4/core/package.json +6 -0
- package/.output/server/node_modules/zod/v4/core/parse.js +93 -0
- package/.output/server/node_modules/zod/v4/core/regexes.js +133 -0
- package/.output/server/node_modules/zod/v4/core/registries.js +51 -0
- package/.output/server/node_modules/zod/v4/core/schemas.js +2095 -0
- package/.output/server/node_modules/zod/v4/core/to-json-schema.js +437 -0
- package/.output/server/node_modules/zod/v4/core/util.js +651 -0
- package/.output/server/node_modules/zod/v4/core/versions.js +5 -0
- package/.output/server/node_modules/zod/v4/index.js +3 -0
- package/.output/server/node_modules/zod/v4/locales/ar.js +106 -0
- package/.output/server/node_modules/zod/v4/locales/az.js +105 -0
- package/.output/server/node_modules/zod/v4/locales/be.js +156 -0
- package/.output/server/node_modules/zod/v4/locales/bg.js +120 -0
- package/.output/server/node_modules/zod/v4/locales/ca.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/cs.js +111 -0
- package/.output/server/node_modules/zod/v4/locales/da.js +115 -0
- package/.output/server/node_modules/zod/v4/locales/de.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/en.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/eo.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/es.js +132 -0
- package/.output/server/node_modules/zod/v4/locales/fa.js +114 -0
- package/.output/server/node_modules/zod/v4/locales/fi.js +112 -0
- package/.output/server/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/fr.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/he.js +214 -0
- package/.output/server/node_modules/zod/v4/locales/hu.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/hy.js +147 -0
- package/.output/server/node_modules/zod/v4/locales/id.js +106 -0
- package/.output/server/node_modules/zod/v4/locales/index.js +49 -0
- package/.output/server/node_modules/zod/v4/locales/is.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/it.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ja.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/ka.js +112 -0
- package/.output/server/node_modules/zod/v4/locales/kh.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/km.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/ko.js +111 -0
- package/.output/server/node_modules/zod/v4/locales/lt.js +203 -0
- package/.output/server/node_modules/zod/v4/locales/mk.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/ms.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/nl.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/no.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ota.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/package.json +6 -0
- package/.output/server/node_modules/zod/v4/locales/pl.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/ps.js +114 -0
- package/.output/server/node_modules/zod/v4/locales/pt.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ru.js +156 -0
- package/.output/server/node_modules/zod/v4/locales/sl.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/sv.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/ta.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/th.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/tr.js +105 -0
- package/.output/server/node_modules/zod/v4/locales/ua.js +5 -0
- package/.output/server/node_modules/zod/v4/locales/uk.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/ur.js +110 -0
- package/.output/server/node_modules/zod/v4/locales/uz.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/vi.js +108 -0
- package/.output/server/node_modules/zod/v4/locales/yo.js +107 -0
- package/.output/server/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/.output/server/node_modules/zod/v4/package.json +6 -0
- package/.output/server/package.json +95 -0
- package/README.md +46 -0
- package/bin/cli.mjs +113 -0
- package/bin/entry.cjs +84 -0
- package/package.json +48 -0
|
@@ -0,0 +1,1551 @@
|
|
|
1
|
+
// src/chat/openai-compatible-chat-language-model.ts
|
|
2
|
+
import {
|
|
3
|
+
InvalidResponseDataError
|
|
4
|
+
} from "@ai-sdk/provider";
|
|
5
|
+
import {
|
|
6
|
+
combineHeaders,
|
|
7
|
+
createEventSourceResponseHandler,
|
|
8
|
+
createJsonErrorResponseHandler,
|
|
9
|
+
createJsonResponseHandler,
|
|
10
|
+
generateId,
|
|
11
|
+
isParsableJson,
|
|
12
|
+
parseProviderOptions,
|
|
13
|
+
postJsonToApi
|
|
14
|
+
} from "@ai-sdk/provider-utils";
|
|
15
|
+
import { z as z3 } from "zod/v4";
|
|
16
|
+
|
|
17
|
+
// src/openai-compatible-error.ts
|
|
18
|
+
import { z } from "zod/v4";
|
|
19
|
+
var openaiCompatibleErrorDataSchema = z.object({
|
|
20
|
+
error: z.object({
|
|
21
|
+
message: z.string(),
|
|
22
|
+
// The additional information below is handled loosely to support
|
|
23
|
+
// OpenAI-compatible providers that have slightly different error
|
|
24
|
+
// responses:
|
|
25
|
+
type: z.string().nullish(),
|
|
26
|
+
param: z.any().nullish(),
|
|
27
|
+
code: z.union([z.string(), z.number()]).nullish()
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
var defaultOpenAICompatibleErrorStructure = {
|
|
31
|
+
errorSchema: openaiCompatibleErrorDataSchema,
|
|
32
|
+
errorToMessage: (data) => data.error.message
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/chat/convert-openai-compatible-chat-usage.ts
|
|
36
|
+
function convertOpenAICompatibleChatUsage(usage) {
|
|
37
|
+
var _a, _b, _c, _d, _e, _f;
|
|
38
|
+
if (usage == null) {
|
|
39
|
+
return {
|
|
40
|
+
inputTokens: {
|
|
41
|
+
total: void 0,
|
|
42
|
+
noCache: void 0,
|
|
43
|
+
cacheRead: void 0,
|
|
44
|
+
cacheWrite: void 0
|
|
45
|
+
},
|
|
46
|
+
outputTokens: {
|
|
47
|
+
total: void 0,
|
|
48
|
+
text: void 0,
|
|
49
|
+
reasoning: void 0
|
|
50
|
+
},
|
|
51
|
+
raw: void 0
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;
|
|
55
|
+
const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;
|
|
56
|
+
const cacheReadTokens = (_d = (_c = usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0;
|
|
57
|
+
const reasoningTokens = (_f = (_e = usage.completion_tokens_details) == null ? void 0 : _e.reasoning_tokens) != null ? _f : 0;
|
|
58
|
+
return {
|
|
59
|
+
inputTokens: {
|
|
60
|
+
total: promptTokens,
|
|
61
|
+
noCache: promptTokens - cacheReadTokens,
|
|
62
|
+
cacheRead: cacheReadTokens,
|
|
63
|
+
cacheWrite: void 0
|
|
64
|
+
},
|
|
65
|
+
outputTokens: {
|
|
66
|
+
total: completionTokens,
|
|
67
|
+
text: completionTokens - reasoningTokens,
|
|
68
|
+
reasoning: reasoningTokens
|
|
69
|
+
},
|
|
70
|
+
raw: usage
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// src/chat/convert-to-openai-compatible-chat-messages.ts
|
|
75
|
+
import {
|
|
76
|
+
UnsupportedFunctionalityError
|
|
77
|
+
} from "@ai-sdk/provider";
|
|
78
|
+
import { convertToBase64 } from "@ai-sdk/provider-utils";
|
|
79
|
+
function getOpenAIMetadata(message) {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
return (_b = (_a = message == null ? void 0 : message.providerOptions) == null ? void 0 : _a.openaiCompatible) != null ? _b : {};
|
|
82
|
+
}
|
|
83
|
+
function convertToOpenAICompatibleChatMessages(prompt) {
|
|
84
|
+
var _a;
|
|
85
|
+
const messages = [];
|
|
86
|
+
for (const { role, content, ...message } of prompt) {
|
|
87
|
+
const metadata = getOpenAIMetadata({ ...message });
|
|
88
|
+
switch (role) {
|
|
89
|
+
case "system": {
|
|
90
|
+
messages.push({ role: "system", content, ...metadata });
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
case "user": {
|
|
94
|
+
if (content.length === 1 && content[0].type === "text") {
|
|
95
|
+
messages.push({
|
|
96
|
+
role: "user",
|
|
97
|
+
content: content[0].text,
|
|
98
|
+
...getOpenAIMetadata(content[0])
|
|
99
|
+
});
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
messages.push({
|
|
103
|
+
role: "user",
|
|
104
|
+
content: content.map((part) => {
|
|
105
|
+
const partMetadata = getOpenAIMetadata(part);
|
|
106
|
+
switch (part.type) {
|
|
107
|
+
case "text": {
|
|
108
|
+
return { type: "text", text: part.text, ...partMetadata };
|
|
109
|
+
}
|
|
110
|
+
case "file": {
|
|
111
|
+
if (part.mediaType.startsWith("image/")) {
|
|
112
|
+
const mediaType = part.mediaType === "image/*" ? "image/jpeg" : part.mediaType;
|
|
113
|
+
return {
|
|
114
|
+
type: "image_url",
|
|
115
|
+
image_url: {
|
|
116
|
+
url: part.data instanceof URL ? part.data.toString() : `data:${mediaType};base64,${convertToBase64(part.data)}`
|
|
117
|
+
},
|
|
118
|
+
...partMetadata
|
|
119
|
+
};
|
|
120
|
+
} else {
|
|
121
|
+
throw new UnsupportedFunctionalityError({
|
|
122
|
+
functionality: `file part media type ${part.mediaType}`
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}),
|
|
128
|
+
...metadata
|
|
129
|
+
});
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
case "assistant": {
|
|
133
|
+
let text = "";
|
|
134
|
+
const toolCalls = [];
|
|
135
|
+
for (const part of content) {
|
|
136
|
+
const partMetadata = getOpenAIMetadata(part);
|
|
137
|
+
switch (part.type) {
|
|
138
|
+
case "text": {
|
|
139
|
+
text += part.text;
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
case "tool-call": {
|
|
143
|
+
toolCalls.push({
|
|
144
|
+
id: part.toolCallId,
|
|
145
|
+
type: "function",
|
|
146
|
+
function: {
|
|
147
|
+
name: part.toolName,
|
|
148
|
+
arguments: JSON.stringify(part.input)
|
|
149
|
+
},
|
|
150
|
+
...partMetadata
|
|
151
|
+
});
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
messages.push({
|
|
157
|
+
role: "assistant",
|
|
158
|
+
content: text,
|
|
159
|
+
tool_calls: toolCalls.length > 0 ? toolCalls : void 0,
|
|
160
|
+
...metadata
|
|
161
|
+
});
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
case "tool": {
|
|
165
|
+
for (const toolResponse of content) {
|
|
166
|
+
if (toolResponse.type === "tool-approval-response") {
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
const output = toolResponse.output;
|
|
170
|
+
let contentValue;
|
|
171
|
+
switch (output.type) {
|
|
172
|
+
case "text":
|
|
173
|
+
case "error-text":
|
|
174
|
+
contentValue = output.value;
|
|
175
|
+
break;
|
|
176
|
+
case "execution-denied":
|
|
177
|
+
contentValue = (_a = output.reason) != null ? _a : "Tool execution denied.";
|
|
178
|
+
break;
|
|
179
|
+
case "content":
|
|
180
|
+
case "json":
|
|
181
|
+
case "error-json":
|
|
182
|
+
contentValue = JSON.stringify(output.value);
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
const toolResponseMetadata = getOpenAIMetadata(toolResponse);
|
|
186
|
+
messages.push({
|
|
187
|
+
role: "tool",
|
|
188
|
+
tool_call_id: toolResponse.toolCallId,
|
|
189
|
+
content: contentValue,
|
|
190
|
+
...toolResponseMetadata
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
default: {
|
|
196
|
+
const _exhaustiveCheck = role;
|
|
197
|
+
throw new Error(`Unsupported role: ${_exhaustiveCheck}`);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return messages;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// src/chat/get-response-metadata.ts
|
|
205
|
+
function getResponseMetadata({
|
|
206
|
+
id,
|
|
207
|
+
model,
|
|
208
|
+
created
|
|
209
|
+
}) {
|
|
210
|
+
return {
|
|
211
|
+
id: id != null ? id : void 0,
|
|
212
|
+
modelId: model != null ? model : void 0,
|
|
213
|
+
timestamp: created != null ? new Date(created * 1e3) : void 0
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// src/chat/map-openai-compatible-finish-reason.ts
|
|
218
|
+
function mapOpenAICompatibleFinishReason(finishReason) {
|
|
219
|
+
switch (finishReason) {
|
|
220
|
+
case "stop":
|
|
221
|
+
return "stop";
|
|
222
|
+
case "length":
|
|
223
|
+
return "length";
|
|
224
|
+
case "content_filter":
|
|
225
|
+
return "content-filter";
|
|
226
|
+
case "function_call":
|
|
227
|
+
case "tool_calls":
|
|
228
|
+
return "tool-calls";
|
|
229
|
+
default:
|
|
230
|
+
return "other";
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// src/chat/openai-compatible-chat-options.ts
|
|
235
|
+
import { z as z2 } from "zod/v4";
|
|
236
|
+
var openaiCompatibleProviderOptions = z2.object({
|
|
237
|
+
/**
|
|
238
|
+
* A unique identifier representing your end-user, which can help the provider to
|
|
239
|
+
* monitor and detect abuse.
|
|
240
|
+
*/
|
|
241
|
+
user: z2.string().optional(),
|
|
242
|
+
/**
|
|
243
|
+
* Reasoning effort for reasoning models. Defaults to `medium`.
|
|
244
|
+
*/
|
|
245
|
+
reasoningEffort: z2.string().optional(),
|
|
246
|
+
/**
|
|
247
|
+
* Controls the verbosity of the generated text. Defaults to `medium`.
|
|
248
|
+
*/
|
|
249
|
+
textVerbosity: z2.string().optional()
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
// src/chat/openai-compatible-prepare-tools.ts
|
|
253
|
+
import {
|
|
254
|
+
UnsupportedFunctionalityError as UnsupportedFunctionalityError2
|
|
255
|
+
} from "@ai-sdk/provider";
|
|
256
|
+
function prepareTools({
|
|
257
|
+
tools,
|
|
258
|
+
toolChoice
|
|
259
|
+
}) {
|
|
260
|
+
tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
|
|
261
|
+
const toolWarnings = [];
|
|
262
|
+
if (tools == null) {
|
|
263
|
+
return { tools: void 0, toolChoice: void 0, toolWarnings };
|
|
264
|
+
}
|
|
265
|
+
const openaiCompatTools = [];
|
|
266
|
+
for (const tool of tools) {
|
|
267
|
+
if (tool.type === "provider") {
|
|
268
|
+
toolWarnings.push({
|
|
269
|
+
type: "unsupported",
|
|
270
|
+
feature: `provider-defined tool ${tool.id}`
|
|
271
|
+
});
|
|
272
|
+
} else {
|
|
273
|
+
openaiCompatTools.push({
|
|
274
|
+
type: "function",
|
|
275
|
+
function: {
|
|
276
|
+
name: tool.name,
|
|
277
|
+
description: tool.description,
|
|
278
|
+
parameters: tool.inputSchema,
|
|
279
|
+
...tool.strict != null ? { strict: tool.strict } : {}
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
if (toolChoice == null) {
|
|
285
|
+
return { tools: openaiCompatTools, toolChoice: void 0, toolWarnings };
|
|
286
|
+
}
|
|
287
|
+
const type = toolChoice.type;
|
|
288
|
+
switch (type) {
|
|
289
|
+
case "auto":
|
|
290
|
+
case "none":
|
|
291
|
+
case "required":
|
|
292
|
+
return { tools: openaiCompatTools, toolChoice: type, toolWarnings };
|
|
293
|
+
case "tool":
|
|
294
|
+
return {
|
|
295
|
+
tools: openaiCompatTools,
|
|
296
|
+
toolChoice: {
|
|
297
|
+
type: "function",
|
|
298
|
+
function: { name: toolChoice.toolName }
|
|
299
|
+
},
|
|
300
|
+
toolWarnings
|
|
301
|
+
};
|
|
302
|
+
default: {
|
|
303
|
+
const _exhaustiveCheck = type;
|
|
304
|
+
throw new UnsupportedFunctionalityError2({
|
|
305
|
+
functionality: `tool choice type: ${_exhaustiveCheck}`
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// src/chat/openai-compatible-chat-language-model.ts
|
|
312
|
+
var OpenAICompatibleChatLanguageModel = class {
|
|
313
|
+
// type inferred via constructor
|
|
314
|
+
constructor(modelId, config) {
|
|
315
|
+
this.specificationVersion = "v3";
|
|
316
|
+
var _a, _b;
|
|
317
|
+
this.modelId = modelId;
|
|
318
|
+
this.config = config;
|
|
319
|
+
const errorStructure = (_a = config.errorStructure) != null ? _a : defaultOpenAICompatibleErrorStructure;
|
|
320
|
+
this.chunkSchema = createOpenAICompatibleChatChunkSchema(
|
|
321
|
+
errorStructure.errorSchema
|
|
322
|
+
);
|
|
323
|
+
this.failedResponseHandler = createJsonErrorResponseHandler(errorStructure);
|
|
324
|
+
this.supportsStructuredOutputs = (_b = config.supportsStructuredOutputs) != null ? _b : false;
|
|
325
|
+
}
|
|
326
|
+
get provider() {
|
|
327
|
+
return this.config.provider;
|
|
328
|
+
}
|
|
329
|
+
get providerOptionsName() {
|
|
330
|
+
return this.config.provider.split(".")[0].trim();
|
|
331
|
+
}
|
|
332
|
+
get supportedUrls() {
|
|
333
|
+
var _a, _b, _c;
|
|
334
|
+
return (_c = (_b = (_a = this.config).supportedUrls) == null ? void 0 : _b.call(_a)) != null ? _c : {};
|
|
335
|
+
}
|
|
336
|
+
async getArgs({
|
|
337
|
+
prompt,
|
|
338
|
+
maxOutputTokens,
|
|
339
|
+
temperature,
|
|
340
|
+
topP,
|
|
341
|
+
topK,
|
|
342
|
+
frequencyPenalty,
|
|
343
|
+
presencePenalty,
|
|
344
|
+
providerOptions,
|
|
345
|
+
stopSequences,
|
|
346
|
+
responseFormat,
|
|
347
|
+
seed,
|
|
348
|
+
toolChoice,
|
|
349
|
+
tools
|
|
350
|
+
}) {
|
|
351
|
+
var _a, _b, _c, _d;
|
|
352
|
+
const warnings = [];
|
|
353
|
+
const compatibleOptions = Object.assign(
|
|
354
|
+
(_a = await parseProviderOptions({
|
|
355
|
+
provider: "openai-compatible",
|
|
356
|
+
providerOptions,
|
|
357
|
+
schema: openaiCompatibleProviderOptions
|
|
358
|
+
})) != null ? _a : {},
|
|
359
|
+
(_b = await parseProviderOptions({
|
|
360
|
+
provider: this.providerOptionsName,
|
|
361
|
+
providerOptions,
|
|
362
|
+
schema: openaiCompatibleProviderOptions
|
|
363
|
+
})) != null ? _b : {}
|
|
364
|
+
);
|
|
365
|
+
if (topK != null) {
|
|
366
|
+
warnings.push({ type: "unsupported", feature: "topK" });
|
|
367
|
+
}
|
|
368
|
+
if ((responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !this.supportsStructuredOutputs) {
|
|
369
|
+
warnings.push({
|
|
370
|
+
type: "unsupported",
|
|
371
|
+
feature: "responseFormat",
|
|
372
|
+
details: "JSON response format schema is only supported with structuredOutputs"
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
const {
|
|
376
|
+
tools: openaiTools,
|
|
377
|
+
toolChoice: openaiToolChoice,
|
|
378
|
+
toolWarnings
|
|
379
|
+
} = prepareTools({
|
|
380
|
+
tools,
|
|
381
|
+
toolChoice
|
|
382
|
+
});
|
|
383
|
+
return {
|
|
384
|
+
args: {
|
|
385
|
+
// model id:
|
|
386
|
+
model: this.modelId,
|
|
387
|
+
// model specific settings:
|
|
388
|
+
user: compatibleOptions.user,
|
|
389
|
+
// standardized settings:
|
|
390
|
+
max_tokens: maxOutputTokens,
|
|
391
|
+
temperature,
|
|
392
|
+
top_p: topP,
|
|
393
|
+
frequency_penalty: frequencyPenalty,
|
|
394
|
+
presence_penalty: presencePenalty,
|
|
395
|
+
response_format: (responseFormat == null ? void 0 : responseFormat.type) === "json" ? this.supportsStructuredOutputs === true && responseFormat.schema != null ? {
|
|
396
|
+
type: "json_schema",
|
|
397
|
+
json_schema: {
|
|
398
|
+
schema: responseFormat.schema,
|
|
399
|
+
name: (_c = responseFormat.name) != null ? _c : "response",
|
|
400
|
+
description: responseFormat.description
|
|
401
|
+
}
|
|
402
|
+
} : { type: "json_object" } : void 0,
|
|
403
|
+
stop: stopSequences,
|
|
404
|
+
seed,
|
|
405
|
+
...Object.fromEntries(
|
|
406
|
+
Object.entries(
|
|
407
|
+
(_d = providerOptions == null ? void 0 : providerOptions[this.providerOptionsName]) != null ? _d : {}
|
|
408
|
+
).filter(
|
|
409
|
+
([key]) => !Object.keys(openaiCompatibleProviderOptions.shape).includes(key)
|
|
410
|
+
)
|
|
411
|
+
),
|
|
412
|
+
reasoning_effort: compatibleOptions.reasoningEffort,
|
|
413
|
+
verbosity: compatibleOptions.textVerbosity,
|
|
414
|
+
// messages:
|
|
415
|
+
messages: convertToOpenAICompatibleChatMessages(prompt),
|
|
416
|
+
// tools:
|
|
417
|
+
tools: openaiTools,
|
|
418
|
+
tool_choice: openaiToolChoice
|
|
419
|
+
},
|
|
420
|
+
warnings: [...warnings, ...toolWarnings]
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
async doGenerate(options) {
|
|
424
|
+
var _a, _b, _c, _d, _e, _f;
|
|
425
|
+
const { args, warnings } = await this.getArgs({ ...options });
|
|
426
|
+
const body = JSON.stringify(args);
|
|
427
|
+
const {
|
|
428
|
+
responseHeaders,
|
|
429
|
+
value: responseBody,
|
|
430
|
+
rawValue: rawResponse
|
|
431
|
+
} = await postJsonToApi({
|
|
432
|
+
url: this.config.url({
|
|
433
|
+
path: "/chat/completions",
|
|
434
|
+
modelId: this.modelId
|
|
435
|
+
}),
|
|
436
|
+
headers: combineHeaders(this.config.headers(), options.headers),
|
|
437
|
+
body: args,
|
|
438
|
+
failedResponseHandler: this.failedResponseHandler,
|
|
439
|
+
successfulResponseHandler: createJsonResponseHandler(
|
|
440
|
+
OpenAICompatibleChatResponseSchema
|
|
441
|
+
),
|
|
442
|
+
abortSignal: options.abortSignal,
|
|
443
|
+
fetch: this.config.fetch
|
|
444
|
+
});
|
|
445
|
+
const choice = responseBody.choices[0];
|
|
446
|
+
const content = [];
|
|
447
|
+
const text = choice.message.content;
|
|
448
|
+
if (text != null && text.length > 0) {
|
|
449
|
+
content.push({ type: "text", text });
|
|
450
|
+
}
|
|
451
|
+
const reasoning = (_a = choice.message.reasoning_content) != null ? _a : choice.message.reasoning;
|
|
452
|
+
if (reasoning != null && reasoning.length > 0) {
|
|
453
|
+
content.push({
|
|
454
|
+
type: "reasoning",
|
|
455
|
+
text: reasoning
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
if (choice.message.tool_calls != null) {
|
|
459
|
+
for (const toolCall of choice.message.tool_calls) {
|
|
460
|
+
content.push({
|
|
461
|
+
type: "tool-call",
|
|
462
|
+
toolCallId: (_b = toolCall.id) != null ? _b : generateId(),
|
|
463
|
+
toolName: toolCall.function.name,
|
|
464
|
+
input: toolCall.function.arguments
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
const providerMetadata = {
|
|
469
|
+
[this.providerOptionsName]: {},
|
|
470
|
+
...await ((_d = (_c = this.config.metadataExtractor) == null ? void 0 : _c.extractMetadata) == null ? void 0 : _d.call(_c, {
|
|
471
|
+
parsedBody: rawResponse
|
|
472
|
+
}))
|
|
473
|
+
};
|
|
474
|
+
const completionTokenDetails = (_e = responseBody.usage) == null ? void 0 : _e.completion_tokens_details;
|
|
475
|
+
if ((completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens) != null) {
|
|
476
|
+
providerMetadata[this.providerOptionsName].acceptedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens;
|
|
477
|
+
}
|
|
478
|
+
if ((completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens) != null) {
|
|
479
|
+
providerMetadata[this.providerOptionsName].rejectedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens;
|
|
480
|
+
}
|
|
481
|
+
return {
|
|
482
|
+
content,
|
|
483
|
+
finishReason: {
|
|
484
|
+
unified: mapOpenAICompatibleFinishReason(choice.finish_reason),
|
|
485
|
+
raw: (_f = choice.finish_reason) != null ? _f : void 0
|
|
486
|
+
},
|
|
487
|
+
usage: convertOpenAICompatibleChatUsage(responseBody.usage),
|
|
488
|
+
providerMetadata,
|
|
489
|
+
request: { body },
|
|
490
|
+
response: {
|
|
491
|
+
...getResponseMetadata(responseBody),
|
|
492
|
+
headers: responseHeaders,
|
|
493
|
+
body: rawResponse
|
|
494
|
+
},
|
|
495
|
+
warnings
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
async doStream(options) {
|
|
499
|
+
var _a;
|
|
500
|
+
const { args, warnings } = await this.getArgs({ ...options });
|
|
501
|
+
const body = {
|
|
502
|
+
...args,
|
|
503
|
+
stream: true,
|
|
504
|
+
// only include stream_options when in strict compatibility mode:
|
|
505
|
+
stream_options: this.config.includeUsage ? { include_usage: true } : void 0
|
|
506
|
+
};
|
|
507
|
+
const metadataExtractor = (_a = this.config.metadataExtractor) == null ? void 0 : _a.createStreamExtractor();
|
|
508
|
+
const { responseHeaders, value: response } = await postJsonToApi({
|
|
509
|
+
url: this.config.url({
|
|
510
|
+
path: "/chat/completions",
|
|
511
|
+
modelId: this.modelId
|
|
512
|
+
}),
|
|
513
|
+
headers: combineHeaders(this.config.headers(), options.headers),
|
|
514
|
+
body,
|
|
515
|
+
failedResponseHandler: this.failedResponseHandler,
|
|
516
|
+
successfulResponseHandler: createEventSourceResponseHandler(
|
|
517
|
+
this.chunkSchema
|
|
518
|
+
),
|
|
519
|
+
abortSignal: options.abortSignal,
|
|
520
|
+
fetch: this.config.fetch
|
|
521
|
+
});
|
|
522
|
+
const toolCalls = [];
|
|
523
|
+
let finishReason = {
|
|
524
|
+
unified: "other",
|
|
525
|
+
raw: void 0
|
|
526
|
+
};
|
|
527
|
+
let usage = void 0;
|
|
528
|
+
let isFirstChunk = true;
|
|
529
|
+
const providerOptionsName = this.providerOptionsName;
|
|
530
|
+
let isActiveReasoning = false;
|
|
531
|
+
let isActiveText = false;
|
|
532
|
+
return {
|
|
533
|
+
stream: response.pipeThrough(
|
|
534
|
+
new TransformStream({
|
|
535
|
+
start(controller) {
|
|
536
|
+
controller.enqueue({ type: "stream-start", warnings });
|
|
537
|
+
},
|
|
538
|
+
transform(chunk, controller) {
|
|
539
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
540
|
+
if (options.includeRawChunks) {
|
|
541
|
+
controller.enqueue({ type: "raw", rawValue: chunk.rawValue });
|
|
542
|
+
}
|
|
543
|
+
if (!chunk.success) {
|
|
544
|
+
finishReason = { unified: "error", raw: void 0 };
|
|
545
|
+
controller.enqueue({ type: "error", error: chunk.error });
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
metadataExtractor == null ? void 0 : metadataExtractor.processChunk(chunk.rawValue);
|
|
549
|
+
if ("error" in chunk.value) {
|
|
550
|
+
finishReason = { unified: "error", raw: void 0 };
|
|
551
|
+
controller.enqueue({
|
|
552
|
+
type: "error",
|
|
553
|
+
error: chunk.value.error.message
|
|
554
|
+
});
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
const value = chunk.value;
|
|
558
|
+
if (isFirstChunk) {
|
|
559
|
+
isFirstChunk = false;
|
|
560
|
+
controller.enqueue({
|
|
561
|
+
type: "response-metadata",
|
|
562
|
+
...getResponseMetadata(value)
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
if (value.usage != null) {
|
|
566
|
+
usage = value.usage;
|
|
567
|
+
}
|
|
568
|
+
const choice = value.choices[0];
|
|
569
|
+
if ((choice == null ? void 0 : choice.finish_reason) != null) {
|
|
570
|
+
finishReason = {
|
|
571
|
+
unified: mapOpenAICompatibleFinishReason(choice.finish_reason),
|
|
572
|
+
raw: (_a2 = choice.finish_reason) != null ? _a2 : void 0
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
if ((choice == null ? void 0 : choice.delta) == null) {
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
const delta = choice.delta;
|
|
579
|
+
const reasoningContent = (_b = delta.reasoning_content) != null ? _b : delta.reasoning;
|
|
580
|
+
if (reasoningContent) {
|
|
581
|
+
if (!isActiveReasoning) {
|
|
582
|
+
controller.enqueue({
|
|
583
|
+
type: "reasoning-start",
|
|
584
|
+
id: "reasoning-0"
|
|
585
|
+
});
|
|
586
|
+
isActiveReasoning = true;
|
|
587
|
+
}
|
|
588
|
+
controller.enqueue({
|
|
589
|
+
type: "reasoning-delta",
|
|
590
|
+
id: "reasoning-0",
|
|
591
|
+
delta: reasoningContent
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
if (delta.content) {
|
|
595
|
+
if (!isActiveText) {
|
|
596
|
+
controller.enqueue({ type: "text-start", id: "txt-0" });
|
|
597
|
+
isActiveText = true;
|
|
598
|
+
}
|
|
599
|
+
controller.enqueue({
|
|
600
|
+
type: "text-delta",
|
|
601
|
+
id: "txt-0",
|
|
602
|
+
delta: delta.content
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
if (delta.tool_calls != null) {
|
|
606
|
+
for (const toolCallDelta of delta.tool_calls) {
|
|
607
|
+
const index = toolCallDelta.index;
|
|
608
|
+
if (toolCalls[index] == null) {
|
|
609
|
+
if (toolCallDelta.id == null) {
|
|
610
|
+
throw new InvalidResponseDataError({
|
|
611
|
+
data: toolCallDelta,
|
|
612
|
+
message: `Expected 'id' to be a string.`
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
if (((_c = toolCallDelta.function) == null ? void 0 : _c.name) == null) {
|
|
616
|
+
throw new InvalidResponseDataError({
|
|
617
|
+
data: toolCallDelta,
|
|
618
|
+
message: `Expected 'function.name' to be a string.`
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
controller.enqueue({
|
|
622
|
+
type: "tool-input-start",
|
|
623
|
+
id: toolCallDelta.id,
|
|
624
|
+
toolName: toolCallDelta.function.name
|
|
625
|
+
});
|
|
626
|
+
toolCalls[index] = {
|
|
627
|
+
id: toolCallDelta.id,
|
|
628
|
+
type: "function",
|
|
629
|
+
function: {
|
|
630
|
+
name: toolCallDelta.function.name,
|
|
631
|
+
arguments: (_d = toolCallDelta.function.arguments) != null ? _d : ""
|
|
632
|
+
},
|
|
633
|
+
hasFinished: false
|
|
634
|
+
};
|
|
635
|
+
const toolCall2 = toolCalls[index];
|
|
636
|
+
if (((_e = toolCall2.function) == null ? void 0 : _e.name) != null && ((_f = toolCall2.function) == null ? void 0 : _f.arguments) != null) {
|
|
637
|
+
if (toolCall2.function.arguments.length > 0) {
|
|
638
|
+
controller.enqueue({
|
|
639
|
+
type: "tool-input-delta",
|
|
640
|
+
id: toolCall2.id,
|
|
641
|
+
delta: toolCall2.function.arguments
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
if (isParsableJson(toolCall2.function.arguments)) {
|
|
645
|
+
controller.enqueue({
|
|
646
|
+
type: "tool-input-end",
|
|
647
|
+
id: toolCall2.id
|
|
648
|
+
});
|
|
649
|
+
controller.enqueue({
|
|
650
|
+
type: "tool-call",
|
|
651
|
+
toolCallId: (_g = toolCall2.id) != null ? _g : generateId(),
|
|
652
|
+
toolName: toolCall2.function.name,
|
|
653
|
+
input: toolCall2.function.arguments
|
|
654
|
+
});
|
|
655
|
+
toolCall2.hasFinished = true;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
continue;
|
|
659
|
+
}
|
|
660
|
+
const toolCall = toolCalls[index];
|
|
661
|
+
if (toolCall.hasFinished) {
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
if (((_h = toolCallDelta.function) == null ? void 0 : _h.arguments) != null) {
|
|
665
|
+
toolCall.function.arguments += (_j = (_i = toolCallDelta.function) == null ? void 0 : _i.arguments) != null ? _j : "";
|
|
666
|
+
}
|
|
667
|
+
controller.enqueue({
|
|
668
|
+
type: "tool-input-delta",
|
|
669
|
+
id: toolCall.id,
|
|
670
|
+
delta: (_k = toolCallDelta.function.arguments) != null ? _k : ""
|
|
671
|
+
});
|
|
672
|
+
if (((_l = toolCall.function) == null ? void 0 : _l.name) != null && ((_m = toolCall.function) == null ? void 0 : _m.arguments) != null && isParsableJson(toolCall.function.arguments)) {
|
|
673
|
+
controller.enqueue({
|
|
674
|
+
type: "tool-input-end",
|
|
675
|
+
id: toolCall.id
|
|
676
|
+
});
|
|
677
|
+
controller.enqueue({
|
|
678
|
+
type: "tool-call",
|
|
679
|
+
toolCallId: (_n = toolCall.id) != null ? _n : generateId(),
|
|
680
|
+
toolName: toolCall.function.name,
|
|
681
|
+
input: toolCall.function.arguments
|
|
682
|
+
});
|
|
683
|
+
toolCall.hasFinished = true;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
flush(controller) {
|
|
689
|
+
var _a2, _b, _c, _d, _e;
|
|
690
|
+
if (isActiveReasoning) {
|
|
691
|
+
controller.enqueue({ type: "reasoning-end", id: "reasoning-0" });
|
|
692
|
+
}
|
|
693
|
+
if (isActiveText) {
|
|
694
|
+
controller.enqueue({ type: "text-end", id: "txt-0" });
|
|
695
|
+
}
|
|
696
|
+
for (const toolCall of toolCalls.filter(
|
|
697
|
+
(toolCall2) => !toolCall2.hasFinished
|
|
698
|
+
)) {
|
|
699
|
+
controller.enqueue({
|
|
700
|
+
type: "tool-input-end",
|
|
701
|
+
id: toolCall.id
|
|
702
|
+
});
|
|
703
|
+
controller.enqueue({
|
|
704
|
+
type: "tool-call",
|
|
705
|
+
toolCallId: (_a2 = toolCall.id) != null ? _a2 : generateId(),
|
|
706
|
+
toolName: toolCall.function.name,
|
|
707
|
+
input: toolCall.function.arguments
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
const providerMetadata = {
|
|
711
|
+
[providerOptionsName]: {},
|
|
712
|
+
...metadataExtractor == null ? void 0 : metadataExtractor.buildMetadata()
|
|
713
|
+
};
|
|
714
|
+
if (((_b = usage == null ? void 0 : usage.completion_tokens_details) == null ? void 0 : _b.accepted_prediction_tokens) != null) {
|
|
715
|
+
providerMetadata[providerOptionsName].acceptedPredictionTokens = (_c = usage == null ? void 0 : usage.completion_tokens_details) == null ? void 0 : _c.accepted_prediction_tokens;
|
|
716
|
+
}
|
|
717
|
+
if (((_d = usage == null ? void 0 : usage.completion_tokens_details) == null ? void 0 : _d.rejected_prediction_tokens) != null) {
|
|
718
|
+
providerMetadata[providerOptionsName].rejectedPredictionTokens = (_e = usage == null ? void 0 : usage.completion_tokens_details) == null ? void 0 : _e.rejected_prediction_tokens;
|
|
719
|
+
}
|
|
720
|
+
controller.enqueue({
|
|
721
|
+
type: "finish",
|
|
722
|
+
finishReason,
|
|
723
|
+
usage: convertOpenAICompatibleChatUsage(usage),
|
|
724
|
+
providerMetadata
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
})
|
|
728
|
+
),
|
|
729
|
+
request: { body },
|
|
730
|
+
response: { headers: responseHeaders }
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
var openaiCompatibleTokenUsageSchema = z3.object({
|
|
735
|
+
prompt_tokens: z3.number().nullish(),
|
|
736
|
+
completion_tokens: z3.number().nullish(),
|
|
737
|
+
total_tokens: z3.number().nullish(),
|
|
738
|
+
prompt_tokens_details: z3.object({
|
|
739
|
+
cached_tokens: z3.number().nullish()
|
|
740
|
+
}).nullish(),
|
|
741
|
+
completion_tokens_details: z3.object({
|
|
742
|
+
reasoning_tokens: z3.number().nullish(),
|
|
743
|
+
accepted_prediction_tokens: z3.number().nullish(),
|
|
744
|
+
rejected_prediction_tokens: z3.number().nullish()
|
|
745
|
+
}).nullish()
|
|
746
|
+
}).nullish();
|
|
747
|
+
var OpenAICompatibleChatResponseSchema = z3.object({
|
|
748
|
+
id: z3.string().nullish(),
|
|
749
|
+
created: z3.number().nullish(),
|
|
750
|
+
model: z3.string().nullish(),
|
|
751
|
+
choices: z3.array(
|
|
752
|
+
z3.object({
|
|
753
|
+
message: z3.object({
|
|
754
|
+
role: z3.literal("assistant").nullish(),
|
|
755
|
+
content: z3.string().nullish(),
|
|
756
|
+
reasoning_content: z3.string().nullish(),
|
|
757
|
+
reasoning: z3.string().nullish(),
|
|
758
|
+
tool_calls: z3.array(
|
|
759
|
+
z3.object({
|
|
760
|
+
id: z3.string().nullish(),
|
|
761
|
+
function: z3.object({
|
|
762
|
+
name: z3.string(),
|
|
763
|
+
arguments: z3.string()
|
|
764
|
+
})
|
|
765
|
+
})
|
|
766
|
+
).nullish()
|
|
767
|
+
}),
|
|
768
|
+
finish_reason: z3.string().nullish()
|
|
769
|
+
})
|
|
770
|
+
),
|
|
771
|
+
usage: openaiCompatibleTokenUsageSchema
|
|
772
|
+
});
|
|
773
|
+
var chunkBaseSchema = z3.object({
|
|
774
|
+
id: z3.string().nullish(),
|
|
775
|
+
created: z3.number().nullish(),
|
|
776
|
+
model: z3.string().nullish(),
|
|
777
|
+
choices: z3.array(
|
|
778
|
+
z3.object({
|
|
779
|
+
delta: z3.object({
|
|
780
|
+
role: z3.enum(["assistant"]).nullish(),
|
|
781
|
+
content: z3.string().nullish(),
|
|
782
|
+
// Most openai-compatible models set `reasoning_content`, but some
|
|
783
|
+
// providers serving `gpt-oss` set `reasoning`. See #7866
|
|
784
|
+
reasoning_content: z3.string().nullish(),
|
|
785
|
+
reasoning: z3.string().nullish(),
|
|
786
|
+
tool_calls: z3.array(
|
|
787
|
+
z3.object({
|
|
788
|
+
index: z3.number(),
|
|
789
|
+
id: z3.string().nullish(),
|
|
790
|
+
function: z3.object({
|
|
791
|
+
name: z3.string().nullish(),
|
|
792
|
+
arguments: z3.string().nullish()
|
|
793
|
+
})
|
|
794
|
+
})
|
|
795
|
+
).nullish()
|
|
796
|
+
}).nullish(),
|
|
797
|
+
finish_reason: z3.string().nullish()
|
|
798
|
+
})
|
|
799
|
+
),
|
|
800
|
+
usage: openaiCompatibleTokenUsageSchema
|
|
801
|
+
});
|
|
802
|
+
var createOpenAICompatibleChatChunkSchema = (errorSchema) => z3.union([chunkBaseSchema, errorSchema]);
|
|
803
|
+
|
|
804
|
+
// src/completion/openai-compatible-completion-language-model.ts
|
|
805
|
+
import {
|
|
806
|
+
combineHeaders as combineHeaders2,
|
|
807
|
+
createEventSourceResponseHandler as createEventSourceResponseHandler2,
|
|
808
|
+
createJsonErrorResponseHandler as createJsonErrorResponseHandler2,
|
|
809
|
+
createJsonResponseHandler as createJsonResponseHandler2,
|
|
810
|
+
parseProviderOptions as parseProviderOptions2,
|
|
811
|
+
postJsonToApi as postJsonToApi2
|
|
812
|
+
} from "@ai-sdk/provider-utils";
|
|
813
|
+
import { z as z5 } from "zod/v4";
|
|
814
|
+
|
|
815
|
+
// src/completion/convert-openai-compatible-completion-usage.ts
|
|
816
|
+
function convertOpenAICompatibleCompletionUsage(usage) {
|
|
817
|
+
var _a, _b;
|
|
818
|
+
if (usage == null) {
|
|
819
|
+
return {
|
|
820
|
+
inputTokens: {
|
|
821
|
+
total: void 0,
|
|
822
|
+
noCache: void 0,
|
|
823
|
+
cacheRead: void 0,
|
|
824
|
+
cacheWrite: void 0
|
|
825
|
+
},
|
|
826
|
+
outputTokens: {
|
|
827
|
+
total: void 0,
|
|
828
|
+
text: void 0,
|
|
829
|
+
reasoning: void 0
|
|
830
|
+
},
|
|
831
|
+
raw: void 0
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
const promptTokens = (_a = usage.prompt_tokens) != null ? _a : 0;
|
|
835
|
+
const completionTokens = (_b = usage.completion_tokens) != null ? _b : 0;
|
|
836
|
+
return {
|
|
837
|
+
inputTokens: {
|
|
838
|
+
total: promptTokens,
|
|
839
|
+
noCache: promptTokens,
|
|
840
|
+
cacheRead: void 0,
|
|
841
|
+
cacheWrite: void 0
|
|
842
|
+
},
|
|
843
|
+
outputTokens: {
|
|
844
|
+
total: completionTokens,
|
|
845
|
+
text: completionTokens,
|
|
846
|
+
reasoning: void 0
|
|
847
|
+
},
|
|
848
|
+
raw: usage
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
// src/completion/convert-to-openai-compatible-completion-prompt.ts
|
|
853
|
+
import {
|
|
854
|
+
InvalidPromptError,
|
|
855
|
+
UnsupportedFunctionalityError as UnsupportedFunctionalityError3
|
|
856
|
+
} from "@ai-sdk/provider";
|
|
857
|
+
function convertToOpenAICompatibleCompletionPrompt({
|
|
858
|
+
prompt,
|
|
859
|
+
user = "user",
|
|
860
|
+
assistant = "assistant"
|
|
861
|
+
}) {
|
|
862
|
+
let text = "";
|
|
863
|
+
if (prompt[0].role === "system") {
|
|
864
|
+
text += `${prompt[0].content}
|
|
865
|
+
|
|
866
|
+
`;
|
|
867
|
+
prompt = prompt.slice(1);
|
|
868
|
+
}
|
|
869
|
+
for (const { role, content } of prompt) {
|
|
870
|
+
switch (role) {
|
|
871
|
+
case "system": {
|
|
872
|
+
throw new InvalidPromptError({
|
|
873
|
+
message: "Unexpected system message in prompt: ${content}",
|
|
874
|
+
prompt
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
case "user": {
|
|
878
|
+
const userMessage = content.map((part) => {
|
|
879
|
+
switch (part.type) {
|
|
880
|
+
case "text": {
|
|
881
|
+
return part.text;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}).filter(Boolean).join("");
|
|
885
|
+
text += `${user}:
|
|
886
|
+
${userMessage}
|
|
887
|
+
|
|
888
|
+
`;
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
case "assistant": {
|
|
892
|
+
const assistantMessage = content.map((part) => {
|
|
893
|
+
switch (part.type) {
|
|
894
|
+
case "text": {
|
|
895
|
+
return part.text;
|
|
896
|
+
}
|
|
897
|
+
case "tool-call": {
|
|
898
|
+
throw new UnsupportedFunctionalityError3({
|
|
899
|
+
functionality: "tool-call messages"
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
}).join("");
|
|
904
|
+
text += `${assistant}:
|
|
905
|
+
${assistantMessage}
|
|
906
|
+
|
|
907
|
+
`;
|
|
908
|
+
break;
|
|
909
|
+
}
|
|
910
|
+
case "tool": {
|
|
911
|
+
throw new UnsupportedFunctionalityError3({
|
|
912
|
+
functionality: "tool messages"
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
default: {
|
|
916
|
+
const _exhaustiveCheck = role;
|
|
917
|
+
throw new Error(`Unsupported role: ${_exhaustiveCheck}`);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
text += `${assistant}:
|
|
922
|
+
`;
|
|
923
|
+
return {
|
|
924
|
+
prompt: text,
|
|
925
|
+
stopSequences: [`
|
|
926
|
+
${user}:`]
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
// src/completion/get-response-metadata.ts
|
|
931
|
+
function getResponseMetadata2({
|
|
932
|
+
id,
|
|
933
|
+
model,
|
|
934
|
+
created
|
|
935
|
+
}) {
|
|
936
|
+
return {
|
|
937
|
+
id: id != null ? id : void 0,
|
|
938
|
+
modelId: model != null ? model : void 0,
|
|
939
|
+
timestamp: created != null ? new Date(created * 1e3) : void 0
|
|
940
|
+
};
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
// src/completion/map-openai-compatible-finish-reason.ts
|
|
944
|
+
function mapOpenAICompatibleFinishReason2(finishReason) {
|
|
945
|
+
switch (finishReason) {
|
|
946
|
+
case "stop":
|
|
947
|
+
return "stop";
|
|
948
|
+
case "length":
|
|
949
|
+
return "length";
|
|
950
|
+
case "content_filter":
|
|
951
|
+
return "content-filter";
|
|
952
|
+
case "function_call":
|
|
953
|
+
case "tool_calls":
|
|
954
|
+
return "tool-calls";
|
|
955
|
+
default:
|
|
956
|
+
return "other";
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
// src/completion/openai-compatible-completion-options.ts
|
|
961
|
+
import { z as z4 } from "zod/v4";
|
|
962
|
+
var openaiCompatibleCompletionProviderOptions = z4.object({
|
|
963
|
+
/**
|
|
964
|
+
* Echo back the prompt in addition to the completion.
|
|
965
|
+
*/
|
|
966
|
+
echo: z4.boolean().optional(),
|
|
967
|
+
/**
|
|
968
|
+
* Modify the likelihood of specified tokens appearing in the completion.
|
|
969
|
+
*
|
|
970
|
+
* Accepts a JSON object that maps tokens (specified by their token ID in
|
|
971
|
+
* the GPT tokenizer) to an associated bias value from -100 to 100.
|
|
972
|
+
*/
|
|
973
|
+
logitBias: z4.record(z4.string(), z4.number()).optional(),
|
|
974
|
+
/**
|
|
975
|
+
* The suffix that comes after a completion of inserted text.
|
|
976
|
+
*/
|
|
977
|
+
suffix: z4.string().optional(),
|
|
978
|
+
/**
|
|
979
|
+
* A unique identifier representing your end-user, which can help providers to
|
|
980
|
+
* monitor and detect abuse.
|
|
981
|
+
*/
|
|
982
|
+
user: z4.string().optional()
|
|
983
|
+
});
|
|
984
|
+
|
|
985
|
+
// src/completion/openai-compatible-completion-language-model.ts
|
|
986
|
+
var OpenAICompatibleCompletionLanguageModel = class {
|
|
987
|
+
// type inferred via constructor
|
|
988
|
+
constructor(modelId, config) {
|
|
989
|
+
this.specificationVersion = "v3";
|
|
990
|
+
var _a;
|
|
991
|
+
this.modelId = modelId;
|
|
992
|
+
this.config = config;
|
|
993
|
+
const errorStructure = (_a = config.errorStructure) != null ? _a : defaultOpenAICompatibleErrorStructure;
|
|
994
|
+
this.chunkSchema = createOpenAICompatibleCompletionChunkSchema(
|
|
995
|
+
errorStructure.errorSchema
|
|
996
|
+
);
|
|
997
|
+
this.failedResponseHandler = createJsonErrorResponseHandler2(errorStructure);
|
|
998
|
+
}
|
|
999
|
+
get provider() {
|
|
1000
|
+
return this.config.provider;
|
|
1001
|
+
}
|
|
1002
|
+
get providerOptionsName() {
|
|
1003
|
+
return this.config.provider.split(".")[0].trim();
|
|
1004
|
+
}
|
|
1005
|
+
get supportedUrls() {
|
|
1006
|
+
var _a, _b, _c;
|
|
1007
|
+
return (_c = (_b = (_a = this.config).supportedUrls) == null ? void 0 : _b.call(_a)) != null ? _c : {};
|
|
1008
|
+
}
|
|
1009
|
+
async getArgs({
|
|
1010
|
+
prompt,
|
|
1011
|
+
maxOutputTokens,
|
|
1012
|
+
temperature,
|
|
1013
|
+
topP,
|
|
1014
|
+
topK,
|
|
1015
|
+
frequencyPenalty,
|
|
1016
|
+
presencePenalty,
|
|
1017
|
+
stopSequences: userStopSequences,
|
|
1018
|
+
responseFormat,
|
|
1019
|
+
seed,
|
|
1020
|
+
providerOptions,
|
|
1021
|
+
tools,
|
|
1022
|
+
toolChoice
|
|
1023
|
+
}) {
|
|
1024
|
+
var _a;
|
|
1025
|
+
const warnings = [];
|
|
1026
|
+
const completionOptions = (_a = await parseProviderOptions2({
|
|
1027
|
+
provider: this.providerOptionsName,
|
|
1028
|
+
providerOptions,
|
|
1029
|
+
schema: openaiCompatibleCompletionProviderOptions
|
|
1030
|
+
})) != null ? _a : {};
|
|
1031
|
+
if (topK != null) {
|
|
1032
|
+
warnings.push({ type: "unsupported", feature: "topK" });
|
|
1033
|
+
}
|
|
1034
|
+
if (tools == null ? void 0 : tools.length) {
|
|
1035
|
+
warnings.push({ type: "unsupported", feature: "tools" });
|
|
1036
|
+
}
|
|
1037
|
+
if (toolChoice != null) {
|
|
1038
|
+
warnings.push({ type: "unsupported", feature: "toolChoice" });
|
|
1039
|
+
}
|
|
1040
|
+
if (responseFormat != null && responseFormat.type !== "text") {
|
|
1041
|
+
warnings.push({
|
|
1042
|
+
type: "unsupported",
|
|
1043
|
+
feature: "responseFormat",
|
|
1044
|
+
details: "JSON response format is not supported."
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
const { prompt: completionPrompt, stopSequences } = convertToOpenAICompatibleCompletionPrompt({ prompt });
|
|
1048
|
+
const stop = [...stopSequences != null ? stopSequences : [], ...userStopSequences != null ? userStopSequences : []];
|
|
1049
|
+
return {
|
|
1050
|
+
args: {
|
|
1051
|
+
// model id:
|
|
1052
|
+
model: this.modelId,
|
|
1053
|
+
// model specific settings:
|
|
1054
|
+
echo: completionOptions.echo,
|
|
1055
|
+
logit_bias: completionOptions.logitBias,
|
|
1056
|
+
suffix: completionOptions.suffix,
|
|
1057
|
+
user: completionOptions.user,
|
|
1058
|
+
// standardized settings:
|
|
1059
|
+
max_tokens: maxOutputTokens,
|
|
1060
|
+
temperature,
|
|
1061
|
+
top_p: topP,
|
|
1062
|
+
frequency_penalty: frequencyPenalty,
|
|
1063
|
+
presence_penalty: presencePenalty,
|
|
1064
|
+
seed,
|
|
1065
|
+
...providerOptions == null ? void 0 : providerOptions[this.providerOptionsName],
|
|
1066
|
+
// prompt:
|
|
1067
|
+
prompt: completionPrompt,
|
|
1068
|
+
// stop sequences:
|
|
1069
|
+
stop: stop.length > 0 ? stop : void 0
|
|
1070
|
+
},
|
|
1071
|
+
warnings
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
async doGenerate(options) {
|
|
1075
|
+
const { args, warnings } = await this.getArgs(options);
|
|
1076
|
+
const {
|
|
1077
|
+
responseHeaders,
|
|
1078
|
+
value: response,
|
|
1079
|
+
rawValue: rawResponse
|
|
1080
|
+
} = await postJsonToApi2({
|
|
1081
|
+
url: this.config.url({
|
|
1082
|
+
path: "/completions",
|
|
1083
|
+
modelId: this.modelId
|
|
1084
|
+
}),
|
|
1085
|
+
headers: combineHeaders2(this.config.headers(), options.headers),
|
|
1086
|
+
body: args,
|
|
1087
|
+
failedResponseHandler: this.failedResponseHandler,
|
|
1088
|
+
successfulResponseHandler: createJsonResponseHandler2(
|
|
1089
|
+
openaiCompatibleCompletionResponseSchema
|
|
1090
|
+
),
|
|
1091
|
+
abortSignal: options.abortSignal,
|
|
1092
|
+
fetch: this.config.fetch
|
|
1093
|
+
});
|
|
1094
|
+
const choice = response.choices[0];
|
|
1095
|
+
const content = [];
|
|
1096
|
+
if (choice.text != null && choice.text.length > 0) {
|
|
1097
|
+
content.push({ type: "text", text: choice.text });
|
|
1098
|
+
}
|
|
1099
|
+
return {
|
|
1100
|
+
content,
|
|
1101
|
+
usage: convertOpenAICompatibleCompletionUsage(response.usage),
|
|
1102
|
+
finishReason: {
|
|
1103
|
+
unified: mapOpenAICompatibleFinishReason2(choice.finish_reason),
|
|
1104
|
+
raw: choice.finish_reason
|
|
1105
|
+
},
|
|
1106
|
+
request: { body: args },
|
|
1107
|
+
response: {
|
|
1108
|
+
...getResponseMetadata2(response),
|
|
1109
|
+
headers: responseHeaders,
|
|
1110
|
+
body: rawResponse
|
|
1111
|
+
},
|
|
1112
|
+
warnings
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
async doStream(options) {
|
|
1116
|
+
const { args, warnings } = await this.getArgs(options);
|
|
1117
|
+
const body = {
|
|
1118
|
+
...args,
|
|
1119
|
+
stream: true,
|
|
1120
|
+
// only include stream_options when in strict compatibility mode:
|
|
1121
|
+
stream_options: this.config.includeUsage ? { include_usage: true } : void 0
|
|
1122
|
+
};
|
|
1123
|
+
const { responseHeaders, value: response } = await postJsonToApi2({
|
|
1124
|
+
url: this.config.url({
|
|
1125
|
+
path: "/completions",
|
|
1126
|
+
modelId: this.modelId
|
|
1127
|
+
}),
|
|
1128
|
+
headers: combineHeaders2(this.config.headers(), options.headers),
|
|
1129
|
+
body,
|
|
1130
|
+
failedResponseHandler: this.failedResponseHandler,
|
|
1131
|
+
successfulResponseHandler: createEventSourceResponseHandler2(
|
|
1132
|
+
this.chunkSchema
|
|
1133
|
+
),
|
|
1134
|
+
abortSignal: options.abortSignal,
|
|
1135
|
+
fetch: this.config.fetch
|
|
1136
|
+
});
|
|
1137
|
+
let finishReason = {
|
|
1138
|
+
unified: "other",
|
|
1139
|
+
raw: void 0
|
|
1140
|
+
};
|
|
1141
|
+
let usage = void 0;
|
|
1142
|
+
let isFirstChunk = true;
|
|
1143
|
+
return {
|
|
1144
|
+
stream: response.pipeThrough(
|
|
1145
|
+
new TransformStream({
|
|
1146
|
+
start(controller) {
|
|
1147
|
+
controller.enqueue({ type: "stream-start", warnings });
|
|
1148
|
+
},
|
|
1149
|
+
transform(chunk, controller) {
|
|
1150
|
+
var _a;
|
|
1151
|
+
if (options.includeRawChunks) {
|
|
1152
|
+
controller.enqueue({ type: "raw", rawValue: chunk.rawValue });
|
|
1153
|
+
}
|
|
1154
|
+
if (!chunk.success) {
|
|
1155
|
+
finishReason = { unified: "error", raw: void 0 };
|
|
1156
|
+
controller.enqueue({ type: "error", error: chunk.error });
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
const value = chunk.value;
|
|
1160
|
+
if ("error" in value) {
|
|
1161
|
+
finishReason = { unified: "error", raw: void 0 };
|
|
1162
|
+
controller.enqueue({ type: "error", error: value.error });
|
|
1163
|
+
return;
|
|
1164
|
+
}
|
|
1165
|
+
if (isFirstChunk) {
|
|
1166
|
+
isFirstChunk = false;
|
|
1167
|
+
controller.enqueue({
|
|
1168
|
+
type: "response-metadata",
|
|
1169
|
+
...getResponseMetadata2(value)
|
|
1170
|
+
});
|
|
1171
|
+
controller.enqueue({
|
|
1172
|
+
type: "text-start",
|
|
1173
|
+
id: "0"
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
if (value.usage != null) {
|
|
1177
|
+
usage = value.usage;
|
|
1178
|
+
}
|
|
1179
|
+
const choice = value.choices[0];
|
|
1180
|
+
if ((choice == null ? void 0 : choice.finish_reason) != null) {
|
|
1181
|
+
finishReason = {
|
|
1182
|
+
unified: mapOpenAICompatibleFinishReason2(choice.finish_reason),
|
|
1183
|
+
raw: (_a = choice.finish_reason) != null ? _a : void 0
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
if ((choice == null ? void 0 : choice.text) != null) {
|
|
1187
|
+
controller.enqueue({
|
|
1188
|
+
type: "text-delta",
|
|
1189
|
+
id: "0",
|
|
1190
|
+
delta: choice.text
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
flush(controller) {
|
|
1195
|
+
if (!isFirstChunk) {
|
|
1196
|
+
controller.enqueue({ type: "text-end", id: "0" });
|
|
1197
|
+
}
|
|
1198
|
+
controller.enqueue({
|
|
1199
|
+
type: "finish",
|
|
1200
|
+
finishReason,
|
|
1201
|
+
usage: convertOpenAICompatibleCompletionUsage(usage)
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
})
|
|
1205
|
+
),
|
|
1206
|
+
request: { body },
|
|
1207
|
+
response: { headers: responseHeaders }
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
};
|
|
1211
|
+
var usageSchema = z5.object({
|
|
1212
|
+
prompt_tokens: z5.number(),
|
|
1213
|
+
completion_tokens: z5.number(),
|
|
1214
|
+
total_tokens: z5.number()
|
|
1215
|
+
});
|
|
1216
|
+
var openaiCompatibleCompletionResponseSchema = z5.object({
|
|
1217
|
+
id: z5.string().nullish(),
|
|
1218
|
+
created: z5.number().nullish(),
|
|
1219
|
+
model: z5.string().nullish(),
|
|
1220
|
+
choices: z5.array(
|
|
1221
|
+
z5.object({
|
|
1222
|
+
text: z5.string(),
|
|
1223
|
+
finish_reason: z5.string()
|
|
1224
|
+
})
|
|
1225
|
+
),
|
|
1226
|
+
usage: usageSchema.nullish()
|
|
1227
|
+
});
|
|
1228
|
+
var createOpenAICompatibleCompletionChunkSchema = (errorSchema) => z5.union([
|
|
1229
|
+
z5.object({
|
|
1230
|
+
id: z5.string().nullish(),
|
|
1231
|
+
created: z5.number().nullish(),
|
|
1232
|
+
model: z5.string().nullish(),
|
|
1233
|
+
choices: z5.array(
|
|
1234
|
+
z5.object({
|
|
1235
|
+
text: z5.string(),
|
|
1236
|
+
finish_reason: z5.string().nullish(),
|
|
1237
|
+
index: z5.number()
|
|
1238
|
+
})
|
|
1239
|
+
),
|
|
1240
|
+
usage: usageSchema.nullish()
|
|
1241
|
+
}),
|
|
1242
|
+
errorSchema
|
|
1243
|
+
]);
|
|
1244
|
+
|
|
1245
|
+
// src/embedding/openai-compatible-embedding-model.ts
|
|
1246
|
+
import {
|
|
1247
|
+
TooManyEmbeddingValuesForCallError
|
|
1248
|
+
} from "@ai-sdk/provider";
|
|
1249
|
+
import {
|
|
1250
|
+
combineHeaders as combineHeaders3,
|
|
1251
|
+
createJsonErrorResponseHandler as createJsonErrorResponseHandler3,
|
|
1252
|
+
createJsonResponseHandler as createJsonResponseHandler3,
|
|
1253
|
+
parseProviderOptions as parseProviderOptions3,
|
|
1254
|
+
postJsonToApi as postJsonToApi3
|
|
1255
|
+
} from "@ai-sdk/provider-utils";
|
|
1256
|
+
import { z as z7 } from "zod/v4";
|
|
1257
|
+
|
|
1258
|
+
// src/embedding/openai-compatible-embedding-options.ts
|
|
1259
|
+
import { z as z6 } from "zod/v4";
|
|
1260
|
+
var openaiCompatibleEmbeddingProviderOptions = z6.object({
|
|
1261
|
+
/**
|
|
1262
|
+
* The number of dimensions the resulting output embeddings should have.
|
|
1263
|
+
* Only supported in text-embedding-3 and later models.
|
|
1264
|
+
*/
|
|
1265
|
+
dimensions: z6.number().optional(),
|
|
1266
|
+
/**
|
|
1267
|
+
* A unique identifier representing your end-user, which can help providers to
|
|
1268
|
+
* monitor and detect abuse.
|
|
1269
|
+
*/
|
|
1270
|
+
user: z6.string().optional()
|
|
1271
|
+
});
|
|
1272
|
+
|
|
1273
|
+
// src/embedding/openai-compatible-embedding-model.ts
|
|
1274
|
+
var OpenAICompatibleEmbeddingModel = class {
|
|
1275
|
+
constructor(modelId, config) {
|
|
1276
|
+
this.specificationVersion = "v3";
|
|
1277
|
+
this.modelId = modelId;
|
|
1278
|
+
this.config = config;
|
|
1279
|
+
}
|
|
1280
|
+
get provider() {
|
|
1281
|
+
return this.config.provider;
|
|
1282
|
+
}
|
|
1283
|
+
get maxEmbeddingsPerCall() {
|
|
1284
|
+
var _a;
|
|
1285
|
+
return (_a = this.config.maxEmbeddingsPerCall) != null ? _a : 2048;
|
|
1286
|
+
}
|
|
1287
|
+
get supportsParallelCalls() {
|
|
1288
|
+
var _a;
|
|
1289
|
+
return (_a = this.config.supportsParallelCalls) != null ? _a : true;
|
|
1290
|
+
}
|
|
1291
|
+
get providerOptionsName() {
|
|
1292
|
+
return this.config.provider.split(".")[0].trim();
|
|
1293
|
+
}
|
|
1294
|
+
async doEmbed({
|
|
1295
|
+
values,
|
|
1296
|
+
headers,
|
|
1297
|
+
abortSignal,
|
|
1298
|
+
providerOptions
|
|
1299
|
+
}) {
|
|
1300
|
+
var _a, _b, _c;
|
|
1301
|
+
const compatibleOptions = Object.assign(
|
|
1302
|
+
(_a = await parseProviderOptions3({
|
|
1303
|
+
provider: "openai-compatible",
|
|
1304
|
+
providerOptions,
|
|
1305
|
+
schema: openaiCompatibleEmbeddingProviderOptions
|
|
1306
|
+
})) != null ? _a : {},
|
|
1307
|
+
(_b = await parseProviderOptions3({
|
|
1308
|
+
provider: this.providerOptionsName,
|
|
1309
|
+
providerOptions,
|
|
1310
|
+
schema: openaiCompatibleEmbeddingProviderOptions
|
|
1311
|
+
})) != null ? _b : {}
|
|
1312
|
+
);
|
|
1313
|
+
if (values.length > this.maxEmbeddingsPerCall) {
|
|
1314
|
+
throw new TooManyEmbeddingValuesForCallError({
|
|
1315
|
+
provider: this.provider,
|
|
1316
|
+
modelId: this.modelId,
|
|
1317
|
+
maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,
|
|
1318
|
+
values
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
const {
|
|
1322
|
+
responseHeaders,
|
|
1323
|
+
value: response,
|
|
1324
|
+
rawValue
|
|
1325
|
+
} = await postJsonToApi3({
|
|
1326
|
+
url: this.config.url({
|
|
1327
|
+
path: "/embeddings",
|
|
1328
|
+
modelId: this.modelId
|
|
1329
|
+
}),
|
|
1330
|
+
headers: combineHeaders3(this.config.headers(), headers),
|
|
1331
|
+
body: {
|
|
1332
|
+
model: this.modelId,
|
|
1333
|
+
input: values,
|
|
1334
|
+
encoding_format: "float",
|
|
1335
|
+
dimensions: compatibleOptions.dimensions,
|
|
1336
|
+
user: compatibleOptions.user
|
|
1337
|
+
},
|
|
1338
|
+
failedResponseHandler: createJsonErrorResponseHandler3(
|
|
1339
|
+
(_c = this.config.errorStructure) != null ? _c : defaultOpenAICompatibleErrorStructure
|
|
1340
|
+
),
|
|
1341
|
+
successfulResponseHandler: createJsonResponseHandler3(
|
|
1342
|
+
openaiTextEmbeddingResponseSchema
|
|
1343
|
+
),
|
|
1344
|
+
abortSignal,
|
|
1345
|
+
fetch: this.config.fetch
|
|
1346
|
+
});
|
|
1347
|
+
return {
|
|
1348
|
+
warnings: [],
|
|
1349
|
+
embeddings: response.data.map((item) => item.embedding),
|
|
1350
|
+
usage: response.usage ? { tokens: response.usage.prompt_tokens } : void 0,
|
|
1351
|
+
providerMetadata: response.providerMetadata,
|
|
1352
|
+
response: { headers: responseHeaders, body: rawValue }
|
|
1353
|
+
};
|
|
1354
|
+
}
|
|
1355
|
+
};
|
|
1356
|
+
var openaiTextEmbeddingResponseSchema = z7.object({
|
|
1357
|
+
data: z7.array(z7.object({ embedding: z7.array(z7.number()) })),
|
|
1358
|
+
usage: z7.object({ prompt_tokens: z7.number() }).nullish(),
|
|
1359
|
+
providerMetadata: z7.record(z7.string(), z7.record(z7.string(), z7.any())).optional()
|
|
1360
|
+
});
|
|
1361
|
+
|
|
1362
|
+
// src/image/openai-compatible-image-model.ts
|
|
1363
|
+
import {
|
|
1364
|
+
combineHeaders as combineHeaders4,
|
|
1365
|
+
convertBase64ToUint8Array,
|
|
1366
|
+
convertToFormData,
|
|
1367
|
+
createJsonErrorResponseHandler as createJsonErrorResponseHandler4,
|
|
1368
|
+
createJsonResponseHandler as createJsonResponseHandler4,
|
|
1369
|
+
downloadBlob,
|
|
1370
|
+
postFormDataToApi,
|
|
1371
|
+
postJsonToApi as postJsonToApi4
|
|
1372
|
+
} from "@ai-sdk/provider-utils";
|
|
1373
|
+
import { z as z8 } from "zod/v4";
|
|
1374
|
+
var OpenAICompatibleImageModel = class {
|
|
1375
|
+
constructor(modelId, config) {
|
|
1376
|
+
this.modelId = modelId;
|
|
1377
|
+
this.config = config;
|
|
1378
|
+
this.specificationVersion = "v3";
|
|
1379
|
+
this.maxImagesPerCall = 10;
|
|
1380
|
+
}
|
|
1381
|
+
get provider() {
|
|
1382
|
+
return this.config.provider;
|
|
1383
|
+
}
|
|
1384
|
+
async doGenerate({
|
|
1385
|
+
prompt,
|
|
1386
|
+
n,
|
|
1387
|
+
size,
|
|
1388
|
+
aspectRatio,
|
|
1389
|
+
seed,
|
|
1390
|
+
providerOptions,
|
|
1391
|
+
headers,
|
|
1392
|
+
abortSignal,
|
|
1393
|
+
files,
|
|
1394
|
+
mask
|
|
1395
|
+
}) {
|
|
1396
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1397
|
+
const warnings = [];
|
|
1398
|
+
if (aspectRatio != null) {
|
|
1399
|
+
warnings.push({
|
|
1400
|
+
type: "unsupported",
|
|
1401
|
+
feature: "aspectRatio",
|
|
1402
|
+
details: "This model does not support aspect ratio. Use `size` instead."
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
if (seed != null) {
|
|
1406
|
+
warnings.push({ type: "unsupported", feature: "seed" });
|
|
1407
|
+
}
|
|
1408
|
+
const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();
|
|
1409
|
+
if (files != null && files.length > 0) {
|
|
1410
|
+
const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({
|
|
1411
|
+
url: this.config.url({
|
|
1412
|
+
path: "/images/edits",
|
|
1413
|
+
modelId: this.modelId
|
|
1414
|
+
}),
|
|
1415
|
+
headers: combineHeaders4(this.config.headers(), headers),
|
|
1416
|
+
formData: convertToFormData({
|
|
1417
|
+
model: this.modelId,
|
|
1418
|
+
prompt,
|
|
1419
|
+
image: await Promise.all(files.map((file) => fileToBlob(file))),
|
|
1420
|
+
mask: mask != null ? await fileToBlob(mask) : void 0,
|
|
1421
|
+
n,
|
|
1422
|
+
size,
|
|
1423
|
+
...(_d = providerOptions.openai) != null ? _d : {}
|
|
1424
|
+
}),
|
|
1425
|
+
failedResponseHandler: createJsonErrorResponseHandler4(
|
|
1426
|
+
(_e = this.config.errorStructure) != null ? _e : defaultOpenAICompatibleErrorStructure
|
|
1427
|
+
),
|
|
1428
|
+
successfulResponseHandler: createJsonResponseHandler4(
|
|
1429
|
+
openaiCompatibleImageResponseSchema
|
|
1430
|
+
),
|
|
1431
|
+
abortSignal,
|
|
1432
|
+
fetch: this.config.fetch
|
|
1433
|
+
});
|
|
1434
|
+
return {
|
|
1435
|
+
images: response2.data.map((item) => item.b64_json),
|
|
1436
|
+
warnings,
|
|
1437
|
+
response: {
|
|
1438
|
+
timestamp: currentDate,
|
|
1439
|
+
modelId: this.modelId,
|
|
1440
|
+
headers: responseHeaders2
|
|
1441
|
+
}
|
|
1442
|
+
};
|
|
1443
|
+
}
|
|
1444
|
+
const { value: response, responseHeaders } = await postJsonToApi4({
|
|
1445
|
+
url: this.config.url({
|
|
1446
|
+
path: "/images/generations",
|
|
1447
|
+
modelId: this.modelId
|
|
1448
|
+
}),
|
|
1449
|
+
headers: combineHeaders4(this.config.headers(), headers),
|
|
1450
|
+
body: {
|
|
1451
|
+
model: this.modelId,
|
|
1452
|
+
prompt,
|
|
1453
|
+
n,
|
|
1454
|
+
size,
|
|
1455
|
+
...(_f = providerOptions.openai) != null ? _f : {},
|
|
1456
|
+
response_format: "b64_json"
|
|
1457
|
+
},
|
|
1458
|
+
failedResponseHandler: createJsonErrorResponseHandler4(
|
|
1459
|
+
(_g = this.config.errorStructure) != null ? _g : defaultOpenAICompatibleErrorStructure
|
|
1460
|
+
),
|
|
1461
|
+
successfulResponseHandler: createJsonResponseHandler4(
|
|
1462
|
+
openaiCompatibleImageResponseSchema
|
|
1463
|
+
),
|
|
1464
|
+
abortSignal,
|
|
1465
|
+
fetch: this.config.fetch
|
|
1466
|
+
});
|
|
1467
|
+
return {
|
|
1468
|
+
images: response.data.map((item) => item.b64_json),
|
|
1469
|
+
warnings,
|
|
1470
|
+
response: {
|
|
1471
|
+
timestamp: currentDate,
|
|
1472
|
+
modelId: this.modelId,
|
|
1473
|
+
headers: responseHeaders
|
|
1474
|
+
}
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1478
|
+
var openaiCompatibleImageResponseSchema = z8.object({
|
|
1479
|
+
data: z8.array(z8.object({ b64_json: z8.string() }))
|
|
1480
|
+
});
|
|
1481
|
+
async function fileToBlob(file) {
|
|
1482
|
+
if (file.type === "url") {
|
|
1483
|
+
return downloadBlob(file.url);
|
|
1484
|
+
}
|
|
1485
|
+
const data = file.data instanceof Uint8Array ? file.data : convertBase64ToUint8Array(file.data);
|
|
1486
|
+
return new Blob([data], { type: file.mediaType });
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
// src/openai-compatible-provider.ts
|
|
1490
|
+
import {
|
|
1491
|
+
withoutTrailingSlash,
|
|
1492
|
+
withUserAgentSuffix
|
|
1493
|
+
} from "@ai-sdk/provider-utils";
|
|
1494
|
+
|
|
1495
|
+
// src/version.ts
|
|
1496
|
+
var VERSION = true ? "2.0.4" : "0.0.0-test";
|
|
1497
|
+
|
|
1498
|
+
// src/openai-compatible-provider.ts
|
|
1499
|
+
function createOpenAICompatible(options) {
|
|
1500
|
+
const baseURL = withoutTrailingSlash(options.baseURL);
|
|
1501
|
+
const providerName = options.name;
|
|
1502
|
+
const headers = {
|
|
1503
|
+
...options.apiKey && { Authorization: `Bearer ${options.apiKey}` },
|
|
1504
|
+
...options.headers
|
|
1505
|
+
};
|
|
1506
|
+
const getHeaders = () => withUserAgentSuffix(headers, `ai-sdk/openai-compatible/${VERSION}`);
|
|
1507
|
+
const getCommonModelConfig = (modelType) => ({
|
|
1508
|
+
provider: `${providerName}.${modelType}`,
|
|
1509
|
+
url: ({ path }) => {
|
|
1510
|
+
const url = new URL(`${baseURL}${path}`);
|
|
1511
|
+
if (options.queryParams) {
|
|
1512
|
+
url.search = new URLSearchParams(options.queryParams).toString();
|
|
1513
|
+
}
|
|
1514
|
+
return url.toString();
|
|
1515
|
+
},
|
|
1516
|
+
headers: getHeaders,
|
|
1517
|
+
fetch: options.fetch
|
|
1518
|
+
});
|
|
1519
|
+
const createLanguageModel = (modelId) => createChatModel(modelId);
|
|
1520
|
+
const createChatModel = (modelId) => new OpenAICompatibleChatLanguageModel(modelId, {
|
|
1521
|
+
...getCommonModelConfig("chat"),
|
|
1522
|
+
includeUsage: options.includeUsage,
|
|
1523
|
+
supportsStructuredOutputs: options.supportsStructuredOutputs
|
|
1524
|
+
});
|
|
1525
|
+
const createCompletionModel = (modelId) => new OpenAICompatibleCompletionLanguageModel(modelId, {
|
|
1526
|
+
...getCommonModelConfig("completion"),
|
|
1527
|
+
includeUsage: options.includeUsage
|
|
1528
|
+
});
|
|
1529
|
+
const createEmbeddingModel = (modelId) => new OpenAICompatibleEmbeddingModel(modelId, {
|
|
1530
|
+
...getCommonModelConfig("embedding")
|
|
1531
|
+
});
|
|
1532
|
+
const createImageModel = (modelId) => new OpenAICompatibleImageModel(modelId, getCommonModelConfig("image"));
|
|
1533
|
+
const provider = (modelId) => createLanguageModel(modelId);
|
|
1534
|
+
provider.specificationVersion = "v3";
|
|
1535
|
+
provider.languageModel = createLanguageModel;
|
|
1536
|
+
provider.chatModel = createChatModel;
|
|
1537
|
+
provider.completionModel = createCompletionModel;
|
|
1538
|
+
provider.embeddingModel = createEmbeddingModel;
|
|
1539
|
+
provider.textEmbeddingModel = createEmbeddingModel;
|
|
1540
|
+
provider.imageModel = createImageModel;
|
|
1541
|
+
return provider;
|
|
1542
|
+
}
|
|
1543
|
+
export {
|
|
1544
|
+
OpenAICompatibleChatLanguageModel,
|
|
1545
|
+
OpenAICompatibleCompletionLanguageModel,
|
|
1546
|
+
OpenAICompatibleEmbeddingModel,
|
|
1547
|
+
OpenAICompatibleImageModel,
|
|
1548
|
+
VERSION,
|
|
1549
|
+
createOpenAICompatible
|
|
1550
|
+
};
|
|
1551
|
+
//# sourceMappingURL=index.mjs.map
|