wgt-node-utils 1.2.42 → 1.2.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wgt-node-utils",
3
- "version": "1.2.42",
3
+ "version": "1.2.43",
4
4
  "description": "WGT工具类包",
5
5
  "main": "dist/bundle.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -753,7 +753,6 @@ class wgtNodeUtils {
753
753
  }
754
754
  /**
755
755
  * 获取SDK静态资源
756
- * @param {string} API_PATH - 项目API路径
757
756
  * @param {string} adsTagHref - SDK静态资源桶路径
758
757
  * @param {string} ENV - 环境变量
759
758
  * @param {object} option - 参数
@@ -762,24 +761,24 @@ class wgtNodeUtils {
762
761
  * @param {boolean} option.useSendFeiShu - 是否需要发送飞书
763
762
  * @returns {string} - SDK JS字符串
764
763
  */
765
- getSdkF2eFiles = async(API_PATH, adsTagHref, ENV, option) => {
764
+ getSdkF2eFiles = async(adsTagHref, ENV, option) => {
766
765
  const {
767
766
  components = '容器名称',
768
767
  receive_id = 'oc_aba13955509035daa7a799f30b1b3341',
769
768
  useSendFeiShu = false,
770
769
  } = option;
771
770
 
772
- // 生产环境使用API_PATH,其他环境使用adsTagHref
773
- const sdkFilesPath = ENV === 'prod' ? `${API_PATH}/sdk?kaimen=08E28C7EEED6A1B3F9A80154D75A150B` : adsTagHref;
771
+ // // 生产环境使用API_PATH,其他环境使用adsTagHref
772
+ // const sdkFilesPath = ENV === 'prod' ? `${API_PATH}/sdk?kaimen=08E28C7EEED6A1B3F9A80154D75A150B` : adsTagHref;
774
773
  // 飞书内容
775
774
  const feiShuContent = `{"text":"<b>前端容器node报错</b>\\ncomponent: ${components}\\nenv: ${ENV}\\nmesssage: SDK获取失败"}`;
776
775
 
777
776
  try {
778
- const res = await axios.get(sdkFilesPath);
777
+ const res = await axios.get(adsTagHref);
779
778
  return res.data;
780
779
  } catch (primaryError) {
781
780
  this.sendFeiShu(feiShuContent, receive_id, useSendFeiShu)
782
- console.log(`从主路径获取 SDK 失败: ${sdkFilesPath}`, primaryError);
781
+ console.log(`从主路径获取 SDK 失败: ${adsTagHref}`, primaryError);
783
782
  const fallbackRes = await axios.get(adsTagHref);
784
783
  return fallbackRes.data;
785
784
  }