@ray-js/api 1.7.0 → 1.7.2

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.
@@ -1,4 +1,4 @@
1
- type IRegionCode = 'AY' | 'AZ' | 'EU' | 'IN' | 'UE' | 'WE' | 'RU';
1
+ type IRegionCode = 'AY' | 'AZ' | 'EU' | 'IN' | 'UE' | 'WE' | 'RU' | 'SG';
2
2
  type ICdnMap = Record<string, string> | Record<IRegionCode, Record<string, string>>;
3
3
  /**
4
4
  * 获取 CDN 地址
@@ -8,6 +8,7 @@ type ICdnMap = Record<string, string> | Record<IRegionCode, Record<string, strin
8
8
  * @param cdnMap - CDN 地址映射表,若未提供,则使用内置 regionMap 直接与 path 进行拼接
9
9
  * @param region - 区域代码,若未提供,则使用内置方法获取,EU 兜底
10
10
  * @returns CDN 完整地址
11
+ * @deprecated - 推荐使用 getCdnUrlAsync 方法
11
12
  */
12
13
  export default function getCdnUrl(path: string, cdnMap?: ICdnMap, region?: IRegionCode): string;
13
14
  /**
@@ -6,6 +6,7 @@
6
6
  * @param cdnMap - CDN 地址映射表,若未提供,则使用内置 regionMap 直接与 path 进行拼接
7
7
  * @param region - 区域代码,若未提供,则使用内置方法获取,EU 兜底
8
8
  * @returns CDN 完整地址
9
+ * @deprecated - 推荐使用 getCdnUrlAsync 方法
9
10
  */
10
11
  export default function getCdnUrl(path) {
11
12
  return path;
@@ -1,4 +1,4 @@
1
- type IRegionCode = 'AY' | 'AZ' | 'EU' | 'IN' | 'UE' | 'WE' | 'RU';
1
+ type IRegionCode = 'AY' | 'AZ' | 'EU' | 'IN' | 'UE' | 'WE' | 'RU' | 'SG';
2
2
  type ICdnMap = Record<string, string> | Record<IRegionCode, Record<string, string>>;
3
3
  export declare function getRegionCode(): Promise<IRegionCode>;
4
4
  /**
@@ -2,6 +2,7 @@ import get from 'lodash/get';
2
2
  const regionMap = {
3
3
  AY: 'https://images.tuyacn.com',
4
4
  AZ: 'https://usimagesd1448c85ulz2o4.cdn5th.com',
5
+ SG: 'https://usimagesd1448c85ulz2o4.cdn5th.com',
5
6
  EU: 'https://euimagesd2h2yqnfpu4gl5.cdn5th.com',
6
7
  IN: 'https://inimagesd1jqokb9wptk2t.cdn5th.com',
7
8
  RU: 'https://euimagesd2h2yqnfpu4gl5.cdn5th.com',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,14 +29,14 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.7.0",
33
- "@ray-js/router": "1.7.0",
32
+ "@ray-js/framework": "1.7.2",
33
+ "@ray-js/router": "1.7.2",
34
34
  "@ray-js/wechat": "^0.3.8",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.7.0",
39
+ "@ray-js/cli": "1.7.2",
40
40
  "art-template": "^4.13.4",
41
41
  "fs-extra": "^10.1.0",
42
42
  "miniprogram-api-typings": "^3.12.3",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.com"
48
48
  },
49
- "gitHead": "c230e01c313aca9700e12d14b80488aae9bec3d3"
49
+ "gitHead": "bda1afed71ada394aeb96f057f0d5e31ee251110"
50
50
  }