@composio/core 0.10.0 → 0.12.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.
Files changed (69) hide show
  1. package/dist/{tool.types-CwbAy9l_.d.cts → BaseProvider-BBnsv9kS.d.mts} +23683 -23635
  2. package/dist/CustomTool-DEB4BQPl.mjs +468 -0
  3. package/dist/{CustomTool-aber890o.d.cts → CustomTool-DH18rVQu.d.mts} +2 -4
  4. package/dist/{FileModifierErrors-C7z16Dfi.mjs → FileModifierErrors-3fSwIWoa.mjs} +35 -36
  5. package/dist/{FileToolModifier.utils.neutral-B7P7wn-b.mjs → FileToolModifier.utils.neutral-B5rT711M.mjs} +1 -7
  6. package/dist/{Telemetry-kgWlkavX.mjs → Telemetry-DhGI_J4G.mjs} +48 -23
  7. package/dist/{composio-CSMCZZgj.d.cts → composio-CHnEggnv.d.mts} +433 -435
  8. package/dist/{customTool.types-BzEWHa0w.d.cts → customTool.types-DpIdOJjL.d.mts} +177 -236
  9. package/dist/{CustomTool-D7-1S2at.mjs → errors-D5f4pfvI.mjs} +132 -519
  10. package/dist/experimental/index.d.mts +2 -3
  11. package/dist/experimental/index.mjs +1 -3
  12. package/dist/{fileUtils.node-Dq7ebZPC.mjs → fileUtils.node-BiO1JQsJ.mjs} +26 -25
  13. package/dist/index.d.mts +2034 -2356
  14. package/dist/index.mjs +2546 -2335
  15. package/dist/jsonSchema-daqF3S3d.mjs +251 -0
  16. package/dist/models/Files.node.d.mts +1 -2
  17. package/dist/models/Files.node.mjs +3 -4
  18. package/dist/models/Files.workerd.d.mts +0 -1
  19. package/dist/platform/node.d.mts +1 -2
  20. package/dist/platform/workerd.d.mts +1 -2
  21. package/dist/{chunk-CWQeghP5.mjs → rolldown-runtime-w6R9maHv.mjs} +3 -5
  22. package/dist/{types-DE7O6Z6S.d.cts → types-CaI5Z4PA.d.mts} +2 -3
  23. package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -4
  24. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -4
  25. package/dist/utils/config-defaults/ConfigDefaults.workerd.mjs +3 -0
  26. package/dist/utils/json-schema.d.mts +2 -0
  27. package/dist/utils/json-schema.mjs +3 -0
  28. package/dist/utils/modifiers/FileToolModifier.node.d.mts +3 -1
  29. package/dist/utils/modifiers/FileToolModifier.node.mjs +81 -44
  30. package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +3 -1
  31. package/dist/utils/modifiers/FileToolModifier.workerd.mjs +1 -1
  32. package/package.json +48 -88
  33. package/dist/CustomTool-CQ_YjABZ.cjs +0 -1341
  34. package/dist/CustomTool-DJUGNOer.d.mts +0 -76
  35. package/dist/FileModifierErrors-BYJBHiay.cjs +0 -554
  36. package/dist/FileToolModifier.utils.neutral-Dfwqgimk.cjs +0 -102
  37. package/dist/Telemetry-Dm-0sewu.cjs +0 -335
  38. package/dist/buffer-BjWptbNH.cjs +0 -63
  39. package/dist/chunk-CQwRTUmo.cjs +0 -53
  40. package/dist/composio-DRl6WCI9.d.mts +0 -5484
  41. package/dist/customTool.types-CMOMgxoM.d.mts +0 -2513
  42. package/dist/experimental/index.cjs +0 -5
  43. package/dist/experimental/index.d.cts +0 -3
  44. package/dist/fileUtils.node-DtnSRMWa.cjs +0 -462
  45. package/dist/files.types-lo4zZd87.d.cts +0 -17
  46. package/dist/index.cjs +0 -8637
  47. package/dist/index.d.cts +0 -5672
  48. package/dist/models/Files.node.cjs +0 -55
  49. package/dist/models/Files.node.d.cts +0 -56
  50. package/dist/models/Files.workerd.cjs +0 -29
  51. package/dist/models/Files.workerd.d.cts +0 -13
  52. package/dist/platform/node.cjs +0 -55
  53. package/dist/platform/node.d.cts +0 -11
  54. package/dist/platform/workerd.cjs +0 -42
  55. package/dist/platform/workerd.d.cts +0 -12
  56. package/dist/tool.types-CB_4JKhV.d.mts +0 -29377
  57. package/dist/types-BTOPdg4d.d.mts +0 -13
  58. package/dist/types-pDNm1lYs.d.cts +0 -69
  59. package/dist/utils/config-defaults/ConfigDefaults.node.cjs +0 -10
  60. package/dist/utils/config-defaults/ConfigDefaults.node.d.cts +0 -7
  61. package/dist/utils/config-defaults/ConfigDefaults.workerd.cjs +0 -10
  62. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.cts +0 -7
  63. package/dist/utils/modifiers/FileToolModifier.node.cjs +0 -207
  64. package/dist/utils/modifiers/FileToolModifier.node.d.cts +0 -22
  65. package/dist/utils/modifiers/FileToolModifier.workerd.cjs +0 -27
  66. package/dist/utils/modifiers/FileToolModifier.workerd.d.cts +0 -20
  67. /package/dist/{buffer-yOtEsT4J.mjs → buffer-PcbMMsgm.mjs} +0 -0
  68. /package/dist/{files.types-BXDWA_zS.d.mts → files.types-DeMC_mAW.d.mts} +0 -0
  69. /package/dist/{types-HpJQ8K9l.d.mts → types-DdoCRzLj.d.mts} +0 -0
@@ -1,102 +0,0 @@
1
-
2
- //#region src/utils/modifiers/FileToolModifier.utils.neutral.ts
3
- function isPlainObject(val) {
4
- return typeof val === "object" && val !== null && !Array.isArray(val);
5
- }
6
- /**
7
- * Transforms a single JSON schema property, recursively handling nested properties,
8
- * anyOf, oneOf, and allOf.
9
- */
10
- const transformSchema = (property) => {
11
- if (property.file_uploadable) return {
12
- title: property.title,
13
- description: property.description,
14
- format: "path",
15
- type: "string",
16
- file_uploadable: true
17
- };
18
- const newProperty = { ...property };
19
- if (property.type === "object" && property.properties) newProperty.properties = transformProperties(property.properties);
20
- if (property.anyOf) newProperty.anyOf = property.anyOf.map(transformSchema);
21
- if (property.oneOf) newProperty.oneOf = property.oneOf.map(transformSchema);
22
- if (property.allOf) newProperty.allOf = property.allOf.map(transformSchema);
23
- if (property.items) if (Array.isArray(property.items)) newProperty.items = property.items.map(transformSchema);
24
- else newProperty.items = transformSchema(property.items);
25
- return newProperty;
26
- };
27
- /**
28
- * Transforms the properties of the tool schema to include the file upload URL.
29
- *
30
- * Attaches the format: 'path' to the properties that are file uploadable for agents.
31
- *
32
- * @param properties - The properties of the tool schema.
33
- * @returns The transformed properties.
34
- */
35
- const transformProperties = (properties) => {
36
- const newProperties = {};
37
- for (const [key, property] of Object.entries(properties)) newProperties[key] = transformSchema(property);
38
- return newProperties;
39
- };
40
- /**
41
- * Recursively checks if a schema (or any of its variants) contains a specific file property.
42
- */
43
- const schemaHasFileProperty = (schema, property) => {
44
- if (!schema) return false;
45
- if (schema[property]) return true;
46
- if (schema.properties) {
47
- for (const prop of Object.values(schema.properties)) if (schemaHasFileProperty(prop, property)) return true;
48
- }
49
- if (schema.anyOf) {
50
- for (const variant of schema.anyOf) if (schemaHasFileProperty(variant, property)) return true;
51
- }
52
- if (schema.oneOf) {
53
- for (const variant of schema.oneOf) if (schemaHasFileProperty(variant, property)) return true;
54
- }
55
- if (schema.allOf) {
56
- for (const variant of schema.allOf) if (schemaHasFileProperty(variant, property)) return true;
57
- }
58
- if (schema.items) {
59
- if (Array.isArray(schema.items)) {
60
- for (const item of schema.items) if (schemaHasFileProperty(item, property)) return true;
61
- } else if (schemaHasFileProperty(schema.items, property)) return true;
62
- }
63
- return false;
64
- };
65
- /**
66
- * Recursively checks if a schema (or any of its variants) contains file_uploadable properties.
67
- */
68
- const schemaHasFileUploadable = (schema) => {
69
- return schemaHasFileProperty(schema, "file_uploadable");
70
- };
71
- /**
72
- * Recursively checks if a schema (or any of its variants) contains file_downloadable properties.
73
- */
74
- const schemaHasFileDownloadable = (schema) => {
75
- return schemaHasFileProperty(schema, "file_downloadable");
76
- };
77
-
78
- //#endregion
79
- Object.defineProperty(exports, 'isPlainObject', {
80
- enumerable: true,
81
- get: function () {
82
- return isPlainObject;
83
- }
84
- });
85
- Object.defineProperty(exports, 'schemaHasFileDownloadable', {
86
- enumerable: true,
87
- get: function () {
88
- return schemaHasFileDownloadable;
89
- }
90
- });
91
- Object.defineProperty(exports, 'schemaHasFileUploadable', {
92
- enumerable: true,
93
- get: function () {
94
- return schemaHasFileUploadable;
95
- }
96
- });
97
- Object.defineProperty(exports, 'transformProperties', {
98
- enumerable: true,
99
- get: function () {
100
- return transformProperties;
101
- }
102
- });
@@ -1,335 +0,0 @@
1
- const require_chunk = require('./chunk-CQwRTUmo.cjs');
2
- const require_FileModifierErrors = require('./FileModifierErrors-BYJBHiay.cjs');
3
- const require_buffer = require('./buffer-BjWptbNH.cjs');
4
- let _composio_client = require("@composio/client");
5
-
6
- //#region src/types/telemetry.types.ts
7
- const TELEMETRY_EVENTS = {
8
- SDK_INITIALIZED: "SDK_INITIALIZED",
9
- SDK_METHOD_INVOKED: "SDK_METHOD_INVOKED",
10
- SDK_METHOD_ERROR: "SDK_METHOD_ERROR",
11
- CLI_INVOKED: "CLI_INVOKED"
12
- };
13
-
14
- //#endregion
15
- //#region src/telemetry/BatchProcessor.ts
16
- var BatchProcessor = class {
17
- batch = [];
18
- time;
19
- batchSize;
20
- processBatchCallback;
21
- timer = null;
22
- pendingBatches = /* @__PURE__ */ new Set();
23
- constructor(time = 2e3, batchSize = 100, processBatchCallback) {
24
- this.batch = [];
25
- this.time = time;
26
- this.batchSize = batchSize;
27
- this.processBatchCallback = processBatchCallback;
28
- }
29
- pushItem(item) {
30
- this.batch.push(item);
31
- if (this.batch.length >= this.batchSize) this.processBatch();
32
- else if (!this.timer) this.timer = setTimeout(() => this.processBatch(), this.time);
33
- }
34
- processBatch() {
35
- if (this.batch.length > 0) {
36
- const batchToProcess = this.batch;
37
- this.batch = [];
38
- const pending = this.processBatchCallback(batchToProcess).catch(() => {}).finally(() => {
39
- this.pendingBatches.delete(pending);
40
- });
41
- this.pendingBatches.add(pending);
42
- }
43
- if (this.timer) {
44
- clearTimeout(this.timer);
45
- this.timer = null;
46
- }
47
- }
48
- /**
49
- * Flush any pending batches and wait for all of them to complete.
50
- * Useful for ensuring telemetry is sent before process exit.
51
- */
52
- async flush() {
53
- this.processBatch();
54
- if (this.pendingBatches.size > 0) await Promise.all(this.pendingBatches);
55
- }
56
- };
57
-
58
- //#endregion
59
- //#region src/services/telemetry/TelemetryService.ts
60
- const TELEMETRY_URL = "https://telemetry.composio.dev/v1";
61
- var TelemetryService = class {
62
- /**
63
- * Sends a metric to the Telemetry API.
64
- * @param payload - The payload to send to the Telemetry API.
65
- * @returns The response from the Telemetry API.
66
- */
67
- static async sendMetric(payload) {
68
- try {
69
- return await fetch(`${TELEMETRY_URL}/metrics/invocations`, {
70
- method: "POST",
71
- headers: { "Content-Type": "application/json" },
72
- body: JSON.stringify(payload)
73
- });
74
- } catch (error) {
75
- require_FileModifierErrors.logger_default.debug("Error sending metric telemetry", error);
76
- }
77
- }
78
- /**
79
- * Sends an error log to the Telemetry API.
80
- * @param payload - The payload to send to the Telemetry API.
81
- * @returns The response from the Telemetry API.
82
- */
83
- static async sendErrorLog(payload) {
84
- try {
85
- return await fetch(`${TELEMETRY_URL}/errors`, {
86
- method: "POST",
87
- headers: { "Content-Type": "application/json" },
88
- body: JSON.stringify(payload)
89
- });
90
- } catch (error) {
91
- require_FileModifierErrors.logger_default.debug("Error sending error telemetry", error);
92
- }
93
- }
94
- };
95
-
96
- //#endregion
97
- //#region src/telemetry/Telemetry.ts
98
- /**
99
- * The Telemetry class is used to log the telemetry for any given instance which extends InstrumentedInstance.
100
- *
101
- * This class is used to instrument the telemetry for the given instance and send the telemetry to the server.
102
- * This class is also used to create a global error handler for the given instance.
103
- *
104
- * @example
105
- *
106
- * const telemetry = new Telemetry({...});
107
- * const composio = new Composio({...})
108
- *
109
- * telemetry.instrument(composio);
110
- * telemetry.instrument(composio.tools);
111
- * telemetry.instrument(composio.toolkits);
112
- * telemetry.instrument(composio.triggers);
113
- *
114
- */
115
- var TelemetryTransport = class {
116
- telemetryMetadata;
117
- isTelemetryDisabled = true;
118
- telemetrySource;
119
- telemetrySourceName = "typescript-sdk";
120
- telemetryServiceName = "sdk";
121
- telemetryLanguage = "typescript";
122
- exitHandlersRegistered = false;
123
- batchProcessor = new BatchProcessor(200, 10, async (data) => {
124
- require_FileModifierErrors.logger_default.debug("Sending batch of telemetry metrics", data);
125
- await TelemetryService.sendMetric(data);
126
- });
127
- setup(metadata) {
128
- this.telemetryMetadata = metadata;
129
- this.isTelemetryDisabled = false;
130
- this.telemetrySource = {
131
- host: this.telemetryMetadata?.host ?? this.telemetrySourceName,
132
- service: this.telemetryServiceName,
133
- language: this.telemetryLanguage,
134
- version: this.telemetryMetadata?.version,
135
- platform: this.telemetryMetadata?.isBrowser ? "browser" : "node",
136
- environment: require_FileModifierErrors.getEnvVariable("NODE_ENV", "production")
137
- };
138
- this.registerExitHandlers();
139
- this.sendMetric([{
140
- functionName: TELEMETRY_EVENTS.SDK_INITIALIZED,
141
- durationMs: 0,
142
- timestamp: Date.now() / 1e3,
143
- props: {},
144
- source: this.telemetrySource,
145
- metadata: { provider: this.telemetryMetadata?.provider ?? "openai" },
146
- error: void 0
147
- }]);
148
- }
149
- /**
150
- * Instrument the telemetry for the given instance.
151
- *
152
- * You can pass the instance and the file name of the instance to instrument the telemetry.
153
- * This will instrument all the methods of the instance and log the telemetry for each method call.
154
- * @param instance - any instance that extends InstrumentedInstance
155
- * @param fileName - the file name of the instance
156
- * @returns
157
- */
158
- instrument(instance, fileName) {
159
- const proto = Object.getPrototypeOf(instance);
160
- const methodNames = Object.getOwnPropertyNames(proto).filter((key) => {
161
- const descriptor = Object.getOwnPropertyDescriptor(proto, key);
162
- return key !== "constructor" && descriptor && typeof descriptor.value === "function" && descriptor.value.constructor.name === "AsyncFunction";
163
- });
164
- const instrumentedClassName = fileName ?? instance.constructor?.name ?? "unknown";
165
- for (const name of methodNames) {
166
- const originalMethod = instance[name];
167
- instance[name] = async (...args) => {
168
- const telemetryEnabled = this.shouldSendTelemetry();
169
- const startTime = telemetryEnabled ? Date.now() : void 0;
170
- try {
171
- const result = await originalMethod.apply(instance, args);
172
- if (telemetryEnabled && startTime !== void 0) {
173
- const durationMs = Date.now() - startTime;
174
- const telemetryPayload = {
175
- functionName: `${instrumentedClassName}.${name}`,
176
- durationMs,
177
- timestamp: startTime / 1e3,
178
- props: {
179
- fileName: instrumentedClassName,
180
- method: name
181
- },
182
- metadata: { provider: this.telemetryMetadata?.provider ?? "openai" },
183
- error: void 0,
184
- source: this.telemetrySource
185
- };
186
- this.batchProcessor.pushItem(telemetryPayload);
187
- }
188
- return result;
189
- } catch (error) {
190
- if (error instanceof Error) {
191
- if (!error.errorId) {
192
- error.errorId = require_buffer.getRandomUUID();
193
- if (telemetryEnabled && startTime !== void 0) {
194
- const durationMs = Date.now() - startTime;
195
- await this.prepareAndSendErrorTelemetry(error, instrumentedClassName, name, startTime, durationMs);
196
- }
197
- }
198
- }
199
- throw error;
200
- }
201
- };
202
- }
203
- return instance;
204
- }
205
- /**
206
- * Check if the telemetry should be sent.
207
- * @returns true if the telemetry should be sent, false otherwise
208
- */
209
- shouldSendTelemetry() {
210
- const telemetryDisabledEnvironments = ["test", "ci"];
211
- const nodeEnv = (require_FileModifierErrors.getEnvVariable("NODE_ENV", "development") || "").toLowerCase();
212
- const isDisabledEnvironment = telemetryDisabledEnvironments.includes(nodeEnv);
213
- const isTelemetryDisabledByEnv = require_FileModifierErrors.getEnvVariable("TELEMETRY_DISABLED", "false") === "true";
214
- return !this.isTelemetryDisabled && !isTelemetryDisabledByEnv && !isDisabledEnvironment;
215
- }
216
- /**
217
- * Prepare and send the error telemetry.
218
- *
219
- * @TODO This currently blocks the thread and sends the telemetry to the server.
220
- *
221
- * @param {unknown} error - The error to send.
222
- * @param {string} instrumentedClassName - The class name of the instrumented class.
223
- * @param {string} name - The name of the method that threw the error.
224
- * @param {number} startTime - The start time of the method invocation in milliseconds.
225
- * @param {number} durationMs - The duration of the method invocation in milliseconds.
226
- */
227
- async prepareAndSendErrorTelemetry(error, instrumentedClassName, name, startTime, durationMs) {
228
- const telemetryPayload = {
229
- functionName: `${instrumentedClassName}.${name}`,
230
- durationMs,
231
- timestamp: startTime / 1e3,
232
- props: {
233
- fileName: instrumentedClassName,
234
- method: name
235
- },
236
- metadata: { provider: this.telemetryMetadata?.provider ?? "openai" },
237
- source: this.telemetrySource
238
- };
239
- if (error instanceof _composio_client.ComposioError) telemetryPayload.error = {
240
- errorId: error.errorId,
241
- name: error.name,
242
- message: error.message,
243
- stack: error.stack
244
- };
245
- else if (error instanceof require_FileModifierErrors.ComposioError) telemetryPayload.error = {
246
- errorId: error.errorId,
247
- name: error.name,
248
- code: error.code,
249
- message: error.message,
250
- stack: error.stack
251
- };
252
- else if (error instanceof Error) telemetryPayload.error = {
253
- errorId: error.errorId,
254
- name: error.name ?? "Unknown error",
255
- message: error.message,
256
- stack: error.stack
257
- };
258
- await this.sendErrorTelemetry(telemetryPayload);
259
- }
260
- /**
261
- * Send the telemetry payload to the server.
262
- * @param payload - the telemetry payload to send
263
- * @returns
264
- */
265
- async sendMetric(payload) {
266
- if (!this.shouldSendTelemetry()) {
267
- require_FileModifierErrors.logger_default.debug("Telemetry is disabled, skipping metric telemetry", payload);
268
- return;
269
- }
270
- try {
271
- require_FileModifierErrors.logger_default.debug("SDK Metric", payload);
272
- await TelemetryService.sendMetric(payload);
273
- } catch (error) {
274
- require_FileModifierErrors.logger_default.error("Error sending metric telemetry", error);
275
- }
276
- }
277
- async sendErrorTelemetry(payload) {
278
- if (!this.shouldSendTelemetry()) {
279
- require_FileModifierErrors.logger_default.debug("Telemetry is disabled, skipping metric telemetry", payload);
280
- return;
281
- }
282
- try {
283
- require_FileModifierErrors.logger_default.debug("SDK Error Telemetry", payload);
284
- await TelemetryService.sendErrorLog(payload);
285
- } catch (error) {
286
- require_FileModifierErrors.logger_default.error("Error sending error telemetry", error);
287
- }
288
- }
289
- /**
290
- * Flush any pending telemetry and wait for it to complete.
291
- * This is automatically called on process exit in Node.js environments.
292
- */
293
- async flush() {
294
- await this.batchProcessor.flush();
295
- }
296
- /**
297
- * Register process exit handlers to automatically flush telemetry.
298
- * Only registers handlers in Node.js environments (not in browsers).
299
- */
300
- registerExitHandlers() {
301
- if (this.exitHandlersRegistered || typeof process === "undefined" || !process.on) return;
302
- this.exitHandlersRegistered = true;
303
- const flushSync = () => {
304
- this.flush().catch((error) => {
305
- require_FileModifierErrors.logger_default.debug("Error flushing telemetry on exit", error);
306
- });
307
- };
308
- process.on("beforeExit", () => {
309
- flushSync();
310
- });
311
- const createSignalHandler = (signal) => {
312
- const handler = () => {
313
- require_FileModifierErrors.logger_default.debug(`Received ${signal}, flushing telemetry...`);
314
- this.flush().catch((error) => {
315
- require_FileModifierErrors.logger_default.debug("Error flushing telemetry on signal", error);
316
- }).finally(() => {
317
- process.removeListener(signal, handler);
318
- process.kill(process.pid, signal);
319
- });
320
- };
321
- return handler;
322
- };
323
- process.on("SIGINT", createSignalHandler("SIGINT"));
324
- process.on("SIGTERM", createSignalHandler("SIGTERM"));
325
- }
326
- };
327
- const telemetry = new TelemetryTransport();
328
-
329
- //#endregion
330
- Object.defineProperty(exports, 'telemetry', {
331
- enumerable: true,
332
- get: function () {
333
- return telemetry;
334
- }
335
- });
@@ -1,63 +0,0 @@
1
-
2
- //#region src/utils/uuid.ts
3
- function getRandomUUID() {
4
- return globalThis.crypto.randomUUID();
5
- }
6
- function getRandomShortId() {
7
- return getRandomUUID().slice(0, 8).replace(/-/g, "");
8
- }
9
-
10
- //#endregion
11
- //#region src/utils/buffer.ts
12
- /**
13
- * Convert ArrayBuffer to base64.
14
- */
15
- function arrayBufferToBase64(buffer) {
16
- const bytes = new Uint8Array(buffer);
17
- let binary = "";
18
- for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);
19
- return btoa(binary);
20
- }
21
- const base64ToUint8Array = (base64) => {
22
- const binary = atob(base64);
23
- const bytes = new Uint8Array(binary.length);
24
- for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
25
- return bytes;
26
- };
27
- const uint8ArrayToBase64 = (bytes) => {
28
- let binary = "";
29
- for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);
30
- return btoa(binary);
31
- };
32
-
33
- //#endregion
34
- Object.defineProperty(exports, 'arrayBufferToBase64', {
35
- enumerable: true,
36
- get: function () {
37
- return arrayBufferToBase64;
38
- }
39
- });
40
- Object.defineProperty(exports, 'base64ToUint8Array', {
41
- enumerable: true,
42
- get: function () {
43
- return base64ToUint8Array;
44
- }
45
- });
46
- Object.defineProperty(exports, 'getRandomShortId', {
47
- enumerable: true,
48
- get: function () {
49
- return getRandomShortId;
50
- }
51
- });
52
- Object.defineProperty(exports, 'getRandomUUID', {
53
- enumerable: true,
54
- get: function () {
55
- return getRandomUUID;
56
- }
57
- });
58
- Object.defineProperty(exports, 'uint8ArrayToBase64', {
59
- enumerable: true,
60
- get: function () {
61
- return uint8ArrayToBase64;
62
- }
63
- });
@@ -1,53 +0,0 @@
1
- //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __exportAll = (all, symbols) => {
9
- let target = {};
10
- for (var name in all) {
11
- __defProp(target, name, {
12
- get: all[name],
13
- enumerable: true
14
- });
15
- }
16
- if (symbols) {
17
- __defProp(target, Symbol.toStringTag, { value: "Module" });
18
- }
19
- return target;
20
- };
21
- var __copyProps = (to, from, except, desc) => {
22
- if (from && typeof from === "object" || typeof from === "function") {
23
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
24
- key = keys[i];
25
- if (!__hasOwnProp.call(to, key) && key !== except) {
26
- __defProp(to, key, {
27
- get: ((k) => from[k]).bind(null, key),
28
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
29
- });
30
- }
31
- }
32
- }
33
- return to;
34
- };
35
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
36
- value: mod,
37
- enumerable: true
38
- }) : target, mod));
39
-
40
- //#endregion
41
-
42
- Object.defineProperty(exports, '__exportAll', {
43
- enumerable: true,
44
- get: function () {
45
- return __exportAll;
46
- }
47
- });
48
- Object.defineProperty(exports, '__toESM', {
49
- enumerable: true,
50
- get: function () {
51
- return __toESM;
52
- }
53
- });