@jayfong/x-server 2.12.1 → 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.
- package/lib/_cjs/cli/env_util.js +5 -6
- package/lib/cli/env_util.js +5 -6
- package/package.json +1 -1
package/lib/_cjs/cli/env_util.js
CHANGED
|
@@ -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
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
${env.key}: ${
|
|
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
|
}
|
package/lib/cli/env_util.js
CHANGED
|
@@ -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
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
${env.key}: ${
|
|
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
|
}
|