jaypie 1.1.77-rc.3 → 1.2.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/error.constant.ts","../../../src/loadPackage.ts","../../../src/aws.ts","../../../src/datadog.ts","../../../src/express.ts","../../../src/lambda.ts","../../../src/llm.ts","../../../src/mongoose.ts"],"sourcesContent":["// ERROR constant - mirror from @jaypie/errors types\nexport const ERROR = {\n MESSAGE: {\n BAD_GATEWAY: \"An unexpected error occurred on an upstream resource\",\n BAD_REQUEST: \"The request was not properly formatted\",\n CONFIGURATION_ERROR:\n \"The application responding to the request encountered a configuration error\",\n CORS_ERROR: \"The requesting origin is not authorized to this resource\",\n FORBIDDEN: \"Access to this resource is not authorized\",\n GATEWAY_TIMEOUT:\n \"The connection timed out waiting for an upstream resource\",\n GONE: \"The requested resource is no longer available\",\n ILLOGICAL:\n \"The application encountered an illogical condition while processing the request\",\n INTERNAL_ERROR:\n \"An unexpected error occurred and the request was unable to complete\",\n METHOD_NOT_ALLOWED: \"The requested method is not allowed\",\n NOT_FOUND: \"The requested resource was not found\",\n NOT_IMPLEMENTED:\n \"The request was understood but the resource is not implemented\",\n REJECTED: \"The request was rejected prior to processing\",\n TEAPOT: \"This resource is a teapot incapable of processing the request\",\n TOO_MANY_REQUESTS: \"The requesting origin exceeded the request limit\",\n UNAUTHORIZED:\n \"The request did not include valid authentication credentials\",\n UNAVAILABLE: \"The requested resource is temporarily unavailable\",\n UNHANDLED:\n \"An unhandled error occurred and the request was unable to complete\",\n UNREACHABLE_CODE:\n \"The application encountered an unreachable condition while processing the request\",\n },\n TITLE: {\n BAD_GATEWAY: \"Bad Gateway\",\n BAD_REQUEST: \"Bad Request\",\n CONFIGURATION_ERROR: \"Internal Configuration Error\",\n CORS_ERROR: \"Unauthorized Origin\",\n FORBIDDEN: \"Forbidden\",\n GATEWAY_TIMEOUT: \"Gateway Timeout\",\n GONE: \"Gone\",\n INTERNAL_ERROR: \"Internal Application Error\",\n METHOD_NOT_ALLOWED: \"Method Not Allowed\",\n NOT_FOUND: \"Not Found\",\n NOT_IMPLEMENTED: \"Not Implemented\",\n REJECTED: \"Request Rejected\",\n TEAPOT: \"Teapot\",\n TOO_MANY_REQUESTS: \"Too Many Requests\",\n UNAUTHORIZED: \"Service Unauthorized\",\n UNAVAILABLE: \"Service Unavailable\",\n },\n TYPE: {\n BAD_GATEWAY: \"BAD_GATEWAY\",\n BAD_REQUEST: \"BAD_REQUEST\",\n CONFIGURATION_ERROR: \"CONFIGURATION_ERROR\",\n CORS_ERROR: \"CORS_ERROR\",\n FORBIDDEN: \"FORBIDDEN\",\n GATEWAY_TIMEOUT: \"GATEWAY_TIMEOUT\",\n GONE: \"GONE\",\n ILLOGICAL: \"ILLOGICAL\",\n INTERNAL_ERROR: \"INTERNAL_ERROR\",\n METHOD_NOT_ALLOWED: \"METHOD_NOT_ALLOWED\",\n MULTI_ERROR: \"MULTI_ERROR\",\n NOT_FOUND: \"NOT_FOUND\",\n NOT_IMPLEMENTED: \"NOT_IMPLEMENTED\",\n REJECTED: \"REJECTED\",\n TEAPOT: \"TEAPOT\",\n TOO_MANY_REQUESTS: \"TOO_MANY_REQUESTS\",\n UNAUTHORIZED: \"UNAUTHORIZED\",\n UNAVAILABLE: \"UNAVAILABLE\",\n UNHANDLED: \"UNHANDLED\",\n UNKNOWN_TYPE: \"UNKNOWN_TYPE\",\n UNREACHABLE_CODE: \"UNREACHABLE_CODE\",\n },\n} as const;\n","import { createRequire } from \"module\";\nimport { ConfigurationError } from \"@jaypie/errors\";\n\n// Using createRequire for synchronous package loading - required for lazy loading pattern\nconst require = createRequire(import.meta.url);\nconst packageCache = new Map<string, unknown>();\n\nexport function loadPackage<T>(packageName: string): T {\n if (packageCache.has(packageName)) {\n return packageCache.get(packageName) as T;\n }\n\n try {\n // eslint-disable-next-line no-restricted-syntax\n const pkg = require(packageName) as T;\n packageCache.set(packageName, pkg);\n return pkg;\n } catch {\n throw new ConfigurationError(\n `${packageName} is required but not installed. Run: npm install ${packageName}`,\n );\n }\n}\n","import { loadPackage } from \"./loadPackage.js\";\nimport type * as AwsTypes from \"@jaypie/aws\";\n\ntype AwsModule = typeof AwsTypes;\n\nexport function getEnvSecret(\n ...args: Parameters<AwsModule[\"getEnvSecret\"]>\n): ReturnType<AwsModule[\"getEnvSecret\"]> {\n return loadPackage<AwsModule>(\"@jaypie/aws\").getEnvSecret(...args);\n}\n\nexport function getMessages(\n ...args: Parameters<AwsModule[\"getMessages\"]>\n): ReturnType<AwsModule[\"getMessages\"]> {\n return loadPackage<AwsModule>(\"@jaypie/aws\").getMessages(...args);\n}\n\nexport function getSecret(\n ...args: Parameters<AwsModule[\"getSecret\"]>\n): ReturnType<AwsModule[\"getSecret\"]> {\n return loadPackage<AwsModule>(\"@jaypie/aws\").getSecret(...args);\n}\n\nexport function getSingletonMessage(\n ...args: Parameters<AwsModule[\"getSingletonMessage\"]>\n): ReturnType<AwsModule[\"getSingletonMessage\"]> {\n return loadPackage<AwsModule>(\"@jaypie/aws\").getSingletonMessage(...args);\n}\n\nexport function getTextractJob(\n ...args: Parameters<AwsModule[\"getTextractJob\"]>\n): ReturnType<AwsModule[\"getTextractJob\"]> {\n return loadPackage<AwsModule>(\"@jaypie/aws\").getTextractJob(...args);\n}\n\nexport function sendBatchMessages(\n ...args: Parameters<AwsModule[\"sendBatchMessages\"]>\n): ReturnType<AwsModule[\"sendBatchMessages\"]> {\n return loadPackage<AwsModule>(\"@jaypie/aws\").sendBatchMessages(...args);\n}\n\nexport function sendMessage(\n ...args: Parameters<AwsModule[\"sendMessage\"]>\n): ReturnType<AwsModule[\"sendMessage\"]> {\n return loadPackage<AwsModule>(\"@jaypie/aws\").sendMessage(...args);\n}\n\nexport function sendTextractJob(\n ...args: Parameters<AwsModule[\"sendTextractJob\"]>\n): ReturnType<AwsModule[\"sendTextractJob\"]> {\n return loadPackage<AwsModule>(\"@jaypie/aws\").sendTextractJob(...args);\n}\n","import { loadPackage } from \"./loadPackage.js\";\nimport type * as DatadogTypes from \"@jaypie/datadog\";\n\ntype DatadogModule = typeof DatadogTypes;\n\n// Re-export constant via getter to lazy load\nexport const DATADOG: DatadogModule[\"DATADOG\"] = new Proxy(\n {} as DatadogModule[\"DATADOG\"],\n {\n get(_, prop) {\n return loadPackage<DatadogModule>(\"@jaypie/datadog\").DATADOG[\n prop as keyof DatadogModule[\"DATADOG\"]\n ];\n },\n },\n);\n\nexport function hasDatadogEnv(\n ...args: Parameters<DatadogModule[\"hasDatadogEnv\"]>\n): ReturnType<DatadogModule[\"hasDatadogEnv\"]> {\n return loadPackage<DatadogModule>(\"@jaypie/datadog\").hasDatadogEnv(...args);\n}\n\nexport function submitDistribution(\n ...args: Parameters<DatadogModule[\"submitDistribution\"]>\n): ReturnType<DatadogModule[\"submitDistribution\"]> {\n return loadPackage<DatadogModule>(\"@jaypie/datadog\").submitDistribution(\n ...args,\n );\n}\n\nexport function submitMetric(\n ...args: Parameters<DatadogModule[\"submitMetric\"]>\n): ReturnType<DatadogModule[\"submitMetric\"]> {\n return loadPackage<DatadogModule>(\"@jaypie/datadog\").submitMetric(...args);\n}\n\nexport function submitMetricSet(\n ...args: Parameters<DatadogModule[\"submitMetricSet\"]>\n): ReturnType<DatadogModule[\"submitMetricSet\"]> {\n return loadPackage<DatadogModule>(\"@jaypie/datadog\").submitMetricSet(...args);\n}\n","import { loadPackage } from \"./loadPackage.js\";\nimport type * as ExpressTypes from \"@jaypie/express\";\n\ntype ExpressModule = typeof ExpressTypes;\n\n// Re-export types (these don't require the package at runtime)\nexport type {\n CorsConfig,\n ExpressHandlerLocals,\n ExpressHandlerOptions,\n JaypieHandlerSetup,\n JaypieHandlerTeardown,\n JaypieHandlerValidate,\n} from \"@jaypie/express\";\n\n// Re-export constant via getter to lazy load\nexport const EXPRESS: ExpressModule[\"EXPRESS\"] = new Proxy(\n {} as ExpressModule[\"EXPRESS\"],\n {\n get(_, prop) {\n return loadPackage<ExpressModule>(\"@jaypie/express\").EXPRESS[\n prop as keyof ExpressModule[\"EXPRESS\"]\n ];\n },\n },\n);\n\nexport function cors(\n ...args: Parameters<ExpressModule[\"cors\"]>\n): ReturnType<ExpressModule[\"cors\"]> {\n return loadPackage<ExpressModule>(\"@jaypie/express\").cors(...args);\n}\n\nexport function expressHandler(\n ...args: Parameters<ExpressModule[\"expressHandler\"]>\n): ReturnType<ExpressModule[\"expressHandler\"]> {\n return loadPackage<ExpressModule>(\"@jaypie/express\").expressHandler(...args);\n}\n\nexport function expressHttpCodeHandler(\n ...args: Parameters<ExpressModule[\"expressHttpCodeHandler\"]>\n): ReturnType<ExpressModule[\"expressHttpCodeHandler\"]> {\n return loadPackage<ExpressModule>(\"@jaypie/express\").expressHttpCodeHandler(\n ...args,\n );\n}\n\n// Route exports - these are pre-created handlers, so we use getters\nexport const badRequestRoute: ExpressModule[\"badRequestRoute\"] = new Proxy(\n (() => {}) as unknown as ExpressModule[\"badRequestRoute\"],\n {\n apply(_, thisArg, args) {\n return Reflect.apply(\n loadPackage<ExpressModule>(\"@jaypie/express\").badRequestRoute,\n thisArg,\n args,\n );\n },\n get(_, prop) {\n const route = loadPackage<ExpressModule>(\"@jaypie/express\")\n .badRequestRoute as unknown as Record<string, unknown>;\n return route[prop as string];\n },\n },\n);\n\nexport const echoRoute: ExpressModule[\"echoRoute\"] = new Proxy(\n (() => {}) as unknown as ExpressModule[\"echoRoute\"],\n {\n apply(_, thisArg, args) {\n return Reflect.apply(\n loadPackage<ExpressModule>(\"@jaypie/express\").echoRoute,\n thisArg,\n args,\n );\n },\n get(_, prop) {\n const route = loadPackage<ExpressModule>(\"@jaypie/express\")\n .echoRoute as unknown as Record<string, unknown>;\n return route[prop as string];\n },\n },\n);\n\nexport const forbiddenRoute: ExpressModule[\"forbiddenRoute\"] = new Proxy(\n (() => {}) as unknown as ExpressModule[\"forbiddenRoute\"],\n {\n apply(_, thisArg, args) {\n return Reflect.apply(\n loadPackage<ExpressModule>(\"@jaypie/express\").forbiddenRoute,\n thisArg,\n args,\n );\n },\n get(_, prop) {\n const route = loadPackage<ExpressModule>(\"@jaypie/express\")\n .forbiddenRoute as unknown as Record<string, unknown>;\n return route[prop as string];\n },\n },\n);\n\nexport const goneRoute: ExpressModule[\"goneRoute\"] = new Proxy(\n (() => {}) as unknown as ExpressModule[\"goneRoute\"],\n {\n apply(_, thisArg, args) {\n return Reflect.apply(\n loadPackage<ExpressModule>(\"@jaypie/express\").goneRoute,\n thisArg,\n args,\n );\n },\n get(_, prop) {\n const route = loadPackage<ExpressModule>(\"@jaypie/express\")\n .goneRoute as unknown as Record<string, unknown>;\n return route[prop as string];\n },\n },\n);\n\nexport const methodNotAllowedRoute: ExpressModule[\"methodNotAllowedRoute\"] =\n new Proxy((() => {}) as unknown as ExpressModule[\"methodNotAllowedRoute\"], {\n apply(_, thisArg, args) {\n return Reflect.apply(\n loadPackage<ExpressModule>(\"@jaypie/express\").methodNotAllowedRoute,\n thisArg,\n args,\n );\n },\n get(_, prop) {\n const route = loadPackage<ExpressModule>(\"@jaypie/express\")\n .methodNotAllowedRoute as unknown as Record<string, unknown>;\n return route[prop as string];\n },\n });\n\nexport const noContentRoute: ExpressModule[\"noContentRoute\"] = new Proxy(\n (() => {}) as unknown as ExpressModule[\"noContentRoute\"],\n {\n apply(_, thisArg, args) {\n return Reflect.apply(\n loadPackage<ExpressModule>(\"@jaypie/express\").noContentRoute,\n thisArg,\n args,\n );\n },\n get(_, prop) {\n const route = loadPackage<ExpressModule>(\"@jaypie/express\")\n .noContentRoute as unknown as Record<string, unknown>;\n return route[prop as string];\n },\n },\n);\n\nexport const notFoundRoute: ExpressModule[\"notFoundRoute\"] = new Proxy(\n (() => {}) as unknown as ExpressModule[\"notFoundRoute\"],\n {\n apply(_, thisArg, args) {\n return Reflect.apply(\n loadPackage<ExpressModule>(\"@jaypie/express\").notFoundRoute,\n thisArg,\n args,\n );\n },\n get(_, prop) {\n const route = loadPackage<ExpressModule>(\"@jaypie/express\")\n .notFoundRoute as unknown as Record<string, unknown>;\n return route[prop as string];\n },\n },\n);\n\nexport const notImplementedRoute: ExpressModule[\"notImplementedRoute\"] =\n new Proxy((() => {}) as unknown as ExpressModule[\"notImplementedRoute\"], {\n apply(_, thisArg, args) {\n return Reflect.apply(\n loadPackage<ExpressModule>(\"@jaypie/express\").notImplementedRoute,\n thisArg,\n args,\n );\n },\n get(_, prop) {\n const route = loadPackage<ExpressModule>(\"@jaypie/express\")\n .notImplementedRoute as unknown as Record<string, unknown>;\n return route[prop as string];\n },\n });\n","import { loadPackage } from \"./loadPackage.js\";\nimport type * as LambdaTypes from \"@jaypie/lambda\";\n\ntype LambdaModule = typeof LambdaTypes;\n\nexport function lambdaHandler(\n ...args: Parameters<LambdaModule[\"lambdaHandler\"]>\n): ReturnType<LambdaModule[\"lambdaHandler\"]> {\n return loadPackage<LambdaModule>(\"@jaypie/lambda\").lambdaHandler(...args);\n}\n","import { loadPackage } from \"./loadPackage.js\";\nimport type * as LlmTypes from \"@jaypie/llm\";\n\ntype LlmModule = typeof LlmTypes;\n\n// Re-export types (these don't require the package at runtime)\nexport type {\n LlmHistory,\n LlmInputContent,\n LlmInputContentFile,\n LlmInputContentImage,\n LlmInputContentText,\n LlmInputMessage,\n LlmMessageOptions,\n LlmOperateOptions,\n LlmOperateResponse,\n LlmOptions,\n LlmProvider,\n LlmTool,\n} from \"@jaypie/llm\";\n\n// Re-export enums via getters\nexport const LlmMessageRole: typeof LlmTypes.LlmMessageRole = new Proxy(\n {} as typeof LlmTypes.LlmMessageRole,\n {\n get(_, prop) {\n return loadPackage<LlmModule>(\"@jaypie/llm\").LlmMessageRole[\n prop as keyof typeof LlmTypes.LlmMessageRole\n ];\n },\n },\n);\n\nexport const LlmMessageType: typeof LlmTypes.LlmMessageType = new Proxy(\n {} as typeof LlmTypes.LlmMessageType,\n {\n get(_, prop) {\n return loadPackage<LlmModule>(\"@jaypie/llm\").LlmMessageType[\n prop as keyof typeof LlmTypes.LlmMessageType\n ];\n },\n },\n);\n\n// Re-export LLM constants namespace via getter\nexport const LLM: typeof LlmTypes.LLM = new Proxy({} as typeof LlmTypes.LLM, {\n get(_, prop) {\n return loadPackage<LlmModule>(\"@jaypie/llm\").LLM[\n prop as keyof typeof LlmTypes.LLM\n ];\n },\n});\n\n// Llm class wrapper\nexport const Llm: typeof LlmTypes.Llm = new Proxy(\n function () {} as unknown as typeof LlmTypes.Llm,\n {\n construct(_, args) {\n const LlmClass = loadPackage<LlmModule>(\"@jaypie/llm\").Llm;\n return new LlmClass(...(args as ConstructorParameters<typeof LlmClass>));\n },\n get(_, prop) {\n const LlmClass = loadPackage<LlmModule>(\"@jaypie/llm\")\n .Llm as unknown as Record<string, unknown>;\n return LlmClass[prop as string];\n },\n },\n);\n\n// Toolkit exports\nexport const JaypieToolkit: typeof LlmTypes.JaypieToolkit = new Proxy(\n function () {} as unknown as typeof LlmTypes.JaypieToolkit,\n {\n construct(_, args) {\n const ToolkitClass = loadPackage<LlmModule>(\"@jaypie/llm\").JaypieToolkit;\n return new ToolkitClass(\n ...(args as ConstructorParameters<typeof ToolkitClass>),\n );\n },\n get(_, prop) {\n const ToolkitClass = loadPackage<LlmModule>(\"@jaypie/llm\")\n .JaypieToolkit as unknown as Record<string, unknown>;\n return ToolkitClass[prop as string];\n },\n },\n);\n\nexport const Toolkit: typeof LlmTypes.Toolkit = new Proxy(\n function () {} as unknown as typeof LlmTypes.Toolkit,\n {\n construct(_, args) {\n const ToolkitClass = loadPackage<LlmModule>(\"@jaypie/llm\").Toolkit;\n return new ToolkitClass(\n ...(args as ConstructorParameters<typeof ToolkitClass>),\n );\n },\n get(_, prop) {\n const ToolkitClass = loadPackage<LlmModule>(\"@jaypie/llm\")\n .Toolkit as unknown as Record<string, unknown>;\n return ToolkitClass[prop as string];\n },\n },\n);\n\n// toolkit and tools are objects/instances\nexport const toolkit: typeof LlmTypes.toolkit = new Proxy(\n {} as typeof LlmTypes.toolkit,\n {\n get(_, prop) {\n const toolkitObj = loadPackage<LlmModule>(\"@jaypie/llm\")\n .toolkit as unknown as Record<string, unknown>;\n return toolkitObj[prop as string];\n },\n },\n);\n\nexport const tools: typeof LlmTypes.tools = new Proxy(\n {} as typeof LlmTypes.tools,\n {\n get(_, prop) {\n const toolsObj = loadPackage<LlmModule>(\"@jaypie/llm\")\n .tools as unknown as Record<string, unknown>;\n return toolsObj[prop as string];\n },\n },\n);\n\n// Provider exports\nexport const GeminiProvider: typeof LlmTypes.GeminiProvider = new Proxy(\n function () {} as unknown as typeof LlmTypes.GeminiProvider,\n {\n construct(_, args) {\n const ProviderClass =\n loadPackage<LlmModule>(\"@jaypie/llm\").GeminiProvider;\n return new ProviderClass(\n ...(args as ConstructorParameters<typeof ProviderClass>),\n );\n },\n get(_, prop) {\n const ProviderClass = loadPackage<LlmModule>(\"@jaypie/llm\")\n .GeminiProvider as unknown as Record<string, unknown>;\n return ProviderClass[prop as string];\n },\n },\n);\n\nexport const OpenRouterProvider: typeof LlmTypes.OpenRouterProvider = new Proxy(\n function () {} as unknown as typeof LlmTypes.OpenRouterProvider,\n {\n construct(_, args) {\n const ProviderClass =\n loadPackage<LlmModule>(\"@jaypie/llm\").OpenRouterProvider;\n return new ProviderClass(\n ...(args as ConstructorParameters<typeof ProviderClass>),\n );\n },\n get(_, prop) {\n const ProviderClass = loadPackage<LlmModule>(\"@jaypie/llm\")\n .OpenRouterProvider as unknown as Record<string, unknown>;\n return ProviderClass[prop as string];\n },\n },\n);\n","import { loadPackage } from \"./loadPackage.js\";\nimport type * as MongooseTypes from \"@jaypie/mongoose\";\n\ntype MongooseModule = typeof MongooseTypes;\n\nexport function connect(\n ...args: Parameters<MongooseModule[\"connect\"]>\n): ReturnType<MongooseModule[\"connect\"]> {\n return loadPackage<MongooseModule>(\"@jaypie/mongoose\").connect(...args);\n}\n\nexport function connectFromSecretEnv(\n ...args: Parameters<MongooseModule[\"connectFromSecretEnv\"]>\n): ReturnType<MongooseModule[\"connectFromSecretEnv\"]> {\n return loadPackage<MongooseModule>(\"@jaypie/mongoose\").connectFromSecretEnv(\n ...args,\n );\n}\n\nexport function disconnect(): ReturnType<MongooseModule[\"disconnect\"]> {\n return loadPackage<MongooseModule>(\"@jaypie/mongoose\").disconnect();\n}\n\n// Re-export mongoose via getter to lazy load\nexport const mongoose: MongooseModule[\"mongoose\"] = new Proxy(\n {} as MongooseModule[\"mongoose\"],\n {\n get(_, prop) {\n const mongoosePkg = loadPackage<MongooseModule>(\"@jaypie/mongoose\")\n .mongoose as unknown as Record<string, unknown>;\n return mongoosePkg[prop as string];\n },\n apply(_, thisArg, args) {\n const mongoosePkg = loadPackage<MongooseModule>(\"@jaypie/mongoose\")\n .mongoose as unknown as (...args: unknown[]) => unknown;\n return Reflect.apply(mongoosePkg, thisArg, args);\n },\n },\n);\n"],"names":["require","createRequire","ConfigurationError"],"mappings":";;;;;;;;;AAAA;AACO,MAAM,KAAK,GAAG;AACnB,IAAA,OAAO,EAAE;AACP,QAAA,WAAW,EAAE,sDAAsD;AACnE,QAAA,WAAW,EAAE,wCAAwC;AACrD,QAAA,mBAAmB,EACjB,6EAA6E;AAC/E,QAAA,UAAU,EAAE,0DAA0D;AACtE,QAAA,SAAS,EAAE,2CAA2C;AACtD,QAAA,eAAe,EACb,2DAA2D;AAC7D,QAAA,IAAI,EAAE,+CAA+C;AACrD,QAAA,SAAS,EACP,iFAAiF;AACnF,QAAA,cAAc,EACZ,qEAAqE;AACvE,QAAA,kBAAkB,EAAE,qCAAqC;AACzD,QAAA,SAAS,EAAE,sCAAsC;AACjD,QAAA,eAAe,EACb,gEAAgE;AAClE,QAAA,QAAQ,EAAE,8CAA8C;AACxD,QAAA,MAAM,EAAE,+DAA+D;AACvE,QAAA,iBAAiB,EAAE,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SAEgB,UAAU,GAAA;AACxB,IAAA,OAAO,WAAW,CAAiB,kBAAkB,CAAC,CAAC,UAAU,EAAE;AACrE;AAEA;MACa,QAAQ,GAA+B,IAAI,KAAK,CAC3D,EAAgC,EAChC;IACE,GAAG,CAAC,CAAC,EAAE,IAAI,EAAA;AACT,QAAA,MAAM,WAAW,GAAG,WAAW,CAAiB,kBAAkB;AAC/D,aAAA,QAA8C;AACjD,QAAA,OAAO,WAAW,CAAC,IAAc,CAAC;IACpC,CAAC;AACD,IAAA,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAA;AACpB,QAAA,MAAM,WAAW,GAAG,WAAW,CAAiB,kBAAkB;AAC/D,aAAA,QAAsD;QACzD,OAAO,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC;IAClD,CAAC;AACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,15 @@
1
- export * from "@jaypie/core";
2
- export * from "@jaypie/aws";
3
- export * from "@jaypie/datadog";
4
- export * from "@jaypie/express";
5
- export * from "@jaypie/lambda";
6
- export * from "@jaypie/llm";
1
+ export * from "@jaypie/errors";
2
+ export { jaypieErrorFromStatus as errorFromStatusCode } from "@jaypie/errors";
3
+ export { InternalError as ProjectError } from "@jaypie/errors";
4
+ export { InternalError as MultiError } from "@jaypie/errors";
5
+ export { InternalError as ProjectMultiError } from "@jaypie/errors";
6
+ export { ERROR } from "./error.constant.js";
7
7
  export * from "@jaypie/kit";
8
- export * from "@jaypie/mongoose";
8
+ export { log } from "@jaypie/logger";
9
+ export { v4 as uuid } from "uuid";
10
+ export * from "./aws.js";
11
+ export * from "./datadog.js";
12
+ export * from "./express.js";
13
+ export * from "./lambda.js";
14
+ export * from "./llm.js";
15
+ export * from "./mongoose.js";
@@ -0,0 +1,5 @@
1
+ import type * as KitTypes from "@jaypie/kit";
2
+ type KitModule = typeof KitTypes;
3
+ export declare function isNodeTestEnv(...args: Parameters<KitModule["isNodeTestEnv"]>): ReturnType<KitModule["isNodeTestEnv"]>;
4
+ export declare function isProductionEnv(...args: Parameters<KitModule["isProductionEnv"]>): ReturnType<KitModule["isProductionEnv"]>;
5
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as LambdaTypes from "@jaypie/lambda";
2
+ type LambdaModule = typeof LambdaTypes;
3
+ export declare function lambdaHandler(...args: Parameters<LambdaModule["lambdaHandler"]>): ReturnType<LambdaModule["lambdaHandler"]>;
4
+ export {};
@@ -0,0 +1,12 @@
1
+ import type * as LlmTypes from "@jaypie/llm";
2
+ export type { LlmHistory, LlmInputContent, LlmInputContentFile, LlmInputContentImage, LlmInputContentText, LlmInputMessage, LlmMessageOptions, LlmOperateOptions, LlmOperateResponse, LlmOptions, LlmProvider, LlmTool, } from "@jaypie/llm";
3
+ export declare const LlmMessageRole: typeof LlmTypes.LlmMessageRole;
4
+ export declare const LlmMessageType: typeof LlmTypes.LlmMessageType;
5
+ export declare const LLM: typeof LlmTypes.LLM;
6
+ export declare const Llm: typeof LlmTypes.Llm;
7
+ export declare const JaypieToolkit: typeof LlmTypes.JaypieToolkit;
8
+ export declare const Toolkit: typeof LlmTypes.Toolkit;
9
+ export declare const toolkit: typeof LlmTypes.toolkit;
10
+ export declare const tools: typeof LlmTypes.tools;
11
+ export declare const GeminiProvider: typeof LlmTypes.GeminiProvider;
12
+ export declare const OpenRouterProvider: typeof LlmTypes.OpenRouterProvider;
@@ -0,0 +1 @@
1
+ export declare function loadPackage<T>(packageName: string): T;
@@ -0,0 +1,7 @@
1
+ import type * as MongooseTypes from "@jaypie/mongoose";
2
+ type MongooseModule = typeof MongooseTypes;
3
+ export declare function connect(...args: Parameters<MongooseModule["connect"]>): ReturnType<MongooseModule["connect"]>;
4
+ export declare function connectFromSecretEnv(...args: Parameters<MongooseModule["connectFromSecretEnv"]>): ReturnType<MongooseModule["connectFromSecretEnv"]>;
5
+ export declare function disconnect(): ReturnType<MongooseModule["disconnect"]>;
6
+ export declare const mongoose: MongooseModule["mongoose"];
7
+ export {};
@@ -0,0 +1,11 @@
1
+ import type * as AwsTypes from "@jaypie/aws";
2
+ type AwsModule = typeof AwsTypes;
3
+ export declare function getEnvSecret(...args: Parameters<AwsModule["getEnvSecret"]>): ReturnType<AwsModule["getEnvSecret"]>;
4
+ export declare function getMessages(...args: Parameters<AwsModule["getMessages"]>): ReturnType<AwsModule["getMessages"]>;
5
+ export declare function getSecret(...args: Parameters<AwsModule["getSecret"]>): ReturnType<AwsModule["getSecret"]>;
6
+ export declare function getSingletonMessage(...args: Parameters<AwsModule["getSingletonMessage"]>): ReturnType<AwsModule["getSingletonMessage"]>;
7
+ export declare function getTextractJob(...args: Parameters<AwsModule["getTextractJob"]>): ReturnType<AwsModule["getTextractJob"]>;
8
+ export declare function sendBatchMessages(...args: Parameters<AwsModule["sendBatchMessages"]>): ReturnType<AwsModule["sendBatchMessages"]>;
9
+ export declare function sendMessage(...args: Parameters<AwsModule["sendMessage"]>): ReturnType<AwsModule["sendMessage"]>;
10
+ export declare function sendTextractJob(...args: Parameters<AwsModule["sendTextractJob"]>): ReturnType<AwsModule["sendTextractJob"]>;
11
+ export {};
@@ -0,0 +1,8 @@
1
+ import type * as DatadogTypes from "@jaypie/datadog";
2
+ type DatadogModule = typeof DatadogTypes;
3
+ export declare const DATADOG: DatadogModule["DATADOG"];
4
+ export declare function hasDatadogEnv(...args: Parameters<DatadogModule["hasDatadogEnv"]>): ReturnType<DatadogModule["hasDatadogEnv"]>;
5
+ export declare function submitDistribution(...args: Parameters<DatadogModule["submitDistribution"]>): ReturnType<DatadogModule["submitDistribution"]>;
6
+ export declare function submitMetric(...args: Parameters<DatadogModule["submitMetric"]>): ReturnType<DatadogModule["submitMetric"]>;
7
+ export declare function submitMetricSet(...args: Parameters<DatadogModule["submitMetricSet"]>): ReturnType<DatadogModule["submitMetricSet"]>;
8
+ export {};
@@ -0,0 +1,64 @@
1
+ export declare const ERROR: {
2
+ readonly MESSAGE: {
3
+ readonly BAD_GATEWAY: "An unexpected error occurred on an upstream resource";
4
+ readonly BAD_REQUEST: "The request was not properly formatted";
5
+ readonly CONFIGURATION_ERROR: "The application responding to the request encountered a configuration error";
6
+ readonly CORS_ERROR: "The requesting origin is not authorized to this resource";
7
+ readonly FORBIDDEN: "Access to this resource is not authorized";
8
+ readonly GATEWAY_TIMEOUT: "The connection timed out waiting for an upstream resource";
9
+ readonly GONE: "The requested resource is no longer available";
10
+ readonly ILLOGICAL: "The application encountered an illogical condition while processing the request";
11
+ readonly INTERNAL_ERROR: "An unexpected error occurred and the request was unable to complete";
12
+ readonly METHOD_NOT_ALLOWED: "The requested method is not allowed";
13
+ readonly NOT_FOUND: "The requested resource was not found";
14
+ readonly NOT_IMPLEMENTED: "The request was understood but the resource is not implemented";
15
+ readonly REJECTED: "The request was rejected prior to processing";
16
+ readonly TEAPOT: "This resource is a teapot incapable of processing the request";
17
+ readonly TOO_MANY_REQUESTS: "The requesting origin exceeded the request limit";
18
+ readonly UNAUTHORIZED: "The request did not include valid authentication credentials";
19
+ readonly UNAVAILABLE: "The requested resource is temporarily unavailable";
20
+ readonly UNHANDLED: "An unhandled error occurred and the request was unable to complete";
21
+ readonly UNREACHABLE_CODE: "The application encountered an unreachable condition while processing the request";
22
+ };
23
+ readonly TITLE: {
24
+ readonly BAD_GATEWAY: "Bad Gateway";
25
+ readonly BAD_REQUEST: "Bad Request";
26
+ readonly CONFIGURATION_ERROR: "Internal Configuration Error";
27
+ readonly CORS_ERROR: "Unauthorized Origin";
28
+ readonly FORBIDDEN: "Forbidden";
29
+ readonly GATEWAY_TIMEOUT: "Gateway Timeout";
30
+ readonly GONE: "Gone";
31
+ readonly INTERNAL_ERROR: "Internal Application Error";
32
+ readonly METHOD_NOT_ALLOWED: "Method Not Allowed";
33
+ readonly NOT_FOUND: "Not Found";
34
+ readonly NOT_IMPLEMENTED: "Not Implemented";
35
+ readonly REJECTED: "Request Rejected";
36
+ readonly TEAPOT: "Teapot";
37
+ readonly TOO_MANY_REQUESTS: "Too Many Requests";
38
+ readonly UNAUTHORIZED: "Service Unauthorized";
39
+ readonly UNAVAILABLE: "Service Unavailable";
40
+ };
41
+ readonly TYPE: {
42
+ readonly BAD_GATEWAY: "BAD_GATEWAY";
43
+ readonly BAD_REQUEST: "BAD_REQUEST";
44
+ readonly CONFIGURATION_ERROR: "CONFIGURATION_ERROR";
45
+ readonly CORS_ERROR: "CORS_ERROR";
46
+ readonly FORBIDDEN: "FORBIDDEN";
47
+ readonly GATEWAY_TIMEOUT: "GATEWAY_TIMEOUT";
48
+ readonly GONE: "GONE";
49
+ readonly ILLOGICAL: "ILLOGICAL";
50
+ readonly INTERNAL_ERROR: "INTERNAL_ERROR";
51
+ readonly METHOD_NOT_ALLOWED: "METHOD_NOT_ALLOWED";
52
+ readonly MULTI_ERROR: "MULTI_ERROR";
53
+ readonly NOT_FOUND: "NOT_FOUND";
54
+ readonly NOT_IMPLEMENTED: "NOT_IMPLEMENTED";
55
+ readonly REJECTED: "REJECTED";
56
+ readonly TEAPOT: "TEAPOT";
57
+ readonly TOO_MANY_REQUESTS: "TOO_MANY_REQUESTS";
58
+ readonly UNAUTHORIZED: "UNAUTHORIZED";
59
+ readonly UNAVAILABLE: "UNAVAILABLE";
60
+ readonly UNHANDLED: "UNHANDLED";
61
+ readonly UNKNOWN_TYPE: "UNKNOWN_TYPE";
62
+ readonly UNREACHABLE_CODE: "UNREACHABLE_CODE";
63
+ };
64
+ };
@@ -0,0 +1,15 @@
1
+ import type * as ExpressTypes from "@jaypie/express";
2
+ type ExpressModule = typeof ExpressTypes;
3
+ export type { CorsConfig, ExpressHandlerLocals, ExpressHandlerOptions, JaypieHandlerSetup, JaypieHandlerTeardown, JaypieHandlerValidate, } from "@jaypie/express";
4
+ export declare const EXPRESS: ExpressModule["EXPRESS"];
5
+ export declare function cors(...args: Parameters<ExpressModule["cors"]>): ReturnType<ExpressModule["cors"]>;
6
+ export declare function expressHandler(...args: Parameters<ExpressModule["expressHandler"]>): ReturnType<ExpressModule["expressHandler"]>;
7
+ export declare function expressHttpCodeHandler(...args: Parameters<ExpressModule["expressHttpCodeHandler"]>): ReturnType<ExpressModule["expressHttpCodeHandler"]>;
8
+ export declare const badRequestRoute: ExpressModule["badRequestRoute"];
9
+ export declare const echoRoute: ExpressModule["echoRoute"];
10
+ export declare const forbiddenRoute: ExpressModule["forbiddenRoute"];
11
+ export declare const goneRoute: ExpressModule["goneRoute"];
12
+ export declare const methodNotAllowedRoute: ExpressModule["methodNotAllowedRoute"];
13
+ export declare const noContentRoute: ExpressModule["noContentRoute"];
14
+ export declare const notFoundRoute: ExpressModule["notFoundRoute"];
15
+ export declare const notImplementedRoute: ExpressModule["notImplementedRoute"];
@@ -1,8 +1,15 @@
1
- export * from "@jaypie/core";
2
- export * from "@jaypie/aws";
3
- export * from "@jaypie/datadog";
4
- export * from "@jaypie/express";
5
- export * from "@jaypie/lambda";
6
- export * from "@jaypie/llm";
1
+ export * from "@jaypie/errors";
2
+ export { jaypieErrorFromStatus as errorFromStatusCode } from "@jaypie/errors";
3
+ export { InternalError as ProjectError } from "@jaypie/errors";
4
+ export { InternalError as MultiError } from "@jaypie/errors";
5
+ export { InternalError as ProjectMultiError } from "@jaypie/errors";
6
+ export { ERROR } from "./error.constant.js";
7
7
  export * from "@jaypie/kit";
8
- export * from "@jaypie/mongoose";
8
+ export { log } from "@jaypie/logger";
9
+ export { v4 as uuid } from "uuid";
10
+ export * from "./aws.js";
11
+ export * from "./datadog.js";
12
+ export * from "./express.js";
13
+ export * from "./lambda.js";
14
+ export * from "./llm.js";
15
+ export * from "./mongoose.js";
package/dist/esm/index.js CHANGED
@@ -1,9 +1,353 @@
1
- export * from '@jaypie/core';
2
- export * from '@jaypie/aws';
3
- export * from '@jaypie/datadog';
4
- export * from '@jaypie/express';
5
- export * from '@jaypie/lambda';
6
- export * from '@jaypie/llm';
1
+ import { ConfigurationError } from '@jaypie/errors';
2
+ export * from '@jaypie/errors';
3
+ export { InternalError as MultiError, InternalError as ProjectError, InternalError as ProjectMultiError, jaypieErrorFromStatus as errorFromStatusCode } from '@jaypie/errors';
7
4
  export * from '@jaypie/kit';
8
- export * from '@jaypie/mongoose';
5
+ export { log } from '@jaypie/logger';
6
+ export { v4 as uuid } from 'uuid';
7
+ import { createRequire } from 'module';
8
+
9
+ // ERROR constant - mirror from @jaypie/errors types
10
+ const ERROR = {
11
+ MESSAGE: {
12
+ BAD_GATEWAY: "An unexpected error occurred on an upstream resource",
13
+ BAD_REQUEST: "The request was not properly formatted",
14
+ CONFIGURATION_ERROR: "The application responding to the request encountered a configuration error",
15
+ CORS_ERROR: "The requesting origin is not authorized to this resource",
16
+ FORBIDDEN: "Access to this resource is not authorized",
17
+ GATEWAY_TIMEOUT: "The connection timed out waiting for an upstream resource",
18
+ GONE: "The requested resource is no longer available",
19
+ ILLOGICAL: "The application encountered an illogical condition while processing the request",
20
+ INTERNAL_ERROR: "An unexpected error occurred and the request was unable to complete",
21
+ METHOD_NOT_ALLOWED: "The requested method is not allowed",
22
+ NOT_FOUND: "The requested resource was not found",
23
+ NOT_IMPLEMENTED: "The request was understood but the resource is not implemented",
24
+ REJECTED: "The request was rejected prior to processing",
25
+ TEAPOT: "This resource is a teapot incapable of processing the request",
26
+ TOO_MANY_REQUESTS: "The requesting origin exceeded the request limit",
27
+ UNAUTHORIZED: "The request did not include valid authentication credentials",
28
+ UNAVAILABLE: "The requested resource is temporarily unavailable",
29
+ UNHANDLED: "An unhandled error occurred and the request was unable to complete",
30
+ UNREACHABLE_CODE: "The application encountered an unreachable condition while processing the request",
31
+ },
32
+ TITLE: {
33
+ BAD_GATEWAY: "Bad Gateway",
34
+ BAD_REQUEST: "Bad Request",
35
+ CONFIGURATION_ERROR: "Internal Configuration Error",
36
+ CORS_ERROR: "Unauthorized Origin",
37
+ FORBIDDEN: "Forbidden",
38
+ GATEWAY_TIMEOUT: "Gateway Timeout",
39
+ GONE: "Gone",
40
+ INTERNAL_ERROR: "Internal Application Error",
41
+ METHOD_NOT_ALLOWED: "Method Not Allowed",
42
+ NOT_FOUND: "Not Found",
43
+ NOT_IMPLEMENTED: "Not Implemented",
44
+ REJECTED: "Request Rejected",
45
+ TEAPOT: "Teapot",
46
+ TOO_MANY_REQUESTS: "Too Many Requests",
47
+ UNAUTHORIZED: "Service Unauthorized",
48
+ UNAVAILABLE: "Service Unavailable",
49
+ },
50
+ TYPE: {
51
+ BAD_GATEWAY: "BAD_GATEWAY",
52
+ BAD_REQUEST: "BAD_REQUEST",
53
+ CONFIGURATION_ERROR: "CONFIGURATION_ERROR",
54
+ CORS_ERROR: "CORS_ERROR",
55
+ FORBIDDEN: "FORBIDDEN",
56
+ GATEWAY_TIMEOUT: "GATEWAY_TIMEOUT",
57
+ GONE: "GONE",
58
+ ILLOGICAL: "ILLOGICAL",
59
+ INTERNAL_ERROR: "INTERNAL_ERROR",
60
+ METHOD_NOT_ALLOWED: "METHOD_NOT_ALLOWED",
61
+ MULTI_ERROR: "MULTI_ERROR",
62
+ NOT_FOUND: "NOT_FOUND",
63
+ NOT_IMPLEMENTED: "NOT_IMPLEMENTED",
64
+ REJECTED: "REJECTED",
65
+ TEAPOT: "TEAPOT",
66
+ TOO_MANY_REQUESTS: "TOO_MANY_REQUESTS",
67
+ UNAUTHORIZED: "UNAUTHORIZED",
68
+ UNAVAILABLE: "UNAVAILABLE",
69
+ UNHANDLED: "UNHANDLED",
70
+ UNKNOWN_TYPE: "UNKNOWN_TYPE",
71
+ UNREACHABLE_CODE: "UNREACHABLE_CODE",
72
+ },
73
+ };
74
+
75
+ // Using createRequire for synchronous package loading - required for lazy loading pattern
76
+ const require$1 = createRequire(import.meta.url);
77
+ const packageCache = new Map();
78
+ function loadPackage(packageName) {
79
+ if (packageCache.has(packageName)) {
80
+ return packageCache.get(packageName);
81
+ }
82
+ try {
83
+ // eslint-disable-next-line no-restricted-syntax
84
+ const pkg = require$1(packageName);
85
+ packageCache.set(packageName, pkg);
86
+ return pkg;
87
+ }
88
+ catch {
89
+ throw new ConfigurationError(`${packageName} is required but not installed. Run: npm install ${packageName}`);
90
+ }
91
+ }
92
+
93
+ function getEnvSecret(...args) {
94
+ return loadPackage("@jaypie/aws").getEnvSecret(...args);
95
+ }
96
+ function getMessages(...args) {
97
+ return loadPackage("@jaypie/aws").getMessages(...args);
98
+ }
99
+ function getSecret(...args) {
100
+ return loadPackage("@jaypie/aws").getSecret(...args);
101
+ }
102
+ function getSingletonMessage(...args) {
103
+ return loadPackage("@jaypie/aws").getSingletonMessage(...args);
104
+ }
105
+ function getTextractJob(...args) {
106
+ return loadPackage("@jaypie/aws").getTextractJob(...args);
107
+ }
108
+ function sendBatchMessages(...args) {
109
+ return loadPackage("@jaypie/aws").sendBatchMessages(...args);
110
+ }
111
+ function sendMessage(...args) {
112
+ return loadPackage("@jaypie/aws").sendMessage(...args);
113
+ }
114
+ function sendTextractJob(...args) {
115
+ return loadPackage("@jaypie/aws").sendTextractJob(...args);
116
+ }
117
+
118
+ // Re-export constant via getter to lazy load
119
+ const DATADOG = new Proxy({}, {
120
+ get(_, prop) {
121
+ return loadPackage("@jaypie/datadog").DATADOG[prop];
122
+ },
123
+ });
124
+ function hasDatadogEnv(...args) {
125
+ return loadPackage("@jaypie/datadog").hasDatadogEnv(...args);
126
+ }
127
+ function submitDistribution(...args) {
128
+ return loadPackage("@jaypie/datadog").submitDistribution(...args);
129
+ }
130
+ function submitMetric(...args) {
131
+ return loadPackage("@jaypie/datadog").submitMetric(...args);
132
+ }
133
+ function submitMetricSet(...args) {
134
+ return loadPackage("@jaypie/datadog").submitMetricSet(...args);
135
+ }
136
+
137
+ // Re-export constant via getter to lazy load
138
+ const EXPRESS = new Proxy({}, {
139
+ get(_, prop) {
140
+ return loadPackage("@jaypie/express").EXPRESS[prop];
141
+ },
142
+ });
143
+ function cors(...args) {
144
+ return loadPackage("@jaypie/express").cors(...args);
145
+ }
146
+ function expressHandler(...args) {
147
+ return loadPackage("@jaypie/express").expressHandler(...args);
148
+ }
149
+ function expressHttpCodeHandler(...args) {
150
+ return loadPackage("@jaypie/express").expressHttpCodeHandler(...args);
151
+ }
152
+ // Route exports - these are pre-created handlers, so we use getters
153
+ const badRequestRoute = new Proxy((() => { }), {
154
+ apply(_, thisArg, args) {
155
+ return Reflect.apply(loadPackage("@jaypie/express").badRequestRoute, thisArg, args);
156
+ },
157
+ get(_, prop) {
158
+ const route = loadPackage("@jaypie/express")
159
+ .badRequestRoute;
160
+ return route[prop];
161
+ },
162
+ });
163
+ const echoRoute = new Proxy((() => { }), {
164
+ apply(_, thisArg, args) {
165
+ return Reflect.apply(loadPackage("@jaypie/express").echoRoute, thisArg, args);
166
+ },
167
+ get(_, prop) {
168
+ const route = loadPackage("@jaypie/express")
169
+ .echoRoute;
170
+ return route[prop];
171
+ },
172
+ });
173
+ const forbiddenRoute = new Proxy((() => { }), {
174
+ apply(_, thisArg, args) {
175
+ return Reflect.apply(loadPackage("@jaypie/express").forbiddenRoute, thisArg, args);
176
+ },
177
+ get(_, prop) {
178
+ const route = loadPackage("@jaypie/express")
179
+ .forbiddenRoute;
180
+ return route[prop];
181
+ },
182
+ });
183
+ const goneRoute = new Proxy((() => { }), {
184
+ apply(_, thisArg, args) {
185
+ return Reflect.apply(loadPackage("@jaypie/express").goneRoute, thisArg, args);
186
+ },
187
+ get(_, prop) {
188
+ const route = loadPackage("@jaypie/express")
189
+ .goneRoute;
190
+ return route[prop];
191
+ },
192
+ });
193
+ const methodNotAllowedRoute = new Proxy((() => { }), {
194
+ apply(_, thisArg, args) {
195
+ return Reflect.apply(loadPackage("@jaypie/express").methodNotAllowedRoute, thisArg, args);
196
+ },
197
+ get(_, prop) {
198
+ const route = loadPackage("@jaypie/express")
199
+ .methodNotAllowedRoute;
200
+ return route[prop];
201
+ },
202
+ });
203
+ const noContentRoute = new Proxy((() => { }), {
204
+ apply(_, thisArg, args) {
205
+ return Reflect.apply(loadPackage("@jaypie/express").noContentRoute, thisArg, args);
206
+ },
207
+ get(_, prop) {
208
+ const route = loadPackage("@jaypie/express")
209
+ .noContentRoute;
210
+ return route[prop];
211
+ },
212
+ });
213
+ const notFoundRoute = new Proxy((() => { }), {
214
+ apply(_, thisArg, args) {
215
+ return Reflect.apply(loadPackage("@jaypie/express").notFoundRoute, thisArg, args);
216
+ },
217
+ get(_, prop) {
218
+ const route = loadPackage("@jaypie/express")
219
+ .notFoundRoute;
220
+ return route[prop];
221
+ },
222
+ });
223
+ const notImplementedRoute = new Proxy((() => { }), {
224
+ apply(_, thisArg, args) {
225
+ return Reflect.apply(loadPackage("@jaypie/express").notImplementedRoute, thisArg, args);
226
+ },
227
+ get(_, prop) {
228
+ const route = loadPackage("@jaypie/express")
229
+ .notImplementedRoute;
230
+ return route[prop];
231
+ },
232
+ });
233
+
234
+ function lambdaHandler(...args) {
235
+ return loadPackage("@jaypie/lambda").lambdaHandler(...args);
236
+ }
237
+
238
+ // Re-export enums via getters
239
+ const LlmMessageRole = new Proxy({}, {
240
+ get(_, prop) {
241
+ return loadPackage("@jaypie/llm").LlmMessageRole[prop];
242
+ },
243
+ });
244
+ const LlmMessageType = new Proxy({}, {
245
+ get(_, prop) {
246
+ return loadPackage("@jaypie/llm").LlmMessageType[prop];
247
+ },
248
+ });
249
+ // Re-export LLM constants namespace via getter
250
+ const LLM = new Proxy({}, {
251
+ get(_, prop) {
252
+ return loadPackage("@jaypie/llm").LLM[prop];
253
+ },
254
+ });
255
+ // Llm class wrapper
256
+ const Llm = new Proxy(function () { }, {
257
+ construct(_, args) {
258
+ const LlmClass = loadPackage("@jaypie/llm").Llm;
259
+ return new LlmClass(...args);
260
+ },
261
+ get(_, prop) {
262
+ const LlmClass = loadPackage("@jaypie/llm")
263
+ .Llm;
264
+ return LlmClass[prop];
265
+ },
266
+ });
267
+ // Toolkit exports
268
+ const JaypieToolkit = new Proxy(function () { }, {
269
+ construct(_, args) {
270
+ const ToolkitClass = loadPackage("@jaypie/llm").JaypieToolkit;
271
+ return new ToolkitClass(...args);
272
+ },
273
+ get(_, prop) {
274
+ const ToolkitClass = loadPackage("@jaypie/llm")
275
+ .JaypieToolkit;
276
+ return ToolkitClass[prop];
277
+ },
278
+ });
279
+ const Toolkit = new Proxy(function () { }, {
280
+ construct(_, args) {
281
+ const ToolkitClass = loadPackage("@jaypie/llm").Toolkit;
282
+ return new ToolkitClass(...args);
283
+ },
284
+ get(_, prop) {
285
+ const ToolkitClass = loadPackage("@jaypie/llm")
286
+ .Toolkit;
287
+ return ToolkitClass[prop];
288
+ },
289
+ });
290
+ // toolkit and tools are objects/instances
291
+ const toolkit = new Proxy({}, {
292
+ get(_, prop) {
293
+ const toolkitObj = loadPackage("@jaypie/llm")
294
+ .toolkit;
295
+ return toolkitObj[prop];
296
+ },
297
+ });
298
+ const tools = new Proxy({}, {
299
+ get(_, prop) {
300
+ const toolsObj = loadPackage("@jaypie/llm")
301
+ .tools;
302
+ return toolsObj[prop];
303
+ },
304
+ });
305
+ // Provider exports
306
+ const GeminiProvider = new Proxy(function () { }, {
307
+ construct(_, args) {
308
+ const ProviderClass = loadPackage("@jaypie/llm").GeminiProvider;
309
+ return new ProviderClass(...args);
310
+ },
311
+ get(_, prop) {
312
+ const ProviderClass = loadPackage("@jaypie/llm")
313
+ .GeminiProvider;
314
+ return ProviderClass[prop];
315
+ },
316
+ });
317
+ const OpenRouterProvider = new Proxy(function () { }, {
318
+ construct(_, args) {
319
+ const ProviderClass = loadPackage("@jaypie/llm").OpenRouterProvider;
320
+ return new ProviderClass(...args);
321
+ },
322
+ get(_, prop) {
323
+ const ProviderClass = loadPackage("@jaypie/llm")
324
+ .OpenRouterProvider;
325
+ return ProviderClass[prop];
326
+ },
327
+ });
328
+
329
+ function connect(...args) {
330
+ return loadPackage("@jaypie/mongoose").connect(...args);
331
+ }
332
+ function connectFromSecretEnv(...args) {
333
+ return loadPackage("@jaypie/mongoose").connectFromSecretEnv(...args);
334
+ }
335
+ function disconnect() {
336
+ return loadPackage("@jaypie/mongoose").disconnect();
337
+ }
338
+ // Re-export mongoose via getter to lazy load
339
+ const mongoose = new Proxy({}, {
340
+ get(_, prop) {
341
+ const mongoosePkg = loadPackage("@jaypie/mongoose")
342
+ .mongoose;
343
+ return mongoosePkg[prop];
344
+ },
345
+ apply(_, thisArg, args) {
346
+ const mongoosePkg = loadPackage("@jaypie/mongoose")
347
+ .mongoose;
348
+ return Reflect.apply(mongoosePkg, thisArg, args);
349
+ },
350
+ });
351
+
352
+ export { DATADOG, ERROR, EXPRESS, GeminiProvider, JaypieToolkit, LLM, Llm, LlmMessageRole, LlmMessageType, OpenRouterProvider, Toolkit, badRequestRoute, connect, connectFromSecretEnv, cors, disconnect, echoRoute, expressHandler, expressHttpCodeHandler, forbiddenRoute, getEnvSecret, getMessages, getSecret, getSingletonMessage, getTextractJob, goneRoute, hasDatadogEnv, lambdaHandler, methodNotAllowedRoute, mongoose, noContentRoute, notFoundRoute, notImplementedRoute, sendBatchMessages, sendMessage, sendTextractJob, submitDistribution, submitMetric, submitMetricSet, toolkit, tools };
9
353
  //# sourceMappingURL=index.js.map