snow-ai 0.4.34 → 0.4.35
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/bundle/cli.mjs +26 -0
- package/package.json +1 -1
package/bundle/cli.mjs
CHANGED
|
@@ -4,6 +4,32 @@ import { fileURLToPath as _fileURLToPath } from 'url';
|
|
|
4
4
|
const require = _createRequire(import.meta.url);
|
|
5
5
|
const __filename = _fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = _fileURLToPath(new URL('.', import.meta.url));
|
|
7
|
+
|
|
8
|
+
// Polyfill for undici's web API dependencies
|
|
9
|
+
// undici uses File, Blob, etc. which are only available in Node.js 20+
|
|
10
|
+
// For Node.js 16-18, we provide minimal polyfills
|
|
11
|
+
if (typeof globalThis.File === 'undefined') {
|
|
12
|
+
globalThis.File = class File {
|
|
13
|
+
constructor(bits, name, options) {
|
|
14
|
+
this.bits = bits;
|
|
15
|
+
this.name = name;
|
|
16
|
+
this.options = options;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
if (typeof globalThis.FormData === 'undefined') {
|
|
21
|
+
globalThis.FormData = class FormData {
|
|
22
|
+
constructor() {
|
|
23
|
+
this._data = new Map();
|
|
24
|
+
}
|
|
25
|
+
append(key, value) {
|
|
26
|
+
this._data.set(key, value);
|
|
27
|
+
}
|
|
28
|
+
get(key) {
|
|
29
|
+
return this._data.get(key);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
7
33
|
var __create = Object.create;
|
|
8
34
|
var __defProp = Object.defineProperty;
|
|
9
35
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|