@llmops/sdk 0.2.11-beta.1 → 0.2.11-beta.3

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.
@@ -0,0 +1,20 @@
1
+ "use node";
2
+
3
+ //#region src/lib/convex/index.ts
4
+ function createLLMOpsHandler(client) {
5
+ const basePath = client.config.basePath;
6
+ return async (_ctx, request) => {
7
+ let urlPath = new URL(request.url).pathname;
8
+ if (basePath && basePath !== "/" && urlPath.startsWith(basePath)) urlPath = urlPath.slice(basePath.length) || "/";
9
+ const url = new URL(urlPath, request.url);
10
+ const newRequest = new Request(url, {
11
+ method: request.method,
12
+ headers: request.headers,
13
+ body: request.body
14
+ });
15
+ return client.handler(newRequest);
16
+ };
17
+ }
18
+
19
+ //#endregion
20
+ exports.createLLMOpsHandler = createLLMOpsHandler;
@@ -0,0 +1,7 @@
1
+ import { t as LLMOpsClient } from "./index-B2A4WBGq.cjs";
2
+ import { GenericActionCtx } from "convex/server";
3
+
4
+ //#region src/lib/convex/index.d.ts
5
+ declare function createLLMOpsHandler(client: LLMOpsClient): (_ctx: GenericActionCtx<any>, request: Request) => Promise<Response>;
6
+ //#endregion
7
+ export { createLLMOpsHandler };
@@ -0,0 +1,7 @@
1
+ import { t as LLMOpsClient } from "./index-DFnEar4S.mjs";
2
+ import { GenericActionCtx } from "convex/server";
3
+
4
+ //#region src/lib/convex/index.d.ts
5
+ declare function createLLMOpsHandler(client: LLMOpsClient): (_ctx: GenericActionCtx<any>, request: Request) => Promise<Response>;
6
+ //#endregion
7
+ export { createLLMOpsHandler };
@@ -0,0 +1,19 @@
1
+ "use node";
2
+ //#region src/lib/convex/index.ts
3
+ function createLLMOpsHandler(client) {
4
+ const basePath = client.config.basePath;
5
+ return async (_ctx, request) => {
6
+ let urlPath = new URL(request.url).pathname;
7
+ if (basePath && basePath !== "/" && urlPath.startsWith(basePath)) urlPath = urlPath.slice(basePath.length) || "/";
8
+ const url = new URL(urlPath, request.url);
9
+ const newRequest = new Request(url, {
10
+ method: request.method,
11
+ headers: request.headers,
12
+ body: request.body
13
+ });
14
+ return client.handler(newRequest);
15
+ };
16
+ }
17
+
18
+ //#endregion
19
+ export { createLLMOpsHandler };
@@ -1,3 +1,4 @@
1
+ "use node";
1
2
  import { Readable } from "node:stream";
2
3
 
3
4
  //#region src/lib/express/index.ts
@@ -1,3 +1,4 @@
1
+ "use node";
1
2
  let node_stream = require("node:stream");
2
3
 
3
4
  //#region src/lib/express/index.ts
package/dist/express.cjs CHANGED
@@ -1,3 +1,4 @@
1
- const require_express = require('./express-B-wbCza5.cjs');
1
+ "use node";
2
+ const require_express = require('./express-DS8tVycv.cjs');
2
3
 
3
4
  exports.createLLMOpsMiddleware = require_express.createLLMOpsMiddleware;
@@ -1,3 +1,3 @@
1
- import "./index-fafxrrPF.cjs";
2
- import { t as createLLMOpsMiddleware } from "./index-UQjBf1t7.cjs";
1
+ import "./index-B2A4WBGq.cjs";
2
+ import { t as createLLMOpsMiddleware } from "./index-BbeQtPGT.cjs";
3
3
  export { createLLMOpsMiddleware };
@@ -1,3 +1,3 @@
1
- import "./index-BFiKnXi1.mjs";
2
- import { t as createLLMOpsMiddleware } from "./index-BL6HTepw.mjs";
1
+ import "./index-DFnEar4S.mjs";
2
+ import { t as createLLMOpsMiddleware } from "./index-BUNt7GzB.mjs";
3
3
  export { createLLMOpsMiddleware };
package/dist/express.mjs CHANGED
@@ -1,3 +1,4 @@
1
- import { t as createLLMOpsMiddleware } from "./express-BXdOPP-q.mjs";
1
+ "use node";
2
+ import { t as createLLMOpsMiddleware } from "./express-DADH-mmf.mjs";
2
3
 
3
4
  export { createLLMOpsMiddleware };
package/dist/hono.cjs CHANGED
@@ -1,3 +1,4 @@
1
+ "use node";
1
2
 
2
3
  //#region src/lib/hono/index.ts
3
4
  function createLLMOpsMiddleware(client) {
package/dist/hono.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as LLMOpsClient } from "./index-fafxrrPF.cjs";
1
+ import { t as LLMOpsClient } from "./index-B2A4WBGq.cjs";
2
2
  import { MiddlewareHandler } from "hono";
3
3
 
4
4
  //#region src/lib/hono/index.d.ts
package/dist/hono.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as LLMOpsClient } from "./index-BFiKnXi1.mjs";
1
+ import { t as LLMOpsClient } from "./index-DFnEar4S.mjs";
2
2
  import { MiddlewareHandler } from "hono";
3
3
 
4
4
  //#region src/lib/hono/index.d.ts
package/dist/hono.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ "use node";
1
2
  //#region src/lib/hono/index.ts
2
3
  function createLLMOpsMiddleware(client) {
3
4
  const basePath = client.config.basePath;
@@ -1,4 +1,4 @@
1
- import { t as LLMOpsClient } from "./index-fafxrrPF.cjs";
1
+ import { t as LLMOpsClient } from "./index-DFnEar4S.mjs";
2
2
  import { NextFunction, Request, Response } from "express";
3
3
 
4
4
  //#region src/lib/express/index.d.ts
@@ -1,4 +1,4 @@
1
- import { t as LLMOpsClient } from "./index-BFiKnXi1.mjs";
1
+ import { t as LLMOpsClient } from "./index-B2A4WBGq.cjs";
2
2
  import { NextFunction, Request, Response } from "express";
3
3
 
4
4
  //#region src/lib/express/index.d.ts
package/dist/index.cjs CHANGED
@@ -1,4 +1,5 @@
1
- const require_express = require('./express-B-wbCza5.cjs');
1
+ "use node";
2
+ const require_express = require('./express-DS8tVycv.cjs');
2
3
  require("@llmops/core");
3
4
  let __llmops_app = require("@llmops/app");
4
5
 
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as createLLMOps } from "./index-fafxrrPF.cjs";
2
- import { t as createLLMOpsMiddleware } from "./index-UQjBf1t7.cjs";
1
+ import { n as createLLMOps } from "./index-B2A4WBGq.cjs";
2
+ import { t as createLLMOpsMiddleware } from "./index-BbeQtPGT.cjs";
3
3
 
4
4
  //#region src/lib/auth/client.d.ts
5
5
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as createLLMOps } from "./index-BFiKnXi1.mjs";
2
- import { t as createLLMOpsMiddleware } from "./index-BL6HTepw.mjs";
1
+ import { n as createLLMOps } from "./index-DFnEar4S.mjs";
2
+ import { t as createLLMOpsMiddleware } from "./index-BUNt7GzB.mjs";
3
3
 
4
4
  //#region src/lib/auth/client.d.ts
5
5
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
- import { t as createLLMOpsMiddleware } from "./express-BXdOPP-q.mjs";
1
+ "use node";
2
+ import { t as createLLMOpsMiddleware } from "./express-DADH-mmf.mjs";
2
3
  import "@llmops/core";
3
4
  import { createApp } from "@llmops/app";
4
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmops/sdk",
3
- "version": "0.2.11-beta.1",
3
+ "version": "0.2.11-beta.3",
4
4
  "description": "An LLMOps toolkit for TypeScript applications",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -58,17 +58,28 @@
58
58
  "default": "./dist/hono.cjs"
59
59
  }
60
60
  },
61
+ "./convex": {
62
+ "import": {
63
+ "types": "./dist/convex.d.mts",
64
+ "default": "./dist/convex.mjs"
65
+ },
66
+ "require": {
67
+ "types": "./dist/convex.d.cts",
68
+ "default": "./dist/convex.cjs"
69
+ }
70
+ },
61
71
  "./*": "./*"
62
72
  },
63
73
  "publishConfig": {
64
74
  "access": "public"
65
75
  },
66
76
  "dependencies": {
67
- "@llmops/core": "^0.2.11-beta.1",
68
- "@llmops/app": "^0.2.11-beta.1"
77
+ "@llmops/app": "^0.2.11-beta.3",
78
+ "@llmops/core": "^0.2.11-beta.3"
69
79
  },
70
80
  "devDependencies": {
71
81
  "@types/express": "^5.0.6",
82
+ "convex": "^1.31.4",
72
83
  "hono": "^4.7.0"
73
84
  },
74
85
  "scripts": {