@nocobase/plugin-ai-gigachat 2.2.19 → 2.2.21
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/dist/externalVersion.js +5 -5
- package/dist/node_modules/gigachat/package.json +1 -1
- package/dist/node_modules/langchain-gigachat/index.cjs +2 -2
- package/dist/node_modules/langchain-gigachat/package.json +1 -1
- package/package.json +2 -2
- package/dist/node_modules/gigachat/node_modules/axios/dist/axios.js +0 -5249
- package/dist/node_modules/gigachat/node_modules/axios/dist/axios.min.js +0 -5
- package/dist/node_modules/gigachat/node_modules/axios/dist/browser/axios.cjs +0 -5146
- package/dist/node_modules/gigachat/node_modules/axios/dist/esm/axios.js +0 -5167
- package/dist/node_modules/gigachat/node_modules/axios/dist/esm/axios.min.js +0 -3
- package/dist/node_modules/gigachat/node_modules/axios/dist/node/axios.cjs +0 -5996
- package/dist/node_modules/gigachat/node_modules/axios/index.d.cts +0 -738
- package/dist/node_modules/gigachat/node_modules/axios/index.d.ts +0 -755
- package/dist/node_modules/gigachat/node_modules/axios/index.js +0 -45
- package/dist/node_modules/gigachat/node_modules/axios/lib/adapters/adapters.js +0 -132
- package/dist/node_modules/gigachat/node_modules/axios/lib/adapters/fetch.js +0 -643
- package/dist/node_modules/gigachat/node_modules/axios/lib/adapters/http.js +0 -1417
- package/dist/node_modules/gigachat/node_modules/axios/lib/adapters/xhr.js +0 -228
- package/dist/node_modules/gigachat/node_modules/axios/lib/axios.js +0 -89
- package/dist/node_modules/gigachat/node_modules/axios/lib/cancel/CancelToken.js +0 -135
- package/dist/node_modules/gigachat/node_modules/axios/lib/cancel/CanceledError.js +0 -22
- package/dist/node_modules/gigachat/node_modules/axios/lib/cancel/isCancel.js +0 -5
- package/dist/node_modules/gigachat/node_modules/axios/lib/core/Axios.js +0 -283
- package/dist/node_modules/gigachat/node_modules/axios/lib/core/AxiosError.js +0 -188
- package/dist/node_modules/gigachat/node_modules/axios/lib/core/AxiosHeaders.js +0 -351
- package/dist/node_modules/gigachat/node_modules/axios/lib/core/InterceptorManager.js +0 -72
- package/dist/node_modules/gigachat/node_modules/axios/lib/core/buildFullPath.js +0 -50
- package/dist/node_modules/gigachat/node_modules/axios/lib/core/dispatchRequest.js +0 -89
- package/dist/node_modules/gigachat/node_modules/axios/lib/core/mergeConfig.js +0 -159
- package/dist/node_modules/gigachat/node_modules/axios/lib/core/settle.js +0 -27
- package/dist/node_modules/gigachat/node_modules/axios/lib/core/transformData.js +0 -28
- package/dist/node_modules/gigachat/node_modules/axios/lib/defaults/index.js +0 -177
- package/dist/node_modules/gigachat/node_modules/axios/lib/defaults/transitional.js +0 -10
- package/dist/node_modules/gigachat/node_modules/axios/lib/env/classes/FormData.js +0 -2
- package/dist/node_modules/gigachat/node_modules/axios/lib/env/data.js +0 -1
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -156
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -59
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/Http2Sessions.js +0 -119
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -77
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -29
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/bind.js +0 -14
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/buildURL.js +0 -69
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/callbackify.js +0 -18
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/combineURLs.js +0 -15
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/composeSignals.js +0 -57
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/cookies.js +0 -64
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -31
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +0 -105
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/formDataToJSON.js +0 -119
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/formDataToStream.js +0 -119
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/fromDataURI.js +0 -68
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -19
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -16
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/null.js +0 -2
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/parseHeaders.js +0 -69
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/progressEventReducer.js +0 -54
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/readBlob.js +0 -15
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/resolveConfig.js +0 -119
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +0 -60
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/shouldBypassProxy.js +0 -210
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/speedometer.js +0 -55
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/spread.js +0 -28
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/throttle.js +0 -44
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/toFormData.js +0 -285
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/trackStream.js +0 -89
- package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/validator.js +0 -112
- package/dist/node_modules/gigachat/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
- package/dist/node_modules/gigachat/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
- package/dist/node_modules/gigachat/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
- package/dist/node_modules/gigachat/node_modules/axios/lib/platform/browser/index.js +0 -13
- package/dist/node_modules/gigachat/node_modules/axios/lib/platform/common/utils.js +0 -52
- package/dist/node_modules/gigachat/node_modules/axios/lib/platform/index.js +0 -7
- package/dist/node_modules/gigachat/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
- package/dist/node_modules/gigachat/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
- package/dist/node_modules/gigachat/node_modules/axios/lib/platform/node/index.js +0 -37
- package/dist/node_modules/gigachat/node_modules/axios/lib/utils.js +0 -1017
- package/dist/node_modules/gigachat/node_modules/axios/package.json +0 -201
- package/dist/node_modules/gigachat/node_modules/follow-redirects/debug.js +0 -15
- package/dist/node_modules/gigachat/node_modules/follow-redirects/http.js +0 -1
- package/dist/node_modules/gigachat/node_modules/follow-redirects/https.js +0 -1
- package/dist/node_modules/gigachat/node_modules/follow-redirects/index.js +0 -709
- package/dist/node_modules/gigachat/node_modules/follow-redirects/package.json +0 -58
- package/dist/node_modules/gigachat/node_modules/proxy-from-env/index.cjs +0 -105
- package/dist/node_modules/gigachat/node_modules/proxy-from-env/index.js +0 -103
- package/dist/node_modules/gigachat/node_modules/proxy-from-env/package.json +0 -43
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
export const streamChunk = function* (chunk, chunkSize) {
|
|
2
|
-
let len = chunk.byteLength;
|
|
3
|
-
|
|
4
|
-
if (!chunkSize || len < chunkSize) {
|
|
5
|
-
yield chunk;
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
let pos = 0;
|
|
10
|
-
let end;
|
|
11
|
-
|
|
12
|
-
while (pos < len) {
|
|
13
|
-
end = pos + chunkSize;
|
|
14
|
-
yield chunk.slice(pos, end);
|
|
15
|
-
pos = end;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const readBytes = async function* (iterable, chunkSize) {
|
|
20
|
-
for await (const chunk of readStream(iterable)) {
|
|
21
|
-
yield* streamChunk(chunk, chunkSize);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const readStream = async function* (stream) {
|
|
26
|
-
if (stream[Symbol.asyncIterator]) {
|
|
27
|
-
yield* stream;
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const reader = stream.getReader();
|
|
32
|
-
try {
|
|
33
|
-
for (;;) {
|
|
34
|
-
const { done, value } = await reader.read();
|
|
35
|
-
if (done) {
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
yield value;
|
|
39
|
-
}
|
|
40
|
-
} finally {
|
|
41
|
-
await reader.cancel();
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
46
|
-
const iterator = readBytes(stream, chunkSize);
|
|
47
|
-
|
|
48
|
-
let bytes = 0;
|
|
49
|
-
let done;
|
|
50
|
-
let _onFinish = (e) => {
|
|
51
|
-
if (!done) {
|
|
52
|
-
done = true;
|
|
53
|
-
onFinish && onFinish(e);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
return new ReadableStream(
|
|
58
|
-
{
|
|
59
|
-
async pull(controller) {
|
|
60
|
-
try {
|
|
61
|
-
const { done, value } = await iterator.next();
|
|
62
|
-
|
|
63
|
-
if (done) {
|
|
64
|
-
_onFinish();
|
|
65
|
-
controller.close();
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
let len = value.byteLength;
|
|
70
|
-
if (onProgress) {
|
|
71
|
-
let loadedBytes = (bytes += len);
|
|
72
|
-
onProgress(loadedBytes);
|
|
73
|
-
}
|
|
74
|
-
controller.enqueue(new Uint8Array(value));
|
|
75
|
-
} catch (err) {
|
|
76
|
-
_onFinish(err);
|
|
77
|
-
throw err;
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
cancel(reason) {
|
|
81
|
-
_onFinish(reason);
|
|
82
|
-
return iterator.return();
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
highWaterMark: 2,
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import { VERSION } from '../env/data.js';
|
|
4
|
-
import AxiosError from '../core/AxiosError.js';
|
|
5
|
-
|
|
6
|
-
const validators = {};
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line func-names
|
|
9
|
-
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
|
|
10
|
-
validators[type] = function validator(thing) {
|
|
11
|
-
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
|
12
|
-
};
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const deprecatedWarnings = {};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Transitional option validator
|
|
19
|
-
*
|
|
20
|
-
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
21
|
-
* @param {string?} version - deprecated version / removed since version
|
|
22
|
-
* @param {string?} message - some message with additional info
|
|
23
|
-
*
|
|
24
|
-
* @returns {function}
|
|
25
|
-
*/
|
|
26
|
-
validators.transitional = function transitional(validator, version, message) {
|
|
27
|
-
function formatMessage(opt, desc) {
|
|
28
|
-
return (
|
|
29
|
-
'[Axios v' +
|
|
30
|
-
VERSION +
|
|
31
|
-
"] Transitional option '" +
|
|
32
|
-
opt +
|
|
33
|
-
"'" +
|
|
34
|
-
desc +
|
|
35
|
-
(message ? '. ' + message : '')
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// eslint-disable-next-line func-names
|
|
40
|
-
return (value, opt, opts) => {
|
|
41
|
-
if (validator === false) {
|
|
42
|
-
throw new AxiosError(
|
|
43
|
-
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
44
|
-
AxiosError.ERR_DEPRECATED
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (version && !deprecatedWarnings[opt]) {
|
|
49
|
-
deprecatedWarnings[opt] = true;
|
|
50
|
-
// eslint-disable-next-line no-console
|
|
51
|
-
console.warn(
|
|
52
|
-
formatMessage(
|
|
53
|
-
opt,
|
|
54
|
-
' has been deprecated since v' + version + ' and will be removed in the near future'
|
|
55
|
-
)
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return validator ? validator(value, opt, opts) : true;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
validators.spelling = function spelling(correctSpelling) {
|
|
64
|
-
return (value, opt) => {
|
|
65
|
-
// eslint-disable-next-line no-console
|
|
66
|
-
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
67
|
-
return true;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Assert object's properties type
|
|
73
|
-
*
|
|
74
|
-
* @param {object} options
|
|
75
|
-
* @param {object} schema
|
|
76
|
-
* @param {boolean?} allowUnknown
|
|
77
|
-
*
|
|
78
|
-
* @returns {object}
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
function assertOptions(options, schema, allowUnknown) {
|
|
82
|
-
if (typeof options !== 'object' || options === null) {
|
|
83
|
-
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
|
84
|
-
}
|
|
85
|
-
const keys = Object.keys(options);
|
|
86
|
-
let i = keys.length;
|
|
87
|
-
while (i-- > 0) {
|
|
88
|
-
const opt = keys[i];
|
|
89
|
-
// Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
|
|
90
|
-
// a non-function validator and cause a TypeError.
|
|
91
|
-
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
|
|
92
|
-
if (validator) {
|
|
93
|
-
const value = options[opt];
|
|
94
|
-
const result = value === undefined || validator(value, opt, options);
|
|
95
|
-
if (result !== true) {
|
|
96
|
-
throw new AxiosError(
|
|
97
|
-
'option ' + opt + ' must be ' + result,
|
|
98
|
-
AxiosError.ERR_BAD_OPTION_VALUE
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
if (allowUnknown !== true) {
|
|
104
|
-
throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export default {
|
|
110
|
-
assertOptions,
|
|
111
|
-
validators,
|
|
112
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import URLSearchParams from './classes/URLSearchParams.js';
|
|
2
|
-
import FormData from './classes/FormData.js';
|
|
3
|
-
import Blob from './classes/Blob.js';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
isBrowser: true,
|
|
7
|
-
classes: {
|
|
8
|
-
URLSearchParams,
|
|
9
|
-
FormData,
|
|
10
|
-
Blob,
|
|
11
|
-
},
|
|
12
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
13
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
2
|
-
|
|
3
|
-
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Determine if we're running in a standard browser environment
|
|
7
|
-
*
|
|
8
|
-
* This allows axios to run in a web worker, and react-native.
|
|
9
|
-
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
10
|
-
*
|
|
11
|
-
* web workers:
|
|
12
|
-
* typeof window -> undefined
|
|
13
|
-
* typeof document -> undefined
|
|
14
|
-
*
|
|
15
|
-
* react-native:
|
|
16
|
-
* navigator.product -> 'ReactNative'
|
|
17
|
-
* nativescript
|
|
18
|
-
* navigator.product -> 'NativeScript' or 'NS'
|
|
19
|
-
*
|
|
20
|
-
* @returns {boolean}
|
|
21
|
-
*/
|
|
22
|
-
const hasStandardBrowserEnv =
|
|
23
|
-
hasBrowserEnv &&
|
|
24
|
-
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Determine if we're running in a standard browser webWorker environment
|
|
28
|
-
*
|
|
29
|
-
* Although the `isStandardBrowserEnv` method indicates that
|
|
30
|
-
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
31
|
-
* filtered out due to its judgment standard
|
|
32
|
-
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
33
|
-
* This leads to a problem when axios post `FormData` in webWorker
|
|
34
|
-
*/
|
|
35
|
-
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
36
|
-
return (
|
|
37
|
-
typeof WorkerGlobalScope !== 'undefined' &&
|
|
38
|
-
// eslint-disable-next-line no-undef
|
|
39
|
-
self instanceof WorkerGlobalScope &&
|
|
40
|
-
typeof self.importScripts === 'function'
|
|
41
|
-
);
|
|
42
|
-
})();
|
|
43
|
-
|
|
44
|
-
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
45
|
-
|
|
46
|
-
export {
|
|
47
|
-
hasBrowserEnv,
|
|
48
|
-
hasStandardBrowserWebWorkerEnv,
|
|
49
|
-
hasStandardBrowserEnv,
|
|
50
|
-
_navigator as navigator,
|
|
51
|
-
origin,
|
|
52
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import crypto from 'crypto';
|
|
2
|
-
import URLSearchParams from './classes/URLSearchParams.js';
|
|
3
|
-
import FormData from './classes/FormData.js';
|
|
4
|
-
|
|
5
|
-
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
6
|
-
|
|
7
|
-
const DIGIT = '0123456789';
|
|
8
|
-
|
|
9
|
-
const ALPHABET = {
|
|
10
|
-
DIGIT,
|
|
11
|
-
ALPHA,
|
|
12
|
-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT,
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
16
|
-
let str = '';
|
|
17
|
-
const { length } = alphabet;
|
|
18
|
-
const randomValues = new Uint32Array(size);
|
|
19
|
-
crypto.randomFillSync(randomValues);
|
|
20
|
-
for (let i = 0; i < size; i++) {
|
|
21
|
-
str += alphabet[randomValues[i] % length];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return str;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default {
|
|
28
|
-
isNode: true,
|
|
29
|
-
classes: {
|
|
30
|
-
URLSearchParams,
|
|
31
|
-
FormData,
|
|
32
|
-
Blob: (typeof Blob !== 'undefined' && Blob) || null,
|
|
33
|
-
},
|
|
34
|
-
ALPHABET,
|
|
35
|
-
generateString,
|
|
36
|
-
protocols: ['http', 'https', 'file', 'data'],
|
|
37
|
-
};
|