@faasjs/http 0.0.2-beta.269 → 0.0.2-beta.273

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/index.es.js CHANGED
@@ -339,22 +339,22 @@ class Http {
339
339
  var _a;
340
340
  await next();
341
341
  this.logger.debug('组装网关配置');
342
- this.logger.debug('%o', data);
342
+ this.logger.debug('%j', data);
343
343
  const config = data.config.plugins ?
344
344
  deepMerge(data.config.plugins[this.name || this.type], { config: this.config }) :
345
345
  { config: this.config };
346
346
  // 根据文件及文件夹名生成路径
347
347
  if (!config.config.path) {
348
- config.config.path = '=/' + ((_a = data.name) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '/').replace(/\/index$/, ''));
349
- if (config.config.path === '=/index')
350
- config.config.path = '=/';
348
+ config.config.path = '/' + ((_a = data.name) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '/').replace(/\/index$/, ''));
349
+ if (config.config.path === '/index')
350
+ config.config.path = '/';
351
351
  if (config.config.ignorePathPrefix) {
352
- config.config.path = config.config.path.replace(new RegExp('^=' + config.config.ignorePathPrefix), '=');
353
- if (config.config.path === '=')
354
- config.config.path = '=/';
352
+ config.config.path = config.config.path.replace(new RegExp('^' + config.config.ignorePathPrefix), '');
353
+ if (config.config.path === '')
354
+ config.config.path = '/';
355
355
  }
356
356
  }
357
- this.logger.debug('组装完成 %o', config);
357
+ this.logger.debug('组装完成 %j', config);
358
358
  // 引用服务商部署插件
359
359
  // eslint-disable-next-line @typescript-eslint/no-var-requires
360
360
  const Provider = require(config.provider.type).Provider;
package/lib/index.js CHANGED
@@ -343,22 +343,22 @@ class Http {
343
343
  var _a;
344
344
  await next();
345
345
  this.logger.debug('组装网关配置');
346
- this.logger.debug('%o', data);
346
+ this.logger.debug('%j', data);
347
347
  const config = data.config.plugins ?
348
348
  deep_merge.deepMerge(data.config.plugins[this.name || this.type], { config: this.config }) :
349
349
  { config: this.config };
350
350
  // 根据文件及文件夹名生成路径
351
351
  if (!config.config.path) {
352
- config.config.path = '=/' + ((_a = data.name) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '/').replace(/\/index$/, ''));
353
- if (config.config.path === '=/index')
354
- config.config.path = '=/';
352
+ config.config.path = '/' + ((_a = data.name) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '/').replace(/\/index$/, ''));
353
+ if (config.config.path === '/index')
354
+ config.config.path = '/';
355
355
  if (config.config.ignorePathPrefix) {
356
- config.config.path = config.config.path.replace(new RegExp('^=' + config.config.ignorePathPrefix), '=');
357
- if (config.config.path === '=')
358
- config.config.path = '=/';
356
+ config.config.path = config.config.path.replace(new RegExp('^' + config.config.ignorePathPrefix), '');
357
+ if (config.config.path === '')
358
+ config.config.path = '/';
359
359
  }
360
360
  }
361
- this.logger.debug('组装完成 %o', config);
361
+ this.logger.debug('组装完成 %j', config);
362
362
  // 引用服务商部署插件
363
363
  // eslint-disable-next-line @typescript-eslint/no-var-requires
364
364
  const Provider = require(config.provider.type).Provider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/http",
3
- "version": "0.0.2-beta.269",
3
+ "version": "0.0.2-beta.273",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -26,5 +26,5 @@
26
26
  "rollup-plugin-typescript2": "*",
27
27
  "typescript": "*"
28
28
  },
29
- "gitHead": "4654b7c74cfc41e2b85c10a0545ac999e241cf52"
29
+ "gitHead": "f7dc9d18202a0194a4cf2350b6fb97d1ca64c90e"
30
30
  }