@nocobase/plugin-client 0.7.4-alpha.4 → 0.7.5-alpha.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.
Files changed (2) hide show
  1. package/lib/server.js +21 -27
  2. package/package.json +4 -4
package/lib/server.js CHANGED
@@ -180,33 +180,27 @@ class ClientPlugin extends _server().Plugin {
180
180
  root = (0, _path().resolve)(process.cwd(), root);
181
181
  }
182
182
 
183
- _this2.app.middleware.unshift( /*#__PURE__*/function () {
184
- var _ref4 = _asyncToGenerator(function* (ctx, next) {
185
- if (process.env.APP_ENV === 'production') {
186
- return next();
187
- }
188
-
189
- if (!root) {
190
- return next();
191
- }
192
-
193
- if (ctx.path.startsWith(_this2.app.resourcer.options.prefix)) {
194
- return next();
195
- }
196
-
197
- yield (0, _koaStatic().default)(root)(ctx, next); // console.log('koa-send', root, ctx.status);
198
-
199
- if (ctx.status == 404) {
200
- return (0, _koaSend().default)(ctx, 'index.html', {
201
- root
202
- });
203
- }
204
- });
205
-
206
- return function (_x3, _x4) {
207
- return _ref4.apply(this, arguments);
208
- };
209
- }());
183
+ if (process.env.APP_ENV !== 'production' && root) {
184
+ _this2.app.middleware.unshift( /*#__PURE__*/function () {
185
+ var _ref4 = _asyncToGenerator(function* (ctx, next) {
186
+ if (ctx.path.startsWith(_this2.app.resourcer.options.prefix)) {
187
+ return next();
188
+ }
189
+
190
+ yield (0, _koaStatic().default)(root)(ctx, next); // console.log('koa-send', root, ctx.status);
191
+
192
+ if (ctx.status == 404) {
193
+ return (0, _koaSend().default)(ctx, 'index.html', {
194
+ root
195
+ });
196
+ }
197
+ });
198
+
199
+ return function (_x3, _x4) {
200
+ return _ref4.apply(this, arguments);
201
+ };
202
+ }());
203
+ }
210
204
  })();
211
205
  }
212
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-client",
3
- "version": "0.7.4-alpha.4",
3
+ "version": "0.7.5-alpha.1",
4
4
  "main": "lib/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "licenses": [
@@ -10,10 +10,10 @@
10
10
  }
11
11
  ],
12
12
  "dependencies": {
13
- "@nocobase/server": "0.7.4-alpha.4"
13
+ "@nocobase/server": "0.7.5-alpha.1"
14
14
  },
15
15
  "devDependencies": {
16
- "@nocobase/test": "0.7.4-alpha.4"
16
+ "@nocobase/test": "0.7.5-alpha.1"
17
17
  },
18
- "gitHead": "726c06b721b217a6aa5c1421b899d1315e552b57"
18
+ "gitHead": "f6eb27b68185bb0c0b4c2cfca1df84205a9b9173"
19
19
  }