@jayfong/x-server 1.15.0 → 1.15.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.15.1](https://github.com/jfWorks/x-server/compare/v1.15.0...v1.15.1) (2022-04-26)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * env ([4ae102e](https://github.com/jfWorks/x-server/commit/4ae102eabe2fb0f99f6367d75314d9b2db6b556e))
11
+ * envs ([6fe04ee](https://github.com/jfWorks/x-server/commit/6fe04eedcc2875edd5e0b7398b3fe8f7a826c3e1))
12
+
5
13
  ## [1.15.0](https://github.com/jfWorks/x-server/compare/v1.14.1...v1.15.0) (2022-04-26)
6
14
 
7
15
 
@@ -23,7 +23,7 @@ var _vtils = require("vtils");
23
23
 
24
24
  class BuildUtil {
25
25
  static async build(options) {
26
- var _options$minify;
26
+ var _options$minify, _options$inlineEnvs;
27
27
 
28
28
  const mainFile = _nodePath.default.join(options.cwd, 'src/main.ts');
29
29
 
@@ -75,10 +75,10 @@ class BuildUtil {
75
75
  sourcemap: false,
76
76
  treeShaking: true,
77
77
  banner: {
78
- js: `;process.env.X_SERVER_ENVS=${JSON.stringify((options.inlineEnvs || []).reduce((res, item) => {
78
+ js: `${`;${(_options$inlineEnvs = options.inlineEnvs) == null ? void 0 : _options$inlineEnvs.map(env => `process.env[${JSON.stringify(env.key)}]=${JSON.stringify(env.value)}`).join(';')}` || ''};process.env.X_SERVER_ENVS=${JSON.stringify((options.inlineEnvs || []).reduce((res, item) => {
79
79
  res[item.key] = item.value;
80
80
  return res;
81
- }, {}))}};`
81
+ }, {}))};`
82
82
  },
83
83
  plugins: [{
84
84
  name: 'extract-assets',
@@ -8,7 +8,7 @@ import path from 'node:path';
8
8
  import { dedent, uniq } from 'vtils';
9
9
  export class BuildUtil {
10
10
  static async build(options) {
11
- var _options$minify;
11
+ var _options$minify, _options$inlineEnvs;
12
12
 
13
13
  const mainFile = path.join(options.cwd, 'src/main.ts');
14
14
  const pkgFile = path.join(options.cwd, 'package.json');
@@ -51,10 +51,10 @@ export class BuildUtil {
51
51
  sourcemap: false,
52
52
  treeShaking: true,
53
53
  banner: {
54
- js: `;process.env.X_SERVER_ENVS=${JSON.stringify((options.inlineEnvs || []).reduce((res, item) => {
54
+ js: `${`;${(_options$inlineEnvs = options.inlineEnvs) == null ? void 0 : _options$inlineEnvs.map(env => `process.env[${JSON.stringify(env.key)}]=${JSON.stringify(env.value)}`).join(';')}` || ''};process.env.X_SERVER_ENVS=${JSON.stringify((options.inlineEnvs || []).reduce((res, item) => {
55
55
  res[item.key] = item.value;
56
56
  return res;
57
- }, {}))}};`
57
+ }, {}))};`
58
58
  },
59
59
  plugins: [{
60
60
  name: 'extract-assets',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",