@mastra/client-js 0.1.0-alpha.1 → 0.1.0-alpha.11
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/.eslintrc.js +10 -0
- package/.prettierignore +3 -0
- package/.prettierrc.json +26 -0
- package/LICENSE +44 -201
- package/README.md +90 -271
- package/dist/index.d.mts +359 -0
- package/dist/index.mjs +410 -0
- package/package.json +30 -93
- package/src/client.ts +135 -0
- package/src/example.ts +47 -0
- package/src/index.test.ts +585 -0
- package/src/index.ts +2 -194
- package/src/resources/agent.ts +115 -0
- package/src/resources/base.ts +68 -0
- package/src/resources/index.ts +6 -9
- package/src/resources/memory-thread.ts +57 -0
- package/src/resources/tool.ts +31 -0
- package/src/resources/vector.ts +82 -0
- package/src/resources/workflow.ts +31 -0
- package/src/types.ts +142 -0
- package/tsconfig.json +29 -0
- package/vitest.config.js +8 -0
- package/CHANGELOG.md +0 -21
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -81
- package/_shims/index.js +0 -13
- package/_shims/index.mjs +0 -7
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -241
- package/core.d.ts.map +0 -1
- package/core.js +0 -908
- package/core.js.map +0 -1
- package/core.mjs +0 -876
- package/core.mjs.map +0 -1
- package/error.d.ts +0 -47
- package/error.d.ts.map +0 -1
- package/error.js +0 -113
- package/error.js.map +0 -1
- package/error.mjs +0 -97
- package/error.mjs.map +0 -1
- package/index.d.mts +0 -121
- package/index.d.ts +0 -121
- package/index.d.ts.map +0 -1
- package/index.js +0 -131
- package/index.js.map +0 -1
- package/index.mjs +0 -88
- package/index.mjs.map +0 -1
- package/resource.d.ts +0 -6
- package/resource.d.ts.map +0 -1
- package/resource.js +0 -11
- package/resource.js.map +0 -1
- package/resource.mjs +0 -7
- package/resource.mjs.map +0 -1
- package/resources/agents/agents.d.ts +0 -40
- package/resources/agents/agents.d.ts.map +0 -1
- package/resources/agents/agents.js +0 -74
- package/resources/agents/agents.js.map +0 -1
- package/resources/agents/agents.mjs +0 -47
- package/resources/agents/agents.mjs.map +0 -1
- package/resources/agents/index.d.ts +0 -3
- package/resources/agents/index.d.ts.map +0 -1
- package/resources/agents/index.js +0 -9
- package/resources/agents/index.js.map +0 -1
- package/resources/agents/index.mjs +0 -4
- package/resources/agents/index.mjs.map +0 -1
- package/resources/agents/tools.d.ts +0 -17
- package/resources/agents/tools.d.ts.map +0 -1
- package/resources/agents/tools.js +0 -19
- package/resources/agents/tools.js.map +0 -1
- package/resources/agents/tools.mjs +0 -15
- package/resources/agents/tools.mjs.map +0 -1
- package/resources/index.d.ts +0 -8
- package/resources/index.d.ts.map +0 -1
- package/resources/index.js +0 -19
- package/resources/index.js.map +0 -1
- package/resources/index.mjs +0 -9
- package/resources/index.mjs.map +0 -1
- package/resources/logs.d.ts +0 -13
- package/resources/logs.d.ts.map +0 -1
- package/resources/logs.js +0 -24
- package/resources/logs.js.map +0 -1
- package/resources/logs.mjs +0 -20
- package/resources/logs.mjs.map +0 -1
- package/resources/memory/index.d.ts +0 -4
- package/resources/memory/index.d.ts.map +0 -1
- package/resources/memory/index.js +0 -11
- package/resources/memory/index.js.map +0 -1
- package/resources/memory/index.mjs +0 -5
- package/resources/memory/index.mjs.map +0 -1
- package/resources/memory/memory.d.ts +0 -23
- package/resources/memory/memory.d.ts.map +0 -1
- package/resources/memory/memory.js +0 -53
- package/resources/memory/memory.js.map +0 -1
- package/resources/memory/memory.mjs +0 -26
- package/resources/memory/memory.mjs.map +0 -1
- package/resources/memory/status.d.ts +0 -9
- package/resources/memory/status.d.ts.map +0 -1
- package/resources/memory/status.js +0 -18
- package/resources/memory/status.js.map +0 -1
- package/resources/memory/status.mjs +0 -14
- package/resources/memory/status.mjs.map +0 -1
- package/resources/memory/threads/index.d.ts +0 -3
- package/resources/memory/threads/index.d.ts.map +0 -1
- package/resources/memory/threads/index.js +0 -9
- package/resources/memory/threads/index.js.map +0 -1
- package/resources/memory/threads/index.mjs +0 -4
- package/resources/memory/threads/index.mjs.map +0 -1
- package/resources/memory/threads/messages.d.ts +0 -9
- package/resources/memory/threads/messages.d.ts.map +0 -1
- package/resources/memory/threads/messages.js +0 -18
- package/resources/memory/threads/messages.js.map +0 -1
- package/resources/memory/threads/messages.mjs +0 -14
- package/resources/memory/threads/messages.mjs.map +0 -1
- package/resources/memory/threads/threads.d.ts +0 -45
- package/resources/memory/threads/threads.d.ts.map +0 -1
- package/resources/memory/threads/threads.js +0 -104
- package/resources/memory/threads/threads.js.map +0 -1
- package/resources/memory/threads/threads.mjs +0 -77
- package/resources/memory/threads/threads.mjs.map +0 -1
- package/resources/syncs.d.ts +0 -15
- package/resources/syncs.d.ts.map +0 -1
- package/resources/syncs.js +0 -19
- package/resources/syncs.js.map +0 -1
- package/resources/syncs.mjs +0 -15
- package/resources/syncs.mjs.map +0 -1
- package/resources/system.d.ts +0 -9
- package/resources/system.d.ts.map +0 -1
- package/resources/system.js +0 -15
- package/resources/system.js.map +0 -1
- package/resources/system.mjs +0 -11
- package/resources/system.mjs.map +0 -1
- package/resources/tools/index.d.ts +0 -3
- package/resources/tools/index.d.ts.map +0 -1
- package/resources/tools/index.js +0 -9
- package/resources/tools/index.js.map +0 -1
- package/resources/tools/index.mjs +0 -4
- package/resources/tools/index.mjs.map +0 -1
- package/resources/tools/result.d.ts +0 -9
- package/resources/tools/result.d.ts.map +0 -1
- package/resources/tools/result.js +0 -18
- package/resources/tools/result.js.map +0 -1
- package/resources/tools/result.mjs +0 -14
- package/resources/tools/result.mjs.map +0 -1
- package/resources/tools/tools.d.ts +0 -29
- package/resources/tools/tools.d.ts.map +0 -1
- package/resources/tools/tools.js +0 -64
- package/resources/tools/tools.js.map +0 -1
- package/resources/tools/tools.mjs +0 -37
- package/resources/tools/tools.mjs.map +0 -1
- package/resources/workflows.d.ts +0 -23
- package/resources/workflows.d.ts.map +0 -1
- package/resources/workflows.js +0 -37
- package/resources/workflows.js.map +0 -1
- package/resources/workflows.mjs +0 -33
- package/resources/workflows.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -81
- package/src/_shims/index.js +0 -13
- package/src/_shims/index.mjs +0 -7
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1201
- package/src/error.ts +0 -130
- package/src/lib/.keep +0 -4
- package/src/resource.ts +0 -11
- package/src/resources/agents/agents.ts +0 -77
- package/src/resources/agents/index.ts +0 -4
- package/src/resources/agents/tools.ts +0 -34
- package/src/resources/logs.ts +0 -23
- package/src/resources/memory/index.ts +0 -5
- package/src/resources/memory/memory.ts +0 -43
- package/src/resources/memory/status.ts +0 -16
- package/src/resources/memory/threads/index.ts +0 -4
- package/src/resources/memory/threads/messages.ts +0 -16
- package/src/resources/memory/threads/threads.ts +0 -105
- package/src/resources/syncs.ts +0 -25
- package/src/resources/system.ts +0 -13
- package/src/resources/tools/index.ts +0 -4
- package/src/resources/tools/result.ts +0 -16
- package/src/resources/tools/tools.ts +0 -54
- package/src/resources/workflows.ts +0 -49
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
- package/src/tsconfig.json +0 -11
- package/src/uploads.ts +0 -255
- package/src/version.ts +0 -1
- package/uploads.d.ts +0 -75
- package/uploads.d.ts.map +0 -1
- package/uploads.js +0 -171
- package/uploads.js.map +0 -1
- package/uploads.mjs +0 -158
- package/uploads.mjs.map +0 -1
- package/version.d.ts +0 -2
- package/version.d.ts.map +0 -1
- package/version.js +0 -5
- package/version.js.map +0 -1
- package/version.mjs +0 -2
- package/version.mjs.map +0 -1
package/src/types.ts
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { MessageType, AiMessageType, CoreMessage, QueryResult, StepAction, StepGraph, StorageThreadType, BaseLogMessage, OutputType } from "@mastra/core";
|
|
2
|
+
import type { JSONSchema7 } from 'json-schema';
|
|
3
|
+
import { ZodSchema } from "zod";
|
|
4
|
+
|
|
5
|
+
export interface ClientOptions {
|
|
6
|
+
/** Base URL for API requests */
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
/** Number of retry attempts for failed requests */
|
|
9
|
+
retries?: number;
|
|
10
|
+
/** Initial backoff time in milliseconds between retries */
|
|
11
|
+
backoffMs?: number;
|
|
12
|
+
/** Maximum backoff time in milliseconds between retries */
|
|
13
|
+
maxBackoffMs?: number;
|
|
14
|
+
/** Custom headers to include with requests */
|
|
15
|
+
headers?: Record<string, string>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface RequestOptions {
|
|
19
|
+
method?: string;
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
body?: any;
|
|
22
|
+
stream?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface GetAgentResponse {
|
|
26
|
+
name: string
|
|
27
|
+
instructions: string;
|
|
28
|
+
tools: Record<string, GetToolResponse>;
|
|
29
|
+
provider: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> {
|
|
33
|
+
messages: string | string[] | CoreMessage[];
|
|
34
|
+
threadId?: string;
|
|
35
|
+
resourceid?: string;
|
|
36
|
+
output?: OutputType | T
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> {
|
|
40
|
+
messages: string | string[] | CoreMessage[];
|
|
41
|
+
threadId?: string;
|
|
42
|
+
resourceid?: string;
|
|
43
|
+
output?: OutputType | T
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface GetEvalsByAgentIdResponse extends GetAgentResponse {
|
|
47
|
+
evals: any[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface GetToolResponse {
|
|
51
|
+
id: string;
|
|
52
|
+
description: string;
|
|
53
|
+
inputSchema: string;
|
|
54
|
+
outputSchema: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface GetWorkflowResponse {
|
|
58
|
+
name: string;
|
|
59
|
+
triggerSchema: string;
|
|
60
|
+
steps: Record<string, StepAction<any, any, any, any>>;
|
|
61
|
+
stepGraph: StepGraph
|
|
62
|
+
stepSubscriberGraph: Record<string, StepGraph>
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface UpsertVectorParams {
|
|
66
|
+
indexName: string;
|
|
67
|
+
vectors: number[][];
|
|
68
|
+
metadata?: Record<string, any>[];
|
|
69
|
+
ids?: string[];
|
|
70
|
+
}
|
|
71
|
+
export interface CreateIndexParams {
|
|
72
|
+
indexName: string;
|
|
73
|
+
dimension: number;
|
|
74
|
+
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface QueryVectorParams {
|
|
78
|
+
indexName: string;
|
|
79
|
+
queryVector: number[];
|
|
80
|
+
topK?: number;
|
|
81
|
+
filter?: Record<string, any>;
|
|
82
|
+
includeVector?: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface QueryVectorResponse {
|
|
86
|
+
results: QueryResult[];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface GetVectorIndexResponse {
|
|
90
|
+
dimension: number;
|
|
91
|
+
metric: 'cosine' | 'euclidean' | 'dotproduct';
|
|
92
|
+
count: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface SaveMessageToMemoryParams {
|
|
96
|
+
messages: MessageType[];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type SaveMessageToMemoryResponse = MessageType[]
|
|
100
|
+
|
|
101
|
+
export interface CreateMemoryThreadParams {
|
|
102
|
+
title: string;
|
|
103
|
+
metadata: Record<string, any>;
|
|
104
|
+
resourceid: string;
|
|
105
|
+
threadId: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type CreateMemoryThreadResponse = StorageThreadType
|
|
109
|
+
|
|
110
|
+
export interface GetMemoryThreadParams {
|
|
111
|
+
resourceId: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type GetMemoryThreadResponse = StorageThreadType[]
|
|
115
|
+
|
|
116
|
+
export interface UpdateMemoryThreadParams {
|
|
117
|
+
title: string;
|
|
118
|
+
metadata: Record<string, any>;
|
|
119
|
+
resourceid: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
export interface GetMemoryThreadMessagesResponse {
|
|
124
|
+
messages: CoreMessage[];
|
|
125
|
+
uiMessages: AiMessageType[];
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface GetLogsParams {
|
|
129
|
+
transportId: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface GetLogParams {
|
|
133
|
+
runId: string;
|
|
134
|
+
transportId: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type GetLogsResponse = BaseLogMessage[]
|
|
138
|
+
|
|
139
|
+
export type RequestFunction = (
|
|
140
|
+
path: string,
|
|
141
|
+
options?: RequestOptions
|
|
142
|
+
) => Promise<any>;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
/* Base Options: */
|
|
5
|
+
"esModuleInterop": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"target": "es2022",
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"moduleDetection": "force",
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"verbatimModuleSyntax": true,
|
|
13
|
+
/* Strictness */
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noUncheckedIndexedAccess": true,
|
|
16
|
+
// "noImplicitOverride": true,
|
|
17
|
+
/* AND if you're building for a library in a monorepo: */
|
|
18
|
+
// "composite": true,
|
|
19
|
+
"declaration": true,
|
|
20
|
+
"declarationMap": true,
|
|
21
|
+
/* If NOT transpiling with TypeScript: */
|
|
22
|
+
"module": "Preserve",
|
|
23
|
+
"noEmit": true,
|
|
24
|
+
/* If your code doesn't run in the DOM: */
|
|
25
|
+
"lib": [
|
|
26
|
+
"es2022"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
package/vitest.config.js
ADDED
package/CHANGELOG.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 0.1.0-alpha.1 (2025-01-24)
|
|
4
|
-
|
|
5
|
-
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/mastra-ai/client-js/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
|
|
6
|
-
|
|
7
|
-
### Features
|
|
8
|
-
|
|
9
|
-
* **api:** update via SDK Studio ([377c39d](https://github.com/mastra-ai/client-js/commit/377c39db0ccbc5a3470cc3bb89c0f422c6006cdd))
|
|
10
|
-
* **api:** update via SDK Studio ([ea76249](https://github.com/mastra-ai/client-js/commit/ea76249925f0d8c050ab9c6395ae348a317a5249))
|
|
11
|
-
* **api:** update via SDK Studio ([#3](https://github.com/mastra-ai/client-js/issues/3)) ([2bffdc1](https://github.com/mastra-ai/client-js/commit/2bffdc11f7598e32fd4c1708c62a328767040879))
|
|
12
|
-
* **api:** update via SDK Studio ([#5](https://github.com/mastra-ai/client-js/issues/5)) ([23197c9](https://github.com/mastra-ai/client-js/commit/23197c9df2f49e17b225614ee1be46003683e6d9))
|
|
13
|
-
* **api:** update via SDK Studio ([#6](https://github.com/mastra-ai/client-js/issues/6)) ([bccd0b5](https://github.com/mastra-ai/client-js/commit/bccd0b53bdac6496aaabe143b24f9d1b2488ceff))
|
|
14
|
-
* **api:** update via SDK Studio ([#7](https://github.com/mastra-ai/client-js/issues/7)) ([ef9d08b](https://github.com/mastra-ai/client-js/commit/ef9d08b0905118589cc158059579170f0e8c78d6))
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### Chores
|
|
18
|
-
|
|
19
|
-
* go live ([#1](https://github.com/mastra-ai/client-js/issues/1)) ([344c629](https://github.com/mastra-ai/client-js/commit/344c629987c03d842f1b4389c1ab277d3351e859))
|
|
20
|
-
* go live ([#4](https://github.com/mastra-ai/client-js/issues/4)) ([fc11d38](https://github.com/mastra-ai/client-js/commit/fc11d38ef54611ffb23102912c3daf0c203e8490))
|
|
21
|
-
* update SDK settings ([c8936bb](https://github.com/mastra-ai/client-js/commit/c8936bba1b979cf858f0ebcb89ca181372993fc9))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultipartBody.d.ts","sourceRoot":"","sources":["../src/_shims/MultipartBody.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,aAAa;IACL,IAAI,EAAE,GAAG;gBAAT,IAAI,EAAE,GAAG;IAC5B,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;CACF"}
|
package/_shims/MultipartBody.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MultipartBody = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
6
|
-
*/
|
|
7
|
-
class MultipartBody {
|
|
8
|
-
constructor(body) {
|
|
9
|
-
this.body = body;
|
|
10
|
-
}
|
|
11
|
-
get [Symbol.toStringTag]() {
|
|
12
|
-
return 'MultipartBody';
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.MultipartBody = MultipartBody;
|
|
16
|
-
//# sourceMappingURL=MultipartBody.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultipartBody.js","sourceRoot":"","sources":["../src/_shims/MultipartBody.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,aAAa;IACxB,YAAmB,IAAS;QAAT,SAAI,GAAJ,IAAI,CAAK;IAAG,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AALD,sCAKC"}
|
package/_shims/MultipartBody.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
|
-
*/
|
|
4
|
-
export class MultipartBody {
|
|
5
|
-
constructor(body) {
|
|
6
|
-
this.body = body;
|
|
7
|
-
}
|
|
8
|
-
get [Symbol.toStringTag]() {
|
|
9
|
-
return 'MultipartBody';
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=MultipartBody.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultipartBody.mjs","sourceRoot":"","sources":["../src/_shims/MultipartBody.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,aAAa;IACxB,YAAmB,IAAS;QAAT,SAAI,GAAJ,IAAI,CAAK;IAAG,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,eAAe,CAAC;IACzB,CAAC;CACF"}
|
package/_shims/README.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# 👋 Wondering what everything in here does?
|
|
2
|
-
|
|
3
|
-
`@mastra/client-js` supports a wide variety of runtime environments like Node.js, Deno, Bun, browsers, and various
|
|
4
|
-
edge runtimes, as well as both CommonJS (CJS) and EcmaScript Modules (ESM).
|
|
5
|
-
|
|
6
|
-
To do this, `@mastra/client-js` provides shims for either using `node-fetch` when in Node (because `fetch` is still experimental there) or the global `fetch` API built into the environment when not in Node.
|
|
7
|
-
|
|
8
|
-
It uses [conditional exports](https://nodejs.org/api/packages.html#conditional-exports) to
|
|
9
|
-
automatically select the correct shims for each environment. However, conditional exports are a fairly new
|
|
10
|
-
feature and not supported everywhere. For instance, the TypeScript `"moduleResolution": "node"`
|
|
11
|
-
|
|
12
|
-
setting doesn't consult the `exports` map, compared to `"moduleResolution": "nodeNext"`, which does.
|
|
13
|
-
Unfortunately that's still the default setting, and it can result in errors like
|
|
14
|
-
getting the wrong raw `Response` type from `.asResponse()`, for example.
|
|
15
|
-
|
|
16
|
-
The user can work around these issues by manually importing one of:
|
|
17
|
-
|
|
18
|
-
- `import '@mastra/client-js/shims/node'`
|
|
19
|
-
- `import '@mastra/client-js/shims/web'`
|
|
20
|
-
|
|
21
|
-
All of the code here in `_shims` handles selecting the automatic default shims or manual overrides.
|
|
22
|
-
|
|
23
|
-
### How it works - Runtime
|
|
24
|
-
|
|
25
|
-
Runtime shims get installed by calling `setShims` exported by `@mastra/client-js/_shims/registry`.
|
|
26
|
-
|
|
27
|
-
Manually importing `@mastra/client-js/shims/node` or `@mastra/client-js/shims/web`, calls `setShims` with the respective runtime shims.
|
|
28
|
-
|
|
29
|
-
All client code imports shims from `@mastra/client-js/_shims/index`, which:
|
|
30
|
-
|
|
31
|
-
- checks if shims have been set manually
|
|
32
|
-
- if not, calls `setShims` with the shims from `@mastra/client-js/_shims/auto/runtime`
|
|
33
|
-
- re-exports the installed shims from `@mastra/client-js/_shims/registry`.
|
|
34
|
-
|
|
35
|
-
`@mastra/client-js/_shims/auto/runtime` exports web runtime shims.
|
|
36
|
-
If the `node` export condition is set, the export map replaces it with `@mastra/client-js/_shims/auto/runtime-node`.
|
|
37
|
-
|
|
38
|
-
### How it works - Type time
|
|
39
|
-
|
|
40
|
-
All client code imports shim types from `@mastra/client-js/_shims/index`, which selects the manual types from `@mastra/client-js/_shims/manual-types` if they have been declared, otherwise it exports the auto types from `@mastra/client-js/_shims/auto/types`.
|
|
41
|
-
|
|
42
|
-
`@mastra/client-js/_shims/manual-types` exports an empty namespace.
|
|
43
|
-
Manually importing `@mastra/client-js/shims/node` or `@mastra/client-js/shims/web` merges declarations into this empty namespace, so they get picked up by `@mastra/client-js/_shims/index`.
|
|
44
|
-
|
|
45
|
-
`@mastra/client-js/_shims/auto/types` exports web type definitions.
|
|
46
|
-
If the `node` export condition is set, the export map replaces it with `@mastra/client-js/_shims/auto/types-node`, though TS only picks this up if `"moduleResolution": "nodenext"` or `"moduleResolution": "bundler"`.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-bun.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime-bun.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/**
|
|
18
|
-
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
19
|
-
*/
|
|
20
|
-
__exportStar(require("../bun-runtime.js"), exports);
|
|
21
|
-
//# sourceMappingURL=runtime-bun.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-bun.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime-bun.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oDAA+B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-bun.mjs","sourceRoot":"","sources":["../../src/_shims/auto/runtime-bun.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-node.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/**
|
|
18
|
-
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
19
|
-
*/
|
|
20
|
-
__exportStar(require("../node-runtime.js"), exports);
|
|
21
|
-
//# sourceMappingURL=runtime-node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-node.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime-node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,qDAAgC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-node.mjs","sourceRoot":"","sources":["../../src/_shims/auto/runtime-node.ts"],"names":[],"mappings":""}
|
package/_shims/auto/runtime.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gBAAgB,CAAC"}
|
package/_shims/auto/runtime.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/**
|
|
18
|
-
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
19
|
-
*/
|
|
20
|
-
__exportStar(require("../web-runtime.js"), exports);
|
|
21
|
-
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/_shims/auto/runtime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oDAA+B"}
|
package/_shims/auto/runtime.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.mjs","sourceRoot":"","sources":["../../src/_shims/auto/runtime.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-node.d.ts","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,eAAe,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/**
|
|
18
|
-
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
19
|
-
*/
|
|
20
|
-
__exportStar(require("../node-types.js"), exports);
|
|
21
|
-
//# sourceMappingURL=types-node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-node.js","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,mDAA8B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-node.mjs","sourceRoot":"","sources":["../../src/_shims/auto/types-node.ts"],"names":[],"mappings":""}
|
package/_shims/auto/types.d.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
|
-
*/
|
|
4
|
-
export type Agent = any;
|
|
5
|
-
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
declare const _fetch: unknown extends typeof fetch ? never : typeof fetch;
|
|
8
|
-
export { _fetch as fetch };
|
|
9
|
-
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
type _Request = unknown extends Request ? never : Request;
|
|
12
|
-
export { _Request as Request };
|
|
13
|
-
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
type _RequestInfo = unknown extends RequestInfo ? never : RequestInfo;
|
|
16
|
-
export { type _RequestInfo as RequestInfo };
|
|
17
|
-
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
type _RequestInit = unknown extends RequestInit ? never : RequestInit;
|
|
20
|
-
export { type _RequestInit as RequestInit };
|
|
21
|
-
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
type _Response = unknown extends Response ? never : Response;
|
|
24
|
-
export { _Response as Response };
|
|
25
|
-
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
type _ResponseInit = unknown extends ResponseInit ? never : ResponseInit;
|
|
28
|
-
export { type _ResponseInit as ResponseInit };
|
|
29
|
-
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
type _ResponseType = unknown extends ResponseType ? never : ResponseType;
|
|
32
|
-
export { type _ResponseType as ResponseType };
|
|
33
|
-
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
type _BodyInit = unknown extends BodyInit ? never : BodyInit;
|
|
36
|
-
export { type _BodyInit as BodyInit };
|
|
37
|
-
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
type _Headers = unknown extends Headers ? never : Headers;
|
|
40
|
-
export { _Headers as Headers };
|
|
41
|
-
|
|
42
|
-
// @ts-ignore
|
|
43
|
-
type _HeadersInit = unknown extends HeadersInit ? never : HeadersInit;
|
|
44
|
-
export { type _HeadersInit as HeadersInit };
|
|
45
|
-
|
|
46
|
-
type EndingType = 'native' | 'transparent';
|
|
47
|
-
|
|
48
|
-
export interface BlobPropertyBag {
|
|
49
|
-
endings?: EndingType;
|
|
50
|
-
type?: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface FilePropertyBag extends BlobPropertyBag {
|
|
54
|
-
lastModified?: number;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;
|
|
58
|
-
|
|
59
|
-
// @ts-ignore
|
|
60
|
-
type _FormData = unknown extends FormData ? never : FormData;
|
|
61
|
-
// @ts-ignore
|
|
62
|
-
declare const _FormData: unknown extends typeof FormData ? never : typeof FormData;
|
|
63
|
-
export { _FormData as FormData };
|
|
64
|
-
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
type _File = unknown extends File ? never : File;
|
|
67
|
-
// @ts-ignore
|
|
68
|
-
declare const _File: unknown extends typeof File ? never : typeof File;
|
|
69
|
-
export { _File as File };
|
|
70
|
-
|
|
71
|
-
// @ts-ignore
|
|
72
|
-
type _Blob = unknown extends Blob ? never : Blob;
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
declare const _Blob: unknown extends typeof Blob ? never : typeof Blob;
|
|
75
|
-
export { _Blob as Blob };
|
|
76
|
-
|
|
77
|
-
export declare class Readable {
|
|
78
|
-
readable: boolean;
|
|
79
|
-
readonly readableEnded: boolean;
|
|
80
|
-
readonly readableFlowing: boolean | null;
|
|
81
|
-
readonly readableHighWaterMark: number;
|
|
82
|
-
readonly readableLength: number;
|
|
83
|
-
readonly readableObjectMode: boolean;
|
|
84
|
-
destroyed: boolean;
|
|
85
|
-
read(size?: number): any;
|
|
86
|
-
pause(): this;
|
|
87
|
-
resume(): this;
|
|
88
|
-
isPaused(): boolean;
|
|
89
|
-
destroy(error?: Error): this;
|
|
90
|
-
[Symbol.asyncIterator](): AsyncIterableIterator<any>;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export declare class FsReadStream extends Readable {
|
|
94
|
-
path: {}; // node type is string | Buffer
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// @ts-ignore
|
|
98
|
-
type _ReadableStream<R = any> = unknown extends ReadableStream<R> ? never : ReadableStream<R>;
|
|
99
|
-
// @ts-ignore
|
|
100
|
-
declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream;
|
|
101
|
-
export { _ReadableStream as ReadableStream };
|
package/_shims/auto/types.js
DELETED
package/_shims/auto/types.mjs
DELETED
package/_shims/bun-runtime.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bun-runtime.d.ts","sourceRoot":"","sources":["../src/_shims/bun-runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAIxC,wBAAgB,UAAU,IAAI,KAAK,CAMlC"}
|
package/_shims/bun-runtime.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRuntime = void 0;
|
|
4
|
-
const web_runtime_1 = require("./web-runtime.js");
|
|
5
|
-
const node_fs_1 = require("node:fs");
|
|
6
|
-
function getRuntime() {
|
|
7
|
-
const runtime = (0, web_runtime_1.getRuntime)();
|
|
8
|
-
function isFsReadStream(value) {
|
|
9
|
-
return value instanceof node_fs_1.ReadStream;
|
|
10
|
-
}
|
|
11
|
-
return { ...runtime, isFsReadStream };
|
|
12
|
-
}
|
|
13
|
-
exports.getRuntime = getRuntime;
|
|
14
|
-
//# sourceMappingURL=bun-runtime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bun-runtime.js","sourceRoot":"","sources":["../src/_shims/bun-runtime.ts"],"names":[],"mappings":";;;AAIA,kDAA4D;AAC5D,qCAAqD;AAErD,SAAgB,UAAU;IACxB,MAAM,OAAO,GAAG,IAAA,wBAAa,GAAE,CAAC;IAChC,SAAS,cAAc,CAAC,KAAU;QAChC,OAAO,KAAK,YAAY,oBAAY,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,cAAc,EAAE,CAAC;AACxC,CAAC;AAND,gCAMC"}
|
package/_shims/bun-runtime.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { getRuntime as getWebRuntime } from "./web-runtime.mjs";
|
|
2
|
-
import { ReadStream as FsReadStream } from 'node:fs';
|
|
3
|
-
export function getRuntime() {
|
|
4
|
-
const runtime = getWebRuntime();
|
|
5
|
-
function isFsReadStream(value) {
|
|
6
|
-
return value instanceof FsReadStream;
|
|
7
|
-
}
|
|
8
|
-
return { ...runtime, isFsReadStream };
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=bun-runtime.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bun-runtime.mjs","sourceRoot":"","sources":["../src/_shims/bun-runtime.ts"],"names":[],"mappings":"OAIO,EAAE,UAAU,IAAI,aAAa,EAAE;OAC/B,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,SAAS;AAEpD,MAAM,UAAU,UAAU;IACxB,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAChC,SAAS,cAAc,CAAC,KAAU;QAChC,OAAO,KAAK,YAAY,YAAY,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,cAAc,EAAE,CAAC;AACxC,CAAC"}
|