@jayfong/x-server 2.12.0 → 2.12.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.
@@ -66,7 +66,7 @@ class DeployUtil {
66
66
  });
67
67
  await ssh.execCommand((0, _vtils.dedent)`
68
68
  set -ex
69
- curl --header "Content-Type: application/json" \\
69
+ curl --silent --header "Content-Type: application/json" \\
70
70
  --request "POST" \\
71
71
  --data ${JSON.stringify(JSON.stringify({
72
72
  token: options.token,
@@ -172,12 +172,11 @@ class EnvUtil {
172
172
  NODE_ENV: 'development' | 'production';
173
173
  ${envs.map(env => (0, _vtils.dedent)`
174
174
  ${env.comment ? (0, _vtils.dedent)`
175
- /**
176
- ${env.comment.split(/[\r\n]+/g).map(line => `* ${line.trim()}`).join('\n*\n')}
177
- */
178
- ` : ''}
179
- ${env.key}: ${// TODO: 优化类型推断
180
- Array.isArray(env.value) ? `Array<${typeof env.value[0]}>` : typeof env.value};
175
+ /**
176
+ ${env.comment.split(/[\r\n]+/g).map(line => `* ${line.trim()}`).join('\n*\n')}
177
+ */
178
+ ` : ''}
179
+ ${env.key}: ${Array.isArray(env.value) ? `Array<${env.value[0] ? typeof env.value[0] : 'any'}>` : typeof env.value};
181
180
  `).join('\n')}
182
181
  }
183
182
  }
@@ -54,7 +54,7 @@ export class DeployUtil {
54
54
  });
55
55
  await ssh.execCommand(dedent`
56
56
  set -ex
57
- curl --header "Content-Type: application/json" \\
57
+ curl --silent --header "Content-Type: application/json" \\
58
58
  --request "POST" \\
59
59
  --data ${JSON.stringify(JSON.stringify({
60
60
  token: options.token,
@@ -158,12 +158,11 @@ export class EnvUtil {
158
158
  NODE_ENV: 'development' | 'production';
159
159
  ${envs.map(env => dedent`
160
160
  ${env.comment ? dedent`
161
- /**
162
- ${env.comment.split(/[\r\n]+/g).map(line => `* ${line.trim()}`).join('\n*\n')}
163
- */
164
- ` : ''}
165
- ${env.key}: ${// TODO: 优化类型推断
166
- Array.isArray(env.value) ? `Array<${typeof env.value[0]}>` : typeof env.value};
161
+ /**
162
+ ${env.comment.split(/[\r\n]+/g).map(line => `* ${line.trim()}`).join('\n*\n')}
163
+ */
164
+ ` : ''}
165
+ ${env.key}: ${Array.isArray(env.value) ? `Array<${env.value[0] ? typeof env.value[0] : 'any'}>` : typeof env.value};
167
166
  `).join('\n')}
168
167
  }
169
168
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "2.12.0",
3
+ "version": "2.12.2",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",