@bigbinary/neeto-audit-frontend 2.1.3 → 2.1.4
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/common/eslint/common/eslint.config.mjs +3 -0
- package/common/eslint/extension/eslint.config.mjs +16 -0
- package/common/eslint/nano/eslint.config.mjs +3 -0
- package/common/eslint/widget/eslint.config.mjs +9 -0
- package/common/recommendedDependencies/common.js +20 -16
- package/common/recommendedDependencies/extension.js +4 -4
- package/common/recommendedDependencies/frontend.js +12 -12
- package/common/recommendedDependencies/nano.js +7 -7
- package/dist/index.js +256 -223
- package/package.json +2 -2
- package/src/constants/index.js +7 -0
- package/src/utils/index.js +20 -18
- package/.github/CODEOWNERS +0 -2
- package/common/eslint/common/.eslintrc.js +0 -1
- package/common/eslint/extension/.eslintrc.js +0 -10
- package/common/eslint/nano/.eslintrc.js +0 -1
- package/common/eslint/widget/.eslintrc.js +0 -9
package/dist/index.js
CHANGED
|
@@ -10,12 +10,13 @@ import require$$4 from 'process';
|
|
|
10
10
|
import { readFile, mkdir, lstat, writeFile } from 'fs/promises';
|
|
11
11
|
import require$$0$3 from 'assert';
|
|
12
12
|
import require$$1$1 from 'tty';
|
|
13
|
-
import require$$1$2
|
|
13
|
+
import require$$1$2 from 'util';
|
|
14
14
|
import require$$0$4 from 'os';
|
|
15
15
|
import stream, { Readable } from 'stream';
|
|
16
16
|
import require$$3$1 from 'http';
|
|
17
17
|
import require$$4$1 from 'https';
|
|
18
18
|
import require$$0$5 from 'url';
|
|
19
|
+
import crypto from 'crypto';
|
|
19
20
|
import zlib from 'zlib';
|
|
20
21
|
|
|
21
22
|
const ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -15426,6 +15427,13 @@ const NANO_TYPE_MAP = {
|
|
|
15426
15427
|
molecules: "frontend",
|
|
15427
15428
|
};
|
|
15428
15429
|
|
|
15430
|
+
const REMOTE_URL_PREFIXES = [
|
|
15431
|
+
"git@github.com:bigbinary/",
|
|
15432
|
+
"github.com/bigbinary/",
|
|
15433
|
+
"git@github.com:neetozone/",
|
|
15434
|
+
"github.com/neetozone/",
|
|
15435
|
+
];
|
|
15436
|
+
|
|
15429
15437
|
const run$1 = require$$1$2.promisify(exec);
|
|
15430
15438
|
|
|
15431
15439
|
const execute = async (command, debug) => {
|
|
@@ -15495,7 +15503,7 @@ const getCliOptions = () => {
|
|
|
15495
15503
|
|
|
15496
15504
|
const getFileContent = async ({
|
|
15497
15505
|
relativeFilePath = "",
|
|
15498
|
-
debug = false
|
|
15506
|
+
debug = false,
|
|
15499
15507
|
}) => {
|
|
15500
15508
|
const resolvedFilePath = path$2.resolve(relativeFilePath);
|
|
15501
15509
|
|
|
@@ -15511,7 +15519,7 @@ const createOrReplaceFile = async ({
|
|
|
15511
15519
|
relativeFilePath = "",
|
|
15512
15520
|
content = "",
|
|
15513
15521
|
debug = false,
|
|
15514
|
-
options = {}
|
|
15522
|
+
options = {},
|
|
15515
15523
|
}) => {
|
|
15516
15524
|
const resolvedFilePath = path$2.resolve(relativeFilePath);
|
|
15517
15525
|
|
|
@@ -15519,7 +15527,7 @@ const createOrReplaceFile = async ({
|
|
|
15519
15527
|
return await writeFile(resolvedFilePath, content, {
|
|
15520
15528
|
encoding: "utf8",
|
|
15521
15529
|
flag: "w",
|
|
15522
|
-
...options
|
|
15530
|
+
...options,
|
|
15523
15531
|
});
|
|
15524
15532
|
} catch (error) {
|
|
15525
15533
|
debug && console.error(error);
|
|
@@ -15530,7 +15538,7 @@ const createOrReplaceFile = async ({
|
|
|
15530
15538
|
const identicalFiles = async ({
|
|
15531
15539
|
sourceFile = "",
|
|
15532
15540
|
destinationFile = "",
|
|
15533
|
-
debug = false
|
|
15541
|
+
debug = false,
|
|
15534
15542
|
}) => {
|
|
15535
15543
|
try {
|
|
15536
15544
|
const sourceFileContent = await readFile(sourceFile);
|
|
@@ -15548,7 +15556,7 @@ const identicalFiles = async ({
|
|
|
15548
15556
|
const identicalDirectoryFiles = async ({
|
|
15549
15557
|
sourceDirectory,
|
|
15550
15558
|
destinationDirectory,
|
|
15551
|
-
debug
|
|
15559
|
+
debug,
|
|
15552
15560
|
}) => {
|
|
15553
15561
|
try {
|
|
15554
15562
|
const files = await promises.readdir(sourceDirectory);
|
|
@@ -15563,14 +15571,14 @@ const identicalDirectoryFiles = async ({
|
|
|
15563
15571
|
return await identicalFiles({
|
|
15564
15572
|
sourceFile,
|
|
15565
15573
|
destinationFile,
|
|
15566
|
-
debug
|
|
15574
|
+
debug,
|
|
15567
15575
|
});
|
|
15568
15576
|
} else {
|
|
15569
15577
|
await mkdir(destinationFile, { recursive: true });
|
|
15570
15578
|
const identicalFiles = await identicalDirectoryFiles({
|
|
15571
15579
|
sourceDirectory: sourceFile,
|
|
15572
15580
|
destinationDirectory: destinationFile,
|
|
15573
|
-
debug
|
|
15581
|
+
debug,
|
|
15574
15582
|
});
|
|
15575
15583
|
|
|
15576
15584
|
const results = await Promise.all(identicalFiles);
|
|
@@ -15590,7 +15598,7 @@ const createOrReplaceDirectoryFiles = async ({
|
|
|
15590
15598
|
sourceDirectory,
|
|
15591
15599
|
destinationDirectory,
|
|
15592
15600
|
debug,
|
|
15593
|
-
options
|
|
15601
|
+
options,
|
|
15594
15602
|
}) => {
|
|
15595
15603
|
try {
|
|
15596
15604
|
const files = await promises.readdir(sourceDirectory);
|
|
@@ -15604,14 +15612,14 @@ const createOrReplaceDirectoryFiles = async ({
|
|
|
15604
15612
|
if (isFile) {
|
|
15605
15613
|
const content = await getFileContent({
|
|
15606
15614
|
relativeFilePath: sourcePath,
|
|
15607
|
-
debug
|
|
15615
|
+
debug,
|
|
15608
15616
|
});
|
|
15609
15617
|
|
|
15610
15618
|
await createOrReplaceFile({
|
|
15611
15619
|
relativeFilePath: destinationPath,
|
|
15612
15620
|
content,
|
|
15613
15621
|
debug,
|
|
15614
|
-
options
|
|
15622
|
+
options,
|
|
15615
15623
|
});
|
|
15616
15624
|
} else {
|
|
15617
15625
|
await mkdir(destinationPath, { recursive: true });
|
|
@@ -15619,7 +15627,7 @@ const createOrReplaceDirectoryFiles = async ({
|
|
|
15619
15627
|
sourceDirectory: sourcePath,
|
|
15620
15628
|
destinationDirectory: destinationPath,
|
|
15621
15629
|
debug,
|
|
15622
|
-
options
|
|
15630
|
+
options,
|
|
15623
15631
|
});
|
|
15624
15632
|
}
|
|
15625
15633
|
});
|
|
@@ -15664,22 +15672,20 @@ const getNanoType = async () => {
|
|
|
15664
15672
|
const git = simpleGit();
|
|
15665
15673
|
const { value: remoteOriginUrl } = await git.getConfig("remote.origin.url");
|
|
15666
15674
|
|
|
15667
|
-
const
|
|
15668
|
-
|
|
15669
|
-
remoteOriginUrl.split("github.com/bigbinary/").at(1);
|
|
15670
|
-
|
|
15675
|
+
const prefix = REMOTE_URL_PREFIXES.find((p) => remoteOriginUrl.includes(p));
|
|
15676
|
+
const projectGitName = remoteOriginUrl.split(prefix).at(1);
|
|
15671
15677
|
const projectName = projectGitName.split(".git").at(0);
|
|
15672
15678
|
|
|
15673
15679
|
return {
|
|
15674
15680
|
type: NANO_TYPE_MAP[last$1(split("-", projectName))],
|
|
15675
|
-
repoName: projectName
|
|
15681
|
+
repoName: projectName,
|
|
15676
15682
|
};
|
|
15677
15683
|
};
|
|
15678
15684
|
|
|
15679
15685
|
const getPackageJson = async (debug) => {
|
|
15680
15686
|
const packageJsonContent = await getFileContent({
|
|
15681
15687
|
relativeFilePath: PACKAGE_JSON_PATH,
|
|
15682
|
-
debug
|
|
15688
|
+
debug,
|
|
15683
15689
|
});
|
|
15684
15690
|
|
|
15685
15691
|
return JSON.parse(packageJsonContent);
|
|
@@ -15908,6 +15914,7 @@ const DEV_DEPENDENCIES$4 = {
|
|
|
15908
15914
|
"@babel/core": "7.26.0",
|
|
15909
15915
|
"@babel/eslint-parser": "7.25.9",
|
|
15910
15916
|
"@babel/plugin-transform-runtime": "7.25.9",
|
|
15917
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
15911
15918
|
"@babel/preset-env": "7.26.0",
|
|
15912
15919
|
"@babel/preset-react": "7.25.9",
|
|
15913
15920
|
"@babel/preset-typescript": "7.26.0",
|
|
@@ -15923,29 +15930,32 @@ const DEV_DEPENDENCIES$4 = {
|
|
|
15923
15930
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
|
15924
15931
|
"babel-preset-react": "6.24.1",
|
|
15925
15932
|
"babel-preset-typescript": "^7.0.0-alpha.19",
|
|
15926
|
-
"eslint": "
|
|
15927
|
-
"eslint-config-prettier": "
|
|
15928
|
-
"eslint-plugin-cypress": "
|
|
15929
|
-
"eslint-plugin-import": "2.31.0",
|
|
15930
|
-
"eslint-plugin-jam3": "0.2.3",
|
|
15931
|
-
"eslint-plugin-json": "
|
|
15932
|
-
"eslint-plugin-
|
|
15933
|
-
"eslint-plugin-
|
|
15934
|
-
"eslint-plugin-
|
|
15935
|
-
"eslint-plugin-react": "
|
|
15936
|
-
"eslint-plugin-
|
|
15937
|
-
"eslint-plugin-
|
|
15938
|
-
"eslint-plugin-
|
|
15939
|
-
"eslint-plugin-unused-imports": "2.0.0",
|
|
15933
|
+
"eslint": "^9.25.1",
|
|
15934
|
+
"eslint-config-prettier": "^10.1.2",
|
|
15935
|
+
"eslint-plugin-cypress": "^4.3.0",
|
|
15936
|
+
"eslint-plugin-import": "^2.31.0",
|
|
15937
|
+
"eslint-plugin-jam3": "^0.2.3",
|
|
15938
|
+
"eslint-plugin-json": "^4.0.1",
|
|
15939
|
+
"eslint-plugin-prettier": "^5.2.6",
|
|
15940
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
15941
|
+
"eslint-plugin-react": "^7.37.5",
|
|
15942
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
15943
|
+
"eslint-plugin-security": "^3.0.1",
|
|
15944
|
+
"eslint-plugin-sonarjs": "^3.0.2",
|
|
15945
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
15940
15946
|
"eslint-plugin-xss": "^0.1.12",
|
|
15947
|
+
"@eslint/compat": "^1.2.8",
|
|
15948
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
15949
|
+
"@eslint/js": "^9.25.1",
|
|
15941
15950
|
"husky": "7.0.4",
|
|
15951
|
+
"globals": "^16.0.0",
|
|
15942
15952
|
"lint-staged": "12.4.1",
|
|
15943
15953
|
"postcss": "8.4.49",
|
|
15944
15954
|
"postcss-import": "^15.0.0",
|
|
15945
15955
|
"postcss-loader": "^7.0.1",
|
|
15946
15956
|
"postcss-preset-env": "7.8.2",
|
|
15947
|
-
"prettier": "
|
|
15948
|
-
"prettier-plugin-tailwindcss": "0.
|
|
15957
|
+
"prettier": "3",
|
|
15958
|
+
"prettier-plugin-tailwindcss": "0.6.14",
|
|
15949
15959
|
};
|
|
15950
15960
|
|
|
15951
15961
|
const PEER_DEPENDENCIES$4 = {};
|
|
@@ -15960,16 +15970,16 @@ const DEPENDENCIES$3 = {
|
|
|
15960
15970
|
"@honeybadger-io/js": "6.10.1",
|
|
15961
15971
|
"@honeybadger-io/react": "6.1.25",
|
|
15962
15972
|
"antd": "5.22.0",
|
|
15963
|
-
axios: "1.
|
|
15973
|
+
axios: "1.8.2",
|
|
15964
15974
|
"i18next": "22.5.1",
|
|
15965
15975
|
"js-logger": "1.6.1",
|
|
15966
15976
|
ramda: "0.29.1",
|
|
15967
|
-
react: "18.
|
|
15968
|
-
"react-dom": "18.
|
|
15977
|
+
react: "18.3.1",
|
|
15978
|
+
"react-dom": "18.3.1",
|
|
15969
15979
|
"react-i18next": "12.3.1",
|
|
15970
15980
|
"react-router-dom": "5.3.3",
|
|
15971
15981
|
"react-toastify": "8.0.2",
|
|
15972
|
-
sass: "1.
|
|
15982
|
+
sass: "1.89.0",
|
|
15973
15983
|
yup: "0.32.11",
|
|
15974
15984
|
};
|
|
15975
15985
|
|
|
@@ -16003,11 +16013,11 @@ const DEV_DEPENDENCIES$2 = {
|
|
|
16003
16013
|
"@tippyjs/react": "4.2.6",
|
|
16004
16014
|
"antd": "5.22.0",
|
|
16005
16015
|
"avvvatars-react": "0.4.2",
|
|
16006
|
-
"axios": "1.
|
|
16016
|
+
"axios": "1.8.2",
|
|
16007
16017
|
"classnames": "2.5.1",
|
|
16008
16018
|
"crypto-browserify": "3.12.1",
|
|
16009
16019
|
"dayjs": "1.11.13",
|
|
16010
|
-
"dompurify": "^2.4
|
|
16020
|
+
"dompurify": "^3.2.4",
|
|
16011
16021
|
"emoji-mart": "5.6.0",
|
|
16012
16022
|
"formik": "2.4.6",
|
|
16013
16023
|
"framer-motion": "11.11.11",
|
|
@@ -16022,9 +16032,9 @@ const DEV_DEPENDENCIES$2 = {
|
|
|
16022
16032
|
"path-browserify": "1.0.1",
|
|
16023
16033
|
"qs": "6.13.0",
|
|
16024
16034
|
"ramda": "0.29.1",
|
|
16025
|
-
"react": "18.
|
|
16035
|
+
"react": "18.3.1",
|
|
16026
16036
|
"react-colorful": "5.6.1",
|
|
16027
|
-
"react-dom": "18.
|
|
16037
|
+
"react-dom": "18.3.1",
|
|
16028
16038
|
"react-drag-listview": "2.0.0",
|
|
16029
16039
|
"react-helmet": "^6.1.0",
|
|
16030
16040
|
"react-i18next": "12.3.1",
|
|
@@ -16037,7 +16047,7 @@ const DEV_DEPENDENCIES$2 = {
|
|
|
16037
16047
|
"rollup-plugin-copy": "3.5.0",
|
|
16038
16048
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
16039
16049
|
"rollup-plugin-styles": "4.0.0",
|
|
16040
|
-
"sass": "1.
|
|
16050
|
+
"sass": "1.89.0",
|
|
16041
16051
|
"sass-loader": "^13.0.2",
|
|
16042
16052
|
"stream-browserify": "^3.0.0",
|
|
16043
16053
|
"stream-http": "3.2.0",
|
|
@@ -16048,7 +16058,7 @@ const DEV_DEPENDENCIES$2 = {
|
|
|
16048
16058
|
"util": "^0.12.5",
|
|
16049
16059
|
"vm-browserify": "1.1.2",
|
|
16050
16060
|
"yup": "0.32.11",
|
|
16051
|
-
"zustand": "4.
|
|
16061
|
+
"zustand": "4.4.2"
|
|
16052
16062
|
};
|
|
16053
16063
|
|
|
16054
16064
|
const PEER_DEPENDENCIES$2 = {
|
|
@@ -16061,11 +16071,11 @@ const PEER_DEPENDENCIES$2 = {
|
|
|
16061
16071
|
"@tippyjs/react": "4.2.6",
|
|
16062
16072
|
"antd": "5.22.0",
|
|
16063
16073
|
"avvvatars-react": "0.4.2",
|
|
16064
|
-
"axios": "1.
|
|
16074
|
+
"axios": "1.8.2",
|
|
16065
16075
|
"classnames": "2.5.1",
|
|
16066
16076
|
"crypto-browserify": "3.12.1",
|
|
16067
16077
|
"dayjs": "1.11.13",
|
|
16068
|
-
"dompurify": "^2.4
|
|
16078
|
+
"dompurify": "^3.2.4",
|
|
16069
16079
|
"emoji-mart": "5.6.0",
|
|
16070
16080
|
"framer-motion": "11.11.11",
|
|
16071
16081
|
"formik": "2.4.6",
|
|
@@ -16080,11 +16090,11 @@ const PEER_DEPENDENCIES$2 = {
|
|
|
16080
16090
|
"path-browserify": "^1.0.1",
|
|
16081
16091
|
"qs": "6.13.0",
|
|
16082
16092
|
"ramda": "0.29.1",
|
|
16083
|
-
"react": "18.
|
|
16093
|
+
"react": "18.3.1",
|
|
16084
16094
|
"react-colorful": "5.6.1",
|
|
16085
|
-
"react-dom": "18.
|
|
16095
|
+
"react-dom": "18.3.1",
|
|
16086
16096
|
"react-drag-listview": "2.0.0",
|
|
16087
|
-
"react-dropzone": "14.
|
|
16097
|
+
"react-dropzone": "14.3.8",
|
|
16088
16098
|
"react-helmet": "^6.1.0",
|
|
16089
16099
|
"react-i18next": "12.3.1",
|
|
16090
16100
|
"react-resizable": "3.0.5",
|
|
@@ -16099,7 +16109,7 @@ const PEER_DEPENDENCIES$2 = {
|
|
|
16099
16109
|
"util": "^0.12.5",
|
|
16100
16110
|
"vm-browserify": "1.1.2",
|
|
16101
16111
|
"yup": "0.32.11",
|
|
16102
|
-
"zustand": "4.
|
|
16112
|
+
"zustand": "4.4.2"
|
|
16103
16113
|
};
|
|
16104
16114
|
|
|
16105
16115
|
var frontend = {
|
|
@@ -16124,15 +16134,15 @@ const DEV_DEPENDENCIES$1 = {
|
|
|
16124
16134
|
"@tanstack/react-query": "5.59.20",
|
|
16125
16135
|
"@tanstack/react-query-devtools": "5.59.20",
|
|
16126
16136
|
"antd": "5.22.0",
|
|
16127
|
-
axios: "1.
|
|
16137
|
+
axios: "1.8.2",
|
|
16128
16138
|
classnames: "2.5.1",
|
|
16129
16139
|
formik: "2.4.6",
|
|
16130
16140
|
"i18next": "22.5.1",
|
|
16131
16141
|
"js-logger": "1.6.1",
|
|
16132
16142
|
qs: "6.13.0",
|
|
16133
16143
|
ramda: "0.29.0",
|
|
16134
|
-
react: "18.
|
|
16135
|
-
"react-dom": "18.
|
|
16144
|
+
react: "18.3.1",
|
|
16145
|
+
"react-dom": "18.3.1",
|
|
16136
16146
|
"react-helmet": "^6.1.0",
|
|
16137
16147
|
"react-i18next": "12.3.1",
|
|
16138
16148
|
"react-router-dom": "5.3.3",
|
|
@@ -16142,7 +16152,7 @@ const DEV_DEPENDENCIES$1 = {
|
|
|
16142
16152
|
"rollup-plugin-cleaner": "1.0.0",
|
|
16143
16153
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
16144
16154
|
"rollup-plugin-styles": "4.0.0",
|
|
16145
|
-
"sass": "1.
|
|
16155
|
+
"sass": "1.89.0",
|
|
16146
16156
|
tailwindcss: "3.4.14",
|
|
16147
16157
|
util: "^0.12.5",
|
|
16148
16158
|
yup: "0.32.11",
|
|
@@ -16153,14 +16163,14 @@ const PEER_DEPENDENCIES$1 = {
|
|
|
16153
16163
|
"@honeybadger-io/react": "6.1.25",
|
|
16154
16164
|
"@tanstack/react-query": "5.59.20",
|
|
16155
16165
|
"@tanstack/react-query-devtools": "5.59.20",
|
|
16156
|
-
axios: "1.
|
|
16166
|
+
axios: "1.8.2",
|
|
16157
16167
|
classnames: "2.5.1",
|
|
16158
16168
|
formik: "2.4.6",
|
|
16159
16169
|
"i18next": "22.5.1",
|
|
16160
16170
|
"js-logger": "1.6.1",
|
|
16161
16171
|
ramda: "0.29.0",
|
|
16162
|
-
react: "18.
|
|
16163
|
-
"react-dom": "18.
|
|
16172
|
+
react: "18.3.1",
|
|
16173
|
+
"react-dom": "18.3.1",
|
|
16164
16174
|
"react-helmet": "^6.1.0",
|
|
16165
16175
|
"react-i18next": "12.3.1",
|
|
16166
16176
|
"react-router-dom": "5.3.3",
|
|
@@ -16794,26 +16804,6 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
16794
16804
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
16795
16805
|
};
|
|
16796
16806
|
|
|
16797
|
-
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
16798
|
-
|
|
16799
|
-
const DIGIT = '0123456789';
|
|
16800
|
-
|
|
16801
|
-
const ALPHABET = {
|
|
16802
|
-
DIGIT,
|
|
16803
|
-
ALPHA,
|
|
16804
|
-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
16805
|
-
};
|
|
16806
|
-
|
|
16807
|
-
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
16808
|
-
let str = '';
|
|
16809
|
-
const {length} = alphabet;
|
|
16810
|
-
while (size--) {
|
|
16811
|
-
str += alphabet[Math.random() * length|0];
|
|
16812
|
-
}
|
|
16813
|
-
|
|
16814
|
-
return str;
|
|
16815
|
-
};
|
|
16816
|
-
|
|
16817
16807
|
/**
|
|
16818
16808
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
16819
16809
|
*
|
|
@@ -16941,8 +16931,6 @@ var utils$1 = {
|
|
|
16941
16931
|
findKey,
|
|
16942
16932
|
global: _global,
|
|
16943
16933
|
isContextDefined,
|
|
16944
|
-
ALPHABET,
|
|
16945
|
-
generateString,
|
|
16946
16934
|
isSpecCompliantForm,
|
|
16947
16935
|
toJSONObject,
|
|
16948
16936
|
isAsyncFn,
|
|
@@ -16976,7 +16964,10 @@ function AxiosError(message, code, config, request, response) {
|
|
|
16976
16964
|
code && (this.code = code);
|
|
16977
16965
|
config && (this.config = config);
|
|
16978
16966
|
request && (this.request = request);
|
|
16979
|
-
|
|
16967
|
+
if (response) {
|
|
16968
|
+
this.response = response;
|
|
16969
|
+
this.status = response.status ? response.status : null;
|
|
16970
|
+
}
|
|
16980
16971
|
}
|
|
16981
16972
|
|
|
16982
16973
|
utils$1.inherits(AxiosError, Error, {
|
|
@@ -16996,7 +16987,7 @@ utils$1.inherits(AxiosError, Error, {
|
|
|
16996
16987
|
// Axios
|
|
16997
16988
|
config: utils$1.toJSONObject(this.config),
|
|
16998
16989
|
code: this.code,
|
|
16999
|
-
status: this.
|
|
16990
|
+
status: this.status
|
|
17000
16991
|
};
|
|
17001
16992
|
}
|
|
17002
16993
|
});
|
|
@@ -29458,7 +29449,7 @@ function encode(val) {
|
|
|
29458
29449
|
*
|
|
29459
29450
|
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
29460
29451
|
* @param {object} [params] The params to be appended
|
|
29461
|
-
* @param {?object} options
|
|
29452
|
+
* @param {?(object|Function)} options
|
|
29462
29453
|
*
|
|
29463
29454
|
* @returns {string} The formatted url
|
|
29464
29455
|
*/
|
|
@@ -29470,6 +29461,12 @@ function buildURL(url, params, options) {
|
|
|
29470
29461
|
|
|
29471
29462
|
const _encode = options && options.encode || encode;
|
|
29472
29463
|
|
|
29464
|
+
if (utils$1.isFunction(options)) {
|
|
29465
|
+
options = {
|
|
29466
|
+
serialize: options
|
|
29467
|
+
};
|
|
29468
|
+
}
|
|
29469
|
+
|
|
29473
29470
|
const serializeFn = options && options.serialize;
|
|
29474
29471
|
|
|
29475
29472
|
let serializedParams;
|
|
@@ -29568,6 +29565,29 @@ var transitionalDefaults = {
|
|
|
29568
29565
|
|
|
29569
29566
|
var URLSearchParams = require$$0$5.URLSearchParams;
|
|
29570
29567
|
|
|
29568
|
+
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
29569
|
+
|
|
29570
|
+
const DIGIT = '0123456789';
|
|
29571
|
+
|
|
29572
|
+
const ALPHABET = {
|
|
29573
|
+
DIGIT,
|
|
29574
|
+
ALPHA,
|
|
29575
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
29576
|
+
};
|
|
29577
|
+
|
|
29578
|
+
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
29579
|
+
let str = '';
|
|
29580
|
+
const {length} = alphabet;
|
|
29581
|
+
const randomValues = new Uint32Array(size);
|
|
29582
|
+
crypto.randomFillSync(randomValues);
|
|
29583
|
+
for (let i = 0; i < size; i++) {
|
|
29584
|
+
str += alphabet[randomValues[i] % length];
|
|
29585
|
+
}
|
|
29586
|
+
|
|
29587
|
+
return str;
|
|
29588
|
+
};
|
|
29589
|
+
|
|
29590
|
+
|
|
29571
29591
|
var platform$1 = {
|
|
29572
29592
|
isNode: true,
|
|
29573
29593
|
classes: {
|
|
@@ -29575,11 +29595,15 @@ var platform$1 = {
|
|
|
29575
29595
|
FormData: FormData$2,
|
|
29576
29596
|
Blob: typeof Blob !== 'undefined' && Blob || null
|
|
29577
29597
|
},
|
|
29598
|
+
ALPHABET,
|
|
29599
|
+
generateString,
|
|
29578
29600
|
protocols: [ 'http', 'https', 'file', 'data' ]
|
|
29579
29601
|
};
|
|
29580
29602
|
|
|
29581
29603
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
29582
29604
|
|
|
29605
|
+
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
29606
|
+
|
|
29583
29607
|
/**
|
|
29584
29608
|
* Determine if we're running in a standard browser environment
|
|
29585
29609
|
*
|
|
@@ -29597,10 +29621,8 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde
|
|
|
29597
29621
|
*
|
|
29598
29622
|
* @returns {boolean}
|
|
29599
29623
|
*/
|
|
29600
|
-
const hasStandardBrowserEnv =
|
|
29601
|
-
(product)
|
|
29602
|
-
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
|
29603
|
-
})(typeof navigator !== 'undefined' && navigator.product);
|
|
29624
|
+
const hasStandardBrowserEnv = hasBrowserEnv &&
|
|
29625
|
+
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
29604
29626
|
|
|
29605
29627
|
/**
|
|
29606
29628
|
* Determine if we're running in a standard browser webWorker environment
|
|
@@ -29627,6 +29649,7 @@ var utils = /*#__PURE__*/Object.freeze({
|
|
|
29627
29649
|
hasBrowserEnv: hasBrowserEnv,
|
|
29628
29650
|
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
29629
29651
|
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
29652
|
+
navigator: _navigator,
|
|
29630
29653
|
origin: origin
|
|
29631
29654
|
});
|
|
29632
29655
|
|
|
@@ -30348,13 +30371,16 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
30348
30371
|
*
|
|
30349
30372
|
* @returns {string} The combined full path
|
|
30350
30373
|
*/
|
|
30351
|
-
function buildFullPath(baseURL, requestedURL) {
|
|
30352
|
-
|
|
30374
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
30375
|
+
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
30376
|
+
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
|
|
30353
30377
|
return combineURLs(baseURL, requestedURL);
|
|
30354
30378
|
}
|
|
30355
30379
|
return requestedURL;
|
|
30356
30380
|
}
|
|
30357
30381
|
|
|
30382
|
+
var proxyFromEnv = {};
|
|
30383
|
+
|
|
30358
30384
|
var parseUrl$1 = require$$0$5.parse;
|
|
30359
30385
|
|
|
30360
30386
|
var DEFAULT_PORTS = {
|
|
@@ -30460,7 +30486,7 @@ function getEnv(key) {
|
|
|
30460
30486
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';
|
|
30461
30487
|
}
|
|
30462
30488
|
|
|
30463
|
-
|
|
30489
|
+
proxyFromEnv.getProxyForUrl = getProxyForUrl;
|
|
30464
30490
|
|
|
30465
30491
|
var followRedirects$1 = {exports: {}};
|
|
30466
30492
|
|
|
@@ -31156,7 +31182,7 @@ followRedirects$1.exports.wrap = wrap;
|
|
|
31156
31182
|
var followRedirectsExports = followRedirects$1.exports;
|
|
31157
31183
|
var followRedirects = /*@__PURE__*/getDefaultExportFromCjs(followRedirectsExports);
|
|
31158
31184
|
|
|
31159
|
-
const VERSION = "1.
|
|
31185
|
+
const VERSION = "1.8.2";
|
|
31160
31186
|
|
|
31161
31187
|
function parseProtocol(url) {
|
|
31162
31188
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
@@ -31364,9 +31390,9 @@ const readBlob = async function* (blob) {
|
|
|
31364
31390
|
}
|
|
31365
31391
|
};
|
|
31366
31392
|
|
|
31367
|
-
const BOUNDARY_ALPHABET =
|
|
31393
|
+
const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_';
|
|
31368
31394
|
|
|
31369
|
-
const textEncoder = new TextEncoder$
|
|
31395
|
+
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new require$$1$2.TextEncoder();
|
|
31370
31396
|
|
|
31371
31397
|
const CRLF = '\r\n';
|
|
31372
31398
|
const CRLF_BYTES = textEncoder.encode(CRLF);
|
|
@@ -31424,7 +31450,7 @@ const formDataToStream = (form, headersHandler, options) => {
|
|
|
31424
31450
|
const {
|
|
31425
31451
|
tag = 'form-data-boundary',
|
|
31426
31452
|
size = 25,
|
|
31427
|
-
boundary = tag + '-' +
|
|
31453
|
+
boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)
|
|
31428
31454
|
} = options || {};
|
|
31429
31455
|
|
|
31430
31456
|
if(!utils$1.isFormData(form)) {
|
|
@@ -31698,7 +31724,7 @@ function dispatchBeforeRedirect(options, responseDetails) {
|
|
|
31698
31724
|
function setProxy(options, configProxy, location) {
|
|
31699
31725
|
let proxy = configProxy;
|
|
31700
31726
|
if (!proxy && proxy !== false) {
|
|
31701
|
-
const proxyUrl =
|
|
31727
|
+
const proxyUrl = proxyFromEnv.getProxyForUrl(location);
|
|
31702
31728
|
if (proxyUrl) {
|
|
31703
31729
|
proxy = new URL(proxyUrl);
|
|
31704
31730
|
}
|
|
@@ -31843,8 +31869,8 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
31843
31869
|
}
|
|
31844
31870
|
|
|
31845
31871
|
// Parse url
|
|
31846
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
31847
|
-
const parsed = new URL(fullPath,
|
|
31872
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
31873
|
+
const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
|
|
31848
31874
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
31849
31875
|
|
|
31850
31876
|
if (protocol === 'data:') {
|
|
@@ -31929,7 +31955,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
31929
31955
|
} catch (e) {
|
|
31930
31956
|
}
|
|
31931
31957
|
}
|
|
31932
|
-
} else if (utils$1.isBlob(data)) {
|
|
31958
|
+
} else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
|
|
31933
31959
|
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
|
31934
31960
|
headers.setContentLength(data.size || 0);
|
|
31935
31961
|
data = stream.Readable.from(readBlob(data));
|
|
@@ -32040,7 +32066,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
32040
32066
|
if (config.socketPath) {
|
|
32041
32067
|
options.socketPath = config.socketPath;
|
|
32042
32068
|
} else {
|
|
32043
|
-
options.hostname = parsed.hostname;
|
|
32069
|
+
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
32044
32070
|
options.port = parsed.port;
|
|
32045
32071
|
setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
|
|
32046
32072
|
}
|
|
@@ -32182,7 +32208,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
32182
32208
|
}
|
|
32183
32209
|
|
|
32184
32210
|
const err = new AxiosError(
|
|
32185
|
-
'
|
|
32211
|
+
'stream has been aborted',
|
|
32186
32212
|
AxiosError.ERR_BAD_RESPONSE,
|
|
32187
32213
|
config,
|
|
32188
32214
|
lastRequest
|
|
@@ -32305,68 +32331,18 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
32305
32331
|
});
|
|
32306
32332
|
};
|
|
32307
32333
|
|
|
32308
|
-
var isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
|
32309
|
-
|
|
32310
|
-
// Standard browser envs have full support of the APIs needed to test
|
|
32311
|
-
// whether the request URL is of the same origin as current location.
|
|
32312
|
-
(function standardBrowserEnv() {
|
|
32313
|
-
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
32314
|
-
const urlParsingNode = document.createElement('a');
|
|
32315
|
-
let originURL;
|
|
32316
|
-
|
|
32317
|
-
/**
|
|
32318
|
-
* Parse a URL to discover its components
|
|
32319
|
-
*
|
|
32320
|
-
* @param {String} url The URL to be parsed
|
|
32321
|
-
* @returns {Object}
|
|
32322
|
-
*/
|
|
32323
|
-
function resolveURL(url) {
|
|
32324
|
-
let href = url;
|
|
32325
|
-
|
|
32326
|
-
if (msie) {
|
|
32327
|
-
// IE needs attribute set twice to normalize properties
|
|
32328
|
-
urlParsingNode.setAttribute('href', href);
|
|
32329
|
-
href = urlParsingNode.href;
|
|
32330
|
-
}
|
|
32331
|
-
|
|
32332
|
-
urlParsingNode.setAttribute('href', href);
|
|
32333
|
-
|
|
32334
|
-
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
32335
|
-
return {
|
|
32336
|
-
href: urlParsingNode.href,
|
|
32337
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
32338
|
-
host: urlParsingNode.host,
|
|
32339
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
32340
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
32341
|
-
hostname: urlParsingNode.hostname,
|
|
32342
|
-
port: urlParsingNode.port,
|
|
32343
|
-
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
32344
|
-
urlParsingNode.pathname :
|
|
32345
|
-
'/' + urlParsingNode.pathname
|
|
32346
|
-
};
|
|
32347
|
-
}
|
|
32348
|
-
|
|
32349
|
-
originURL = resolveURL(window.location.href);
|
|
32350
|
-
|
|
32351
|
-
/**
|
|
32352
|
-
* Determine if a URL shares the same origin as the current location
|
|
32353
|
-
*
|
|
32354
|
-
* @param {String} requestURL The URL to test
|
|
32355
|
-
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
32356
|
-
*/
|
|
32357
|
-
return function isURLSameOrigin(requestURL) {
|
|
32358
|
-
const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
32359
|
-
return (parsed.protocol === originURL.protocol &&
|
|
32360
|
-
parsed.host === originURL.host);
|
|
32361
|
-
};
|
|
32362
|
-
})() :
|
|
32334
|
+
var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
|
|
32335
|
+
url = new URL(url, platform.origin);
|
|
32363
32336
|
|
|
32364
|
-
|
|
32365
|
-
|
|
32366
|
-
|
|
32367
|
-
|
|
32368
|
-
|
|
32369
|
-
|
|
32337
|
+
return (
|
|
32338
|
+
origin.protocol === url.protocol &&
|
|
32339
|
+
origin.host === url.host &&
|
|
32340
|
+
(isMSIE || origin.port === url.port)
|
|
32341
|
+
);
|
|
32342
|
+
})(
|
|
32343
|
+
new URL(platform.origin),
|
|
32344
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
32345
|
+
) : () => true;
|
|
32370
32346
|
|
|
32371
32347
|
var cookies = platform.hasStandardBrowserEnv ?
|
|
32372
32348
|
|
|
@@ -32423,7 +32399,7 @@ function mergeConfig(config1, config2) {
|
|
|
32423
32399
|
config2 = config2 || {};
|
|
32424
32400
|
const config = {};
|
|
32425
32401
|
|
|
32426
|
-
function getMergedValue(target, source, caseless) {
|
|
32402
|
+
function getMergedValue(target, source, prop, caseless) {
|
|
32427
32403
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
32428
32404
|
return utils$1.merge.call({caseless}, target, source);
|
|
32429
32405
|
} else if (utils$1.isPlainObject(source)) {
|
|
@@ -32435,11 +32411,11 @@ function mergeConfig(config1, config2) {
|
|
|
32435
32411
|
}
|
|
32436
32412
|
|
|
32437
32413
|
// eslint-disable-next-line consistent-return
|
|
32438
|
-
function mergeDeepProperties(a, b, caseless) {
|
|
32414
|
+
function mergeDeepProperties(a, b, prop , caseless) {
|
|
32439
32415
|
if (!utils$1.isUndefined(b)) {
|
|
32440
|
-
return getMergedValue(a, b, caseless);
|
|
32416
|
+
return getMergedValue(a, b, prop , caseless);
|
|
32441
32417
|
} else if (!utils$1.isUndefined(a)) {
|
|
32442
|
-
return getMergedValue(undefined, a, caseless);
|
|
32418
|
+
return getMergedValue(undefined, a, prop , caseless);
|
|
32443
32419
|
}
|
|
32444
32420
|
}
|
|
32445
32421
|
|
|
@@ -32497,7 +32473,7 @@ function mergeConfig(config1, config2) {
|
|
|
32497
32473
|
socketPath: defaultToConfig2,
|
|
32498
32474
|
responseEncoding: defaultToConfig2,
|
|
32499
32475
|
validateStatus: mergeDirectKeys,
|
|
32500
|
-
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
32476
|
+
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
|
32501
32477
|
};
|
|
32502
32478
|
|
|
32503
32479
|
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
@@ -32745,47 +32721,50 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
32745
32721
|
};
|
|
32746
32722
|
|
|
32747
32723
|
const composeSignals = (signals, timeout) => {
|
|
32748
|
-
|
|
32724
|
+
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
32749
32725
|
|
|
32750
|
-
|
|
32726
|
+
if (timeout || length) {
|
|
32727
|
+
let controller = new AbortController();
|
|
32751
32728
|
|
|
32752
|
-
|
|
32753
|
-
if (!aborted) {
|
|
32754
|
-
aborted = true;
|
|
32755
|
-
unsubscribe();
|
|
32756
|
-
const err = cancel instanceof Error ? cancel : this.reason;
|
|
32757
|
-
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
32758
|
-
}
|
|
32759
|
-
};
|
|
32729
|
+
let aborted;
|
|
32760
32730
|
|
|
32761
|
-
|
|
32762
|
-
|
|
32763
|
-
|
|
32731
|
+
const onabort = function (reason) {
|
|
32732
|
+
if (!aborted) {
|
|
32733
|
+
aborted = true;
|
|
32734
|
+
unsubscribe();
|
|
32735
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
32736
|
+
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
32737
|
+
}
|
|
32738
|
+
};
|
|
32764
32739
|
|
|
32765
|
-
|
|
32766
|
-
if (signals) {
|
|
32767
|
-
timer && clearTimeout(timer);
|
|
32740
|
+
let timer = timeout && setTimeout(() => {
|
|
32768
32741
|
timer = null;
|
|
32769
|
-
|
|
32770
|
-
|
|
32771
|
-
|
|
32772
|
-
|
|
32773
|
-
signals
|
|
32774
|
-
|
|
32775
|
-
|
|
32742
|
+
onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
|
|
32743
|
+
}, timeout);
|
|
32744
|
+
|
|
32745
|
+
const unsubscribe = () => {
|
|
32746
|
+
if (signals) {
|
|
32747
|
+
timer && clearTimeout(timer);
|
|
32748
|
+
timer = null;
|
|
32749
|
+
signals.forEach(signal => {
|
|
32750
|
+
signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
|
|
32751
|
+
});
|
|
32752
|
+
signals = null;
|
|
32753
|
+
}
|
|
32754
|
+
};
|
|
32776
32755
|
|
|
32777
|
-
|
|
32756
|
+
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
32778
32757
|
|
|
32779
|
-
|
|
32758
|
+
const {signal} = controller;
|
|
32780
32759
|
|
|
32781
|
-
|
|
32760
|
+
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
32782
32761
|
|
|
32783
|
-
|
|
32784
|
-
|
|
32785
|
-
timer = null;
|
|
32786
|
-
}];
|
|
32762
|
+
return signal;
|
|
32763
|
+
}
|
|
32787
32764
|
};
|
|
32788
32765
|
|
|
32766
|
+
var composeSignals$1 = composeSignals;
|
|
32767
|
+
|
|
32789
32768
|
const streamChunk = function* (chunk, chunkSize) {
|
|
32790
32769
|
let len = chunk.byteLength;
|
|
32791
32770
|
|
|
@@ -32804,14 +32783,34 @@ const streamChunk = function* (chunk, chunkSize) {
|
|
|
32804
32783
|
}
|
|
32805
32784
|
};
|
|
32806
32785
|
|
|
32807
|
-
const readBytes = async function* (iterable, chunkSize
|
|
32808
|
-
for await (const chunk of iterable) {
|
|
32809
|
-
yield* streamChunk(
|
|
32786
|
+
const readBytes = async function* (iterable, chunkSize) {
|
|
32787
|
+
for await (const chunk of readStream(iterable)) {
|
|
32788
|
+
yield* streamChunk(chunk, chunkSize);
|
|
32789
|
+
}
|
|
32790
|
+
};
|
|
32791
|
+
|
|
32792
|
+
const readStream = async function* (stream) {
|
|
32793
|
+
if (stream[Symbol.asyncIterator]) {
|
|
32794
|
+
yield* stream;
|
|
32795
|
+
return;
|
|
32796
|
+
}
|
|
32797
|
+
|
|
32798
|
+
const reader = stream.getReader();
|
|
32799
|
+
try {
|
|
32800
|
+
for (;;) {
|
|
32801
|
+
const {done, value} = await reader.read();
|
|
32802
|
+
if (done) {
|
|
32803
|
+
break;
|
|
32804
|
+
}
|
|
32805
|
+
yield value;
|
|
32806
|
+
}
|
|
32807
|
+
} finally {
|
|
32808
|
+
await reader.cancel();
|
|
32810
32809
|
}
|
|
32811
32810
|
};
|
|
32812
32811
|
|
|
32813
|
-
const trackStream = (stream, chunkSize, onProgress, onFinish
|
|
32814
|
-
const iterator = readBytes(stream, chunkSize
|
|
32812
|
+
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
32813
|
+
const iterator = readBytes(stream, chunkSize);
|
|
32815
32814
|
|
|
32816
32815
|
let bytes = 0;
|
|
32817
32816
|
let done;
|
|
@@ -32914,7 +32913,11 @@ const getBodyLength = async (body) => {
|
|
|
32914
32913
|
}
|
|
32915
32914
|
|
|
32916
32915
|
if(utils$1.isSpecCompliantForm(body)) {
|
|
32917
|
-
|
|
32916
|
+
const _request = new Request(platform.origin, {
|
|
32917
|
+
method: 'POST',
|
|
32918
|
+
body,
|
|
32919
|
+
});
|
|
32920
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
32918
32921
|
}
|
|
32919
32922
|
|
|
32920
32923
|
if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
|
@@ -32954,18 +32957,13 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
32954
32957
|
|
|
32955
32958
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
32956
32959
|
|
|
32957
|
-
let
|
|
32958
|
-
composeSignals([signal, cancelToken], timeout) : [];
|
|
32959
|
-
|
|
32960
|
-
let finished, request;
|
|
32960
|
+
let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
32961
32961
|
|
|
32962
|
-
|
|
32963
|
-
!finished && setTimeout(() => {
|
|
32964
|
-
composedSignal && composedSignal.unsubscribe();
|
|
32965
|
-
});
|
|
32962
|
+
let request;
|
|
32966
32963
|
|
|
32967
|
-
|
|
32968
|
-
|
|
32964
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
32965
|
+
composedSignal.unsubscribe();
|
|
32966
|
+
});
|
|
32969
32967
|
|
|
32970
32968
|
let requestContentLength;
|
|
32971
32969
|
|
|
@@ -32992,7 +32990,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
32992
32990
|
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
32993
32991
|
);
|
|
32994
32992
|
|
|
32995
|
-
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush
|
|
32993
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
32996
32994
|
}
|
|
32997
32995
|
}
|
|
32998
32996
|
|
|
@@ -33000,6 +32998,9 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
33000
32998
|
withCredentials = withCredentials ? 'include' : 'omit';
|
|
33001
32999
|
}
|
|
33002
33000
|
|
|
33001
|
+
// Cloudflare Workers throws when credentials are defined
|
|
33002
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
33003
|
+
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
33003
33004
|
request = new Request(url, {
|
|
33004
33005
|
...fetchOptions,
|
|
33005
33006
|
signal: composedSignal,
|
|
@@ -33007,14 +33008,14 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
33007
33008
|
headers: headers.normalize().toJSON(),
|
|
33008
33009
|
body: data,
|
|
33009
33010
|
duplex: "half",
|
|
33010
|
-
credentials: withCredentials
|
|
33011
|
+
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
33011
33012
|
});
|
|
33012
33013
|
|
|
33013
33014
|
let response = await fetch(request);
|
|
33014
33015
|
|
|
33015
33016
|
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
33016
33017
|
|
|
33017
|
-
if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
|
|
33018
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
33018
33019
|
const options = {};
|
|
33019
33020
|
|
|
33020
33021
|
['status', 'statusText', 'headers'].forEach(prop => {
|
|
@@ -33031,8 +33032,8 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
33031
33032
|
response = new Response(
|
|
33032
33033
|
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
33033
33034
|
flush && flush();
|
|
33034
|
-
|
|
33035
|
-
}
|
|
33035
|
+
unsubscribe && unsubscribe();
|
|
33036
|
+
}),
|
|
33036
33037
|
options
|
|
33037
33038
|
);
|
|
33038
33039
|
}
|
|
@@ -33041,9 +33042,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
33041
33042
|
|
|
33042
33043
|
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
|
33043
33044
|
|
|
33044
|
-
!isStreamResponse &&
|
|
33045
|
-
|
|
33046
|
-
stopTimeout && stopTimeout();
|
|
33045
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
33047
33046
|
|
|
33048
33047
|
return await new Promise((resolve, reject) => {
|
|
33049
33048
|
settle(resolve, reject, {
|
|
@@ -33056,7 +33055,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
33056
33055
|
});
|
|
33057
33056
|
})
|
|
33058
33057
|
} catch (err) {
|
|
33059
|
-
|
|
33058
|
+
unsubscribe && unsubscribe();
|
|
33060
33059
|
|
|
33061
33060
|
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
|
33062
33061
|
throw Object.assign(
|
|
@@ -33267,6 +33266,14 @@ validators$1.transitional = function transitional(validator, version, message) {
|
|
|
33267
33266
|
};
|
|
33268
33267
|
};
|
|
33269
33268
|
|
|
33269
|
+
validators$1.spelling = function spelling(correctSpelling) {
|
|
33270
|
+
return (value, opt) => {
|
|
33271
|
+
// eslint-disable-next-line no-console
|
|
33272
|
+
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
33273
|
+
return true;
|
|
33274
|
+
}
|
|
33275
|
+
};
|
|
33276
|
+
|
|
33270
33277
|
/**
|
|
33271
33278
|
* Assert object's properties type
|
|
33272
33279
|
*
|
|
@@ -33336,9 +33343,9 @@ class Axios {
|
|
|
33336
33343
|
return await this._request(configOrUrl, config);
|
|
33337
33344
|
} catch (err) {
|
|
33338
33345
|
if (err instanceof Error) {
|
|
33339
|
-
let dummy;
|
|
33346
|
+
let dummy = {};
|
|
33340
33347
|
|
|
33341
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy
|
|
33348
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
33342
33349
|
|
|
33343
33350
|
// slice off the Error: ... line
|
|
33344
33351
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
|
@@ -33393,6 +33400,18 @@ class Axios {
|
|
|
33393
33400
|
}
|
|
33394
33401
|
}
|
|
33395
33402
|
|
|
33403
|
+
// Set config.allowAbsoluteUrls
|
|
33404
|
+
if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
|
|
33405
|
+
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
33406
|
+
} else {
|
|
33407
|
+
config.allowAbsoluteUrls = true;
|
|
33408
|
+
}
|
|
33409
|
+
|
|
33410
|
+
validator.assertOptions(config, {
|
|
33411
|
+
baseUrl: validators.spelling('baseURL'),
|
|
33412
|
+
withXsrfToken: validators.spelling('withXSRFToken')
|
|
33413
|
+
}, true);
|
|
33414
|
+
|
|
33396
33415
|
// Set config.method
|
|
33397
33416
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
33398
33417
|
|
|
@@ -33483,7 +33502,7 @@ class Axios {
|
|
|
33483
33502
|
|
|
33484
33503
|
getUri(config) {
|
|
33485
33504
|
config = mergeConfig(this.defaults, config);
|
|
33486
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
33505
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
33487
33506
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
33488
33507
|
}
|
|
33489
33508
|
}
|
|
@@ -33623,6 +33642,20 @@ class CancelToken {
|
|
|
33623
33642
|
}
|
|
33624
33643
|
}
|
|
33625
33644
|
|
|
33645
|
+
toAbortSignal() {
|
|
33646
|
+
const controller = new AbortController();
|
|
33647
|
+
|
|
33648
|
+
const abort = (err) => {
|
|
33649
|
+
controller.abort(err);
|
|
33650
|
+
};
|
|
33651
|
+
|
|
33652
|
+
this.subscribe(abort);
|
|
33653
|
+
|
|
33654
|
+
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
33655
|
+
|
|
33656
|
+
return controller.signal;
|
|
33657
|
+
}
|
|
33658
|
+
|
|
33626
33659
|
/**
|
|
33627
33660
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
33628
33661
|
* cancels the `CancelToken`.
|