@midwayjs/cross-domain 4.0.0-beta.7 → 4.0.0-beta.8

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.
@@ -14,6 +14,7 @@ const core_1 = require("@midwayjs/core");
14
14
  const DefaultConfig = require("./config/config.default");
15
15
  const cors_1 = require("./middleware/cors");
16
16
  let CrossDomainConfiguration = class CrossDomainConfiguration {
17
+ applicationManager;
17
18
  async onReady() {
18
19
  this.applicationManager
19
20
  .getApplications(['koa', 'faas', 'express', 'egg'])
package/dist/jsonp.js CHANGED
@@ -12,6 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.JSONPService = void 0;
13
13
  const core_1 = require("@midwayjs/core");
14
14
  let JSONPService = class JSONPService {
15
+ ctx;
16
+ jsonpConfig;
17
+ res;
15
18
  jsonp(body, config) {
16
19
  this.ctx.type = 'js';
17
20
  // https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/X-Content-Type-Options
@@ -13,6 +13,7 @@ exports.CorsMiddleware = void 0;
13
13
  const core_1 = require("@midwayjs/core");
14
14
  const vary = require("vary");
15
15
  let CorsMiddleware = class CorsMiddleware {
16
+ cors;
16
17
  resolve(app) {
17
18
  if ('express' === app.getNamespace()) {
18
19
  return async (req, res, next) => {
@@ -24,6 +24,7 @@ exports.JSONPFilter = JSONPFilter = __decorate([
24
24
  (0, core_1.Match)()
25
25
  ], JSONPFilter);
26
26
  let JSONPMiddleware = class JSONPMiddleware {
27
+ jsonp;
27
28
  resolve(app) {
28
29
  if ('express' === app.getNamespace()) {
29
30
  app.useFilter(JSONPFilter);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/cross-domain",
3
- "version": "4.0.0-beta.7",
3
+ "version": "4.0.0-beta.8",
4
4
  "description": "Midway Component for Cross Domain",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -25,12 +25,12 @@
25
25
  "vary": "1.1.2"
26
26
  },
27
27
  "devDependencies": {
28
- "@midwayjs/core": "^4.0.0-beta.7",
29
- "@midwayjs/express": "^4.0.0-beta.7",
30
- "@midwayjs/faas": "^4.0.0-beta.7",
31
- "@midwayjs/koa": "^4.0.0-beta.7",
32
- "@midwayjs/mock": "^4.0.0-beta.7",
33
- "@midwayjs/web": "^4.0.0-beta.7"
28
+ "@midwayjs/core": "^4.0.0-beta.8",
29
+ "@midwayjs/express": "^4.0.0-beta.8",
30
+ "@midwayjs/faas": "^4.0.0-beta.8",
31
+ "@midwayjs/koa": "^4.0.0-beta.8",
32
+ "@midwayjs/mock": "^4.0.0-beta.8",
33
+ "@midwayjs/web": "^4.0.0-beta.8"
34
34
  },
35
- "gitHead": "6a221788112b4d998b3958e0a275579f42816c59"
35
+ "gitHead": "355e55949fdd132b0bdcb4830222a0a027e92ded"
36
36
  }