i18-fe-automator-beta 1.0.8 → 1.0.9

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.
@@ -100,8 +100,9 @@ function importExcel({ uploadFilePath, token, env }) {
100
100
  return new Promise((resolve, reject) => {
101
101
  request(
102
102
  {
103
- url: `https://${env === "pro" ? "" : `${env}-`
104
- }hxjf.hongxinshop.com/vue-api/api-globalization/api/i18n/importLangExcel`,
103
+ url: `https://${
104
+ env === "pro" ? "" : `${env}-`
105
+ }hxjf.hongxinshop.com/vue-api/api-globalization/api/i18n/importLangExcel`,
105
106
  method: "POST",
106
107
  headers: {
107
108
  contentType: "multipart/form-data",
@@ -119,7 +120,9 @@ function importExcel({ uploadFilePath, token, env }) {
119
120
  resolve(true);
120
121
  } else {
121
122
  Loading$1.fail(`${env}: 导入文件失败`);
122
- console.log(chalk.red(error || JSON.stringify(res.data)));
123
+ console.log(
124
+ chalk.red(error || (res.data ? JSON.stringify(res.data) : res.msg))
125
+ );
123
126
  }
124
127
  }
125
128
  );
@@ -165,8 +168,9 @@ function uploadExcel({ data, token, env }) {
165
168
  return new Promise((resolve, reject) => {
166
169
  request(
167
170
  {
168
- url: `https://${env === "pro" ? "" : `${env}-`
169
- }hxjf.hongxinshop.com/vue-api/api-globalization/api/i18n/uploadI18nLangForFront`,
171
+ url: `https://${
172
+ env === "pro" ? "" : `${env}-`
173
+ }hxjf.hongxinshop.com/vue-api/api-globalization/api/i18n/uploadI18nLangForFront`,
170
174
  method: "POST",
171
175
  json: true,
172
176
  headers: {
@@ -78,8 +78,9 @@ function importExcel({ uploadFilePath, token, env }) {
78
78
  return new Promise((resolve, reject) => {
79
79
  request(
80
80
  {
81
- url: `https://${env === "pro" ? "" : `${env}-`
82
- }hxjf.hongxinshop.com/vue-api/api-globalization/api/i18n/importLangExcel`,
81
+ url: `https://${
82
+ env === "pro" ? "" : `${env}-`
83
+ }hxjf.hongxinshop.com/vue-api/api-globalization/api/i18n/importLangExcel`,
83
84
  method: "POST",
84
85
  headers: {
85
86
  contentType: "multipart/form-data",
@@ -97,7 +98,9 @@ function importExcel({ uploadFilePath, token, env }) {
97
98
  resolve(true);
98
99
  } else {
99
100
  Loading$1.fail(`${env}: 导入文件失败`);
100
- console.log(chalk.red(error || JSON.stringify(res.data)));
101
+ console.log(
102
+ chalk.red(error || (res.data ? JSON.stringify(res.data) : res.msg))
103
+ );
101
104
  }
102
105
  }
103
106
  );
@@ -143,8 +146,9 @@ function uploadExcel({ data, token, env }) {
143
146
  return new Promise((resolve, reject) => {
144
147
  request(
145
148
  {
146
- url: `https://${env === "pro" ? "" : `${env}-`
147
- }hxjf.hongxinshop.com/vue-api/api-globalization/api/i18n/uploadI18nLangForFront`,
149
+ url: `https://${
150
+ env === "pro" ? "" : `${env}-`
151
+ }hxjf.hongxinshop.com/vue-api/api-globalization/api/i18n/uploadI18nLangForFront`,
148
152
  method: "POST",
149
153
  json: true,
150
154
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18-fe-automator-beta",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "i18-fe-automator-beta内测版本,只用于key: ''替换、检测中文规则等",
5
5
  "type": "module",
6
6
  "bin": {