Merge branch 'dev' of codeup.aliyun.com:61c14a7efa282c88e103c23f/oak-external-sdk into dev

This commit is contained in:
Xu Chang 2023-12-16 22:13:59 +08:00
commit 559644c269
18 changed files with 7 additions and 19 deletions

0
es/fetch/index.d.ts vendored
View File

View File

@ -1,2 +0,0 @@
"use strict";
require('isomorphic-fetch');

View File

View File

@ -1,2 +0,0 @@
"use strict";
global.fetch = global.fetch;

View File

View File

@ -1,2 +0,0 @@
"use strict";
global.fetch = fetch;

View File

@ -57,7 +57,7 @@ export class CTYunInstance {
accessKey: this.accessKey,
policy: signInfo.encodePolicy,
signature: signInfo.signature,
uploadHost: `http://${bucket}.${CTYun_ENDPOINT_LIST[zone].ul}`,
uploadHost: `https://${bucket}.${CTYun_ENDPOINT_LIST[zone].ul}`,
bucket,
};
}

View File

@ -4,7 +4,7 @@ import { Md5 } from 'ts-md5';
import { Buffer } from 'buffer';
import { stringify } from 'querystring';
import { OakExternalException, OakNetworkException, } from 'oak-domain/lib/types/Exception';
import { url as URL } from 'oak-domain/lib/utils/url/index';
import { url as URL } from 'oak-domain/lib/utils/url';
/**
* qiniu endpoint list
* https://developer.qiniu.com/kodo/1671/region-endpoint-fq

View File

View File

@ -1,2 +0,0 @@
"use strict";
require('isomorphic-fetch');

View File

View File

@ -1,2 +0,0 @@
"use strict";
global.fetch = global.fetch;

View File

View File

@ -1,2 +0,0 @@
"use strict";
global.fetch = fetch;

View File

@ -61,7 +61,7 @@ class CTYunInstance {
accessKey: this.accessKey,
policy: signInfo.encodePolicy,
signature: signInfo.signature,
uploadHost: `http://${bucket}.${CTYun_ENDPOINT_LIST[zone].ul}`,
uploadHost: `https://${bucket}.${CTYun_ENDPOINT_LIST[zone].ul}`,
bucket,
};
}

View File

@ -8,7 +8,7 @@ const ts_md5_1 = require("ts-md5");
const buffer_1 = require("buffer");
const querystring_1 = require("querystring");
const Exception_1 = require("oak-domain/lib/types/Exception");
const index_1 = require("oak-domain/lib/utils/url/index");
const url_1 = require("oak-domain/lib/utils/url");
/**
* qiniu endpoint list
* https://developer.qiniu.com/kodo/1671/region-endpoint-fq
@ -344,7 +344,7 @@ class QiniuCloudInstance {
/**
* web/server环境测试通过小程序没测by Xc
*/
const url = new index_1.url(`https://${host}${path}`);
const url = new url_1.url(`https://${host}${path}`);
if (process.env.NODE_ENV === 'development' && mockData) {
console.warn(`mocking access qiniu api: url: ${url.toString()}, body: ${JSON.stringify(body)}, method: ${method}`, mockData);
return mockData;

View File

@ -62,7 +62,7 @@ export class CTYunInstance {
accessKey: this.accessKey,
policy: signInfo.encodePolicy,
signature: signInfo.signature,
uploadHost: `http://${bucket}.${CTYun_ENDPOINT_LIST[zone].ul}`,
uploadHost: `https://${bucket}.${CTYun_ENDPOINT_LIST[zone].ul}`,
bucket,
};
} catch (err) {

View File

@ -7,7 +7,7 @@ import {
OakExternalException,
OakNetworkException,
} from 'oak-domain/lib/types/Exception';
import { url as URL, urlObject as UrlObject } from 'oak-domain/lib/utils/url/index';
import { url as URL, urlObject as UrlObject } from 'oak-domain/lib/utils/url';
import { QiniuZone } from '../../types/Qiniu';
/**